Compare commits
4 Commits
f0f32b5cc1
...
114f4588ca
Author | SHA1 | Date | |
---|---|---|---|
114f4588ca | |||
edd488a6b4 | |||
6c0b195075 | |||
38bc2dcecb |
|
@ -662,7 +662,8 @@ namespace HRM.DA
|
|||
|
||||
foreach (ProductionBonusSetup oProductionBonusSetup in _oProductionBonusSetups)
|
||||
{
|
||||
|
||||
//if (oProductionBonusSetup.ID != 12583)
|
||||
//{ continue; }
|
||||
prodAttn = prodAttns.Where(x => x.ProdBonusSetupID == oProductionBonusSetup.ID).ToList();//ToObjectsTemplate();
|
||||
ProdBonusProcessItem oProcessItem = null;
|
||||
foreach (ProdBonusLine oLine in oProductionBonusSetup.ProductionBonusLinesNew)
|
||||
|
@ -689,7 +690,8 @@ namespace HRM.DA
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
//if (item.Key == 2991)
|
||||
//{ }
|
||||
|
||||
bool isSuperVisor = allProdBonusSupervisors.FindIndex(x => x.EmployeeID == item.Key
|
||||
&& x.ProdBonusLineID == oLine.ID) == -1 ? false : true;
|
||||
|
|
|
@ -334,7 +334,8 @@ namespace HRM.Report
|
|||
List<Shift> oShifts = new ShiftService().GetAllShift();
|
||||
|
||||
Shift oShift = null;
|
||||
|
||||
DateTime? bonusIntime = DateTime.MinValue;
|
||||
DateTime? bonusOuttime = DateTime.MinValue;
|
||||
List<ProdBonusAttn> prodAttn = new ProdBonusAttnService().GetBySetupID(designId);
|
||||
string empIds = string.Empty;
|
||||
empIds = prodAttn.Select(x => x.EmployeeID).Distinct().Aggregate(new StringBuilder(), (sb, empid) => sb.Append(empid + ","), sb => sb.ToString().Trim(','));
|
||||
|
@ -362,6 +363,7 @@ namespace HRM.Report
|
|||
double hour = 0;
|
||||
foreach (ProdBonusAttn tAtt in tempAttn)
|
||||
{
|
||||
|
||||
DailyAttnProcess dailyAtt = oDailyAttnProsess.FirstOrDefault(o => o.AttnDate.Date == tAtt.InTime.Date &&
|
||||
o.EmployeeID == item.ID &&
|
||||
(o.AttenType == EnumAttendanceType.Present ||
|
||||
|
@ -370,20 +372,36 @@ namespace HRM.Report
|
|||
o.AttenType == EnumAttendanceType.Early ||
|
||||
o.AttenType == EnumAttendanceType.Late ||
|
||||
o.AttenType == EnumAttendanceType.OutSideDuty));
|
||||
|
||||
double wh = 0;
|
||||
if (dailyAtt != null)
|
||||
{
|
||||
|
||||
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
||||
{
|
||||
bonusIntime = dailyAtt.InTime;
|
||||
bonusOuttime = dailyAtt.OutTime;
|
||||
oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
||||
if (design.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||
dailyAtt.InTime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
else if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
dailyAtt.OutTime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
else if (oShift != null && dailyAtt.InTime.Value.TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
dailyAtt.InTime = dailyAtt.InTime.Value.Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
//if (design.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||
// dailyAtt.InTime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
//else if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
// dailyAtt.OutTime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
//else if (oShift != null && dailyAtt.InTime.Value.TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
// dailyAtt.InTime = dailyAtt.InTime.Value.Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
|
||||
TimeSpan ts = dailyAtt.OutTime.Value - dailyAtt.InTime.Value;
|
||||
if (design.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||
bonusIntime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
else if (dailyAtt.InTime.GetValueOrDefault().TimeOfDay < tAtt.InTime.TimeOfDay)
|
||||
bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(tAtt.InTime.Hour).AddMinutes(tAtt.InTime.Minute);
|
||||
if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
bonusOuttime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
else if (dailyAtt.OutTime.GetValueOrDefault().TimeOfDay > tAtt.OutTime.TimeOfDay)
|
||||
bonusOuttime = dailyAtt.OutTime.GetValueOrDefault().Date.AddHours(tAtt.OutTime.Hour).AddMinutes(tAtt.OutTime.Minute);
|
||||
//else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
// bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
|
||||
//TimeSpan ts = dailyAtt.OutTime.Value - dailyAtt.InTime.Value;
|
||||
TimeSpan ts = (TimeSpan)(bonusOuttime - bonusIntime);
|
||||
if (ts.Minutes < 16 && ts.Hours < 5)
|
||||
wh = ts.Hours;
|
||||
else if (ts.Minutes < 16)
|
||||
|
|
|
@ -208,9 +208,10 @@
|
|||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Sum(Fields!WorkingHour.Value)</Value>
|
||||
<Value>=Sum(CDBL(Fields!WorkingHour.Value))</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>N2</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
@ -245,6 +246,12 @@
|
|||
</GroupExpressions>
|
||||
</Group>
|
||||
<SortExpressions>
|
||||
<SortExpression>
|
||||
<Value>=Year(Fields!Date.Value)</Value>
|
||||
</SortExpression>
|
||||
<SortExpression>
|
||||
<Value>=Month(Fields!Date.Value)</Value>
|
||||
</SortExpression>
|
||||
<SortExpression>
|
||||
<Value>=Fields!Date.Value</Value>
|
||||
</SortExpression>
|
||||
|
|
|
@ -1,88 +1,88 @@
|
|||
<app-loading-panel></app-loading-panel>
|
||||
<!-- <form [formGroup]="productionBonousSetupForm"> -->
|
||||
<div class="p-grid card">
|
||||
<div class="p-col-1 label-ailgn">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<input type="checkbox" kendoCheckBox id="disabled" (change)="OnclickCheckbox()" [checked]="isNewLayout"
|
||||
style="margin-top: -3px ;" />
|
||||
<label style="padding-left: 1%; margin: auto;" for="disabled">
|
||||
New Layout</label>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Salary Month</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-datepicker [(ngModel)]="selectedSalaryDate" [format]="'dd MMMM yyyy'"
|
||||
style="width:100%"></kendo-datepicker>
|
||||
</div>
|
||||
<div class="p-col-2" align="right">
|
||||
<button icon="reload" kendoButton [primary]="true" style="width:60%" *ngIf="!isNewLayout" for="disabled"
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<button icon="reload" kendoButton [primary]="true" style="width: fit-content" *ngIf="!isNewLayout" for="disabled"
|
||||
(click)="Loadlayout()">Refresh</button>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Layout No.</label>
|
||||
</div>
|
||||
<div class="p-col-3" align="right">
|
||||
<div class="p-col-12 p-lg-3">
|
||||
<kendo-dropdownlist [data]="filteredProdBSdata" [(ngModel)]="selectedProdBSdata" [filterable]="true"
|
||||
textField="design" valueField="id" style="width:95%" (filterChange)="handleFilter($event)"
|
||||
*ngIf="!isNewLayout" [defaultItem]="{ design: 'Select layout no..'}" [disabled]="prodBSdata===undefined">
|
||||
textField="design" valueField="id" style="width:100%" (filterChange)="handleFilter($event)"
|
||||
*ngIf="!isNewLayout" [defaultItem]="{ design: 'Select layout no..'}" [disabled]="prodBSdata===undefined"(valueChange)="LayoutDetails()">
|
||||
</kendo-dropdownlist>
|
||||
<input [(ngModel)]="layoutNo" type="text" style="width:95%" pInputText *ngIf="isNewLayout">
|
||||
<input [(ngModel)]="layoutNo" type="text" style="width:100%" pInputText *ngIf="isNewLayout">
|
||||
</div>
|
||||
<div class="p-col-2" align="right">
|
||||
<button icon="information" kendoButton [primary]="true" style="width:60%" *ngIf="selectedProdBSdata!==undefined"
|
||||
(click)="LayoutDetails()" [disabled]="selectedProdBSdata===undefined">Details</button>
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<!-- <button icon="information" kendoButton [primary]="true" style="width:60%" *ngIf="selectedProdBSdata!==undefined"
|
||||
(click)="LayoutDetails()" [disabled]="selectedProdBSdata===undefined">Details</button> -->
|
||||
</div>
|
||||
|
||||
<!-- <div class="p-col-3"></div> -->
|
||||
<kendo-card class="p-col-12 p-md-12 p-lg-12" width="100%" *ngIf="isNewLayout || editDetails" for="disabled">
|
||||
<!-- <div class="p-col-12 p-lg-3"></div> -->
|
||||
<kendo-card class="p-col-12 p-lg-12 p-md-12 p-lg-12" width="100%" *ngIf="isNewLayout || editDetails" for="disabled">
|
||||
<div class="p-grid">
|
||||
<div class="p-col-1 label-ailgn">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Program Name</label>
|
||||
</div>
|
||||
<div class="p-col-3">
|
||||
<div class="p-col-12 p-lg-3">
|
||||
<input [(ngModel)]="productionBonusSetup.programName" style="width:100%" type="text" pInputText>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Max Persons</label>
|
||||
</div>
|
||||
<div class="p-col-3">
|
||||
<div class="p-col-12 p-lg-3">
|
||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.maxPerson"
|
||||
style="width:100%"></kendo-numerictextbox>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Achieved %</label>
|
||||
</div>
|
||||
<div class="p-col-3">
|
||||
<div class="p-col-12 p-lg-3">
|
||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.achivedPercent" [decimals]="2"
|
||||
style="width:100%"></kendo-numerictextbox>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Bonus Type</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-dropdownlist [data]="bonusType" [(ngModel)]="selectedBonusType" [textField]="'label'"
|
||||
[defaultItem]="{ label: 'Select Bonus Type...', value: null }" [valueField]="'value'" style="width:100%">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>From Date</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.fromDate" [format]="'dd MMMM yyyy'"
|
||||
style="width:100%"></kendo-datepicker>
|
||||
</div>
|
||||
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>To Date</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-datepicker [(ngModel)]="productionBonusSetup.toDate" [format]="'dd MMMM yyyy'"
|
||||
style="width:100%"></kendo-datepicker>
|
||||
</div>
|
||||
<div class="p-col-1 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Bonus Hours</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-numerictextbox [(ngModel)]="productionBonusSetup.otHour" [decimals]="2"
|
||||
style="width:100%"></kendo-numerictextbox>
|
||||
</div>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<kendo-grid [data]="productionBonusSetup.productionBonusLines" [pageable]="true" [sortable]="true"
|
||||
[resizable]="true">
|
||||
<ng-template kendoGridToolbarTemplate>
|
||||
<button kendoButton icon="plus" [primary]="true" style="width: 10%; padding: 7px;"
|
||||
<button kendoButton icon="plus" [primary]="true" style="width: fit-content"
|
||||
(click)="onClickAddLine()">Add
|
||||
Line</button>
|
||||
<kendo-grid-spacer></kendo-grid-spacer>
|
||||
|
@ -116,14 +116,14 @@
|
|||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
<button kendoButton icon="gear" [primary]="true" (click)="onCellClickEdit(dataItem)"
|
||||
style="width: 40%; margin-right: 5px;">Edit</button>
|
||||
<button kendoButton icon="delete" [primary]="true" style="width: 40%;" (click)="onClickRemove(dataItem)">Remove</button>
|
||||
<button type="button" kendoButton icon="delete" class="kt-delete" style="width: 40%;" (click)="onClickRemove(dataItem)">Remove</button>
|
||||
</ng-template>
|
||||
</kendo-grid-column>
|
||||
</kendo-grid>
|
||||
|
||||
|
||||
<div class="p-col-12" align="right">
|
||||
<button kendoButton icon="save" [primary]="true" style="width: 10%; padding: 7px;" (click)="onClickSubmit()">Submit</button>
|
||||
<div class="p-col-12 p-lg-12" align="right">
|
||||
<button kendoButton icon="save" [primary]="true" style="width: fit-content" (click)="onClickSubmit()">Submit</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@ -134,49 +134,48 @@
|
|||
</kendo-dialog-titlebar>
|
||||
<kendo-dialog-content>
|
||||
<app-hr-notification-list></app-hr-notification-list>
|
||||
<div class="p-col-12 p-md-12">
|
||||
<div class="p-col-12 p-lg-12 p-md-12">
|
||||
<div class="p-grid">
|
||||
|
||||
<div class="p-col-1 label-ailgn">
|
||||
<div class="p-col-12 p-lg-1 label-ailgn">
|
||||
<label>Line Name</label>
|
||||
</div>
|
||||
<div class="p-col-5" *ngIf="isNewLine">
|
||||
<div class="p-col-12 p-lg-5" *ngIf="isNewLine">
|
||||
<app-dynamic-picker [dynamicPickerView]="_departmentPicker"></app-dynamic-picker>
|
||||
</div>
|
||||
<div class="p-col-5" *ngIf="!isNewLine">
|
||||
<div class="p-col-12 p-lg-5" *ngIf="!isNewLine">
|
||||
<input [(ngModel)]="selectedRow.lineName" [readonly]="!isNewLine" type="text"
|
||||
style="width:100%" pInputText>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
|
||||
</div>
|
||||
<div class="p-col-2 label-ailgn">
|
||||
<div class="p-col-12 p-lg-2 label-ailgn">
|
||||
<label>Scheduled Hours</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<kendo-numerictextbox [(ngModel)]="scheduledHours" [decimals]="2"
|
||||
[readonly]="!isNewLine" style="width: 100%;"></kendo-numerictextbox>
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-numerictextbox [(ngModel)]="selectedRow.scheduledHour" [decimals]="2" style="width: 100%;"(ngModelChange)="onScheduledHoursChange($event)"></kendo-numerictextbox>
|
||||
</div>
|
||||
</div>
|
||||
<p-tabView>
|
||||
<p-tabPanel header="Supervisor/Line Chief/Common Worker" leftIcon="pi pi-user">
|
||||
<div class="p-grid">
|
||||
<div class="p-col-3 label-ailgn">
|
||||
<div class="p-col-12 p-lg-3 label-ailgn">
|
||||
<label>Supervisor/Line Chief/Common Worker</label>
|
||||
</div>
|
||||
<div class="p-col-3">
|
||||
<div class="p-col-12 p-lg-3">
|
||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"
|
||||
[setSelectedEmp]="_pickerSelecteEmp"
|
||||
[isActive]="empPickerActive"></app-employee-picker>
|
||||
</div>
|
||||
<div class="p-col-2 label-ailgn" align="right">
|
||||
<div class="p-col-12 p-lg-2 label-ailgn" align="right">
|
||||
<label>Bonus Percent</label>
|
||||
</div>
|
||||
<div class="p-col-2">
|
||||
<div class="p-col-12 p-lg-2">
|
||||
<kendo-numerictextbox [(ngModel)]="bonusPercent"
|
||||
[decimals]="2"></kendo-numerictextbox>
|
||||
</div>
|
||||
<div class="p-col-2" align="right">
|
||||
<div class="p-col-12 p-lg-2" align="right">
|
||||
<button icon="plus" kendoButton [primary]="true" (click)="newLine()"
|
||||
style="width:80%">Add</button>
|
||||
</div>
|
||||
|
@ -194,7 +193,7 @@
|
|||
</kendo-grid-column>
|
||||
<kendo-grid-column title="Actions" width="30%">
|
||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
<button kendoButton icon="delete" [primary]="true"
|
||||
<button type="button" kendoButton icon="delete" class="kt-delete"
|
||||
style="width: 40%;" (click)="onClickRemoveSupervisors(dataItem)">Remove</button>
|
||||
</ng-template>
|
||||
</kendo-grid-column>
|
||||
|
@ -204,18 +203,30 @@
|
|||
<kendo-grid [kendoGridBinding]="prodBonusLine.prodBonusWorkSchedules" [pageable]="true"
|
||||
[sortable]="true" [reorderable]="true" [resizable]="true">
|
||||
|
||||
<kendo-grid-column field="startDateTime" title="Date" width="100%">
|
||||
<kendo-grid-column field="startDateTime" title="Date" width="100">
|
||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
{{dataItem.startDateTime | date: 'dd MMMM yyyy'}}
|
||||
</ng-template>
|
||||
</kendo-grid-column>
|
||||
|
||||
<!-- <kendo-grid-column field="startDateTime" title="Start Time" width="100">
|
||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
{{dataItem.startDateTime | date: 'hh:mm a'}}
|
||||
</ng-template>
|
||||
</kendo-grid-column>
|
||||
|
||||
<kendo-grid-column field="endDateTime" title="End Time" width="100">
|
||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
{{dataItem.endDateTime | date: 'hh:mm a'}}
|
||||
</ng-template>
|
||||
</kendo-grid-column> -->
|
||||
</kendo-grid>
|
||||
</p-tabPanel>
|
||||
</p-tabView>
|
||||
</div>
|
||||
</kendo-dialog-content>
|
||||
<kendo-dialog-actions>
|
||||
<div class="p-col-12" align="right">
|
||||
<div class="p-col-12 p-lg-12" align="right">
|
||||
<button kendoButton icon="save" (click)="onClickOk()" [primary]="true"
|
||||
style="margin: 5px; width: 15%;">Ok</button>
|
||||
<button kendoButton icon="close" (click)="close()" [primary]="true"
|
||||
|
|
|
@ -272,6 +272,8 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
debugger;
|
||||
// this.onEdit = false;
|
||||
this.isNewLine = true;
|
||||
this.selectedRow = new ProdBonusLine();
|
||||
|
||||
this._departmentPicker = new DynamicPicker(EnumDynamicpickerType.Department, false);
|
||||
this.prodBonusLine = new ProdBonusLine();
|
||||
this.prodBonusWork = new ProdBonusWorkSchedule();
|
||||
|
@ -369,7 +371,6 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
}
|
||||
|
||||
newLine() {
|
||||
debugger;
|
||||
if ((this._departmentPicker.selectedID === undefined || this._departmentPicker.selectedID === 0) &&
|
||||
(this.prodBonusLine.lineName === '' || this.prodBonusLine.lineName === undefined)) {
|
||||
this.notificationService.showWarning('Please Select a Line');
|
||||
|
@ -389,6 +390,13 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
// this.notificationService.showWarning('Please Select Bonus Percentage');
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
debugger;
|
||||
this._employee;
|
||||
this.prodBonusLine.prodBonusSupervisors;
|
||||
|
||||
|
||||
if (this.scheduledHours < 0 || this.bonusPercent < 0) {
|
||||
this.notificationService.showWarning('Scheduled Hours and Bonus Percentage can\'t be negative');
|
||||
return;
|
||||
|
@ -399,6 +407,10 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
var newlineParameter: ProdBonusParameter = new ProdBonusParameter();
|
||||
// var newLayoutWork: ProdBonusWorkSchedule = new ProdBonusWorkSchedule();
|
||||
|
||||
const index = this.prodBonusLine.prodBonusSupervisors.findIndex(sv=> sv.employeeID == this._employee.id);
|
||||
if (index !== -1) {
|
||||
this.prodBonusLine.prodBonusSupervisors.splice(index, 1);
|
||||
}
|
||||
//Supervisor
|
||||
newlineSupervisor.employeeID = this._employee.id;
|
||||
newlineSupervisor.employeeNo = this._employee.employeeNo;
|
||||
|
@ -406,8 +418,6 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
newlineSupervisor.bonusPercent = this.bonusPercent;
|
||||
newlineSupervisor.prodBonusSetupID = this.productionBonusSetup.id;
|
||||
|
||||
|
||||
|
||||
if (this.isNewLine) {
|
||||
newlineParameter.itemID = this._departmentPicker.selectedID;
|
||||
newlineParameter.itemType = 0;
|
||||
|
@ -464,7 +474,6 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
this.prodBonusLine.id = this.selectedRow.id;
|
||||
this.prodBonusLine.lineName = this.selectedRow.lineName;
|
||||
this.prodBonusLine.scheduledHour = this.selectedRow.scheduledHours;
|
||||
|
||||
this.prodBonusLine.prodBonusSupervisors.push(newlineSupervisor);
|
||||
// this.prodBonusLine.prodBonusParameters.push(newlineParameter);
|
||||
|
||||
|
@ -487,6 +496,7 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
|
||||
}
|
||||
onClickOk() {
|
||||
debugger;
|
||||
if (this.isNewLine) {
|
||||
this.productionBonusSetup.productionBonusLines.push(this.prodBonusLine); // for new
|
||||
this.notificationService.showSuccess('New Line added');
|
||||
|
@ -565,4 +575,10 @@ export class ProductionBonusSetupComponent implements OnInit {
|
|||
this.editDetails = false;
|
||||
this.prodBSdata = undefined;
|
||||
}
|
||||
onScheduledHoursChange(value: number){
|
||||
debugger;
|
||||
this.prodBonusLine.scheduledHour = value;
|
||||
this.scheduledHours;
|
||||
this.productionBonusSetup.productionBonusLines
|
||||
}
|
||||
}
|
||||
|
|
|
@ -230,6 +230,7 @@ export class ProductionBonusReportsComponent implements OnInit {
|
|||
this.showDate = true;
|
||||
this.showDesign = true;
|
||||
this.salaryMonth = new Date();
|
||||
this.Loadlayout(this.salaryMonth);
|
||||
}
|
||||
else {
|
||||
this.showDate = false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user