Compare commits

..

No commits in common. "9e974f1b6ea24e1c270577e559ca746c11c77321" and "efffc1667fc60a22fd1b3d587aa953f043cf733f" have entirely different histories.

27 changed files with 163 additions and 1944 deletions

View File

@ -1128,16 +1128,7 @@ namespace HRM.BO
}
#endregion
#region Property NomineeMobileNo : string
private string _nomineeMobileNo;
public string NomineeMobileNo
{
get { return _nomineeMobileNo; }
set { _nomineeMobileNo = value; }
}
#endregion
public EnumProfileStatus ProfileStatus { get; set; }
public string NomineeStatus { get; set; }
public bool HasPicture { get; set; }

View File

@ -369,7 +369,6 @@ namespace HRM.BO
List<SearchEmployee> Find(SearchManager oManager);
List<SearchEmployee> FindCordinator(int? id, int? payrollTypeID);
List<SearchEmployee> FindEmpCodeName(int payrolltypeid, string code, string name);
List<SearchEmployee> FindEmpCodeNameForEmployeePicker(int payrolltypeid, string code, string name);
SearchEmployee get(int empid);
List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID);
List<SearchEmployee> GetTeam(int employeeid);

View File

@ -676,16 +676,16 @@ namespace HRM.DA
tc.ExecuteNonQuery("INSERT INTO EmpNominee(" +
"EmployeeID, NomineeID, NominationPurposeID, NominationDate, Name, RelationID, " +
" Percentage, BirthDate, OccupationID, Address, TelePhone," +
" EmailAddress, NomineeMobileNo)" +
" EmailAddress)" +
" VALUES(" +
" %n, %n, %n, %d, %s, %n," +
" %n, %d, %n, %s, %s, %s, %s)",
" %n, %d, %n, %s, %s, %s)",
nominee.EmployeeID, nominee.ID, nominee.NominationPurposeID,
DataReader.GetNullValue(nominee.NominationDate), nominee.Name,
DataReader.GetNullValue(nominee.RelationID, 0),
nominee.Percentage, DataReader.GetNullValue(nominee.BirthDate),
DataReader.GetNullValue(nominee.OccupationID, 0), nominee.Address, nominee.TelePhone,
nominee.EmailAddress, nominee.NomineeMobileNo);
nominee.EmailAddress);
}
public static void Update(TransactionContext tc, EmpNominee nominee)
@ -700,9 +700,8 @@ namespace HRM.DA
,[ADDRESS] = %s
,[TELEPHONE] = %s
,[EMAILADDRESS] = %s
,[NomineeMobileNo] = %s
WHERE NOMINEEID = %n", nominee.ID, nominee.NominationPurposeID, nominee.Name, nominee.RelationID,
nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress, nominee.NomineeMobileNo,
nominee.Percentage, nominee.OccupationID, nominee.Address, nominee.TelePhone, nominee.EmailAddress,
nominee.ID);
}
@ -944,7 +943,6 @@ namespace HRM.DA
,[PHOTOPATH]
,[TELEPHONE]
,[EMAILADDRESS]
,[NomineeMobileNo]
,[SIGNATURE]
,[EMPLOYEEID]
,[NOMINEENAME]

View File

@ -231,7 +231,6 @@ END;";
{
string orderby = "name";
string sqlClause = "";
string top = "";
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active);
if (code != string.Empty)
{
@ -243,41 +242,8 @@ END;";
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
return tc.ExecuteReader(
"Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s",
top, sqlClause, orderby);
}
internal static IDataReader SearchForEmployeePicker(TransactionContext tc, int payrollTypeID, string code, string name)
{
string orderby = "name";
string sqlClause = "";
string top = "";
//Previous Code For only Live Employee
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND Status = %n", payrollTypeID, EnumStatus.Active);
//New Code For live And Waitiong for join Employee
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("PayrollTypeID =%n AND (Status = %n OR Status = %n)", payrollTypeID, EnumEmployeeStatus.Live, EnumEmployeeStatus.Waitingforjoin);
if (code != string.Empty)
{
//Previous with suggestion
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ("%" + code + "%"));
//orderby = "EmployeeNo";
//Using TOP
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
orderby = "EmployeeNo";
top = "TOP 50";
//Without suggestion
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );
//orderby = "EmployeeNo";
}
if (name != string.Empty)
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
return tc.ExecuteReader(
"Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s",
top, sqlClause, orderby);
"Select EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q Order by %s",
sqlClause, orderby);
}
#endregion

View File

@ -551,7 +551,6 @@ namespace HRM.DA
oEmpNominee.TelePhone = oReader.GetString("TelePhone");
oEmpNominee.EmailAddress = oReader.GetString("EmailAddress");
oEmpNominee.NomineeMobileNo = oReader.GetString("NomineeMobileNo", true, string.Empty);
oEmpNominee.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", true, 0);
oEmpNominee.HasPicture = oReader.GetBoolean("HasPicture", true, false);
oEmpNominee.HasSignature = oReader.GetBoolean("HasSignature", true, false);

