long profile emp photo
This commit is contained in:
parent
19fd4dc92a
commit
ae98d60cd9
|
@ -14,7 +14,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, 25))}-`+"01";
|
// public versionNumber = `V-${GlobalfunctionExtension.generateVersionNumber(new Date(2025, 1, 25))}-`+"01";
|
||||||
public versionNumber = `V-20250721-`+"01";
|
public versionNumber = `V-20250724-`+"01";
|
||||||
public static BASE_URL = '';
|
public static BASE_URL = '';
|
||||||
public base_url = '';
|
public base_url = '';
|
||||||
// public currentLink = '';
|
// public currentLink = '';
|
||||||
|
|
|
@ -200,6 +200,7 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
|
|
||||||
|
|
||||||
checkValue(value: any) {
|
checkValue(value: any) {
|
||||||
|
debugger
|
||||||
if (value === true) {
|
if (value === true) {
|
||||||
|
|
||||||
this.hrEmployeeProfile = new HrEmployee();
|
this.hrEmployeeProfile = new HrEmployee();
|
||||||
|
@ -221,6 +222,7 @@ export class EmployeeProfileComponent implements OnInit {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.employeeService.hrEmployee.employeeNo = undefined;
|
this.employeeService.hrEmployee.employeeNo = undefined;
|
||||||
|
this.employeeService.Employee_Get_Completed.next(new HrEmployee());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,11 @@
|
||||||
<div style="position: relative; display: inline-block;">
|
<div style="position: relative; display: inline-block;">
|
||||||
<img id="imgProfilePicture" [src]="employeePhoto"
|
<img id="imgProfilePicture" [src]="employeePhoto"
|
||||||
style="height: 180px; width: 180px; border-radius: 50%; border: 1px solid #52527A;" />
|
style="height: 180px; width: 180px; border-radius: 50%; border: 1px solid #52527A;" />
|
||||||
<button class="editImage" (click)="fileInput.click()"
|
<!-- <button class="editImage" (click)="fileInput.click()"
|
||||||
|
style="position: absolute; bottom: 18px; right: 18px;">
|
||||||
|
<span class="editIcon">✎</span>
|
||||||
|
</button> -->
|
||||||
|
<button class="editImage" (click)="triggerUploadClick()"
|
||||||
style="position: absolute; bottom: 18px; right: 18px;">
|
style="position: absolute; bottom: 18px; right: 18px;">
|
||||||
<span class="editIcon">✎</span>
|
<span class="editIcon">✎</span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -25,8 +29,16 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-12" align="center">
|
<div class="p-col-12 p-md-12 p-lg-12" align="center">
|
||||||
<input formControlName="empPhoto" id="fupEmpPhoto" #fileInput
|
<!-- <input formControlName="empPhoto" id="fupEmpPhoto" #fileInput
|
||||||
(change)="selectFile($event)" type="file" style="display: none;">
|
(change)="selectProfilePhoto($event)" type="file" style="display: none;"> -->
|
||||||
|
<!-- <kendo-upload #fileInput formControlName="empPhoto" id="fupEmpPhoto"
|
||||||
|
[autoUpload]="false" [multiple]="false" [saveUrl]="'noop'" [removeUrl]="'noop'"
|
||||||
|
(select)="selectProfilePhoto($event)" style="width: 100%;display: none;">
|
||||||
|
</kendo-upload> -->
|
||||||
|
<kendo-upload #uploadPhoto formControlName="empPhoto" id="fupEmpPhoto" [autoUpload]="false"
|
||||||
|
[multiple]="false" [saveUrl]="'noop'" [removeUrl]="'noop'"
|
||||||
|
(select)="selectProfilePhoto($event)" style="width: 100%; display: none;">
|
||||||
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-12" style="height: 76px;">
|
<div class="p-col-12 p-md-12 p-lg-12" style="height: 76px;">
|
||||||
|
|
||||||
|
@ -179,8 +191,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-lg-12" align="right" style="margin-top: 20px;">
|
<div class="p-col-12 p-lg-12" align="right" style="margin-top: 20px;">
|
||||||
|
|
||||||
<button class="k-button k-primary" kendoButton icon="save"
|
<button class="k-button k-primary" kendoButton icon="save" (click)="SavePersonalInfo()">
|
||||||
(click)="SavePersonalInfo()">
|
|
||||||
<!-- (click)="SavePersonalInfo()"> -->
|
<!-- (click)="SavePersonalInfo()"> -->
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
@ -213,12 +224,8 @@
|
||||||
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
||||||
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
||||||
(click)="popUpAttachment('DLN')"></button> -->
|
(click)="popUpAttachment('DLN')"></button> -->
|
||||||
<kendo-upload #uploadDL
|
<kendo-upload #uploadDL [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||||
[autoUpload]="false"
|
[removeUrl]="'noop'" (select)="selectFileDrivingLicense($event)"
|
||||||
[multiple]="false"
|
|
||||||
[saveUrl]="'noop'"
|
|
||||||
[removeUrl]="'noop'"
|
|
||||||
(select)="selectFileDrivingLicense($event)"
|
|
||||||
style="width: 100%;">
|
style="width: 100%;">
|
||||||
</kendo-upload>
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
|
@ -248,18 +255,14 @@
|
||||||
<label for="empSignaturePhotoId">Signature</label>
|
<label for="empSignaturePhotoId">Signature</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-8">
|
<div class="p-col-12 p-md-12 p-lg-8">
|
||||||
<input id="empSignaturePhotoId" pInputText style="width:100%" type="text" [readonly]="true">
|
<input id="empSignaturePhotoId" pInputText style="width:100%" type="text"
|
||||||
|
[readonly]="true">
|
||||||
<!-- style="width: 84%" -->
|
<!-- style="width: 84%" -->
|
||||||
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
||||||
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
||||||
(click)="popUpAttachment('Signature')"></button> -->
|
(click)="popUpAttachment('Signature')"></button> -->
|
||||||
<kendo-upload #uploadSig
|
<kendo-upload #uploadSig [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||||
[autoUpload]="false"
|
[removeUrl]="'noop'" (select)="selectSignature($event)" style="width: 100%;">
|
||||||
[multiple]="false"
|
|
||||||
[saveUrl]="'noop'"
|
|
||||||
[removeUrl]="'noop'"
|
|
||||||
(select)="selectSignature($event)"
|
|
||||||
style="width: 100%;">
|
|
||||||
</kendo-upload>
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -295,13 +298,8 @@
|
||||||
[removeUrl]="'noop'"
|
[removeUrl]="'noop'"
|
||||||
(select)="onFileSelect($event)">
|
(select)="onFileSelect($event)">
|
||||||
</kendo-upload> -->
|
</kendo-upload> -->
|
||||||
<kendo-upload #uploadNID
|
<kendo-upload #uploadNID [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||||
[autoUpload]="false"
|
[removeUrl]="'noop'" (select)="selectFileNationalId($event)" style="width: 100%;">
|
||||||
[multiple]="false"
|
|
||||||
[saveUrl]="'noop'"
|
|
||||||
[removeUrl]="'noop'"
|
|
||||||
(select)="selectFileNationalId($event)"
|
|
||||||
style="width: 100%;">
|
|
||||||
</kendo-upload>
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4">
|
<div class="p-col-12 p-md-12 p-lg-4">
|
||||||
|
@ -314,13 +312,8 @@
|
||||||
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
||||||
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
||||||
(click)="popUpAttachment('PNo')"></button> -->
|
(click)="popUpAttachment('PNo')"></button> -->
|
||||||
<kendo-upload #uploadPassPort
|
<kendo-upload #uploadPassPort [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||||
[autoUpload]="false"
|
[removeUrl]="'noop'" (select)="selectPassport($event)" style="width: 100%;">
|
||||||
[multiple]="false"
|
|
||||||
[saveUrl]="'noop'"
|
|
||||||
[removeUrl]="'noop'"
|
|
||||||
(select)="selectPassport($event)"
|
|
||||||
style="width: 100%;">
|
|
||||||
</kendo-upload>
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4">
|
<div class="p-col-12 p-md-12 p-lg-4">
|
||||||
|
@ -349,7 +342,8 @@
|
||||||
<label for="">Bangla Information</label>
|
<label for="">Bangla Information</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-8">
|
<div class="p-col-12 p-md-12 p-lg-8">
|
||||||
<button class="k-button k-primary" style="width: 100%;" kendoButton icon="info" (click)="DisplayBanglaInformation()">
|
<button class="k-button k-primary" style="width: 100%;" kendoButton icon="info"
|
||||||
|
(click)="DisplayBanglaInformation()">
|
||||||
View & Update
|
View & Update
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -372,13 +366,8 @@
|
||||||
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
style="width: 15.5%; vertical-align: bottom; padding: 16px;" [disabled]="!active"
|
||||||
(click)="popUpAttachment('TIN')"></button> -->
|
(click)="popUpAttachment('TIN')"></button> -->
|
||||||
|
|
||||||
<kendo-upload #uploadTIN
|
<kendo-upload #uploadTIN [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||||
[autoUpload]="false"
|
[removeUrl]="'noop'" (select)="selectFileTin($event)" style="width: 100%;">
|
||||||
[multiple]="false"
|
|
||||||
[saveUrl]="'noop'"
|
|
||||||
[removeUrl]="'noop'"
|
|
||||||
(select)="selectFileTin($event)"
|
|
||||||
style="width: 100%;">
|
|
||||||
</kendo-upload>
|
</kendo-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4">
|
<div class="p-col-12 p-md-12 p-lg-4">
|
||||||
|
@ -420,16 +409,15 @@
|
||||||
formControlName="motherOccupation" id="txtreligion">
|
formControlName="motherOccupation" id="txtreligion">
|
||||||
</kendo-dropdownlist>
|
</kendo-dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4" ></div>
|
<div class="p-col-12 p-md-12 p-lg-4"></div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4" style="margin-top: 11px;" >
|
<div class="p-col-12 p-md-12 p-lg-4" style="margin-top: 11px;">
|
||||||
<button class="k-button k-primary" kendoButton icon="add"
|
<button class="k-button k-primary" kendoButton icon="add" (click)="AddAccessCard()"
|
||||||
(click)="AddAccessCard()" [disabled]="!active">
|
[disabled]="!active">
|
||||||
Add Access Card
|
Add Access Card
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-4" style="margin-top: 11px;" align="right">
|
<div class="p-col-12 p-md-12 p-lg-4" style="margin-top: 11px;" align="right">
|
||||||
<button class="k-button k-primary" kendoButton icon="save"
|
<button class="k-button k-primary" kendoButton icon="save" (click)="SavePersonalInfo()">
|
||||||
(click)="SavePersonalInfo()">
|
|
||||||
<!-- (click)="SavePersonalInfo()"> -->
|
<!-- (click)="SavePersonalInfo()"> -->
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
|
@ -523,8 +511,8 @@
|
||||||
</p-tabView>
|
</p-tabView>
|
||||||
|
|
||||||
|
|
||||||
<kendo-dialog class="blur-background" *ngIf="nidPopUp||tinPopUp||dlnoPopUp||passnoPopUp||signaturePopUp" (close)="close()"
|
<kendo-dialog class="blur-background" *ngIf="nidPopUp||tinPopUp||dlnoPopUp||passnoPopUp||signaturePopUp"
|
||||||
[width]="450">
|
(close)="close()" [width]="450">
|
||||||
<app-loading-panel></app-loading-panel>
|
<app-loading-panel></app-loading-panel>
|
||||||
<kendo-dialog-titlebar>
|
<kendo-dialog-titlebar>
|
||||||
<div style="font-size: 18px; line-height: 1.3em;"><span class=""></span>Attcahment</div>
|
<div style="font-size: 18px; line-height: 1.3em;"><span class=""></span>Attcahment</div>
|
||||||
|
@ -575,23 +563,23 @@
|
||||||
<label for="txtSpouseNameBangla">Spouse Name</label>
|
<label for="txtSpouseNameBangla">Spouse Name</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||||
<input class="bangla-font" formControlName="spouseNameBangla"
|
<input class="bangla-font" formControlName="spouseNameBangla" [(ngModel)]="hrEmployee.spouseNameBangla"
|
||||||
[(ngModel)]="hrEmployee.spouseNameBangla" pInputText style="width:100%" type="text">
|
pInputText style="width:100%" type="text">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||||
<label for="txtFatherNameBangla">Father's Name</label>
|
<label for="txtFatherNameBangla">Father's Name</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||||
<input class="bangla-font" formControlName="fatherNameBangla"
|
<input class="bangla-font" formControlName="fatherNameBangla" [(ngModel)]="hrEmployee.fatherNameBangla"
|
||||||
[(ngModel)]="hrEmployee.fatherNameBangla" pInputText style="width:100%" type="text">
|
pInputText style="width:100%" type="text">
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||||
<label for="txtMotherNameBangla">Mother's Name</label>
|
<label for="txtMotherNameBangla">Mother's Name</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||||
<input formControlName="motherNameBangla" [(ngModel)]="hrEmployee.motherNameBangla"
|
<input formControlName="motherNameBangla" [(ngModel)]="hrEmployee.motherNameBangla" class="bangla-font"
|
||||||
class="bangla-font" pInputText style="width:100%" type="text">
|
pInputText style="width:100%" type="text">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
|
<!-- <div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
|
||||||
|
@ -656,8 +644,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
|
<div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
|
||||||
<button class="k-button k-primary" kendoButton icon="save"
|
<button class="k-button k-primary" kendoButton icon="save" (click)="saveBanglaInfo()">
|
||||||
(click)="saveBanglaInfo()">
|
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -668,5 +655,5 @@
|
||||||
<kendo-dialog-titlebar>
|
<kendo-dialog-titlebar>
|
||||||
Access Card
|
Access Card
|
||||||
</kendo-dialog-titlebar>
|
</kendo-dialog-titlebar>
|
||||||
<app-access-card-management [SetEmployee]="pickerEmployee" ></app-access-card-management>
|
<app-access-card-management [SetEmployee]="pickerEmployee"></app-access-card-management>
|
||||||
</kendo-dialog>
|
</kendo-dialog>
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } 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';
|
||||||
|
@ -83,6 +83,8 @@ export class GeneralComponent implements OnInit {
|
||||||
@ViewChild('uploadNID') uploadNID: UploadComponent;
|
@ViewChild('uploadNID') uploadNID: UploadComponent;
|
||||||
@ViewChild('uploadPassPort') uploadPassPort: UploadComponent;
|
@ViewChild('uploadPassPort') uploadPassPort: UploadComponent;
|
||||||
@ViewChild('uploadTIN') uploadTIN: UploadComponent;
|
@ViewChild('uploadTIN') uploadTIN: UploadComponent;
|
||||||
|
// @ViewChild('uploadPhoto') uploadPhoto: UploadComponent;
|
||||||
|
@ViewChild('uploadPhoto', { read: ElementRef }) uploadPhotoRef!: ElementRef;
|
||||||
|
|
||||||
active: boolean = false;
|
active: boolean = false;
|
||||||
|
|
||||||
|
@ -99,6 +101,7 @@ export class GeneralComponent implements OnInit {
|
||||||
selectedDlFiles: File[] = [];
|
selectedDlFiles: File[] = [];
|
||||||
selectedPassportFiles: File[] = [];
|
selectedPassportFiles: File[] = [];
|
||||||
selectedSignature: File[] = [];
|
selectedSignature: File[] = [];
|
||||||
|
selectedFiles: File[] = [];
|
||||||
departmentPicker: DynamicPicker;
|
departmentPicker: DynamicPicker;
|
||||||
gradePicker: DynamicPicker;
|
gradePicker: DynamicPicker;
|
||||||
religionPicker: DynamicPicker;
|
religionPicker: DynamicPicker;
|
||||||
|
@ -127,7 +130,7 @@ export class GeneralComponent implements OnInit {
|
||||||
employeeTypes: Category[];
|
employeeTypes: Category[];
|
||||||
religions: Religion[];
|
religions: Religion[];
|
||||||
public userRoleselectableSettings: SelectableSettings;
|
public userRoleselectableSettings: SelectableSettings;
|
||||||
selectedFiles?: FileList;
|
// selectedFiles?: FileList;
|
||||||
currentFile?: File;
|
currentFile?: File;
|
||||||
employeePhoto: any;
|
employeePhoto: any;
|
||||||
empSigneture: any;
|
empSigneture: any;
|
||||||
|
@ -431,7 +434,7 @@ export class GeneralComponent implements OnInit {
|
||||||
|
|
||||||
this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp}`);
|
this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp}`);
|
||||||
} else {
|
} else {
|
||||||
this.employeePhoto = this.defaultPhoto;
|
// this.employeePhoto = this.defaultPhoto;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -543,6 +546,25 @@ export class GeneralComponent implements OnInit {
|
||||||
this.notificationService.showSuccess("Signature Uploaded Successfully!")
|
this.notificationService.showSuccess("Signature Uploaded Successfully!")
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (this.selectedFiles !== null && this.selectedFiles !== undefined && this.selectedFiles.length > 0) {
|
||||||
|
const file: File | null = this.selectedFiles[0];
|
||||||
|
this.currentFile = file;
|
||||||
|
debugger;
|
||||||
|
this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||||
|
(resp: any) => {
|
||||||
|
console.log('image data');
|
||||||
|
// console.log(resp.body);
|
||||||
|
//this.employeePhoto = resp;
|
||||||
|
this.employeePhoto = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||||
|
},
|
||||||
|
(err: any) => {
|
||||||
|
this.notificationService.showError(err.error);
|
||||||
|
this.currentFile = undefined;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
this.selectedFiles = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -750,53 +772,53 @@ export class GeneralComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectFile(event: any): void {
|
// selectFile(event: any): void {
|
||||||
if (this.hrEmployee.id == 0) {
|
// if (this.hrEmployee.id == 0) {
|
||||||
this.notificationService.showWarning('select an employee to change the profile picture');
|
// this.notificationService.showWarning('select an employee to change the profile picture');
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (confirm('Are you sure change the profile picture? selected picture will be store in database as well as will be used as profile picture.') == false) {
|
// if (confirm('Are you sure change the profile picture? selected picture will be store in database as well as will be used as profile picture.') == false) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
debugger;
|
// debugger;
|
||||||
this.selectedFiles = event.target.files;
|
// this.selectedFiles = event.target.files;
|
||||||
|
|
||||||
if (this.selectedFiles.length > 0) {
|
// if (this.selectedFiles.length > 0) {
|
||||||
const file: File | null = this.selectedFiles.item(0);
|
// const file: File | null = this.selectedFiles.item(0);
|
||||||
this.currentFile = file;
|
// this.currentFile = file;
|
||||||
debugger;
|
// debugger;
|
||||||
this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
// this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||||
(resp: any) => {
|
// (resp: any) => {
|
||||||
console.log('image data');
|
// console.log('image data');
|
||||||
// console.log(resp.body);
|
// // console.log(resp.body);
|
||||||
//this.employeePhoto = resp;
|
// //this.employeePhoto = resp;
|
||||||
this.employeePhoto = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
// this.employeePhoto = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||||
},
|
// },
|
||||||
(err: any) => {
|
// (err: any) => {
|
||||||
this.notificationService.showError(err.error);
|
// this.notificationService.showError(err.error);
|
||||||
this.currentFile = undefined;
|
// this.currentFile = undefined;
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
this.selectedFiles = undefined;
|
// this.selectedFiles = undefined;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
upload(): void {
|
// upload(): void {
|
||||||
if (this.selectedFiles.length > 0) {
|
// if (this.selectedFiles.length > 0) {
|
||||||
const file: File | null = this.selectedFiles.item(0);
|
// const file: File | null = this.selectedFiles.item(0);
|
||||||
this.currentFile = file;
|
// this.currentFile = file;
|
||||||
this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
// this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||||
(event: any) => {
|
// (event: any) => {
|
||||||
},
|
// },
|
||||||
(err: any) => {
|
// (err: any) => {
|
||||||
this.notificationService.showError(err.error);
|
// this.notificationService.showError(err.error);
|
||||||
this.currentFile = undefined;
|
// this.currentFile = undefined;
|
||||||
});
|
// });
|
||||||
this.selectedFiles = undefined;
|
// this.selectedFiles = undefined;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
RolePermission() {
|
RolePermission() {
|
||||||
console.log('Role Permission');
|
console.log('Role Permission');
|
||||||
|
@ -1050,39 +1072,22 @@ export class GeneralComponent implements OnInit {
|
||||||
// const file = this.selectedPassportFiles[0];
|
// const file = this.selectedPassportFiles[0];
|
||||||
}
|
}
|
||||||
selectSignature(event: { files: FileInfo[] }): void {
|
selectSignature(event: { files: FileInfo[] }): void {
|
||||||
// if (this.hrEmployee.id == 0) {
|
|
||||||
// this.notificationService.showWarning('select an employee to change the profile picture');
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (confirm('Are you sure change the signature picture? selected picture will be store in database as well as will be used as signature picture.') == false) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.selectedSignature = event.files
|
this.selectedSignature = event.files
|
||||||
.map(f => f.rawFile)
|
.map(f => f.rawFile)
|
||||||
.filter((f): f is File => f instanceof File);;
|
.filter((f): f is File => f instanceof File);
|
||||||
|
}
|
||||||
// if (this.selectedSignature.length > 0) {
|
selectProfilePhoto(event: { files: FileInfo[] }): void {
|
||||||
// const file: File | null = this.selectedSignature[0];
|
debugger
|
||||||
// this.currentFile = file;
|
this.selectedFiles = event.files
|
||||||
// this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.signature).subscribe(
|
.map(f => f.rawFile)
|
||||||
// (resp: any) => {
|
.filter((f): f is File => f instanceof File);;
|
||||||
// this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
}
|
||||||
// // console.log(resp.body);
|
triggerUploadClick(): void {
|
||||||
// //this.Sigfiles = resp;// this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
const input = this.uploadPhotoRef.nativeElement.querySelector('input[type="file"]');
|
||||||
// },
|
if (input) {
|
||||||
// (err: any) => {
|
input.click();
|
||||||
// this.notificationService.showError(err.error);
|
}
|
||||||
// this.currentFile = undefined;
|
|
||||||
// }, () => {
|
|
||||||
// this.signaturePopUp = false;
|
|
||||||
// this.notificationService.showSuccess("Signature Uploaded Successfully!")
|
|
||||||
// });
|
|
||||||
// this.selectedFiles = undefined;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
changePassword() {
|
changePassword() {
|
||||||
|
|
||||||
if (this.userPassword == '') {
|
if (this.userPassword == '') {
|
||||||
|
|
|
@ -331,7 +331,6 @@ export class LifeCycleEntryComponent implements OnInit {
|
||||||
var emp: Employee = new Employee();
|
var emp: Employee = new Employee();
|
||||||
str = emp.getStatusString(this._employee.status);
|
str = emp.getStatusString(this._employee.status);
|
||||||
}
|
}
|
||||||
debugger
|
|
||||||
this._statusString = str;
|
this._statusString = str;
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user