349 lines
19 KiB
Plaintext
349 lines
19 KiB
Plaintext
@using System.Reflection
|
|
@using CompanyManagment.App.Contracts.EmployeeDocuments
|
|
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
|
@model CompanyManagment.App.Contracts.EmployeeDocuments.EmployeeDocumentsViewModel
|
|
|
|
@{
|
|
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
|
<link href="~/assetsclient/pages/employeesdocument/css/ModalUploadDocument.css?ver=@clientVersion" rel="stylesheet" />
|
|
}
|
|
|
|
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
|
|
|
<div class="modal-content">
|
|
<div class="modal-header pb-0 d-flex align-items-center justify-content-center text-center">
|
|
<button type="button" class="btn-close position-absolute text-start exitModal" aria-label="Close"></button>
|
|
<div>
|
|
<p class="m-0 pdHeaderTitle1">آپلود مدارک @Model.EmployeeFullName</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div class="pdBoxGrid">
|
|
<div class="pdBox">
|
|
<input type="hidden" id="employeeIdForList" value="@Model.EmployeeId" asp-for="@Model.EmployeeId"/>
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
|
|
@if (Model.EmployeePicture.PicturePath != null && !string.IsNullOrWhiteSpace(Model.EmployeePicture.PicturePath))
|
|
{
|
|
<img id="EmployeePicture" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.EmployeePicture.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="EmployeePicture" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.EmployeePicture.Id" asp-for="@Model.EmployeePicture.Id"/>
|
|
<div class="sign ">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>عکس پرسنل @* <span> *</span> *@</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.EmployeePicture.RejectionMessage) ? "رد شد" : "")</div>
|
|
@* <span class="pdTitle2 d-none d-md-block">در صورت آپلود نکردن عکس پرسنلی، عکس از حضور و غیاب تنظیم میشود.</span> *@
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject">@(!string.IsNullOrWhiteSpace(Model.EmployeePicture.RejectionMessage) ? Model.EmployeePicture.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_0" value="EmployeePicture"/>
|
|
<div class="pdButtons">
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="0">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.EmployeePicture.PicturePath) ? Model.EmployeePicture.Status.ToString() : "") @(string.IsNullOrWhiteSpace(Model.EmployeePicture.PicturePath) ? "disable" : "")" data-index="0">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="0" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.NationalCardFront.PicturePath))
|
|
{
|
|
<img id="NationalCardFront" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.NationalCardFront.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="NationalCardFront" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.NationalCardFront?.Id ?? 0" asp-for="@Model.NationalCardFront.Id"/>
|
|
<div class="sign ">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>کارت ملی رو @* <span> *</span> *@</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.NationalCardFront.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.NationalCardFront.RejectionMessage) ? Model.NationalCardFront.RejectionMessage : "")</div>
|
|
</div>
|
|
|
|
</div>
|
|
<input type="hidden" id="label_1" value="NationalCardFront"/>
|
|
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="1">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.NationalCardFront.PicturePath) ? Model.NationalCardFront.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.NationalCardFront?.PicturePath) ? "" : "disable")" data-index="1">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="1" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.NationalCardRear.PicturePath))
|
|
{
|
|
<img id="NationalCardRear" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.NationalCardRear.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="NationalCardRear" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.NationalCardRear.Id" asp-for="@Model.NationalCardRear.Id"/>
|
|
<div class="sign">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>کارت ملی پشت @* <span> *</span> *@</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.NationalCardRear.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.NationalCardRear.RejectionMessage) ? Model.NationalCardRear.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_2" value="NationalCardRear"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="2">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.NationalCardRear.PicturePath) ? Model.NationalCardRear.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.NationalCardRear.PicturePath) ? "" : "disable")" data-index="2">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="2" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox @(Model.Gender == "زن" ? "disable" : "") ">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.MilitaryServiceCard.PicturePath))
|
|
{
|
|
<img id="militaryServiceCardModal" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.MilitaryServiceCard.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="militaryServiceCardModal" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.MilitaryServiceCard.Id" asp-for="@Model.MilitaryServiceCard.Id"/>
|
|
<div class="sign">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>کارت پایان خدمت @* <span> *</span> *@</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.MilitaryServiceCard.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.MilitaryServiceCard.RejectionMessage) ? Model.MilitaryServiceCard.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_3" value="MilitaryServiceCard"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="3">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(Model.Gender == "مرد" && !string.IsNullOrWhiteSpace(Model.MilitaryServiceCard.PicturePath) ? Model.MilitaryServiceCard.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.MilitaryServiceCard.PicturePath) ? "" : "disable")" data-index="3">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="3" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.IdCardPage1.PicturePath))
|
|
{
|
|
<img id="IdCardPage1" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.IdCardPage1.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="IdCardPage1" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.IdCardPage1.Id" asp-for="@Model.IdCardPage1.Id"/>
|
|
<div class="sign">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>شناسنامه صفحه اول @*<span>*</span> *@</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.IdCardPage1.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.IdCardPage1.RejectionMessage) ? Model.IdCardPage1.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_4" value="IdCardPage1"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="4">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.IdCardPage1.PicturePath) ? Model.IdCardPage1.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.IdCardPage1.PicturePath) ? "" : "disable")" data-index="4">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="4" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.IdCardPage2.PicturePath))
|
|
{
|
|
<img id="IdCardPage2" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.IdCardPage2.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="IdCardPage2" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.IdCardPage2.Id" asp-for="@Model.IdCardPage2.Id"/>
|
|
<div class="sign ">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>شناسنامه صفحه دوم</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.IdCardPage2.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.IdCardPage2.RejectionMessage) ? Model.IdCardPage2.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_5" value="IdCardPage2"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="5">آپلود عکس</button>
|
|
@* status change first status *@
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.IdCardPage2.PicturePath) ? Model.IdCardPage2.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.IdCardPage2.PicturePath) ? "" : "disable")" data-index="5">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="5" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.IdCardPage3.PicturePath))
|
|
{
|
|
<img id="IdCardPage3" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.IdCardPage3.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="IdCardPage3" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.IdCardPage3.Id" asp-for="@Model.IdCardPage3.Id"/>
|
|
<div class="sign ">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>شناسنامه صفحه سوم</div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.IdCardPage3.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.IdCardPage3.RejectionMessage) ? Model.IdCardPage3.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_6" value="IdCardPage3"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="6">آپلود عکس</button>
|
|
@* status change first status *@
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.IdCardPage3.PicturePath) ? Model.IdCardPage3.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.IdCardPage3.PicturePath) ? "" : "disable")" data-index="6">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="6" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
<div class="pdBox">
|
|
<div class="d-flex align-items-center justify-content-start w90">
|
|
<div class="pdImageBox">
|
|
@if (!string.IsNullOrWhiteSpace(Model.IdCardPage4.PicturePath))
|
|
{
|
|
<img id="IdCardPage4" src="@Url.Page("./Index", "ShowPicture", new { filePath = @Model.IdCardPage4.PicturePath })" class="preview-image isTrue"/>
|
|
}
|
|
else
|
|
{
|
|
<img id="IdCardPage4" src="~/assetsclient/images/pd-image.png" class="preview-image"/>
|
|
}
|
|
<input type="hidden" value="@Model.IdCardPage4.Id" asp-for="@Model.IdCardPage4.Id"/>
|
|
<div class="sign ">
|
|
</div>
|
|
</div>
|
|
<div class="text-start mx-1 pdTitle">
|
|
<div class="d-flex align-items-center justify-content-between">
|
|
<div>شناسنامه صفحه چهارم </div>
|
|
<div class="resultMessage">
|
|
<div>@(!string.IsNullOrWhiteSpace(Model.IdCardPage4.RejectionMessage) ? "رد شد" : "")</div>
|
|
</div>
|
|
</div>
|
|
<div class="pdTitle2 reasonReject ">@(!string.IsNullOrWhiteSpace(Model.IdCardPage4.RejectionMessage) ? Model.IdCardPage4.RejectionMessage : "")</div>
|
|
</div>
|
|
</div>
|
|
<input type="hidden" id="label_7" value="IdCardPage4"/>
|
|
<div>
|
|
<button type="button" class="btnUploadingPD d-block mb-1" data-index="7">آپلود عکس</button>
|
|
<button type="button" class="btnDeletingPD d-block @(!string.IsNullOrWhiteSpace(Model.IdCardPage4.PicturePath) ? Model.IdCardPage4.Status.ToString() : "") @(!string.IsNullOrWhiteSpace(Model.IdCardPage4.PicturePath) ? "" : "disable")" data-index="7">حذف</button>
|
|
</div>
|
|
<input type="file" class="file-input" data-index="7" accept=".jpg,.jpeg,.png,.pdf" style="display: none;">
|
|
<div class="spinner-loading-progress loading" style="display: none">
|
|
<span class="text-white percentageText"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer d-block">
|
|
<div class="container m-auto">
|
|
<div class="row">
|
|
<div class="col-6 text-end">
|
|
<button type="button" class="exitModal btn-cancel2 justify-content-center">انصراف</button>
|
|
</div>
|
|
<div class="col-6 text-start">
|
|
<button type="button" class="btnCreateNew loadingButton disable position-relative" id="createUploadingFiles" onclick="saveSubmit(Number(@Model.Id))">
|
|
ثبت
|
|
<div class="spinner-loading loading" style="display: none">
|
|
<span class="spinner-border spinner-border-sm loading text-white" role="status" aria-hidden="true"></span>
|
|
</div>
|
|
</button>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</form>
|
|
|
|
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
|
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
|
<script src="~/assetsclient/libs/pdf/pdf.js"></script>
|
|
<script>
|
|
pdfjsLib.GlobalWorkerOptions.workerSrc = '/assetsclient/libs/pdf/pdf.worker.js';
|
|
var saveGroupSubmitAjax = `@Url.Page("./Index", "GroupSave")`;
|
|
var saveUploadFileModalAjax = `@Url.Page("./Index", "CreateUploadDocument")`;
|
|
var saveSubmitAjax = `@Url.Page("./Index", "SaveSubmit")`;
|
|
var deleteFileAjaxUrl = `@Url.Page("./Index", "RemoveEmployeeDocumentByLabel")`;
|
|
var cancelOperationUrl = `@Url.Page("./Index", "CancelOperation")`;
|
|
var employeeId = Number(@Model.EmployeeId);
|
|
var UploadedCount = Number(@Model.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(y => y.PropertyType == typeof(EmployeeDocumentItemViewModel)).Select(y => y.GetValue(@Model) as EmployeeDocumentItemViewModel).Count(x=>x.Status == DocumentStatus.Unsubmitted && !string.IsNullOrWhiteSpace(x.PicturePath)));
|
|
</script>
|
|
<script src="~/assetsclient/pages/WorkFlow/EmployeeDocuments/js/ModalUploadDocument.js?ver=@clientVersion"></script> |