Compare commits
No commits in common. "3e8b0e26780444a86b1cc095c47e54040095af94" and "11587f47a1c2a90664525f99db24f03cc4cedd23" have entirely different histories.
3e8b0e2678
...
11587f47a1
|
@ -24,7 +24,7 @@ namespace HRM.DA
|
|||
{
|
||||
string sql = SQLParser.MakeSQL(
|
||||
"INSERT INTO ProductionBonusSetup(ProductionBonusSetupID, ProgramName, AchivedPercent, OTHour, SalaryMonth, DesignNo, FromDate, ToDate, MaxPerson, CreatedBy, CreationDate, Status)" +
|
||||
" VALUES(%n, %s, %n, %n, %d, %s, %d, %d, %n, %n, %d, %n)", item.ID, item.ProgramName, item.AchivedPercent, item.OTHour,
|
||||
" VALUES(%n, %s, %n, %n, %d, %s, %d, %d, %n, %d, %n)", item.ID, item.ProgramName, item.AchivedPercent, item.OTHour,
|
||||
item.SalaryMonth, item.DesignNo, item.FromDate, item.ToDate, item.MaxPerson, item.CreatedBy, item.CreatedDate,
|
||||
item.Status);
|
||||
tc.ExecuteNonQuery(sql);
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ApiService {
|
|||
|
||||
public isSSO = false;
|
||||
public versionDeployement = false;
|
||||
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2024, 9, 29))}-`+"01";
|
||||
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2024, 7, 18))}-`+"01";
|
||||
public static BASE_URL = '';
|
||||
public base_url = '';
|
||||
// public currentLink = '';
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<div class="p-col-12">
|
||||
<kendo-grid #grid [data]="employeeList" [pageable]="false" [sortable]="true" [reorderable]="true" [resizable]="true" [height]="450">
|
||||
<ng-template kendoGridToolbarTemplate>
|
||||
<button type="button" kendoButton icon="delete" class="kt-delete" (click)="onClickRemoveAll()">
|
||||
<button type="button" kendoButton icon="delete" class="kt-delete">
|
||||
Remove All
|
||||
</button>
|
||||
<kendo-grid-spacer></kendo-grid-spacer>
|
||||
|
@ -114,19 +114,19 @@
|
|||
</kendo-grid>
|
||||
</div>
|
||||
<div class="p-col-2 label-ailgn">
|
||||
<input type="radio" name="employeeSelection" value="commonEmployee" #commonEmployee
|
||||
<!-- <input type="radio" name="employeeSelection" value="commonEmployee" #commonEmployee
|
||||
[(ngModel)]="employeeSelection" kendoRadioButton />
|
||||
<kendo-label [for]="commonEmployee" text=" Multiple"></kendo-label>
|
||||
<kendo-label [for]="commonEmployee" text=" Common Employee"></kendo-label> -->
|
||||
</div>
|
||||
<div class="p-col-2 label-ailgn">
|
||||
<input type="radio" name="employeeSelection" value="supervisor" #supervisor [(ngModel)]="employeeSelection"
|
||||
<!-- <input type="radio" name="employeeSelection" value="supervisor" #supervisor [(ngModel)]="employeeSelection"
|
||||
kendoRadioButton />
|
||||
<kendo-label [for]="supervisor" text=" Single"></kendo-label>
|
||||
<kendo-label [for]="supervisor" text=" Supervisor"></kendo-label> -->
|
||||
</div>
|
||||
<div class="p-col-4">
|
||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)" [setSelectedEmp]="selectedEmps"
|
||||
[MultiSelect]="employeeSelection==='commonEmployee'" (keydown)="onKeyDown($event)" ></app-employee-picker>
|
||||
<!-- [MultiSelect]="false" (keydown)="onKeyDown($event)" *ngIf="allEmps.length!=0"></app-employee-picker> -->
|
||||
[MultiSelect]="false" (keydown)="onKeyDown($event)" *ngIf="allEmps.length!=0"></app-employee-picker>
|
||||
<!-- [MultiSelect]="employeeSelection==='commonEmployee'"></app-employee-picker> -->
|
||||
</div>
|
||||
<div class="p-col-2"></div>
|
||||
<div class="p-col-2" align="right">
|
||||
|
|
|
@ -179,10 +179,6 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
|||
this.productionBonusSetup.fromDate = new Date(this.productionBonusSetup.fromDate);
|
||||
this.productionBonusSetup.toDate = new Date(this.productionBonusSetup.toDate);
|
||||
this.loadingPanelService.ShowLoadingPanel = false;
|
||||
|
||||
this.startTime = this.setTime(this.startTime, 6, 0, 0);
|
||||
this.endTime = this.setTime(this.endTime, 23, 59, 0);
|
||||
this.selectedLine = undefined;
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -269,31 +265,31 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
|||
this.notificationService.showWarning('Please Select an Employee');
|
||||
return;
|
||||
}
|
||||
if (this.employeeSelection === 'commonEmployee') {
|
||||
if (this.selectedEmps !== null || this.selectedEmps !== undefined) {
|
||||
// console.log(this.selectedEmps);
|
||||
// console.log(this.employeeList);
|
||||
// for (let i = 0; i < this.selectedEmps.length; i++) {
|
||||
// this.AddEmployeebyId(this.selectedEmps[i].employeeID);
|
||||
// if (this.employeeSelection === 'commonEmployee') {
|
||||
// if (this.selectedEmps !== null || this.selectedEmps !== undefined) {
|
||||
// // console.log(this.selectedEmps);
|
||||
// // console.log(this.employeeList);
|
||||
// // for (let i = 0; i < this.selectedEmps.length; i++) {
|
||||
// // this.AddEmployeebyId(this.selectedEmps[i].employeeID);
|
||||
// // }
|
||||
// for (let i = 0, isNew = true; i < this.selectedEmps.length; i++, isNew = true) {
|
||||
// for (let j = 0; j < this.employeeList.length; j++) {
|
||||
// if (this.selectedEmps[i].employeeID == this.employeeList[j].id) {
|
||||
// this.notificationService.showWarning("EmployeeNo " + this.employeeList[j].employeeNo + " Already Exists");
|
||||
// isNew = false;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (isNew) {
|
||||
// this.AddEmployeebyId(this.selectedEmps[i].employeeID);
|
||||
// this.AddEmployeeGridData(this.selectedEmps[i].employeeID, true);
|
||||
// }
|
||||
for (let i = 0, isNew = true; i < this.selectedEmps.length; i++, isNew = true) {
|
||||
for (let j = 0; j < this.employeeList.length; j++) {
|
||||
if (this.selectedEmps[i].employeeID == this.employeeList[j].id) {
|
||||
this.notificationService.showWarning("EmployeeNo " + this.employeeList[j].employeeNo + " Already Exists");
|
||||
isNew = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isNew) {
|
||||
this.AddEmployeebyId(this.selectedEmps[i].employeeID);
|
||||
this.AddEmployeeGridData(this.selectedEmps[i].employeeID, true);
|
||||
}
|
||||
|
||||
debugger;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// debugger;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
let sid: number;
|
||||
const emp = this.employeeList.find((e1) => e1.id === this.selectedEmps['employeeID']);
|
||||
const att = this.prodBonusAttn.find((e1) => e1.employeeID === this.selectedEmps['employeeID']);
|
||||
|
@ -321,7 +317,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
|||
else {
|
||||
this.notificationService.showWarning('Employee already exist ! Can\'t Add');
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
AddEmployeebyId(empId: number) {
|
||||
// this.loadingPanelService.ShowLoadingPanel = true;
|
||||
|
@ -352,11 +348,11 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
|||
outTime: this.selectedDate,
|
||||
bonusHour: 0,
|
||||
employeeID: empId,
|
||||
isCommon: false
|
||||
isCommon: isCommonValue
|
||||
};
|
||||
this.prodBonusAttn.push(newProdBonusAttn);
|
||||
// console.log('emplist ' + this.employeeList.length + '\n PbAttn ' + this.prodBonusAttn.length);
|
||||
// this.selectedEmps = undefined;
|
||||
this.selectedEmps = undefined;
|
||||
}
|
||||
// GetSelectedEmployee(sremployee: SearchEmployee) {
|
||||
// if (sremployee === undefined) {
|
||||
|
@ -431,24 +427,18 @@ export class ProductionBonusAttendanceComponent implements OnInit {
|
|||
this.prodBonusAttn.splice(index, 1);
|
||||
}
|
||||
}
|
||||
public onClickRemoveAll(){
|
||||
this.employeeList = [];
|
||||
this.prodBonusAttn = [];
|
||||
}
|
||||
|
||||
public clear() {
|
||||
clear() {
|
||||
this.productionBonusSetup = new ProductionBonusSetup();
|
||||
this.employeeList = [];
|
||||
this.selectedLine = undefined;
|
||||
}
|
||||
|
||||
public onKeyDown(pressedKey) {
|
||||
debugger;
|
||||
if (pressedKey.key === "Enter") {
|
||||
// this.onSave(pressedKey);
|
||||
this.onClickAdd();
|
||||
this.scrollToBottom();
|
||||
this.selectedEmps = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -498,10 +498,6 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
onClickOk() {
|
||||
debugger;
|
||||
if (this.isNewLine) {
|
||||
if(this._departmentPicker.selectedID == undefined){
|
||||
this.notificationService.showWarning('Please Select a Line'); return;
|
||||
}
|
||||
this.prodBonusLine.lineName = this._departmentPicker.selectedObjects[0]['name'];
|
||||
this.productionBonusSetup.productionBonusLines.push(this.prodBonusLine); // for new
|
||||
this.notificationService.showSuccess('New Line added');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user