From 45283d8aa2168a9c359dee3d6665fa490babd514 Mon Sep 17 00:00:00 2001 From: mashfiq Date: Mon, 14 Oct 2024 17:41:30 +0600 Subject: [PATCH] Prodbonusattn Time Addition --- ...production-bonus-attendance.component.html | 65 ++++++++++++------- .../production-bonus-attendance.component.ts | 24 ++++++- 2 files changed, 63 insertions(+), 26 deletions(-) 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, -- 2.40.0.windows.1