Profile related works

This commit is contained in:
mashfiq 2025-02-23 16:13:19 +06:00
parent 751ae428bb
commit efbd3ca782
12 changed files with 103 additions and 40 deletions

View File

@ -259,7 +259,9 @@ namespace HRM.BO
public Relation ContactPersonRelation { get; set; } public Relation ContactPersonRelation { get; set; }
public string PermanentAddressInBangla { get; set; } public string PermanentAddressInBangla { get; set; }
public string PresentAddressInBangla { get; set; } public string PresentAddressInBangla { get; set; }
public string PresentPO { get; set; }
public string PresentPOInBangla { get; set; } public string PresentPOInBangla { get; set; }
public string PermanentPO { get; set; }
public string ParmanentPOInBangla { get; set; } public string ParmanentPOInBangla { get; set; }
//#region Property PermanentDistrict : District //#region Property PermanentDistrict : District

View File

@ -434,12 +434,12 @@ namespace HRM.DA
"EmployeeID, ContactID, PARMANENTADDRESS, PARMANENTDISTRICTID, PARMANENTTHANAID, PARMANENTTELEPHONE," + "EmployeeID, ContactID, PARMANENTADDRESS, PARMANENTDISTRICTID, PARMANENTTHANAID, PARMANENTTELEPHONE," +
" PresentAddress, PresentDistrictID, PresentThanaID, PresentTelephone, Mobile, PersonalEmail," + " PresentAddress, PresentDistrictID, PresentThanaID, PresentTelephone, Mobile, PersonalEmail," +
" OfficialEMail, Fax, EmergencyContactAddress, EmergencyContactPerson, EmergencyTelephone, PARMANENTMOBILE, " + " OfficialEMail, Fax, EmergencyContactAddress, EmergencyContactPerson, EmergencyTelephone, PARMANENTMOBILE, " +
" PRESENTMOBILE, PERSONALTELEPHONE, EMERGENCYMOBILE, CPRELATIONID,ProfileStatus,PermanentAddressInBangla,PresentAddressInBangla,PermanentPostCodeNo,PresentPostCodeNo, PresentPOInBangla, ParmanentPOInBangla)" + " PRESENTMOBILE, PERSONALTELEPHONE, EMERGENCYMOBILE, CPRELATIONID,ProfileStatus,PermanentAddressInBangla,PresentAddressInBangla,PermanentPostCodeNo,PresentPostCodeNo, PresentPOInBangla, ParmanentPOInBangla, PresentPO, PermanentPO)" +
" VALUES(" + " VALUES(" +
" %n, %n, %s, %n, %n, %s, " + " %n, %n, %s, %n, %n, %s, " +
" %s, %n, %n, %s, %s, %s," + " %s, %n, %n, %s, %s, %s," +
" %s, %s, %s, %s, %s, %s," + " %s, %s, %s, %s, %s, %s," +
" %s, %s, %s, %n,%n, %u, %u, %s, %s, %u, %u)", " %s, %s, %s, %n,%n, %u, %u, %s, %s, %u, %u, %s, %s)",
item.EmployeeID, item.ID, item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0), item.EmployeeID, item.ID, item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone, DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
item.PresentAddress, DataReader.GetNullValue(item.PresentDistrictID, 0), item.PresentAddress, DataReader.GetNullValue(item.PresentDistrictID, 0),
@ -448,7 +448,7 @@ namespace HRM.DA
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile), item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone), DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
DataReader.GetNullValue(item.EmergencyMobile), DataReader.GetNullValue(item.EmergencyMobile),
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla); DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.PresentPO, item.PermanentPO);
tc.ExecuteNonQuery(sql); tc.ExecuteNonQuery(sql);
} }
@ -459,7 +459,7 @@ namespace HRM.DA
"PARMANENTADDRESS =%s , PARMANENTDISTRICTID =%n, PARMANENTTHANAID =%n, PARMANENTTELEPHONE=%s," + "PARMANENTADDRESS =%s , PARMANENTDISTRICTID =%n, PARMANENTTHANAID =%n, PARMANENTTELEPHONE=%s," +
" PresentAddress=%s, PresentDistrictID=%n, PresentThanaID=%n, PresentTelephone=%s, Mobile =%s, PersonalEmail=%s," + " PresentAddress=%s, PresentDistrictID=%n, PresentThanaID=%n, PresentTelephone=%s, Mobile =%s, PersonalEmail=%s," +
" OfficialEMail=%s, Fax=%s, EmergencyContactAddress=%s, EmergencyContactPerson=%s, EmergencyTelephone=%s, PARMANENTMOBILE=%s, " + " OfficialEMail=%s, Fax=%s, EmergencyContactAddress=%s, EmergencyContactPerson=%s, EmergencyTelephone=%s, PARMANENTMOBILE=%s, " +
" PRESENTMOBILE=%s, PERSONALTELEPHONE=%s, EMERGENCYMOBILE=%s, CPRELATIONID=%n,ProfileStatus=%n,PermanentAddressInBangla=%u,PresentAddressInBangla=%u,PermanentPostCodeNo=%s,PresentPostCodeNo=%s, PresentPOInBangla = %u, ParmanentPOInBangla = %u" + " PRESENTMOBILE=%s, PERSONALTELEPHONE=%s, EMERGENCYMOBILE=%s, CPRELATIONID=%n,ProfileStatus=%n,PermanentAddressInBangla=%u,PresentAddressInBangla=%u,PermanentPostCodeNo=%s,PresentPostCodeNo=%s, PresentPOInBangla = %u, ParmanentPOInBangla = %u, PresentPO = %s, PermanentPO = %s" +
" where EmployeeID =%n and ContactID =%n ", " where EmployeeID =%n and ContactID =%n ",
item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0), item.PermanentAddress, DataReader.GetNullValue(item.PermanentDistrictID, 0),
DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone, DataReader.GetNullValue(item.PermanentThanaID, 0), item.PermanentTelephone,
@ -469,7 +469,7 @@ namespace HRM.DA
item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile), item.EmergencyTelephone, DataReader.GetNullValue(item.PermanentMobile),
DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone), DataReader.GetNullValue(item.PresentMobile), DataReader.GetNullValue(item.PersonalTelephone),
DataReader.GetNullValue(item.EmergencyMobile), DataReader.GetNullValue(item.EmergencyMobile),
DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.EmployeeID, item.ID); DataReader.GetNullValue(item.ContactPersonRelationId, 0), item.ProfileStatus, item.PermanentAddressInBangla, item.PresentAddressInBangla, item.PermanentPostCodeNo, item.PresentPostCodeNo, item.PresentPOInBangla, item.ParmanentPOInBangla, item.PresentPO, item.PermanentPO, item.EmployeeID, item.ID);
tc.ExecuteNonQuery(sql); tc.ExecuteNonQuery(sql);
} }

