employee profile issues upon client requirement
This commit is contained in:
parent
38e1917a33
commit
f418e7ab3d
|
@ -1309,8 +1309,8 @@ namespace HRM.BO
|
||||||
#endregion
|
#endregion
|
||||||
//CGPA or Marks
|
//CGPA or Marks
|
||||||
#region GPAOrMarks
|
#region GPAOrMarks
|
||||||
private double _gpa;
|
private double? _gpa;
|
||||||
public double GPAOrMarks
|
public double? GPAOrMarks
|
||||||
{
|
{
|
||||||
get { return _gpa; }
|
get { return _gpa; }
|
||||||
set { _gpa = value; }
|
set { _gpa = value; }
|
||||||
|
@ -1319,8 +1319,8 @@ namespace HRM.BO
|
||||||
//OutOf
|
//OutOf
|
||||||
#region Property OutOf : double
|
#region Property OutOf : double
|
||||||
|
|
||||||
private double _outOf;
|
private double? _outOf;
|
||||||
public double OutOf
|
public double? OutOf
|
||||||
{
|
{
|
||||||
get { return _outOf; }
|
get { return _outOf; }
|
||||||
set { _outOf = value; }
|
set { _outOf = value; }
|
||||||
|
|
|
@ -588,8 +588,8 @@ namespace HRM.DA
|
||||||
academic.ID, academic.EmployeeID, academic.EducationLevelID,
|
academic.ID, academic.EmployeeID, academic.EducationLevelID,
|
||||||
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
||||||
DataReader.GetNullValue(academic.PassingYear),
|
DataReader.GetNullValue(academic.PassingYear),
|
||||||
DataReader.GetNullValue(academic.ClassOrDivision), academic.GPAOrMarks, academic.LastLevel,
|
DataReader.GetNullValue(academic.ClassOrDivision), DataReader.GetNullValue(academic.GPAOrMarks), academic.LastLevel,
|
||||||
academic.OutOf, DataReader.GetNullValue(academic.ResultTypeID, 0),
|
DataReader.GetNullValue(academic.OutOf), DataReader.GetNullValue(academic.ResultTypeID),
|
||||||
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
||||||
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus);
|
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus);
|
||||||
}
|
}
|
||||||
|
@ -602,8 +602,8 @@ namespace HRM.DA
|
||||||
" where AcademicID =%n and EmployeeID =%n ", academic.EducationLevelID,
|
" where AcademicID =%n and EmployeeID =%n ", academic.EducationLevelID,
|
||||||
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
DataReader.GetNullValue(academic.DisciplineID, 0), DataReader.GetNullValue(academic.InstitutionID, 0),
|
||||||
DataReader.GetNullValue(academic.PassingYear),
|
DataReader.GetNullValue(academic.PassingYear),
|
||||||
DataReader.GetNullValue(academic.ClassOrDivision), academic.GPAOrMarks, academic.LastLevel,
|
DataReader.GetNullValue(academic.ClassOrDivision), DataReader.GetNullValue(academic.GPAOrMarks), academic.LastLevel,
|
||||||
academic.OutOf, DataReader.GetNullValue(academic.ResultTypeID, 0),
|
DataReader.GetNullValue(academic.OutOf), DataReader.GetNullValue(academic.ResultTypeID),
|
||||||
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
DataReader.GetNullValue(academic.InstituteName), DataReader.GetNullValue(academic.EducationTypeID, 0),
|
||||||
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus,
|
academic.PhotoPath, academic.DocSubmissionDate, academic.ProfileStatus,
|
||||||
academic.ID, academic.EmployeeID);
|
academic.ID, academic.EmployeeID);
|
||||||
|
|
|
@ -596,8 +596,8 @@ namespace HRM.DA
|
||||||
oEmpAcademic.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", 0);
|
oEmpAcademic.ProfileStatus = (EnumProfileStatus)oReader.GetInt32("ProfileStatus", 0);
|
||||||
|
|
||||||
oEmpAcademic.ResultTypeID = oReader.GetInt32("ResultTypeID", 0);
|
oEmpAcademic.ResultTypeID = oReader.GetInt32("ResultTypeID", 0);
|
||||||
oEmpAcademic.GPAOrMarks = oReader.GetDouble("GPAOrMarks", 0);
|
oEmpAcademic.GPAOrMarks = oReader.GetDouble("OutOf").HasValue ? oReader.GetDouble("GPAOrMarks") : null;
|
||||||
oEmpAcademic.OutOf = oReader.GetDouble("OutOf", 0);
|
oEmpAcademic.OutOf = oReader.GetDouble("OutOf").HasValue ? oReader.GetDouble("OutOf") : null;
|
||||||
oEmpAcademic.LastLevel = oReader.GetBoolean("LastLevel", false);
|
oEmpAcademic.LastLevel = oReader.GetBoolean("LastLevel", false);
|
||||||
oEmpAcademic.InstituteName = oReader.GetString("InstituteName");
|
oEmpAcademic.InstituteName = oReader.GetString("InstituteName");
|
||||||
oEmpAcademic.PhotoPath = oReader.GetString("PhotoPath");
|
oEmpAcademic.PhotoPath = oReader.GetString("PhotoPath");
|
||||||
|
|
|
@ -187,6 +187,16 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
// this.isGrade = false;
|
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -285,7 +295,7 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
educationLevelPicker: ['', Validators.required],
|
educationLevelPicker: ['', Validators.required],
|
||||||
disciplinePicker: ['', Validators.required],
|
disciplinePicker: ['', Validators.required],
|
||||||
institutionPicker: ['', Validators.required],
|
institutionPicker: ['', Validators.required],
|
||||||
resultTypePicker: ['', Validators.required],
|
resultTypePicker: [''],
|
||||||
examHeldOn: ['', Validators.required],
|
examHeldOn: ['', Validators.required],
|
||||||
passingYear: ['', Validators.required],
|
passingYear: ['', Validators.required],
|
||||||
gpaOrMarks: [''],
|
gpaOrMarks: [''],
|
||||||
|
@ -304,11 +314,12 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
this.selectedResultTypeID = this.academic.resultTypeID;
|
this.selectedResultTypeID = this.academic.resultTypeID;
|
||||||
}
|
}
|
||||||
public onSave(e): void {
|
public onSave(e): void {
|
||||||
|
debugger;
|
||||||
this.academic.educationTypeID = this.selectedEducationTypeID;
|
this.academic.educationTypeID = this.selectedEducationTypeID;
|
||||||
this.academic.educationLevelID = this.selectedEducationLevelID;
|
this.academic.educationLevelID = this.selectedEducationLevelID;
|
||||||
this.academic.institutionID = this.selectedInstitutionID;
|
this.academic.institutionID = this.selectedInstitutionID;
|
||||||
this.academic.disciplineID = this.selectedDisciplineID;
|
this.academic.disciplineID = this.selectedDisciplineID;
|
||||||
this.academic.resultTypeID = this.selectedResultTypeID;
|
this.academic.resultTypeID = this.selectedResultTypeID != null ? this.selectedResultTypeID : 0;
|
||||||
if (this.employeeService.hrEmployee.id === undefined || this.employeeService.hrEmployee.id === 0) {
|
if (this.employeeService.hrEmployee.id === undefined || this.employeeService.hrEmployee.id === 0) {
|
||||||
this.notificationService.showWarning('please select an employee');
|
this.notificationService.showWarning('please select an employee');
|
||||||
this.onCancel(null);
|
this.onCancel(null);
|
||||||
|
@ -320,10 +331,9 @@ export class AcademicEntryComponent implements OnInit {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.academic.createdBy = 0;
|
|
||||||
this.academic.employeeID = this.employeeService.hrEmployee.id;
|
this.academic.employeeID = this.employeeService.hrEmployee.id;
|
||||||
this.academic.createdDate = new Date(this.academic.createdBy);
|
|
||||||
this.academic.createdBy = 0;
|
this.academic.createdBy = 0;
|
||||||
|
this.academic.createdDate = new Date();
|
||||||
this.loadingPanelService.ShowLoadingPanel = true;
|
this.loadingPanelService.ShowLoadingPanel = true;
|
||||||
this.employeeService.saveEmployeeAcademic(this.academic).subscribe(
|
this.employeeService.saveEmployeeAcademic(this.academic).subscribe(
|
||||||
(resp) => {
|
(resp) => {
|
||||||
|
|
|
@ -104,10 +104,10 @@ export class ContactComponent implements OnInit {
|
||||||
contactOfficialEmail: new FormControl(''),
|
contactOfficialEmail: new FormControl(''),
|
||||||
contactFax: new FormControl(''),
|
contactFax: new FormControl(''),
|
||||||
|
|
||||||
emergencyContactPerson: new FormControl('', Validators.required),
|
emergencyContactPerson: new FormControl(''),
|
||||||
emergencyAddress: new FormControl('', Validators.required),
|
emergencyAddress: new FormControl(''),
|
||||||
emergencyLandPhone: new FormControl(''),
|
emergencyLandPhone: new FormControl(''),
|
||||||
emergencyMobileNo: new FormControl('', Validators.required),
|
emergencyMobileNo: new FormControl(''),
|
||||||
relation: new FormControl(''),
|
relation: new FormControl(''),
|
||||||
|
|
||||||
presentPOInBangla: new FormControl(''),
|
presentPOInBangla: new FormControl(''),
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<p-tabView [scrollable]="true">
|
<p-tabView [scrollable]="true">
|
||||||
<p-tabPanel header="General" leftIcon="pi pi-user">
|
<p-tabPanel header="General" leftIcon="pi pi-user">
|
||||||
<app-general [isActive]="!newEmployee" [employeeNo]="this.employeeService.hrEmployee.employeeNo"></app-general>
|
<app-general [isActive]="!newEmployee" [employeeNo]="this.employeeService.hrEmployee.employeeNo" (defaultNationalityHandler)="defaultNationalityHandler($event)"></app-general>
|
||||||
</p-tabPanel>
|
</p-tabPanel>
|
||||||
<p-tabPanel header="Contacts" leftIcon="pi pi-phone">
|
<p-tabPanel header="Contacts" leftIcon="pi pi-phone">
|
||||||
<app-contact (saveContact)="saveContact($event)"></app-contact>
|
<app-contact (saveContact)="saveContact($event)"></app-contact>
|
||||||
|
|
|
@ -11,6 +11,7 @@ import {ApiService} from '../../app.api.service';
|
||||||
import { loadingPanelService } from '../../hrm-loding panel/loding.panel.service';
|
import { loadingPanelService } from '../../hrm-loding panel/loding.panel.service';
|
||||||
import { HRMNotificationService } from '../../app.notification.service';
|
import { HRMNotificationService } from '../../app.notification.service';
|
||||||
import { DomSanitizer } from '@angular/platform-browser';
|
import { DomSanitizer } from '@angular/platform-browser';
|
||||||
|
import { Nationality } from '../nationality/nationality';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-employee-profile',
|
selector: 'app-employee-profile',
|
||||||
|
@ -30,6 +31,7 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
attachment: any;
|
attachment: any;
|
||||||
fileType = '';
|
fileType = '';
|
||||||
isDisplay = false;
|
isDisplay = false;
|
||||||
|
defaultNationality: Nationality;
|
||||||
constructor(private fb: FormBuilder,
|
constructor(private fb: FormBuilder,
|
||||||
public employeeService: EmployeeServices,
|
public employeeService: EmployeeServices,
|
||||||
public basicService: BasicService,
|
public basicService: BasicService,
|
||||||
|
@ -261,6 +263,11 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
this.employeeService.hrEmployee.passportExpDate = new Date(this.employeeService.hrEmployee.passportExpDate);
|
this.employeeService.hrEmployee.passportExpDate = new Date(this.employeeService.hrEmployee.passportExpDate);
|
||||||
this.employeeService.hrEmployee.passportIssueDate = new Date(this.employeeService.hrEmployee.passportIssueDate);
|
this.employeeService.hrEmployee.passportIssueDate = new Date(this.employeeService.hrEmployee.passportIssueDate);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
this.hrEmployeeProfile.birthDate = new Date();
|
||||||
|
this.hrEmployeeProfile.joiningDate = new Date();
|
||||||
|
this.hrEmployeeProfile.nationalityID = this.defaultNationality != null ? this.defaultNationality.id : null;
|
||||||
|
}
|
||||||
this.employeeService.Employee_Get_Completed.next(this.hrEmployeeProfile);
|
this.employeeService.Employee_Get_Completed.next(this.hrEmployeeProfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,5 +315,9 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
onPopUpClose() {
|
onPopUpClose() {
|
||||||
this.isDisplay = false;
|
this.isDisplay = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaultNationalityHandler(dataItem: Nationality) {
|
||||||
|
this.defaultNationality = dataItem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
||||||
import { DataTransferService } from '../../../data.transfer.service';
|
import { DataTransferService } from '../../../data.transfer.service';
|
||||||
import { EmployeeServices } from '../../../_services/employee/employee.service';
|
import { EmployeeServices } from '../../../_services/employee/employee.service';
|
||||||
|
@ -126,6 +126,7 @@ export class GeneralComponent implements OnInit {
|
||||||
permanentThanas: Thana[];
|
permanentThanas: Thana[];
|
||||||
|
|
||||||
isAccessCard: boolean = false;
|
isAccessCard: boolean = false;
|
||||||
|
@Output() defaultNationalityHandler = new EventEmitter<Nationality>();
|
||||||
|
|
||||||
constructor(public employeeService: EmployeeServices, public basicService: BasicService,
|
constructor(public employeeService: EmployeeServices, public basicService: BasicService,
|
||||||
public notificationService: HRMNotificationService,
|
public notificationService: HRMNotificationService,
|
||||||
|
@ -179,6 +180,7 @@ export class GeneralComponent implements OnInit {
|
||||||
this.defaultNationality = this.nationalities.find(x => x.description.toLowerCase() == "bangladeshi");
|
this.defaultNationality = this.nationalities.find(x => x.description.toLowerCase() == "bangladeshi");
|
||||||
if (this.defaultNationality) {
|
if (this.defaultNationality) {
|
||||||
this.hrEmployee.nationalityID = this.defaultNationality.id;
|
this.hrEmployee.nationalityID = this.defaultNationality.id;
|
||||||
|
this.defaultNationalityHandler.emit(this.defaultNationality);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user