diff --git a/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.html b/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.html index 9e89334..aa5f149 100644 --- a/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.html +++ b/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.html @@ -1,55 +1,55 @@
-
+
-
+
-
- +
+
-
+
-
+
- -
+
-
+
-
+

Select Schedule Date Betweeen {{productionBonusSetup.fromDate | date: 'dd MMMM yyyy'}} and @@ -58,18 +58,33 @@

+ -
-
- -
+
-
+
-
-
+
+ +
+ +
+ +
+
+ +
+ +
+
@@ -110,8 +125,8 @@
- + [MultiSelect]="false"> +
diff --git a/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.ts b/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.ts index 7636440..64abb7a 100644 --- a/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.ts +++ b/HRM.UI/ClientApp/src/app/payroll-ot/production-bonus-attendance/production-bonus-attendance.component.ts @@ -44,6 +44,9 @@ export class ProductionBonusAttendanceComponent implements OnInit { selectedDate: Date = new Date; + startTime: Date; + endTime: Date; + selectedSalaryDate: Date = new Date(); showScheduleDate: boolean; @@ -343,8 +346,27 @@ export class ProductionBonusAttendanceComponent implements OnInit { // ); // } onClickSubmit() { - console.log(this.prodBonusAttn); + // console.log(this.prodBonusAttn); debugger; + if (this.startTime == undefined || this.endTime == undefined) { + this.notificationService.showWarning('Please Select In/Out Time'); + return; + } + + this.prodBonusAttn.forEach(element => { + let inTime = new Date(element.inTime); + inTime.setHours(this.startTime.getHours()); + inTime.setMinutes(this.startTime.getMinutes()); + inTime.setSeconds(this.startTime.getSeconds()); + element.inTime = inTime; + + let outTime = new Date(element.outTime); + outTime.setHours(this.endTime.getHours()); + outTime.setMinutes(this.endTime.getMinutes()); + outTime.setSeconds(this.endTime.getSeconds()); + element.outTime = outTime; + }); + const data = { prodBonusAttn: this.prodBonusAttn, setupId: this.productionBonusSetup.id,