View File

@ -385,9 +385,16 @@ END;";
if (name != string.Empty) if (name != string.Empty)
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%")); sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("Name LIKE %s", ("%" + name + "%"));
//string finalSQl = SQLParser.MakeSQL(
// "%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q Order by %s",
// recurSqlClause, top, sqlClause, recurWhereClause, orderby);
string finalSQl = SQLParser.MakeSQL( string finalSQl = SQLParser.MakeSQL(
"%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q Order by %s", "%q Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q %q " +
recurSqlClause, top, sqlClause, recurWhereClause, orderby); " UNION Select %q EmployeeID, EmployeeNo, Name, categoryID, GradeID, LocationID, designationid, DepartmentID From Employee %q " +
" Order by %s",
recurSqlClause, top, sqlClause, recurWhereClause, top, sqlClause, orderby);
return tc.ExecuteReader(finalSQl); return tc.ExecuteReader(finalSQl);
} }

View File

@ -254,6 +254,8 @@ namespace HRM.DA
oEmpContact.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus").GetValueOrDefault(); oEmpContact.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus").GetValueOrDefault();
oEmpContact.PresentPOInBangla = oReader.GetString("PresentPOInBangla", true, null); oEmpContact.PresentPOInBangla = oReader.GetString("PresentPOInBangla", true, null);
oEmpContact.ParmanentPOInBangla = oReader.GetString("ParmanentPOInBangla", true, null); oEmpContact.ParmanentPOInBangla = oReader.GetString("ParmanentPOInBangla", true, null);
oEmpContact.PresentPO = oReader.GetString("PresentPO", true, null);
oEmpContact.PermanentPO = oReader.GetString("PermanentPO", true, null);
this.SetObjectState(oEmpContact, ObjectState.Saved); this.SetObjectState(oEmpContact, ObjectState.Saved);
} }

