HRM-10/HRM.UI/ClientApp/src/app/_models/Employee/employee.js

110 lines
3.8 KiB
JavaScript
Raw Normal View History

2026-11-11 16:17:24 +06:00
import { EnumBaseStation, EnumEmployeeStatus, EnumGender, EnumMaritalStatus, EnumPaymentMode, EnumPersonType, EnumPFMembershipType, EnumProfileStatus, EnumRole, EnumTaxCircle } from '../enums';
import { SearchEmployee } from './searchEmployee';
2026-11-03 13:06:00 +06:00
// do not change this class without discuss with shamim
2026-11-11 16:17:24 +06:00
export class Employee {
2026-11-03 13:06:00 +06:00
// do not change this class without discuss with shamim
2026-11-11 16:17:24 +06:00
constructor() {
2026-11-03 13:06:00 +06:00
this.lineManager = '';
this.globalID = '';
this.employeeNo = '';
this.name = '';
2026-11-11 16:17:24 +06:00
this.gender = EnumGender.Regardless;
2026-11-03 13:06:00 +06:00
this.birthDate = new Date();
this.joiningDate = new Date();
this.retirementDate = new Date();
this.sBU = '';
this.emailAddress = '';
this.mobileNo = '';
this.tinNo = '';
this.categoryID = 0;
this.categoryName = '';
this.foreignExPat = false;
2026-11-11 16:17:24 +06:00
this.personType = EnumPersonType.None;
this.profileStatus = EnumProfileStatus.Approve;
this.taxCircle = EnumTaxCircle.CityCorporation;
2026-11-03 13:06:00 +06:00
this.isConfirmed = false;
this.endOfContractDate = null;
2026-11-11 16:17:24 +06:00
this.status = EnumEmployeeStatus.Live;
2026-11-03 13:06:00 +06:00
this.statusName = '';
this.isShownInTaxSheet = false;
2026-11-11 16:17:24 +06:00
this.pfMemberType = EnumPFMembershipType.NotYetLive;
2026-12-01 14:18:18 +06:00
this.pfPercentage = 0;
2026-11-03 13:06:00 +06:00
this.branchID = null;
this.accountNo = '';
this.outPayBranchID = null;
this.outPayAccountNo = '';
this.departmentName = '';
this.departmentID = null;
this.locationName = '';
this.locationID = null;
this.religionName = '';
this.religionID = undefined;
2026-11-11 16:17:24 +06:00
this.maritalStatus = EnumMaritalStatus.None;
2026-11-03 13:06:00 +06:00
this.designationName = '';
this.designationID = null;
this.gradeName = '';
this.gradeID = null;
this.basicSalary = 0;
this.currentHistoryID = null;
this.prevBasic = 0;
2026-11-11 16:17:24 +06:00
this.paymentMode = EnumPaymentMode.Cash_Payment;
this.outPayPaymentMode = EnumPaymentMode.Cash_Payment;
2026-11-03 13:06:00 +06:00
this.fatherName = '';
this.isEligibleOT = false;
this.descriptionText = '';
this.payrollTypeID = 0;
this.grossSalary = 0;
this.taxAmount = 0;
this.lineManagerID = null;
this.secondLineManagerID = null;
this.lineManagerNo = '';
this.positionID = null;
this.positionName = '';
this.costcenterName = '';
2026-11-11 16:17:24 +06:00
this.role = EnumRole.None;
2026-11-03 13:06:00 +06:00
this.geId = '';
this.extraField1 = '';
2026-11-11 16:17:24 +06:00
this.extraField2 = EnumBaseStation.None;
2026-11-03 13:06:00 +06:00
this.extraField3 = '';
this.extraField4 = '';
this.extraField5 = '';
this.vendorCode = '';
this.firstName = '';
this.lastName = '';
this.crgId = undefined;
this.profileCompletionPercent = undefined;
this.insuranceId = '';
this.inclusionDate = null;
this.isFixedLocation = false;
this.lineManagerDeg = '';
}
2026-11-11 16:17:24 +06:00
getSearchEmployee() {
var emp = new SearchEmployee();
2026-11-03 13:06:00 +06:00
emp.employeeID = this.id;
emp.name = this.name;
emp.employeeNo = this.employeeNo;
emp.departmentID = this.departmentID;
emp.locationID = this.locationID;
emp.designationID = this.designationID;
emp.gradeID = this.gradeID;
emp.email = this.emailAddress;
return emp;
2026-11-11 16:17:24 +06:00
}
getStatusString(empStatus) {
2026-11-03 13:06:00 +06:00
var str = "Live";
switch (empStatus) {
2026-11-11 16:17:24 +06:00
case EnumEmployeeStatus.Live:
2026-11-03 13:06:00 +06:00
str = "Live";
break;
2026-11-11 16:17:24 +06:00
case EnumEmployeeStatus.Suspend:
2026-11-03 13:06:00 +06:00
//case EnumEmployeeStatus.Withheld:
2026-11-11 16:17:24 +06:00
case EnumEmployeeStatus.IA:
case EnumEmployeeStatus.Discontinued:
2026-11-03 13:06:00 +06:00
str = "Discontinued";
break;
default:
}
return str;
2026-11-11 16:17:24 +06:00
}
}
2026-11-03 13:06:00 +06:00
//# sourceMappingURL=employee.js.map