long profile emp photo
This commit is contained in:
parent
19fd4dc92a
commit
ae98d60cd9
|
@ -14,7 +14,7 @@ export class ApiService {
|
|||
public isSSO = false;
|
||||
public versionDeployement = false;
|
||||
// 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 base_url = '';
|
||||
// public currentLink = '';
|
||||
|
|
|
@ -200,6 +200,7 @@ export class EmployeeProfileComponent implements OnInit {
|
|||
|
||||
|
||||
checkValue(value: any) {
|
||||
debugger
|
||||
if (value === true) {
|
||||
|
||||
this.hrEmployeeProfile = new HrEmployee();
|
||||
|
@ -221,6 +222,7 @@ export class EmployeeProfileComponent implements OnInit {
|
|||
}
|
||||
else {
|
||||
this.employeeService.hrEmployee.employeeNo = undefined;
|
||||
this.employeeService.Employee_Get_Completed.next(new HrEmployee());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,26 +10,38 @@
|
|||
<div class="p-col-12">
|
||||
<div style="position: relative; display: inline-block;">
|
||||
<img id="imgProfilePicture" [src]="employeePhoto"
|
||||
style="height: 180px; width: 180px; border-radius: 50%; border: 1px solid #52527A;" />
|
||||
<button class="editImage" (click)="fileInput.click()"
|
||||
style="height: 180px; width: 180px; border-radius: 50%; border: 1px solid #52527A;" />
|
||||
<!-- <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;">
|
||||
<span class="editIcon">✎</span>
|
||||
</button>
|
||||
</div>
|
||||
<div style="position: relative; display: inline-block;">
|
||||
<img id="imgEmpSigneture" [src]="empSigneture"
|
||||
style="height: 60px; width: 180px; border-radius: 10px; border: 1px solid #52527A;" />
|
||||
|
||||
style="height: 60px; width: 180px; border-radius: 10px; border: 1px solid #52527A;" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-12" align="center">
|
||||
<input formControlName="empPhoto" id="fupEmpPhoto" #fileInput
|
||||
(change)="selectFile($event)" type="file" style="display: none;">
|
||||
<!-- <input formControlName="empPhoto" id="fupEmpPhoto" #fileInput
|
||||
(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 class="p-col-12 p-md-12 p-lg-12" style="height: 76px;">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -179,8 +191,7 @@
|
|||
</div>
|
||||
<div class="p-col-12 p-lg-12" align="right" style="margin-top: 20px;">
|
||||
|
||||
<button class="k-button k-primary" kendoButton icon="save"
|
||||
(click)="SavePersonalInfo()">
|
||||
<button class="k-button k-primary" kendoButton icon="save" (click)="SavePersonalInfo()">
|
||||
<!-- (click)="SavePersonalInfo()"> -->
|
||||
Save
|
||||
</button>
|
||||
|
@ -209,16 +220,12 @@
|
|||
<input [(ngModel)]="hrEmployee.drivingLicenceNo" formControlName="drivingLicenseNo"
|
||||
id="txtDrivingLicenseNo" pInputText style="width: 100%" type="text"
|
||||
[readonly]="!active">
|
||||
<!-- style="width: 84%" -->
|
||||
<!-- style="width: 84%" -->
|
||||
<!-- <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"
|
||||
(click)="popUpAttachment('DLN')"></button> -->
|
||||
<kendo-upload #uploadDL
|
||||
[autoUpload]="false"
|
||||
[multiple]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="selectFileDrivingLicense($event)"
|
||||
<kendo-upload #uploadDL [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'" (select)="selectFileDrivingLicense($event)"
|
||||
style="width: 100%;">
|
||||
</kendo-upload>
|
||||
</div>
|
||||
|
@ -248,18 +255,14 @@
|
|||
<label for="empSignaturePhotoId">Signature</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-8">
|
||||
<input id="empSignaturePhotoId" pInputText style="width:100%" type="text" [readonly]="true">
|
||||
<!-- style="width: 84%" -->
|
||||
<!-- <button class="k-button k-primary" kendoButton icon="k-i-attachment-45 k-i-clip-45"
|
||||
<input id="empSignaturePhotoId" pInputText style="width:100%" type="text"
|
||||
[readonly]="true">
|
||||
<!-- style="width: 84%" -->
|
||||
<!-- <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"
|
||||
(click)="popUpAttachment('Signature')"></button> -->
|
||||
<kendo-upload #uploadSig
|
||||
[autoUpload]="false"
|
||||
[multiple]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="selectSignature($event)"
|
||||
style="width: 100%;">
|
||||
<kendo-upload #uploadSig [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'" (select)="selectSignature($event)" style="width: 100%;">
|
||||
</kendo-upload>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -274,10 +277,10 @@
|
|||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-8">
|
||||
<input [(ngModel)]="hrEmployee.nationalID" formControlName="nationalId"
|
||||
id="txtNationalId" pInputText type="text" style="width:100%">
|
||||
<!-- style="width:84%" -->
|
||||
id="txtNationalId" pInputText type="text" style="width:100%">
|
||||
<!-- style="width:84%" -->
|
||||
|
||||
<!-- [readonly]="!active" -->
|
||||
<!-- [readonly]="!active" -->
|
||||
<!-- <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;"
|
||||
(click)="popUpAttachment('NID')" [disabled]="!active"></button> -->
|
||||
|
@ -285,23 +288,18 @@
|
|||
|
||||
<!-- <input [(ngModel)]="NIDFiles" (change)="selectFileNationalId($event)" type="file" pInputText
|
||||
style="width: 100%;padding: 5px;margin:5px 0;"> -->
|
||||
<!-- <kendo-upload [saveUrl]="uploadSaveUrl" [removeUrl]="uploadRemoveUrl">
|
||||
<!-- <kendo-upload [saveUrl]="uploadSaveUrl" [removeUrl]="uploadRemoveUrl">
|
||||
</kendo-upload> -->
|
||||
|
||||
|
||||
<!-- <kendo-upload
|
||||
<!-- <kendo-upload
|
||||
[autoUpload]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="onFileSelect($event)">
|
||||
</kendo-upload> -->
|
||||
<kendo-upload #uploadNID
|
||||
[autoUpload]="false"
|
||||
[multiple]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="selectFileNationalId($event)"
|
||||
style="width: 100%;">
|
||||
<kendo-upload #uploadNID [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'" (select)="selectFileNationalId($event)" style="width: 100%;">
|
||||
</kendo-upload>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-4">
|
||||
|
@ -310,18 +308,13 @@
|
|||
<div class="p-col-12 p-md-12 p-lg-8">
|
||||
<input [(ngModel)]="hrEmployee.passportNo" formControlName="passportNo"
|
||||
id="txtPassportNo" pInputText style="width:100%;" type="text" [readonly]="!active">
|
||||
<!-- style="width:84%;" -->
|
||||
<!-- style="width:84%;" -->
|
||||
<!-- <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"
|
||||
(click)="popUpAttachment('PNo')"></button> -->
|
||||
<kendo-upload #uploadPassPort
|
||||
[autoUpload]="false"
|
||||
[multiple]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="selectPassport($event)"
|
||||
style="width: 100%;">
|
||||
</kendo-upload>
|
||||
<kendo-upload #uploadPassPort [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'" (select)="selectPassport($event)" style="width: 100%;">
|
||||
</kendo-upload>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-4">
|
||||
<label for="txtSpouseNameBangla">Spouse Name Bangla</label>
|
||||
|
@ -349,7 +342,8 @@
|
|||
<label for="">Bangla Information</label>
|
||||
</div>
|
||||
<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
|
||||
</button>
|
||||
</div>
|
||||
|
@ -365,21 +359,16 @@
|
|||
<label for="txtTin">Tin</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-8">
|
||||
<input [(ngModel)]="hrEmployee.tinNo" formControlName="tin" id="txtTin" pInputText
|
||||
<input [(ngModel)]="hrEmployee.tinNo" formControlName="tin" id="txtTin" pInputText
|
||||
type="text" [readonly]="!active" style="width:100%">
|
||||
<!-- style="width:84%" -->
|
||||
<!-- style="width:84%" -->
|
||||
<!-- <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"
|
||||
(click)="popUpAttachment('TIN')"></button> -->
|
||||
|
||||
<kendo-upload #uploadTIN
|
||||
[autoUpload]="false"
|
||||
[multiple]="false"
|
||||
[saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'"
|
||||
(select)="selectFileTin($event)"
|
||||
style="width: 100%;">
|
||||
</kendo-upload>
|
||||
|
||||
<kendo-upload #uploadTIN [autoUpload]="false" [multiple]="false" [saveUrl]="'noop'"
|
||||
[removeUrl]="'noop'" (select)="selectFileTin($event)" style="width: 100%;">
|
||||
</kendo-upload>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-4">
|
||||
<label for="dtpPassportIssueDate">Passport Issue Date</label>
|
||||
|
@ -420,16 +409,15 @@
|
|||
formControlName="motherOccupation" id="txtreligion">
|
||||
</kendo-dropdownlist>
|
||||
</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;" >
|
||||
<button class="k-button k-primary" kendoButton icon="add"
|
||||
(click)="AddAccessCard()" [disabled]="!active">
|
||||
Add Access Card
|
||||
</button>
|
||||
<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;">
|
||||
<button class="k-button k-primary" kendoButton icon="add" (click)="AddAccessCard()"
|
||||
[disabled]="!active">
|
||||
Add Access Card
|
||||
</button>
|
||||
</div>
|
||||
<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"
|
||||
(click)="SavePersonalInfo()">
|
||||
<button class="k-button k-primary" kendoButton icon="save" (click)="SavePersonalInfo()">
|
||||
<!-- (click)="SavePersonalInfo()"> -->
|
||||
Save
|
||||
</button>
|
||||
|
@ -523,8 +511,8 @@
|
|||
</p-tabView>
|
||||
|
||||
|
||||
<kendo-dialog class="blur-background" *ngIf="nidPopUp||tinPopUp||dlnoPopUp||passnoPopUp||signaturePopUp" (close)="close()"
|
||||
[width]="450">
|
||||
<kendo-dialog class="blur-background" *ngIf="nidPopUp||tinPopUp||dlnoPopUp||passnoPopUp||signaturePopUp"
|
||||
(close)="close()" [width]="450">
|
||||
<app-loading-panel></app-loading-panel>
|
||||
<kendo-dialog-titlebar>
|
||||
<div style="font-size: 18px; line-height: 1.3em;"><span class=""></span>Attcahment</div>
|
||||
|
@ -567,7 +555,7 @@
|
|||
<label for="txtLastName">Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<input [(ngModel)]="hrEmployee.banglaName" id="txtBanglaName" class="bangla-font"
|
||||
<input [(ngModel)]="hrEmployee.banglaName" id="txtBanglaName" class="bangla-font"
|
||||
formControlName="banglaName" pInputText style="width:100%" type="text">
|
||||
</div>
|
||||
|
||||
|
@ -575,23 +563,23 @@
|
|||
<label for="txtSpouseNameBangla">Spouse Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<input class="bangla-font" formControlName="spouseNameBangla"
|
||||
[(ngModel)]="hrEmployee.spouseNameBangla" pInputText style="width:100%" type="text">
|
||||
<input class="bangla-font" formControlName="spouseNameBangla" [(ngModel)]="hrEmployee.spouseNameBangla"
|
||||
pInputText style="width:100%" type="text">
|
||||
</div>
|
||||
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<label for="txtFatherNameBangla">Father's Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<input class="bangla-font" formControlName="fatherNameBangla"
|
||||
[(ngModel)]="hrEmployee.fatherNameBangla" pInputText style="width:100%" type="text">
|
||||
<input class="bangla-font" formControlName="fatherNameBangla" [(ngModel)]="hrEmployee.fatherNameBangla"
|
||||
pInputText style="width:100%" type="text">
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<label for="txtMotherNameBangla">Mother's Name</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-3" style="margin: auto;">
|
||||
<input formControlName="motherNameBangla" [(ngModel)]="hrEmployee.motherNameBangla"
|
||||
class="bangla-font" pInputText style="width:100%" type="text">
|
||||
<input formControlName="motherNameBangla" [(ngModel)]="hrEmployee.motherNameBangla" class="bangla-font"
|
||||
pInputText style="width:100%" type="text">
|
||||
</div>
|
||||
|
||||
<!-- <div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
|
||||
|
@ -615,7 +603,7 @@
|
|||
<label for="txtPermanentAddress"> Permanent Address </label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-6" style="margin: auto;">
|
||||
<input id="txtPermanentAddressBangla" formControlName="permanentAddressInBangla"
|
||||
<input id="txtPermanentAddressBangla" formControlName="permanentAddressInBangla"
|
||||
class="bangla-font" [(ngModel)]="contact.permanentAddressInBangla" type="text" pInputText
|
||||
style="width:100%">
|
||||
</div>
|
||||
|
@ -624,7 +612,7 @@
|
|||
<label for="txtParmanentPOInBangla">Post Office Name </label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-6" style="margin: auto;">
|
||||
<input class="bangla-font" id="txtParmanentPOInBangla" formControlName="parmanentPOInBangla"
|
||||
<input class="bangla-font" id="txtParmanentPOInBangla" formControlName="parmanentPOInBangla"
|
||||
[(ngModel)]="contact.parmanentPOInBangla" type="text" pInputText style="width:100%">
|
||||
</div>
|
||||
</div>
|
||||
|
@ -640,7 +628,7 @@
|
|||
<label for="txtPresentAddress"> Present Address</label>
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-6" style="margin: auto;">
|
||||
<input id="txtPresentAddressBangla" formControlName="presentAddressInBangla" class="bangla-font"
|
||||
<input id="txtPresentAddressBangla" formControlName="presentAddressInBangla" class="bangla-font"
|
||||
[(ngModel)]="contact.presentAddressInBangla" type="text" pInputText style="width:100%">
|
||||
</div>
|
||||
|
||||
|
@ -648,7 +636,7 @@
|
|||
<label for="txtPresentPOInBangla">Post Office Name</label>
|
||||
|
||||
</div>
|
||||
<div class="p-col-12 p-md-6 p-lg-6" style="margin: auto;">
|
||||
<div class="p-col-12 p-md-6 p-lg-6" style="margin: auto;">
|
||||
<input class="bangla-font" id="txtPresentPOInBangla" formControlName="presentPOInBangla"
|
||||
[(ngModel)]="contact.presentPOInBangla" type="text" pInputText style="width:100%">
|
||||
</div>
|
||||
|
@ -656,10 +644,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<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"
|
||||
(click)="saveBanglaInfo()">
|
||||
Save
|
||||
</button>
|
||||
<button class="k-button k-primary" kendoButton icon="save" (click)="saveBanglaInfo()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</kendo-dialog>
|
||||
|
@ -668,5 +655,5 @@
|
|||
<kendo-dialog-titlebar>
|
||||
Access Card
|
||||
</kendo-dialog-titlebar>
|
||||
<app-access-card-management [SetEmployee]="pickerEmployee" ></app-access-card-management>
|
||||
</kendo-dialog>
|
||||
<app-access-card-management [SetEmployee]="pickerEmployee"></app-access-card-management>
|
||||
</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 { DataTransferService } from '../../../data.transfer.service';
|
||||
import { EmployeeServices } from '../../../_services/employee/employee.service';
|
||||
|
@ -83,6 +83,8 @@ export class GeneralComponent implements OnInit {
|
|||
@ViewChild('uploadNID') uploadNID: UploadComponent;
|
||||
@ViewChild('uploadPassPort') uploadPassPort: UploadComponent;
|
||||
@ViewChild('uploadTIN') uploadTIN: UploadComponent;
|
||||
// @ViewChild('uploadPhoto') uploadPhoto: UploadComponent;
|
||||
@ViewChild('uploadPhoto', { read: ElementRef }) uploadPhotoRef!: ElementRef;
|
||||
|
||||
active: boolean = false;
|
||||
|
||||
|
@ -99,6 +101,7 @@ export class GeneralComponent implements OnInit {
|
|||
selectedDlFiles: File[] = [];
|
||||
selectedPassportFiles: File[] = [];
|
||||
selectedSignature: File[] = [];
|
||||
selectedFiles: File[] = [];
|
||||
departmentPicker: DynamicPicker;
|
||||
gradePicker: DynamicPicker;
|
||||
religionPicker: DynamicPicker;
|
||||
|
@ -127,7 +130,7 @@ export class GeneralComponent implements OnInit {
|
|||
employeeTypes: Category[];
|
||||
religions: Religion[];
|
||||
public userRoleselectableSettings: SelectableSettings;
|
||||
selectedFiles?: FileList;
|
||||
// selectedFiles?: FileList;
|
||||
currentFile?: File;
|
||||
employeePhoto: any;
|
||||
empSigneture: any;
|
||||
|
@ -431,7 +434,7 @@ export class GeneralComponent implements OnInit {
|
|||
|
||||
this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp}`);
|
||||
} else {
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
// this.employeePhoto = this.defaultPhoto;
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -543,6 +546,25 @@ export class GeneralComponent implements OnInit {
|
|||
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 {
|
||||
if (this.hrEmployee.id == 0) {
|
||||
this.notificationService.showWarning('select an employee to change the profile picture');
|
||||
return;
|
||||
}
|
||||
// selectFile(event: any): 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 profile picture? selected picture will be store in database as well as will be used as profile picture.') == false) {
|
||||
return;
|
||||
}
|
||||
debugger;
|
||||
this.selectedFiles = event.target.files;
|
||||
// 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;
|
||||
// }
|
||||
// debugger;
|
||||
// this.selectedFiles = event.target.files;
|
||||
|
||||
if (this.selectedFiles.length > 0) {
|
||||
const file: File | null = this.selectedFiles.item(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;
|
||||
});
|
||||
// if (this.selectedFiles.length > 0) {
|
||||
// const file: File | null = this.selectedFiles.item(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;
|
||||
}
|
||||
}
|
||||
// this.selectedFiles = undefined;
|
||||
// }
|
||||
// }
|
||||
|
||||
upload(): void {
|
||||
if (this.selectedFiles.length > 0) {
|
||||
const file: File | null = this.selectedFiles.item(0);
|
||||
this.currentFile = file;
|
||||
this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||
(event: any) => {
|
||||
},
|
||||
(err: any) => {
|
||||
this.notificationService.showError(err.error);
|
||||
this.currentFile = undefined;
|
||||
});
|
||||
this.selectedFiles = undefined;
|
||||
}
|
||||
}
|
||||
// upload(): void {
|
||||
// if (this.selectedFiles.length > 0) {
|
||||
// const file: File | null = this.selectedFiles.item(0);
|
||||
// this.currentFile = file;
|
||||
// this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||
// (event: any) => {
|
||||
// },
|
||||
// (err: any) => {
|
||||
// this.notificationService.showError(err.error);
|
||||
// this.currentFile = undefined;
|
||||
// });
|
||||
// this.selectedFiles = undefined;
|
||||
// }
|
||||
// }
|
||||
|
||||
RolePermission() {
|
||||
console.log('Role Permission');
|
||||
|
@ -1050,39 +1072,22 @@ export class GeneralComponent implements OnInit {
|
|||
// const file = this.selectedPassportFiles[0];
|
||||
}
|
||||
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
|
||||
.map(f => f.rawFile)
|
||||
.filter((f): f is File => f instanceof File);;
|
||||
|
||||
// if (this.selectedSignature.length > 0) {
|
||||
// const file: File | null = this.selectedSignature[0];
|
||||
// this.currentFile = file;
|
||||
// this.employeeService.uploadEmpFile(this.currentFile, this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.signature).subscribe(
|
||||
// (resp: any) => {
|
||||
// this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||
// // console.log(resp.body);
|
||||
// //this.Sigfiles = resp;// this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||
// },
|
||||
// (err: any) => {
|
||||
// this.notificationService.showError(err.error);
|
||||
// this.currentFile = undefined;
|
||||
// }, () => {
|
||||
// this.signaturePopUp = false;
|
||||
// this.notificationService.showSuccess("Signature Uploaded Successfully!")
|
||||
// });
|
||||
// this.selectedFiles = undefined;
|
||||
// }
|
||||
.filter((f): f is File => f instanceof File);
|
||||
}
|
||||
selectProfilePhoto(event: { files: FileInfo[] }): void {
|
||||
debugger
|
||||
this.selectedFiles = event.files
|
||||
.map(f => f.rawFile)
|
||||
.filter((f): f is File => f instanceof File);;
|
||||
}
|
||||
triggerUploadClick(): void {
|
||||
const input = this.uploadPhotoRef.nativeElement.querySelector('input[type="file"]');
|
||||
if (input) {
|
||||
input.click();
|
||||
}
|
||||
}
|
||||
|
||||
changePassword() {
|
||||
|
||||
if (this.userPassword == '') {
|
||||
|
|
|
@ -331,7 +331,6 @@ export class LifeCycleEntryComponent implements OnInit {
|
|||
var emp: Employee = new Employee();
|
||||
str = emp.getStatusString(this._employee.status);
|
||||
}
|
||||
debugger
|
||||
this._statusString = str;
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user