View File

@ -36,7 +36,9 @@ export class EmpContact extends BaseObject {
presentAddressInBangla: string; presentAddressInBangla: string;
permanentPostCodeNo: string; permanentPostCodeNo: string;
presentPostCodeNo: string; presentPostCodeNo: string;
presentPO: string;
presentPOInBangla: string; presentPOInBangla: string;
permanentPO: string;
parmanentPOInBangla: string; parmanentPOInBangla: string;
constructor() { constructor() {
super(); super();

View File

@ -3150,14 +3150,15 @@ export enum EnumSuccessorReadiness {
} }
export let BloodGroupList = [ export let BloodGroupList = [
{ name: "A+", value: 1 }, { name: "N/A", value: 1 },
{ name: "A-", value: 2 }, { name: "A+", value: 2 },
{ name: "B+", value: 3 }, { name: "A-", value: 3 },
{ name: "B-", value: 4 }, { name: "B+", value: 4 },
{ name: "O+", value: 5 }, { name: "B-", value: 5 },
{ name: "O-", value: 6 }, { name: "O+", value: 6 },
{ name: "AB+", value: 7 }, { name: "O-", value: 7 },
{ name: "AB-", value: 8 }, { name: "AB+", value: 8 },
{ name: "AB-", value: 9 },
]; ];
export class EnumExtension { export class EnumExtension {

View File

@ -13,7 +13,7 @@ export class ApiService {
public isSSO = false; public isSSO = false;
public versionDeployement = false; public versionDeployement = false;
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 5))}-`+"01"; public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 23))}-`+"01";
public static BASE_URL = ''; public static BASE_URL = '';
public base_url = ''; public base_url = '';
// public currentLink = ''; // public currentLink = '';

View File

@ -57,6 +57,21 @@
[(ngModel)]="contact.permanentTelephone" type="text" pInputText style="width:100%"> [(ngModel)]="contact.permanentTelephone" type="text" pInputText style="width:100%">
</div> </div>
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
<label for="txtPermanentMobilePhone">Mobile Phone</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input id="txtPermanentMobilePhone" formControlName="permanentMobilePhone"
[(ngModel)]="contact.permanentMobile" type="text" pInputText style="width:100%">
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<label for="txtParmanentPOInBangla">Post Office Name</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input id="txtParmanentPO" formControlName="parmanentPO"
[(ngModel)]="contact.permanentPO" type="text" pInputText style="width:100%">
</div>
<div class="p-col-12 p-md-12 p-lg-3"> <div class="p-col-12 p-md-12 p-lg-3">
<label for="txtParmanentPOInBangla">Post Office Name (Bn)</label> <label for="txtParmanentPOInBangla">Post Office Name (Bn)</label>
</div> </div>
@ -65,21 +80,15 @@
[(ngModel)]="contact.parmanentPOInBangla" type="text" pInputText style="width:100%"> [(ngModel)]="contact.parmanentPOInBangla" type="text" pInputText style="width:100%">
</div> </div>
<!-- <div class="p-col-12 p-md-12 p-lg-1"></div> -->
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;"> <div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
<label for="txtPermanentMobilePhone">Mobile Phone</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input id="txtPermanentMobilePhone" formControlName="permanentMobilePhone"
[(ngModel)]="contact.permanentMobile" type="text" pInputText style="width:100%">
</div>
<div class="p-col-12 p-md-12 p-lg-1"></div>
<div class="p-col-12 p-md-12 p-lg-2" style="margin: auto;">
<label for="txtPermanentPostalCode">Postal Code</label> <label for="txtPermanentPostalCode">Postal Code</label>
</div> </div>
<div class="p-col-12 p-md-12 p-lg-3"> <div class="p-col-12 p-md-12 p-lg-3">
<input id="txtPermanentPostalCode" formControlName="permanentPostalCode" <input id="txtPermanentPostalCode" formControlName="permanentPostalCode"
[(ngModel)]="contact.permanentPostCodeNo" type="text" pInputText style="width:100%"> [(ngModel)]="contact.permanentPostCodeNo" type="text" pInputText style="width:100%">
</div> </div>
<div class="p-lg-6"></div>
<div class="p-col-12 p-md-12 p-lg-12"> <div class="p-col-12 p-md-12 p-lg-12">
<label class="k-form-field right"> <label class="k-form-field right">
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress" <!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"
@ -155,15 +164,6 @@
[readonly]="this.isSameAddress"> [readonly]="this.isSameAddress">
</div> </div>
<div class="p-col-12 p-md-12 p-lg-3">
<label for="txtPresentPOInBangla">Post Office Name(Bn)</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input class="bangla-font" id="txtPresentPOInBangla" formControlName="presentPOInBangla"
[(ngModel)]="contact.presentPOInBangla" type="text" pInputText style="width:100%"
[readonly]="this.isSameAddress">
</div>
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;"> <div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
<label for="txtPresentMobilePhone">Mobile Phone</label> <label for="txtPresentMobilePhone">Mobile Phone</label>
</div> </div>
@ -173,8 +173,27 @@
[readonly]="this.isSameAddress"> [readonly]="this.isSameAddress">
</div> </div>
<div class="p-col-12 p-md-12 p-lg-1"></div> <div class="p-col-12 p-md-12 p-lg-3">
<div class="p-col-12 p-md-12 p-lg-2" style="margin: auto;"> <label for="txtPresentPOInBangla">Post Office Name</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input id="txtPresentPO" formControlName="presentPO"
[(ngModel)]="contact.presentPO" type="text" pInputText style="width:100%"
[readonly]="this.isSameAddress">
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<label for="txtPresentPOInBangla">Post Office Name (Bn)</label>
</div>
<div class="p-col-12 p-md-12 p-lg-3">
<input class="bangla-font" id="txtPresentPOInBangla" formControlName="presentPOInBangla"
[(ngModel)]="contact.presentPOInBangla" type="text" pInputText style="width:100%"
[readonly]="this.isSameAddress">
</div>
<!-- <div class="p-col-12 p-md-12 p-lg-1"></div> -->
<div class="p-col-12 p-md-12 p-lg-3" style="margin: auto;">
<label for="txtPresentPostalCode">Postal Code</label> <label for="txtPresentPostalCode">Postal Code</label>
</div> </div>
<div class="p-col-12 p-md-12 p-lg-3"> <div class="p-col-12 p-md-12 p-lg-3">
@ -182,6 +201,7 @@
[(ngModel)]="contact.presentPostCodeNo" type="text" pInputText style="width:100%" [(ngModel)]="contact.presentPostCodeNo" type="text" pInputText style="width:100%"
[readonly]="this.isSameAddress"> [readonly]="this.isSameAddress">
</div> </div>
<div class="p-lg-6"></div>
<div class="p-col-12 p-md-12 p-lg-12" style="height: 34px;"> <div class="p-col-12 p-md-12 p-lg-12" style="height: 34px;">
<label class="k-form-field right"> <label class="k-form-field right">
<!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress" <!-- <input type="checkbox" [(ngModel)]="isSameAddress" (change)="checkAddress()" id="isSameAddress"

View File

@ -89,6 +89,8 @@ export class ContactComponent implements OnInit {
permanentDistrictDropdown: new FormControl('', Validators.required), permanentDistrictDropdown: new FormControl('', Validators.required),
permanentThanaDropdown: new FormControl('', Validators.required), permanentThanaDropdown: new FormControl('', Validators.required),
permanentPostalCode: new FormControl(''), permanentPostalCode: new FormControl(''),
parmanentPO: new FormControl(''),
parmanentPOInBangla: new FormControl(''),
presentAddress: new FormControl('', Validators.required), presentAddress: new FormControl('', Validators.required),
presentAddressInBangla: new FormControl(''), presentAddressInBangla: new FormControl(''),
@ -97,6 +99,8 @@ export class ContactComponent implements OnInit {
presentDistrictDropdown: new FormControl('', Validators.required), presentDistrictDropdown: new FormControl('', Validators.required),
presentThanaDropdown: new FormControl('', Validators.required), presentThanaDropdown: new FormControl('', Validators.required),
presentPostCode: new FormControl(''), presentPostCode: new FormControl(''),
presentPO: new FormControl(''),
presentPOInBangla: new FormControl(''),
contactLandPhone: new FormControl(''), contactLandPhone: new FormControl(''),
contactMobileNo: new FormControl(''), contactMobileNo: new FormControl(''),
@ -110,8 +114,6 @@ export class ContactComponent implements OnInit {
emergencyMobileNo: new FormControl(''), emergencyMobileNo: new FormControl(''),
relation: new FormControl(''), relation: new FormControl(''),
presentPOInBangla: new FormControl(''),
parmanentPOInBangla: new FormControl(''),
}); });
/* if (this.employeeService.hrEmployee !== undefined && this.employeeService.hrEmployee.contacts.length > 0) { /* if (this.employeeService.hrEmployee !== undefined && this.employeeService.hrEmployee.contacts.length > 0) {
this.contact = this.employeeService.hrEmployee.contacts[0]; this.contact = this.employeeService.hrEmployee.contacts[0];
@ -212,6 +214,7 @@ export class ContactComponent implements OnInit {
this.contact.presentDistrictID = this.contact.permanentDistrictID; this.contact.presentDistrictID = this.contact.permanentDistrictID;
this.contact.presentThanaID = this.contact.permanentThanaID; this.contact.presentThanaID = this.contact.permanentThanaID;
this.contact.presentTelephone = this.contact.permanentTelephone; this.contact.presentTelephone = this.contact.permanentTelephone;
this.contact.presentPO = this.contact.permanentPO;
this.contact.presentPOInBangla = this.contact.parmanentPOInBangla; this.contact.presentPOInBangla = this.contact.parmanentPOInBangla;
this.contact.presentMobile = this.contact.permanentMobile; this.contact.presentMobile = this.contact.permanentMobile;
this.contact.presentPostCodeNo = this.contact.permanentPostCodeNo; this.contact.presentPostCodeNo = this.contact.permanentPostCodeNo;

View File

@ -53,7 +53,7 @@
</div> </div>
<div class="p-col-12 p-md-6 p-lg-8 form-control-lg form-control"> <div class="p-col-12 p-md-6 p-lg-8 form-control-lg form-control">
<input id="txtMailAddress" type="text" style="width:100%" <input id="txtMailAddress" type="text" style="width:100%"
[(ngModel)]="employee.emailAddress" formControlName="emailAddress" pInputText required> [(ngModel)]="employee.emailAddress" formControlName="emailAddress" pInputText>
</div> </div>
<div class="p-col-12 p-md-6 p-lg-4" style="margin:auto"> <div class="p-col-12 p-md-6 p-lg-4" style="margin:auto">

View File

@ -137,6 +137,8 @@ export class EmployeePayrollProfileComponent implements OnInit {
this.lastSalaryProcessDate(); this.lastSalaryProcessDate();
this.selectedCategoryid = this.ddlcategories.find(x => x.name.toLowerCase() == "worker").id;
// this.loadingPanelService.ShowLoadingPanel = true; // this.loadingPanelService.ShowLoadingPanel = true;
// this.employeeService.generateEmployeeNo().subscribe( // this.employeeService.generateEmployeeNo().subscribe(
// (resp) => { // (resp) => {
@ -153,6 +155,7 @@ export class EmployeePayrollProfileComponent implements OnInit {
} }
else { else {
this.employee.employeeNo = undefined; this.employee.employeeNo = undefined;
this.selectedCategoryid = undefined;
} }
} }

View File

@ -30,6 +30,7 @@ import { PayrollType } from '../../../_models/Authentication/payrollType';
import { GrievanceManagementService } from '../../../_services/grievance-management/grievanceManagement.service'; import { GrievanceManagementService } from '../../../_services/grievance-management/grievanceManagement.service';
import { ActivatedRoute, Router } from '@angular/router'; import { ActivatedRoute, Router } from '@angular/router';
import { WorkflowService } from '../../../_services/workflow/workflow.service'; import { WorkflowService } from '../../../_services/workflow/workflow.service';
import { AuthService } from '../../../_services/auth/auth.service';
@Component({ @Component({
@ -77,6 +78,8 @@ export class LifeCycleEntryComponent implements OnInit {
this.empPickerActive = false; this.empPickerActive = false;
} }
_effectDate: Date = undefined; _effectDate: Date = undefined;
public payrollType: PayrollType = undefined;
public salaryMonth: Date = new Date();
public empPickerActive: boolean = true; public empPickerActive: boolean = true;
public isDesingation: boolean = false; public isDesingation: boolean = false;
public isDepartment: boolean = false; public isDepartment: boolean = false;
@ -104,6 +107,7 @@ export class LifeCycleEntryComponent implements OnInit {
public utilityHandlerService: UntilityHandlerService, public organogramService: OrganogramService, public utilityHandlerService: UntilityHandlerService, public organogramService: OrganogramService,
public loadingPanelService: loadingPanelService, public loadingPanelService: loadingPanelService,
public router: Router, public workflowService: WorkflowService, public router: Router, public workflowService: WorkflowService,
public authservice: AuthService,
public acrouter: ActivatedRoute,) { public acrouter: ActivatedRoute,) {
if (this.router.url === '/payroll/career-and-profile/life-cycle-entry') if (this.router.url === '/payroll/career-and-profile/life-cycle-entry')
this.apiservice.selectedMenuName = 'Employee Life Cycle'; this.apiservice.selectedMenuName = 'Employee Life Cycle';
@ -135,7 +139,16 @@ export class LifeCycleEntryComponent implements OnInit {
} }
); );
this.authservice.GetPayrollTypeByLoginID().subscribe(
(resp: any) => {
this.payrollType = resp;
},
(err: any) => {
},
() => {
this.salaryMonth = new Date(this.payrollType.nextPayProcessDate);
}
);
} }
private refreshGradeSalaries() { private refreshGradeSalaries() {
@ -173,7 +186,7 @@ export class LifeCycleEntryComponent implements OnInit {
} }
EventselectionChange(value: any) { EventselectionChange(value: any) {
debugger;
this.isDesingation = false; this.isDesingation = false;
this.isDepartment = false; this.isDepartment = false;
this.isCategory = false; this.isCategory = false;
@ -292,6 +305,16 @@ export class LifeCycleEntryComponent implements OnInit {
}); });
this._sDescription = item.description; this._sDescription = item.description;
if(this._employeeStatus != undefined && this._employeeStatus.length > 0)
if(item == this._employeeStatus.find(x => x.description.toLowerCase() == 'joining') ){
this._effectDate = new Date(this._employee.joiningDate);
}
else {
debugger;
// let currentDate: Date = new Date();
let currentDate: Date = this.salaryMonth;
this._effectDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
}
} }
} }