dev_mashfiq #4

Merged
chapal merged 3 commits from dev_mashfiq into devqc 2024-10-17 10:15:19 +06:00
Showing only changes of commit 5c762ae99f - Show all commits

View File

@ -45,8 +45,8 @@ export class ProductionBonusAttendanceComponent implements OnInit {
selectedDate: Date = new Date; selectedDate: Date = new Date;
startTime: Date; startTime: Date = new Date();
endTime: Date; endTime: Date = new Date();
selectedSalaryDate: Date = new Date(); selectedSalaryDate: Date = new Date();
@ -76,6 +76,8 @@ export class ProductionBonusAttendanceComponent implements OnInit {
// this.Loadlayout(); // this.Loadlayout();
this.productionBonusSetup = new ProductionBonusSetup(); this.productionBonusSetup = new ProductionBonusSetup();
this.showScheduleDate = false; this.showScheduleDate = false;
this.startTime = this.setTime(this.startTime, 6, 0, 0)
this.endTime = this.setTime(this.endTime, 23, 0, 0)
} }
employeeList: Employee[] = []; employeeList: Employee[] = [];
@ -162,7 +164,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
} }
onClickRefresh() { onClickRefresh() {
debugger; // debugger;
const fromDate = new Date(this.productionBonusSetup.fromDate.setHours(0, 0, 0, 0)); const fromDate = new Date(this.productionBonusSetup.fromDate.setHours(0, 0, 0, 0));
const toDate = new Date(this.productionBonusSetup.toDate.setHours(0, 0, 0, 0)); const toDate = new Date(this.productionBonusSetup.toDate.setHours(0, 0, 0, 0));
const selectedDate = new Date(this.selectedDate.setHours(0, 0, 0, 0)); const selectedDate = new Date(this.selectedDate.setHours(0, 0, 0, 0));
@ -186,7 +188,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
() => { () => {
this.loadingPanelService.ShowLoadingPanel = false; this.loadingPanelService.ShowLoadingPanel = false;
this.employeeList = []; this.employeeList = [];
debugger; // debugger;
if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Cutting || if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Cutting ||
this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Finishing)) { this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Finishing)) {
let data = { let data = {
@ -223,6 +225,10 @@ export class ProductionBonusAttendanceComponent implements OnInit {
for (let i = 0; i < this.prodBonusAttn.length; i++) { for (let i = 0; i < this.prodBonusAttn.length; i++) {
this.AddEmployeebyId(this.prodBonusAttn[i].employeeID); this.AddEmployeebyId(this.prodBonusAttn[i].employeeID);
} }
let inTime = new Date(this.prodBonusAttn[0].inTime);
let outTime = new Date(this.prodBonusAttn[0].inTime);
this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds());
this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds());
} }
} }
); );
@ -428,4 +434,12 @@ export class ProductionBonusAttendanceComponent implements OnInit {
scrollToBottom(): void { scrollToBottom(): void {
this.gridScrollableElement.scrollTop = this.gridScrollableElement.scrollHeight; this.gridScrollableElement.scrollTop = this.gridScrollableElement.scrollHeight;
} }
public setTime(date: Date, hour: number, min: number, sec: number): Date{
date.setHours(hour);
date.setMinutes(min);
date.setSeconds(sec);
return date;
}
} }