nominee , family , academic modified and default value addition
This commit is contained in:
parent
efbd3ca782
commit
2547d6209e
|
@ -991,6 +991,7 @@ namespace HRM.BO
|
|||
_telePhone = string.Empty;
|
||||
|
||||
_emailAddress = string.Empty;
|
||||
Gender = EnumGender.None;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -1140,6 +1141,14 @@ namespace HRM.BO
|
|||
}
|
||||
|
||||
#endregion
|
||||
public string FatherName { get; set; }
|
||||
public string MotherName { get; set; }
|
||||
public string SpouseName { get; set; }
|
||||
public string NationalID{ get; set; }
|
||||
public EnumGender Gender { get; set; }
|
||||
public int? DistrictID{ get; set; }
|
||||
public int? ThanaID { get; set; }
|
||||
public string PostOffice { get; set; }
|
||||
public EnumProfileStatus ProfileStatus { get; set; }
|
||||
public string NomineeStatus { get; set; }
|
||||
public bool HasPicture { get; set; }
|
||||
|
|
|
@ -4,6 +4,7 @@ using Ease.Core.DataAccess;
|
|||
using HRM.BO;
|
||||
using Microsoft.AspNetCore.Routing.Template;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Org.BouncyCastle.Asn1.X509;
|
||||
|
||||
namespace HRM.DA
|
||||
{
|
||||
|
@ -676,16 +677,16 @@ namespace HRM.DA
|
|||
tc.ExecuteNonQuery("INSERT INTO EmpNominee(" +
|
||||
"EmployeeID, NomineeID, NominationPurposeID, NominationDate, Name, RelationID, " +
|
||||
" Percentage, BirthDate, OccupationID, Address, TelePhone," +
|
||||
" EmailAddress, NomineeMobileNo)" +
|
||||
" EmailAddress, NomineeMobileNo, FatherName , MotherName , SpouseName , GENDER , DistrictID , ThanaID , PostOffice)" +
|
||||
" VALUES(" +
|
||||
" %n, %n, %n, %d, %s, %n," +
|
||||
" %n, %d, %n, %s, %s, %s, %s)",
|
||||
" %n, %d, %n, %s, %s, %s, %s, %s, %s, %s, %n, %n, %n, %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, nominee.NomineeMobileNo, nominee.FatherName, nominee.MotherName, nominee.SpouseName, nominee.Gender, nominee.DistrictID, nominee.ThanaID, nominee.PostOffice);
|
||||
}
|
||||
|
||||
public static void Update(TransactionContext tc, EmpNominee nominee)
|
||||
|
@ -701,8 +702,16 @@ namespace HRM.DA
|
|||
,[TELEPHONE] = %s
|
||||
,[EMAILADDRESS] = %s
|
||||
,[NomineeMobileNo] = %s
|
||||
,[FatherName] = %s
|
||||
,[MotherName] = %s
|
||||
,[SpouseName] = %s
|
||||
,[Gender] = %n
|
||||
,[DistrictID] = %n
|
||||
,[ThanaID] = %n
|
||||
,[PostOffice] = %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.FatherName, nominee.MotherName, nominee.SpouseName, nominee.Gender, nominee.DistrictID, nominee.ThanaID, nominee.PostOffice,
|
||||
nominee.ID);
|
||||
}
|
||||
|
||||
|
@ -960,6 +969,13 @@ namespace HRM.DA
|
|||
,[IsMinor]
|
||||
,[NID]
|
||||
,[NIDPath]
|
||||
,[FatherName]
|
||||
,[MotherName]
|
||||
,[SpouseName]
|
||||
,[Gender]
|
||||
,[DistrictID]
|
||||
,[ThanaID]
|
||||
,[PostOffice]
|
||||
,iif(isnull(eu.empfileuploadid, 0) > 0, 1, 0) HasPicture
|
||||
,iif(isnull(eu2.empfileuploadid, 0) > 0, 1, 0) HasSignature
|
||||
from [EMPNOMINEE] en
|
||||
|
|
|
@ -376,7 +376,7 @@ END;";
|
|||
//Using TOP
|
||||
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
|
||||
orderby = "EmployeeNo";
|
||||
top = "TOP 50";
|
||||
top = "TOP 15";
|
||||
|
||||
//Without suggestion
|
||||
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );
|
||||
|
|
|
@ -558,6 +558,16 @@ namespace HRM.DA
|
|||
oEmpNominee.HasPicture = oReader.GetBoolean("HasPicture", true, false);
|
||||
oEmpNominee.HasSignature = oReader.GetBoolean("HasSignature", true, false);
|
||||
|
||||
oEmpNominee.FatherName = oReader.GetString("FatherName");
|
||||
oEmpNominee.MotherName = oReader.GetString("MotherName");
|
||||
oEmpNominee.SpouseName = oReader.GetString("SpouseName");
|
||||
oEmpNominee.NationalID = oReader.GetString("NID");
|
||||
oEmpNominee.Gender = (EnumGender)oReader.GetInt32("Gender", 0);
|
||||
oEmpNominee.DistrictID = oReader.GetInt32("DistrictID").HasValue ? oReader.GetInt32("DistrictID").Value : null;
|
||||
oEmpNominee.ThanaID = oReader.GetInt32("ThanaID").HasValue ? oReader.GetInt32("ThanaID").Value : null;
|
||||
oEmpNominee.PostOffice = oReader.GetString("PostOffice");
|
||||
|
||||
|
||||
this.SetObjectState(oEmpNominee, ObjectState.Saved);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import {NominationPurpose} from '../HRBasic/nomination-purpose';
|
||||
import {Relation} from '../HRBasic/relation';
|
||||
import {Occupation} from '../HRBasic/occupation';
|
||||
import {EnumProfileStatus} from '../enums';
|
||||
import {EnumProfileStatus, EnumGender} from '../enums';
|
||||
import {BaseObject} from '../Basic/baseObject';
|
||||
import {empFileuploads} from './hrEmployee';
|
||||
|
||||
|
@ -24,6 +24,14 @@ export class EmpNominee extends BaseObject {
|
|||
signature: empFileuploads;
|
||||
emailAddress: string;
|
||||
profileStatus: EnumProfileStatus;
|
||||
fatherName: string;
|
||||
motherName: string;
|
||||
spouseName: string;
|
||||
nationalID: string;
|
||||
gender: EnumGender;
|
||||
districtID?: number | null;
|
||||
thanaID?: number | null;
|
||||
postOffice: string;
|
||||
hasPicture: boolean;
|
||||
hasSignature: boolean;
|
||||
constructor() {
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ApiService {
|
|||
|
||||
public isSSO = false;
|
||||
public versionDeployement = false;
|
||||
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 23))}-`+"01";
|
||||
public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
|
||||
public static BASE_URL = '';
|
||||
public base_url = '';
|
||||
// public currentLink = '';
|
||||
|
|
|
@ -10,9 +10,10 @@
|
|||
<div class="p-col-12 p-md-6 p-lg-4" >
|
||||
<kendo-dropdownlist [(ngModel)]="selectedEducationTypeID" [data]="educationTypes"
|
||||
[defaultItem]="{ description: 'Select a Level', id: null }" [textField]="'description'"
|
||||
[valueField]="'id'" [valuePrimitive]="true" (valueChange)="selectEducationTypeEvent($event)"
|
||||
[valueField]="'id'" [valuePrimitive]="true"
|
||||
class="form-control form-control-sm input-sm" formControlName="educationTypePicker"
|
||||
style="width:100%;">
|
||||
<!-- (valueChange)="selectEducationTypeEvent($event)" -->
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
|
@ -23,9 +24,10 @@
|
|||
<kendo-dropdownlist [(ngModel)]="selectedEducationLevelID" [data]="educationLevels"
|
||||
[defaultItem]="{ description: 'Select Exam / Degree Title', id: null }" [textField]="'description'"
|
||||
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||
formControlName="educationLevelPicker" (valueChange)="selectEducationLevelEvent($event)"
|
||||
[disabled]="selectedEducationTypeID == undefined || selectedEducationTypeID == null"
|
||||
formControlName="educationLevelPicker"
|
||||
style="width:100%;">
|
||||
<!-- (valueChange)="selectEducationLevelEvent($event)"
|
||||
[disabled]="selectedEducationTypeID == undefined || selectedEducationTypeID == null" -->
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
|
@ -36,10 +38,10 @@
|
|||
<kendo-dropdownlist [(ngModel)]="selectedInstitutionID" [data]="institutions"
|
||||
[defaultItem]="{ name: 'Select institution/Board', id: null }" [textField]="'name'"
|
||||
[valueField]="'id'" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||
[disabled]="(selectedEducationTypeID == undefined ||selectedEducationTypeID == null) || (selectedEducationLevelID == undefined || selectedEducationLevelID == null)"
|
||||
[filterable]="true" (filterChange)="handleFilterInstitution($event)"
|
||||
(valueChange)="selectInstitutionEvent($event)" formControlName="institutionPicker"
|
||||
style="width:100%;">
|
||||
<!-- [disabled]="(selectedEducationTypeID == undefined ||selectedEducationTypeID == null) || (selectedEducationLevelID == undefined || selectedEducationLevelID == null)" -->
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
|
@ -50,10 +52,10 @@
|
|||
<kendo-dropdownlist class="form-control form-control-sm" id="subject" [data]="educationDiscipline"
|
||||
[defaultItem]="{ description: 'Select a discipline', id: null }" [textField]="'description'"
|
||||
[valueField]="'id'" [valuePrimitive]="true" [(ngModel)]="selectedDisciplineID"
|
||||
[disabled]="isEditActive"
|
||||
[disabled]="selectedEducationLevelID == undefined || selectedEducationLevelID == null"
|
||||
[filterable]="true" (filterChange)="handleFilter($event)" formControlName="disciplinePicker"
|
||||
style="width:100%">
|
||||
<!-- [disabled]="isEditActive"
|
||||
[disabled]="selectedEducationLevelID == undefined || selectedEducationLevelID == null" -->
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
|
@ -94,19 +96,23 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" *ngIf="isGrade" style="margin: auto;">
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<!-- *ngIf="isGrade" -->
|
||||
<label for="txtCgpaObtained">CGPA/Marks</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4" *ngIf="isGrade" >
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<!-- *ngIf="isGrade" -->
|
||||
<input id="txtCgpaObtained" formControlName="gpaOrMarks" [(ngModel)]="academic.gpaOrMarks"
|
||||
type="number" style="width: 100%;" pInputText />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" *ngIf="isGrade" >
|
||||
<div class="p-col-12 p-md-6 p-lg-2">
|
||||
<!-- *ngIf="isGrade" -->
|
||||
<label for="txtCgpaOutOf">Out of</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4" *ngIf="isGrade" style="margin: auto;">
|
||||
<div class="p-col-12 p-md-6 p-lg-4"style="margin: auto;">
|
||||
<!-- *ngIf="isGrade" -->
|
||||
<input id="txtCgpaOutOf" style="width: 100%;" formControlName="outOf" [(ngModel)]="academic.outOf"
|
||||
type="number" pInputText />
|
||||
</div>
|
||||
|
|
|
@ -17,6 +17,7 @@ import { BasicService } from '../../../../_services/Basic/basic.service';
|
|||
import { enumEmpFileUploadType, EnumStatus } from '../../../../_models/enums';
|
||||
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
||||
import { empFileuploads } from '../../../../_models/HREmployee/hrEmployee';
|
||||
import { forkJoin } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-academic-entry',
|
||||
|
@ -115,94 +116,139 @@ export class AcademicEntryComponent implements OnInit {
|
|||
// }
|
||||
// }
|
||||
loadData() {
|
||||
this.basicService.getAllEducationLevel().subscribe(
|
||||
(resp) => {
|
||||
this.alleducationLevels = resp;
|
||||
// this.basicService.getAllEducationLevel().subscribe(
|
||||
// (resp) => {
|
||||
// this.alleducationLevels = resp;
|
||||
// },
|
||||
// (err: any) => {
|
||||
// console.log(err);
|
||||
// },
|
||||
// () => {
|
||||
// // if (this.academic.id > 0) {
|
||||
// // this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
// // }
|
||||
// // else {
|
||||
// this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
// // }
|
||||
// this.basicService.getAllDiscipline().subscribe(
|
||||
// (resp) => {
|
||||
// this.alleducationDiscipline = resp;
|
||||
// },
|
||||
// (err: any) => {
|
||||
// console.log(err);
|
||||
// },
|
||||
// () => {
|
||||
// // if (this.academic.id > 0) {
|
||||
// // // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||
// // // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.id == this.academic.disciplineID);
|
||||
// // this.educationDiscipline = this.alleducationDiscipline;
|
||||
// // }
|
||||
// // else {
|
||||
// // this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||
// this.educationDiscipline = this.alleducationDiscipline;
|
||||
// // }
|
||||
|
||||
|
||||
// this.basicService.getAllInstitutions().subscribe(
|
||||
// (resp) => {
|
||||
// this.allinstitutions = resp;
|
||||
// },
|
||||
// (err: any) => {
|
||||
// console.log(err);
|
||||
// },
|
||||
// () => {
|
||||
// if (this.academic.id > 0) {
|
||||
// // this.institutions = this.allinstitutions.filter(x => x.boardRequired == this.academic.educationType.boardRequired);
|
||||
// if (this.academic.institution != undefined && this.academic.institution.boardRequired)
|
||||
// // this.institutions = this.allinstitutions.filter(x => x.id == this.academic.institutionID || x.boardRequired == true);
|
||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == true);
|
||||
// else
|
||||
// // this.institutions = this.allinstitutions.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == false);
|
||||
// }
|
||||
// //console.log(this.institutions);
|
||||
|
||||
// this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless).subscribe(
|
||||
// (resp) => {
|
||||
// this.allresultTypes = resp;
|
||||
// },
|
||||
// (err: any) => {
|
||||
// console.log(err);
|
||||
// },
|
||||
// () => {
|
||||
// if (this.academic.id > 0)
|
||||
// //console.log(this.allresultTypes);
|
||||
// if (this.academic.id > 0) {
|
||||
// let selectedEducationType: EducationType[] = this.educationTypes//.filter(x => x.id == this.academic.educationTypeID)
|
||||
// // this.resultTypes = this.allresultTypes.filter(x => x.type == selectedEducationType[0].resultType);
|
||||
// // if (selectedEducationType[0].resultType === 2 || selectedEducationType[0].resultType === 4) {
|
||||
// // this.isGrade = true;
|
||||
// // }
|
||||
// // else {
|
||||
// // this.isGrade = false;
|
||||
// // }
|
||||
// }
|
||||
|
||||
|
||||
// let educationType = this.educationTypes.find(x => x.description.toLowerCase() == "academic");
|
||||
// if (this.academic.id == 0 && educationType != undefined) {
|
||||
// this.academic.educationTypeID = educationType.id;
|
||||
// this.selectedEducationTypeID = this.academic.educationTypeID;
|
||||
// this.academic.examDate = new Date().getFullYear();
|
||||
// this.academic.passingYear = new Date().getFullYear();
|
||||
// this.selectEducationTypeEvent(educationType.id);
|
||||
// let descp = this.alleducationDiscipline.find(d => d.description.toLowerCase() == 'nil');
|
||||
// this.academic.disciplineID = descp != undefined ? descp.id : 0;
|
||||
// let inst = this.allinstitutions.find(d => d.name.toLowerCase() == 'Institute of Chartered Secretary of Bangladesh'.toLowerCase());
|
||||
// this.academic.institutionID = inst != undefined ? inst.id : 0;
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
const educationlevelService = this.basicService.getAllEducationLevel();
|
||||
const disciplineService = this.basicService.getAllDiscipline();
|
||||
const institutionService = this.basicService.getAllInstitutions();
|
||||
const resultTyoeService = this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless);
|
||||
|
||||
this.loadingPanelService.ShowLoadingPanel = true;
|
||||
forkJoin(educationlevelService, disciplineService, institutionService, resultTyoeService).subscribe(
|
||||
([res1, res2, res3, res4]) => {
|
||||
this.alleducationLevels = res1;
|
||||
this.alleducationDiscipline = res2;
|
||||
this.allinstitutions = res3;
|
||||
this.allresultTypes = res4;
|
||||
},
|
||||
(err: any) => {
|
||||
console.log(err);
|
||||
(x) => {
|
||||
this.loadingPanelService.ShowLoadingPanel = false;
|
||||
console.log(x);
|
||||
this.notificationService.showError(x.error);
|
||||
},
|
||||
() => {
|
||||
if (this.academic.id > 0) {
|
||||
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
this.educationLevels = this.alleducationLevels;
|
||||
this.educationDiscipline = this.alleducationDiscipline;
|
||||
this.institutions = this.allinstitutions;
|
||||
this.resultTypes = this.allresultTypes;
|
||||
|
||||
this.loadingPanelService.ShowLoadingPanel = false;
|
||||
let educationType = this.educationTypes.find(x => x.description.toLowerCase() == "academic");
|
||||
if (this.academic.id == 0 && educationType != undefined) {
|
||||
this.academic.educationTypeID = educationType.id;
|
||||
this.selectedEducationTypeID = this.academic.educationTypeID;
|
||||
let descp = this.alleducationDiscipline.find(d => d.description.toLowerCase() == 'nil');
|
||||
this.academic.disciplineID = descp != undefined ? descp.id : 0;
|
||||
this.selectedDisciplineID = this.academic.disciplineID;
|
||||
let inst = this.allinstitutions.find(d => d.name.toLowerCase() == 'Institute of Chartered Secretary of Bangladesh'.toLowerCase());
|
||||
this.academic.institutionID = inst != undefined ? inst.id : 0;
|
||||
this. selectedInstitutionID = this.academic.institutionID;
|
||||
this.academic.examDate = new Date().getFullYear();
|
||||
this.academic.passingYear = new Date().getFullYear();
|
||||
// this.selectEducationTypeEvent(educationType.id);
|
||||
}
|
||||
else {
|
||||
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
}
|
||||
this.basicService.getAllDiscipline().subscribe(
|
||||
(resp) => {
|
||||
this.alleducationDiscipline = resp;
|
||||
},
|
||||
(err: any) => {
|
||||
console.log(err);
|
||||
},
|
||||
() => {
|
||||
if (this.academic.id > 0) {
|
||||
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.id == this.academic.disciplineID);
|
||||
this.educationDiscipline = this.alleducationDiscipline;
|
||||
}
|
||||
else {
|
||||
// this.educationDiscipline = this.alleducationDiscipline.filter(x => x.educationLevelID == this.academic.educationLevelID);
|
||||
this.educationDiscipline = this.alleducationDiscipline;
|
||||
}
|
||||
|
||||
|
||||
this.basicService.getAllInstitutions().subscribe(
|
||||
(resp) => {
|
||||
this.allinstitutions = resp;
|
||||
},
|
||||
(err: any) => {
|
||||
console.log(err);
|
||||
},
|
||||
() => {
|
||||
if (this.academic.id > 0) {
|
||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == this.academic.educationType.boardRequired);
|
||||
if (this.academic.institution.boardRequired)
|
||||
// this.institutions = this.allinstitutions.filter(x => x.id == this.academic.institutionID || x.boardRequired == true);
|
||||
this.institutions = this.allinstitutions.filter(x => x.boardRequired == true);
|
||||
else
|
||||
// this.institutions = this.allinstitutions.filter(x => x.educationTypeID == this.academic.educationTypeID);
|
||||
this.institutions = this.allinstitutions.filter(x => x.boardRequired == false);
|
||||
}
|
||||
//console.log(this.institutions);
|
||||
|
||||
this.basicService.getAllResultTypesByStatus(EnumStatus.Regardless).subscribe(
|
||||
(resp) => {
|
||||
this.allresultTypes = resp;
|
||||
},
|
||||
(err: any) => {
|
||||
console.log(err);
|
||||
},
|
||||
() => {
|
||||
if (this.academic.id > 0)
|
||||
//console.log(this.allresultTypes);
|
||||
if (this.academic.id > 0) {
|
||||
let selectedEducationType: EducationType[] = this.educationTypes.filter(x => x.id == this.academic.educationTypeID)
|
||||
// this.resultTypes = this.allresultTypes.filter(x => x.type == selectedEducationType[0].resultType);
|
||||
// if (selectedEducationType[0].resultType === 2 || selectedEducationType[0].resultType === 4) {
|
||||
// this.isGrade = true;
|
||||
// }
|
||||
// else {
|
||||
// this.isGrade = false;
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
let educationType = this.educationTypes.find(x => x.description.toLowerCase() == "academic");
|
||||
if (this.academic.id == 0 && educationType != undefined) {
|
||||
this.academic.educationTypeID = educationType.id;
|
||||
this.selectedEducationTypeID = this.academic.educationTypeID;
|
||||
this.academic.examDate = new Date().getFullYear();
|
||||
this.academic.passingYear = new Date().getFullYear();
|
||||
this.selectEducationTypeEvent(educationType.id);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
@ -220,8 +266,8 @@ export class AcademicEntryComponent implements OnInit {
|
|||
}
|
||||
selectEducationTypeEvent(typeid: number) {
|
||||
if (typeid !== null) {
|
||||
this.educationLevels = this.alleducationLevels.filter(x => x.educationTypeID == typeid);
|
||||
let selectedEducationType: EducationType[] = this.educationTypes.filter(x => x.id == this.academic.educationTypeID)
|
||||
this.educationLevels = this.alleducationLevels//.filter(x => x.educationTypeID == typeid);
|
||||
let selectedEducationType: EducationType[] = this.educationTypes//.filter(x => x.id == this.academic.educationTypeID)
|
||||
// this.institutions = this.allinstitutions.filter(x => x.boardRequired == selectedEducationType[0].boardRequired);
|
||||
// this.institutions = this.allinstitutions.filter(x => x.educationTypeID == typeid);
|
||||
this.institutions = this.allinstitutions;
|
||||
|
@ -260,7 +306,7 @@ export class AcademicEntryComponent implements OnInit {
|
|||
if (seletedInstitution.boardRequired == true) resultType = 1;
|
||||
else resultType = 2;
|
||||
if (institutionid !== null)
|
||||
this.resultTypes = this.allresultTypes.filter(x => x.type == resultType);
|
||||
this.resultTypes = this.allresultTypes//.filter(x => x.type == resultType);
|
||||
|
||||
this.selectedResultTypeID = null;
|
||||
this.isGrade = false;
|
||||
|
|
|
@ -68,6 +68,11 @@ export class ChildrenListComponent implements OnInit {
|
|||
this.editIndex = -1;
|
||||
this.empChildren = new EmpChildren();
|
||||
this.empChildren.birthDate = new Date();
|
||||
let notApli = null;
|
||||
if(this.occupations != null)
|
||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
||||
if (notApli != null)
|
||||
this.empChildren.occupationID = notApli.id;
|
||||
this.isDisplay = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import {Component, OnInit, ViewEncapsulation} from '@angular/core';
|
||||
import {EmpSpouse} from '../../../../../_models/HREmployee/empSpouse';
|
||||
import {EmployeeServices} from '../../../../../_services/employee/employee.service';
|
||||
import {UntilityHandlerService} from '../../../../../utility.hanldler.service';
|
||||
import {DataTransferService} from '../../../../../data.transfer.service';
|
||||
import {ApiService} from '../../../../../app.api.service';
|
||||
import {AppWindowPopUp} from '../../../../../app.windowPopup.service';
|
||||
import {HRMNotificationService} from '../../../../../app.notification.service';
|
||||
import {Occupation} from '../../../../../_models/HRBasic/occupation';
|
||||
import {BasicService} from '../../../../../_services/Basic/basic.service';
|
||||
import {EducationLevel} from '../../../../../_models/HRBasic/education-level';
|
||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||
import { EmpSpouse } from '../../../../../_models/HREmployee/empSpouse';
|
||||
import { EmployeeServices } from '../../../../../_services/employee/employee.service';
|
||||
import { UntilityHandlerService } from '../../../../../utility.hanldler.service';
|
||||
import { DataTransferService } from '../../../../../data.transfer.service';
|
||||
import { ApiService } from '../../../../../app.api.service';
|
||||
import { AppWindowPopUp } from '../../../../../app.windowPopup.service';
|
||||
import { HRMNotificationService } from '../../../../../app.notification.service';
|
||||
import { Occupation } from '../../../../../_models/HRBasic/occupation';
|
||||
import { BasicService } from '../../../../../_services/Basic/basic.service';
|
||||
import { EducationLevel } from '../../../../../_models/HRBasic/education-level';
|
||||
|
||||
@Component({
|
||||
selector: 'app-spouse-list',
|
||||
|
@ -27,12 +27,12 @@ export class SpouseListComponent implements OnInit {
|
|||
editIndex: number;
|
||||
|
||||
constructor(public employeeService: EmployeeServices,
|
||||
public basicService: BasicService,
|
||||
public apiService: ApiService,
|
||||
public notificationService: HRMNotificationService,
|
||||
public dataTransferService: DataTransferService,
|
||||
public WindowPopUp: AppWindowPopUp,
|
||||
public utilityHandlerService: UntilityHandlerService) {
|
||||
public basicService: BasicService,
|
||||
public apiService: ApiService,
|
||||
public notificationService: HRMNotificationService,
|
||||
public dataTransferService: DataTransferService,
|
||||
public WindowPopUp: AppWindowPopUp,
|
||||
public utilityHandlerService: UntilityHandlerService) {
|
||||
this.empSpouse = new EmpSpouse();
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,13 @@ export class SpouseListComponent implements OnInit {
|
|||
addNew() {
|
||||
this.editIndex = -1;
|
||||
this.empSpouse = new EmpSpouse();
|
||||
this.empSpouse.dateOfBirth = new Date();
|
||||
this.empSpouse.marriageDate = new Date();
|
||||
let notApli = null;
|
||||
if(this.occupations != null)
|
||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
||||
if (notApli != null)
|
||||
this.empSpouse.occupationID = notApli.id;
|
||||
this.isDisplay = true;
|
||||
}
|
||||
|
||||
|
@ -86,7 +92,7 @@ export class SpouseListComponent implements OnInit {
|
|||
id: item.id
|
||||
};
|
||||
this.employeeService.deleteChildData(data).subscribe(
|
||||
() => {},
|
||||
() => { },
|
||||
(err) => {
|
||||
console.log(err);
|
||||
},
|
||||
|
@ -121,7 +127,7 @@ export class SpouseListComponent implements OnInit {
|
|||
this.empSpouse = new EmpSpouse();
|
||||
this.isDisplay = false;
|
||||
}
|
||||
addHandler() {}
|
||||
addHandler() { }
|
||||
|
||||
onPopUpClose() {
|
||||
this.isDisplay = false;
|
||||
|
|
|
@ -71,11 +71,14 @@
|
|||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtAddress">Address</label>
|
||||
<label for="txtAddress">Gender</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
|
||||
pInputText style="width:100%" />
|
||||
<kendo-dropdownlist [(ngModel)]="nominee.gender" [data]="genderType"
|
||||
[defaultItem]="{ name: 'Select Gender..', value: null }" [textField]="'name'" [valueField]="'value'"
|
||||
[valuePrimitive]="true" class="form-control form-control-sm input-sm" formControlName="gender"
|
||||
id="gender" style="width:100%">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
|
@ -102,6 +105,83 @@
|
|||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtAddress">Address</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtAddress" formControlName="address" [(ngModel)]="nominee.address" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtFatherName">Father Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtFatherName" formControlName="fatherName" [(ngModel)]="nominee.fatherName" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtMotherName">Mother Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtMotherName" formControlName="motherName" [(ngModel)]="nominee.motherName" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtSpouseName">Spouse Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtSpouseName" formControlName="spouseName" [(ngModel)]="nominee.spouseName" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtNationalID">NationalID</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtNationalID" formControlName="nID" [(ngModel)]="nominee.nationalID" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtDistrict">District</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<!-- <input id="txtDistrict" formControlName="district" [(ngModel)]="nominee.districtID" type="text"
|
||||
pInputText style="width:100%" /> -->
|
||||
<kendo-dropdownlist [(ngModel)]="nominee.districtID" [data]="districts"
|
||||
[defaultItem]="{ name: 'Select District..', value: null }" [textField]="'name'"
|
||||
[valueField]="'id'" style="width: 100%" (valueChange)="loadThana($event)"
|
||||
[valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||
formControlName="district">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtThana">Thana</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<!-- <input id="txtThana" formControlName="thana" [(ngModel)]="nominee.thanaID" type="text"
|
||||
pInputText style="width:100%" /> -->
|
||||
<kendo-dropdownlist [(ngModel)]="nominee.thanaID" [data]="thanas"
|
||||
[defaultItem]="{ name: 'Select Thana..', value: null }" [textField]="'name'" [valueField]="'id'"
|
||||
style="width: 100%" [valuePrimitive]="true" class="form-control form-control-sm input-sm"
|
||||
formControlName="thana">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="txtPostOffice">Post Office</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-4">
|
||||
<input id="txtPostOffice" formControlName="postOffice" [(ngModel)]="nominee.postOffice" type="text"
|
||||
pInputText style="width:100%" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-2" style="margin: auto;">
|
||||
<label for="fupPicture">Picture</label>
|
||||
</div>
|
||||
|
|
|
@ -11,10 +11,12 @@ import { HrEmployee } from '../../../../_models/HREmployee/hrEmployee';
|
|||
import { BasicService } from '../../../../_services/Basic/basic.service';
|
||||
import { forkJoin } from 'rxjs';
|
||||
import { Relation } from '../../../../_models/HRBasic/relation';
|
||||
import { District } from '../../../../_models/HRBasic/district';
|
||||
import { Thana } from '../../../../_models/HRBasic/thana';
|
||||
import { Occupation } from '../../../../_models/HRBasic/occupation';
|
||||
import { NominationPurpose } from '../../../../_models/HRBasic/nomination-purpose';
|
||||
import { loadingPanelService } from '../../../../hrm-loding panel/loding.panel.service';
|
||||
import { enumEmpFileUploadType } from '../../../../_models/enums';
|
||||
import { enumEmpFileUploadType, EnumExtension, EnumGender, EnumMaritalStatus } from '../../../../_models/enums';
|
||||
import { debug } from 'console';
|
||||
|
||||
|
||||
|
@ -30,6 +32,9 @@ export class NomineeEntryComponent implements OnInit {
|
|||
nomineeForm: FormGroup;
|
||||
public active = false;
|
||||
nominee: EmpNominee;
|
||||
genderType: any = EnumExtension.getNamesAndValues(EnumGender);
|
||||
districts: District[];
|
||||
thanas: Thana[];
|
||||
selectedPicture?: FileList;
|
||||
selectedSignature?: FileList;
|
||||
currentFile?: File;
|
||||
|
@ -38,6 +43,8 @@ export class NomineeEntryComponent implements OnInit {
|
|||
@Input()
|
||||
public set InputObject(InputObject: EmpNominee) {
|
||||
this.nominee = InputObject;
|
||||
if(this.nominee != undefined && this.nominee.districtID != null && this.nominee.districtID != 0)
|
||||
this.loadThana(this.nominee.districtID);
|
||||
}
|
||||
|
||||
constructor(public employeeService: EmployeeServices,
|
||||
|
@ -60,12 +67,14 @@ export class NomineeEntryComponent implements OnInit {
|
|||
const getRelations = this.basicService.getAllRelations();
|
||||
const getOccupations = this.basicService.getAllOccupation();
|
||||
const getNominationPurpose = this.basicService.getAllNominationPurpose();
|
||||
const getDistricts = this.basicService.getAllDistricts();
|
||||
|
||||
forkJoin([getRelations, getOccupations, getNominationPurpose]).subscribe(
|
||||
([resp1, resp2, resp3]) => {
|
||||
forkJoin([getRelations, getOccupations, getNominationPurpose, getDistricts]).subscribe(
|
||||
([resp1, resp2, resp3, resp4]) => {
|
||||
this.relations = resp1;
|
||||
this.occupations = resp2;
|
||||
this.nominationPurposes = resp3;
|
||||
this.districts = resp4;
|
||||
},
|
||||
(x) => {
|
||||
console.log(x);
|
||||
|
@ -76,6 +85,19 @@ export class NomineeEntryComponent implements OnInit {
|
|||
);
|
||||
}
|
||||
|
||||
loadThana(value: any) {
|
||||
this.basicService.getAllThanas(value).subscribe((resp) => {
|
||||
this.thanas = resp;
|
||||
},
|
||||
() => {
|
||||
|
||||
},
|
||||
() => {
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
createForm() {
|
||||
this.nomineeForm = new FormBuilder().group({
|
||||
nominationDate: ['', Validators.required],
|
||||
|
@ -91,6 +113,14 @@ export class NomineeEntryComponent implements OnInit {
|
|||
picturePath: [''],
|
||||
signaturePath: [''],
|
||||
mobile: [''],
|
||||
gender: ['', Validators.required],
|
||||
fatherName: [''],
|
||||
motherName: [''],
|
||||
spouseName: [''],
|
||||
nID: [''],
|
||||
district: [''],
|
||||
thana: [''],
|
||||
postOffice: [''],
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -157,4 +187,5 @@ export class NomineeEntryComponent implements OnInit {
|
|||
selectedFiles = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -87,6 +87,11 @@ export class NomineeListComponent implements OnInit {
|
|||
this.nominee = new EmpNominee();
|
||||
this.nominee.employeeID = this.employeeService.hrEmployee.id;
|
||||
this.nominee.percentage = 100;
|
||||
let notApli = null;
|
||||
if(this.occupations != null)
|
||||
notApli = this.occupations.find(o => o.description.toUpperCase() == 'N/A');
|
||||
if (notApli != null)
|
||||
this.nominee.occupationID = notApli.id;
|
||||
this.isDisplay = true;
|
||||
}
|
||||
public editHandler(rowIndex: any) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user