Merge branch 'devqc' into dev_mashfiq
|
@ -1242,6 +1242,7 @@ namespace HRM.Report
|
|||
string shortAttnType = "";
|
||||
if (!(dAttnProcessess == null || dAttnProcessess.Count <= 0))
|
||||
{
|
||||
dAttnProcessess= dAttnProcessess.OrderBy(x => x.AttnDate).ToList();
|
||||
foreach (DailyAttnProcess dAttnProcess in dAttnProcessess)
|
||||
{
|
||||
sLeaveName = string.Empty;
|
||||
|
@ -1413,10 +1414,10 @@ namespace HRM.Report
|
|||
dTable.Rows.Add(Rowbody);
|
||||
}
|
||||
}
|
||||
DataView dv = dTable.DefaultView;
|
||||
dv.Sort = "Date ASC";
|
||||
DataTable sortedDT = dv.ToTable();
|
||||
return sortedDT;
|
||||
//DataView dv = dTable.DefaultView;
|
||||
//dv.Sort = "Date ASC";
|
||||
//DataTable sortedDT = dv.ToTable();
|
||||
return dTable;
|
||||
}
|
||||
|
||||
public DataTable GetEmpDailyAttn(int EmpID, DateTime dFromDate, DateTime dToDate, int PayrollTypeID)
|
||||
|
|
BIN
HRM.UI/ClientApp/src/Documents/EMPPHOTO/Image-3.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
HRM.UI/ClientApp/src/Documents/EMPPHOTO/Signature-3.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
|
@ -367,6 +367,12 @@ export class EmployeeServices {
|
|||
|
||||
return this.apiService.httpGet<any>('/Employee/GetuploadEmpFile' + '/' + empid + '/' + referenceid + '/' + filetype);
|
||||
}
|
||||
GetEmpImageSignFile(empid: number, referenceid: number, filetype: number):
|
||||
Observable<HttpEvent<any>> {
|
||||
|
||||
return this.apiService.httpGet<any>('/Employee/GetEmpImageSignFile' + '/' + empid + '/' + referenceid + '/' + filetype);
|
||||
}
|
||||
|
||||
GetCompanyImage(): Observable<HttpEvent<any>>{
|
||||
return this.apiService.httpGet<any>('/Employee/GetCompanyImage');
|
||||
}
|
||||
|
|
|
@ -10,19 +10,27 @@
|
|||
<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;" />
|
||||
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;">
|
||||
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;" />
|
||||
|
||||
</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;">
|
||||
</div>
|
||||
<div class="p-col-12 p-md-12 p-lg-12" style="height: 76px;"></div>
|
||||
<div class="p-col-12 p-md-12 p-lg-12" style="height: 76px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -601,4 +609,4 @@
|
|||
Access Card
|
||||
</kendo-dialog-titlebar>
|
||||
<app-access-card-management [SetEmployee]="pickerEmployee" ></app-access-card-management>
|
||||
</kendo-dialog>
|
||||
</kendo-dialog>
|
||||
|
|
|
@ -104,6 +104,7 @@ export class GeneralComponent implements OnInit {
|
|||
selectedFiles?: FileList;
|
||||
currentFile?: File;
|
||||
employeePhoto: any;
|
||||
empSigneture: any;
|
||||
occupations: Occupation[];
|
||||
newUser: boolean = false;
|
||||
userid: number;
|
||||
|
@ -116,6 +117,7 @@ export class GeneralComponent implements OnInit {
|
|||
defaultNationality: Nationality;
|
||||
nameBangla: string = 'asasas';
|
||||
defaultPhoto = "assets/photos/profile-default.jpg";
|
||||
photoPath = "Documents/EMPPHOTO";
|
||||
isDisplay: boolean = false;
|
||||
|
||||
contactForm: FormGroup;
|
||||
|
@ -134,6 +136,7 @@ export class GeneralComponent implements OnInit {
|
|||
ngOnInit() {
|
||||
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
this.empSigneture = "";
|
||||
this.basicService.getAllReligion().subscribe(
|
||||
(resp: any) => {
|
||||
this.religions = resp;
|
||||
|
@ -229,7 +232,7 @@ export class GeneralComponent implements OnInit {
|
|||
maxValue: new FormControl(),
|
||||
insuranceId: new FormControl(''),
|
||||
inclusionDate: new FormControl(),
|
||||
//signature: new FormControl()
|
||||
empSigneture: new FormControl(),
|
||||
dateOfRetirement: new FormControl(),
|
||||
spouseNameBangla: new FormControl(),
|
||||
spouseName: new FormControl(),
|
||||
|
@ -246,6 +249,7 @@ export class GeneralComponent implements OnInit {
|
|||
(resp: any) => {
|
||||
this.hrEmployee = resp;
|
||||
//console.log(this.hrEmployee);
|
||||
debugger;
|
||||
if (this.hrEmployee.id !== undefined && this.hrEmployee.id !== 0) {
|
||||
this.showEmpImage();
|
||||
this.userid = undefined;
|
||||
|
@ -253,6 +257,7 @@ export class GeneralComponent implements OnInit {
|
|||
emp.employeeID = this.employeeService.hrEmployee.id;
|
||||
emp.employeeNo = this.employeeService.hrEmployee.employeeNo;
|
||||
emp.name = this.employeeService.hrEmployee.name;
|
||||
//this.employeePhoto = this.employeeService.hrEmployee.photoPath;
|
||||
this.pickerEmployee = emp;
|
||||
if (this.hrEmployee.lineManagerID > 0) {
|
||||
this.getLineManager();
|
||||
|
@ -262,6 +267,7 @@ export class GeneralComponent implements OnInit {
|
|||
}
|
||||
} else {
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
this.empSigneture = "";
|
||||
// this.employeeService.generateEmployeeNo().subscribe(
|
||||
// (resp) => {
|
||||
// this.hrEmployee.employeeNo = resp as string;
|
||||
|
@ -359,10 +365,15 @@ export class GeneralComponent implements OnInit {
|
|||
}
|
||||
|
||||
public showEmpImage() {
|
||||
debugger;
|
||||
this.loadingPanel.ShowLoadingPanel = true;
|
||||
this.employeeService.GetuploadEmpFile(this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||
this.empSigneture = "";
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
//this.employeePhoto = this.photoPath + "/" + "Image-" + this.hrEmployee.employeeNo + ".jpg";
|
||||
this.employeeService.GetEmpImageSignFile(this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.Profile_Picture).subscribe(
|
||||
(resp: any) => {
|
||||
if (resp) {
|
||||
|
||||
this.employeePhoto = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp}`);
|
||||
} else {
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
|
@ -372,6 +383,26 @@ export class GeneralComponent implements OnInit {
|
|||
(err: any) => {
|
||||
|
||||
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
this.notificationService.showError(err.error);
|
||||
},
|
||||
() => {
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
}
|
||||
);
|
||||
this.employeeService.GetEmpImageSignFile(this.hrEmployee.id, this.hrEmployee.id, enumEmpFileUploadType.signature).subscribe(
|
||||
(resp: any) => {
|
||||
if (resp) {
|
||||
|
||||
this.empSigneture = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp}`);
|
||||
} else {
|
||||
this.employeePhoto = this.defaultPhoto;
|
||||
}
|
||||
|
||||
},
|
||||
(err: any) => {
|
||||
|
||||
|
||||
this.loadingPanel.ShowLoadingPanel = false;
|
||||
this.notificationService.showError(err.error);
|
||||
},
|
||||
|
@ -489,6 +520,7 @@ export class GeneralComponent implements OnInit {
|
|||
|
||||
}
|
||||
saveFile(feferenceID: number, selectedFiles: any, type: enumEmpFileUploadType) {
|
||||
debugger;
|
||||
if (selectedFiles != undefined && selectedFiles.length > 0) {
|
||||
const file: File | null = selectedFiles.item(0);
|
||||
this.currentFile = file;
|
||||
|
@ -587,18 +619,19 @@ export class GeneralComponent implements OnInit {
|
|||
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.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||
//this.employeePhoto = resp;
|
||||
this.employeePhoto = this.sanitizer.bypassSecurityTrustResourceUrl(`data:image/png;base64, ${resp.body}`);
|
||||
},
|
||||
(err: any) => {
|
||||
this.notificationService.showError(err.error);
|
||||
|
@ -835,6 +868,7 @@ export class GeneralComponent implements OnInit {
|
|||
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}`);
|
||||
},
|
||||
|
|
BIN
HRM.UI/ClientApp/src/assets/EMPPHOTO/391_BP0007_1.jpg
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
HRM.UI/ClientApp/src/assets/EMPPHOTO/713_BP1199_1.jpg
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
HRM.UI/ClientApp/src/assets/EMPPHOTO/713_S3898_1.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
HRM.UI/ClientApp/src/assets/EMPPHOTO/Image-3.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
HRM.UI/ClientApp/src/assets/EMPPHOTO/Signature-3.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
|
@ -1566,11 +1566,11 @@ namespace HRM.UI.Controllers
|
|||
//this._hrEmployeeService.uplaodFile(item);
|
||||
base64String = Convert.ToBase64String(textAsBytes);
|
||||
}
|
||||
if (directoryUpload)
|
||||
if (directoryUpload || item.filetype== enumEmpFileUploadType.photo || item.filetype == enumEmpFileUploadType.signature)
|
||||
{
|
||||
PhotoPath photoPath = new PhotoPathService().Get().FirstOrDefault();
|
||||
string employeeNo = (new EmployeeService().Get(item.employeeID)).EmployeeNo;
|
||||
string TargetFolder = photoPath.EmployeePhoto;
|
||||
string TargetFolder = @"Documents\EMPPHOTO\";
|
||||
if (photoPath != null)
|
||||
{
|
||||
string newFileName = "";
|
||||
|
@ -1715,6 +1715,47 @@ namespace HRM.UI.Controllers
|
|||
return StatusCode(StatusCodes.Status500InternalServerError, ex.Message);
|
||||
}
|
||||
}
|
||||
[HttpGet("GetEmpImageSignFile/{empid}/{referenceid}/{filetype}")]
|
||||
public ActionResult GetEmpImageSignFile(int empid, int referenceid, enumEmpFileUploadType filetype)
|
||||
{
|
||||
empFileupload item = new empFileupload();
|
||||
string employeeNo = (new EmployeeService().Get(empid)).EmployeeNo;
|
||||
string TargetFolder = @"Documents\EMPPHOTO\";
|
||||
|
||||
string newFileName = "";
|
||||
switch (filetype)
|
||||
{
|
||||
case enumEmpFileUploadType.photo:
|
||||
newFileName = string.Format("Image-{0}.jpg", employeeNo);
|
||||
break;
|
||||
case enumEmpFileUploadType.signature:
|
||||
newFileName = string.Format("Signature-{0}.jpg", employeeNo);
|
||||
break;
|
||||
//case enumEmpFileUploadType.NomineePicture:
|
||||
// newFileName = string.Format("Image-{0}.jpg", employeeNo);
|
||||
// break;
|
||||
//case enumEmpFileUploadType.NomineeSignature:
|
||||
// newFileName = string.Format("Image-{0}.jpg", employeeNo);
|
||||
// break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
string imagePath = TargetFolder+ newFileName;
|
||||
|
||||
if (System.IO.File.Exists(imagePath))
|
||||
{
|
||||
byte[] textAsBytes = System.IO.File.ReadAllBytes(imagePath);
|
||||
string base64String = "";
|
||||
if (item != null)
|
||||
{
|
||||
base64String = Convert.ToBase64String(textAsBytes);
|
||||
}
|
||||
|
||||
return Ok(base64String);
|
||||
}
|
||||
else return Ok("");
|
||||
}
|
||||
|
||||
[HttpGet("GetuploadEmpFile/{empid}/{referenceid}/{filetype}")]
|
||||
public ActionResult GetuploadEmpFile(int empid, int referenceid, enumEmpFileUploadType filetype)
|
||||
|
|
BIN
HRM.UI/Documents/EMPPHOTO/Image-100.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
HRM.UI/Documents/EMPPHOTO/Image-3.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
HRM.UI/Documents/EMPPHOTO/Signature-100.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
HRM.UI/Documents/EMPPHOTO/Signature-3.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
HRM.UI/EMPPHOTO/Image-3.jpg
Normal file
After Width: | Height: | Size: 161 KiB |
BIN
HRM.UI/EMPPHOTO/Signature-3.jpg
Normal file
After Width: | Height: | Size: 11 KiB |