View File

@ -288,43 +288,6 @@ namespace HRM.DA
return searchEmployees;
}
public List<SearchEmployee> FindEmpCodeNameForEmployeePicker(int payrollTypeID, string code, string name)
{
List<SearchEmployee> searchEmployees = new List<SearchEmployee>();
TransactionContext tc = null;
try
{
tc = TransactionContext.Begin();
DataReader dr = new DataReader(SearchEmployeeDA.SearchForEmployeePicker(tc, payrollTypeID, code, name));
searchEmployees = this.CreateObjects<SearchEmployee>(dr);
//while (dr.Read())
//{
// SearchEmployee item = new SearchEmployee();
// item.Name = dr.GetString("name");
// item.EmployeeNo = dr.GetString("employeeNo");
// searchEmployees.Add(item);
//}
dr.Close();
tc.End();
}
catch (Exception e)
{
#region Handle Exception
if (tc != null)
tc.HandleError();
ExceptionLog.Write(e);
throw new ServiceException(e.Message, e);
#endregion
}
return searchEmployees;
}
public List<SearchEmployee> GetEmployeeNotYetUser(int payrollTypeID)

View File

@ -276,9 +276,7 @@ namespace HRM.Report
dSet.Tables.Add(dTable);
//string RDLC = "Payroll.Report.RDLC.rptEmpDesignWiseProdBonus.rdlc";
string RDLC = "rptEmpDesignWiseProdBonus.rdlc";
//string RDLC = "rptEmpDesignWiseProdBonusOld.rdlc";
List<ReportParameter> _reportParameters = new List<ReportParameter>();
ReportParameter rParam = new ReportParameter("Month", dBonusMonth.ToString("MMM yyyy"));

View File

@ -235,7 +235,6 @@
<None Remove="RDLC\rptCurrentMonthDueLoan.rdlc" />
<None Remove="RDLC\rptEmpAcademicInfo.rdlc" />
<None Remove="RDLC\rptEmpDesignWiseProdBonus.rdlc" />
<None Remove="RDLC\rptEmpDesignWiseProdBonusOld.rdlc" />
<None Remove="RDLC\rptEmpGeneralInfo.rdlc" />
<None Remove="RDLC\rptEmployeeChildInfo.rdlc" />
<None Remove="RDLC\rptEmployeeContactInfo.rdlc" />
@ -520,12 +519,7 @@
<EmbeddedResource Include="RDLC\rptCCWiseSalarySummaryExpat.rdlc" />
<EmbeddedResource Include="RDLC\rptCurrentMonthDueLoan.rdlc" />
<EmbeddedResource Include="RDLC\rptEmpAcademicInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonus.rdlc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonusOld.rdlc">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
<EmbeddedResource Include="RDLC\rptEmpDesignWiseProdBonus.rdlc" />
<EmbeddedResource Include="RDLC\rptEmpGeneralInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmployeeChildInfo.rdlc" />
<EmbeddedResource Include="RDLC\rptEmployeeContactInfo.rdlc" />

View File

@ -162,7 +162,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>="Design No: " &amp;Fields!DesignNo.Value</Value>
<Value>="Department: " &amp;Fields!Department.Value</Value>
<Style />
</TextRun>
</TextRuns>
@ -1656,7 +1656,7 @@
<TablixMember>
<Group Name="table1_Group1">
<GroupExpressions>
<GroupExpression>=Fields!DesignNo.Value</GroupExpression>
<GroupExpression>=Fields!DepartmentID.Value</GroupExpression>
</GroupExpressions>
</Group>
<TablixMembers>

File diff suppressed because it is too large Load Diff

View File

@ -138,7 +138,7 @@ export class Employee {
this.taxCircle = EnumTaxCircle.CityCorporation;
this.isConfirmed = false;
this.endOfContractDate = null;
this.status = EnumEmployeeStatus.Waitingforjoin;
this.status = EnumEmployeeStatus.Live;
this.statusName = '';
this.isShownInTaxSheet = false;
this.pfMemberType = EnumPFMembershipType.NotYetLive;
@ -219,9 +219,6 @@ export class Employee {
case EnumEmployeeStatus.Discontinued:
str = "Discontinued";
break;
case EnumEmployeeStatus.Waitingforjoin:
str = "Waiting For Join";
break;
default:
}

View File

@ -19,7 +19,6 @@ export class EmpNominee extends BaseObject {
occupation: Occupation;
address: string;
telePhone: string;
nomineeMobileNo: string;
photograph: empFileuploads;
signature: empFileuploads;
emailAddress: string;
@ -41,7 +40,6 @@ export class EmpNominee extends BaseObject {
this.photograph = new empFileuploads();
this.signature = new empFileuploads();
this.emailAddress = '';
this.nomineeMobileNo = '';
this.hasSignature = false;
this.hasPicture = false;
}

View File

@ -99,13 +99,6 @@ export class EmployeeServices {
return this.apiService.httpGet<SearchEmployee[]>('/Employee/getEmpCodeName' + '/' + ncode + '/' + nname);
}
getEmpCodeNameForEmployeePickerInput(code?: string, name?: string) {
let nname = this.apiService.getApiDefaultData(name);
let ncode = this.apiService.getApiDefaultData(code);
return this.apiService.httpGet<SearchEmployee[]>('/Employee/getEmpCodeNameForEmployeePickerInput' + '/' + ncode + '/' + nname);
}
getEmployees() {
return this.apiService.httpGet(this.apiService.base_url + 'getemployees');
}

View File

@ -26,12 +26,11 @@
<kendo-dropdownlist
style="width:100%"
[data]="users"
[defaultItem]="{ userName: 'Select User', id: null }"
[defaultItem]="{ userName: 'Select User', userID: null }"
[textField]="'userName'"
[valueField]="'id'"
[valueField]="'userID'"
[(ngModel)]="selectedUser"
(valueChange)="onUserChange($event)"
[disabled]="!(_selectedPayroll != null && _selectedRoleType != null) "
>
</kendo-dropdownlist>
</div>
@ -49,7 +48,6 @@
[valueField]="'id'"
[valuePrimitive]="true"
(valueChange)="onPayrollChange($event)"
[disabled]="!_selectedRoleType"
>
</kendo-dropdownlist>
</div>
@ -61,11 +59,10 @@
<kendo-dropdownlist class="form-control form-control-sm input-sm"
style="width:100%"
[data]="permissionTypes"
[defaultItem]="{ name: 'Select Permission Type', value: null }"
[defaultItem]="{ name: 'Select Permission Type', id: null }"
[textField]="'name'"
[valueField]="'value'"
[valueField]="'id'"
(selectionChange)="EventPermissionType($event)"
[disabled]="!_selectedPayroll"
>
</kendo-dropdownlist>
</div>

View File

@ -10,13 +10,13 @@ import { DataTransferService } from '../../data.transfer.service';
import { ApiService } from '../../app.api.service';
import { User } from '../../_models/Authentication/user';
import { EnumAuthStatus, EnumExtension, TempEnumAuthStatus } from '../../_models/enums';
import { PayrollType } from '../../_models/Authentication/payrollType';
import { Employee } from '../../_models/Employee/employee';
import { Grade } from '../../_models/Basic/grade';
import { Department } from '../../_models/Basic/department';
import { Designation } from '../../_models/HRBasic/designation';
import { Location } from '../../_models/Basic/location';
import { DynamicPicker, EnumDynamicpickerType } from '../../picker/dynamic-picker/Dynamic-Picker';
import {PayrollType} from '../../_models/Authentication/payrollType';
import {Employee} from '../../_models/Employee/employee';
import {Grade} from '../../_models/Basic/grade';
import {Department} from '../../_models/Basic/department';
import {Designation} from '../../_models/HRBasic/designation';
import {Location} from '../../_models/Basic/location';
import {DynamicPicker, EnumDynamicpickerType} from '../../picker/dynamic-picker/Dynamic-Picker';
import { DataPermission } from 'src/app/_models/Basic/DataPermission';
@ -52,25 +52,19 @@ export class DataPermssionComponent implements OnInit {
public isLocation: boolean = false;
onUserTypeChange(_selectedRoleType: any): void {
if (this._selectedRoleType.value != null) {
this.utilityHandlerService.ShowLoadingPanel = true;
this.userService.GetUsers(this._selectedRoleType.value).subscribe(
(x) => {
this.users = x;
this.utilityHandlerService.ShowLoadingPanel = false;
},
(x) => {
this.notificationService.showError(x);
this.utilityHandlerService.ShowLoadingPanel = false;
},
() => {
this.utilityHandlerService.ShowLoadingPanel = false;
});
}
else {
this.users = [];
this.selectedUser = undefined;
}
this.utilityHandlerService.ShowLoadingPanel = true;
this.userService.GetUsers(this._selectedRoleType.value).subscribe(
(x) => {
this.users = x;
this.utilityHandlerService.ShowLoadingPanel = false;
},
(x) => {
this.notificationService.showError(x);
this.utilityHandlerService.ShowLoadingPanel = false;
},
() => {
this.utilityHandlerService.ShowLoadingPanel = false;
});
}
EventPermissionType(selectedPermissionType: any): void {
@ -86,13 +80,11 @@ export class DataPermssionComponent implements OnInit {
}
onUserChange(selectedUserID: any): void {
if(selectedUserID.id != null){
this._selectedUser = selectedUserID;
this._userID = this._selectedUser.id;
this._selectedUser = selectedUserID;
this._userID = this._selectedUser.id;
if (this._userID != undefined && this._selectedPayroll != undefined)
this.loadGridView()
}
if (this._userID != undefined && this._selectedPayroll != undefined)
this.loadGridView()
}
onPayrollChange(selectedPayrollID: any): void {

View File

@ -32,10 +32,10 @@
pInputText style="width:100%" />
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<div class="p-col-12 p-md-6 p-lg-2" >
<label>Relation</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" style="margin: auto;">
<kendo-dropdownlist [(ngModel)]="nominee.relationID" [data]="relations"
[defaultItem]="{ description: 'Select Relations..', value: null }" [textField]="'description'"
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
@ -46,15 +46,15 @@
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="txtPercentage">Percentage</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" >
<input id="txtPercentage" formControlName="percentage" [(ngModel)]="nominee.percentage"
type="number" pInputText style="width:100%" />
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<div class="p-col-12 p-md-6 p-lg-2" >
<label for="dtpDateOfBirth">Birth Date</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" style="margin: auto;">
<kendo-datepicker [(ngModel)]="nominee.birthDate" [format]="'dd-MMM-yyyy'"
formControlName="dateOfBirth" id="dtpDateOfBirth" style="width:100%"></kendo-datepicker>
</div>
@ -62,7 +62,7 @@
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label>Occupation</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" >
<kendo-dropdownlist [(ngModel)]="nominee.occupationID" [data]="occupations"
[defaultItem]="{ description: 'Select Occupations..', value: null }" [textField]="'description'"
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
@ -70,10 +70,10 @@
</kendo-dropdownlist>
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<div class="p-col-12 p-md-6 p-lg-2" >
<label for="txtAddress">Address</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" style="margin: auto;">
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
pInputText style="width:100%" />
</div>
@ -86,18 +86,10 @@
pInputText style="width:100%" />
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="txtNomineeMobileNo">Mobile</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<input id="txtNnomineeMobileNo" formControlName="mobile" [(ngModel)]="nominee.nomineeMobileNo" type="text"
pInputText style="width:100%" />
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<div class="p-col-12 p-md-6 p-lg-2" >
<label for="txtEmail">Email</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" style="margin: auto;">
<input id="txtEmail" formControlName="email" [(ngModel)]="nominee.emailAddress" type="text"
pInputText style="width:100%" />
</div>
@ -105,21 +97,19 @@
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<label for="fupPicture">Picture</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" >
<input formControlName="picturePath" pInputText style="width:100%" (change)="selectPicture($event)"
type="file">
</div>
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
<div class="p-col-12 p-md-6 p-lg-2" >
<label for="fupSignature">Signature</label>
</div>
<div class="p-col-12 p-md-6 p-lg-4">
<div class="p-col-12 p-md-6 p-lg-4" style="margin: auto;">
<input formControlName="signaturePath" pInputText (change)="selectSignature($event)" type="file"
style="width:100%">
</div>
<div class="p-col-12 p-md-6 p-lg-6" ></div>
</div>
</div>
</fieldset>

View File

@ -90,7 +90,6 @@ export class NomineeEntryComponent implements OnInit {
email: [''],
picturePath: [''],
signaturePath: [''],
mobile: [''],
});
}

View File

@ -67,12 +67,12 @@
</ng-template>
</kendo-grid-command-column>
<kendo-grid-command-column title="Action" width="100">
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
<ng-template kendoGridCellTemplate let-dataItem>
<button
kendoGridEditCommand
icon="pencil"
[primary]="true"
(click)="editHandler(rowIndex)"
(click)="editHandler(dataItem)"
[style.width.%]="49"
></button>
<button

View File

@ -89,7 +89,6 @@ export class NomineeListComponent implements OnInit {
this.isDisplay = true;
}
public editHandler(rowIndex: any) {
debugger
this.editIndex = rowIndex;
this.nominee = this.nominees[this.editIndex];
this.isDisplay = true;

View File

@ -66,7 +66,7 @@
<label>Schedule Date</label>
</div>
<div class="p-col-6 p-md-2">
<kendo-datepicker [(ngModel)]="selectedDate" [format]="'dd MMMM yyyy'" style="width:100%" (valueChange)="scheduleDateChange($event)" ></kendo-datepicker>
<kendo-datepicker [(ngModel)]="selectedDate" [format]="'dd MMMM yyyy'" style="width:100%"></kendo-datepicker>
</div>
<div class="p-col-6 p-md-1 label-ailgn">

View File

@ -43,8 +43,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
prodBonusAttn: ProdBonusAttn[];
// selectedDate: Date = new Date;
selectedDate: Date;
selectedDate: Date = new Date;
startTime: Date = new Date();
endTime: Date = new Date();
@ -161,7 +160,6 @@ export class ProductionBonusAttendanceComponent implements OnInit {
loadLines(value: any) {
// console.log('Selected value changed:', newValue);
// debugger;
this.selectedDate = undefined;
this.loadingPanelService.ShowLoadingPanel = true;
debugger;
// this.bonusService.getLines(this.selectedProdBSdata.id).subscribe(
@ -191,34 +189,33 @@ export class ProductionBonusAttendanceComponent implements OnInit {
onClickLoad() {
// debugger;
// 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 selectedDate = new Date(this.selectedDate.setHours(0, 0, 0, 0));
// if (selectedDate >= fromDate && selectedDate <= toDate) {
// var dataForAttn = {
// setupId: this.productionBonusSetup.id,
// lineId: this.selectedLine.id,
// date: this.selectedDate
// }
// // console.log(dataForAttn);
// this.loadingPanelService.ShowLoadingPanel = true;
// this.bonusService.getProdBonusAtten(dataForAttn).subscribe(
// (resp) => {
// this.prodBonusAttn = resp;
// // console.log('Attn List', this.prodBonusAttn);
// // console.log(this.prodBonusAttn);
// },
// (err) => {
// this.notificationService.showError(err.error);
// this.loadingPanelService.ShowLoadingPanel = false;
// },
// () => {
// this.loadingPanelService.ShowLoadingPanel = false;
// this.employeeList = [];
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 selectedDate = new Date(this.selectedDate.setHours(0, 0, 0, 0));
if (selectedDate >= fromDate && selectedDate <= toDate) {
var dataForAttn = {
setupId: this.productionBonusSetup.id,
lineId: this.selectedLine.id,
date: this.selectedDate
}
// console.log(dataForAttn);
this.loadingPanelService.ShowLoadingPanel = true;
this.bonusService.getProdBonusAtten(dataForAttn).subscribe(
(resp) => {
this.prodBonusAttn = resp;
// console.log('Attn List', this.prodBonusAttn);
// console.log(this.prodBonusAttn);
},
(err) => {
this.notificationService.showError(err.error);
this.loadingPanelService.ShowLoadingPanel = false;
},
() => {
this.loadingPanelService.ShowLoadingPanel = false;
this.employeeList = [];
// debugger;
if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Cutting ||
this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Finishing)) {
this.employeeList = [];
let data = {
prodLine: this.selectedLine,
date: this.selectedDate
@ -238,12 +235,21 @@ export class ProductionBonusAttendanceComponent implements OnInit {
this.loadingPanelService.ShowLoadingPanel = false;
}
);
// if (this.selectedLine.prodBonusParameters !== null && this.selectedLine.prodBonusParameters.length > 0) {
// var desigparam: ProdBonusParameter;
// desigparam = this.selectedLine.prodBonusParameters.find(o => o.itemType == EnumBonusItemType.Designation);
// // var pbp: ProdBonusParameter;
// for (let pbp in this.selectedLine.prodBonusParameters) {
// if (pbp['itemType'] == EnumBonusItemType.Department) {
// oTempEmployees: Employee[] = this.employeeList.filter(e1 => e1.DepartmentID === pbp['itemID'] && e1.DesignationID !== 2);
// }
// }
// }
}
//New For Swing And Printig
if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Sewing ||
this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Printing)) {
this.employeeList = [];
let data = {
prodLine: this.selectedLine,
date: this.selectedDate
@ -265,25 +271,25 @@ export class ProductionBonusAttendanceComponent implements OnInit {
);
}
// if (this.prodBonusAttn.length > 0) {
// debugger;
// this.employeeList = [];
// for (let i = 0; i < this.prodBonusAttn.length; i++) {
// this.AddEmployeebyId(this.prodBonusAttn[i].employeeID);
// }
// let inTime = new Date(this.prodBonusAttn[0].inTime);
// let outTime = new Date(this.prodBonusAttn[0].outTime);
// this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds());
// this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds());
// }
// }
// );
// }
// else {
// this.notificationService.showWarning('Date did not match with Work Schedule','Schedule not matched!');
// }
if (this.prodBonusAttn.length > 0) {
debugger;
for (let i = 0; i < this.prodBonusAttn.length; i++) {
this.AddEmployeebyId(this.prodBonusAttn[i].employeeID);
}
let inTime = new Date(this.prodBonusAttn[0].inTime);
let outTime = new Date(this.prodBonusAttn[0].outTime);
this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds());
this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds());
}
}
);
}
else {
this.notificationService.showWarning('Date did not match with Work Schedule','Schedule not matched!');
}
}
onClickAdd() {
// console.log(this.employeeSelection);
debugger;
if (this.selectedEmps === undefined) {
this.notificationService.showWarning('Please Select an Employee');
@ -291,6 +297,11 @@ export class ProductionBonusAttendanceComponent implements OnInit {
}
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) {
@ -339,6 +350,21 @@ export class ProductionBonusAttendanceComponent implements OnInit {
}
}
AddEmployeebyId(empId: number) {
// this.loadingPanelService.ShowLoadingPanel = true;
// this.employeeService.getEmployeeByID(empId).subscribe(
// (resp) => {
// this.employeeList.push(resp);
// },
// (err) => {
// this.notificationService.showError(err.error);
// this.loadingPanelService.ShowLoadingPanel = false;
// },
// () => {
// // this.AddEmployeeGridData(empId, isCommonValue);
// // console.log(this.prodBonusAttn);
// this.loadingPanelService.ShowLoadingPanel = false;
// }
// );
this.employeeList.push(this.allEmps.find(e => e.id == empId));
}
AddEmployeeGridData(empId: number, isCommonValue: boolean) {
@ -355,9 +381,29 @@ export class ProductionBonusAttendanceComponent implements OnInit {
isCommon: false
};
this.prodBonusAttn.push(newProdBonusAttn);
// console.log('emplist ' + this.employeeList.length + '\n PbAttn ' + this.prodBonusAttn.length);
// this.selectedEmps = undefined;
}
// GetSelectedEmployee(sremployee: SearchEmployee) {
// if (sremployee === undefined) {
// this._employee = new Employee();
// return;
// }
// this.loadingPanelService.ShowLoadingPanel = true;
// this.employeeService.getEmployeeByID(sremployee.employeeID).subscribe(
// (resp: any) => {
// this._employee = resp;
// },
// (err: any) => {
// this.loadingPanelService.ShowLoadingPanel = false;
// },
// () => {
// this.loadingPanelService.ShowLoadingPanel = false;
// }
// );
// }
onClickSubmit() {
// console.log(this.prodBonusAttn);
debugger;
if (this.startTime == undefined || this.endTime == undefined) {
this.notificationService.showWarning('Please Select In/Out Time');
@ -420,8 +466,6 @@ export class ProductionBonusAttendanceComponent implements OnInit {
this.productionBonusSetup = new ProductionBonusSetup();
this.employeeList = [];
this.selectedLine = undefined;
this.selectedProdBSdata = undefined;
this.selectedDate = undefined;
}
public onKeyDown(pressedKey) {
@ -452,52 +496,5 @@ export class ProductionBonusAttendanceComponent implements OnInit {
date.setSeconds(sec);
return date;
}
public scheduleDateChange(date: any){
debugger;
date;
if(this.selectedProdBSdata != undefined && this.selectedLine != undefined ){
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 selectedDate = new Date(this.selectedDate.setHours(0, 0, 0, 0));
if (selectedDate >= fromDate && selectedDate <= toDate) {
var dataForAttn = {
setupId: this.productionBonusSetup.id,
lineId: this.selectedLine.id,
date: this.selectedDate
}
this.loadingPanelService.ShowLoadingPanel = true;
this.bonusService.getProdBonusAtten(dataForAttn).subscribe(
(resp) => {
this.prodBonusAttn = resp;
},
(err) => {
this.notificationService.showError(err.error);
this.loadingPanelService.ShowLoadingPanel = false;
},
() => {
this.loadingPanelService.ShowLoadingPanel = false;
if (this.prodBonusAttn.length > 0) {
debugger;
this.employeeList = [];
for (let i = 0; i < this.prodBonusAttn.length; i++) {
this.AddEmployeebyId(this.prodBonusAttn[i].employeeID);
}
let inTime = new Date(this.prodBonusAttn[0].inTime);
let outTime = new Date(this.prodBonusAttn[0].outTime);
this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds());
this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds());
}
else{
this.employeeList.forEach(x => this.AddEmployeeGridData(x.id, false));
}
}
);
}
else {
this.notificationService.showWarning('Date did not match with Work Schedule','Schedule not matched!');
}
}
}
}

View File

@ -73,26 +73,10 @@
style="width:100%"></kendo-datepicker>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="txtfatherName">Father's Name</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input id="txtfatherName" formControlName="fatherName" [(ngModel)]="employee.fatherName" type="text"
style="width:100%" pInputText>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="txttinNo">TIN</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input id="txttinNo" formControlName="tinNo" [(ngModel)]="employee.tinNo" type="text"
style="width:100%" pInputText>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="height: 43px;">
<label for="chkIsOTEligible">Eligible for OT</label>
</div>
<div class="p-col-12 p-md-6 p-lg-2 form-control-lg">
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input type="checkbox" formControlName="isOTEligible" [(ngModel)]="employee.isEligibleOT"
id="chkIsOTEligible" kendoCheckBox />
@ -101,7 +85,7 @@
<label for="chkIsFixedLocation">Fixed Location /
Nearby</label>
</div>
<div class="p-col-12 p-md-6 p-lg-2 form-control-lg">
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<input type="checkbox" formControlName="IsFixedLocation"
[(ngModel)]="employee.isFixedLocation" id="chkIsFixedLocation" kendoCheckBox />
</div>
@ -204,15 +188,6 @@
[(ngModel)]="employee.joiningDate" [format]="'dd-MMM-yyyy'"
style="width:100%"></kendo-datepicker>
</div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">
<label for="dtpEndofContract">End of Contract</label>
</div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg">
<kendo-datepicker id="dtpEndofContract" formControlName="endOfContractDate"
[(ngModel)]="employee.endOfContractDate" [format]="'dd-MMM-yyyy'"
style="width:100%"></kendo-datepicker>
</div>
</div>
</div>

View File

@ -250,9 +250,6 @@ export class EmployeePayrollProfileComponent implements OnInit {
isShownInTaxSheet: [''],
isConfirmed: [''],
foreignExpatriate: [''],
fatherName: [''],
tinNo: [''],
endOfContractDate: [''],
});
}

View File

@ -260,8 +260,7 @@ export class EmployeePickerComponent implements OnInit {
];
public loadData(): void {
this.gridView = {
// data: orderBy(this.data.slice(this.skip, this.skip + this.pageSize), this.sort),
data: this.data.slice(this.skip, this.skip + this.pageSize),
data: orderBy(this.data.slice(this.skip, this.skip + this.pageSize), this.sort),
total: this.data.length,
};
this.selectedItems = [];
@ -455,8 +454,7 @@ export class EmployeePickerComponent implements OnInit {
name = value;
}
this.loadingEmployee = true;
// this.empSrvc.getEmpCodeName(code, name)
this.empSrvc.getEmpCodeNameForEmployeePickerInput(code, name)
this.empSrvc.getEmpCodeName(code, name)
.subscribe(
(resp: any) => {
this.searchEmployees = resp;
@ -604,18 +602,10 @@ export class EmployeePickerComponent implements OnInit {
}
if (this.checkLive === true) {
//Previous Code For Only Live Employee
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 1, EnumSQLOperator.EqualTo);
//New Code For Live And Waiting For Join
// srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, '1,6', EnumSQLOperator.In);
}
if (this.checkLiveNo === true) {
//Previous Code For Only Not Live
// srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 2, EnumSQLOperator.EqualTo);
//New Code For Live And Waiting For Join
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, '2,6', EnumSQLOperator.In);
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, 2, EnumSQLOperator.EqualTo);
}
if (this.checkIA === true)
srcManager.Parameter.AddParam(EnumSearchParameter.Status, EnumSearchObjDataType.Number, EnumEmployeeStatus.IA, EnumSQLOperator.EqualTo);

View File

@ -89,11 +89,7 @@ namespace HRM.UI.Controllers
param = new object[2];
param[i] = EnumStatus.Active;
if(cty.PayrollTypeID == null)
param[i + 1] = (int)CurrentUser.GetCurrentUser(HttpContext.User).PayrollTypeID;
else
param[i + 1] = (int)cty.PayrollTypeID;
param[i + 1] = (int)CurrentUser.GetCurrentUser(HttpContext.User).PayrollTypeID;
paramtypes = new Type[2];
paramtypes[i] = typeof(EnumStatus);

View File

@ -17,7 +17,6 @@ using Microsoft.Extensions.Options;
using static Azure.Core.HttpHeader;
using iTextSharp.text;
using static iTextSharp.text.pdf.AcroFields;
using Org.BouncyCastle.Utilities;
namespace HRM.UI.Controllers
{
@ -133,11 +132,8 @@ namespace HRM.UI.Controllers
omanager.checkDataPermission = currentUser.hasDataPermission;
omanager.userid = currentUser.UserID;
List<SearchEmployee> unOrderedList = _serachManager.Find(omanager);
olist = unOrderedList
.OrderBy(num => num.EmployeeNo.Length) // Order by length (smallest to largest)
.ThenBy(num => Convert.ToInt32(num.EmployeeNo)).ToList();
olist = _serachManager.Find(omanager);
//omanager.checkDataPermission = false;
#region data permission
//List<DataPermission> datapermissions = new DataPermissionService().Get(currentUser.UserID,
@ -737,20 +733,7 @@ namespace HRM.UI.Controllers
List<SearchEmployee> olist = new List<SearchEmployee>();
try
{
//olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name);
if(code != "")
{
List<SearchEmployee> unorderedList = _serachManager.FindEmpCodeName((int)currentUser.PayrollTypeID, code, name);
olist = unorderedList
.OrderBy(item => item.EmployeeNo != code) // False (0) for priority value, True (1) for others
.ThenBy(item => item.EmployeeNo).ToList();
}
else
{
olist = _serachManager.FindEmpCodeName((int)currentUser.PayrollTypeID, code, name);
}
olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name);
//List<Grade> grades = new GradeService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Designation> designations = new DesignationService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Department> departments = new DepartmentService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
@ -763,55 +746,7 @@ namespace HRM.UI.Controllers
// if (designation != null) x.designationName = designation.Name;
// var department = departments.FirstOrDefault(d => d.ID == x.DepartmentID);
// if (department != null) x.departmentName = department.Name;
//}); // Secondary ordering (alphabetical)
}
catch (Exception ex)
{
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
}
return Ok(olist);
}
[HttpGet("getEmpCodeNameForEmployeePickerInput/{code}/{name}")]
public ActionResult getEmpCodeNameForEmployeePicker(string code, string name)
{
code = GlobalFunctions.GetApiDefaultData(code);
name = GlobalFunctions.GetApiDefaultData(name);
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
List<SearchEmployee> olist = new List<SearchEmployee>();
try
{
//olist = _serachManager.FindEmpCodeName((int) currentUser.PayrollTypeID, code, name);
if(code != "")
{
List<SearchEmployee> unorderedList = _serachManager.FindEmpCodeNameForEmployeePicker((int)currentUser.PayrollTypeID, code, name);
olist = unorderedList
.OrderBy(item => item.EmployeeNo != code) // False (0) for priority value, True (1) for others
.ThenBy(item => item.EmployeeNo).ToList();
}
else
{
olist = _serachManager.FindEmpCodeNameForEmployeePicker((int)currentUser.PayrollTypeID, code, name);
}
//List<Grade> grades = new GradeService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Designation> designations = new DesignationService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//List<Department> departments = new DepartmentService().Get(EnumStatus.Regardless, (int)currentUser.PayrollTypeID);
//olist.ForEach(x=>
//{
// var grd = grades.FirstOrDefault(d => d.ID == x.GradeID);
// if(grd != null) x.gradeName = grd.Name;
// var designation = designations.FirstOrDefault(d => d.ID == x.designationID);
// if (designation != null) x.designationName = designation.Name;
// var department = departments.FirstOrDefault(d => d.ID == x.DepartmentID);
// if (department != null) x.departmentName = department.Name;
//}); // Secondary ordering (alphabetical)
//});
}
catch (Exception ex)
{

View File

@ -476,7 +476,7 @@ namespace HRM.UI.Controllers.Payroll
foreach (ProdBonusSupervisor prodSupervisor in prodLine.ProdBonusSupervisors)
{
oEmp = new EmployeeService().Get(prodSupervisor.EmployeeID);
if (oEmp!=null && oEmp.DepartmentID != null)
if (oEmp.DepartmentID != null)
{
var dev = detps.FirstOrDefault(x => x.ID == oEmp.DepartmentID);
@ -503,11 +503,9 @@ namespace HRM.UI.Controllers.Payroll
}
}
if (oEmp != null)
{
prodSupervisor.EmpName = oEmp.Name;
prodSupervisor.EmployeeNo = oEmp.EmployeeNo;
}
prodSupervisor.EmpName = oEmp.Name;
prodSupervisor.EmployeeNo = oEmp.EmployeeNo;
}
prodLine.ProdBonusParameters = _prodBonusParameterService.GetByLineID(prodLine.ID);
Department oDept = new Department();
@ -668,9 +666,7 @@ namespace HRM.UI.Controllers.Payroll
ProdBonusLine _oProdBonusLine = (ProdBonusLine)item["prodLine"].ToObject<ProdBonusLine>();
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
//List<Employee> _oEmployees = new EmployeeService().Get(EnumEmployeeStatus.Live, (int)currentUser.PayrollTypeID);
DataTable EmployeeDT = new EmployeeService().GetEmployeeNameAndNo((int)currentUser.PayrollTypeID);
List<Employee> _oEmployees = new EmployeeService().Get(EnumEmployeeStatus.Live, (int)currentUser.PayrollTypeID);
List<Employee> _oFinalEmployees = new List<Employee>();
List<ProdBonusParameter> _oProdBonusParameters = new List<ProdBonusParameter>();
List<ProdBonusSupervisor> _oProdBonusSupervisors = new List<ProdBonusSupervisor>();
@ -688,13 +684,7 @@ namespace HRM.UI.Controllers.Payroll
{
foreach (var pda in _oProdBonusAttns)
{
//Employee emp = _oEmployees.Find(o => o.ID == pda.EmployeeID);
DataRow[] foundRows = EmployeeDT.Select($"id = {pda.EmployeeID}");
Employee emp = new Employee();
emp.ID = Convert.ToInt32(foundRows[0]["id"]);
emp.EmployeeNo = Convert.ToString(foundRows[0]["EmployeeNo"]);
emp.Name = Convert.ToString(foundRows[0]["Name"]);
Employee emp = _oEmployees.Find(o => o.ID == pda.EmployeeID);
if (emp != null) _oFinalEmployees.Add(emp);
}