changes
This commit is contained in:
@@ -242,5 +242,26 @@ public class AuthHelper : IAuthHelper
|
||||
_contextAccessor.HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#region Pooya
|
||||
|
||||
public (long Id, UserType userType) GetUserTypeWithId()
|
||||
{
|
||||
if (!IsAuthenticated())
|
||||
return (0, UserType.Anonymous);
|
||||
var claims = _contextAccessor.HttpContext.User.Claims.ToList();
|
||||
|
||||
var subAccountId = long.Parse(claims.FirstOrDefault(x => x.Type == "SubAccountId")?.Value ?? "0");
|
||||
if (subAccountId > 0)
|
||||
return (subAccountId, UserType.SubAccount);
|
||||
|
||||
var id = long.Parse(_contextAccessor.HttpContext.User.Claims.First(x => x.Type == "AccountId")?.Value);
|
||||
if (claims.FirstOrDefault(x => x.Type == "AdminAreaPermission")?.Value == "true")
|
||||
return (id, UserType.Admin);
|
||||
|
||||
return (id, UserType.Client);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
@@ -23,4 +23,5 @@ public interface IAuthHelper
|
||||
long CurrentSubAccountId();
|
||||
string GetWorkshopSlug();
|
||||
string GetWorkshopName();
|
||||
(long Id, UserType userType) GetUserTypeWithId();
|
||||
}
|
||||
14
0_Framework/Application/UserType.cs
Normal file
14
0_Framework/Application/UserType.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
namespace _0_Framework.Application
|
||||
{
|
||||
public enum UserType
|
||||
{
|
||||
|
||||
Anonymous,
|
||||
Client,
|
||||
SubAccount,
|
||||
Camera,
|
||||
Admin
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ using Company.Domain.ContractAgg;
|
||||
using Company.Domain.CustomizeCheckoutAgg;
|
||||
using Company.Domain.EmployeeBankInformationAgg;
|
||||
using Company.Domain.EmployeeChildrenAgg;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using Company.Domain.EmployeeInsuranceRecordAgg;
|
||||
using Company.Domain.InsuranceEmployeeInfoAgg;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
@@ -131,6 +133,8 @@ public class Employee : EntityBase
|
||||
public string FullName => $"{FName} {LName}";
|
||||
|
||||
#region Pooya
|
||||
public List<EmployeeDocuments> EmployeeDocuments { get; set; }
|
||||
public EmployeeDocumentsAdminSelection EmployeeDocumentsAdminSelection { get; set; }
|
||||
public List<EmployeeBankInformation> EmployeeBankInformationList { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
106
Company.Domain/EmployeeDocumentItemAgg/EmployeeDocumentItem.cs
Normal file
106
Company.Domain/EmployeeDocumentItemAgg/EmployeeDocumentItem.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using Microsoft.AspNetCore.JsonPatch.Operations;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentItemAgg
|
||||
{
|
||||
public class EmployeeDocumentItem : EntityBase
|
||||
{
|
||||
|
||||
public long WorkshopId { get; private set; }
|
||||
public long EmployeeId { get; private set; }
|
||||
|
||||
public long UploaderId { get; private set; }
|
||||
public UserType UploaderType { get; private set; }
|
||||
|
||||
|
||||
public long ReviewedById { get; private set; }
|
||||
public string RejectionReason { get; private set; }
|
||||
public DocumentStatus DocumentStatus { get; private set; }
|
||||
public long MediaId { get; private set; }
|
||||
|
||||
public DateTime? ConfirmationDateTime { get; private set; }
|
||||
public DocumentItemLabel DocumentLabel { get; private set; }
|
||||
|
||||
public long EmployeeDocumentId { get; private set; }
|
||||
public virtual EmployeeDocuments EmployeeDocuments { get; private set; }
|
||||
|
||||
public long? EmployeeDocumentsAdminViewId { get; private set; }
|
||||
public EmployeeDocumentsAdminSelection EmployeeDocumentsAdminSelection { get; private set; }
|
||||
|
||||
public List<EmployeeDocumentItemLog> ItemLogs { get; private set; }
|
||||
|
||||
|
||||
public EmployeeDocumentItem(long workshopId,long employeeId, long mediaId, long employeeDocumentId, DocumentItemLabel documentLabel, long uploaderId,
|
||||
UserType uploaderType, DocumentStatus documentStatus = DocumentStatus.Unsubmitted)
|
||||
{
|
||||
MediaId = mediaId;
|
||||
UploaderId = uploaderId;
|
||||
UploaderType = uploaderType;
|
||||
EmployeeId = employeeId;
|
||||
WorkshopId = workshopId;
|
||||
DocumentStatus = documentStatus;
|
||||
if (documentStatus == DocumentStatus.Confirmed)
|
||||
ConfirmationDateTime = DateTime.Now;
|
||||
DocumentLabel = documentLabel;
|
||||
EmployeeDocumentId = employeeDocumentId;
|
||||
ItemLogs =
|
||||
[
|
||||
new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.CreatedNewItem, uploaderId, uploaderType)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public void Confirm(long operatorId, UserType userType)
|
||||
{
|
||||
ReviewedById = operatorId;
|
||||
DocumentStatus = DocumentStatus.Confirmed;
|
||||
ConfirmationDateTime = DateTime.Now;
|
||||
ItemLogs.Add(new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.ConfirmedItem, operatorId, userType));
|
||||
}
|
||||
|
||||
public void Reject(long operatorId, string rejectionReason, UserType userType)
|
||||
{
|
||||
RejectionReason = rejectionReason;
|
||||
DocumentStatus = DocumentStatus.Rejected;
|
||||
EmployeeDocuments.UpdateHasRejectedItems();
|
||||
ReviewedById = operatorId;
|
||||
ItemLogs.Add(new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.RejectedItem, operatorId, userType, rejectionReason));
|
||||
}
|
||||
|
||||
public void Delete(long operatorId, UserType operatorType)
|
||||
{
|
||||
DocumentStatus = DocumentStatus.Deleted;
|
||||
ItemLogs.Add(new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.DeletedItem, operatorId, operatorType));
|
||||
}
|
||||
|
||||
public void AdminSelect(long adminViewId)
|
||||
{
|
||||
EmployeeDocumentsAdminViewId = adminViewId;
|
||||
}
|
||||
|
||||
public void AdminDeselect()
|
||||
{
|
||||
EmployeeDocumentsAdminViewId = 0;
|
||||
}
|
||||
public void SubmitByClient(long operatorId,UserType operatorType)
|
||||
{
|
||||
DocumentStatus = DocumentStatus.SubmittedByClient;
|
||||
ItemLogs.Add(new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.SubmittedItems, operatorId, operatorType));
|
||||
EmployeeDocuments.UpdateHasRejectedItems();
|
||||
}
|
||||
|
||||
public void SubmitByAdmin(long operatorId, UserType operatorType)
|
||||
{
|
||||
DocumentStatus = DocumentStatus.SubmittedByAdmin;
|
||||
ItemLogs.Add(new EmployeeDocumentItemLog(EmployeeDocumentItemOperation.SubmittedItems, operatorId, operatorType));
|
||||
EmployeeDocuments.UpdateHasRejectedItems();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentItemAgg
|
||||
{
|
||||
public class EmployeeDocumentItemLog : EntityBase
|
||||
{
|
||||
public long EmployeeDocumentItemId { get;private set; }
|
||||
public EmployeeDocumentItem EmployeeDocumentItem { get; private set; }
|
||||
|
||||
public EmployeeDocumentItemOperation OperationType {get; private set; }
|
||||
|
||||
public long OperatorId { get;private set; }
|
||||
public UserType OperatorType { get; private set; }
|
||||
|
||||
public string AdminMessage { get; private set; }
|
||||
|
||||
internal EmployeeDocumentItemLog(EmployeeDocumentItemOperation operationType, long operatorId, UserType operatorType, string adminMessage="")
|
||||
{
|
||||
OperationType = operationType;
|
||||
OperatorId = operatorId;
|
||||
OperatorType = operatorType;
|
||||
AdminMessage = adminMessage;
|
||||
}
|
||||
|
||||
|
||||
private EmployeeDocumentItemLog(string adminMessage)
|
||||
{
|
||||
AdminMessage = adminMessage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public enum EmployeeDocumentItemOperation
|
||||
{
|
||||
CreatedNewItem,
|
||||
SubmittedItems,
|
||||
DeletedItem,
|
||||
ConfirmedItem,
|
||||
RejectedItem
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Domain;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentItemAgg
|
||||
{
|
||||
public interface IEmployeeDocumentItemRepository : IRepository<long,EmployeeDocumentItem>
|
||||
{
|
||||
EmployeeDocumentItem GetWithEmployeeDocumentsByItemId(long id);
|
||||
List<EmployeeDocumentItem> GetUnsubmittedByEmployeeDocumentsId(long employeeDocumentsId);
|
||||
void RemoveRange(IEnumerable<EmployeeDocumentItem> items);
|
||||
void Remove(EmployeeDocumentItem item);
|
||||
|
||||
void AddRange(IEnumerable<EmployeeDocumentItem> command);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentsAdminSelectionAgg
|
||||
{
|
||||
public class EmployeeDocumentsAdminSelection : EntityBase
|
||||
{
|
||||
public EmployeeDocumentsAdminSelection(long employeeId)
|
||||
{
|
||||
EmployeeId = employeeId;
|
||||
}
|
||||
public long EmployeeId { get; private set; }
|
||||
public Employee Employee { get; private set; }
|
||||
public List<EmployeeDocumentItem> SelectedEmployeeDocumentItems { get; private set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentsAdminSelectionAgg
|
||||
{
|
||||
public interface IEmployeeDocumentsAdminSelectionRepository : IRepository<long, EmployeeDocumentsAdminSelection>
|
||||
{
|
||||
//List<EmployeeDocumentsAdminSelectionViewModel> Search(SearchEmployeeDocumentsAdminSelection command);
|
||||
|
||||
//EmployeeDocumentsAdminSelection GetByEmployeeIdWithItems(long employeeId);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentsAgg
|
||||
{
|
||||
public static class EmployeeDocumentRequiredItems
|
||||
{
|
||||
public static List<DocumentItemLabel> GetByGender(string gender)
|
||||
{
|
||||
List<DocumentItemLabel> requiredDocuments =
|
||||
[
|
||||
DocumentItemLabel.IdCardPage1, DocumentItemLabel.IdCardPage2, DocumentItemLabel.IdCardPage3, DocumentItemLabel.NationalCardRear,
|
||||
DocumentItemLabel.NationalCardFront,DocumentItemLabel.EmployeePicture
|
||||
];
|
||||
|
||||
if (gender == "مرد")
|
||||
requiredDocuments.Add(DocumentItemLabel.MilitaryServiceCard);
|
||||
|
||||
return requiredDocuments;
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Company.Domain/EmployeeDocumentsAgg/EmployeeDocuments.cs
Normal file
115
Company.Domain/EmployeeDocumentsAgg/EmployeeDocuments.cs
Normal file
@@ -0,0 +1,115 @@
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.WorkshopAgg;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using Microsoft.AspNetCore.Antiforgery;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentsAgg
|
||||
{
|
||||
public class EmployeeDocuments : EntityBase
|
||||
{
|
||||
|
||||
public long EmployeeId { get; private set; }
|
||||
public Employee Employee { get; private set; }
|
||||
|
||||
|
||||
public long WorkshopId { get; private set; }
|
||||
public Workshop Workshop { get; private set; }
|
||||
|
||||
|
||||
public string Gender { get; private set; }
|
||||
|
||||
|
||||
public bool IsConfirmed { get; private set; }
|
||||
public bool RequiredItemsSubmittedByClient { get; private set; }
|
||||
public bool IsSentToChecker { get; private set; }
|
||||
public bool HasRejectedItems { get; set; }
|
||||
|
||||
|
||||
//History of rejected and confirmed documents, lazy loading enabled
|
||||
public virtual List<EmployeeDocumentItem> EmployeeDocumentItemCollection { get; } = [];
|
||||
|
||||
|
||||
public EmployeeDocuments(long employeeId, long workshopId, string gender)
|
||||
{
|
||||
WorkshopId = workshopId;
|
||||
EmployeeId = employeeId;
|
||||
Gender = gender;
|
||||
}
|
||||
|
||||
private EmployeeDocuments()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public bool UpdateIsSentToChecker()
|
||||
{
|
||||
|
||||
var requiredItems = EmployeeDocumentRequiredItems.GetByGender(Gender);
|
||||
|
||||
var currentItems = EmployeeDocumentItemCollection.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted)
|
||||
.GroupBy(x => x.DocumentLabel).Select(x => x.OrderByDescending(y => y.CreationDate).First());
|
||||
var currentItemsFiltered = currentItems.Where(x => x.DocumentStatus == DocumentStatus.Confirmed || x.DocumentStatus == DocumentStatus.SubmittedByAdmin)
|
||||
.Select(x => new{x.DocumentStatus,x.DocumentLabel}).ToList();
|
||||
|
||||
// ReSharper disable once SimplifyLinqExpressionUseAll
|
||||
if (!currentItemsFiltered.Any(x => x.DocumentStatus == DocumentStatus.SubmittedByAdmin))
|
||||
IsSentToChecker = false;
|
||||
|
||||
else
|
||||
IsSentToChecker = requiredItems.All(x => currentItemsFiltered.Any(y=>y.DocumentLabel==x));
|
||||
|
||||
|
||||
return IsSentToChecker;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool UpdateIsConfirmed()
|
||||
{
|
||||
var requiredItems = EmployeeDocumentRequiredItems.GetByGender(Gender);
|
||||
|
||||
var currentItems = EmployeeDocumentItemCollection.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted)
|
||||
.GroupBy(x => x.DocumentLabel).Select(x => x.OrderByDescending(y => y.CreationDate).First());
|
||||
var currentConfirmedItems=currentItems.Where(x => x.DocumentStatus == DocumentStatus.Confirmed).Select(x => x.DocumentLabel).ToList();
|
||||
|
||||
|
||||
IsConfirmed = requiredItems.All(x => currentConfirmedItems.Contains(x));
|
||||
|
||||
|
||||
return IsConfirmed;
|
||||
}
|
||||
|
||||
public void UpdateRequiredItemsSubmittedByClient()
|
||||
{
|
||||
|
||||
var requiredItems = EmployeeDocumentRequiredItems.GetByGender(Gender);
|
||||
|
||||
var currentItems = EmployeeDocumentItemCollection.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted)
|
||||
.GroupBy(x => x.DocumentLabel).Select(x => x.OrderByDescending(y => y.CreationDate).First());
|
||||
|
||||
if (currentItems.Where(x => requiredItems.Contains(x.DocumentLabel))
|
||||
.Any(x => x.DocumentStatus == DocumentStatus.SubmittedByClient))
|
||||
RequiredItemsSubmittedByClient = true;
|
||||
else
|
||||
RequiredItemsSubmittedByClient = false;
|
||||
|
||||
}
|
||||
|
||||
public void UpdateHasRejectedItems()
|
||||
{
|
||||
var currentItems = EmployeeDocumentItemCollection.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted)
|
||||
.GroupBy(x => x.DocumentLabel).Select(x => x.OrderByDescending(y => y.CreationDate).First());
|
||||
if (currentItems.Any(y => y.DocumentStatus == DocumentStatus.Rejected))
|
||||
HasRejectedItems = true;
|
||||
else
|
||||
HasRejectedItems= false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
|
||||
namespace Company.Domain.EmployeeDocumentsAgg
|
||||
{
|
||||
public interface IEmployeeDocumentsRepository : IRepository<long, EmployeeDocuments>
|
||||
{
|
||||
EmployeeDocuments GetByEmployeeIdWorkshopId(long employeeId, long workshopId);
|
||||
EmployeeDocumentsViewModel GetViewModelByEmployeeIdWorkshopId(long employeeId, long workshopId);
|
||||
List<EmployeeDocumentsViewModel> SearchForClient(SearchEmployeeDocuments cmd);
|
||||
|
||||
void AddRange(IEnumerable<EmployeeDocuments> entities);
|
||||
EmployeeDocuments GetByIdWithItems(long employeeDocumentsId);
|
||||
EmployeeDocuments GetByEmployeeIdWorkshopIdWithItems(long employeeId, long workshopId);
|
||||
List<long> GetEmployeeIds(long workshopId);
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithUploadedDocuments();
|
||||
List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForChecker(long workshopId, bool onlyConfirmed);
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithDocumentsAwaitingReviewForCheckerWorkFlow();
|
||||
List<EmployeeDocumentsViewModel> SearchForAdmin(SearchEmployeeDocuments cmd);
|
||||
|
||||
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithDocumentsAwaitingReviewForAdminWorkFlow(List<long> workshops);
|
||||
List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForAdminWorkFlow(long workshopId);
|
||||
int GetCheckerWorkFlowCount();
|
||||
//int GetAdminWorkFlowCountForNewEmployees(List<long> workshopIds);
|
||||
int GetAdminWorkFlowCountForSubmittedAndRejectedDocuments(List<long> workshopIds);
|
||||
List<EmployeeDocumentsViewModel> GetDocumentsAwaitingReviewByWorkshopIdForCheckerWorkFlow(long workshopId);
|
||||
}
|
||||
}
|
||||
@@ -25,9 +25,10 @@ public interface ILeftWorkRepository : IRepository<long, LeftWork>
|
||||
/// <param name="dateTime">تاریخی که بین شروع کار و ترک کار باشد</param>
|
||||
/// <returns>یک کلاس از جنس اطلاعات ترک کار</returns>
|
||||
LeftWorkViewModel GetByDateAndWorkshopIdAndEmployeeId(long workshopId, long employeeId, DateTime dateTime);
|
||||
List<long> GetEmployeeIdsByWorkshopIdActiveInDates(long workshopId, DateTime start, DateTime end);
|
||||
|
||||
#endregion
|
||||
List<LeftWorkViewModel> GetLeftPersonelByWorkshopId(List<long> workshopIds);
|
||||
List<LeftWorkViewModel> GetLeftPersonelByWorkshopId(List<long> workshopIds);
|
||||
OperationResult RemoveAllLeftWork(long workshopId, long employeeId);
|
||||
List<LeftWorkViewModel> SearchLeftWork(LeftWorkSearchModel searchModel);
|
||||
OperationResult CreateLeftWork(InformationLeftwork informationLeftwork);
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// برای آپلود عکس مدارک
|
||||
/// </summary>
|
||||
public class AddEmployeeDocumentItem
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
public IFormFile PictureFile { get; set; }
|
||||
public DocumentItemLabel Label { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
/// <summary>
|
||||
/// برای تایید مدارک در بخش ادمین
|
||||
/// </summary>
|
||||
public class CheckerDocumentItemOperation
|
||||
{
|
||||
public long EmployeeDocumentItemId { get; set; }
|
||||
public bool IsConfirmed { get; set; }
|
||||
public string Message { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using System.Collections.Generic;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
public class CheckerDocumentsOperation
|
||||
{
|
||||
public long WorkshopId { get; set; }
|
||||
public long EmployeeId { get; set; }
|
||||
public List<CheckerDocumentItemOperation> Operations { get; set; } = [];
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// برای ایجاد مجموعه برای مدارک پرسنل
|
||||
/// </summary>
|
||||
public class CreateEmployeeDocuments
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// برچسب مدارک
|
||||
/// </summary>
|
||||
public enum DocumentItemLabel
|
||||
{
|
||||
IdCardPage1,
|
||||
IdCardPage2,
|
||||
IdCardPage3,
|
||||
IdCardPage4,
|
||||
NationalCardFront,
|
||||
NationalCardRear,
|
||||
EducationalDegree,
|
||||
MilitaryServiceCard,
|
||||
EmployeePicture
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
/// <summary>
|
||||
/// وضعیت مدارک
|
||||
/// </summary>
|
||||
public enum DocumentStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// ثبت نشده
|
||||
/// </summary>
|
||||
Unsubmitted,
|
||||
|
||||
/// <summary>
|
||||
/// ثبت شده توسط کلاینت
|
||||
/// </summary>
|
||||
SubmittedByClient,
|
||||
|
||||
/// <summary>
|
||||
/// ثبت شده توسط ادمین
|
||||
/// </summary>
|
||||
SubmittedByAdmin,
|
||||
|
||||
/// <summary>
|
||||
/// تایید شده
|
||||
/// </summary>
|
||||
Confirmed,
|
||||
|
||||
/// <summary>
|
||||
/// رد شده
|
||||
/// </summary>
|
||||
Rejected,
|
||||
|
||||
/// <summary>
|
||||
/// حذف شده
|
||||
/// </summary>
|
||||
Deleted
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
public class EmployeeDocumentHistoryViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long EmployeeId { get; set; }
|
||||
public long EmployeeDocumentsId { get; set; }
|
||||
public string PicturePath { get; set; }
|
||||
public DocumentItemLabel Label { get; set; }
|
||||
public string EmployeeFullName { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
public class EmployeeDocumentItemViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long EmployeeDocumentsId { get; set; }
|
||||
public long MediaId { get; set; }
|
||||
|
||||
public string Gender { get; set; }
|
||||
public string PicturePath { get; set; }
|
||||
public DocumentStatus Status { get; set; }
|
||||
public string StatusString { get; set; }
|
||||
public string RejectionMessage { get; set; }
|
||||
public DocumentItemLabel DocumentItemLabel { get; set; }
|
||||
public DateTime CreationDateTime { get; set; }
|
||||
public UserType UploaderType { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
public enum EmployeeDocumentSearchMode
|
||||
{
|
||||
ActiveEmployees,
|
||||
DeactiveEmployees,
|
||||
All
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
/// <summary>
|
||||
/// برای بخش ادمین، لیست افرادی که در یک کارگاه اقدام به آپلود مدارک کرده اند
|
||||
/// </summary>
|
||||
public class EmployeeDocumentsAdminViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// EmployeeDocuments Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
public long EmployeeId { get; set; }
|
||||
public string EmployeeName { get; set; }
|
||||
/// <summary>
|
||||
/// تعداد عکس های آپلود شده
|
||||
/// </summary>
|
||||
public int DocumentItemsCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تعداد عکس های تایید شده
|
||||
/// </summary>
|
||||
public int ConfirmedDocumentsCount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تعداد عکس های رد شده
|
||||
/// </summary>
|
||||
public int RejectedDocumentsCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا مدارک الزامی بارگذاری شده اند
|
||||
/// </summary>
|
||||
public bool HasRequiredDocuments { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
public class EmployeeDocumentsViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long EmployeeId { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
public string EmployeeFullName { get; set; }
|
||||
public string Gender { get; set; }
|
||||
|
||||
public string IsBlack { get; set; }
|
||||
|
||||
|
||||
//عکس پرسنل
|
||||
public EmployeeDocumentItemViewModel EmployeePicture { get; set; }
|
||||
|
||||
//شناسنامه
|
||||
public EmployeeDocumentItemViewModel IdCardPage1 { get; set; }
|
||||
public EmployeeDocumentItemViewModel IdCardPage2 { get; set; }
|
||||
public EmployeeDocumentItemViewModel IdCardPage3{ get; set; }
|
||||
public EmployeeDocumentItemViewModel IdCardPage4 { get; set; }
|
||||
|
||||
//کارت ملی
|
||||
public EmployeeDocumentItemViewModel NationalCardFront { get; set; }
|
||||
|
||||
public EmployeeDocumentItemViewModel NationalCardRear { get; set; }
|
||||
//مدرک تحصیلی
|
||||
public EmployeeDocumentItemViewModel EducationalDegree { get; set; }
|
||||
|
||||
//کارت پایان خدمت
|
||||
public EmployeeDocumentItemViewModel MilitaryServiceCard { get; set; }
|
||||
public string NationalCode { get; set; }
|
||||
public string EmployeeFName { get; set; }
|
||||
public string EmployeeLName { get; set; }
|
||||
public string Nationality { get; set; }
|
||||
public string IdNumber { get; set; }
|
||||
public string FatherName { get; set; }
|
||||
public string DateOfBirth { get; set; }
|
||||
public string MaritalStatus { get; set; }
|
||||
public string MilitaryServiceStatus { get; set; }
|
||||
public int SubmittedItemsCount { get; set; }
|
||||
public int RejectedItemsCount { get; set; }
|
||||
public int ConfirmedItemsCount { get; set; }
|
||||
public string WorkshopName { get; set; }
|
||||
public string EmployerFullName { get; set; }
|
||||
public List<DocumentItemLabel> RequiredDocuments { get; set; }
|
||||
public List<DocumentItemLabel> RequiredDocumentsUploaded { get; set; }
|
||||
public bool IsSentToChecker { get; set; }
|
||||
public long PersonnelCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using CompanyManagment.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
public interface IEmployeeDocumentsApplication
|
||||
{
|
||||
OperationResult AddEmployeeDocumentItemForClient(AddEmployeeDocumentItem command);
|
||||
|
||||
OperationResult AddEmployeeDocumentItemForAdmin(AddEmployeeDocumentItem command);
|
||||
|
||||
OperationResult AddRangeEmployeeDocumentItems(long workshopId, long employeeId,
|
||||
List<AddEmployeeDocumentItem> command);
|
||||
|
||||
/// <summary>
|
||||
/// unsubmitted دریافت جزییات مدارک پرسنل به همراه مدارک
|
||||
/// </summary>
|
||||
EmployeeDocumentsViewModel GetDetailsForClient(long employeeId, long workshopId);
|
||||
|
||||
/// <summary>
|
||||
/// unsubmitted دریافت جزییات مدارک پرسنل بدون مدارک
|
||||
/// </summary>
|
||||
EmployeeDocumentsViewModel GetDetailsForAdmin(long employeeId, long workshopId);
|
||||
|
||||
List<EmployeeDocumentsViewModel> SearchForClient(SearchEmployeeDocuments cmd, EmployeeDocumentSearchMode mode);
|
||||
|
||||
OperationResult RemoveClientDocumentItemsByAdmin(long workshopId, long employeeId, List<DocumentItemLabel> label);
|
||||
|
||||
OperationResult SubmitDocumentItemsByClient(SubmitEmployeeDocuments cmd);
|
||||
OperationResult SubmitDocumentItemsByEmployeeIdWorkshopId(long employeeId, long workshopId);
|
||||
List<EmployeeDocumentsViewModel> SearchForAdmin(SearchEmployeeDocuments cmd, EmployeeDocumentSearchMode mode);
|
||||
EmployeeDocumentsViewModel GetDetailsForChecker(long employeeId, long workshopId);
|
||||
OperationResult DeleteUnsubmittedDocument(long documentItemId);
|
||||
OperationResult SubmitCheckerOperation(CheckerDocumentsOperation cmd);
|
||||
OperationResult DeleteEmployeeMultipleUnsubmittedDocumentsByLabel(long workshopId, long employeeId, DocumentItemLabel label);
|
||||
OperationResult DeleteUnsubmittedItems(long workshopId,long employeeId);
|
||||
|
||||
OperationResult RemoveClientDocumentItemsByAdminTemp(long workshopId, long employeeId, DocumentItemLabel labels);
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithUploadedDocumentsForChecker();
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithDocumentsAwaitingReviewForCheckerWorkFlow();
|
||||
List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForChecker(long workshopId, bool confirmedOnly);
|
||||
OperationResult SubmitDocumentItemsByAdmin(SubmitEmployeeDocuments cmd);
|
||||
OperationResult SubmitDocumentItemsByAdminInWorkFlow(SubmitEmployeeDocuments cmd);
|
||||
|
||||
List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopDocumentsAwaitingUploadForAdminWorkFlow(List<long> workshops);
|
||||
List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForAdminWorkFlow(long workshopId);
|
||||
|
||||
List<EmployeeDocumentsViewModel> GetDocumentsAwaitingReviewByWorkshopIdForCheckerWorkFlow(long workshopId);
|
||||
int GetAdminWorkFlowCountForSubmittedAndRejectedDocuments(List<long> workshopIds);
|
||||
//int GetAdminWorkFlowCountForNewEmployees(List<long> workshopIds);
|
||||
OperationResult RemoveByAdmin(long documentItemId);
|
||||
int GetCheckerWorkFlowCount();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
public enum OperatorType
|
||||
{
|
||||
Client,
|
||||
Admin
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
|
||||
public class SearchEmployeeDocuments
|
||||
{
|
||||
public string EmployeeName { get; set; }
|
||||
public long WorkshopId { get; set; }
|
||||
public int PageIndex { get; set; }
|
||||
public EmployeeDocumentSearchMode Mode { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
public class SubmitEmployeeDocuments
|
||||
{
|
||||
public long EmployeeDocumentsId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
{
|
||||
public class WorkshopWithEmployeeDocumentsViewModel
|
||||
{
|
||||
public long WorkshopId { get; set; }
|
||||
public string WorkshopFullName { get; set; }
|
||||
public int SubmittedItemsCount { get; set; }
|
||||
public DateTime LastUploadDateTime { get; set; }
|
||||
public string LastUploadDateTimeFa { get; set; }
|
||||
public string EmployerName { get; set; }
|
||||
public List<EmployeeDocumentItemViewModel> SubmittedItems { get; set; }
|
||||
public int EmployeesWithoutDocumentCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
using _0_Framework.Application;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection
|
||||
{
|
||||
public interface IEmployeeDocumentsAdminSelectionApplication
|
||||
{
|
||||
//OperationResult SelectDocumentItem(SelectEmployeeDocumentItem command);
|
||||
//OperationResult Create(long employeeId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection
|
||||
{
|
||||
public class EmployeeDocumentsAdminSelectionViewModel
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
public string EmployeeFullName { get; set; }
|
||||
public string Gender { get; set; }
|
||||
|
||||
//عکس پرسنل
|
||||
public string EmployeePicturePath { get; set; }
|
||||
|
||||
//شناسنامه
|
||||
public string IdCardPage1PicturePath { get; set; }
|
||||
|
||||
public string IdCardPage2PicturePath { get; set; }
|
||||
|
||||
public string IdCardPage3PicturePath { get; set; }
|
||||
|
||||
|
||||
public string IdCardPage4PicturePath { get; set; }
|
||||
|
||||
//کارت ملی
|
||||
public string NationalCardFrontPicturePath { get; set; }
|
||||
|
||||
public string NationalCardRearPicturePath { get; set; }
|
||||
|
||||
//مدرک تحصیلی
|
||||
public string EducationalDegreePicturePath { get; set; }
|
||||
|
||||
//کارت پایان خدمت
|
||||
public string MilitaryServiceCardPicturePath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection
|
||||
{
|
||||
public class SearchEmployeeDocumentsAdminSelection
|
||||
{
|
||||
public string EmployeeName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
|
||||
public class SelectEmployeeDocumentItem
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
public long EmployeeDocumentItemId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
|
||||
namespace CompanyManagment.Application
|
||||
{
|
||||
public class EmployeeDocumentsAdminSelectionApplication :IEmployeeDocumentsAdminSelectionApplication
|
||||
{
|
||||
private readonly IEmployeeDocumentsAdminSelectionRepository _employeeDocumentsAdminViewRepository;
|
||||
private readonly IEmployeeDocumentItemRepository _employeeDocumentItemRepository;
|
||||
private readonly IEmployeeRepository _employeeRepository;
|
||||
public EmployeeDocumentsAdminSelectionApplication(IEmployeeDocumentsAdminSelectionRepository employeeDocumentsAdminViewRepository, IEmployeeDocumentItemRepository employeeDocumentItemRepository, IEmployeeRepository employeeRepository)
|
||||
{
|
||||
_employeeDocumentsAdminViewRepository = employeeDocumentsAdminViewRepository;
|
||||
_employeeDocumentItemRepository = employeeDocumentItemRepository;
|
||||
_employeeRepository = employeeRepository;
|
||||
}
|
||||
|
||||
//public OperationResult SelectDocumentItem(SelectEmployeeDocumentItem command)
|
||||
//{
|
||||
|
||||
// OperationResult op= new();
|
||||
// EmployeeDocumentsAdminSelection adminDocuments = _employeeDocumentsAdminViewRepository.GetByEmployeeIdWithItems(command.EmployeeId);
|
||||
|
||||
// if (adminDocuments == null)
|
||||
// return op.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
// var documentItem = _employeeDocumentItemRepository.Get(command.EmployeeDocumentItemId);
|
||||
// if (documentItem == null)
|
||||
// return op.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
|
||||
// var existingItem=adminDocuments.SelectedEmployeeDocumentItems.FirstOrDefault(x => x.DocumentLabel == documentItem.DocumentLabel);
|
||||
// if(existingItem != null)
|
||||
// existingItem.AdminDeselect();
|
||||
// documentItem.AdminSelect(adminDocuments.id);
|
||||
// _employeeDocumentsAdminViewRepository.SaveChanges();
|
||||
|
||||
// return op.Succcedded();
|
||||
//}
|
||||
|
||||
//public List<EmployeeDocumentsAdminSelectionViewModel> Search(SearchEmployeeDocumentsAdminSelection command)
|
||||
//{
|
||||
// return _employeeDocumentsAdminViewRepository.Search(command);
|
||||
//}
|
||||
|
||||
//public OperationResult Create(long employeeId)
|
||||
//{
|
||||
// OperationResult op = new();
|
||||
// if(!_employeeRepository.Exists(x=>x.id==employeeId))
|
||||
// return op.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
// if (_employeeDocumentsAdminViewRepository.Exists(x => x.EmployeeId == employeeId))
|
||||
// return op.Failed("رکورد تکراری است");
|
||||
// var entity = new EmployeeDocumentsAdminSelection(employeeId);
|
||||
// _employeeDocumentsAdminViewRepository.Create(entity);
|
||||
// _employeeDocumentsAdminViewRepository.SaveChanges();
|
||||
|
||||
// return op.Succcedded(entity.id);
|
||||
//}
|
||||
}
|
||||
}
|
||||
1777
CompanyManagment.Application/EmployeeDocumentsApplication.cs
Normal file
1777
CompanyManagment.Application/EmployeeDocumentsApplication.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,8 @@ using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeBankInformationAgg;
|
||||
using Company.Domain.EmployeeChildrenAgg;
|
||||
using Company.Domain.EmployeeComputeOptionsAgg;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using Company.Domain.EmployeeInsuranceRecordAgg;
|
||||
using Company.Domain.EmployeeInsurancListDataAgg;
|
||||
using Company.Domain.EmployerAccountAgg;
|
||||
@@ -170,6 +172,9 @@ public class CompanyContext : DbContext
|
||||
|
||||
#region Pooya
|
||||
|
||||
public DbSet<EmployeeDocumentItem> EmployeeDocumentItems { get; set; }
|
||||
public DbSet<EmployeeDocuments> EmployeeDocuments { get; set; }
|
||||
|
||||
public DbSet<WorkshopSubAccount> WorkshopSubAccounts { get; set; }
|
||||
|
||||
public DbSet<Bank> Banks { get; set; }
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping
|
||||
{
|
||||
public class EmployeeDocumentItemMapping:IEntityTypeConfiguration<EmployeeDocumentItem>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<EmployeeDocumentItem> builder)
|
||||
{
|
||||
builder.ToTable("EmployeeDocumentItems");
|
||||
builder.HasKey(x => x.id);
|
||||
builder.Property(x => x.DocumentLabel).HasConversion<string>().HasMaxLength(31);
|
||||
builder.Property(x => x.EmployeeDocumentId).IsRequired();
|
||||
builder.Property(x => x.DocumentStatus).HasConversion<string>().HasMaxLength(20);
|
||||
builder.Property(x => x.UploaderId).IsRequired();
|
||||
builder.Property(x => x.RejectionReason).HasMaxLength(150);
|
||||
builder.Property(x => x.ReviewedById).HasMaxLength(120);
|
||||
builder.Property(x => x.UploaderType).HasConversion<string>().HasMaxLength(20).IsRequired();
|
||||
builder.Property(x => x.EmployeeDocumentsAdminViewId).IsRequired(false);
|
||||
|
||||
builder.HasOne(x => x.EmployeeDocuments).WithMany(x => x.EmployeeDocumentItemCollection)
|
||||
.HasForeignKey(x => x.EmployeeDocumentId);
|
||||
|
||||
builder.HasOne(x => x.EmployeeDocumentsAdminSelection).WithMany(x => x.SelectedEmployeeDocumentItems)
|
||||
.HasForeignKey(x => x.EmployeeDocumentsAdminViewId).IsRequired(false);
|
||||
|
||||
builder.OwnsMany(x => x.ItemLogs, opt =>
|
||||
{
|
||||
opt.ToTable("EmployeeDocumentItemLogs");
|
||||
opt.HasKey(x => x.id);
|
||||
opt.Property(x => x.AdminMessage).HasMaxLength(500);
|
||||
opt.Property(x => x.OperationType).HasConversion<string>().HasMaxLength(25);
|
||||
opt.Property(x => x.OperatorType).HasConversion<string>().HasMaxLength(20);
|
||||
opt.WithOwner(x => x.EmployeeDocumentItem).HasForeignKey(x => x.EmployeeDocumentItemId);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping
|
||||
{
|
||||
public class EmployeeDocumentsAdminSelectionMapping : IEntityTypeConfiguration<EmployeeDocumentsAdminSelection>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<EmployeeDocumentsAdminSelection> builder)
|
||||
{
|
||||
builder.ToTable("EmployeeDocumentsAdminSelection");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.HasMany(x => x.SelectedEmployeeDocumentItems).WithOne(x => x.EmployeeDocumentsAdminSelection)
|
||||
.HasForeignKey(x => x.EmployeeDocumentsAdminViewId);
|
||||
}
|
||||
}
|
||||
}
|
||||
26
CompanyManagment.EFCore/Mapping/EmployeeDocumentsMapping.cs
Normal file
26
CompanyManagment.EFCore/Mapping/EmployeeDocumentsMapping.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
|
||||
namespace CompanyManagment.EFCore.Mapping
|
||||
{
|
||||
public class EmployeeDocumentsMapping : IEntityTypeConfiguration<EmployeeDocuments>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<EmployeeDocuments> builder)
|
||||
{
|
||||
builder.ToTable("EmployeeDocuments");
|
||||
builder.HasKey(x => x.id);
|
||||
|
||||
builder.Property(x => x.Gender).HasMaxLength(10).IsRequired();
|
||||
|
||||
builder.HasOne(x => x.Employee).WithMany(x => x.EmployeeDocuments)
|
||||
.HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
builder.HasMany(x => x.EmployeeDocumentItemCollection).WithOne(x => x.EmployeeDocuments)
|
||||
.HasForeignKey(x=>x.EmployeeDocumentId);
|
||||
|
||||
|
||||
//builder.Navigation(x => x.EmployeeDocumentCollection).EnableLazyLoading();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,9 +74,12 @@ public class EmployeeMapping : IEntityTypeConfiguration<Employee>
|
||||
.WithOne(x => x.Employee)
|
||||
.HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
#region Pooya
|
||||
#region Pooya
|
||||
builder.HasMany(x => x.EmployeeDocuments)
|
||||
.WithOne(x => x.Employee)
|
||||
.HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
builder.HasMany(x => x.EmployeeBankInformationList).WithOne(x => x.Employee)
|
||||
builder.HasMany(x => x.EmployeeBankInformationList).WithOne(x => x.Employee)
|
||||
.HasForeignKey(x => x.EmployeeId);
|
||||
|
||||
builder.Ignore(x => x.FullName);
|
||||
|
||||
8751
CompanyManagment.EFCore/Migrations/20250217173745_employee Document.Designer.cs
generated
Normal file
8751
CompanyManagment.EFCore/Migrations/20250217173745_employee Document.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class employeeDocument : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeDocuments",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
Gender = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
|
||||
IsConfirmed = table.Column<bool>(type: "bit", nullable: false),
|
||||
RequiredItemsSubmittedByClient = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsSentToChecker = table.Column<bool>(type: "bit", nullable: false),
|
||||
HasRejectedItems = table.Column<bool>(type: "bit", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeDocuments", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocuments_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocuments_Workshops_WorkshopId",
|
||||
column: x => x.WorkshopId,
|
||||
principalTable: "Workshops",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeDocumentsAdminSelection",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeDocumentsAdminSelection", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocumentsAdminSelection_Employees_EmployeeId",
|
||||
column: x => x.EmployeeId,
|
||||
principalTable: "Employees",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeDocumentItems",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
WorkshopId = table.Column<long>(type: "bigint", nullable: false),
|
||||
EmployeeId = table.Column<long>(type: "bigint", nullable: false),
|
||||
UploaderId = table.Column<long>(type: "bigint", nullable: false),
|
||||
UploaderType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
ReviewedById = table.Column<long>(type: "bigint", maxLength: 120, nullable: false),
|
||||
RejectionReason = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
DocumentStatus = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
MediaId = table.Column<long>(type: "bigint", nullable: false),
|
||||
ConfirmationDateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DocumentLabel = table.Column<string>(type: "nvarchar(31)", maxLength: 31, nullable: false),
|
||||
EmployeeDocumentId = table.Column<long>(type: "bigint", nullable: false),
|
||||
EmployeeDocumentsAdminViewId = table.Column<long>(type: "bigint", nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeDocumentItems", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocumentItems_EmployeeDocumentsAdminSelection_EmployeeDocumentsAdminViewId",
|
||||
column: x => x.EmployeeDocumentsAdminViewId,
|
||||
principalTable: "EmployeeDocumentsAdminSelection",
|
||||
principalColumn: "id");
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocumentItems_EmployeeDocuments_EmployeeDocumentId",
|
||||
column: x => x.EmployeeDocumentId,
|
||||
principalTable: "EmployeeDocuments",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EmployeeDocumentItemLogs",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<long>(type: "bigint", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
EmployeeDocumentItemId = table.Column<long>(type: "bigint", nullable: false),
|
||||
OperationType = table.Column<string>(type: "nvarchar(25)", maxLength: 25, nullable: false),
|
||||
OperatorId = table.Column<long>(type: "bigint", nullable: false),
|
||||
OperatorType = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||||
AdminMessage = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
CreationDate = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EmployeeDocumentItemLogs", x => x.id);
|
||||
table.ForeignKey(
|
||||
name: "FK_EmployeeDocumentItemLogs_EmployeeDocumentItems_EmployeeDocumentItemId",
|
||||
column: x => x.EmployeeDocumentItemId,
|
||||
principalTable: "EmployeeDocumentItems",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocumentItemLogs_EmployeeDocumentItemId",
|
||||
table: "EmployeeDocumentItemLogs",
|
||||
column: "EmployeeDocumentItemId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocumentItems_EmployeeDocumentId",
|
||||
table: "EmployeeDocumentItems",
|
||||
column: "EmployeeDocumentId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocumentItems_EmployeeDocumentsAdminViewId",
|
||||
table: "EmployeeDocumentItems",
|
||||
column: "EmployeeDocumentsAdminViewId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocuments_EmployeeId",
|
||||
table: "EmployeeDocuments",
|
||||
column: "EmployeeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocuments_WorkshopId",
|
||||
table: "EmployeeDocuments",
|
||||
column: "WorkshopId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_EmployeeDocumentsAdminSelection_EmployeeId",
|
||||
table: "EmployeeDocumentsAdminSelection",
|
||||
column: "EmployeeId",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeDocumentItemLogs");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeDocumentItems");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeDocumentsAdminSelection");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "EmployeeDocuments");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1643,6 +1643,135 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.ToTable("EmployeeComputeOptions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItem", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime?>("ConfirmationDateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DocumentLabel")
|
||||
.IsRequired()
|
||||
.HasMaxLength(31)
|
||||
.HasColumnType("nvarchar(31)");
|
||||
|
||||
b.Property<string>("DocumentStatus")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<long>("EmployeeDocumentId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long?>("EmployeeDocumentsAdminViewId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("RejectionReason")
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<long>("ReviewedById")
|
||||
.HasMaxLength(120)
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<long>("UploaderId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("UploaderType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("EmployeeDocumentId");
|
||||
|
||||
b.HasIndex("EmployeeDocumentsAdminViewId");
|
||||
|
||||
b.ToTable("EmployeeDocumentItems", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("EmployeeId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("EmployeeDocumentsAdminSelection", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
|
||||
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<long>("EmployeeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("Gender")
|
||||
.IsRequired()
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<bool>("HasRejectedItems")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsSentToChecker")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("RequiredItemsSubmittedByClient")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<long>("WorkshopId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("EmployeeId");
|
||||
|
||||
b.HasIndex("WorkshopId");
|
||||
|
||||
b.ToTable("EmployeeDocuments", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeInsurancListDataAgg.EmployeeInsurancListData", b =>
|
||||
{
|
||||
b.Property<long>("id")
|
||||
@@ -7545,6 +7674,98 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("Employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItem", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", "EmployeeDocuments")
|
||||
.WithMany("EmployeeDocumentItemCollection")
|
||||
.HasForeignKey("EmployeeDocumentId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", "EmployeeDocumentsAdminSelection")
|
||||
.WithMany("SelectedEmployeeDocumentItems")
|
||||
.HasForeignKey("EmployeeDocumentsAdminViewId");
|
||||
|
||||
b.OwnsMany("Company.Domain.EmployeeDocumentItemAgg.EmployeeDocumentItemLog", "ItemLogs", b1 =>
|
||||
{
|
||||
b1.Property<long>("id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bigint");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b1.Property<long>("id"));
|
||||
|
||||
b1.Property<string>("AdminMessage")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b1.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b1.Property<long>("EmployeeDocumentItemId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<string>("OperationType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(25)
|
||||
.HasColumnType("nvarchar(25)");
|
||||
|
||||
b1.Property<long>("OperatorId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<string>("OperatorType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("nvarchar(20)");
|
||||
|
||||
b1.HasKey("id");
|
||||
|
||||
b1.HasIndex("EmployeeDocumentItemId");
|
||||
|
||||
b1.ToTable("EmployeeDocumentItemLogs", (string)null);
|
||||
|
||||
b1.WithOwner("EmployeeDocumentItem")
|
||||
.HasForeignKey("EmployeeDocumentItemId");
|
||||
|
||||
b1.Navigation("EmployeeDocumentItem");
|
||||
});
|
||||
|
||||
b.Navigation("EmployeeDocuments");
|
||||
|
||||
b.Navigation("EmployeeDocumentsAdminSelection");
|
||||
|
||||
b.Navigation("ItemLogs");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
|
||||
.WithOne("EmployeeDocumentsAdminSelection")
|
||||
.HasForeignKey("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", "EmployeeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Employee");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
|
||||
.WithMany("EmployeeDocuments")
|
||||
.HasForeignKey("EmployeeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Company.Domain.WorkshopAgg.Workshop", "Workshop")
|
||||
.WithMany()
|
||||
.HasForeignKey("WorkshopId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Employee");
|
||||
|
||||
b.Navigation("Workshop");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeInsuranceRecordAgg.EmployeeInsuranceRecord", b =>
|
||||
{
|
||||
b.HasOne("Company.Domain.EmployeeAgg.Employee", "Employee")
|
||||
@@ -8282,6 +8503,10 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
|
||||
b.Navigation("EmployeeChildrenList");
|
||||
|
||||
b.Navigation("EmployeeDocuments");
|
||||
|
||||
b.Navigation("EmployeeDocumentsAdminSelection");
|
||||
|
||||
b.Navigation("EmployeeInsuranceRecords");
|
||||
|
||||
b.Navigation("InsuranceEmployeeInfo");
|
||||
@@ -8293,6 +8518,16 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Navigation("PersonnelCodeList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAdminSelectionAgg.EmployeeDocumentsAdminSelection", b =>
|
||||
{
|
||||
b.Navigation("SelectedEmployeeDocumentItems");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.EmployeeDocumentsAgg.EmployeeDocuments", b =>
|
||||
{
|
||||
b.Navigation("EmployeeDocumentItemCollection");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Company.Domain.Evidence.Evidence", b =>
|
||||
{
|
||||
b.Navigation("EvidenceDetailsList");
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
public class EmployeeDocumentItemRepository:RepositoryBase<long,EmployeeDocumentItem>,IEmployeeDocumentItemRepository
|
||||
{
|
||||
private readonly CompanyContext _context;
|
||||
public EmployeeDocumentItemRepository(CompanyContext context) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
public EmployeeDocumentItem GetWithEmployeeDocumentsByItemId(long id)
|
||||
{
|
||||
return _context.EmployeeDocumentItems.Include(x => x.EmployeeDocuments).FirstOrDefault(x => x.id == id);
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentItem> GetUnsubmittedByEmployeeDocumentsId(long employeeDocumentsId)
|
||||
{
|
||||
return _context.EmployeeDocumentItems.Where(x => x.EmployeeDocumentId == employeeDocumentsId).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
public class EmployeeDocumentsAdminSelectionRepository : RepositoryBase<long,EmployeeDocumentsAdminSelection>,IEmployeeDocumentsAdminSelectionRepository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
private readonly AccountContext _accountContext;
|
||||
public EmployeeDocumentsAdminSelectionRepository(CompanyContext context, CompanyContext companyContext, AccountContext accountContext) : base(context)
|
||||
{
|
||||
_companyContext = companyContext;
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
|
||||
//public List<EmployeeDocumentsAdminSelectionViewModel> Search(SearchEmployeeDocumentsAdminSelection command)
|
||||
//{
|
||||
// var query = _companyContext.EmployeeDocumentsAdminSelectionSet.Include(x => x.Employee)
|
||||
// .Include(x => x.SelectedEmployeeDocumentItems).ThenInclude(x=>x.EmployeeDocuments).AsQueryable();
|
||||
|
||||
// if (!string.IsNullOrWhiteSpace(command.EmployeeName))
|
||||
// query = query.Where(x => (x.Employee.FName+" "+x.Employee.LName).Contains(command.EmployeeName));
|
||||
|
||||
// var items = query.SelectMany(x => x.SelectedEmployeeDocumentItems);
|
||||
|
||||
|
||||
// //get selected documents mediaIds
|
||||
// var mediaIds = items.Select(x => x.MediaId);
|
||||
|
||||
// var medias = _accountContext.Medias.Where(x => mediaIds.Contains(x.id));
|
||||
|
||||
|
||||
// var joinedList = items.Join(medias, x => x.MediaId, y => y.id, (x, y) => new
|
||||
// {
|
||||
// Label = x.DocumentLabel,
|
||||
// Path = y.Path
|
||||
// });
|
||||
|
||||
// return query.Select(x => new EmployeeDocumentsAdminSelectionViewModel()
|
||||
// {
|
||||
// EmployeeId = x.EmployeeId,
|
||||
// EducationalDegreePicturePath =
|
||||
// joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.EducationalDegree).Path,
|
||||
// EmployeeFullName = x.Employee.FullName,
|
||||
// EmployeePicturePath = joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.EmployeePicture).Path,
|
||||
// Gender = x.Employee.Gender,
|
||||
// IdCardPage1PicturePath = joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.IdCardPage1).Path,
|
||||
// IdCardPage2PicturePath = joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.IdCardPage2).Path,
|
||||
// IdCardPage3PicturePath = joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.IdCardPage3).Path,
|
||||
// IdCardPage4PicturePath = joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.IdCardPage4).Path,
|
||||
// MilitaryServiceCardPicturePath =
|
||||
// joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.MilitaryServiceCard).Path,
|
||||
// NationalCardFrontPicturePath =
|
||||
// joinedList.FirstOrDefault(y => y.Label == DocumentItemLabel.NationalCardFront).Path,
|
||||
// NationalCardRearPicturePath = joinedList.FirstOrDefault(y=>y.Label==DocumentItemLabel.NationalCardRear).Path,
|
||||
// }).ToList();
|
||||
//}
|
||||
|
||||
//public EmployeeDocumentsAdminSelection GetByEmployeeIdWithItems(long employeeId)
|
||||
//{
|
||||
// return _companyContext.EmployeeDocumentsAdminSelectionSet.Include(x => x.SelectedEmployeeDocumentItems).Include(x=>x.Employee)
|
||||
// .FirstOrDefault(x => x.EmployeeId == employeeId);
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,841 @@
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Media;
|
||||
using Company.Domain.empolyerAgg;
|
||||
using Company.Domain.LeftWorkAgg;
|
||||
|
||||
namespace CompanyManagment.EFCore.Repository
|
||||
{
|
||||
public class EmployeeDocumentsRepository : RepositoryBase<long, EmployeeDocuments>, IEmployeeDocumentsRepository
|
||||
{
|
||||
private readonly CompanyContext _companyContext;
|
||||
private readonly AccountContext _accountContext;
|
||||
private readonly IEmployerRepository _employerRepository;
|
||||
|
||||
public EmployeeDocumentsRepository(CompanyContext context, AccountContext accountContext, IEmployerRepository employerRepository) : base(context)
|
||||
{
|
||||
_companyContext = context;
|
||||
_accountContext = accountContext;
|
||||
_employerRepository = employerRepository;
|
||||
}
|
||||
|
||||
|
||||
public List<long> GetEmployeeIds(long workshopId)
|
||||
{
|
||||
var query = _companyContext.EmployeeDocuments.Include(x => x.Employee).Where(x => x.WorkshopId == workshopId);
|
||||
return query.Select(x => x.EmployeeId).ToList();
|
||||
}
|
||||
|
||||
public EmployeeDocuments GetByEmployeeIdWorkshopId(long employeeId, long workshopId)
|
||||
{
|
||||
return _companyContext.EmployeeDocuments.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
||||
}
|
||||
|
||||
public EmployeeDocuments GetByEmployeeIdWorkshopIdWithItems(long employeeId, long workshopId)
|
||||
{
|
||||
return _companyContext.EmployeeDocuments.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
||||
}
|
||||
|
||||
public EmployeeDocuments GetByIdWithItems(long employeeDocumentsId)
|
||||
{
|
||||
return _companyContext.EmployeeDocuments.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.FirstOrDefault(x => x.id == employeeDocumentsId);
|
||||
}
|
||||
|
||||
public EmployeeDocumentsViewModel GetViewModelByEmployeeIdWorkshopId(long employeeId, long workshopId)
|
||||
{
|
||||
var entity = _companyContext.EmployeeDocuments.Include(x => x.Employee)
|
||||
.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.FirstOrDefault(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId);
|
||||
|
||||
if (entity == null)
|
||||
return null;
|
||||
|
||||
List<EmployeeDocumentItem> currentConfirmedDocuments = entity.EmployeeDocumentItemCollection.GroupBy(x => x.DocumentLabel)
|
||||
.Select(x => x.MaxBy(y => y.CreationDate)).Where(x => x.DocumentStatus == DocumentStatus.Confirmed).ToList();
|
||||
|
||||
|
||||
|
||||
var medias = _accountContext.Medias.Where(x => currentConfirmedDocuments
|
||||
.Any(y => y.MediaId == x.id))
|
||||
.Select(x => new MediaViewModel { Id = x.id, Path = x.Path }).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
return new EmployeeDocumentsViewModel()
|
||||
{
|
||||
EducationalDegree = GetByLabelAndLoadMedia(currentConfirmedDocuments,medias,DocumentItemLabel.EducationalDegree),
|
||||
IdCardPage1=
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.IdCardPage1),
|
||||
|
||||
IdCardPage2 =
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.IdCardPage2),
|
||||
|
||||
IdCardPage3 =
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.IdCardPage3),
|
||||
|
||||
IdCardPage4 =
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.IdCardPage4),
|
||||
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(currentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.MilitaryServiceCard),
|
||||
NationalCardRear =
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.NationalCardRear),
|
||||
|
||||
NationalCardFront =
|
||||
GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.NationalCardFront),
|
||||
|
||||
EmployeePicture= GetByLabelAndLoadMedia(currentConfirmedDocuments, medias, DocumentItemLabel.EmployeePicture),
|
||||
|
||||
EmployeeFullName = entity.Employee.FullName,
|
||||
|
||||
Id = entity.id
|
||||
};
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> SearchEmployeesWithActiveLeftWork(SearchEmployeeDocuments cmd)
|
||||
{
|
||||
//take employeeDocuments for workshop
|
||||
var query = _companyContext.EmployeeDocuments.Include(x => x.Employee).Where(x => x.WorkshopId == cmd.WorkshopId);
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(cmd.EmployeeName))
|
||||
{
|
||||
query = query.Where(x => x.Employee.FullName.Contains(cmd.EmployeeName));
|
||||
}
|
||||
|
||||
//get leftworks for employees selected
|
||||
var passedLeftWorks = _companyContext.LeftWorkList.Where(x => query.Any(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == x.WorkshopId) && x.LeftWorkDate <= DateTime.Now.Date)
|
||||
.Select(x => x.EmployeeId).AsEnumerable();
|
||||
|
||||
|
||||
|
||||
|
||||
var documents = query.Where(x => passedLeftWorks.All(y => x.EmployeeId != y))
|
||||
.OrderByDescending(x => x.id).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
|
||||
|
||||
|
||||
var currentDocs = documents.SelectMany(y =>y.EmployeeDocumentItemCollection.Where(z=>z.DocumentStatus != DocumentStatus.Unsubmitted &&
|
||||
z.DocumentStatus != DocumentStatus.Deleted)).Select(y => y.MediaId).ToList();
|
||||
|
||||
//get medias for current documents of employees
|
||||
var medias = _accountContext.Medias.Where(x => currentDocs.Contains(x.id)).Select(x => new MediaViewModel()
|
||||
{ Id = x.id,Path=x.Path }).ToList();
|
||||
|
||||
|
||||
|
||||
return documents.Select(x =>
|
||||
{
|
||||
var employeeCurrentConfirmedDocuments =
|
||||
x.EmployeeDocumentItemCollection.Where(y => x.EmployeeId == y.EmployeeId).ToList();
|
||||
|
||||
|
||||
return new EmployeeDocumentsViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
EmployeeId = x.EmployeeId,
|
||||
EmployeeFullName = x.Employee.FullName,
|
||||
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3 = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4 = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.IdCardPage4),
|
||||
|
||||
EducationalDegree = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.EducationalDegree),
|
||||
NationalCardFront = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(employeeCurrentConfirmedDocuments, medias,
|
||||
DocumentItemLabel.EmployeePicture),
|
||||
};
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> SearchForClient(SearchEmployeeDocuments cmd)
|
||||
{
|
||||
//take employeeDocuments for workshop
|
||||
var query = _companyContext.EmployeeDocuments.Include(x => x.Employee)
|
||||
.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.Where(x => x.WorkshopId == cmd.WorkshopId);
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(cmd.EmployeeName))
|
||||
{
|
||||
query = query.Where(x => (x.Employee.FName + " " + x.Employee.LName).Contains(cmd.EmployeeName));
|
||||
}
|
||||
|
||||
|
||||
//get the last leftworks in each workshop for selected employees where the leftwork
|
||||
var passedLeftWorks = _companyContext.LeftWorkList
|
||||
.Where(x => query.Any(y => y.EmployeeId == x.EmployeeId &&
|
||||
y.WorkshopId == cmd.WorkshopId && x.LeftWorkDate <= DateTime.Now.Date))
|
||||
.Select(x => x.EmployeeId).AsEnumerable();
|
||||
|
||||
|
||||
List<EmployeeDocuments> employeeDocuments;
|
||||
switch (cmd.Mode)
|
||||
{
|
||||
case EmployeeDocumentSearchMode.All:
|
||||
employeeDocuments = query.OrderBy(x => passedLeftWorks.Any(y => x.EmployeeId == y))
|
||||
.Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
case EmployeeDocumentSearchMode.ActiveEmployees:
|
||||
employeeDocuments = query.Where(x => passedLeftWorks.All(y => x.EmployeeId != y))
|
||||
.OrderByDescending(x => x.id).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
case EmployeeDocumentSearchMode.DeactiveEmployees:
|
||||
employeeDocuments = query.Where(x => passedLeftWorks.Any(y => x.EmployeeId == y))
|
||||
.OrderByDescending(x => x.id).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
default:
|
||||
employeeDocuments = new();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var employer = _employerRepository.GetEmployerByWorkshopId(cmd.WorkshopId).FirstOrDefault();
|
||||
string employerFullName = employer.EmployerFullName;
|
||||
|
||||
|
||||
var currentItemsMediaId = employeeDocuments.SelectMany(y => y.EmployeeDocumentItemCollection)
|
||||
.Where(y=>y.DocumentStatus != DocumentStatus.Unsubmitted || y.UploaderType == UserType.Client)
|
||||
.GroupBy(x=>new{x.WorkshopId,x.EmployeeId,x.DocumentLabel}).Select(x=>
|
||||
x.MaxBy(y=>y.CreationDate)).Select(z => z.MediaId).ToList();
|
||||
|
||||
var personnelCodes = _companyContext.PersonnelCodeSet.Where(x => x.WorkshopId == cmd.WorkshopId).ToList();
|
||||
//get medias for current documents of employees
|
||||
|
||||
var medias = _accountContext.Medias.Where(x => currentItemsMediaId.Contains(x.id))
|
||||
.Select(x => new MediaViewModel(){ Id = x.id,Path= x.Path }).ToList();
|
||||
|
||||
|
||||
return employeeDocuments.Select(x =>
|
||||
{
|
||||
|
||||
var employeeLatestConfirmedDocuments = employeeDocuments.Where(y=>x.EmployeeId==y.EmployeeId)
|
||||
.SelectMany(y=> GetAllCurrentDocuments(y,UserType.Client)).ToList();
|
||||
|
||||
return new EmployeeDocumentsViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
EmployeeId = x.EmployeeId,
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments,medias,DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3= GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4= GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage4),
|
||||
EducationalDegree = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.EducationalDegree),
|
||||
EmployeeFullName = x.Employee.FullName,
|
||||
NationalCardFront =GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear =GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard= GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.EmployeePicture),
|
||||
IsBlack = passedLeftWorks.Any(y => y == x.EmployeeId) ? "true" : "false",
|
||||
EmployerFullName = employerFullName,
|
||||
IsSentToChecker = x.IsSentToChecker,
|
||||
PersonnelCode = personnelCodes.FirstOrDefault(y=>y.EmployeeId == x.EmployeeId)?.PersonnelCode??0
|
||||
};
|
||||
}).OrderBy(x=>x.PersonnelCode).ToList();
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> SearchForAdmin(SearchEmployeeDocuments cmd)
|
||||
{
|
||||
//take employeeDocuments for workshop
|
||||
var query = _companyContext.EmployeeDocuments.Include(x => x.Employee)
|
||||
.Include(x => x.EmployeeDocumentItemCollection).Where(x => x.WorkshopId == cmd.WorkshopId);
|
||||
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(cmd.EmployeeName))
|
||||
{
|
||||
query = query.Where(x => (x.Employee.FName + " " + x.Employee.LName).Contains(cmd.EmployeeName));
|
||||
}
|
||||
|
||||
|
||||
//get the last leftworks in each workshop for selected employees where the leftwork
|
||||
var passedLeftWorks = _companyContext.LeftWorkList
|
||||
.Where(x => query.Any(y => y.EmployeeId == x.EmployeeId && y.WorkshopId == cmd.WorkshopId && x.LeftWorkDate <= DateTime.Now.Date))
|
||||
.Select(x => x.EmployeeId).AsEnumerable();
|
||||
|
||||
|
||||
List<EmployeeDocuments> employeeDocuments;
|
||||
switch (cmd.Mode)
|
||||
{
|
||||
case EmployeeDocumentSearchMode.All:
|
||||
employeeDocuments = query.OrderBy(x => passedLeftWorks.Any(y => x.EmployeeId == y)).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
case EmployeeDocumentSearchMode.ActiveEmployees:
|
||||
employeeDocuments = query.Where(x => passedLeftWorks.All(y => x.EmployeeId != y))
|
||||
.OrderByDescending(x => x.id).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
case EmployeeDocumentSearchMode.DeactiveEmployees:
|
||||
employeeDocuments = query.Where(x => passedLeftWorks.Any(y => x.EmployeeId == y))
|
||||
.OrderByDescending(x => x.id).Skip(cmd.PageIndex).Take(30).ToList();
|
||||
break;
|
||||
default:
|
||||
employeeDocuments = new();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var employer = _employerRepository.GetEmployerByWorkshopId(cmd.WorkshopId).FirstOrDefault();
|
||||
string employerFullName = employer.EmployerFullName;
|
||||
|
||||
|
||||
var currentItemsMediaId = employeeDocuments.SelectMany(y => GetAllCurrentDocuments(y,UserType.Admin))
|
||||
.Select(y => y.MediaId).ToList();
|
||||
//get medias for current documents of employees
|
||||
var personnelCodes = _companyContext.PersonnelCodeSet.Where(x => x.WorkshopId == cmd.WorkshopId).ToList();
|
||||
|
||||
var medias = _accountContext.Medias.Where(x => currentItemsMediaId.Contains(x.id))
|
||||
.Select(x => new MediaViewModel() { Id = x.id, Path = x.Path }).ToList();
|
||||
|
||||
|
||||
return employeeDocuments.Select(x =>
|
||||
{
|
||||
|
||||
var employeeLatestConfirmedDocuments = employeeDocuments.Where(y => x.EmployeeId == y.EmployeeId)
|
||||
.SelectMany(y => GetAllCurrentDocuments(y, UserType.Admin)).ToList();
|
||||
|
||||
return new EmployeeDocumentsViewModel
|
||||
{
|
||||
Id = x.id,
|
||||
EmployeeId = x.EmployeeId,
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.IdCardPage4),
|
||||
EducationalDegree = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.EducationalDegree),
|
||||
EmployeeFullName = x.Employee.FullName,
|
||||
NationalCardFront = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, medias, DocumentItemLabel.EmployeePicture),
|
||||
IsBlack = passedLeftWorks.Any(y => y == x.EmployeeId) ? "true" : "false",
|
||||
EmployerFullName = employerFullName,
|
||||
PersonnelCode = personnelCodes.FirstOrDefault(y => y.EmployeeId == x.EmployeeId)?.PersonnelCode ?? 0
|
||||
};
|
||||
}).OrderBy(x=>x.PersonnelCode).ToList();
|
||||
}
|
||||
|
||||
public List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithDocumentsAwaitingReviewForAdminWorkFlow(List<long> workshops)
|
||||
{
|
||||
var activeEmployees = _companyContext.LeftWorkList
|
||||
.Where(x => workshops.Contains(x.WorkshopId) && x.LeftWorkDate.AddDays(-1) >= DateTime.Now)
|
||||
.Select(x=>new{x.WorkshopId,x.EmployeeId});
|
||||
|
||||
|
||||
var query = _companyContext.EmployeeDocuments
|
||||
.Where(x=> workshops.Contains(x.WorkshopId) &&
|
||||
activeEmployees.Any(y=>y.WorkshopId == x.WorkshopId && y.EmployeeId==x.EmployeeId))
|
||||
.Include(x=>x.Workshop).Include(x => x.EmployeeDocumentItemCollection)
|
||||
.Where(x=> x.IsSentToChecker == false &&
|
||||
(x.EmployeeDocumentItemCollection.Any(y =>
|
||||
y.DocumentStatus == DocumentStatus.SubmittedByClient)) || x.HasRejectedItems)
|
||||
.GroupBy(x=>x.WorkshopId).Select(x => new WorkshopWithEmployeeDocumentsViewModel()
|
||||
{
|
||||
WorkshopId = x.Key,
|
||||
WorkshopFullName = x.FirstOrDefault().Workshop.WorkshopName,
|
||||
EmployeesWithoutDocumentCount = x.Count()
|
||||
});
|
||||
|
||||
|
||||
|
||||
var workshopEmployers = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
.Where(x => query.Any(y=>y.WorkshopId==x.WorkshopId))
|
||||
.GroupBy(x => x.WorkshopId).Select(x => x.FirstOrDefault()).ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
var result = query.ToList();
|
||||
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
var employer = workshopEmployers.FirstOrDefault(y => y.WorkshopId == x.WorkshopId)?.Employer;
|
||||
x.EmployerName = employer.FullName;
|
||||
|
||||
//x.SubmittedItems.ForEach(y=>y.PicturePath= medias.FirstOrDefault(z=>z.id == y.MediaId)?.Path ?? "");
|
||||
});
|
||||
|
||||
return result.Where(x=>x.EmployeesWithoutDocumentCount > 0).OrderByDescending(x => x.EmployeesWithoutDocumentCount).ToList();
|
||||
}
|
||||
//ToDo آپلود مدارک و افزودن پرسنل
|
||||
//public List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithNewEmployeesWithoutDocuments(List<long> workshops)
|
||||
//{
|
||||
// var newEmployees = _companyContext.LeftWorkTemps.Where(x => workshops.Contains(x.WorkshopId))
|
||||
// .Select(x => new { x.WorkshopId, x.EmployeeId });
|
||||
|
||||
|
||||
// var query = _companyContext.EmployeeDocuments
|
||||
// .Where(x => workshops.Contains(x.WorkshopId) &&
|
||||
// newEmployees.Any(y => y.WorkshopId == x.WorkshopId && y.EmployeeId == x.EmployeeId))
|
||||
// .Include(x => x.Workshop).Include(x => x.EmployeeDocumentItemCollection)
|
||||
// .GroupBy(x => x.WorkshopId).Select(x => new WorkshopWithEmployeeDocumentsViewModel()
|
||||
// {
|
||||
// WorkshopId = x.Key,
|
||||
// WorkshopFullName = x.FirstOrDefault().Workshop.WorkshopName,
|
||||
// EmployeesWithoutDocumentCount = x.Count()
|
||||
// });
|
||||
|
||||
// var workshopEmployers = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
// .Where(x => query.Any(y => y.WorkshopId == x.WorkshopId))
|
||||
// .GroupBy(x => x.WorkshopId).Select(x => x.FirstOrDefault()).ToList();
|
||||
|
||||
// var result = query.ToList();
|
||||
|
||||
// result.ForEach(x =>
|
||||
// {
|
||||
// var employer = workshopEmployers.FirstOrDefault(y => y.WorkshopId == x.WorkshopId)?.Employer;
|
||||
// x.EmployerName = employer.FullName;
|
||||
|
||||
// //x.SubmittedItems.ForEach(y=>y.PicturePath= medias.FirstOrDefault(z=>z.id == y.MediaId)?.Path ?? "");
|
||||
// });
|
||||
|
||||
// return result.Where(x => x.EmployeesWithoutDocumentCount > 0).OrderByDescending(x => x.EmployeesWithoutDocumentCount).ToList();
|
||||
//}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForAdminWorkFlow(long workshopId)
|
||||
{
|
||||
var activeEmployeesInWorkshop = _companyContext.LeftWorkList
|
||||
.Where(x => workshopId == x.WorkshopId && x.LeftWorkDate.AddDays(-1) >= DateTime.Today)
|
||||
.Include(x=>x.Employee).ThenInclude(x=>x.EmployeeDocuments)
|
||||
.Select(x => new {x.EmployeeId ,FullName= x.Employee.FName +" " +x.Employee.LName,x.Employee.Gender});
|
||||
|
||||
|
||||
var EDItemsList = _companyContext.EmployeeDocumentItems
|
||||
.Where(x => x.WorkshopId == workshopId && x.DocumentStatus != DocumentStatus.Unsubmitted &&
|
||||
activeEmployeesInWorkshop.Any(y => y.EmployeeId == x.EmployeeId))
|
||||
.Include(x => x.EmployeeDocuments).Where(x=> x.EmployeeDocuments.IsSentToChecker == false &&
|
||||
( (x.DocumentStatus == DocumentStatus.SubmittedByClient) || x.EmployeeDocuments.HasRejectedItems) )
|
||||
.GroupBy(x => new { x.EmployeeId, x.DocumentLabel })
|
||||
.Select(x =>
|
||||
x.Select(y => new
|
||||
{
|
||||
y.EmployeeDocumentId,
|
||||
Id = y.id,
|
||||
y.EmployeeDocuments.Gender,
|
||||
y.DocumentLabel,
|
||||
y.DocumentStatus,
|
||||
y.MediaId,
|
||||
y.RejectionReason,
|
||||
y.EmployeeId,
|
||||
y.CreationDate,
|
||||
IsSentToChecker = y.EmployeeDocuments.IsSentToChecker,
|
||||
y.EmployeeDocuments.IsConfirmed
|
||||
})
|
||||
.OrderByDescending(y => y.CreationDate).First())
|
||||
|
||||
.ToList();
|
||||
|
||||
|
||||
|
||||
var activeEmployeesInWorkshopList = activeEmployeesInWorkshop.ToList();
|
||||
|
||||
//get medias for current documents of employees
|
||||
var mediaIds = EDItemsList.Select(x => x.MediaId).ToList();
|
||||
var mediasList = _accountContext.Medias.Where(x => mediaIds.Contains(x.id))
|
||||
.Select(x => new MediaViewModel() { Id= x.id, Path = x.Path }).ToList();
|
||||
|
||||
|
||||
|
||||
return EDItemsList.GroupBy(x=>x.EmployeeId)
|
||||
.Select(x =>
|
||||
{
|
||||
//var requiredDocs = EmployeeDocumentRequiredItems.GetByGender(x.Gender);
|
||||
var employeeLatestConfirmedDocuments = x
|
||||
|
||||
.Where(y => y.EmployeeId == x.Key &&(y.DocumentStatus == DocumentStatus.SubmittedByClient || y.DocumentStatus == DocumentStatus.SubmittedByAdmin || y.DocumentStatus == DocumentStatus.Rejected))
|
||||
.Select(y=>new EmployeeDocumentItemViewModel()
|
||||
{
|
||||
Status = y.DocumentStatus,
|
||||
MediaId = y.MediaId,
|
||||
DocumentItemLabel = y.DocumentLabel,
|
||||
Id = y.Id,
|
||||
RejectionMessage = y.RejectionReason,
|
||||
StatusString = y.DocumentStatus.ToString()
|
||||
}).ToList();
|
||||
|
||||
|
||||
//var requiredItemsUploaded = employeeLatestConfirmedDocuments
|
||||
// .Where(y => requiredDocs.Contains(y.DocumentItemLabel)).Select(y => y.DocumentItemLabel)
|
||||
// .ToList();
|
||||
|
||||
return new EmployeeDocumentsViewModel()
|
||||
{
|
||||
EmployeeId = x.Key,
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4 = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.IdCardPage4),
|
||||
EducationalDegree = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.EducationalDegree),
|
||||
EmployeeFullName = activeEmployeesInWorkshopList.First(y=>y.EmployeeId==x.Key).FullName,
|
||||
NationalCardFront = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(employeeLatestConfirmedDocuments, mediasList, DocumentItemLabel.EmployeePicture),
|
||||
//RequiredDocumentsUploaded = requiredItemsUploaded,
|
||||
//RequiredDocuments = requiredDocs
|
||||
};
|
||||
}).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// برای دریافت لیست کارگاه های آپلود کرده در لیست چکر
|
||||
/// </summary>
|
||||
public List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithUploadedDocuments()
|
||||
{
|
||||
var itemsQuery = _companyContext.EmployeeDocumentItems
|
||||
.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted && x.DocumentStatus != DocumentStatus.SubmittedByClient)
|
||||
.Include(x => x.EmployeeDocuments)
|
||||
.ThenInclude(x => x.Workshop).ThenInclude(x=>x.WorkshopEmployers).ThenInclude(x=>x.Employer)
|
||||
.GroupBy(x=>x.WorkshopId).Select(x => new WorkshopWithEmployeeDocumentsViewModel()
|
||||
{
|
||||
SubmittedItemsCount = x.Count(y => y.DocumentStatus == DocumentStatus.SubmittedByAdmin),
|
||||
WorkshopId = x.Key,
|
||||
WorkshopFullName = x.First().EmployeeDocuments.Workshop.WorkshopName,
|
||||
EmployerName = x.First().EmployeeDocuments.Workshop.WorkshopEmployers.First().Employer.FullName
|
||||
});
|
||||
|
||||
|
||||
|
||||
//var workshopIds = itemsQuery.Select(x => x.WorkshopId);
|
||||
// var workshopEmployers = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
// .Where(x=> workshopIds.Contains(x.WorkshopId))
|
||||
// .GroupBy(x => x.WorkshopId).Select(x => x.FirstOrDefault()).ToList();
|
||||
|
||||
|
||||
|
||||
//var mediaIds = _companyContext.EmployeeDocumentItems.Where(x=>x.DocumentStatus==DocumentStatus.Submitted).Select(x=>x.EmployeeDocumentId).ToList();
|
||||
|
||||
//var medias =
|
||||
// _accountContext.Medias.Where(x =>mediaIds.Contains(x.id)).ToList();
|
||||
|
||||
|
||||
// list.ForEach(x =>
|
||||
// {
|
||||
// var employer = workshopEmployers.FirstOrDefault(y => y.WorkshopId == x.WorkshopId)?.Employer;
|
||||
|
||||
//x.EmployerName = employer.FullName;
|
||||
// x.SubmittedItemsCount = x.SubmittedItems.Count(y=>y.Status == DocumentStatus.SubmittedByAdmin);
|
||||
// //x.SubmittedItems.ForEach(y=>y.PicturePath= medias.FirstOrDefault(z=>z.id == y.MediaId)?.Path ?? "");
|
||||
// });
|
||||
|
||||
return itemsQuery.Where(x=>x.SubmittedItemsCount > 0).OrderByDescending(x=>x.SubmittedItemsCount).ToList();
|
||||
}
|
||||
|
||||
|
||||
public List<WorkshopWithEmployeeDocumentsViewModel> GetWorkshopsWithDocumentsAwaitingReviewForCheckerWorkFlow()
|
||||
{
|
||||
var query = _companyContext.EmployeeDocuments
|
||||
.Include(x => x.Workshop);
|
||||
|
||||
var workshopEmployers = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
.Where(x => query.Any(y=>y.WorkshopId == x.WorkshopId))
|
||||
.GroupBy(x => x.WorkshopId).ToList()
|
||||
.Select(x => new { x.Key, x.FirstOrDefault()!.Employer }).ToList();
|
||||
|
||||
var result = query
|
||||
.GroupBy(x => x.WorkshopId).ToList().Select(x =>
|
||||
new WorkshopWithEmployeeDocumentsViewModel()
|
||||
{
|
||||
SubmittedItemsCount = x.Count(),
|
||||
WorkshopId = x.Key,
|
||||
WorkshopFullName = x.FirstOrDefault().Workshop.WorkshopName,
|
||||
}).ToList();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
var employer = workshopEmployers.FirstOrDefault().Employer;
|
||||
x.EmployerName = employer.FullName;
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> GetByWorkshopIdWithItemsForChecker(long workshopId, bool onlyConfirmed)
|
||||
{
|
||||
//todo: optimize here
|
||||
var workshopDocuments = _companyContext.EmployeeDocuments.Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.Where(x=>x.EmployeeDocumentItemCollection.Any(y =>
|
||||
y.DocumentStatus != DocumentStatus.Unsubmitted && y.DocumentStatus != DocumentStatus.SubmittedByClient));
|
||||
|
||||
var employeesList = _companyContext.Employees.Where(x =>
|
||||
workshopDocuments.Any(y => y.EmployeeId == x.id))
|
||||
.Select(x => new { Id = x.id, FullName = (x.FName + " " + x.LName) }).ToList();
|
||||
|
||||
var employer = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
.FirstOrDefault(x => x.WorkshopId == workshopId)!.Employer;
|
||||
|
||||
var employerName = employer.FullName;
|
||||
//var employerName = employer.IsLegal == "حقیقی" ? (employer.FName + " " + employer.LName) : employer.LName;
|
||||
|
||||
|
||||
var workshopDocumentsList = workshopDocuments.ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var workshopDocumentsListWithConfirmed = workshopDocumentsList.Select(x => new
|
||||
{
|
||||
EmployeeDocuments = x,
|
||||
EmployeeDocumentItemCollection = x.EmployeeDocumentItemCollection.Where(y=> y.DocumentStatus != DocumentStatus.Unsubmitted &&
|
||||
y.DocumentStatus != DocumentStatus.SubmittedByClient)
|
||||
.GroupBy(y => y.DocumentLabel)
|
||||
.Select(y => y.MaxBy(z => z.CreationDate))
|
||||
. ToList()
|
||||
}).ToList();
|
||||
|
||||
var workshopName = _companyContext.Workshops.FirstOrDefault(x => x.id == workshopId)?.WorkshopFullName ?? "";
|
||||
|
||||
var mediaIds = workshopDocumentsList.SelectMany(x => x.EmployeeDocumentItemCollection)
|
||||
|
||||
.Select(x => x.MediaId).ToList();
|
||||
var mediasList = _accountContext.Medias.Where(x=>mediaIds.Contains(x.id))
|
||||
.Select(x => new MediaViewModel() { Id = x.id, Path = x.Path }).ToList();
|
||||
|
||||
|
||||
if (onlyConfirmed)
|
||||
workshopDocumentsListWithConfirmed=workshopDocumentsListWithConfirmed.Where(x =>
|
||||
x.EmployeeDocumentItemCollection.All(y => y.DocumentStatus != DocumentStatus.SubmittedByAdmin)).ToList();
|
||||
else
|
||||
workshopDocumentsListWithConfirmed = workshopDocumentsListWithConfirmed.Where(x =>
|
||||
x.EmployeeDocumentItemCollection.Any(y => y.DocumentStatus == DocumentStatus.SubmittedByAdmin)).ToList();
|
||||
|
||||
return workshopDocumentsListWithConfirmed.Select(x => new EmployeeDocumentsViewModel()
|
||||
{
|
||||
Id=x.EmployeeDocuments.id,
|
||||
EmployeeFullName = employeesList.FirstOrDefault(y=>y.Id==x.EmployeeDocuments.EmployeeId)?.FullName ?? "",
|
||||
EmployeeId = x.EmployeeDocuments.EmployeeId,
|
||||
WorkshopId = workshopId,
|
||||
WorkshopName = workshopName,
|
||||
Gender = x.EmployeeDocuments.Gender,
|
||||
EducationalDegree = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection,mediasList,
|
||||
DocumentItemLabel.EducationalDegree),
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage4),
|
||||
NationalCardFront = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.EmployeePicture),
|
||||
SubmittedItemsCount = x.EmployeeDocumentItemCollection.Count(y=>y.DocumentStatus==DocumentStatus.SubmittedByAdmin),
|
||||
RejectedItemsCount = x.EmployeeDocumentItemCollection.Count(y => y.DocumentStatus == DocumentStatus.Rejected),
|
||||
ConfirmedItemsCount = x.EmployeeDocumentItemCollection.Count(y => y.DocumentStatus == DocumentStatus.Confirmed),
|
||||
EmployerFullName = employerName,
|
||||
IsSentToChecker = x.EmployeeDocuments.IsSentToChecker
|
||||
}).Where(x=>x.SubmittedItemsCount > 0 || x.RejectedItemsCount > 0 || x.ConfirmedItemsCount > 0)
|
||||
.OrderByDescending(x=>x.SubmittedItemsCount).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public int GetCheckerWorkFlowCount()
|
||||
{
|
||||
return _companyContext.EmployeeDocumentItems.Include(x => x.EmployeeDocuments)
|
||||
.Count(x => x.DocumentStatus == DocumentStatus.SubmittedByAdmin);
|
||||
}
|
||||
|
||||
//ToDo آپلود مدارک و افزدن پرسنل
|
||||
//public int GetAdminWorkFlowCountForNewEmployees(List<long> workshopIds)
|
||||
//{
|
||||
// //New employees created by client should have their documents uploaded or confirmed
|
||||
// var newEmployeesInWorkshop = _companyContext.LeftWorkTemps.Where(x => workshopIds.Contains(x.WorkshopId));
|
||||
|
||||
// var duty = _companyContext.EmployeeDocuments
|
||||
// .Count(x => workshopIds.Contains(x.WorkshopId) &&
|
||||
// newEmployeesInWorkshop.Any(y =>
|
||||
// y.EmployeeId == x.EmployeeId)
|
||||
// && x.IsSentToChecker == false && x.IsConfirmed == false);
|
||||
|
||||
|
||||
|
||||
// return duty;
|
||||
//}
|
||||
|
||||
public int GetAdminWorkFlowCountForSubmittedAndRejectedDocuments(List<long> workshopIds)
|
||||
{
|
||||
|
||||
|
||||
//Uploaded items done by client should be reviewed by admin before proceeding to checker
|
||||
var activeEmployeesInWorkshop = _companyContext.LeftWorkList
|
||||
.Where(x => workshopIds.Contains(x.WorkshopId) && x.LeftWorkDate.AddDays(-1) >= DateTime.Today);
|
||||
var dutyCount = _companyContext.EmployeeDocuments
|
||||
.Count(x => workshopIds.Contains(x.WorkshopId) &&
|
||||
activeEmployeesInWorkshop.Any(y => y.EmployeeId == x.EmployeeId) &&
|
||||
x.IsSentToChecker == false &&
|
||||
(x.EmployeeDocumentItemCollection.Any(y => y.DocumentStatus == DocumentStatus.SubmittedByClient) || x.HasRejectedItems));
|
||||
|
||||
return dutyCount;
|
||||
}
|
||||
|
||||
public List<EmployeeDocumentsViewModel> GetDocumentsAwaitingReviewByWorkshopIdForCheckerWorkFlow(long workshopId)
|
||||
{
|
||||
|
||||
//todo: optimize here
|
||||
var workshopDocuments = _companyContext.EmployeeDocuments.Where(x => x.WorkshopId == workshopId)
|
||||
.Include(x => x.EmployeeDocumentItemCollection)
|
||||
.Where(x => x.IsSentToChecker);
|
||||
|
||||
var employeesList = _companyContext.Employees.Where(x =>
|
||||
workshopDocuments.Any(y => y.EmployeeId == x.id))
|
||||
.Select(x => new { Id = x.id, FullName = (x.FName + " " + x.LName) }).ToList();
|
||||
|
||||
|
||||
var employer = _companyContext.WorkshopEmployers.Include(x => x.Employer)
|
||||
.FirstOrDefault(x => x.WorkshopId == workshopId)!.Employer;
|
||||
|
||||
|
||||
var employerName = employer.FullName;
|
||||
//var employerName = employer.IsLegal == "حقیقی" ? (employer.FName + " " + employer.LName) : employer.LName;
|
||||
|
||||
|
||||
var workshopDocumentsList = workshopDocuments.ToList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var workshopDocumentsListWithConfirmed = workshopDocumentsList.Select(x => new
|
||||
{
|
||||
EmployeeDocuments = x,
|
||||
EmployeeDocumentItemCollection = x.EmployeeDocumentItemCollection
|
||||
.Where(y => y.DocumentStatus != DocumentStatus.Unsubmitted)
|
||||
.GroupBy(y => y.DocumentLabel)
|
||||
.Select(y => y.MaxBy(z => z.CreationDate)).ToList()
|
||||
}).ToList();
|
||||
|
||||
var workshopName = _companyContext.Workshops.FirstOrDefault(x => x.id == workshopId)?.WorkshopFullName ?? "";
|
||||
|
||||
var mediaIds = workshopDocumentsList.SelectMany(x => x.EmployeeDocumentItemCollection)
|
||||
.Where(x => x.DocumentStatus != DocumentStatus.Unsubmitted).Select(x => x.MediaId).ToList();
|
||||
var mediasList = _accountContext.Medias.Where(x => mediaIds.Contains(x.id))
|
||||
.Select(x => new MediaViewModel() { Id = x.id, Path = x.Path }).ToList();
|
||||
|
||||
workshopDocumentsListWithConfirmed = workshopDocumentsListWithConfirmed.Where(x =>
|
||||
x.EmployeeDocumentItemCollection.Any(y => y.DocumentStatus == DocumentStatus.SubmittedByAdmin)).ToList();
|
||||
|
||||
return workshopDocumentsListWithConfirmed.Select(x => new EmployeeDocumentsViewModel()
|
||||
{
|
||||
Id = x.EmployeeDocuments.id,
|
||||
EmployeeFullName = employeesList.FirstOrDefault(y => y.Id == x.EmployeeDocuments.EmployeeId)?.FullName ?? "",
|
||||
EmployeeId = x.EmployeeDocuments.EmployeeId,
|
||||
WorkshopId = workshopId,
|
||||
WorkshopName = workshopName,
|
||||
Gender = x.EmployeeDocuments.Gender,
|
||||
EducationalDegree = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.EducationalDegree),
|
||||
IdCardPage1 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage1),
|
||||
IdCardPage2 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage2),
|
||||
IdCardPage3 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage3),
|
||||
IdCardPage4 = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.IdCardPage4),
|
||||
NationalCardFront = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.NationalCardFront),
|
||||
NationalCardRear = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.NationalCardRear),
|
||||
MilitaryServiceCard = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.MilitaryServiceCard),
|
||||
EmployeePicture = GetByLabelAndLoadMedia(x.EmployeeDocumentItemCollection, mediasList,
|
||||
DocumentItemLabel.EmployeePicture),
|
||||
SubmittedItemsCount = x.EmployeeDocumentItemCollection.Count(y => y.DocumentStatus == DocumentStatus.SubmittedByAdmin),
|
||||
RejectedItemsCount = x.EmployeeDocumentItemCollection.Count(y => y.DocumentStatus == DocumentStatus.Rejected),
|
||||
ConfirmedItemsCount = x.EmployeeDocumentItemCollection.Count(y => y.DocumentStatus == DocumentStatus.Confirmed),
|
||||
EmployerFullName = employerName,
|
||||
IsSentToChecker = x.EmployeeDocuments.IsSentToChecker
|
||||
}).Where(x => x.SubmittedItemsCount > 0)
|
||||
.OrderByDescending(x => x.SubmittedItemsCount).ToList();
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private static List<EmployeeDocumentItem> GetCurrentConfirmedDocumentItemsFromEmployeeDocumentItems(EmployeeDocuments entity)
|
||||
{
|
||||
return entity.EmployeeDocumentItemCollection.Where(x => x.DocumentStatus == DocumentStatus.Confirmed)
|
||||
.GroupBy(x => x.DocumentLabel)
|
||||
.Select(x => x.MaxBy(y => y.CreationDate)).ToList();
|
||||
}
|
||||
|
||||
private static List<EmployeeDocumentItem> GetAllCurrentDocuments(EmployeeDocuments entity,UserType userType)
|
||||
{
|
||||
return entity.EmployeeDocumentItemCollection.Where(x=>x.DocumentStatus != DocumentStatus.Unsubmitted || x.UploaderType == userType)
|
||||
.GroupBy(x => x.DocumentLabel).Select(x => x.OrderByDescending(y => y.CreationDate).First()).ToList();
|
||||
}
|
||||
|
||||
private static EmployeeDocumentItemViewModel GetByLabelAndLoadMedia(List<EmployeeDocumentItem> items,
|
||||
List<MediaViewModel> medias, DocumentItemLabel label)
|
||||
{
|
||||
if (items == null || items.Count == 0)
|
||||
return new();
|
||||
var item = items.FirstOrDefault(x => x.DocumentLabel == label);
|
||||
|
||||
if (item == null || item.MediaId == 0)
|
||||
return new();
|
||||
|
||||
return new EmployeeDocumentItemViewModel()
|
||||
{
|
||||
DocumentItemLabel = label,
|
||||
Id = item.id,
|
||||
StatusString = item.DocumentStatus.ToString().ToLower(),
|
||||
Status = item.DocumentStatus,
|
||||
PicturePath = medias.FirstOrDefault(x => x.Id == item.MediaId)?.Path ?? "",
|
||||
RejectionMessage = item.RejectionReason
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private static EmployeeDocumentItemViewModel GetByLabelAndLoadMedia(List<EmployeeDocumentItemViewModel> items,
|
||||
List<MediaViewModel> medias, DocumentItemLabel label)
|
||||
{
|
||||
if (items == null || items.Count == 0)
|
||||
return new();
|
||||
var item = items.FirstOrDefault(x => x.DocumentItemLabel == label);
|
||||
|
||||
if (item == null || item.MediaId == 0)
|
||||
return new();
|
||||
|
||||
item.PicturePath = medias.FirstOrDefault(x => x.Id == item.MediaId)?.Path ?? "";
|
||||
return item;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -196,7 +196,14 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
};
|
||||
}
|
||||
|
||||
public List<LeftWorkViewModel> GetLeftPersonelByWorkshopId(List<long> workshopIds)
|
||||
public List<long> GetEmployeeIdsByWorkshopIdActiveInDates(long workshopId, DateTime start, DateTime end)
|
||||
{
|
||||
return _context.LeftWorkList
|
||||
.Where(x => x.WorkshopId == workshopId && x.LeftWorkDate >= start && x.StartWorkDate.AddDays(-1) <= end)
|
||||
.GroupBy(x => x.EmployeeId).Select(x => x.Key).ToList();
|
||||
}
|
||||
|
||||
public List<LeftWorkViewModel> GetLeftPersonelByWorkshopId(List<long> workshopIds)
|
||||
{
|
||||
return _context.LeftWorkList.Select(x => new LeftWorkViewModel()
|
||||
{
|
||||
|
||||
@@ -191,6 +191,11 @@ using Company.Domain.EmployeeBankInformationAgg;
|
||||
using Company.Domain.RollCallAgg.DomainService;
|
||||
using CompanyManagment.App.Contracts.Bank;
|
||||
using CompanyManagment.App.Contracts.EmployeeBankInformation;
|
||||
using Company.Domain.EmployeeDocumentItemAgg;
|
||||
using Company.Domain.EmployeeDocumentsAdminSelectionAgg;
|
||||
using Company.Domain.EmployeeDocumentsAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocumentsAdminSelection;
|
||||
|
||||
namespace PersonalContractingParty.Config;
|
||||
|
||||
@@ -403,6 +408,13 @@ public class PersonalBootstrapper
|
||||
services.AddTransient<IAndroidApkVersionApplication, AndroidApkVersionApplication>();
|
||||
#endregion
|
||||
#region Pooya
|
||||
|
||||
services.AddTransient<IEmployeeDocumentsApplication, EmployeeDocumentsApplication>();
|
||||
services.AddTransient<IEmployeeDocumentsRepository, EmployeeDocumentsRepository>();
|
||||
services.AddTransient<IEmployeeDocumentItemRepository, EmployeeDocumentItemRepository>();
|
||||
services.AddTransient<IEmployeeDocumentsAdminSelectionRepository, EmployeeDocumentsAdminSelectionRepository>();
|
||||
services.AddTransient<IEmployeeDocumentsAdminSelectionApplication, EmployeeDocumentsAdminSelectionApplication>();
|
||||
|
||||
services.AddTransient<ICustomizeCheckoutRepository, CustomizeCheckoutRepository>();
|
||||
services.AddTransient<ICustomizeCheckoutApplication, CustomizeCheckoutApplication>();
|
||||
|
||||
|
||||
@@ -380,6 +380,7 @@
|
||||
|
||||
|
||||
<script>
|
||||
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
|
||||
//vafa After Modal fix
|
||||
// $('#MainModal').on('hidden.bs.modal', function () {
|
||||
// $("#ModalContent").html("");
|
||||
@@ -491,6 +492,135 @@
|
||||
|
||||
// }
|
||||
//});
|
||||
|
||||
_RefreshTaskCountMenu();
|
||||
function _RefreshTaskCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountTask',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_taskCountSection').hide();
|
||||
$('#_taskCount').hide();
|
||||
$('#spinnerTask').hide();
|
||||
} else {
|
||||
$('#_taskCountSection').show();
|
||||
$('#spinnerTask').hide();
|
||||
$('#_taskCount').show();
|
||||
$('#_taskCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshTicketCountMenu();
|
||||
function _RefreshTicketCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountTicket',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_ticketCountSection').hide();
|
||||
$('#spinnerTicket').hide();
|
||||
$('#_ticketCount').hide();
|
||||
} else {
|
||||
$('#_ticketCountSection').show();
|
||||
$('#spinnerTicket').hide();
|
||||
$('#_ticketCount').show();
|
||||
$('#_ticketCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshWorkFlowCountMenu();
|
||||
function _RefreshWorkFlowCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountWorkFlow',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_workFlowCountSection').hide();
|
||||
$('#spinnerWorkFlow').hide();
|
||||
$('#_workFlowCount').hide();
|
||||
} else {
|
||||
$('#_workFlowCountSection').show();
|
||||
$('#spinnerWorkFlow').hide();
|
||||
$('#_workFlowCount').show();
|
||||
$('#_workFlowCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshCheckerCountMenu();
|
||||
function _RefreshCheckerCountMenu() {
|
||||
$.ajax({
|
||||
//async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountChecker',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_checkerCountSection').hide();
|
||||
$('#_checkerCount').hide();
|
||||
$('#spinnerChecker').hide();
|
||||
} else {
|
||||
$('#_checkerCountSection').show();
|
||||
$('#spinnerChecker').hide();
|
||||
$('#_checkerCount').show();
|
||||
$('#_checkerCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Override the global fetch function to handle errors
|
||||
$.ajaxSetup({
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.status === 500) {
|
||||
try {
|
||||
const errorData = jqXHR.responseJSON;
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', errorData.message || "خطای سمت سرور");
|
||||
} catch (e) {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "خطای سمت سرور");
|
||||
console.error("Error parsing response:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -1,36 +1,28 @@
|
||||
@using System.Reflection.Metadata
|
||||
@using AccountManagement.Application.Contracts.Task
|
||||
@using AccountManagement.Application.Contracts.Ticket
|
||||
@using AccountManagement.Domain.TicketAccessAccountAgg
|
||||
@using AccountManagement.Domain.TicketAccessAccountAgg
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@*@using _0_Framework.Infrastructure*@
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@inject ITicketAccessAccountRepository TicketAccessAccount;
|
||||
@inject ITicketApplication TicketApplication;
|
||||
@inject ITaskApplication TaskApplication;
|
||||
@{
|
||||
|
||||
<style>
|
||||
.bl {
|
||||
display: block !important;
|
||||
}
|
||||
.bl {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.showCount span {
|
||||
background-color: #dd2a2a;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
.showCount span {
|
||||
background-color: #dd2a2a;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
</style>
|
||||
var currentAccout = AuthHelper.CurrentAccountInfo();
|
||||
int taskCount = TaskApplication.RequestedAndOverdueTasksCount(currentAccout.Id);
|
||||
int ticketCount = TicketApplication.GetAdminTicketsCount();
|
||||
}
|
||||
<div class="left side-menu">
|
||||
<div class="sidebar-inner slimscrollleft">
|
||||
@@ -319,8 +311,11 @@
|
||||
<span> مدیریت وظایف </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div class="showCount" permission="901" style="margin-left: 15px; visibility: @(taskCount == 0 ? "hidden" : "visible")">
|
||||
<span>@taskCount</span>
|
||||
<div id="_taskCountSection" class="showCount" permission="901" style="margin-left: 15px;">
|
||||
<span id="_taskCount" style="display: none"></span>
|
||||
<div id="spinnerTask">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<i class="md md-add"></i>
|
||||
@@ -362,8 +357,11 @@
|
||||
<span> مدیریت تیکت </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div class="showCount" style="margin-left: 15px; visibility: @(ticketCount == 0 ? "hidden" : "visible")">
|
||||
<span>@ticketCount</span>
|
||||
<div id="_ticketCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_ticketCount" style="display: none"></span>
|
||||
<div id="spinnerTicket">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<i class="md md-add"></i>
|
||||
@@ -417,19 +415,35 @@
|
||||
|
||||
</li>
|
||||
<li permission="1000">
|
||||
<a asp-area="AdminNew" asp-page="/Company/WorkFlow/Index" class="waves-effect btnWorkFlow">
|
||||
<a asp-area="AdminNew" asp-page="/Company/WorkFlow/Index" class="waves-effect btnWorkFlow" style="display: flex;align-items: center;justify-content: space-between;">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> کارپوشه </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div id="_workFlowCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_workFlowCount" style="display: none"></span>
|
||||
<div id="spinnerWorkFlow">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li permission="1100">
|
||||
<a asp-area="AdminNew" asp-page="/Company/EmployeesDocumentsManagement/Index" class="waves-effect btnWorkFlow">
|
||||
<a asp-area="AdminNew" asp-page="/Company/Checker/Index" class="waves-effect btnWorkFlow" style="display: flex;align-items: center;justify-content: space-between;">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> بررسی مدارک پرسنل </span>
|
||||
<span> بررسی توسط ناظر </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div id="_checkerCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_checkerCount" style="display: none"></span>
|
||||
<div id="spinnerChecker">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.Checker.IndexModel
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
ViewData["Title"] = " - " + "بررسی توسط ناظر";
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/assetsclient/css/card.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<style>
|
||||
.countNumber span {
|
||||
background-color: #dd2a2a;
|
||||
width: 28px;
|
||||
display: flex;
|
||||
height: 28px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 24px;
|
||||
margin: 0 0 0 12px;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/workflow.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">بررسی توسط ناظر</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="profile-header position-relative">
|
||||
<img src="~/AssetsClient/images/profile-header.png" alt="" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Start Card Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="d-grid card-area-workflow gap-2 p-0">
|
||||
|
||||
<div class="gwb-card">
|
||||
<a asp-page="/Company/EmployeesDocumentsManagement/Index" asp-area="AdminNew" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-between p-1 w-100">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~/AssetsClient/images/insuranceList.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">بررسی مدارک پرسنل</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.UploadDocumentCheckerCount != 0)
|
||||
{
|
||||
<div class="countNumber">
|
||||
<span>
|
||||
@(Model.UploadDocumentCheckerCount > 99 ? "+99" : Model.UploadDocumentCheckerCount)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Card Items -->
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using WorkFlow.Application.Contracts.AdminWorkFlow;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.Checker
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IAdminWorkFlowApplication _adminWorkFlowApplication;
|
||||
|
||||
public int UploadDocumentCheckerCount;
|
||||
|
||||
public IndexModel(IAdminWorkFlowApplication adminWorkFlowApplication)
|
||||
{
|
||||
_adminWorkFlowApplication = adminWorkFlowApplication;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
UploadDocumentCheckerCount = _adminWorkFlowApplication.GetWorkFlowCountForChecker();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,204 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocuments.EmployeeListModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
Layout = "Shared/_Layout";
|
||||
ViewData["title"] = " - لیست کل پرسنل";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/card.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsAdminNew/EmployeesDocument/css/EmployeeList.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/list-info-personnel.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">اطلاعات مدارک پرسنل</h4>
|
||||
@* <div>@Model.WorkshopFullname</div> *@
|
||||
<div>@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-area="Admin" asp-page="/Company/Workshops/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="align-items-center d-flex justify-content-start gap-2 px-3 py-2">
|
||||
<button data-mode="active" class="btnTabPD active">پرسنل های فعال</button>
|
||||
<button data-mode="deactive" class="btnTabPD">پرسنل های غیر فعال</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop">
|
||||
<div class="d-flex align-items-center">
|
||||
<span>برو بالا</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="container-fluid d-none d-md-block">
|
||||
<div class="row px-2">
|
||||
<div class="search-box card">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row search-personal-section gap-2">
|
||||
|
||||
<div class="col-3">
|
||||
<input type="text" name="employeeName" class="form-control employeeName" placeholder="نام و نام خانوادگی پرسنل ...">
|
||||
</div>
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<span>جستجو</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white"/>
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable">
|
||||
<span>حذف جستجو</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="d-block d-md-none mb-1">
|
||||
<div class="row d-flex align-items-center justify-content-between">
|
||||
<div class="search-box bg-white p-2">
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
<div class="row p-lg-2">
|
||||
<div class="card p-2">
|
||||
<div class="wrapper">
|
||||
<div class="personnelDocuments Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام و نام خانوادگی</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">عکس پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading text-center width4">کارت ملی</div>
|
||||
<div class="Rtable-cell column-heading text-center width5">کارت پایان خدمت</div>
|
||||
<div class="Rtable-cell column-heading text-center width6">شناسنامه</div>
|
||||
<div class="Rtable-cell column-heading text-end pe-2 width7">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" id="personnelDocumentsAjax">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Modal From Bottom For Advance Search -->
|
||||
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header d-block text-center pb-0">
|
||||
<div class="iphone-line mx-auto mb-3"></div>
|
||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body pt-0 mb-3">
|
||||
<div class="container-fluid search-box">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div><input type="text" name="employeeName" class="form-control employeeName" placeholder="نام پرسنل"></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="btn-clear-filter py-2 text-center d-block w-100 mt-2">
|
||||
<span class="w-100">حذف جستجو</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="submit" class="btn-search btn-search-click w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
<div id="MainModal" class="modal fade personalListModal" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xxl modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="Model.HasEmployees" value="Model.HasEmployees" id="hasEmployee" />
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var employeeDocumentsAjaxLoadData = `@Url.Page("./EmployeeList", "EmployeeDocumentsAjax")`;
|
||||
var showPictureUrl = `@Url.Page("./EmployeeList", "ShowPicture")`;
|
||||
var workshopId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
|
||||
<script src="~/AssetsAdminNew/employeesdocument/js/EmployeeList.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,174 @@
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocuments
|
||||
{
|
||||
public class EmployeeListModel : PageModel
|
||||
{
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
public long WorkshopId { get; set; }
|
||||
public string WorkshopFullName;
|
||||
|
||||
public EmployeeListModel(IWorkshopApplication workshopApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IEmployeeApplication employeeApplication, IAuthHelper authHelper, IPasswordHasher passwordHasher, IWebHostEnvironment webHostEnvironment)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
}
|
||||
|
||||
public IActionResult OnGet(long workshopId)
|
||||
{
|
||||
|
||||
if (workshopId <= 0)
|
||||
return BadRequest();
|
||||
|
||||
WorkshopId = workshopId;
|
||||
var workshopInfo = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
WorkshopFullName = workshopInfo.WorkshopFullName;
|
||||
return Page();
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeDocumentsAjax(long workshopId,string employeeName, int pageIndex, string searchMode = "")
|
||||
{
|
||||
if (workshopId > 0)
|
||||
{
|
||||
EmployeeDocumentSearchMode mode;
|
||||
switch (searchMode.ToLower())
|
||||
{
|
||||
case "all":
|
||||
mode = EmployeeDocumentSearchMode.All;
|
||||
break;
|
||||
case "active":
|
||||
mode = EmployeeDocumentSearchMode.ActiveEmployees;
|
||||
break;
|
||||
case "deactive":
|
||||
mode = EmployeeDocumentSearchMode.DeactiveEmployees;
|
||||
break;
|
||||
default:
|
||||
mode = EmployeeDocumentSearchMode.All;
|
||||
break;
|
||||
}
|
||||
|
||||
List<EmployeeDocumentsViewModel> result = _employeeDocumentsApplication.SearchForAdmin(new SearchEmployeeDocuments()
|
||||
{
|
||||
WorkshopId = workshopId,
|
||||
PageIndex = pageIndex,
|
||||
EmployeeName = employeeName
|
||||
}, mode);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
data = result,
|
||||
pageIndex = result.Count()
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public IActionResult OnGetCreateUploadDocument(long workshopId,long employeeId)
|
||||
{
|
||||
if (workshopId <= 0)
|
||||
{
|
||||
var resultError = new ErrorViewModel()
|
||||
{
|
||||
Message = "کارگاه شما یافت نشد"
|
||||
};
|
||||
return Partial("../Error/_ErrorModal", resultError);
|
||||
}
|
||||
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForAdmin(employeeId, workshopId);
|
||||
|
||||
return Partial("ModalUploadDocument", employeeDocument);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateUploadDocument(AddEmployeeDocumentItem command)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.AddEmployeeDocumentItemForAdmin(command);
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForAdmin(command.EmployeeId, command.WorkshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
imageSrc = employeeDocument
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployeeDocumentByLabel(long workshopId,long employeeId, DocumentItemLabel label)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.RemoveClientDocumentItemsByAdminTemp(workshopId, employeeId, label);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostRemoveClientEmployeeDocumentItemsByLabels(long workshopId, long employeeId, List<DocumentItemLabel> labels)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.RemoveClientDocumentItemsByAdmin(workshopId, employeeId, labels);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostCancelOperation(long workshopId, long employeeId)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.DeleteUnsubmittedItems(workshopId, employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostSaveSubmit(SubmitEmployeeDocuments cmd)
|
||||
{
|
||||
|
||||
var result = _employeeDocumentsApplication.SubmitDocumentItemsByAdmin(cmd);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetShowPicture(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
return NotFound();
|
||||
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
return NotFound();
|
||||
|
||||
var contentType = Tools.GetContentTypeImage(Path.GetExtension(filePath));
|
||||
return PhysicalFile(filePath, contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,457 @@
|
||||
@using System.Reflection
|
||||
@using _0_Framework.Application
|
||||
@using CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.EmployeeDocuments.EmployeeDocumentsViewModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/AssetsAdminNew/employeesdocument/css/ModalUploadDocument.css?ver=@adminVersion" 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"><span class="">برسی مدارک </span> @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("./EmployeeList", "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>
|
||||
@if(Model.EmployeePicture.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.EmployeePicture.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeeList", "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>
|
||||
@if(Model.NationalCardFront.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.NationalCardFront.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeeList", "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>
|
||||
@if (Model.NationalCardRear.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.NationalCardRear.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeeList", "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>
|
||||
@if (Model.MilitaryServiceCard.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.MilitaryServiceCard.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeeList", "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>
|
||||
@if (Model.IdCardPage1.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage1.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeeList", "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>
|
||||
@if (Model.IdCardPage2.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage2.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeeList", "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>
|
||||
@if (Model.IdCardPage3.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage3.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeeList", "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>
|
||||
@if (Model.IdCardPage4.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage4.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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 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=@adminVersion"></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 antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var saveUploadFileModalAjax = `@Url.Page("./EmployeeList", "CreateUploadDocument")`;
|
||||
var saveSubmitAjax = `@Url.Page("./EmployeeList", "SaveSubmit")`;
|
||||
var deleteFileAjaxUrl = `@Url.Page("./EmployeeList", "RemoveEmployeeDocumentByLabel")`;
|
||||
var cancelOperationUrl = `@Url.Page("./EmployeeList", "CancelOperation")`;
|
||||
var employeeId = Number(@Model.EmployeeId);
|
||||
var workshopId = Number(@Model.WorkshopId);
|
||||
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="~/AssetsAdminNew/employeesdocument/js/ModalUploadDocument.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,431 @@
|
||||
@model CompanyManagment.App.Contracts.EmployeeDocuments.EmployeeDocumentsViewModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
<link href="~/AssetsAdminNew/EmployeesDocumentsManagement/css/DetailsPersonelModal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
<style>
|
||||
.sweet-alert button.cancel, .sweet-alert button.confirm {
|
||||
font-family: 'IRANYekanX', serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div>
|
||||
<input type="hidden" id="employeeID" value="@Model.EmployeeId"/>
|
||||
<input type="hidden" id="workshopId" value="@Model.WorkshopId" />
|
||||
<div>
|
||||
<div style="margin: 0 auto;" class="headerModal row align-items-center my-2">
|
||||
<div class="col" style="cursor: pointer;">
|
||||
<svg data-bs-dismiss="modal" width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18 31.5C16.2272 31.5 14.4717 31.1508 12.8338 30.4724C11.1959 29.7939 9.70765 28.7995 8.45406 27.5459C7.20047 26.2923 6.20606 24.8041 5.52763 23.1662C4.84919 21.5283 4.5 19.7728 4.5 18C4.5 16.2272 4.84919 14.4717 5.52763 12.8338C6.20607 11.1959 7.20047 9.70765 8.45406 8.45406C9.70765 7.20047 11.1959 6.20606 12.8338 5.52763C14.4717 4.84919 16.2272 4.5 18 4.5C19.7728 4.5 21.5283 4.84919 23.1662 5.52763C24.8041 6.20607 26.2924 7.20047 27.5459 8.45406C28.7995 9.70765 29.7939 11.1959 30.4724 12.8338C31.1508 14.4717 31.5 16.2272 31.5 18C31.5 19.7728 31.1508 21.5283 30.4724 23.1662C29.7939 24.8041 28.7995 26.2924 27.5459 27.5459C26.2923 28.7995 24.8041 29.7939 23.1662 30.4724C21.5283 31.1508 19.7728 31.5 18 31.5L18 31.5Z" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M13.5 13.5L22.5 22.5" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M22.5 13.5L13.5 22.5" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="col text-center detailTitle">
|
||||
<h5><span class="d-none d-sm-inline"> برسی مدارک</span> @Model.EmployeeFullName</h5>
|
||||
</div>
|
||||
<div class="col">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 navbar-details-menu w-100">
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_0" value=""/>
|
||||
<button class="mg-btn @Model.EmployeePicture.StatusString" data-document-btn-id="@Model.EmployeePicture.Id" type="button" data-slide-index="0">عکس پرسنلی</button>
|
||||
<span class="sign">
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_1" value=""/>
|
||||
<button class="mg-btn @Model.NationalCardFront.StatusString" data-document-btn-id="@Model.NationalCardFront.Id" type="button" data-slide-index="1">کارت ملی رو</button>
|
||||
<span class="sign">
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_2" value=""/>
|
||||
<button class="mg-btn @Model.NationalCardRear.StatusString" data-document-btn-id="@Model.NationalCardRear.Id" type="button" data-slide-index="2">کارت ملی پشت</button>
|
||||
<span class="sign">
|
||||
</span>
|
||||
</div>
|
||||
@if (Model.Gender != "زن")
|
||||
{
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_3" value=""/>
|
||||
<button class="mg-btn @Model.MilitaryServiceCard.StatusString" data-document-btn-id="@Model.MilitaryServiceCard.Id" type="button" data-slide-index=3>کارت پایان خدمت</button>
|
||||
<span class="sign">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_4" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage1.StatusString" data-document-btn-id="@Model.IdCardPage1.Id" type="button" data-slide-index=4>شناسنامه صفحه 1</button>
|
||||
<span class="sign">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_5" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage2.StatusString" data-document-btn-id="@Model.IdCardPage2.Id" type="button" data-slide-index=5>شناسنامه صفحه 2</button>
|
||||
<span class="sign"></span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_6" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage3.StatusString" data-document-btn-id="@Model.IdCardPage3.Id" type="button" data-slide-index=6>شناسنامه صفحه 3</button>
|
||||
<span class="sign">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_7" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage4.StatusString" data-document-btn-id="@Model.IdCardPage4.Id" type="button" data-slide-index=7>شناسنامه صفحه 4</button>
|
||||
<span class="sign"></span>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_4" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage1.StatusString" data-document-btn-id="@Model.IdCardPage1.Id" type="button" data-slide-index=3>شناسنامه صفحه 1</button>
|
||||
<span class="sign">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_5" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage2.StatusString" data-document-btn-id="@Model.IdCardPage2.Id" type="button" data-slide-index=4>شناسنامه صفحه 2</button>
|
||||
<span class="sign"></span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_6" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage3.StatusString" data-document-btn-id="@Model.IdCardPage3.Id" type="button" data-slide-index=5>شناسنامه صفحه 3</button>
|
||||
<span class="sign">
|
||||
|
||||
</span>
|
||||
</div>
|
||||
<div class="signHolder">
|
||||
<input type="hidden" id="label_7" value=""/>
|
||||
<button class="mg-btn @Model.IdCardPage4.StatusString" data-document-btn-id="@Model.IdCardPage4.Id" type="button" data-slide-index=6>شناسنامه صفحه 4</button>
|
||||
<span class="sign"></span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-6 col-lg-6 col-md-12 rightside row">
|
||||
<div class="col-12 text-center">
|
||||
<div class="sliderImg d-flex overflow-auto " dir="rtl">
|
||||
<div id="carouselExampleIndicators" class="carousel slide m-auto w-100" data-ride="carousel" dir="rtl">
|
||||
<input type="hidden" id="gender" value="@Model.Gender"/>
|
||||
<div class="carousel-inner" dir="rtl">
|
||||
<div class="carousel-item" data-slide-index="0" data-document-id="@Model.EmployeePicture.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.EmployeePicture.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.EmployeePicture.PicturePath })" alt="عکس پرسنل"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="1" data-document-id="@Model.NationalCardFront.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.NationalCardFront.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.NationalCardFront.PicturePath })" alt="عکس کارت ملی رو"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="2" data-document-id="@Model.NationalCardRear.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.NationalCardRear.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.NationalCardRear.PicturePath })" alt="عکس کارت ملی پشت"/>
|
||||
</div>
|
||||
@if (Model.Gender != "زن")
|
||||
{
|
||||
<div class="carousel-item" data-slide-index="3" data-document-id="@Model.MilitaryServiceCard.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.MilitaryServiceCard.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.MilitaryServiceCard.PicturePath })" alt="عکس کارت پایان خدمت"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="4" data-document-id="@Model.IdCardPage1.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage1.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage1.PicturePath })" alt="عکس شناسنامه صفحه1"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="5" data-document-id="@Model.IdCardPage2.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage2.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage2.PicturePath })" alt="عکس شناسنامه صفحه2"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="6" data-document-id="@Model.IdCardPage3.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage3.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage3.PicturePath })" alt="عکس شناسنامه صفحه3"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="7" data-document-id="@Model.IdCardPage4.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage4.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage4.PicturePath })" alt="عکس شناسنامه صفحه4"/>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="carousel-item" data-slide-index="3" data-document-id="@Model.IdCardPage1.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage1.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage1.PicturePath })" alt="عکس شناسنامه صفحه1"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="4" data-document-id="@Model.IdCardPage2.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage2.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage2.PicturePath })" alt="عکس شناسنامه صفحه2"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="5" data-document-id="@Model.IdCardPage3.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage3.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage3.PicturePath })" alt="عکس شناسنامه صفحه3"/>
|
||||
</div>
|
||||
<div class="carousel-item" data-slide-index="6" data-document-id="@Model.IdCardPage4.Id">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage4.PicturePath })" data-imgsrc="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage4.PicturePath })" alt="عکس شناسنامه صفحه4"/>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center gap-5 align-items-center d-none d-lg-flex d-xl-flex ">
|
||||
<div>
|
||||
<div class="arrow right-arrow">
|
||||
<svg width="35px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 25 25" stroke-width="2" stroke="currentColor" class="fs-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m8.25 4.5 7.5 7.5-7.5 7.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" d-flex justify-content-between align-items-center w-50">
|
||||
<div class="slective-slide" data-slide-index="0"></div>
|
||||
<div class="slective-slide" data-slide-index="1"></div>
|
||||
<div class="slective-slide" data-slide-index="2"></div>
|
||||
@if (Model.Gender != "زن")
|
||||
{
|
||||
<div class="slective-slide" style="display: @(Model.Gender == "زن" ? "none" : "")" data-slide-index=3></div>
|
||||
<div class="slective-slide" data-slide-index="4"></div>
|
||||
<div class="slective-slide" data-slide-index=5></div>
|
||||
<div class="slective-slide" data-slide-index=6></div>
|
||||
<div class="slective-slide active-select" data-slide-index=7></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="slective-slide" data-slide-index=3></div>
|
||||
<div class="slective-slide" data-slide-index=4></div>
|
||||
<div class="slective-slide" data-slide-index=5></div>
|
||||
<div class="slective-slide active-select" data-slide-index=6></div>
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<div class="arrow left-arrow">
|
||||
<svg width="35px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="fs-2">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5 8.25 12l7.5-7.5"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-6 col-lg-6 col-md-12 leftside">
|
||||
<div class="row ">
|
||||
<div class="col-12 mb-3 text-center fs-5 fw-bold d-none d-lg-block">
|
||||
مشخصات پرسنل
|
||||
</div>
|
||||
<div class="col-6 position-relative details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm ">
|
||||
جنسیت
|
||||
</label>
|
||||
<input type="text" class="form-control" style="pointer-events: none;" value="">
|
||||
</div>
|
||||
<div class="d-flex w-50 gap-4 mg-btn2s">
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.Gender == "مرد" ? "checked" : "disabled") type="radio" name="flexRadioDefaultFirst" id="flexRadioDefault1" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault1">
|
||||
آقا
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.Gender == "زن" ? "checked" : "disabled") type="radio" name="flexRadioDefaultFirst" id="flexRadioDefault2" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault2">
|
||||
خانم
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 position-relative details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
ملیت
|
||||
</label>
|
||||
<input type="text" class="form-control" style="pointer-events: none;" value="">
|
||||
</div>
|
||||
<div class="d-flex gap-2 mg-btn2s2" style="width: 60%;">
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.Nationality == "ایرانی" ? "checked" : "disabled") type="radio" name="flexRadioDefaultSecond" id="flexRadioDefault3" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault3">
|
||||
ایرانی
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.Nationality == "غیر ایرانی" ? "checked" : "disabled") type="radio" name="flexRadioDefaultSecond" id="flexRadioDefault4" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault4">
|
||||
غیر ایرانی
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
نام
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.EmployeeFName" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
نام خانوادگی
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.EmployeeLName" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
کد ملی
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.NationalCode" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
شماره شناسنامه
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.IdNumber" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
نام پدر
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.FatherName" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
تاریخ تولد
|
||||
</label>
|
||||
<input type="text" class="form-control" value="@Model.DateOfBirth" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 position-relative details">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm">
|
||||
وضعیت تاهل
|
||||
</label>
|
||||
<input type="text" class="form-control" style="pointer-events: none;" value="" readonly>
|
||||
</div>
|
||||
<div class="d-flex w-50 gap-3 gap-lg-2 mg-btn2s">
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.MaritalStatus == "مجرد" ? "checked" : "disabled") type="radio" name="flexRadioDefaultThird" id="flexRadioDefault5" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault5">
|
||||
مجرد
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check d-flex gap-1">
|
||||
<input class="form-check-input" @(Model.MaritalStatus == "متاهل" ? "checked" : "disabled") type="radio" name="flexRadioDefaultThird" id="flexRadioDefault6" readonly>
|
||||
<label class="form-check-label" for="flexRadioDefault6">
|
||||
متاهل
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" value=""/>
|
||||
<div class="col-6 details" style="display: @(Model.Gender == "زن" ? "none" : "")">
|
||||
<div class="form-group d-flex p-0">
|
||||
<label class="titleForm2">
|
||||
نظام وظیفه
|
||||
</label>
|
||||
@* here changes to slecet options*@
|
||||
<select class="form-select form-select-sm" aria-label="Small select example" id="militaryStatus" asp-for="@Model.MilitaryServiceStatus" aria-readonly readonly>
|
||||
|
||||
<option value="مشمول">مشمول</option >
|
||||
<option value="پایان خدمت">پایان خدمت</option>
|
||||
<option value="معاف">معاف</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="documentId" value="@Model.Id"/>
|
||||
<div class="operationPartition">
|
||||
<div style="display: none" id="overlayModalUpload"></div>
|
||||
<div class=" operaion-tab responsiveInMobile">
|
||||
<div class="mb-2 tozihat mt-md-2">در صورت عدم تایید برای پرسنل توضیحات بگذارید.</div>
|
||||
<div class="closePartition d-none">
|
||||
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5278 21.4139C11.3225 21.4139 10.1291 21.1765 9.01562 20.7153C7.90213 20.2541 6.8904 19.5781 6.03817 18.7258C5.18595 17.8736 4.50993 16.8619 4.04871 15.7484C3.58748 14.6349 3.3501 13.4415 3.3501 12.2363C3.3501 11.031 3.58749 9.8376 4.04871 8.72412C4.50993 7.61063 5.18595 6.59889 6.03817 5.74667C6.8904 4.89444 7.90214 4.21842 9.01562 3.7572C10.1291 3.29598 11.3225 3.05859 12.5278 3.05859C13.733 3.05859 14.9264 3.29598 16.0399 3.7572C17.1534 4.21842 18.1651 4.89445 19.0173 5.74667C19.8696 6.5989 20.5456 7.61063 21.0068 8.72412C21.468 9.8376 21.7054 11.031 21.7054 12.2363C21.7054 13.4415 21.468 14.6349 21.0068 15.7484C20.5456 16.8619 19.8696 17.8736 19.0173 18.7258C18.1651 19.5781 17.1534 20.2541 16.0399 20.7153C14.9264 21.1765 13.733 21.4139 12.5278 21.4139L12.5278 21.4139Z" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M9.46851 9.17773L15.5869 15.2962" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M15.587 9.17773L9.4686 15.2962" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="actionHolder gap-1">
|
||||
<div class="operationDesc">
|
||||
<textarea class="col-12 desc" type="text" id="message" placeholder="توضیحات" style="resize: none; padding: 5px; font-size: 14px;"></textarea>
|
||||
</div>
|
||||
<div class="operationRejectAndAccept ">
|
||||
<div class="operationAccept mb-2">
|
||||
<button class=" actions accept" id="confirm" onclick="confirmAjax()">تایید</button>
|
||||
</div>
|
||||
<div class="operationAccept">
|
||||
<button class=" actions reject" id="reject" onclick="rejectAjax()">رد</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="closePartition " id="closePartition">بستن</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="mb-2 buttonsActionsParent text-center ">
|
||||
<button class="exitModal buttonsActions mb-3 mt-4" type="button">انصراف</button>
|
||||
<button class="operationBtn buttonsActions mb-3 mt-4 d-inline d-md-none" id="operationBtn" type="button">عملیات</button>
|
||||
<button class="operationBtn buttonsActions mb-3 mt-4" id="submitOP" type="button" onclick="submitOP()">ثبت نهایی</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@* <section class="gallery mt-5">
|
||||
<section class="p-0 container">
|
||||
<div class="row d-flex">
|
||||
<div class=" col-12 col-md-4 p-3">
|
||||
<div class="lightbox_img_wrap">
|
||||
<img class="lightbox-enabled" src="@Url.Page("./EmployeesList", "ShowPicture", new { filePath = Model.IdCardPage4.PicturePath })" alt="عکس شناسنامه صفحه4"
|
||||
data-imgsrc="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="lightbox-container">
|
||||
|
||||
<span id="close" class="close material-icons material-symbols-outlined">
|
||||
<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M18 31.5C16.2272 31.5 14.4717 31.1508 12.8338 30.4724C11.1959 29.7939 9.70765 28.7995 8.45406 27.5459C7.20047 26.2923 6.20606 24.8041 5.52763 23.1662C4.84919 21.5283 4.5 19.7728 4.5 18C4.5 16.2272 4.84919 14.4717 5.52763 12.8338C6.20607 11.1959 7.20047 9.70765 8.45406 8.45406C9.70765 7.20047 11.1959 6.20606 12.8338 5.52763C14.4717 4.84919 16.2272 4.5 18 4.5C19.7728 4.5 21.5283 4.84919 23.1662 5.52763C24.8041 6.20607 26.2924 7.20047 27.5459 8.45406C28.7995 9.70765 29.7939 11.1959 30.4724 12.8338C31.1508 14.4717 31.5 16.2272 31.5 18C31.5 19.7728 31.1508 21.5283 30.4724 23.1662C29.7939 24.8041 28.7995 26.2924 27.5459 27.5459C26.2923 28.7995 24.8041 29.7939 23.1662 30.4724C21.5283 31.1508 19.7728 31.5 18 31.5L18 31.5Z" stroke="#33363F" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M13.5 13.5L22.5 22.5" stroke="#33363F" stroke-width="2" stroke-linecap="round" />
|
||||
<path d="M22.5 13.5L13.5 22.5" stroke="#33363F" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
<div class="lightbox-image-wrapper">
|
||||
<img alt="lightboximage" class="lightbox-image">
|
||||
</div>
|
||||
</section> *@
|
||||
|
||||
<!-- You'll need to add Google Icons to your project for the icons I use. Or use whatever you'd like. I'm a developer; not your mom -->
|
||||
<section class="lightbox-container">
|
||||
<div class="lightbox-image-wrapper">
|
||||
<img alt="lightboximage" class="lightbox-image">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
|
||||
<script src="~/assetsadminnew/libs/sweetalert2/sweetalert2.all.min.js"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var saveUploadFileModalAjax = `@Url.Page("./EmployeesList", "CreateUploadDocument")`;
|
||||
var deleteFileAjaxUrl = `@Url.Page("./EmployeesList", "RemoveEmployeeDocumentByLabel")`;
|
||||
// var rejectUrl = `@Url.Page("./EmployeesList", "Reject")`;
|
||||
// var confirmUrl = `@Url.Page("./EmployeesList", "Confirm")`;
|
||||
var submitAll = `@Url.Page("./EmployeesList", "SubmitCheckerOperation")`;
|
||||
var employeeId = $("#employeeID").val();
|
||||
var workshopId = $("#workshopId").val();
|
||||
</script>
|
||||
|
||||
<script src="~/AssetsAdminNew/EmployeesDocumentsManagement/js/DetailsPersonnelModal.js?ver=@adminVersion"></script>
|
||||
@@ -0,0 +1,200 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocumentsManagement.EmployeesListModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
Layout = "Shared/_Layout";
|
||||
ViewData["title"] = " - لیست کل پرسنل";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/card.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsAdminNew/EmployeesDocumentsManagement/css/EmployeesList.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/list-info-personnel.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">اطلاعات مدارک پرسنل</h4>
|
||||
<div>@Model.WorkshopFullname</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-area="AdminNew" asp-page="/Company/EmployeesDocumentsManagement/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="align-items-center d-flex justify-content-start gap-2 px-3 py-2">
|
||||
<button data-mode="all" id="all" class="btnTabPD active">مدارک دریافت شده</button>
|
||||
<button data-mode="active" id="taeed" class="btnTabPD">مدارک تایید شده</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop">
|
||||
<div class="d-flex align-items-center">
|
||||
<span>برو بالا</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<div class="container-fluid d-none d-md-block">
|
||||
<div class="row px-2">
|
||||
<div class="search-box card">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row search-personal-section gap-2">
|
||||
|
||||
<div class="col-3">
|
||||
<input type="text" name="employeeName" class="form-control employeeName" placeholder="نام و نام خانوادگی پرسنل ...">
|
||||
</div>
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<span>جستجو</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable">
|
||||
<span>حذف جستجو</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="d-block d-md-none mb-1">
|
||||
<div class="row d-flex align-items-center justify-content-between">
|
||||
<div class="search-box bg-white p-2">
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
<div class="row p-lg-2">
|
||||
<div class="card p-2">
|
||||
<div class="wrapper">
|
||||
<div class="personnelDocuments Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام کارفرما</div>
|
||||
<div class="Rtable-cell column-heading text-start width3">نام کارگاه</div>
|
||||
<div class="Rtable-cell column-heading text-start width4">نام پرسنل</div>
|
||||
<div class="Rtable-cell column-heading text-center width5">درحال برسی</div>
|
||||
<div class="Rtable-cell column-heading text-center width6"></div>
|
||||
<div class="Rtable-cell column-heading text-center width7"></div>
|
||||
<div class="Rtable-cell column-heading text-end width8">عملیات</div>
|
||||
</div>
|
||||
|
||||
<div class="w-100" id="personnelDocumentsAjax">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Modal From Bottom For Advance Search -->
|
||||
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header d-block text-center pb-0">
|
||||
<div class="iphone-line mx-auto mb-3"></div>
|
||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body pt-0 mb-3">
|
||||
<div class="container-fluid search-box">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div><input type="text" name="employeeName" class="form-control employeeName" placeholder="نام پرسنل"></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="btn-clear-filter py-2 text-center d-block w-100 mt-2">
|
||||
<span class="w-100">حذف جستجو</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="submit" class="btn-search btn-search-click w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
<div id="MainModal" class="modal fade personalListModal" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xxl modal-dialog-centered modal-dialog-scrollable">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="Model.HasEmployees" value="Model.HasEmployees" id="hasEmployee" />
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var employeeDocumentsAjaxLoadData = `@Url.Page("./EmployeesList", "EmployeeDocumentsAjax")`;
|
||||
var showPictureUrl = `@Url.Page("./EmployeesList", "ShowPicture")`;
|
||||
var workshopId = Number(@Model.WorkshopId);
|
||||
</script>
|
||||
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
|
||||
<script src="~/AssetsAdminNew/EmployeesDocumentsManagement/js/EmployeesList.js?ver=@adminVersion"></script>
|
||||
|
||||
@@ -0,0 +1,206 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
using CompanyManagment.Application;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocumentsManagement
|
||||
{
|
||||
public class EmployeesListModel : PageModel
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullname;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
|
||||
public EmployeesListModel(IWorkshopApplication workshopApplication, IEmployeeDocumentsApplication employeeDocumentsApplication,
|
||||
IEmployeeApplication employeeApplication, IAuthHelper authHelper)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public void OnGet(long workshopId)
|
||||
{
|
||||
var workshop = _workshopApplication.GetWorkshopInfo(workshopId);
|
||||
WorkshopId = workshopId;
|
||||
WorkshopFullname = workshop.WorkshopFullName;
|
||||
}
|
||||
|
||||
public IActionResult OnGetDetailsPersonnelModal(long workshopId,long employeeId)
|
||||
{
|
||||
var details = _employeeDocumentsApplication.GetDetailsForChecker(employeeId, workshopId);
|
||||
return Partial("DetailsPersonnelModal",details);
|
||||
}
|
||||
|
||||
public IActionResult OnGetEmployeeDocumentsAjax(long workshopId, string employeeName, int pageIndex, bool confirmedOnly=false)
|
||||
{
|
||||
if (workshopId > 0)
|
||||
{
|
||||
|
||||
var employeeItems =
|
||||
_employeeDocumentsApplication.GetByWorkshopIdWithItemsForChecker(workshopId, confirmedOnly);
|
||||
|
||||
|
||||
|
||||
//List<EmployeeDocumentsViewModel> result = _employeeDocumentsApplication.Search(new SearchEmployeeDocuments()
|
||||
//{
|
||||
// WorkshopId = workshopId,
|
||||
// PageIndex = pageIndex,
|
||||
// EmployeeName = employeeName
|
||||
//}, mode);
|
||||
|
||||
//List<EmployeeDocumentsViewModel> test =
|
||||
//[
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "محمد تستی",
|
||||
// EmployeeId = 1,
|
||||
// Gender = "مرد",
|
||||
// Id = 1
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "شهناز تستی",
|
||||
// EmployeeId = 2,
|
||||
// Gender = "زن",
|
||||
// Id = 2
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "رضا تستی",
|
||||
// EmployeeId = 3,
|
||||
// Gender = "مرد",
|
||||
// Id = 3
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "امیر تستی",
|
||||
// EmployeeId = 4,
|
||||
// Gender = "مرد",
|
||||
// Id = 4
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "2شهناز تستی",
|
||||
// EmployeeId = 5,
|
||||
// Gender = "زن",
|
||||
// Id = 5
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "شهناز تستی3",
|
||||
// EmployeeId = 6,
|
||||
// Gender = "زن",
|
||||
// Id = 6
|
||||
// },
|
||||
// new EmployeeDocumentsViewModel()
|
||||
// {
|
||||
// EmployeeFullName = "4شهناز تستی",
|
||||
// EmployeeId = 7,
|
||||
// Gender = "مرد",
|
||||
// Id = 7
|
||||
// }
|
||||
|
||||
//];
|
||||
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
data = employeeItems,
|
||||
//pageIndex = test.Count()
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
}
|
||||
public IActionResult OnGetEmployeeDocument(long workshopId, long employeeId)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.GetDetailsForChecker(workshopId, employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
result = result
|
||||
});
|
||||
}
|
||||
// public IActionResult OnPostConfirm(long documentItemId)
|
||||
// {
|
||||
// var command = new ConfirmDocumentItem() { EmployeeDocumentItemId = documentItemId};
|
||||
// var result = _employeeDocumentsApplication.ConfirmDocumentItem(command);
|
||||
// return new JsonResult(new
|
||||
// {
|
||||
//success = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
// }
|
||||
|
||||
public IActionResult OnGetEmployeeInfo(long employeeId)
|
||||
{
|
||||
EditEmployee employees = _employeeApplication.GetDetails(employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
result = employees
|
||||
});
|
||||
}
|
||||
|
||||
//public IActionResult OnPostReject(long documentItemId, string message)
|
||||
//{
|
||||
// var command = new RejectDocumentItem() { EmployeeDocumentItemId = documentItemId, Message = message };
|
||||
// var result = _employeeDocumentsApplication.RejectDocumentItem(command); return new JsonResult(new
|
||||
// {
|
||||
// success = result.IsSuccedded,
|
||||
// message = result.Message
|
||||
// });
|
||||
//}
|
||||
public IActionResult OnPostSubmitCheckerOperation(long workshopId,long employeeId,List<CheckerDocumentItemOperation> operations)
|
||||
{
|
||||
var command = new CheckerDocumentsOperation()
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
Operations = operations
|
||||
};
|
||||
var result = _employeeDocumentsApplication.SubmitCheckerOperation(command);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnGetShowPicture(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
return NotFound();
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
return NotFound();
|
||||
|
||||
var contentType = Tools.GetContentTypeImage(Path.GetExtension(filePath));
|
||||
return PhysicalFile(filePath, contentType);
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployeeDocumentByLabel(long workshopId, long employeeId, DocumentItemLabel label)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.DeleteEmployeeMultipleUnsubmittedDocumentsByLabel(workshopId, employeeId, label);
|
||||
return new JsonResult(new
|
||||
{
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocumentsManagement.IndexModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
Layout = "Shared/_Layout";
|
||||
ViewData["title"] = " - لیست کل پرسنل";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/card.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsAdminNew/EmployeesDocumentsManagement/css/Index.css?ver=@adminVersion" rel="stylesheet" />
|
||||
|
||||
<style>
|
||||
.btn-ticket-detail {
|
||||
background: rgba(93, 209, 52, 0.3);
|
||||
border: 0.5px solid #2E8F2F54;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #ffffff;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:first-child {
|
||||
background: linear-gradient(180deg, #41D1D1 0%, #2CD0D0 100%) ;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/list-info-personnel.png" alt="" class="img-fluid me-2" style="width: 45px;"/>
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">برسی اطلاعات مدارک پرسنل</h4>
|
||||
<div>انتخاب کارگاه ها</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-area="Admin" asp-page="/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@* <div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="align-items-center d-flex justify-content-start gap-2 px-3 py-2">
|
||||
<button data-mode="all" class="btnTabPD active">همه پرسنل ها</button>
|
||||
<button data-mode="active" class="btnTabPD">پرسنل های فعال</button>
|
||||
<button data-mode="deactive" class="btnTabPD">پرسنل های غیر فعال</button>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<button class="btn btn-rounded mb-5 goToTop">
|
||||
<div class="d-flex align-items-center">
|
||||
<span>برو بالا</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="20px" class="ms-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 18.75 7.5-7.5 7.5 7.5" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="m4.5 12.75 7.5-7.5 7.5 7.5" />
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
@* <div class="container-fluid d-none d-md-block">
|
||||
<div class="row px-2">
|
||||
<div class="search-box card">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="row search-personal-section gap-2">
|
||||
|
||||
<div class="col-3">
|
||||
<input type="text" name="employeeName" class="form-control employeeName" placeholder="نام و نام خانوادگی پرسنل ...">
|
||||
</div>
|
||||
<button class="btn-search btn-w-size btn-search-click text-nowrap d-flex align-items-center justify-content-center" id="searchBtn" type="submit">
|
||||
<span>جستجو</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
<div class="btn-clear-filter btn-w-size text-nowrap d-flex align-items-center justify-content-center disable">
|
||||
<span>حذف جستجو</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
@* <div class="d-block d-md-none mb-1">
|
||||
<div class="row d-flex align-items-center justify-content-between">
|
||||
<div class="search-box bg-white p-2">
|
||||
<div class="d-flex justify-content-between text-center">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white" />
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> *@
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
<div class="row p-lg-2">
|
||||
<div class="card p-2">
|
||||
<div class="wrapper">
|
||||
<div class="personnelDocuments Rtable Rtable--5cols Rtable--collapse">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام کارگاه</div>
|
||||
<div class="Rtable-cell column-heading width3">نام کارفرما</div>
|
||||
<div class="Rtable-cell column-heading width4 text-center">مدارک در انتظار</div>
|
||||
<div class="Rtable-cell column-heading text-end pe-2 width7">عملیات</div>
|
||||
</div>
|
||||
|
||||
@* <div class="w-100" id="personnelDocumentsAjax">
|
||||
</div> *@
|
||||
<div class="w-100 " id="workshopsDocumentsAjax">
|
||||
<div></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Modal From Bottom For Advance Search -->
|
||||
@* <div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
|
||||
<div class="modal-header d-block text-center pb-0">
|
||||
<div class="iphone-line mx-auto mb-3"></div>
|
||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
||||
</div>
|
||||
|
||||
<div class="modal-body pt-0 mb-3">
|
||||
<div class="container-fluid search-box">
|
||||
|
||||
<div id="overlaySearchAdvance" class=""></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div><input type="text" name="employeeName" class="form-control employeeName" placeholder="نام پرسنل"></div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="btn-clear-filter py-2 text-center d-block w-100 mt-2">
|
||||
<span class="w-100">حذف جستجو</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="submit" class="btn-search btn-search-click w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
<div id="MainModal" class="modal fade personalListModal " aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xxl modal-dialog-centered modal-fullscreen1">
|
||||
<div class="modal-content modal-fullscreen1" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<input type="hidden" name="Model.HasEmployees" value="Model.HasEmployees" id="hasEmployee" />
|
||||
|
||||
<script src="~/assetsclient/js/site.js?ver=@adminVersion"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var employeeDocumentsAjaxLoadData = `@Url.Page("./Index", "EmployeeDocumentsAjax")`;
|
||||
var workshopId = Number(@Model.WorkshopId);
|
||||
var workshopDocumentAjaxURL = `@Url.Page("./Index", "ListWorkshops")`;
|
||||
</script>
|
||||
<script src="~/AssetsAdminNew/EmployeesDocumentsManagement/js/Index.js?ver=@adminVersion"></script>
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.EmployeesDocumentsManagement
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public long WorkshopId;
|
||||
public string WorkshopFullname;
|
||||
private readonly IPasswordHasher _passwordHasher;
|
||||
|
||||
public IndexModel(IWorkshopApplication workshopApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IEmployeeApplication employeeApplication, IAuthHelper authHelper, IPasswordHasher passwordHasher)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_authHelper = authHelper;
|
||||
_passwordHasher = passwordHasher;
|
||||
}
|
||||
|
||||
public IActionResult OnGetDetailsPersonnelModal()
|
||||
{
|
||||
return Partial("DetailsPersonnelModal");
|
||||
}
|
||||
public IActionResult OnGetListWorkshops()
|
||||
{
|
||||
var workshopsWithUploadedDocuments = _employeeDocumentsApplication.GetWorkshopsWithUploadedDocumentsForChecker();
|
||||
|
||||
// List<WorkshopViewModel> test =
|
||||
// [
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "پلاسکو فروشی گلستان",
|
||||
// Id = 177
|
||||
// },
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "کباب مهدی",
|
||||
// Id = 170
|
||||
// },
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "Test3"
|
||||
// },
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "Test4"
|
||||
// },
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "Test5"
|
||||
// },
|
||||
// new WorkshopViewModel()
|
||||
// {
|
||||
// WorkshopFullName = "Test6"
|
||||
// }
|
||||
//];
|
||||
if (workshopsWithUploadedDocuments.Count > 0)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = true,
|
||||
result = workshopsWithUploadedDocuments
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "داده ای یافت نشد!",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateUploadDocument(long workshopId, long employeeId)
|
||||
{
|
||||
if (workshopId <= 0)
|
||||
{
|
||||
var resultError = new ErrorViewModel()
|
||||
{
|
||||
Message = "کارگاه شما یافت نشد"
|
||||
};
|
||||
return Partial("../Error/_ErrorModal", resultError);
|
||||
}
|
||||
|
||||
var employeeDocuments = _employeeDocumentsApplication.GetDetailsForAdmin(employeeId, workshopId);
|
||||
|
||||
|
||||
return Partial("ModalUploadDocument", employeeDocuments);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateUploadDocument(AddEmployeeDocumentItem command)
|
||||
{
|
||||
if (command.WorkshopId <= 0)
|
||||
return new JsonResult(new
|
||||
{
|
||||
IsSuccedded = false,
|
||||
message = "کارگاه ای یافت نشد",
|
||||
});
|
||||
|
||||
command.WorkshopId = command.WorkshopId;
|
||||
|
||||
|
||||
var result = _employeeDocumentsApplication.AddEmployeeDocumentItemForAdmin(command);
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForAdmin(command.EmployeeId, command.WorkshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
imageSrc = employeeDocument
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetShowPicture(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
return NotFound();
|
||||
|
||||
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
return NotFound();
|
||||
|
||||
|
||||
var contentType = Tools.GetContentTypeImage(Path.GetExtension(filePath));
|
||||
return PhysicalFile(filePath, contentType);
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployeeDocumentByLabel(long workshopId, long employeeId, DocumentItemLabel label)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.DeleteEmployeeMultipleUnsubmittedDocumentsByLabel(workshopId, employeeId, label);
|
||||
return new JsonResult(new
|
||||
{
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.WorkFlow.EmployeesDocumentsModel
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
Layout = "Shared/_Layout";
|
||||
ViewData["title"] = " - بارگذاری مدارک توسط کارفرما";
|
||||
int index = 1;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/assetsclient/css/operation-button.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/filter-search.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/card.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
|
||||
<link href="~/assetsadminnew/workflow/css/employeesdocuments.css?ver=@clientVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/face-scan.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">بارگذاری مدارک توسط کارفرما</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/WorkFlow/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row p-lg-2">
|
||||
|
||||
<div class="wrapper p-0">
|
||||
<div class="subAccountHeaderList Rtable Rtable--collapse">
|
||||
<div class="Rtable-row Rtable-row--head align-items-center sticky-div">
|
||||
<div class="rightHeaderMenu px-3">
|
||||
<div class="Rtable-cell column-heading width1">نام نقش</div>
|
||||
</div>
|
||||
<div class="leftHeaderMenu px-4">
|
||||
<div class="Rtable-cell column-heading width1">ردیف</div>
|
||||
<div class="Rtable-cell column-heading width2">نام کابران</div>
|
||||
<div class="Rtable-cell column-heading text-center width3">عکس پرسنلی</div>
|
||||
<div class="Rtable-cell column-heading text-center width4">کارت ملی</div>
|
||||
<div class="Rtable-cell column-heading text-center width5">کارت پایان خدمت</div>
|
||||
<div class="Rtable-cell column-heading text-center width6">شناسنامه</div>
|
||||
<div class="Rtable-cell column-heading text-end pe-2 width7">عملیات</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-0 d-block d-md-flex overflow-hidden rounded-3 my-2">
|
||||
|
||||
<div id="navbar-animmenu">
|
||||
<ul class="show-dropdown main-navbar">
|
||||
<div class="verti-selector">
|
||||
<div class="top"></div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
|
||||
<li class="active" data-menu="DocumentsAwaitingUpload">
|
||||
<div class="d-flex align-items-center justify-content-between" id="clickDocumentsAwaitingUploadTab">
|
||||
<a href="javascript:void(0);">بارگزاری مدارک</a>
|
||||
<div>
|
||||
<div id="CountDocumentsAwaitingUploadLoading" class="spinner-grow text-danger d-none" role="status" style="align-items: center;justify-content: center;display: flex;margin: 0 0 0 9px;">
|
||||
<span class="visually-hidden">Loading...</span>
|
||||
</div>
|
||||
<span id="CountDocumentsAwaitingUpload">@Model.EmployeeDocumentsAwaitingSubmitCount</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="" id="accountList">
|
||||
<div class="card p-2">
|
||||
<div class="row align-items-center mb-1">
|
||||
<div class="d-none col-12 col-md-4 col-lg-4"></div>
|
||||
<div class="col-1 col-lg-4 text-end"></div>
|
||||
</div>
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="Rtable Rtable--collapse DocumentsAwaitingUploadWorkFlowLists">
|
||||
<div id="loadingSkeletonDocumentsAwaitingUpload" style="display: contents;">
|
||||
@for (int j = 0; j < 30; j++)
|
||||
{
|
||||
<div class="skeleton-loader" style="margin: 3px 0 !important;height: 39px;"></div>
|
||||
}
|
||||
</div>
|
||||
<div class="w-100" id="loadDocumentsAwaitingUploadWorkFlow">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="MainModal" class="modal fade" aria-labelledby="myModalLabel" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xl modal-dialog-centered modalRollCallWidth modal-dialog-scrollable">
|
||||
<div class="modal-content" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var showPictureUrl = `@Url.Page("./EmployeesDocuments", "ShowPicture")`;
|
||||
var loadWorkshopsWithDocumentsAwaitingUploadUrl = `@Url.Page("./EmployeesDocuments", "WorkshopsWithDocumentsAwaitingUploadAjax")`;
|
||||
var loadByWorkshopIdWithItemsForAdminWorkFlowUrl = `@Url.Page("./EmployeesDocuments", "ByWorkshopIdWithItemsForAdminWorkFlow")`;
|
||||
</script>
|
||||
<script src="~/assetsadminnew/workflow/js/employeesdocuments.js?ver=@clientVersion"></script>
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.WorkshopAccountAgg;
|
||||
using CompanyManagment.App.Contracts.EmployeeDocuments;
|
||||
using CompanyManagment.App.Contracts.Error;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using WorkFlow.Application.Contracts.AdminWorkFlow;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.WorkFlow
|
||||
{
|
||||
[Authorize]
|
||||
public class EmployeesDocumentsModel : PageModel
|
||||
{
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IEmployeeDocumentsApplication _employeeDocumentsApplication;
|
||||
private readonly IAdminWorkFlowApplication _adminWorkFlowApplication;
|
||||
private readonly IWorkshopAccountRepository _workshopAccountRepository;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
public int EmployeeDocumentsAwaitingSubmitCount;
|
||||
|
||||
public EmployeesDocumentsModel(IAdminWorkFlowApplication adminWorkFlowApplication, IWorkshopApplication workshopApplication, IEmployeeDocumentsApplication employeeDocumentsApplication, IWorkshopAccountRepository workshopAccountRepository, IAuthHelper authHelper)
|
||||
{
|
||||
_adminWorkFlowApplication = adminWorkFlowApplication;
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeDocumentsApplication = employeeDocumentsApplication;
|
||||
_workshopAccountRepository = workshopAccountRepository;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var accountWorkshops = _workshopAccountRepository.GetList(accountId).Select(x => x.WorkshopId).ToList();
|
||||
EmployeeDocumentsAwaitingSubmitCount = _adminWorkFlowApplication.GetWorkFlowCountsForAdmin(accountWorkshops).EmployeeDocumentsAwaitingSubmit;
|
||||
}
|
||||
|
||||
public IActionResult OnGetWorkshopsWithDocumentsAwaitingUploadAjax()
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var accountWorkshops= _workshopAccountRepository.GetList(accountId).Select(x=>x.WorkshopId).ToList();
|
||||
var resultData = _adminWorkFlowApplication.GetWorkshopsWithDocumentsAwaitingUploadForAdmin(accountWorkshops);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetByWorkshopIdWithItemsForAdminWorkFlow(long workshopId)
|
||||
{
|
||||
var resultData = _employeeDocumentsApplication.GetByWorkshopIdWithItemsForAdminWorkFlow(workshopId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetCreateUploadDocument(long workshopId, long employeeId)
|
||||
{
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForAdmin(employeeId, workshopId);
|
||||
return Partial("_ModalEmployeeDocuments/ModalUploadDocument", employeeDocument);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCreateUploadDocument(AddEmployeeDocumentItem command)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.AddEmployeeDocumentItemForClient(command);
|
||||
var employeeDocument = _employeeDocumentsApplication.GetDetailsForAdmin(command.EmployeeId, command.WorkshopId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
imageSrc = employeeDocument
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostRemoveEmployeeDocumentByLabel(long workshopId, long employeeId, DocumentItemLabel label)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.RemoveClientDocumentItemsByAdminTemp(workshopId, employeeId, label);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostRemoveClientEmployeeDocumentItemsByLabels(long workshopId, long employeeId, List<DocumentItemLabel> labels)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.RemoveClientDocumentItemsByAdmin(workshopId, employeeId, labels);
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnPostSaveSubmit(SubmitEmployeeDocuments cmd)
|
||||
{
|
||||
|
||||
var result = _employeeDocumentsApplication.SubmitDocumentItemsByAdminInWorkFlow(cmd);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccedded = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetShowPicture(string filePath)
|
||||
{
|
||||
if (string.IsNullOrEmpty(filePath))
|
||||
return NotFound();
|
||||
|
||||
|
||||
if (!System.IO.File.Exists(filePath))
|
||||
return NotFound();
|
||||
|
||||
var contentType = Tools.GetContentTypeImage(Path.GetExtension(filePath));
|
||||
return PhysicalFile(filePath, contentType);
|
||||
}
|
||||
|
||||
public IActionResult OnPostCancelOperation(long workshopId, long employeeId)
|
||||
{
|
||||
var result = _employeeDocumentsApplication.DeleteUnsubmittedItems(workshopId, employeeId);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
163
ServiceHost/Areas/AdminNew/Pages/Company/WorkFlow/Index.cshtml
Normal file
163
ServiceHost/Areas/AdminNew/Pages/Company/WorkFlow/Index.cshtml
Normal file
@@ -0,0 +1,163 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.AdminNew.Pages.Company.WorkFlow.IndexModel
|
||||
@{
|
||||
}
|
||||
|
||||
|
||||
@{
|
||||
string clientVersion = _0_Framework.Application.Version.StyleVersion;
|
||||
ViewData["Title"] = " - " + "کارگاه";
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/assetsclient/css/card.css?ver=@clientVersion" rel="stylesheet" />
|
||||
<style>
|
||||
.countNumber span {
|
||||
background-color: #dd2a2a;
|
||||
width: 28px;
|
||||
display: flex;
|
||||
height: 28px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 24px;
|
||||
margin: 0 0 0 12px;
|
||||
color: #fff;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/icons/workflow.png" alt="" class="img-fluid me-2" style="width: 45px;" />
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">کارپوشه</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Index" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="profile-header position-relative">
|
||||
<img src="~/AssetsClient/images/profile-header.png" alt="" class="img-fluid">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Start Card Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="d-grid card-area-workflow gap-2 p-0">
|
||||
|
||||
<div class="gwb-card">
|
||||
<a asp-page="/Company/WorkFlow/EmployeesDocuments" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-between p-1 w-100">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~/AssetsClient/images/insuranceList.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">بارگذاری مدارک توسط کارفرما</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.EmployeeDocumentsAwaitingSubmitCount != 0)
|
||||
{
|
||||
<div class="countNumber">
|
||||
<span>
|
||||
@(Model.EmployeeDocumentsAwaitingSubmitCount > 99 ? "+99" : Model.EmployeeDocumentsAwaitingSubmitCount)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@* <div class="gwb-card">
|
||||
<a asp-page="/Company/WorkFlow/EmployeesNew" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-between p-1 w-100">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~/AssetsClient/images/insuranceList.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">اعلام شروع بکار توسط کافرما</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.EmployeeDocumentsAwaitingSubmitCount != 0)
|
||||
{
|
||||
<div class="countNumber">
|
||||
<span>
|
||||
@(Model.EmployeeDocumentsAwaitingSubmitCount > 99 ? "+99" : Model.EmployeeDocumentsAwaitingSubmitCount)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div> *@
|
||||
|
||||
@* <div class="gwb-card">
|
||||
<a asp-page="/Company/WorkFlow/Insurance" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-between p-1 w-100">
|
||||
<div class="d-flex align-items-center">
|
||||
<img src="~/AssetsClient/images/insuranceList.png" alt="" class="img-fluid mx-1" width="50px" />
|
||||
<div class="text-start ms-1">
|
||||
<div class="card-title">بیمه</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (@Model.InsuredEmployeesWithoutContractCount != 0)
|
||||
{
|
||||
<div class="countNumber">
|
||||
<span>
|
||||
@(Model.InsuredEmployeesWithoutContractCount > 99 ? "+99" : Model.InsuredEmployeesWithoutContractCount)
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<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>
|
||||
</a>
|
||||
</div> *@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Card Items -->
|
||||
|
||||
|
||||
|
||||
<div class="modal fade personalListModal" id="MainModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="personalListModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-dialog modal-xxl modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body p-0 d-flex justify-content-center" id="ModalContent">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Script {
|
||||
<script src="~/assetsclient/js/site.js?ver=@clientVersion"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('.loadingButton').on('click', function () {
|
||||
var button = $(this);
|
||||
var loadingDiv = button.find('.loading');
|
||||
loadingDiv.show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.WorkshopAccountAgg;
|
||||
using CompanyManagment.App.Contracts.RollCallService;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using Microsoft.Extensions.Configuration.UserSecrets;
|
||||
using Query.AdminReports.Handlers;
|
||||
using WorkFlow.Application.Contracts.AdminWorkFlow;
|
||||
using WorkFlow.Application.Contracts.WorkFlow;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages.Company.WorkFlow
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IAdminWorkFlowApplication _adminWorkFlowApplication;
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IWorkshopAccountRepository _workshopAccountRepository;
|
||||
public int EmployeeDocumentsAwaitingSubmitCount;
|
||||
|
||||
public IndexModel(IAdminWorkFlowApplication adminWorkFlowApplication, IAuthHelper authHelper, IWorkshopAccountRepository workshopAccountRepository)
|
||||
{
|
||||
_adminWorkFlowApplication = adminWorkFlowApplication;
|
||||
_authHelper = authHelper;
|
||||
_workshopAccountRepository = workshopAccountRepository;
|
||||
}
|
||||
|
||||
public void OnGet()
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var accountWorkshops = _workshopAccountRepository.GetList(accountId).Select(x => x.WorkshopId).ToList();
|
||||
EmployeeDocumentsAwaitingSubmitCount = _adminWorkFlowApplication.GetWorkFlowCountsForAdmin(accountWorkshops).EmployeeDocumentsAwaitingSubmit;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,464 @@
|
||||
@using System.Reflection
|
||||
@using _0_Framework.Application
|
||||
@using CompanyManagment.App.Contracts.EmployeeDocuments
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.EmployeeDocuments.EmployeeDocumentsViewModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/AssetsAdminNew/employeesdocument/css/ModalUploadDocument.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<style>
|
||||
.pdImageBox {
|
||||
height: 66px;
|
||||
}
|
||||
|
||||
.pdTitle2 {
|
||||
height: 42px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<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"><span class="">برسی مدارک </span> @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("./EmployeesDocuments", "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>
|
||||
@if (Model.EmployeePicture.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.EmployeePicture.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeesDocuments", "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>
|
||||
@if (Model.NationalCardFront.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.NationalCardFront.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeesDocuments", "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>
|
||||
@if (Model.NationalCardRear.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.NationalCardRear.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeesDocuments", "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>
|
||||
@if (Model.MilitaryServiceCard.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.MilitaryServiceCard.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="text-start mx-1 pdTitle">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div>کارت پایان خدمت <span> @(Model.Gender == "زن" ? "" : "*")</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("./EmployeesDocuments", "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>
|
||||
@if (Model.IdCardPage1.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage1.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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("./EmployeesDocuments", "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>
|
||||
@if (Model.IdCardPage2.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage2.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeesDocuments", "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>
|
||||
@if (Model.IdCardPage3.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage3.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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.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("./EmployeesDocuments", "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>
|
||||
@if (Model.IdCardPage4.UploaderType == UserType.Admin)
|
||||
{
|
||||
<div class="uploaderSign admin">
|
||||
<span>مدیر</span>
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (Model.IdCardPage4.UploaderType == UserType.Client)
|
||||
{
|
||||
<div class="uploaderSign client">
|
||||
<span>مشتری</span>
|
||||
</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 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=@adminVersion"></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 antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var saveUploadFileModalAjax = `@Url.Page("./EmployeesDocuments", "CreateUploadDocument")`;
|
||||
var saveSubmitAjax = `@Url.Page("./EmployeesDocuments", "SaveSubmit")`;
|
||||
var deleteFileAjaxUrl = `@Url.Page("./EmployeesDocuments", "RemoveEmployeeDocumentByLabel")`;
|
||||
var cancelOperationUrl = `@Url.Page("./EmployeesDocuments", "CancelOperation")`;
|
||||
var employeeId = Number(@Model.EmployeeId);
|
||||
var workshopId = Number(@Model.WorkshopId);
|
||||
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="~/assetsadminnew/workflow/js/modaluploaddocument.js?ver=@adminVersion"></script>
|
||||
@@ -1,19 +1,33 @@
|
||||
using _0_Framework.Application;
|
||||
using AccountManagement.Application.Contracts.Task;
|
||||
using AccountManagement.Application.Contracts.Ticket;
|
||||
using backService;
|
||||
using Company.Domain.WorkshopAccountAgg;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using WorkFlow.Application.Contracts.AdminWorkFlow;
|
||||
|
||||
namespace ServiceHost.Areas.AdminNew.Pages
|
||||
{
|
||||
public class IndexModel : PageModel
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
public List<BackupViewModel> DbBackupList { get; set; }
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IWorkshopAccountRepository _workshopAccountRepository;
|
||||
private readonly IAdminWorkFlowApplication _adminWorkFlowApplication;
|
||||
private readonly ITicketApplication _ticketApplication;
|
||||
private readonly ITaskApplication _taskApplication;
|
||||
public List<BackupViewModel> DbBackupList { get; set; }
|
||||
public List<BackupViewModel> InsuranceBackupList { get; set; }
|
||||
|
||||
public IndexModel(IWebHostEnvironment webHostEnvironment, IConfiguration configuration)
|
||||
public IndexModel(IWebHostEnvironment webHostEnvironment, IConfiguration configuration, IAuthHelper authHelper, IWorkshopAccountRepository workshopAccountRepository, IAdminWorkFlowApplication adminWorkFlowApplication, ITicketApplication ticketApplication, ITaskApplication taskApplication)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_configuration = configuration;
|
||||
_authHelper = authHelper;
|
||||
_workshopAccountRepository = workshopAccountRepository;
|
||||
_adminWorkFlowApplication = adminWorkFlowApplication;
|
||||
_ticketApplication = ticketApplication;
|
||||
_taskApplication = taskApplication;
|
||||
}
|
||||
public void OnGet()
|
||||
{
|
||||
@@ -49,5 +63,52 @@ namespace ServiceHost.Areas.AdminNew.Pages
|
||||
byte[] fileContent = System.IO.File.ReadAllBytes(path);
|
||||
return File(fileContent, "application/zip", fileName);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetLayoutCountTask()
|
||||
{
|
||||
var currentAccountId = _authHelper.CurrentAccountId();
|
||||
int taskCount = _taskApplication.RequestedAndOverdueTasksCount(currentAccountId);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = taskCount
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetLayoutCountTicket()
|
||||
{
|
||||
int ticketCount = _ticketApplication.GetAdminTicketsCount();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = ticketCount
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetLayoutCountWorkFlow()
|
||||
{
|
||||
var currentAccountId = _authHelper.CurrentAccountId();
|
||||
var accountWorkshops = _workshopAccountRepository.GetList(currentAccountId).Select(x => x.WorkshopId).ToList();
|
||||
int workFlowCount = _adminWorkFlowApplication.GetWorkFlowCountsForAdmin(accountWorkshops).EmployeeDocumentsAwaitingSubmit;
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = workFlowCount
|
||||
});
|
||||
}
|
||||
|
||||
public IActionResult OnGetLayoutCountChecker()
|
||||
{
|
||||
int checkerCount = _adminWorkFlowApplication.GetWorkFlowCountForChecker();
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = checkerCount,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
<link href="~/AssetsClient/css/responsive-modal.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/validation-style.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/libs/font-awesome/css/font-awesome.min.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
<link href="~/AdminTheme/assets/ionicon/css/ionicons.min.css" rel="stylesheet" />
|
||||
<link href="~/AssetsClient/css/material-design-iconic-font.min.css?ver=@Version.AdminVersion" rel="stylesheet" />
|
||||
|
||||
<link href="~/AssetsClient/libs/select2/css/select2.min.css" rel="stylesheet" />
|
||||
@@ -72,7 +73,7 @@
|
||||
$("#ModalContent").html("");
|
||||
$("#printSection").html("");
|
||||
});
|
||||
|
||||
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
|
||||
var url = window.location.href.split('?')[0];
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
|
||||
@@ -328,6 +329,145 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
_RefreshTaskCountMenu();
|
||||
function _RefreshTaskCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountTask',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_taskCountSection').hide();
|
||||
$('#_taskCount').hide();
|
||||
$('#spinnerTask').hide();
|
||||
} else {
|
||||
$('#_taskCountSection').show();
|
||||
$('#spinnerTask').hide();
|
||||
$('#_taskCount').show();
|
||||
$('#_taskCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshTicketCountMenu();
|
||||
function _RefreshTicketCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountTicket',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_ticketCountSection').hide();
|
||||
$('#spinnerTicket').hide();
|
||||
$('#_ticketCount').hide();
|
||||
} else {
|
||||
$('#_ticketCountSection').show();
|
||||
$('#spinnerTicket').hide();
|
||||
$('#_ticketCount').show();
|
||||
$('#_ticketCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshWorkFlowCountMenu();
|
||||
function _RefreshWorkFlowCountMenu() {
|
||||
$.ajax({
|
||||
async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountWorkFlow',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_workFlowCountSection').hide();
|
||||
$('#spinnerWorkFlow').hide();
|
||||
$('#_workFlowCount').hide();
|
||||
} else {
|
||||
$('#_workFlowCountSection').show();
|
||||
$('#spinnerWorkFlow').hide();
|
||||
$('#_workFlowCount').show();
|
||||
$('#_workFlowCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
_RefreshCheckerCountMenu();
|
||||
function _RefreshCheckerCountMenu() {
|
||||
$.ajax({
|
||||
//async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountChecker',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
if (response.success) {
|
||||
if (response.data === 0) {
|
||||
$('#_checkerCountSection').hide();
|
||||
$('#_checkerCount').hide();
|
||||
$('#spinnerChecker').hide();
|
||||
} else {
|
||||
$('#_checkerCountSection').show();
|
||||
$('#spinnerChecker').hide();
|
||||
$('#_checkerCount').show();
|
||||
$('#_checkerCount').text(response.data);
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Override the global fetch function to handle errors
|
||||
$.ajaxSetup({
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.status === 500) {
|
||||
try {
|
||||
const errorData = jqXHR.responseJSON;
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(errorData.message || "خطای سمت سرور");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
} catch (e) {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text("خطای سمت سرور");
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
console.error("Error parsing response:", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@RenderSection("Script", false)
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
|
||||
@using AccountManagement.Application.Contracts.Task
|
||||
@using AccountManagement.Application.Contracts.Ticket
|
||||
@using AccountManagement.Application.Contracts.TicketAccessAccount
|
||||
|
||||
@using AccountManagement.Domain.TicketAccessAccountAgg
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
|
||||
@inject ITicketAccessAccountRepository TicketAccessAccount;
|
||||
@inject _0_Framework.Application.IAuthHelper AuthHelper;
|
||||
@inject ITicketAccessAccountApplication TicketAccessAccount;
|
||||
@inject ITicketApplication TicketApplication;
|
||||
@inject ITaskApplication TaskApplication;
|
||||
|
||||
@{
|
||||
var currentAccout = AuthHelper.CurrentAccountInfo();
|
||||
int taskCount = TaskApplication.RequestedAndOverdueTasksCount(currentAccout.Id);
|
||||
int ticketCount = TicketApplication.GetAdminTicketsCount();
|
||||
|
||||
|
||||
<style>
|
||||
.showCount span {
|
||||
@@ -44,7 +32,6 @@
|
||||
margin: 0 8px;
|
||||
display: none;
|
||||
border-radius: 10px;
|
||||
// border:1px solid #c1c1c1;
|
||||
}
|
||||
|
||||
.sidebar-navigation.small > .sidebar-menu > ul li span {
|
||||
@@ -91,6 +78,7 @@
|
||||
display: block !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -522,8 +510,11 @@
|
||||
<span> مدیریت وظایف </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div class="showCount" permission="901" style="margin-left: 15px; visibility: @(taskCount == 0 ? "hidden" : "visible")">
|
||||
<span>@taskCount</span>
|
||||
<div id="_taskCountSection" class="showCount" permission="901" style="margin-left: 15px;">
|
||||
<span id="_taskCount" style="display: none"></span>
|
||||
<div id="spinnerTask">
|
||||
<i class="ion-loading-a" style="font-size: 16px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<i class="md md-add"></i>
|
||||
@@ -566,8 +557,11 @@
|
||||
<span> مدیریت تیکت </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div class="showCount" style="margin-left: 15px; visibility: @(ticketCount == 0 ? "hidden" : "visible")">
|
||||
<span>@ticketCount</span>
|
||||
<div id="_ticketCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_ticketCount" style="display: none"></span>
|
||||
<div id="spinnerTicket">
|
||||
<i class="ion-loading-a" style="font-size: 16px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
<span class="pull-right">
|
||||
<i class="md md-add"></i>
|
||||
@@ -630,14 +624,30 @@
|
||||
<i class="md md-home"></i>
|
||||
<span> کارپوشه </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div id="_workFlowCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_workFlowCount" style="display: none"></span>
|
||||
<div id="spinnerWorkFlow">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li permission="1100">
|
||||
<a asp-area="AdminNew" asp-page="/Company/EmployeesDocumentsManagement/Index" class="waves-effect btnWorkFlow">
|
||||
<a asp-area="AdminNew" asp-page="/Company/Checker/Index" class="waves-effect btnWorkFlow">
|
||||
<div class="menuTitle">
|
||||
<i class="md md-home"></i>
|
||||
<span> بررسی مدارک پرسنل </span>
|
||||
<span> بررسی توسط ناظر </span>
|
||||
</div>
|
||||
<div style="justify-content: space-between; align-items: center; display: flex;">
|
||||
<div id="_checkerCountSection" class="showCount" style="margin-left: 15px;">
|
||||
<span id="_checkerCount" style="display: none"></span>
|
||||
<div id="spinnerChecker">
|
||||
<i class="ion-loading-a" style="font-size: 20px"> </i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="gwb-card disable" Permission="@SubAccountPermissionHelper.EmployeeDocumentsOperationsPermissionCode" >
|
||||
<div class="gwb-card" Permission="@SubAccountPermissionHelper.EmployeeDocumentsOperationsPermissionCode" >
|
||||
<a asp-page="/Company/EmployeesDocuments/Index" class="click loadingButton">
|
||||
<div class="d-flex align-items-center justify-content-start p-1">
|
||||
<img src="~/AssetsClient/images/icons/money.png" alt="" class="img-fluid mx-1" width="50px"/>
|
||||
|
||||
@@ -96,7 +96,13 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\Bank\CreateBankModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Bank\EditBankModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Bank\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Checker\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\ContractingParties\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\EmployeesDocumentsManagement\DetailsPersonnelModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\EmployeesDocumentsManagement\EmployeesList.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\EmployeesDocumentsManagement\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\EmployeesDocuments\EmployeeList.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\EmployeesDocuments\ModalUploadDocument.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employees\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Employers\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\FileBackup\Index.cshtml" />
|
||||
@@ -139,6 +145,9 @@
|
||||
<None Include="Areas\AdminNew\Pages\Company\Task\OperationRequestModalOld.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Ticket\DetailTicketModal.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\Ticket\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\WorkFlow\EmployeesDocuments.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\WorkFlow\Index.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Company\WorkFlow\_ModalEmployeeDocuments\ModalUploadDocument.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_Header.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_Layout.cshtml" />
|
||||
<None Include="Areas\AdminNew\Pages\Shared\_Menu.cshtml" />
|
||||
@@ -392,6 +401,11 @@
|
||||
<None Include="wwwroot\AssetsAdminNew\Bank\js\EditBankModal.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Bank\js\Index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\ContractingParties\js\Index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\EmployeesDocumentsManagement\js\DetailsPersonnelModal.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\EmployeesDocumentsManagement\js\EmployeesList.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\EmployeesDocumentsManagement\js\Index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\EmployeesDocument\js\EmployeeList.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\EmployeesDocument\js\ModalUploadDocument.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\libs\SweetAlert2\sweetalert2.all.min.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\libs\wavesurfer\wavesurfer.min.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Report\js\index.js" />
|
||||
@@ -433,6 +447,12 @@
|
||||
<None Include="wwwroot\AssetsAdminNew\Tasks\js\OperationRequestModalOld.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Ticket\js\detailTicketModal.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\Ticket\js\Index.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\EmployeesDocuments.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\EmployeesDocumentsChecker.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\EmployeesNew.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\insurance.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\ModalUploadDocument.js" />
|
||||
<None Include="wwwroot\AssetsAdminNew\WorkFlow\js\start-left-work.js" />
|
||||
<None Include="wwwroot\AssetsAdmin\fonts\BKoodakBold.afm" />
|
||||
<None Include="wwwroot\AssetsAdmin\fonts\BKoodakBold.svg" />
|
||||
<None Include="wwwroot\AssetsAdmin\fonts\Estedad\Estedad[wght,kshd].woff2" />
|
||||
@@ -708,6 +728,12 @@
|
||||
<None Include="wwwroot\AssetsClient\libs\jquery-steps\jquery.steps.min.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\jslib-html5-camera\jslib-html5-camera-photo.min.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\jslib-html5-camera\jslib-html5-camera-photo.min.js.map" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.js.map" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.sandbox.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.sandbox.js.map" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.worker.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\pdf\pdf.worker.js.map" />
|
||||
<None Include="wwwroot\AssetsClient\libs\printjs\print.min.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\select2\js\i18n\af.js" />
|
||||
<None Include="wwwroot\AssetsClient\libs\select2\js\i18n\ar.js" />
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,240 @@
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: -10px;
|
||||
margin-right: 100px;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acacd6;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.goToTop:hover {
|
||||
color: #fff;
|
||||
background-color: #2ca4a4;
|
||||
}
|
||||
|
||||
.width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.width3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.width4 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.width5 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 10% !important;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.documentFileBox {
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.highlighted-border {
|
||||
border: 1px solid #6CD7CE;
|
||||
}
|
||||
|
||||
.uploadedHolder {
|
||||
border: 1px solid #6CD7CE;
|
||||
}
|
||||
|
||||
|
||||
.documentFileBoxImg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
border: 1px solid transparent;
|
||||
/*width: 60%;*/
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 4px;
|
||||
color: #146D94;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-uploadingPD:hover {
|
||||
color: #083347;
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-pd-more {
|
||||
background: #B6F2E1;
|
||||
border: 1px solid #059669;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #059669;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-pd-more:hover {
|
||||
background: #a3d7c9;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile {
|
||||
background-color: #B9EBEE;
|
||||
color: #1992C6;
|
||||
width: 100%;
|
||||
padding: 6px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #7ddadf;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile:hover {
|
||||
background-color: #91dfe3;
|
||||
}
|
||||
|
||||
.withdraw {
|
||||
background-color: rgb(177 195 195) !important;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
background-color: #b0e5e5;
|
||||
padding: 6px 9px;
|
||||
width: 130px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #b3b3b3;
|
||||
color: #9d9d9d;
|
||||
font-size: 11px;
|
||||
margin: auto 3px auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD:first-child {
|
||||
margin: auto 0 auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD.active {
|
||||
background-color: #34dfdf;
|
||||
color: #3b3b3b;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.btnTabPD:hover {
|
||||
background-color: #34dfdf;
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 54px;
|
||||
margin-right: 39%;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acac70;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin: 0 0 60px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even), .table-workshop .Rtable .Rtable-row:nth-child(4n+2), .table-personals .Rtable .Rtable-row:nth-child(4n+2) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd), .table-workshop .Rtable .Rtable-row:nth-child(4n+4), .table-personals .Rtable .Rtable-row:nth-child(4n+4) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: none;
|
||||
border: 1px solid #D2D2D2;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 30% !important;
|
||||
justify-content: end;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
color: #727272;
|
||||
font-weight: 600;
|
||||
font-size: 10px;
|
||||
margin: 3px 4px;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
font-size: 10px;
|
||||
padding: 5px 6px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.uploaderSign {
|
||||
position: absolute;
|
||||
bottom: -1px;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.uploaderSign.admin {
|
||||
background: linear-gradient(360deg, rgba(63, 63, 63, 0.76) 0%, rgba(29, 83, 133, 0) 100%);
|
||||
}
|
||||
|
||||
.uploaderSign.client {
|
||||
background: linear-gradient(360deg, rgba(52, 146, 235, 0.76) 0%, rgba(29, 83, 133, 0) 100%);
|
||||
}
|
||||
|
||||
.uploaderSign span {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 50%;
|
||||
transform: translate(50%, -1px);
|
||||
font-weight: 900;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.reasonReject {
|
||||
color: #2d2d2d;
|
||||
}
|
||||
|
||||
.w90 {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.pdTitle {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pdHeaderTitle1 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.pdHeaderTitle2 {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/*.pdBox.justUploaded {
|
||||
border: 1px solid #84cc16;
|
||||
}*/
|
||||
|
||||
.pdBoxGrid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
grid-template-rows: repeat(4, minmax(0, 1fr));
|
||||
grid-auto-flow: column;
|
||||
gap: 9px;
|
||||
}
|
||||
|
||||
.btn-cancel2 {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #454D5C;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btn-cancel2:hover {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.pdBox {
|
||||
background-color: #F8F8F8;
|
||||
border-radius: 15px;
|
||||
border: 1px solid #E7E7E7;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pdBox.complete {
|
||||
/* background-color: #D0FFF7;
|
||||
border: 1px solid #2BBABA;*/
|
||||
background-color: #ECFCCB;
|
||||
border: 1px solid #84CC16;
|
||||
}
|
||||
|
||||
.pdBox.discomplete {
|
||||
background-color: #FFD9D9;
|
||||
border: 1px solid #FF5D5D;
|
||||
}
|
||||
|
||||
.pdBox.pending {
|
||||
/* background-color: #FCE7C9;
|
||||
border: 1px solid #FDBA74;*/
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #E7E7E7;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.pdImageBox {
|
||||
background-color: #E6E6E6;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #D3D3D3;
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pdImageBox .completeSign {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
.pdImageBox .discompleteSign {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
.pdImageBox .pendingSign {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
.pdImageBox img {
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
border-radius: 6px;
|
||||
width: 100px;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.pdTitle span {
|
||||
color: #FF5E5E;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.resultMessage {
|
||||
text-align: center;
|
||||
width: 70px;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.resultMessage div {
|
||||
border-radius: 50px;
|
||||
padding: 3px 0;
|
||||
color: #fff;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.resultMessage div.pendingMessage {
|
||||
background-color: #FDBA74;
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.resultMessage div.confirmedMessage {
|
||||
background-color: #84CC16;
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.resultMessage div.rejectMessage {
|
||||
background-color: #FF7272;
|
||||
position: relative;
|
||||
top: 20px;
|
||||
}
|
||||
|
||||
.pdTitle2 {
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
max-width: 80%;
|
||||
word-wrap: break-word;
|
||||
height: 40px;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.btnUploadingPD {
|
||||
background-color: #2BBABA;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 4px;
|
||||
transition: all .3s ease-in;
|
||||
white-space: nowrap;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.btnUploadingPD:hover {
|
||||
background-color: #248E8E;
|
||||
}
|
||||
|
||||
.btnDeletingPD {
|
||||
background-color: #c76161;
|
||||
color: #ffffff;
|
||||
font-size: 12px;
|
||||
padding: 5px 12px;
|
||||
border-radius: 4px;
|
||||
transition: all .3s ease-in;
|
||||
white-space: nowrap;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.btnDeletingPD:hover {
|
||||
background-color: #a54e4e;
|
||||
}
|
||||
|
||||
.btnCreateNew {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
background-color: #84CC16;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8px;
|
||||
padding: 10px 70px;
|
||||
}
|
||||
|
||||
.btnCreateNew:hover {
|
||||
background-color: #5f9213;
|
||||
}
|
||||
|
||||
.btnCreateNew,
|
||||
.btn-cancel2 {
|
||||
width: auto !important;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.pdBoxGrid {
|
||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||
grid-template-rows: none;
|
||||
grid-auto-flow: unset;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.modal-body {
|
||||
height: 75vh;
|
||||
}
|
||||
|
||||
/* .uploaderSign {
|
||||
position: absolute;
|
||||
top: 42px;
|
||||
right: 82px;
|
||||
border: 1px solid red;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
line-height: 14px;
|
||||
border-radius: 50%;
|
||||
color: black !important;
|
||||
background-color: white;
|
||||
}*/
|
||||
|
||||
.pdBox {
|
||||
padding: 9px;
|
||||
}
|
||||
|
||||
.pdImageBox {
|
||||
width: 70px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.pdImageBox img {
|
||||
width: 70px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.btnUploadingPD,
|
||||
.btnDeletingPD {
|
||||
font-size: 10px;
|
||||
padding: 4px 9px;
|
||||
width: 60px;
|
||||
}
|
||||
|
||||
.btnCreateNew,
|
||||
.btn-cancel2 {
|
||||
font-size: 12px !important;
|
||||
padding: 10px 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.pdTitle {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pdTitle2 {
|
||||
font-weight: 300;
|
||||
word-wrap: break-word;
|
||||
font-size: 10px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.resultMessage div.rejectMessage {
|
||||
top: 15px;
|
||||
}
|
||||
|
||||
.resultMessage {
|
||||
width: 50px;
|
||||
font-size: 9px;
|
||||
font-weight: 900;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,382 @@
|
||||
var pageIndexJs = 0;
|
||||
var pageIndex = 0;
|
||||
var mode = 'active';
|
||||
var searchName = '';
|
||||
|
||||
$(document).ready(function () {
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
|
||||
$(document).on('click', '.btnTabPD', function () {
|
||||
mode = $(this).data('mode');
|
||||
$('.btnTabPD').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
pageIndexJs = 0;
|
||||
pageIndex = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.employeeName').val('');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
checkImage();
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-uploadingPD, .btn-uploadingPD-mobile', function () {
|
||||
var id = $(this).attr('id').split('_')[1];
|
||||
openPersonnelDocsUploadModal(id);
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-search-click, .btn-search-click-mobile', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').removeClass('disable');
|
||||
searchName = $('.employeeName').val().trim();
|
||||
if (searchName == "") {
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
}
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
});
|
||||
$(document).on('click', '.btn-clear-filter', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
$('.employeeName').val('');
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
|
||||
// When typing in the desktop search
|
||||
$('.d-none.d-md-block .employeeName').on('input', function () {
|
||||
var desktopInput = $(this).val();
|
||||
$('#searchModal .employeeName').val(desktopInput);
|
||||
});
|
||||
|
||||
// When typing in the mobile search
|
||||
$('#searchModal .employeeName').on('input', function () {
|
||||
var mobileInput = $(this).val();
|
||||
$('.d-none.d-md-block .employeeName').val(mobileInput);
|
||||
});
|
||||
|
||||
$('.goToTop').on('click',function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
function loadPersonnelDocuments(mode, searchName) {
|
||||
|
||||
var b = pageIndexJs % 30;
|
||||
var html = '';
|
||||
|
||||
if (b === 0) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: employeeDocumentsAjaxLoadData,
|
||||
data: { workshopId: workshopId, searchMode: mode, employeeName: searchName, 'pageIndex': pageIndex },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
|
||||
var personnelDocumentsData = response.data;
|
||||
if (response.isSuccedded) {
|
||||
personnelDocumentsData.forEach(function (item) {
|
||||
var n = pageIndexJs + 1;
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center openAction ${item.isBlack === "true"
|
||||
? `withdraw`
|
||||
: ``}" id="Employees">
|
||||
<div class="Rtable-cell width1" style="margin-left:3px; ">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center">
|
||||
${n}
|
||||
<div class="d-none idPersonnel">${item.employeeId}</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--content d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox d-md-none d-block" data-indexList="0">`;
|
||||
if (item.employeePicture.picturePath && (item.employeePicture.statusString !== "unsubmitted" && item.employeePicture.statusString !== "rejected")) {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="text-start">${item.employeeFullName}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
<div class="Rtable-cell--content d-flex align-items-center justify-content-center">
|
||||
<div class="documentFileBox" data-indexList="0">`;
|
||||
|
||||
if (item.employeePicture.picturePath && (item.employeePicture.statusString !== "unsubmitted" && item.employeePicture.statusString !== "rejected")) {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width4">
|
||||
<div class="Rtable-cell--content d-flex align-items-center justify-content-center">`;
|
||||
if (item.nationalCardFront.picturePath && (item.nationalCardFront.statusString !== "unsubmitted" && item.nationalCardFront.statusString !== "rejected")) {
|
||||
html += `<div class="documentFileBox" data-indexList="1"><img id="nationalCardFront_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardFront.picturePath ? item.nationalCardFront.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="1"><img id="nationalCardFront_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
|
||||
if (item.nationalCardRear.picturePath) {
|
||||
html += `<div class="documentFileBox" data-indexList="2"><img id="nationalCardRear_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardRear.picturePath ? item.nationalCardRear.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="2"><img id="nationalCardRear_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width5">
|
||||
<div class="Rtable-cell--content d-flex align-items-center justify-content-center">
|
||||
<div class="documentFileBox" data-indexList="3">`;
|
||||
if (item.militaryServiceCard.picturePath && (item.militaryServiceCard.statusString !== "unsubmitted" && item.militaryServiceCard.statusString !== "rejected")) {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.militaryServiceCard.picturePath ? item.militaryServiceCard.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width6">
|
||||
<div class="Rtable-cell--content d-flex align-items-center justify-content-center">`;
|
||||
|
||||
if (item.idCardPage1.picturePath && (item.idCardPage1.statusString !== "unsubmitted" && item.idCardPage1.statusString !== "rejected")) {
|
||||
html += `<div class="documentFileBox" data-indexList="4"><img id="idCardPage1_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage1.picturePath ? item.idCardPage1.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="4"><img id="idCardPage1_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
if (item.idCardPage2.picturePath && (item.idCardPage2.statusString !== "unsubmitted" && item.idCardPage2.statusString !== "rejected")) {
|
||||
html += `<div class="documentFileBox" data-indexList="5"><img id="idCardPage2_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage2.picturePath ? item.idCardPage2.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="5"><img id="idCardPage2_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
if (item.idCardPage3.picturePath && (item.idCardPage3.statusString !== "unsubmitted" && item.idCardPage3.statusString !== "rejected")) {
|
||||
html += `<div class="documentFileBox" data-indexList="6"><img id="idCardPage3_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage3.picturePath ? item.idCardPage3.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="6"><img id="idCardPage3_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
if (item.idCardPage4.picturePath && (item.idCardPage4.statusString !== "unsubmitted" && item.idCardPage4.statusString !== "rejected")) {
|
||||
html += `<div class="documentFileBox" data-indexList="7"><img id="idCardPage4_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage4.picturePath ? item.idCardPage4.picturePath : "")}" class="preview-image uploaded"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox" data-indexList="7"><img id="idCardPage4_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
|
||||
html += `</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width7">
|
||||
<div class="Rtable-cell--content text-end">
|
||||
<button id="editPD_${item.employeeId
|
||||
}_desktop" class="btn-uploadingPD position-relative">
|
||||
<span class="mx-1">بارگزاری مدارک</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-none d-block width7">
|
||||
<div class="Rtable-cell--content d-flex justify-content-end">
|
||||
<button type="button" class="btn-pd-more d-md-none d-block position-relative">
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
<p class="my-0 mx-1">عملیات بیشتر</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"></circle>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"></circle>
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"></circle>
|
||||
</svg>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operation-div w-100" style="margin: 0 0 0 0;">
|
||||
<div class="operations-btns">
|
||||
<div class="container-fluid px-0">
|
||||
<div class="row g-2">
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.employeePicture.picturePath && (item.employeePicture.statusString !== "unsubmitted" && item.employeePicture.statusString !== "rejected")) {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">عکس پرسنلی</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardFront.picturePath && (item.nationalCardFront.statusString !== "unsubmitted" && item.nationalCardFront.statusString !== "rejected")) {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardFront.picturePath ? item.nationalCardFront.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی رو</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardRear.picturePath && (item.nationalCardRear.statusString !== "unsubmitted" && item.nationalCardRear.statusString !== "rejected")) {
|
||||
html += `<img id="nationalCardRear_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardRear.picturePath ? item.nationalCardRear.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="nationalCardRear_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی پشت</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.militaryServiceCard.picturePath && (item.militaryServiceCard.statusString !== "unsubmitted" && item.militaryServiceCard.statusString !== "rejected")) {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.militaryServiceCard.picturePath ? item.militaryServiceCard.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت پایان خدمت</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage1.picturePath && (item.idCardPage1.statusString !== "unsubmitted" && item.idCardPage1.statusString !== "rejected")) {
|
||||
html += `<img id="idCardPage1_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage1.picturePath ? item.idCardPage1.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="idCardPage1_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه اول</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage2.picturePath && (item.idCardPage2.statusString !== "unsubmitted" && item.idCardPage2.statusString !== "rejected")) {
|
||||
html += `<img id="idCardPage2_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage2.picturePath ? item.idCardPage2.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="idCardPage2_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه دوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage3.picturePath && (item.idCardPage3.statusString !== "unsubmitted" && item.idCardPage3.statusString !== "rejected")) {
|
||||
html += `<img id="idCardPage3_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage3.picturePath ? item.idCardPage3.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="idCardPage3_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه سوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 text-center">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage4.picturePath && (item.idCardPage4.statusString !== "unsubmitted" && item.idCardPage4.statusString !== "rejected")) {
|
||||
html += `<img id="idCardPage4_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage4.picturePath ? item.idCardPage4.picturePath : "")}" class="preview-image uploaded">`;
|
||||
} else {
|
||||
html += `<img id="idCardPage4_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه چهارم</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 text-center">
|
||||
<div class="d-flex align-items-center justify-content-center">
|
||||
<button id="editPD_${item.employeeId}_mobile" class="btn-uploadingPD-mobile position-relative">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
<path d="M12.0433 6.49955L12.0214 6.52145L5.53808 13.0047C5.52706 13.0158 5.51612 13.0267 5.50525 13.0375C5.34278 13.1996 5.19895 13.3432 5.09758 13.5222L5.5266 13.7651L5.09758 13.5222C4.99622 13.7012 4.94714 13.8984 4.89171 14.1211C4.88801 14.136 4.88427 14.151 4.88049 14.1662L4.30029 16.4869L4.78351 16.6077L4.30029 16.4869C4.29808 16.4958 4.29585 16.5047 4.29361 16.5136C4.25437 16.6703 4.21246 16.8377 4.19871 16.9782C4.18357 17.1329 4.1871 17.394 4.39651 17.6034C4.60592 17.8128 4.86698 17.8163 5.02171 17.8012C5.16225 17.7875 5.32958 17.7456 5.48627 17.7063C5.49521 17.7041 5.50411 17.7018 5.51297 17.6996L7.83376 17.1194C7.84888 17.1156 7.86388 17.1119 7.87878 17.1082C8.10151 17.0528 8.29868 17.0037 8.47772 16.9023C8.65675 16.801 8.80027 16.6571 8.9624 16.4947C8.97324 16.4838 8.98416 16.4729 8.99519 16.4618L15.4785 9.97855L15.5004 9.95666C15.796 9.6611 16.0507 9.40638 16.2296 9.17534C16.4208 8.9284 16.5695 8.65435 16.5843 8.31531C16.5862 8.27179 16.5862 8.22821 16.5843 8.18469C16.5695 7.84565 16.4208 7.5716 16.2296 7.32466C16.0507 7.09362 15.796 6.8389 15.5004 6.54334L15.4785 6.52145L15.4566 6.49954C15.161 6.20396 14.9063 5.94922 14.6753 5.77034C14.4283 5.57917 14.1543 5.43041 13.8152 5.41564C13.7717 5.41374 13.7281 5.41374 13.6846 5.41564C13.3456 5.43041 13.0715 5.57917 12.8246 5.77034C12.5935 5.94922 12.3388 6.20396 12.0433 6.49955Z" />
|
||||
<path d="M11.4583 6.87484L14.2083 5.0415L16.9583 7.7915L15.1249 10.5415L11.4583 6.87484Z" />
|
||||
</svg>
|
||||
<span class="mx-1">ویرایش</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
pageIndexJs++;
|
||||
|
||||
});
|
||||
|
||||
pageIndexJs = pageIndex + response.pageIndex;
|
||||
pageIndex = pageIndexJs;
|
||||
$('#personnelDocumentsAjax').append(html);
|
||||
} else {
|
||||
html += `<div class="text-center bg-white d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#personnelDocumentsAjax').append(html);
|
||||
}
|
||||
|
||||
checkImage();
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function openPersonnelDocsUploadModal(id) {
|
||||
var goTo = `#showmodal=/AdminNew/Company/EmployeesDocuments/EmployeeList?workshopId=${workshopId}&employeeId=${id}&handler=CreateUploadDocument`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
function checkImage() {
|
||||
$('.documentFileBox').each(function () {
|
||||
if ($(this).find('img.uploaded').length > 0) {
|
||||
// Add the highlighted-border class to the documentFileBox
|
||||
$(this).addClass('highlighted-border');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,517 @@
|
||||
var employeePicture;
|
||||
var nationalCardFront;
|
||||
var nationalCardRear;
|
||||
var militaryServiceCard;
|
||||
var idCardPage1;
|
||||
var idCardPage2;
|
||||
var idCardPage3;
|
||||
var idCardPage4;
|
||||
var uploadFileCount = UploadedCount;
|
||||
|
||||
var pendingMessage = `<div class="pendingMessage">بررسی</div>`;
|
||||
var pendingIcon = `<svg width="24" height="24" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 19.25C15.5563 19.25 19.25 15.5563 19.25 11C19.25 6.44365 15.5563 2.75 11 2.75C6.44365 2.75 2.75 6.44365 2.75 11C2.75 15.5563 6.44365 19.25 11 19.25Z" fill="#FDBA74"/>
|
||||
<path d="M11.4168 14.6667C11.4168 14.8968 11.2303 15.0833 11.0002 15.0833C10.77 15.0833 10.5835 14.8968 10.5835 14.6667C10.5835 14.4365 10.77 14.25 11.0002 14.25C11.2303 14.25 11.4168 14.4365 11.4168 14.6667Z" fill="white" stroke="white"/>
|
||||
<path d="M11 11.916V6.41602V11.916Z" fill="white"/>
|
||||
<path d="M11 11.916V6.41602" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
var confirmMessage = `<div class="confirmedMessage">تایید</div>`;
|
||||
var confirmIcon = `<svg width="24" height="24" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7" cy="7" r="5.25" fill="#00C04D"/>
|
||||
<path d="M4.66659 7L6.41659 8.75L9.33325 5.25" stroke="white" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
var rejectMessage = `<div class="rejectMessage">رد شده</div>`;
|
||||
var rejectIcon = `<svg width="24" height="24" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7" cy="7" r="5.25" fill="#FF5D5D"/>
|
||||
<path d="M9.33341 4.66602L4.66675 9.33268" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.66659 4.66602L9.33325 9.33268" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`;
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
var employeeId = $("#employeeIdForList").val();
|
||||
|
||||
//$('.btnDeletingPD').each(function () {
|
||||
// if ($(this).hasClass('Unsubmitted')) { // Remove the extra class selector '.btnDeletingPD'
|
||||
// $(this).closest('.pdBox').addClass('justUploaded'); // Add 'justUploaded' to the closest parent .pdBox
|
||||
// }
|
||||
//});
|
||||
|
||||
|
||||
$(".btnDeletingPD ").each(function () {
|
||||
if ($(this).hasClass("SubmittedByAdmin") || $(this).hasClass("Rejected") || $(this).hasClass("Confirmed")) {
|
||||
$(this).addClass("disable");
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
$(document).off('click', '.btnUploadingPD').on('click', '.btnUploadingPD', function (event) {
|
||||
event.preventDefault();
|
||||
const index = $(this).data('index');
|
||||
$('input[type="file"][data-index="' + index + '"]').click();
|
||||
});
|
||||
|
||||
$('.pdBox').each(function () {
|
||||
if ($(".isTrue").hasClass("isTrue") && $(".Unsubmitted").hasClass("Unsubmitted") || $(".SubmittedByClient").hasClass("SubmittedByClient")) {
|
||||
$(".btnCreateNew").prop("disabled", false);
|
||||
$(".btnCreateNew ").removeClass("disable");
|
||||
} else {
|
||||
$(".btnCreateNew ").addClass("disable");
|
||||
}
|
||||
});
|
||||
|
||||
$('.pdBox').each(function () {
|
||||
// Check if there's a button with the 'submitted' class inside the pdBox
|
||||
if ($(this).find('button.SubmittedByAdmin').length > 0) {
|
||||
$(this).addClass('pending');
|
||||
$(this).find(".pdImageBox .sign").addClass("pendingSign").html(pendingIcon);
|
||||
$(this).find(".btnUploadingPD").addClass("disable");
|
||||
$(this).find(".resultMessage").html(pendingMessage);
|
||||
}
|
||||
if ($(this).find('button.Confirmed').length > 0) {
|
||||
$(this).addClass('complete');
|
||||
$(this).find(".pdImageBox .sign").addClass("completeSign").html(confirmIcon);
|
||||
$(this).find(".resultMessage").html(confirmMessage);
|
||||
}
|
||||
if ($(this).find('button.Rejected').length > 0) {
|
||||
$(this).addClass('discomplete');
|
||||
$(this).find(".pdImageBox .sign").addClass("discompleteSign").html(rejectIcon);
|
||||
$(this).find(".resultMessage").html(rejectMessage);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off('change', '.file-input').on('change', '.file-input', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const fileInputFile = this.files[0];
|
||||
const indexFileValue = $(this).data('index');
|
||||
const validExtensions = ['jpg', 'jpeg', 'png'];
|
||||
const validPdfExtensions = ['pdf'];
|
||||
|
||||
const label = $(`#label_${indexFileValue}`).val();
|
||||
|
||||
if (fileInputFile) {
|
||||
const fileName = fileInputFile.name.toLowerCase();
|
||||
const extension = fileName.split('.').pop();
|
||||
|
||||
if (validExtensions.includes(extension)) {
|
||||
if (fileInputFile.size > 5000000) {
|
||||
showAlertMessage('.alert-msg', 'لطفا فایل حجم کمتر از 5 مگابایت را آپلود کنید.', 3500);
|
||||
$(this).val('');
|
||||
return;
|
||||
}
|
||||
uploadFile(fileInputFile, indexFileValue, label);
|
||||
} else if (validPdfExtensions.includes(extension)) {
|
||||
|
||||
var fileReader = new FileReader();
|
||||
|
||||
fileReader.onload = function () {
|
||||
var typedarray = new Uint8Array(this.result);
|
||||
pdfjsLib.getDocument(typedarray).promise.then(function (pdf) {
|
||||
totalPageCount = pdf.numPages;
|
||||
|
||||
if (totalPageCount > 1) {
|
||||
showAlertMessage('.alert-msg', 'آپلود مجاز نیست! تعداد صفحات نباید بیشتر از ۱ باشد.', 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
pdf.getPage(1).then(function (page) { // فقط صفحه اول پردازش میشود
|
||||
var scale = 2.0;
|
||||
var viewport = page.getViewport({ scale: scale });
|
||||
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.className = "page";
|
||||
canvas.title = "Page 1";
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
var context = canvas.getContext("2d");
|
||||
|
||||
page.render({
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
})
|
||||
.promise.then(function () {
|
||||
uploadCanvasAsFile(canvas, `${label}_${indexFileValue}.jpg`, indexFileValue, label);
|
||||
})
|
||||
.catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'مشکلی در پردازش PDF رخ داده است!', 3500);
|
||||
});
|
||||
}).catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'خطا در دریافت صفحه PDF!', 3500);
|
||||
});
|
||||
|
||||
}).catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'خطا در بارگذاری فایل PDF!', 3500);
|
||||
});
|
||||
};
|
||||
|
||||
fileReader.readAsArrayBuffer(fileInputFile);
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', 'فرمت فایل باید یکی از موارد jpeg, jpg یا png باشد.', 3500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off('click', '.btnDeletingPD').on('click', '.btnDeletingPD', function (event) {
|
||||
event.preventDefault();
|
||||
const indexId = $(this).data('index');
|
||||
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا میخواهید تصویر موجود را حذف کنید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
removeEmployeeDocumentByLabel(indexId, employeeId);
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const img = pdBox.find('.preview-image');
|
||||
img.attr('src', '/assetsclient/images/pd-image.png');
|
||||
$(this).addClass('disable');
|
||||
} else {
|
||||
$(this).removeClass('disable');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".exitModal").click(function () {
|
||||
if (uploadFileCount > 0) {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "در صورت انصراف عملیات ثبت نخواهد شد!",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
cancelOperation();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#MainModal').modal('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function cancelOperation() {
|
||||
$.ajax({
|
||||
url: cancelOperationUrl,
|
||||
method: 'POST',
|
||||
data: { workshopId: workshopId, employeeId: employeeId },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('#MainModal').modal('hide');
|
||||
} else {
|
||||
showAlertMessage('.alert-success-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function uploadCanvasAsFile(canvas, fileName, indexFileValue, label) {
|
||||
canvas.toBlob(function (blob) {
|
||||
if (!blob) {
|
||||
showAlertMessage('.alert-msg', 'مشکلی در تبدیل تصویر رخ داده است!', 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
let file = new File([blob], fileName, { type: 'image/png' });
|
||||
|
||||
uploadFile(file, indexFileValue, label);
|
||||
|
||||
}, "image/png");
|
||||
}
|
||||
|
||||
var indexCount = 0;
|
||||
var activeUploads = 0;
|
||||
function uploadFile(file, indexId, label) {
|
||||
const formData = new FormData();
|
||||
formData.append('command.EmployeeId', employeeId);
|
||||
formData.append('command.WorkshopId', workshopId);
|
||||
formData.append('command.Label', label);
|
||||
formData.append('command.PictureFile', file);
|
||||
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const spinner = pdBox.find('.spinner-loading-progress');
|
||||
|
||||
const percentageText = pdBox.find('.percentageText');
|
||||
|
||||
spinner.show();
|
||||
activeUploads++;
|
||||
$('#createUploadingFiles').prop('disabled', true).addClass('disable');
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', saveUploadFileModalAjax, true);
|
||||
xhr.setRequestHeader('RequestVerificationToken', antiForgeryToken);
|
||||
|
||||
const uploadStartTime = new Date().getTime();
|
||||
let simulatedProgress = 0;
|
||||
let actualProgress = 0;
|
||||
let isUploadComplete = false;
|
||||
|
||||
// Simulate progress every 20ms, gradually increasing the bar until the actual progress is reached
|
||||
const progressInterval = setInterval(function () {
|
||||
if (simulatedProgress < actualProgress && !isUploadComplete) {
|
||||
simulatedProgress += 1; // Gradually increase simulated progress
|
||||
spinner.css('width', `${simulatedProgress}%`);
|
||||
percentageText.text(`${simulatedProgress}%`);
|
||||
}
|
||||
|
||||
if (simulatedProgress >= 100) {
|
||||
clearInterval(progressInterval); // Stop once the progress hits 100%
|
||||
}
|
||||
}, 30); // Increases by 1% every 20ms, making it smooth
|
||||
|
||||
// Actual upload progress listener
|
||||
xhr.upload.addEventListener('progress', function (e) {
|
||||
if (e.lengthComputable) {
|
||||
actualProgress = Math.round((e.loaded / e.total) * 100);
|
||||
|
||||
// If the actual progress is slow, allow the simulated progress to match it naturally
|
||||
if (actualProgress >= simulatedProgress) {
|
||||
simulatedProgress = actualProgress;
|
||||
spinner.css('width', `${simulatedProgress}%`);
|
||||
percentageText.text(`${simulatedProgress}%`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// On upload completion
|
||||
xhr.onload = function () {
|
||||
spinner.css('transition', 'all 2s ease-in');
|
||||
const uploadEndTime = new Date().getTime();
|
||||
const timeDiff = uploadEndTime - uploadStartTime;
|
||||
const minUploadTime = 2500; // Minimum of 2 seconds for the whole process
|
||||
|
||||
const response = JSON.parse(xhr.responseText);
|
||||
isUploadComplete = true; // Mark the upload as complete
|
||||
const delayTime = Math.max(minUploadTime - timeDiff, 0);
|
||||
|
||||
setTimeout(function () {
|
||||
clearInterval(progressInterval); // Clear the interval when done
|
||||
simulatedProgress = 100;
|
||||
spinner.css('width', '100%');
|
||||
percentageText.text('100%');
|
||||
|
||||
var id2 = $("#employeeIdForList").val();
|
||||
|
||||
if (xhr.status === 200 && response.isSuccedded) {
|
||||
indexCount++;
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
|
||||
uploadFileCount = uploadFileCount + 1;
|
||||
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const img = pdBox.find('.preview-image');
|
||||
img.attr('src', e.target.result);
|
||||
|
||||
//employeePicture = $('#EmployeePicture').attr('src');
|
||||
//nationalCardFront = $('#NationalCardFront').attr('src');
|
||||
//nationalCardRear = $('#NationalCardRear').attr('src');
|
||||
//militaryServiceCard = $('#MilitaryServiceCard').attr('src');
|
||||
//idCardPage1 = $('#IdCardPage1').attr('src');
|
||||
//idCardPage2 = $('#IdCardPage2').attr('src');
|
||||
//idCardPage3 = $('#IdCardPage3').attr('src');
|
||||
//idCardPage4 = $('#IdCardPage4').attr('src');
|
||||
//console.log(idCardPage2);
|
||||
|
||||
// updatePreviewImage(indexId, id2, e.target.result);
|
||||
|
||||
};
|
||||
|
||||
if (pdBox.hasClass("complete") || pdBox.hasClass("discomplete")) {
|
||||
|
||||
pdBox.removeClass("discomplete complete");
|
||||
pdBox.find(".sign").removeClass("discompleteSign completeSign");
|
||||
pdBox.find(".sign").empty();
|
||||
pdBox.find(".btnDeletingPD").removeClass("Rejected Confirmed");
|
||||
pdBox.find("confirmedMessage ").remove();
|
||||
pdBox.find(".resultMessage").empty();
|
||||
}
|
||||
|
||||
pdBox.find('.btnDeletingPD').removeClass('disable').addClass("Unsubmitted");
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message || 'Error uploading file', 3500);
|
||||
$('input[type="file"][data-index="' + indexId + '"]').val('');
|
||||
}
|
||||
spinner.css('width', '0%'); // Reset the progress bar
|
||||
spinner.hide();
|
||||
handleActiveUploads();
|
||||
}, delayTime); // Ensure a minimum of 2 seconds for the full process
|
||||
};
|
||||
|
||||
// Handle upload error
|
||||
xhr.onerror = function () {
|
||||
clearInterval(progressInterval); // Stop progress on error
|
||||
showAlertMessage('.alert-msg', 'مشکلی در آپلود فایل به وجود آمد.', 3500);
|
||||
$('input[type="file"][data-index="' + indexId + '"]').val('');
|
||||
spinner.css('width', '0%');
|
||||
spinner.hide();
|
||||
handleActiveUploads();
|
||||
};
|
||||
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
function handleActiveUploads() {
|
||||
activeUploads--;
|
||||
if (activeUploads === 0) {
|
||||
$('#createUploadingFiles').prop('disabled', false).removeClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
function showAlertMessage(selector, message, timeout) {
|
||||
$(selector).show();
|
||||
$(selector + ' p').text(message);
|
||||
setTimeout(function () {
|
||||
$(selector).hide();
|
||||
$(selector + ' p').text('');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function removeEmployeeDocumentByLabel(indexId, employeeId) {
|
||||
const label = $(`#label_${indexId}`).val();
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
|
||||
$.ajax({
|
||||
url: deleteFileAjaxUrl,
|
||||
method: 'POST',
|
||||
data: { label: label, employeeId: employeeId, workshopId: workshopId },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
uploadFileCount = uploadFileCount - 1;
|
||||
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت حذف شد.', 3500);
|
||||
/* $(`#label_${indexId}`).val('');*/
|
||||
pdBox.find('.btnDeletingPD').removeClass("Unsubmitted");
|
||||
pdBox.find('.uploaderSign').hide();
|
||||
updatePreviewImage(Number(indexId), Number(employeeId), "/assetsclient/images/pd-image.png");
|
||||
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-success-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updatePreviewImage(indexId, id2, result) {
|
||||
switch (indexId) {
|
||||
case 0:
|
||||
$(`#employeePicture_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 1:
|
||||
$(`#nationalCardFront_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 2:
|
||||
$(`#nationalCardRear_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 3:
|
||||
$(`#militaryServiceCard_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 4:
|
||||
$(`#idCardPage1_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 5:
|
||||
$(`#idCardPage2_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 6:
|
||||
$(`#idCardPage3_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 7:
|
||||
$(`#idCardPage4_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unexpected indexId:', indexId);
|
||||
}
|
||||
}
|
||||
|
||||
function saveSubmit(id) {
|
||||
var loading = $(".spinner-loading");
|
||||
|
||||
loading.show();
|
||||
|
||||
var data = {
|
||||
'cmd.EmployeeDocumentsId': id
|
||||
}
|
||||
$.ajax({
|
||||
url: saveSubmitAjax,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
loading.hide();
|
||||
|
||||
if (response.isSuccedded) {
|
||||
|
||||
var id2 = $("#employeeIdForList").val();
|
||||
$(".pdBox").each(function () {
|
||||
var indexId = $(this).find('.btnUploadingPD').data('index');
|
||||
var imgSrc = $(this).find('.preview-image').attr("src");
|
||||
updatePreviewImage(indexId, id2, imgSrc);
|
||||
});
|
||||
|
||||
_RefreshWorkFlowCountMenu();
|
||||
|
||||
$('#MainModal').modal('hide');
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت ارسال شد.', 3500);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
loading.hide();
|
||||
showAlertMessage('.alert-msg', 'مشکلی در ارسال تصویر به وجود آمد.', 3500);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function cancelOP() {
|
||||
|
||||
$.ajax({
|
||||
url: saveSubmitAjax,
|
||||
method: 'POST',
|
||||
data: { employeeId: employeeId, },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
loading.hide();
|
||||
$('#MainModal').modal('hide');
|
||||
|
||||
if (response.isSuccedded) {
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت ارسال شد.', 3500);
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
loading.hide();
|
||||
showAlertMessage('.alert-msg', 'مشکلی در ارسال تصویر به وجود آمد.', 3500);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,292 @@
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.checkSvg {
|
||||
right: -8px;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: -10px;
|
||||
margin-right: 100px;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acacd6;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.goToTop:hover {
|
||||
color: #fff;
|
||||
background-color: #2ca4a4;
|
||||
}
|
||||
|
||||
.width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.width3 {
|
||||
width: 25% !important;
|
||||
}
|
||||
|
||||
.width4 {
|
||||
width: 18% !important;
|
||||
}
|
||||
|
||||
.width5 {
|
||||
width: 6% !important;
|
||||
}
|
||||
|
||||
.width6 {
|
||||
width: 0% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 0% !important;
|
||||
}
|
||||
.width8 {
|
||||
width: 10% !important;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.documentFileBox {
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.documentFileBoxImg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.submittedbyadmin {
|
||||
border: 1px solid #FDBA74;
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
border: 1px solid transparent;
|
||||
/*width: 60%;*/
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 4px;
|
||||
color: #146D94;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-uploadingPD:hover {
|
||||
color: #083347;
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-pd-more {
|
||||
background: #B6F2E1;
|
||||
border: 1px solid #059669;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #059669;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-pd-more:hover {
|
||||
background: #a3d7c9;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile {
|
||||
background-color: #B9EBEE;
|
||||
color: #1992C6;
|
||||
width: 100%;
|
||||
padding: 6px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #7ddadf;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile:hover {
|
||||
background-color: #91dfe3;
|
||||
}
|
||||
|
||||
.withdraw {
|
||||
background-color: rgb(177 195 195) !important;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
background-color: #b0e5e5;
|
||||
padding: 6px 9px;
|
||||
width: 130px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #b3b3b3;
|
||||
color: #9d9d9d;
|
||||
font-size: 11px;
|
||||
margin: auto 3px auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD:first-child {
|
||||
margin: auto 0 auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD.active {
|
||||
background-color: #34dfdf;
|
||||
color: #3b3b3b;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.btnTabPD:hover {
|
||||
background-color: #34dfdf;
|
||||
}
|
||||
|
||||
.images {
|
||||
word-wrap: normal;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.operation-image {
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
background-position: center;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.imageHolder {
|
||||
text-align: center;
|
||||
padding: 0 !important;
|
||||
border-radius: 8px;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
font-size: 10px;
|
||||
}
|
||||
.images {
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 54px;
|
||||
margin-right: 39%;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acac70;
|
||||
}
|
||||
.images {
|
||||
justify-content: center !important;
|
||||
}
|
||||
.wrapper {
|
||||
margin: 0 0 60px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even), .table-workshop .Rtable .Rtable-row:nth-child(4n+2), .table-personals .Rtable .Rtable-row:nth-child(4n+2) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd), .table-workshop .Rtable .Rtable-row:nth-child(4n+4), .table-personals .Rtable .Rtable-row:nth-child(4n+4) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: none;
|
||||
border: 1px solid #D2D2D2;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 30% !important;
|
||||
justify-content: end;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
color: #727272;
|
||||
font-weight: 600;
|
||||
font-size: 10px;
|
||||
margin: 3px 4px;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
font-size: 10px;
|
||||
padding: 5px 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width:992px) {
|
||||
.operation-image {
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media(max-width:567px) {
|
||||
.width8 {
|
||||
text-align: start !important;
|
||||
}
|
||||
.width4 {
|
||||
width: 45% !important;
|
||||
}
|
||||
.images {
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
.operation-image {
|
||||
width: 120px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,232 @@
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
background-color: #fef2f2 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: -10px;
|
||||
margin-right: 100px;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acacd6;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.goToTop:hover {
|
||||
color: #fff;
|
||||
background-color: #2ca4a4;
|
||||
}
|
||||
|
||||
.width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 40% !important;
|
||||
}
|
||||
|
||||
.width3 {
|
||||
width: 30% !important;
|
||||
}
|
||||
|
||||
.width4 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.width5 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 10% !important;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.documentFileBox {
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.documentFileBoxImg {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 4px;
|
||||
background-color: #D9D9D9;
|
||||
margin: auto 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
width: 40px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
border: 1px solid transparent;
|
||||
/*width: 60%;*/
|
||||
font-size: 12px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 4px;
|
||||
color: #146D94;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-uploadingPD:hover {
|
||||
color: #083347;
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-pd-more {
|
||||
background: #B6F2E1;
|
||||
border: 1px solid #059669;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
color: #059669;
|
||||
text-align: right;
|
||||
font-size: 11px;
|
||||
padding: 3px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-pd-more:hover {
|
||||
background: #a3d7c9;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile {
|
||||
background-color: #B9EBEE;
|
||||
color: #1992C6;
|
||||
width: 100%;
|
||||
padding: 6px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #7ddadf;
|
||||
}
|
||||
|
||||
.btn-uploadingPD-mobile:hover {
|
||||
background-color: #91dfe3;
|
||||
}
|
||||
|
||||
.withdraw {
|
||||
background-color: rgb(177 195 195) !important;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
background-color: #b0e5e5;
|
||||
padding: 6px 9px;
|
||||
width: 130px;
|
||||
border-radius: 7px;
|
||||
border: 1px solid #b3b3b3;
|
||||
color: #9d9d9d;
|
||||
font-size: 11px;
|
||||
margin: auto 3px auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD:first-child {
|
||||
margin: auto 0 auto 3px;
|
||||
}
|
||||
|
||||
.btnTabPD.active {
|
||||
background-color: #34dfdf;
|
||||
color: #3b3b3b;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.btnTabPD:hover {
|
||||
background-color: #34dfdf;
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.btn-uploadingPD {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.goToTop {
|
||||
position: fixed;
|
||||
bottom: 54px;
|
||||
margin-right: 39%;
|
||||
z-index: 100;
|
||||
color: #fff;
|
||||
background-color: #25acac70;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
margin: 0 0 60px 0;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even), .table-workshop .Rtable .Rtable-row:nth-child(4n+2), .table-personals .Rtable .Rtable-row:nth-child(4n+2) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd), .table-workshop .Rtable .Rtable-row:nth-child(4n+4), .table-personals .Rtable .Rtable-row:nth-child(4n+4) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: none;
|
||||
border: 1px solid #D2D2D2;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.width2 {
|
||||
width: 15% !important;
|
||||
}
|
||||
|
||||
.width7 {
|
||||
width: 30% !important;
|
||||
justify-content: end;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
color: #727272;
|
||||
font-weight: 600;
|
||||
font-size: 10px;
|
||||
margin: 3px 4px;
|
||||
}
|
||||
|
||||
.btnTabPD {
|
||||
font-size: 10px;
|
||||
padding: 5px 6px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,590 @@
|
||||
|
||||
|
||||
/* List & Table */
|
||||
.list-box {
|
||||
border-radius: 10px;
|
||||
/* padding: 4px; */
|
||||
padding: 2px 6px;
|
||||
}
|
||||
/* End List & Table */
|
||||
|
||||
|
||||
.ellipsed {
|
||||
display: block;
|
||||
width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: clip;
|
||||
white-space: nowrap;
|
||||
text-align:start
|
||||
}
|
||||
|
||||
/*********************************** Start Apply Table styles ***********************************/
|
||||
.wrapper {
|
||||
width: 100%;
|
||||
/* max-width: 1000px; */
|
||||
/* margin: 1em auto; */
|
||||
/* padding: 1em; */
|
||||
/* text-align: right; */
|
||||
/* font-family: 'IranYekanEXBold' !important; */
|
||||
}
|
||||
|
||||
.is-striped {
|
||||
background-color: rgba(233, 200, 147, 0.2);
|
||||
}
|
||||
|
||||
.date-cell {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.topic-cell {
|
||||
width: 41%;
|
||||
}
|
||||
|
||||
.access-link-cell {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.replay-link-cell {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.pdf-cell {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.Rtable {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* margin: 0 0 3em 0; */
|
||||
padding: 0;
|
||||
/* box-shadow: 0 0 40px rgba(0, 0, 0, 0.2); */
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
/* border: 2px solid white; */
|
||||
padding: 0.1em 0.4em;
|
||||
/* margin: 5px 2px auto; */
|
||||
margin: 2px auto;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell {
|
||||
box-sizing: border-box;
|
||||
flex-grow: 1;
|
||||
padding: 0.2em;
|
||||
/* این هایدن برای همتراز بودن خوبه، ولی موقع رسپانسیو مقدار همتراز نامیزان میشود */
|
||||
/* overflow: hidden; */
|
||||
list-style: none;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
/* این قسمت برای همتراز کردن ستون های جدول است */
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd) {
|
||||
border-radius: 10px;
|
||||
background-color: #DDF4F4;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even),
|
||||
.table-workshop .Rtable .Rtable-row:nth-child(4n+2),
|
||||
.table-personals .Rtable .Rtable-row:nth-child(4n+2) {
|
||||
border-radius: 10px;
|
||||
background-color: #ECFFFF;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(even):hover,
|
||||
.table-workshop .Rtable .Rtable-row:nth-child(4n+2):hover,
|
||||
.table-personals .Rtable .Rtable-row:nth-child(4n+2):hover {
|
||||
background-color: #C9F0F0;
|
||||
/*transform: scale(1.006);*/
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd),
|
||||
.table-workshop .Rtable .Rtable-row:nth-child(4n+4),
|
||||
.table-personals .Rtable .Rtable-row:nth-child(4n+4) {
|
||||
border-radius: 10px;
|
||||
background-color: #DDF4F4;
|
||||
transition: all .3s ease;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:nth-child(odd):hover,
|
||||
.table-workshop .Rtable .Rtable-row:nth-child(4n+4):hover,
|
||||
.table-personals .Rtable .Rtable-row:nth-child(4n+4):hover {
|
||||
background-color: #C9F0F0;
|
||||
/*transform: scale(1.006);*/
|
||||
}
|
||||
|
||||
|
||||
.Rtable .Rtable-row:first-child {
|
||||
background: linear-gradient(180deg, #41D1D1 0%, #2CD0D0 100%);
|
||||
border: none !important;
|
||||
/* padding: auto 1px; */
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row:first-child:hover {
|
||||
transform: none !important;
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading {
|
||||
color: white;
|
||||
/* padding: 1em 0.5em; */
|
||||
margin: 0.4em 0;
|
||||
}
|
||||
|
||||
/* TH */
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading:last-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading:first-child {
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--heading {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
font-size: 12px;
|
||||
/* padding: 0 0.5em; */
|
||||
text-align: right;
|
||||
color: #0B5959;
|
||||
/* white-space: nowrap; */
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content .webinar-date {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span {
|
||||
border-radius: 5px;
|
||||
background: rgba(87, 227, 227, 0.25);
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
|
||||
.no-flexbox .Rtable {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.no-flexbox .Rtable.Rtable-cell {
|
||||
width: 100%;
|
||||
}
|
||||
/*********************************** END Apply Table styles ***********************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************** Start Table Contract List ***********************************/
|
||||
.table-contracts .Rtable .Rtable-row .column-heading > span {
|
||||
border-radius: 5px;
|
||||
/* background: rgba(87, 227, 227, 0.25); */
|
||||
width: 60px;
|
||||
/* height: 32px; */
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.table-contracts .Rtable .Rtable-row .column-heading > span input {
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.table-contracts .Rtable .Rtable-row .Rtable-cell .Rtable-cell--content > span {
|
||||
border-radius: 5px;
|
||||
background: rgba(87, 227, 227, 0.25);
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding: 0 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
|
||||
.table-contracts .Rtable .Rtable-row .Rtable-cell .column-heading > span {
|
||||
border-radius: 5px;
|
||||
background: rgba(87, 227, 227, 0.25);
|
||||
width: 60px;
|
||||
height: 32px;
|
||||
display: inline-block;
|
||||
padding: 6px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.table-contracts .form-check-input {
|
||||
padding: 8px !important;
|
||||
border: 0 !important;
|
||||
outline: 1px solid #1dc9a0;
|
||||
}
|
||||
|
||||
.table-contracts .form-check-input:checked[type="checkbox"] {
|
||||
padding: 8px !important;
|
||||
/* outline: none; */
|
||||
outline: 1px solid #1dc9a0;
|
||||
}
|
||||
|
||||
.table-contracts .form-check-input:checked {
|
||||
background-color: #1dc9a0;
|
||||
padding: 8px !important;
|
||||
outline: 1px solid #1dc9a0;
|
||||
}
|
||||
|
||||
.table-contracts .form-check-input.checkAll:checked {
|
||||
background-color: #128888;
|
||||
padding: 8px !important;
|
||||
outline: 1px solid #1dc9a0;
|
||||
}
|
||||
|
||||
.table-contracts .form-check-input:focus, .form-control:focus {
|
||||
border-color: #1dc9a0;
|
||||
outline: 0;
|
||||
box-shadow: none;
|
||||
outline: 1px solid #1dc9a0;
|
||||
}
|
||||
|
||||
.table-contracts .select-all {
|
||||
border-radius: 7px;
|
||||
padding: 6px 8px;
|
||||
background-color: #3AD1D1;
|
||||
}
|
||||
|
||||
.table-contracts .select-all input:checked[type="checkbox"] + label {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.table-contracts .select-all label {
|
||||
color: #ffffff;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.table-contracts .contract-list .Rtable--collapse .Rtable-row--head {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width1 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width2 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width3 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width4 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width5 {
|
||||
width: 10%;
|
||||
}
|
||||
.table-contracts .contract-list .width6 {
|
||||
width: 10%;
|
||||
}
|
||||
.table-contracts .contract-list .width7 {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.table-contracts .contract-list .width8 {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
/*********************************** End Table Contract List ***********************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*********************************** Start Table Checkout List ***********************************/
|
||||
.table-contracts .checkout-list .Rtable--collapse .Rtable-row--head {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width1 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width2 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width3 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width4 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width5 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width6 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width7 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width8 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width9 {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.table-contracts .checkout-list .width10 {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
/*********************************** End Table Checkout List ***********************************/
|
||||
|
||||
|
||||
|
||||
|
||||
/* ********************************************** Start Table Personal List ********************************************** */
|
||||
.personalListModal .personal-list .Rtable--collapse .Rtable-row {
|
||||
padding: 4px 5px;
|
||||
outline: none;
|
||||
margin: 0.1em 0;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .withdraw {
|
||||
background-color: rgb(177 195 195);
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .Rtable--collapse .Rtable-row--head {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .width1 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .width2 {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .width3 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .width4 {
|
||||
width: 15%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .width5 {
|
||||
width: 15%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
.personalListModal .personal-list .width6 {
|
||||
width: 25%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.personalListModal .personal-list .Rtable--collapse .Rtable-row .Rtable-cell:last-child .Rtable-cell--content {
|
||||
text-align: center;
|
||||
}
|
||||
/* ********************************************** End Table Personal List ********************************************** */
|
||||
|
||||
|
||||
|
||||
|
||||
/* ********************************************** Start Table Personal Info List ********************************************** */
|
||||
.personalListModal .personal-info-list .Rtable--collapse .Rtable-row {
|
||||
padding: 4px 5px;
|
||||
outline: none;
|
||||
margin: 0.1em 0 4px 0;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .withdraw {
|
||||
background-color: rgb(177 195 195);
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .Rtable--collapse .Rtable-row--head {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.personal-info-list .Rtable .Rtable-row .Rtable-cell {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width1 {
|
||||
width: 2.50%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width2 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width3 {
|
||||
width: 5%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width4 {
|
||||
width: 5%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width5 {
|
||||
width: 6.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width6 {
|
||||
width: 6.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width7 {
|
||||
width: 6.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width8 {
|
||||
width: 5.25%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width9 {
|
||||
width: 5.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width10 {
|
||||
width: 4.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width11 {
|
||||
width: 4.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width12 {
|
||||
width: 10%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width13 {
|
||||
width: 7.25%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width14 {
|
||||
width: 10%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width15 {
|
||||
width: 6.25%;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .width16 {
|
||||
width: 2.1%;
|
||||
}
|
||||
|
||||
.personalListModal .personal-info-list .Rtable--collapse .Rtable-row .Rtable-cell:last-child .Rtable-cell--content {
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.Rtable .Rtable-row .Rtable-cell.column-heading:last-child {
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell {
|
||||
border-bottom: none !important;
|
||||
}
|
||||
}
|
||||
/* ********************************************** End Table Personal Info List ********************************************** */
|
||||
|
||||
|
||||
|
||||
|
||||
/* ********************************************** Start Table Workshop List ********************************************** */
|
||||
.table-workshop .Rtable--collapse .Rtable-row {
|
||||
padding: 1px 6px;
|
||||
outline: none;
|
||||
margin: 5px 0px 0;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .Rtable--collapse .Rtable-row--head {
|
||||
/*display: flex;*/
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width1 {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width2 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width3 {
|
||||
width: 20%;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width4 {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width5 {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .width6 {
|
||||
width: 10%;
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
}
|
||||
|
||||
.table-workshop .workshop-list .Rtable--collapse .Rtable-row .Rtable-cell:last-child .Rtable-cell--content {
|
||||
/*text-align: center;*/
|
||||
}
|
||||
/* ********************************************** End Table Workshop List ********************************************** */
|
||||
|
||||
|
||||
@@ -0,0 +1,500 @@
|
||||
var operations = [];
|
||||
var svgPending =
|
||||
`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 19.25C15.5563 19.25 19.25 15.5563 19.25 11C19.25 6.44365 15.5563 2.75 11 2.75C6.44365 2.75 2.75 6.44365 2.75 11C2.75 15.5563 6.44365 19.25 11 19.25Z" fill="#FDBA74" />
|
||||
<path d="M11.4166 14.6667C11.4166 14.8968 11.2301 15.0833 10.9999 15.0833C10.7698 15.0833 10.5833 14.8968 10.5833 14.6667C10.5833 14.4365 10.7698 14.25 10.9999 14.25C11.2301 14.25 11.4166 14.4365 11.4166 14.6667Z" fill="white" stroke="white" />
|
||||
<path d="M11 11.916V6.41602V11.916Z" fill="white" />
|
||||
<path d="M11 11.916V6.41602" stroke="white" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>`;
|
||||
|
||||
var svgReject =
|
||||
`<svg width="22" height="22" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="9" cy="9" r="6.75" fill="#F87171"/>
|
||||
<path d="M12 6L6 12" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M6 6L12 12" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
`;
|
||||
var svgConfirmed =
|
||||
`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="8" fill="#A3E635" />
|
||||
<path d="M9.5 12L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L15.5 10" stroke="white" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>`;
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
checkSubmit();
|
||||
|
||||
|
||||
$("#militaryStatus").prop("disabled", true);
|
||||
$("#operationBtn").click(function() {
|
||||
if (window.matchMedia("(max-width: 767px)").matches) {
|
||||
|
||||
$(".responsiveInMobile").css({
|
||||
"display": "block",
|
||||
"transition": "opacity 0.5s"
|
||||
});
|
||||
$("#overlayModalUpload").css({
|
||||
"display": "block",
|
||||
"transition": "opacity 0.5s"
|
||||
});
|
||||
|
||||
$("#confirm , #reject").click(function() {
|
||||
setTimeout(function() {
|
||||
$(".responsiveInMobile").css({ "display": "none"});
|
||||
$("#overlayModalUpload").css({ "display": "none"});
|
||||
},300);
|
||||
});
|
||||
|
||||
|
||||
// New changes...
|
||||
$('#overlayModalUpload, .closePartition').click(function () {
|
||||
$(".responsiveInMobile").css({
|
||||
"display": "none",
|
||||
"opacity": "0"
|
||||
});
|
||||
$("#overlayModalUpload").css({
|
||||
"display": "none",
|
||||
"opacity": "0"
|
||||
});
|
||||
});
|
||||
|
||||
// Set the opacity back to 1 after a short delay
|
||||
setTimeout(function () {
|
||||
$(".responsiveInMobile").css("opacity", "1");
|
||||
$("#overlayModalUpload").css("opacity", "1");
|
||||
}, 10);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//giving class to sign holders and adjust classes
|
||||
$('.signHolder').each(function() {
|
||||
const buttonClass = $(this).find('button').attr('class');
|
||||
const spanElement = $(this).find('span.sign');
|
||||
if (buttonClass.includes('submittedbyadmin')) {
|
||||
$(this).addClass('pending');
|
||||
spanElement.html(svgPending);
|
||||
} else if (buttonClass.includes('rejected')) {
|
||||
$(this).addClass('reject');
|
||||
spanElement.html(svgReject);
|
||||
} else if (buttonClass.includes('pending')) {
|
||||
$(this).addClass('pending');
|
||||
spanElement.html(svgPending);
|
||||
} else if (buttonClass.includes('confirmed')) {
|
||||
$(this).addClass('confirmed');
|
||||
spanElement.html(svgConfirmed);
|
||||
}
|
||||
});
|
||||
|
||||
// Ensure the first carousel item is active by default
|
||||
if (!$('.carousel-item').hasClass('active')) {
|
||||
$('.carousel-item').first().addClass('active');
|
||||
}
|
||||
|
||||
// Ensure the first mg-btn (for "عکس پرسنلی") is active by default
|
||||
$('.mg-btn').first().addClass('active');
|
||||
|
||||
var currentSlide = $('.carousel-item.active').data('slide-index') || 0;
|
||||
var totalSlides = $('.carousel-item').length;
|
||||
|
||||
// Function to update slide, buttons, and selective slides
|
||||
function updateSlide() {
|
||||
// Move carousel to the current slide
|
||||
$('#carouselExampleIndicators').carousel(currentSlide);
|
||||
|
||||
// Update active button
|
||||
$('.mg-btn').removeClass('active');
|
||||
$('.mg-btn[data-slide-index="' + currentSlide + '"]').addClass('active');
|
||||
|
||||
// Update selective slides for right-to-left
|
||||
$('.slective-slide').removeClass('active-select');
|
||||
$('.slective-slide[data-slide-index="' + currentSlide + '"]').addClass('active-select');
|
||||
}
|
||||
|
||||
// Initial update
|
||||
updateSlide();
|
||||
|
||||
// Event listener for button clicks
|
||||
$('.mg-btn').click(function () {
|
||||
currentSlide = $(this).data('slide-index');
|
||||
updateSlide();
|
||||
});
|
||||
|
||||
// Event listener for next and previous arrows
|
||||
$('.right-arrow, .left-arrow').click(function () {
|
||||
var direction = $(this).hasClass('right-arrow') ? -1 : 1; // Adjust direction for right-to-left slider
|
||||
currentSlide = (currentSlide + direction + totalSlides) % totalSlides;
|
||||
updateSlide();
|
||||
});
|
||||
|
||||
// Event listener for carousel item change
|
||||
$('#carouselExampleIndicators').on('slid.bs.carousel', function () {
|
||||
currentSlide = $('.carousel-item.active').data('slide-index');
|
||||
updateSlide();
|
||||
});
|
||||
|
||||
$(".exitModal").click(function () {
|
||||
|
||||
if (operations.length > 0) {
|
||||
swal({
|
||||
title: "در صورت انصراف عملیات ثبت نخواهد شد!",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
$('#MainModal').modal('hide');
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#MainModal').modal('hide');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
function toggleOperationTab() {
|
||||
let enable = false;
|
||||
$(".mg-btn.active").each(function () {
|
||||
if ($(this).hasClass("submittedbyadmin")) {
|
||||
enable = true;
|
||||
}
|
||||
});
|
||||
if (enable) {
|
||||
$(".operaion-tab").removeClass("disable");
|
||||
|
||||
} else {
|
||||
$(".operaion-tab").addClass("disable");
|
||||
}
|
||||
}
|
||||
|
||||
// Initial check
|
||||
toggleOperationTab();
|
||||
|
||||
// Check when .mg-btn classes change
|
||||
$('.mg-btn').on('classChange', function () {
|
||||
toggleOperationTab();
|
||||
});
|
||||
|
||||
// Trigger classChange event when class is added or removed
|
||||
(function () {
|
||||
var originalAddClassMethod = $.fn.addClass;
|
||||
var originalRemoveClassMethod = $.fn.removeClass;
|
||||
|
||||
$.fn.addClass = function () {
|
||||
var result = originalAddClassMethod.apply(this, arguments);
|
||||
$(this).trigger('classChange');
|
||||
return result;
|
||||
};
|
||||
|
||||
$.fn.removeClass = function () {
|
||||
var result = originalRemoveClassMethod.apply(this, arguments);
|
||||
$(this).trigger('classChange');
|
||||
return result;
|
||||
};
|
||||
})();
|
||||
|
||||
// Check images and update alt attribute
|
||||
$('img').each(function () {
|
||||
if ($(this).attr('src') === "/AdminNew/Company/EmployeesDocumentsManagement/EmployeesList?handler=ShowPicture") {
|
||||
$(this).attr('alt', 'عکسی آپلود نشده');
|
||||
$(this).css("color", "black");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Lightbox Gallery
|
||||
|
||||
// query selectors
|
||||
const lightboxEnabled = document.querySelectorAll('.lightbox-enabled');
|
||||
const lightboxArray = Array.from(lightboxEnabled);
|
||||
const lastImage = lightboxArray.length - 1;
|
||||
const lightboxContainer = document.querySelector('.lightbox-container');
|
||||
const lightboxImage = document.querySelector('.lightbox-image');
|
||||
const lightboxBtns = document.querySelectorAll('.lightbox-btn');
|
||||
const lightboxBtnRight = document.querySelector('#right');
|
||||
const lightboxBtnLeft = document.querySelector('#left');
|
||||
let activeImage;
|
||||
// Functions
|
||||
const showLightBox = () => { lightboxContainer.classList.add('active') }
|
||||
|
||||
const hideLightBox = () => { lightboxContainer.classList.remove('active') }
|
||||
|
||||
const setActiveImage = (image) => {
|
||||
lightboxImage.src = image.dataset.imgsrc;
|
||||
activeImage = lightboxArray.indexOf(image);
|
||||
}
|
||||
|
||||
const transitionSlidesLeft = () => {
|
||||
lightboxBtnLeft.focus();
|
||||
$('.lightbox-image').addClass('slideright');
|
||||
setTimeout(function () {
|
||||
activeImage === 0 ? setActiveImage(lightboxArray[lastImage]) : setActiveImage(lightboxArray[activeImage - 1]);
|
||||
}, 250);
|
||||
|
||||
|
||||
setTimeout(function () {
|
||||
$('.lightbox-image').removeClass('slideright');
|
||||
}, 500);
|
||||
}
|
||||
|
||||
const transitionSlidesRight = () => {
|
||||
lightboxBtnRight.focus();
|
||||
$('.lightbox-image').addClass('slideleft');
|
||||
setTimeout(function () {
|
||||
activeImage === lastImage ? setActiveImage(lightboxArray[0]) : setActiveImage(lightboxArray[activeImage + 1]);
|
||||
}, 250);
|
||||
setTimeout(function () {
|
||||
$('.lightbox-image').removeClass('slideleft');
|
||||
}, 500);
|
||||
}
|
||||
|
||||
const transitionSlideHandler = (moveItem) => {
|
||||
moveItem.includes('left') ? transitionSlidesLeft() : transitionSlidesRight();
|
||||
}
|
||||
|
||||
// Event Listeners
|
||||
lightboxEnabled.forEach(image => {
|
||||
image.addEventListener('click',
|
||||
(e) => {
|
||||
showLightBox();
|
||||
setActiveImage(image);
|
||||
});
|
||||
});
|
||||
lightboxContainer.addEventListener('click', () => { hideLightBox() });
|
||||
lightboxBtns.forEach(btn => {
|
||||
btn.addEventListener('click',
|
||||
(e) => {
|
||||
e.stopPropagation();
|
||||
transitionSlideHandler(e.currentTarget.id);
|
||||
});
|
||||
});
|
||||
|
||||
lightboxImage.addEventListener('click',
|
||||
(e) => {
|
||||
e.stopPropagation();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
function checkFields() {
|
||||
if ($(".mg-btn").hadClass("active")) {
|
||||
var index = $(this).data("slide-index");
|
||||
var inputValue = $("#label_" + index).val();
|
||||
|
||||
$("#confirm").click(function () {
|
||||
$(this).removeClass('submittedbyadmin').addClass("confirmed");
|
||||
$(this).closest('.signHolder').removeClass("pending").addClass("confirmed");
|
||||
$(this).siblings("span.sign").html(svgConfirmed);
|
||||
//تایید توضیحات نمیخواد
|
||||
//inputValue = $("#message").val();
|
||||
inputValue=$()
|
||||
});
|
||||
|
||||
$("#reject").click(function () {
|
||||
$(this).removeClass('submittedbyadmin').addClass("reject");
|
||||
$(this).closest('.signHolder').removeClass("pending").addClass("rejected");
|
||||
$(this).siblings("span.sign").html(svgReject);
|
||||
inputValue = $("#message").val();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function rejectAjax() {
|
||||
//var carouselDocumentItemId = $('.carousel-item.active').data('document-id');
|
||||
var carouselDocumentItemId = $('.mg-btn.active').data('document-btn-id');
|
||||
var messageData = $("#message").val();
|
||||
|
||||
if (messageData === "") {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('فیلد توضیحات را پر نمایید');
|
||||
$('.select-alert').addClass('errored');
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
$('.select-alert').removeClass('errored');
|
||||
}, 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
let commandData = {
|
||||
EmployeeDocumentItemId: carouselDocumentItemId,
|
||||
IsConfirmed: false,
|
||||
Message: messageData
|
||||
};
|
||||
operations.push(commandData);
|
||||
$("#message").val("");
|
||||
checkSubmit();
|
||||
|
||||
|
||||
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود رد شد.', 3500);
|
||||
$(".mg-btn.active").removeClass('submittedbyadmin').addClass("reject");
|
||||
$(".mg-btn.active").closest('.signHolder').removeClass("pending").addClass("rejected");
|
||||
|
||||
$(".mg-btn.active").siblings("span.sign").html(svgReject);
|
||||
}
|
||||
|
||||
function confirmAjax() {
|
||||
//var carouselDocumentItemId = $('.carousel-item.active').data('document-id');
|
||||
var carouselDocumentItemId = $('.mg-btn.active').data('document-btn-id');
|
||||
var messageData = $("#message").val();
|
||||
|
||||
let commandData = {
|
||||
EmployeeDocumentItemId: carouselDocumentItemId,
|
||||
IsConfirmed: true,
|
||||
Message: messageData
|
||||
};
|
||||
operations.push(commandData);
|
||||
$("#message").val("");
|
||||
checkSubmit();
|
||||
|
||||
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود تایید شد.', 3500);
|
||||
$(".mg-btn.active").removeClass('submittedbyadmin').addClass("confirmed");
|
||||
$(".mg-btn.active").closest('.signHolder').removeClass("pending").addClass("confirmed");
|
||||
|
||||
$(".mg-btn.active").siblings("span.sign").html(svgConfirmed);
|
||||
}
|
||||
|
||||
|
||||
//function rejectAjax() {
|
||||
// var document_ItemId = $('.carousel-item.active').data('document-id');
|
||||
// var messageData = $("#message").val();
|
||||
|
||||
|
||||
// if (messageData === "") {
|
||||
// $('.alert-msg').show();
|
||||
// $('.alert-msg p').text('فیلد توضیحات را پر نمایید');
|
||||
// $('.select-alert').addClass('errored');
|
||||
// setTimeout(function () {
|
||||
// $('.alert-msg').hide();
|
||||
// $('.alert-msg p').text('');
|
||||
// $('.select-alert').removeClass('errored');
|
||||
// }, 3500);
|
||||
// return;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// $.ajax({
|
||||
// async: false,
|
||||
// dataType: 'json',
|
||||
// type: 'POST',
|
||||
// url: rejectUrl,
|
||||
// headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
// data: { documentItemId: Number(document_ItemId), message: messageData },
|
||||
// success: function (response) {
|
||||
|
||||
// if (response.success) {
|
||||
// showAlertMessage('.alert-success-msg', 'تصویر موجود رد شد.', 3500);
|
||||
// $(".mg-btn.active").removeClass('submittedbyadmin').addClass("reject");
|
||||
// $(".mg-btn.active").closest('.signHolder').removeClass("pending").addClass("rejected");
|
||||
|
||||
// $(".mg-btn.active").siblings("span.sign").html(svgReject);
|
||||
// } else {
|
||||
// showAlertMessage('.alert-msg', 'مشکلی پیش آمد.', 3500);
|
||||
// }
|
||||
|
||||
// $("#message").val("");
|
||||
|
||||
// },
|
||||
// error: function (err) {
|
||||
// console.log(err);
|
||||
// showAlertMessage('.alert-msg', 'مشکلی پیش آمد.', 3500);
|
||||
|
||||
// }
|
||||
|
||||
// });
|
||||
//}
|
||||
//function confirmAjax() {
|
||||
// var documentItemId2 = $('.carousel-item.active').data('document-id');
|
||||
// $.ajax({
|
||||
// async: false,
|
||||
// dataType: 'json',
|
||||
// type: 'POST',
|
||||
// url: confirmUrl,
|
||||
// headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
// data: { documentItemId: Number(documentItemId2)},
|
||||
// success: function (response) {
|
||||
|
||||
// if (response.success) {
|
||||
// showAlertMessage('.alert-success-msg', 'تصویر موجود تایید شد.', 3500);
|
||||
// $(".mg-btn.active").removeClass('submittedbyadmin').addClass("confirmed");
|
||||
// $(".mg-btn.active").closest('.signHolder').removeClass("pending").addClass("confirmed");
|
||||
|
||||
// $(".mg-btn.active").siblings("span.sign").html(svgConfirmed);
|
||||
// } else {
|
||||
// showAlertMessage('.alert-msg', 'مشکلی پیش آمد.', 3500);
|
||||
// }
|
||||
|
||||
|
||||
// },
|
||||
// error: function (err) {
|
||||
// console.log(err);
|
||||
// showAlertMessage('.alert-msg', 'مشکلی پیش آمد.', 3500);
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
//}
|
||||
|
||||
|
||||
function submitOP() {
|
||||
$.ajax({
|
||||
async: false,
|
||||
type: 'POST',
|
||||
url: submitAll,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
data: { operations, employeeId: employeeId, workshopId: workshopId },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
showAlertMessage('.alert-success-msg', response.message, 3500);
|
||||
_RefreshCheckerCountMenu();
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
pageIndexJs = 0;
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
$('#MainModal').modal('hide');
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
showAlertMessage('.alert-msg', err.message, 3500);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function showAlertMessage(selector, message, timeout) {
|
||||
$(selector).show();
|
||||
$(selector + ' p').text(message);
|
||||
setTimeout(function () {
|
||||
$(selector).hide();
|
||||
$(selector + ' p').text('');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function checkSubmit() {
|
||||
if (operations.length > 0) {
|
||||
$("#submitOP").removeClass("disable");
|
||||
} else {
|
||||
$("#submitOP").addClass("disable");
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,289 @@
|
||||
var pageIndexJs = 0;
|
||||
var mode = false;
|
||||
var searchName = '';
|
||||
|
||||
var svgPending =
|
||||
`<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 19.25C15.5563 19.25 19.25 15.5563 19.25 11C19.25 6.44365 15.5563 2.75 11 2.75C6.44365 2.75 2.75 6.44365 2.75 11C2.75 15.5563 6.44365 19.25 11 19.25Z" fill="#FDBA74" />
|
||||
<path d="M11.4166 14.6667C11.4166 14.8968 11.2301 15.0833 10.9999 15.0833C10.7698 15.0833 10.5833 14.8968 10.5833 14.6667C10.5833 14.4365 10.7698 14.25 10.9999 14.25C11.2301 14.25 11.4166 14.4365 11.4166 14.6667Z" fill="white" stroke="white" />
|
||||
<path d="M11 11.916V6.41602V11.916Z" fill="white" />
|
||||
<path d="M11 11.916V6.41602" stroke="white" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>`;
|
||||
|
||||
var svgReject =
|
||||
`<svg width="22" height="22" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="9" cy="9" r="6.75" fill="#F87171"></circle><path d="M12 6L6 12" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path>\r\n <path d="M6 6L12 12" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path>\r\n </svg>`;
|
||||
var svgConfirmed =
|
||||
`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="12" cy="12" r="8" fill="#A3E635" />
|
||||
<path d="M9.5 12L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L15.5 10" stroke="white" stroke-width="1.2" stroke-linecap="round" />
|
||||
</svg>`;
|
||||
var borderSubmitted = "#FFD700"; // Example color for submitted
|
||||
var borderRejected = "#FF4500"; // Example color for rejected
|
||||
var borderConfirmed = "#32CD32"; // Example color for confirmed
|
||||
|
||||
$(document).ready(function () {
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
|
||||
$(document).on('click', '.btnTabPD', function () {
|
||||
//mode = $(this).data('mode');
|
||||
$('.btnTabPD').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.employeeName').val('');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
$('img').each(function () {
|
||||
if ($(this).attr('src') === "/AdminNew/Company/EmployeesDocumentsManagement/EmployeesList?handler=ShowPicture&filePath=") {
|
||||
$(this).attr('src', '/assetsclient/images/pd-image.png');
|
||||
}
|
||||
});
|
||||
|
||||
// Define your SVGs
|
||||
//var svgSubmitted = `<svg ... ><!-- Your SVG for submitted --></svg>`;
|
||||
//var svgRejected = `<svg ... ><!-- Your SVG for rejected --></svg>`;
|
||||
//var svgConfirmed = `<svg ... ><!-- Your SVG for confirmed --></svg>`;
|
||||
|
||||
// Loop through each span with the class 'checkSvg'
|
||||
$(".checkSvg").each(function () {
|
||||
var status = $(this).data("status");
|
||||
var parent = $(this).closest(".imageHolder");
|
||||
|
||||
if (status === "submittedbyadmin") {
|
||||
$(this).html(svgPending);
|
||||
parent.css("border", `1px solid ${borderSubmitted}`);
|
||||
} else if (status === "rejected") {
|
||||
$(this).html(svgReject);
|
||||
parent.css("border", `1px solid ${borderRejected}`);
|
||||
} else if (status === "confirmed") {
|
||||
$(this).html(svgConfirmed);
|
||||
parent.css("border", `1px solid ${borderConfirmed}`);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#taeed').on('click', function () {
|
||||
mode = true;
|
||||
console.log('Mode is set to:', mode);
|
||||
});
|
||||
|
||||
// Event listner for the 'all' button
|
||||
$('#all').on('click', function () {
|
||||
mode = false;
|
||||
console.log('Mode is set to:', mode);
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
let clickedButton = $(event.target).closest(".btn-pd-more");
|
||||
if (clickedButton.length === 0) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(document).on('click', '.btn-uploadingPD, .btn-uploadingPD-mobile', function () {
|
||||
var id = $(this).attr('id').split('_')[1];
|
||||
openPersonnelDocsUploadModal(id);
|
||||
});
|
||||
|
||||
$(document).on('click', '.btn-search-click, .btn-search-click-mobile', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').removeClass('disable');
|
||||
searchName = $('.employeeName').val().trim();
|
||||
if (searchName == "") {
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
}
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
});
|
||||
$(document).on('click', '.btn-clear-filter', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
$('.employeeName').val('');
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
|
||||
// When typing in the desktop search
|
||||
$('.d-none.d-md-block .employeeName').on('input', function () {
|
||||
var desktopInput = $(this).val();
|
||||
$('#searchModal .employeeName').val(desktopInput);
|
||||
});
|
||||
|
||||
// When typing in the mobile search
|
||||
$('#searchModal .employeeName').on('input', function () {
|
||||
var mobileInput = $(this).val();
|
||||
$('.d-none.d-md-block .employeeName').val(mobileInput);
|
||||
});
|
||||
|
||||
$('.goToTop').on('click',function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
//$(window).scroll(function () {
|
||||
// if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
// loadPersonnelDocuments(mode, searchName);
|
||||
// }
|
||||
|
||||
// if ($(this).scrollTop() > 100) {
|
||||
// $('.goToTop').show().fadeIn();
|
||||
// } else {
|
||||
// $('.goToTop').fadeOut().hide();
|
||||
// }
|
||||
//});
|
||||
|
||||
|
||||
function loadPersonnelDocuments(mode, searchName) {
|
||||
var html = '';
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: employeeDocumentsAjaxLoadData,
|
||||
data: { workshopId: workshopId, confirmedOnly:mode, employeeName: searchName ,'pageIndex': pageIndexJs },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var personnelDocumentsData = response.data;
|
||||
|
||||
if (response.isSuccedded) {
|
||||
personnelDocumentsData.forEach(function (item) {
|
||||
//foreach (var item in @Model.Employees.PersonnelInfoViewModels)
|
||||
var n = pageIndexJs + 1;
|
||||
|
||||
pageIndexJs++;
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center openAction ${item.isBlack === "true" ? `withdraw` : ``}" id="Employees">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center table-number">
|
||||
${n}
|
||||
<div class="d-none idPersonnel">test</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width2">
|
||||
${item.employerFullName}
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width3">
|
||||
${item.workshopName}
|
||||
</div>
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="text-start">${item.employeeFullName}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width5 text-center">
|
||||
${item.submittedItemsCount}
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width6 text-center">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell d-md-block d-none width7 text-center">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width8 text-end">
|
||||
<div class="Rtable-cell--content d-flex justify-content-end">
|
||||
<button type="button" class="btn-pd-more" onclick="openPersonnelDocsUploadModal(Number(${
|
||||
item.employeeId}))">
|
||||
<span class="mx-1 align-items-center d-flex justify-content-start">
|
||||
عملیات بیشتر
|
||||
<span class="d-none d-sm-block">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"></circle>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"></circle>
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"></circle>
|
||||
</svg>
|
||||
</span>
|
||||
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operation-div w-100" style="margin: 0 0 0 0;">
|
||||
<div class="operations-btns">
|
||||
<div class="container-fluid px-0">
|
||||
<div class="row images px-1 ">
|
||||
<div class="row justify-content-between gap-2 m-auto px-0 align-items-center col-12 images">
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.employeePicture.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" alt="عکس پرسنل"/>
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.nationalCardFront.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.nationalCardFront.picturePath ? item.nationalCardFront.picturePath : "")}" alt="عکس کارت ملی رو" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.nationalCardRear.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.nationalCardRear.picturePath ? item.nationalCardRear.picturePath : "")}" alt="عکس کارت ملی پشت" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString} ${item.gender=="زن"? 'd-none' :''}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.militaryServiceCard.statusString}"></span>
|
||||
<img class="operation-image " style="display:${item.gender == "زن" ? "none" : ""};" src="${showPictureUrl + `&filePath=` + (item.militaryServiceCard.picturePath ? item.militaryServiceCard.picturePath : "")}" alt="عکس کارت پایان خدمت" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.idCardPage1.statusString}"></span>
|
||||
<img class="operation-image" src="${showPictureUrl + `&filePath=` + (item.idCardPage1.picturePath ? item.idCardPage1.picturePath : "")}" alt="عکس شناسنامه صفحه1" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.idCardPage2.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.idCardPage2.picturePath ? item.idCardPage2.picturePath : "")}" alt="عکس شناسنامه صفحه2" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.idCardPage3.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.idCardPage3.picturePath ? item.idCardPage3.picturePath : "")}" alt="عکس شناسنامه صفحه3" />
|
||||
</div>
|
||||
<div class="col imageHolder position-relative ${item.employeePicture.statusString}">
|
||||
<span class="position-absolute checkSvg" data-status="${item.idCardPage4.statusString}"></span>
|
||||
<img class="operation-image " src="${showPictureUrl + `&filePath=` + (item.idCardPage4.picturePath ? item.idCardPage4.picturePath : "")}" alt="عکس شناسنامه صفحه4" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
pageIndexJs += response.pageIndex;
|
||||
$('#personnelDocumentsAjax').append(html);
|
||||
} else {
|
||||
html += `<div class="text-center bg-white d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#personnelDocumentsAjax').append(html);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function openPersonnelDocsUploadModal(id) {
|
||||
var goTo = `#showmodal=/AdminNew/Company/EmployeesDocumentsManagement/EmployeesList?workshopId=${workshopId}&employeeId=${id}&handler=DetailsPersonnelModal`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
function updateIndexesRows() {
|
||||
let index = 1;
|
||||
|
||||
$(`.Rtable-cell--content .table-number`).each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,474 @@
|
||||
var pageIndexJs = 0;
|
||||
var mode = 'all';
|
||||
var searchName = '';
|
||||
|
||||
$(document).ready(function () {
|
||||
loadWorkshopList();
|
||||
/*loadPersonnelDocuments(mode, searchName);*/
|
||||
|
||||
$(document).on('click', '.btnTabPD', function () {
|
||||
mode = $(this).data('mode');
|
||||
$('.btnTabPD').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.employeeName').val('');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 767px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
//$(document).on('click', '.btn-uploadingPD ,#openModal, .btn-uploadingPD-mobile', function () {
|
||||
// var id = $(this).attr('id').split('_')[1];
|
||||
// openPersonnelDocsUploadModal(id);
|
||||
//});
|
||||
|
||||
$(document).on('click', '.btn-search-click, .btn-search-click-mobile', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').removeClass('disable');
|
||||
searchName = $('.employeeName').val().trim();
|
||||
if (searchName == "") {
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
}
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
});
|
||||
$(document).on('click', '.btn-clear-filter', function () {
|
||||
pageIndexJs = 0;
|
||||
$('#personnelDocumentsAjax').html('');
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
$('.employeeName').val('');
|
||||
$('#searchModal').modal('hide');
|
||||
loadPersonnelDocuments(mode, searchName = '');
|
||||
});
|
||||
|
||||
|
||||
// When typing in the desktop search
|
||||
$('.d-none.d-md-block .employeeName').on('input', function () {
|
||||
var desktopInput = $(this).val();
|
||||
$('#searchModal .employeeName').val(desktopInput);
|
||||
});
|
||||
|
||||
// When typing in the mobile search
|
||||
$('#searchModal .employeeName').on('input', function () {
|
||||
var mobileInput = $(this).val();
|
||||
$('.d-none.d-md-block .employeeName').val(mobileInput);
|
||||
});
|
||||
|
||||
$('.goToTop').on('click',function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
loadPersonnelDocuments(mode, searchName);
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
//function loadPersonnelDocuments(mode, searchName) {
|
||||
|
||||
// var b = pageIndexJs % 30;
|
||||
// var html = '';
|
||||
// var index = 1;
|
||||
|
||||
// if (b === 0) {
|
||||
// $.ajax({
|
||||
// async: false,
|
||||
// contentType: 'charset=utf-8',
|
||||
// dataType: 'json',
|
||||
// type: 'GET',
|
||||
// url: employeeDocumentsAjaxLoadData,
|
||||
// data: { workshopId: workshopId, searchMode: mode, employeeName: searchName ,'pageIndex': pageIndexJs },
|
||||
// headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
// success: function (response) {
|
||||
// console.log(response);
|
||||
// var personnelDocumentsData = response.data;
|
||||
// if (response.isSuccedded) {
|
||||
// personnelDocumentsData.forEach(function (item) {
|
||||
// //foreach (var item in @Model.Employees.PersonnelInfoViewModels)
|
||||
// var n = pageIndexJs + 1;
|
||||
// html += `<div></div>
|
||||
// <div class="Rtable-row align-items-center openAction ${item.isBlack === "true"
|
||||
// ? `withdraw`
|
||||
// : ``}" id="Employees">
|
||||
// <div class="Rtable-cell width1">
|
||||
// <div class="Rtable-cell--content">
|
||||
// <span class="d-flex justify-content-center">
|
||||
// ${n}
|
||||
// <div class="d-none idPersonnel">${item.employeeId}</div>
|
||||
// </span>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="Rtable-cell width2">
|
||||
// <div class="Rtable-cell--content d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg d-md-none d-block">`;
|
||||
// var employeePicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.employeePicturePath}`;
|
||||
// if (item.employeePicturePath) {
|
||||
// html += `<img src="${employeePicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="text-start">${item.employeeFullName}</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="Rtable-cell d-md-block d-none width3">
|
||||
// <div class="Rtable-cell--content d-flex align-items-center justify-content-center">
|
||||
// <div class="documentFileBox">`;
|
||||
// if (item.employeePicturePath) {
|
||||
// html += `<img src="${employeePicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="Rtable-cell d-md-block d-none width4">
|
||||
// <div class="Rtable-cell--content d-flex align-items-center justify-content-center">`;
|
||||
// var nationalCardFrontPicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.nationalCardFrontPicturePath}`;
|
||||
// var nationalCardRearPicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.nationalCardRearPicturePath}`;
|
||||
// if (item.nationalCardFrontPicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${nationalCardFrontPicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
|
||||
// if (item.nationalCardRearPicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${nationalCardRearPicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// </div>
|
||||
// <div class="Rtable-cell d-md-block d-none width5">
|
||||
// <div class="Rtable-cell--content d-flex align-items-center justify-content-center">
|
||||
// <div class="documentFileBox">`;
|
||||
// var militaryServiceCardPicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.militaryServiceCardPicturePath}`;
|
||||
// if (item.militaryServiceCardPicturePath) {
|
||||
// html += `<img src="${militaryServiceCardPicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="Rtable-cell d-md-block d-none width6">
|
||||
// <div class="Rtable-cell--content d-flex align-items-center justify-content-center">`;
|
||||
// var idCardPage1PicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.idCardPage1PicturePath}`;
|
||||
// var idCardPage2PicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.idCardPage2PicturePath}`;
|
||||
// var idCardPage3PicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.idCardPage3PicturePath}`;
|
||||
// var idCardPage4PicturePath = `/AdminNew/Company/EmployeesDocuments/EmployeeList?handler=ShowPicture&filePath=${item.idCardPage4PicturePath}`;
|
||||
// if (item.idCardPage1PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage1PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// if (item.idCardPage2PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage2PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// if (item.idCardPage3PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage3PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// if (item.idCardPage4PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage4PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
|
||||
// html += `</div>
|
||||
// </div>
|
||||
|
||||
// <div class="Rtable-cell d-md-block d-none width7">
|
||||
// <div class="Rtable-cell--content text-end">
|
||||
// <button id="editPD_${item.employeeId
|
||||
// }_desktop" class="btn-uploadingPD position-relative">
|
||||
// <span class="mx-1">بارگزاری مدارک</span>
|
||||
// </button>
|
||||
// </div>
|
||||
// </div>
|
||||
|
||||
// <div class="Rtable-cell d-md-none d-block width7">
|
||||
// <div class="Rtable-cell--content d-flex justify-content-end">
|
||||
// <button type="button" class="btn-pd-more d-md-none d-block position-relative">
|
||||
// <span> </span>
|
||||
// <span> </span>
|
||||
// <span> </span>
|
||||
// <span> </span>
|
||||
// <span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
// <p class="my-0 mx-1">عملیات بیشتر</p>
|
||||
// <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
// <circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"></circle>
|
||||
// <circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"></circle>
|
||||
// <circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"></circle>
|
||||
// </svg>
|
||||
// </span>
|
||||
// </button>
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
|
||||
// <div class="operation-div w-100" style="margin: 0 0 0 0;">
|
||||
// <div class="operations-btns">
|
||||
// <div class="container-fluid px-0">
|
||||
// <div class="row g-2">
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.employeePicturePath) {
|
||||
// html += `<img src="${employeePicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">عکس پرسنلی</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.nationalCardFrontPicturePath) {
|
||||
// html += `<img src="${nationalCardFrontPicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">کارت ملی رو</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.nationalCardRearPicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${nationalCardRearPicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">کارت ملی پشت</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.militaryServiceCardPicturePath) {
|
||||
// html += `<img src="${militaryServiceCardPicturePath}" class="preview-image">`;
|
||||
// } else {
|
||||
// html += `<img src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">کارت پایان خدمت</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.idCardPage1PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage1PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">شناسنامه صفحه اول</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.idCardPage2PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage2PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">شناسنامه صفحه دوم</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.idCardPage3PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage3PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">شناسنامه صفحه سوم</div>
|
||||
// </div>
|
||||
// </div>
|
||||
// <div class="col-6 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-start">
|
||||
// <div class="documentFileBoxImg">`;
|
||||
// if (item.idCardPage4PicturePath) {
|
||||
// html += `<div class="documentFileBox"><img src="${idCardPage4PicturePath}" class="preview-image"></div>`;
|
||||
// } else {
|
||||
// html += `<div class="documentFileBox"><img src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
// }
|
||||
// html += `</div>
|
||||
// <div class="txtMonilePD">شناسنامه صفحه چهارم</div>
|
||||
// </div>
|
||||
// </div>
|
||||
|
||||
|
||||
// <div class="col-12 text-center">
|
||||
// <div class="d-flex align-items-center justify-content-center">
|
||||
// <button id="editPD_${item.employeeId}_mobile" class="btn-uploadingPD-mobile position-relative">
|
||||
// <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22" fill="none" stroke="currentColor">
|
||||
// <path d="M12.0433 6.49955L12.0214 6.52145L5.53808 13.0047C5.52706 13.0158 5.51612 13.0267 5.50525 13.0375C5.34278 13.1996 5.19895 13.3432 5.09758 13.5222L5.5266 13.7651L5.09758 13.5222C4.99622 13.7012 4.94714 13.8984 4.89171 14.1211C4.88801 14.136 4.88427 14.151 4.88049 14.1662L4.30029 16.4869L4.78351 16.6077L4.30029 16.4869C4.29808 16.4958 4.29585 16.5047 4.29361 16.5136C4.25437 16.6703 4.21246 16.8377 4.19871 16.9782C4.18357 17.1329 4.1871 17.394 4.39651 17.6034C4.60592 17.8128 4.86698 17.8163 5.02171 17.8012C5.16225 17.7875 5.32958 17.7456 5.48627 17.7063C5.49521 17.7041 5.50411 17.7018 5.51297 17.6996L7.83376 17.1194C7.84888 17.1156 7.86388 17.1119 7.87878 17.1082C8.10151 17.0528 8.29868 17.0037 8.47772 16.9023C8.65675 16.801 8.80027 16.6571 8.9624 16.4947C8.97324 16.4838 8.98416 16.4729 8.99519 16.4618L15.4785 9.97855L15.5004 9.95666C15.796 9.6611 16.0507 9.40638 16.2296 9.17534C16.4208 8.9284 16.5695 8.65435 16.5843 8.31531C16.5862 8.27179 16.5862 8.22821 16.5843 8.18469C16.5695 7.84565 16.4208 7.5716 16.2296 7.32466C16.0507 7.09362 15.796 6.8389 15.5004 6.54334L15.4785 6.52145L15.4566 6.49954C15.161 6.20396 14.9063 5.94922 14.6753 5.77034C14.4283 5.57917 14.1543 5.43041 13.8152 5.41564C13.7717 5.41374 13.7281 5.41374 13.6846 5.41564C13.3456 5.43041 13.0715 5.57917 12.8246 5.77034C12.5935 5.94922 12.3388 6.20396 12.0433 6.49955Z" />
|
||||
// <path d="M11.4583 6.87484L14.2083 5.0415L16.9583 7.7915L15.1249 10.5415L11.4583 6.87484Z" />
|
||||
// </svg>
|
||||
// <span class="mx-1">ویرایش</span>
|
||||
// </button>
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>
|
||||
// </div>`;
|
||||
|
||||
// pageIndexJs++;
|
||||
|
||||
// });
|
||||
|
||||
// pageIndexJs = response.pageIndex;
|
||||
// $('#personnelDocumentsAjax').append(html);
|
||||
// } else {
|
||||
// html += `<div class="text-center bg-white d-flex align-items-center justify-content-center">
|
||||
// <div class="">
|
||||
// <img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
// <h5>اطلاعاتی وجود ندارد.</h5>
|
||||
// </div>
|
||||
// </div>`;
|
||||
// $('#personnelDocumentsAjax').append(html);
|
||||
// }
|
||||
|
||||
|
||||
// },
|
||||
// failure: function (response) {
|
||||
// console.log(response);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
|
||||
function loadWorkshopList() {
|
||||
|
||||
let html2 = '';
|
||||
let n = 1;
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: workshopDocumentAjaxURL,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
|
||||
var { result } = response;
|
||||
if (response.isSuccedded) {
|
||||
result.forEach(function (item) {
|
||||
|
||||
html2 = `
|
||||
<div class="Rtable-row align-items-center position-relative openAction ">
|
||||
<div class="Rtable-cell d-md-block d-flex width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center">
|
||||
${n}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--content">${item.workshopFullName}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content">${item.employerName}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell d-md-block d-none width4">
|
||||
<div class="Rtable-cell--content text-center">${item.submittedItemsCount}</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width7 text-end">
|
||||
<div class="Rtable-cell--content align-items-center d-flex justify-content-end">
|
||||
<a type="button" class="btn-ticket-detail position-relative d-md-block d-none" href="/AdminNew/Company/EmployeesDocumentsManagement/EmployeesList?workshopId=${item.workshopId}">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.58325 4.58333C4.58325 3.57081 5.40406 2.75 6.41659 2.75H10.7708C10.8973 2.75 10.9999 2.8526 10.9999 2.97917V7.33333C10.9999 8.34586 11.8207 9.16667 12.8333 9.16667H17.1874C17.314 9.16667 17.4166 9.26924 17.4166 9.39583V17.4167C17.4166 18.4292 16.5958 19.25 15.5833 19.25H6.41659C5.40406 19.25 4.58325 18.4292 4.58325 17.4167V4.58333Z" fill="#58E85B"></path>
|
||||
<path d="M12.4167 7.33392V3.95768L16.2096 7.75058H12.8334C12.6033 7.75058 12.4167 7.56404 12.4167 7.33392Z" fill="#248826" stroke="#248826"></path>
|
||||
<path d="M7.79175 12.375H13.2917H7.79175Z" fill="#248826"></path>
|
||||
<path d="M7.79175 12.375H13.2917" stroke="#248826" stroke-linecap="round"></path>
|
||||
<path d="M7.79175 15.125H12.3751H7.79175Z" fill="#248826"></path>
|
||||
<path d="M7.79175 15.125H12.3751" stroke="#248826" stroke-linecap="round"></path>
|
||||
</svg>
|
||||
<span class="mx-1 d-md-none d-flex">جزئیات</span>
|
||||
</a>
|
||||
|
||||
<button type="button" class="btn-ticket-more d-md-none d-block position-relative">
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span> </span>
|
||||
<span class="mx-1 align-items-center d-flex justify-content-center">
|
||||
<a type="button" href="/AdminNew/Company/EmployeesDocumentsManagement/EmployeesList?workshopId=${item.workshopId}"></a>
|
||||
<p class="my-0 mx-1">عملیات</p>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" fill="currentColor">
|
||||
<circle cx="8.4001" cy="8.39922" r="1.2" transform="rotate(90 8.4001 8.39922)"></circle>
|
||||
<circle cx="8.4001" cy="4.39922" r="1.2" transform="rotate(90 8.4001 4.39922)"></circle>
|
||||
<circle cx="8.4001" cy="12.3992" r="1.2" transform="rotate(90 8.4001 12.3992)"></circle>
|
||||
</svg>
|
||||
|
||||
|
||||
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
$('#workshopsDocumentsAjax').append(html2);
|
||||
n++;
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
html2 += `<div class="text-center bg-white d-flex align-items-center justify-content-center">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
$('#workshopsDocumentsAjax').append(html2);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showDetailsPersonnelModal() {
|
||||
AjaxUrlContentModal(DetailsPersonnelModalURL);
|
||||
}
|
||||
@@ -0,0 +1,635 @@
|
||||
#navbar-animmenu {
|
||||
width: 20%;
|
||||
padding: 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
background: #CAF5F5;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a i {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li span {
|
||||
background-color: #dd2a2a;
|
||||
width: 26px;
|
||||
display: flex;
|
||||
height: 26px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 24px;
|
||||
margin: 0 0 0 12px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#navbar-animmenu li {
|
||||
list-style-type: none;
|
||||
z-index: 4;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
line-height: 60px;
|
||||
display: block;
|
||||
padding: 0px 30px 0 20px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu > ul > li.active > a {
|
||||
color: #000000;
|
||||
background-color: transparent;
|
||||
transition: all 0.7s;
|
||||
}
|
||||
|
||||
.countNumber {
|
||||
margin: 0 0 0 12px;
|
||||
font-size: 12px;
|
||||
background-color: #dd2a2a;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
|
||||
/* Vertical selector styling */
|
||||
.verti-selector {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 97%;
|
||||
left: 0px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
background-color: #fff;
|
||||
border-radius: 0 50px 50px 0;
|
||||
/* border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;*/
|
||||
height: 45px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.verti-selector .top,
|
||||
.verti-selector .bottom {
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.verti-selector .top {
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .bottom {
|
||||
top: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .top:before,
|
||||
.verti-selector .bottom:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #CAF5F5;
|
||||
}
|
||||
|
||||
.verti-selector .top.last-role::before {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.verti-selector .top:before {
|
||||
top: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
.verti-selector .bottom:before {
|
||||
bottom: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 80%;
|
||||
background-color: #ffffff;
|
||||
height: 700px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.createRoleBox {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
z-index: 6;
|
||||
display: block !important;
|
||||
position: relative;
|
||||
padding: 11px 6px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to left, #B1B1B1, #FFFFFF);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX';
|
||||
}
|
||||
|
||||
.btn-create {
|
||||
background: #84CC16;
|
||||
border-radius: 7px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.btn-create:hover {
|
||||
background: #71b112;
|
||||
}
|
||||
|
||||
#hideCircle {
|
||||
transition: border-radius 0.5s ease;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.isActiveTxt {
|
||||
background-color: #ECFCCB;
|
||||
border: 1px solid #B3EB52;
|
||||
border-radius: 50px;
|
||||
padding: 3px 9px;
|
||||
color: #0B5959;
|
||||
font-size: 11px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-edit-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-edit-role:hover {
|
||||
color: #ffffff;
|
||||
/* background-color: #009EE2; */
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-delete-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-delete-role:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: #B4DBFD;
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
background-color: #a2c8e9
|
||||
}
|
||||
|
||||
.btn-info svg {
|
||||
color: #3B82F6;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row.SubAccountRowMobile {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
outline: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.roleTitle {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.roleName {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
/********************************** Sub Account Table **********************************/
|
||||
.rightHeaderMenu {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.leftHeaderMenu {
|
||||
width: 80%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.subAccountHeaderList {
|
||||
}
|
||||
|
||||
|
||||
.roleSubaccountListMobile .width1 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width2 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width5 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width7 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.bgSubRow {
|
||||
outline: transparent !important;
|
||||
background-color: #CEF4F4 !important;
|
||||
}
|
||||
/********************************** Sub Account Table **********************************/
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* Hide default HTML checkbox */
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* The slider */
|
||||
.sliderEUP {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Rounded slider */
|
||||
.sliderEUP:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Checked state */
|
||||
input:checked + .sliderEUP {
|
||||
background-color: #2FBFBF;
|
||||
}
|
||||
|
||||
/* Move the slider to the right when checked */
|
||||
input:checked + .sliderEUP:before {
|
||||
transform: translateX(16px);
|
||||
}
|
||||
|
||||
/* Disable state */
|
||||
.disable + .sliderEUP {
|
||||
background-color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.disable + .sliderEUP:before {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.btn-workflow-absent {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-rollcall-edit {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: #ffffff;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-leave {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #d97706;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(217, 119, 6, 0.18);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-accept {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #65a30d;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(101, 163, 13, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.operations-btns-main {
|
||||
padding: 15px;
|
||||
width: 97%;
|
||||
margin: 0 auto 10px;
|
||||
display: none;
|
||||
border-radius: 0px 0px 8px 8px;
|
||||
background: #F1F5F9;
|
||||
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.03) inset;
|
||||
}
|
||||
|
||||
.number-of-count {
|
||||
background-color: #caf5f5;
|
||||
margin: 0 10px 0 0;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
color: #368686;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.toggle svg {
|
||||
stroke: #ffffff;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.toggle.open svg {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
#navbar-animmenu ul li a {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
height: 440px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
height: 440px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: 1.8px solid #ddd !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn-workflow-accept,
|
||||
.btn-workflow-leave,
|
||||
.btn-workflow-absent,
|
||||
.btn-workflow-rollcall-edit {
|
||||
width: 100%;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.employee-name {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* responsive Mobile */
|
||||
#navbar-animmenu {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
display: flex;
|
||||
height: auto;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.verti-selector {
|
||||
display: none
|
||||
}
|
||||
|
||||
#navbar-animmenu li.active {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
width: 50px;
|
||||
height: 35px;
|
||||
border-radius: 8px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
display: none
|
||||
}
|
||||
@@ -0,0 +1,634 @@
|
||||
#navbar-animmenu {
|
||||
width: 20%;
|
||||
padding: 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
background: #CAF5F5;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a i {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li span {
|
||||
background-color: #dd2a2a;
|
||||
width: 26px;
|
||||
display: flex;
|
||||
height: 26px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 24px;
|
||||
margin: 0 0 0 12px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#navbar-animmenu li {
|
||||
list-style-type: none;
|
||||
z-index: 4;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
line-height: 60px;
|
||||
display: block;
|
||||
padding: 0px 30px 0 20px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu > ul > li.active > a {
|
||||
color: #000000;
|
||||
background-color: transparent;
|
||||
transition: all 0.7s;
|
||||
}
|
||||
|
||||
.countNumber {
|
||||
margin: 0 0 0 12px;
|
||||
font-size: 12px;
|
||||
background-color: #dd2a2a;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
|
||||
/* Vertical selector styling */
|
||||
.verti-selector {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 97%;
|
||||
left: 0px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
background-color: #fff;
|
||||
border-radius: 0 50px 50px 0;
|
||||
/* border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;*/
|
||||
height: 45px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.verti-selector .top,
|
||||
.verti-selector .bottom {
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.verti-selector .top {
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .bottom {
|
||||
top: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .top:before,
|
||||
.verti-selector .bottom:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #CAF5F5;
|
||||
}
|
||||
|
||||
.verti-selector .top.last-role::before {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.verti-selector .top:before {
|
||||
top: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
.verti-selector .bottom:before {
|
||||
bottom: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 80%;
|
||||
background-color: #ffffff;
|
||||
height: 700px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.createRoleBox {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
z-index: 6;
|
||||
display: block !important;
|
||||
position: relative;
|
||||
padding: 11px 6px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to left, #B1B1B1, #FFFFFF);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX';
|
||||
}
|
||||
|
||||
.btn-create {
|
||||
background: #84CC16;
|
||||
border-radius: 7px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.btn-create:hover {
|
||||
background: #71b112;
|
||||
}
|
||||
|
||||
#hideCircle {
|
||||
transition: border-radius 0.5s ease;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.isActiveTxt {
|
||||
background-color: #ECFCCB;
|
||||
border: 1px solid #B3EB52;
|
||||
border-radius: 50px;
|
||||
padding: 3px 9px;
|
||||
color: #0B5959;
|
||||
font-size: 11px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-edit-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-edit-role:hover {
|
||||
color: #ffffff;
|
||||
/* background-color: #009EE2; */
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-delete-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-delete-role:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: #B4DBFD;
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
background-color: #a2c8e9
|
||||
}
|
||||
|
||||
.btn-info svg {
|
||||
color: #3B82F6;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row.SubAccountRowMobile {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
outline: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.roleTitle {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.roleName {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
/********************************** Sub Account Table **********************************/
|
||||
.rightHeaderMenu {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.leftHeaderMenu {
|
||||
width: 80%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.subAccountHeaderList {
|
||||
}
|
||||
|
||||
|
||||
.roleSubaccountListMobile .width1 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width2 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width5 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width7 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.bgSubRow {
|
||||
outline: transparent !important;
|
||||
background-color: #CEF4F4 !important;
|
||||
}
|
||||
/********************************** Sub Account Table **********************************/
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* Hide default HTML checkbox */
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* The slider */
|
||||
.sliderEUP {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Rounded slider */
|
||||
.sliderEUP:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Checked state */
|
||||
input:checked + .sliderEUP {
|
||||
background-color: #2FBFBF;
|
||||
}
|
||||
|
||||
/* Move the slider to the right when checked */
|
||||
input:checked + .sliderEUP:before {
|
||||
transform: translateX(16px);
|
||||
}
|
||||
|
||||
/* Disable state */
|
||||
.disable + .sliderEUP {
|
||||
background-color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.disable + .sliderEUP:before {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.btn-workflow-absent {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-rollcall-edit {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: #ffffff;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-leave {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #d97706;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(217, 119, 6, 0.18);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-accept {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #65a30d;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(101, 163, 13, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.operations-btns-main {
|
||||
padding: 15px;
|
||||
width: 97%;
|
||||
margin: 0 auto 10px;
|
||||
display: none;
|
||||
border-radius: 0px 0px 8px 8px;
|
||||
background: #F1F5F9;
|
||||
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.03) inset;
|
||||
}
|
||||
|
||||
.number-of-count {
|
||||
background-color: #caf5f5;
|
||||
margin: 0 10px 0 0;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
color: #368686;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.toggle svg {
|
||||
stroke: #ffffff;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.toggle.open svg {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
#navbar-animmenu ul li a {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
height: 440px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
height: 440px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: 1.8px solid #ddd !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn-workflow-accept,
|
||||
.btn-workflow-leave,
|
||||
.btn-workflow-absent,
|
||||
.btn-workflow-rollcall-edit {
|
||||
width: 100%;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.employee-name {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* responsive Mobile */
|
||||
#navbar-animmenu {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
display: flex;
|
||||
height: auto;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.verti-selector {
|
||||
display: none
|
||||
}
|
||||
|
||||
#navbar-animmenu li.active {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
width: 50px;
|
||||
height: 35px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
display: none
|
||||
}
|
||||
634
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/css/EmployeesNew.css
Normal file
634
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/css/EmployeesNew.css
Normal file
@@ -0,0 +1,634 @@
|
||||
#navbar-animmenu {
|
||||
width: 20%;
|
||||
padding: 0 0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
background: #CAF5F5;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 700px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a i {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li span {
|
||||
background-color: #dd2a2a;
|
||||
width: 26px;
|
||||
display: flex;
|
||||
height: 26px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 24px;
|
||||
margin: 0 0 0 12px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
#navbar-animmenu li {
|
||||
list-style-type: none;
|
||||
z-index: 4;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul li a {
|
||||
color: #484848;
|
||||
text-decoration: none;
|
||||
font-size: 15px;
|
||||
line-height: 60px;
|
||||
display: block;
|
||||
padding: 0px 30px 0 20px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#navbar-animmenu > ul > li.active > a {
|
||||
color: #000000;
|
||||
background-color: transparent;
|
||||
transition: all 0.7s;
|
||||
}
|
||||
|
||||
.countNumber {
|
||||
margin: 0 0 0 12px;
|
||||
font-size: 12px;
|
||||
background-color: #dd2a2a;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 40px;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
padding: 2px 0 0 0;
|
||||
}
|
||||
|
||||
/* Vertical selector styling */
|
||||
.verti-selector {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
width: 97%;
|
||||
left: 0px;
|
||||
transition-duration: 0.6s;
|
||||
transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
|
||||
background-color: #fff;
|
||||
border-radius: 0 50px 50px 0;
|
||||
/* border-top-right-radius: 15px;
|
||||
border-bottom-right-radius: 15px;*/
|
||||
height: 45px;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.verti-selector .top,
|
||||
.verti-selector .bottom {
|
||||
position: absolute;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.verti-selector .top {
|
||||
bottom: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .bottom {
|
||||
top: -25px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.verti-selector .top:before,
|
||||
.verti-selector .bottom:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #CAF5F5;
|
||||
}
|
||||
|
||||
.verti-selector .top.last-role::before {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.verti-selector .top:before {
|
||||
top: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
.verti-selector .bottom:before {
|
||||
bottom: 0;
|
||||
right: -25px;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 80%;
|
||||
background-color: #ffffff;
|
||||
height: 700px;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.createRoleBox {
|
||||
width: 100%;
|
||||
background-color: #ffffff;
|
||||
z-index: 6;
|
||||
display: block !important;
|
||||
position: relative;
|
||||
padding: 11px 6px;
|
||||
border-bottom: 2px solid transparent;
|
||||
border-image: linear-gradient(to left, #B1B1B1, #FFFFFF);
|
||||
border-image-slice: 1;
|
||||
}
|
||||
|
||||
.sweet-alert button {
|
||||
font-family: 'IRANYekanX';
|
||||
}
|
||||
|
||||
.btn-create {
|
||||
background: #84CC16;
|
||||
border-radius: 7px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.btn-create:hover {
|
||||
background: #71b112;
|
||||
}
|
||||
|
||||
#hideCircle {
|
||||
transition: border-radius 0.5s ease;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.isActiveTxt {
|
||||
background-color: #ECFCCB;
|
||||
border: 1px solid #B3EB52;
|
||||
border-radius: 50px;
|
||||
padding: 3px 9px;
|
||||
color: #0B5959;
|
||||
font-size: 11px;
|
||||
width: 70px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-edit-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-edit-role:hover {
|
||||
color: #ffffff;
|
||||
/* background-color: #009EE2; */
|
||||
background-color: rgba(52, 209, 209, 0.40);
|
||||
}
|
||||
|
||||
.btn-delete-role {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-delete-role:hover {
|
||||
background-color: rgba(209, 50, 50, 0.25);
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
border: 1px solid transparent;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
/* background-color: #ffffff; */
|
||||
background-color: #B4DBFD;
|
||||
box-shadow: 0;
|
||||
transition: ease .2s;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
background-color: #a2c8e9
|
||||
}
|
||||
|
||||
.btn-info svg {
|
||||
color: #3B82F6;
|
||||
}
|
||||
|
||||
.close-btn-search {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 4px;
|
||||
transform: translateY(-50%);
|
||||
color: #fff;
|
||||
background-color: #f87171;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row.SubAccountRowMobile {
|
||||
flex-wrap: nowrap;
|
||||
padding: 1px;
|
||||
outline: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.roleTitle {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.roleName {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
/********************************** Sub Account Table **********************************/
|
||||
.rightHeaderMenu {
|
||||
width: 20%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.leftHeaderMenu {
|
||||
width: 80%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.subAccountHeaderList {
|
||||
}
|
||||
|
||||
|
||||
.roleSubaccountListMobile .width1 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width2 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width3 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width5 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width6 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.roleSubaccountListMobile .width7 {
|
||||
width: 10% !important;
|
||||
}
|
||||
|
||||
.bgSubRow {
|
||||
outline: transparent !important;
|
||||
background-color: #CEF4F4 !important;
|
||||
}
|
||||
/********************************** Sub Account Table **********************************/
|
||||
|
||||
.switch {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/* Hide default HTML checkbox */
|
||||
.switch input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* The slider */
|
||||
.sliderEUP {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: #ccc;
|
||||
transition: 0.4s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
/* Rounded slider */
|
||||
.sliderEUP:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
left: 2px;
|
||||
bottom: 2px;
|
||||
background-color: white;
|
||||
transition: 0.4s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* Checked state */
|
||||
input:checked + .sliderEUP {
|
||||
background-color: #2FBFBF;
|
||||
}
|
||||
|
||||
/* Move the slider to the right when checked */
|
||||
input:checked + .sliderEUP:before {
|
||||
transform: translateX(16px);
|
||||
}
|
||||
|
||||
/* Disable state */
|
||||
.disable + .sliderEUP {
|
||||
background-color: #ccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.disable + .sliderEUP:before {
|
||||
background-color: #999;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.leftHeaderMenu .Rtable-cell.width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 7%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 13%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width3 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width5 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width6 {
|
||||
width: 20%
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width7 {
|
||||
width: 10%
|
||||
}
|
||||
|
||||
.btn-workflow-absent {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #FF5151;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(209, 50, 50, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-rollcall-edit {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #009EE2;
|
||||
margin: auto 0 auto 1px;
|
||||
background-color: #ffffff;
|
||||
background-color: rgba(52, 209, 209, 0.20);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-leave {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #d97706;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(217, 119, 6, 0.18);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.btn-workflow-accept {
|
||||
border: 1px solid transparent;
|
||||
height: 30px;
|
||||
border-radius: 5px;
|
||||
padding: 3px 1px;
|
||||
color: #65a30d;
|
||||
margin: auto 1px auto 0;
|
||||
background-color: #ffffff;
|
||||
background: rgba(101, 163, 13, 0.15);
|
||||
transition: ease .2s;
|
||||
width: 55px;
|
||||
}
|
||||
|
||||
.operations-btns-main {
|
||||
padding: 15px;
|
||||
width: 97%;
|
||||
margin: 0 auto 10px;
|
||||
display: none;
|
||||
border-radius: 0px 0px 8px 8px;
|
||||
background: #F1F5F9;
|
||||
box-shadow: 0px 4px 5px 0px rgba(0, 0, 0, 0.03) inset;
|
||||
}
|
||||
|
||||
.number-of-count {
|
||||
background-color: #caf5f5;
|
||||
margin: 0 10px 0 0;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
color: #368686;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.toggle {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.toggle svg {
|
||||
stroke: #ffffff;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.toggle.open svg {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
@media (max-width: 1366px) {
|
||||
#navbar-animmenu ul li a {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
height: 440px;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
height: 440px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.Rtable--collapse .Rtable-row {
|
||||
outline: 1.8px solid #ddd !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width1 {
|
||||
width: 5% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width2 {
|
||||
width: 50% !important;
|
||||
}
|
||||
|
||||
.Rtable .workflow-list .width4 {
|
||||
width: 20% !important;
|
||||
}
|
||||
|
||||
.Rtable--collapse .Rtable-row .Rtable-cell .Rtable-cell--content {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn-workflow-accept,
|
||||
.btn-workflow-leave,
|
||||
.btn-workflow-absent,
|
||||
.btn-workflow-rollcall-edit {
|
||||
width: 100%;
|
||||
margin: 1px 0;
|
||||
}
|
||||
|
||||
.employee-name {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* responsive Mobile */
|
||||
#navbar-animmenu {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#navbar-animmenu ul {
|
||||
display: flex;
|
||||
height: auto;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.verti-selector {
|
||||
display: none
|
||||
}
|
||||
|
||||
#navbar-animmenu li.active {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#accountList {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.preview-image {
|
||||
width: 50px;
|
||||
height: 35px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.txtMonilePD {
|
||||
display: none
|
||||
}
|
||||
1064
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/css/start-left-work.css
Normal file
1064
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/css/start-left-work.css
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,493 @@
|
||||
var lengthMenu = 0;
|
||||
var loadFunctionDocumentsAwaitingUpload = true;
|
||||
var loadFunctionCut = true;
|
||||
var loadFunctionLunchBreak = true;
|
||||
var loadFunctionUndefined = true;
|
||||
var loadFunctionOverlappingLeaves = true;
|
||||
|
||||
loadMenuAnime();
|
||||
$(document).ready(function () {
|
||||
//CountWorkFlowOfAbsentAndCut();
|
||||
loadWorkshopsWithDocumentsAwaitingUpload();
|
||||
|
||||
$("#clickDocumentsAwaitingUploadTab").click(function () {
|
||||
//$('.cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
// $('.DocumentsAwaitingUploadWorkFlowLists').fadeIn(200);
|
||||
//});
|
||||
if (loadFunctionDocumentsAwaitingUpload) {
|
||||
loadWorkshopsWithDocumentsAwaitingUpload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function loadMenuAnime() {
|
||||
var tabsNewAnim = $('#navbar-animmenu');
|
||||
var selectorNewAnim = $('#navbar-animmenu').find('li').length;
|
||||
var activeItemNewAnim = tabsNewAnim.find('.active');
|
||||
var activeHeightNewAnimHeight = activeItemNewAnim.innerHeight();
|
||||
var itemPosNewAnimTop = activeItemNewAnim.position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.active').each(function () {
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
if (lengthMenu === 1) {
|
||||
if ($('.main-navbar li').hasClass('lastRole')) {
|
||||
$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
}
|
||||
|
||||
$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
if ($(this).hasClass('lastRole')) {
|
||||
//$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
//$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
|
||||
$('#navbar-animmenu ul li').removeClass("active");
|
||||
$(this).addClass('active');
|
||||
|
||||
var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
var itemPosNewAnimTop = $(this).position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.form-section').hide();
|
||||
$('.accountListHead').text($(this).find('a').text());
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
//$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
// var targetForm = $(this).data('target');
|
||||
// $('#navbar-animmenu ul li').removeClass("active");
|
||||
// $(this).addClass('active');
|
||||
|
||||
// var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
// var itemPosNewAnimTop = $(this).position();
|
||||
|
||||
// $(".verti-selector").stop(true, true).animate({
|
||||
// "top": itemPosNewAnimTop.top + "px",
|
||||
// "height": activeHeightNewAnimHeight + "px"
|
||||
// }, 300); // انیمیشن با مدت زمان 300 میلیثانیه
|
||||
|
||||
// $('.form-section').fadeOut(200);
|
||||
// $('#' + targetForm).fadeIn(300); // انیمیشن تغییر صفحه
|
||||
//});
|
||||
}
|
||||
|
||||
$(document).on('click', ".openActionMain", function () {
|
||||
$('.toggle').not($(this).find('.toggle')).removeClass('open');
|
||||
|
||||
$(this).next().find(".operations-btns-main").slideToggle(500);
|
||||
$(".operations-btns-main").not($(this).next().find(".operations-btns-main")).slideUp(500);
|
||||
|
||||
$(this).find('.toggle').toggleClass('open');
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 768px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
async function loadWorkshopsWithDocumentsAwaitingUpload() {
|
||||
$('#CountDocumentsAwaitingUploadLoading').show();
|
||||
var mainIndexNum = 1;
|
||||
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkshopsWithDocumentsAwaitingUploadUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonDocumentsAwaitingUpload').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
data.forEach(function (item) {
|
||||
html += `
|
||||
<div id="Main_${item.workshopId}" class="Rtable-row Rtable-row--head align-items-center d-flex sticky openActionMain" onclick="loadByWorkshopIdWithItemsForAdminWorkFlow('${item.workshopId}')" style="background: #58B3B3;border: none !important; cursor: pointer; ">
|
||||
<div class="col-2 col-md-4 text-start">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center table-number" style="background: #deffff;margin: 0 10px 0 0;">
|
||||
${mainIndexNum++}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-md-4 text-center d-flex">
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-end">
|
||||
<span>${item.workshopName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-start">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span>${item.employerName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span id="EmployeeCountOfWorkshop_${item.workshopId}" class="number-of-count">${item.uploadItemsCount}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 col-md-4 text-end">
|
||||
<span class="toggle">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 18L9 12L15 6" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="w-100 operation-div">
|
||||
<div id="DocumentsAwaitingUpload_${item.workshopId}" class="operations-btns-main workshopID_${item.workshopId}" style="padding: 1px 10px 0 10px; background: rgb(255, 255, 255); box-shadow: none;width: 100%;">
|
||||
</div></div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$('#loadDocumentsAwaitingUploadWorkFlow').html(html);
|
||||
loadFunctionDocumentsAwaitingUpload = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadByWorkshopIdWithItemsForAdminWorkFlow(id) {
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadByWorkshopIdWithItemsForAdminWorkFlowUrl,
|
||||
data: { 'workshopId': id },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
|
||||
data.forEach(function (item, i) {
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative workflow-list employee-row" data-employee-id="${item.employeeId}">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center table-number">
|
||||
${i + 1}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
${item.employeeFullName}
|
||||
<p class="m-0 mt-2 d-block d-md-none"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.employeePicture.picturePath) {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/ >`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">عکس پرسنلی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width4 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center gap-1 ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardFront.picturePath) {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardFront.picturePath ? item.nationalCardFront.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی رو</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardRear.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="nationalCardRear_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardRear.picturePath ? item.nationalCardRear.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="nationalCardRear_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی پشت</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width5 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.militaryServiceCard.picturePath) {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.militaryServiceCard.picturePath ? item.militaryServiceCard.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت پایان خدمت</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width6 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">پیغام: </div>
|
||||
<div class="d-flex justify-content-center gap-1 ms-1">
|
||||
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage1.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage1_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage1.picturePath ? item.idCardPage1.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage1_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه اول</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage2.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage2_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage2.picturePath ? item.idCardPage2.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage2_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه دوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage3.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage3_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage3.picturePath ? item.idCardPage3.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage3_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه سوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage4.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage4_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage4.picturePath ? item.idCardPage4.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage4_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه چهارم</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter d-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center d-block d-md-flex align-items-center gap-1 h-100">
|
||||
|
||||
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEmployeeDocuments(${item.employeeId}, '${id}')">
|
||||
<span class="mx-1">عملیات</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$(`.workshopID_${id}`).html(html);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showModalEmployeeDocuments(employeeId, workshopId) {
|
||||
var goTo = `#showmodal=/AdminNew/Company/WorkFlow/EmployeesDocuments?handler=CreateUploadDocument&workshopId=${workshopId}&employeeId=${employeeId}`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
async function CountWorkFlow() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'Get',
|
||||
url: loadCountWorkFlowOfAbsentAndCut,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.spinner-grow').hide();
|
||||
|
||||
if (response.dataAbsent === 0) {
|
||||
$('#CountAbsent').hide();
|
||||
$('#CountAbsentMobile').hide();
|
||||
} else {
|
||||
$('#CountAbsent').show();
|
||||
$('#CountAbsentMobile').show();
|
||||
$('#CountAbsent').text(response.dataAbsent);
|
||||
$('#CountAbsentMobile').text(response.dataAbsent);
|
||||
}
|
||||
|
||||
if (response.dataCut === 0) {
|
||||
$('#CountCut').hide();
|
||||
$('#CountCutMobile').hide();
|
||||
} else {
|
||||
$('#CountCut').show();
|
||||
$('#CountCutMobile').show();
|
||||
$('#CountCut').text(response.dataCut);
|
||||
$('#CountCutMobile').text(response.dataCut);
|
||||
}
|
||||
|
||||
if (response.dataLunchBreak === 0) {
|
||||
$('#CountLunchBreak').hide();
|
||||
$('#CountLunchBreakMobile').hide();
|
||||
} else {
|
||||
$('#CountLunchBreak').show();
|
||||
$('#CountLunchBreakMobile').show();
|
||||
$('#CountLunchBreak').text(response.dataLunchBreak);
|
||||
$('#CountLunchBreakMobile').text(response.dataLunchBreak);
|
||||
}
|
||||
|
||||
if (response.dataUndefined === 0) {
|
||||
$('#CountUndefined').hide();
|
||||
$('#CountUndefinedMobile').hide();
|
||||
} else {
|
||||
$('#CountUndefined').show();
|
||||
$('#CountUndefinedMobile').show();
|
||||
$('#CountUndefined').text(response.dataUndefined);
|
||||
$('#CountUndefinedMobile').text(response.dataUndefined);
|
||||
}
|
||||
|
||||
if (response.dataOverlappingLeave === 0) {
|
||||
$('#CountOverlappingLeave').hide();
|
||||
$('#CountOverlappingLeaveMobile').hide();
|
||||
} else {
|
||||
$('#CountOverlappingLeave').show();
|
||||
$('#CountOverlappingLeaveMobile').show();
|
||||
$('#CountOverlappingLeave').text(response.dataOverlappingLeave);
|
||||
$('#CountOverlappingLeaveMobile').text(response.dataOverlappingLeave);
|
||||
}
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateIndexesWorkFlow(dateDiv) {
|
||||
let index = 1;
|
||||
|
||||
$(`#${dateDiv} .employee-row:visible .table-number`).each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
|
||||
function updateMainWorkFlow() {
|
||||
let index = 1;
|
||||
|
||||
$(`#loadDocumentsAwaitingUploadWorkFlow .Rtable-cell.width1 .table-number`).each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,504 @@
|
||||
var lengthMenu = 0;
|
||||
var loadFunctionStartDate = true;
|
||||
var loadFunctionNewEmployee = true;
|
||||
|
||||
loadMenuAnime();
|
||||
$(document).ready(function () {
|
||||
//CountWorkFlowOfAbsentAndCut();
|
||||
loadWorkshopListForDocumentsCheck();
|
||||
|
||||
$("#clickDocumentsAwaitingReviewForCheckerTab").click(function () {
|
||||
//$('.cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
// $('.StartDateLists').fadeIn(200);
|
||||
//});
|
||||
if (loadFunctionStartDate) {
|
||||
loadWorkshopListForDocumentsCheck();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function loadMenuAnime() {
|
||||
var tabsNewAnim = $('#navbar-animmenu');
|
||||
var selectorNewAnim = $('#navbar-animmenu').find('li').length;
|
||||
var activeItemNewAnim = tabsNewAnim.find('.active');
|
||||
var activeHeightNewAnimHeight = activeItemNewAnim.innerHeight();
|
||||
var itemPosNewAnimTop = activeItemNewAnim.position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.active').each(function () {
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
if (lengthMenu === 1) {
|
||||
if ($('.main-navbar li').hasClass('lastRole')) {
|
||||
$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
}
|
||||
|
||||
$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
if ($(this).hasClass('lastRole')) {
|
||||
//$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
//$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
|
||||
$('#navbar-animmenu ul li').removeClass("active");
|
||||
$(this).addClass('active');
|
||||
|
||||
var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
var itemPosNewAnimTop = $(this).position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.form-section').hide();
|
||||
$('.accountListHead').text($(this).find('a').text());
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
//$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
// var targetForm = $(this).data('target');
|
||||
// $('#navbar-animmenu ul li').removeClass("active");
|
||||
// $(this).addClass('active');
|
||||
|
||||
// var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
// var itemPosNewAnimTop = $(this).position();
|
||||
|
||||
// $(".verti-selector").stop(true, true).animate({
|
||||
// "top": itemPosNewAnimTop.top + "px",
|
||||
// "height": activeHeightNewAnimHeight + "px"
|
||||
// }, 300); // انیمیشن با مدت زمان 300 میلیثانیه
|
||||
|
||||
// $('.form-section').fadeOut(200);
|
||||
// $('#' + targetForm).fadeIn(300); // انیمیشن تغییر صفحه
|
||||
//});
|
||||
}
|
||||
|
||||
$(document).on('click', ".openActionMain", function () {
|
||||
$('.toggle').not($(this).find('.toggle')).removeClass('open');
|
||||
|
||||
$(this).next().find(".operations-btns-main").slideToggle(500);
|
||||
$(".operations-btns-main").not($(this).next().find(".operations-btns-main")).slideUp(500);
|
||||
|
||||
$(this).find('.toggle').toggleClass('open');
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 768px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
async function loadWorkshopListForDocumentsCheck() {
|
||||
$('#loadingSkeletonDocumentsAwaitingReviewForCheckerWork').show();
|
||||
var mainIndexNum = 1;
|
||||
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkshopListForDocumentsCheckUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonDocumentsAwaitingReviewForCheckerWork').hide();
|
||||
|
||||
console.log(data);
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
data.forEach(function (item) {
|
||||
html += `
|
||||
<div id="absentMain_${item.workshopId}" class="Rtable-row Rtable-row--head align-items-center d-flex sticky openActionMain" onclick="loadEmployeeListByWorkshopIdForDocumentsCheck('${item.workshopId}')" style="background: #58B3B3;border: none !important; cursor: pointer; ">
|
||||
<div class="col-2 col-md-4 text-start">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center" style="background: #deffff;margin: 0 10px 0 0;">
|
||||
${mainIndexNum++}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-md-4 text-center d-flex">
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-end">
|
||||
<span>${item.workshopFullName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-start">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span>${item.employerName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span class="number-of-count">${item.submittedItemsCount}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 col-md-4 text-end">
|
||||
<span class="toggle">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 18L9 12L15 6" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="w-100 operation-div">
|
||||
<div id="DocumentsAwaitingUpload_${item.workshopId}" class="operations-btns-main workshopID_${item.workshopId}" style="padding: 1px 10px 0 10px; background: rgb(255, 255, 255); box-shadow: none;width: 100%;">
|
||||
</div></div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$('#loadDocumentsAwaitingReviewForCheckerWorkFlow').html(html);
|
||||
loadFunctionStartDate = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadEmployeeListByWorkshopIdForDocumentsCheck(id) {
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadEmployeeListByWorkshopIdForDocumentsCheckUrl,
|
||||
data: { 'workshopId': id },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
|
||||
console.log(response);
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
|
||||
data.forEach(function (item, i) {
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative workflow-list employee-row">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center table-number">
|
||||
${i + 1}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
${item.employeeFullName}
|
||||
<p class="m-0 mt-2 d-block d-md-none"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.employeePicture.picturePath) {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.employeePicture.picturePath ? item.employeePicture.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="employeePicture_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/ >`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">عکس پرسنلی</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width4 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardFront.picturePath) {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardFront.picturePath ? item.nationalCardFront.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="nationalCardFront_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی رو</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.nationalCardRear.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="nationalCardRear_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.nationalCardRear.picturePath ? item.nationalCardRear.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="nationalCardRear_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت ملی پشت</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width5 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.militaryServiceCard.picturePath) {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.militaryServiceCard.picturePath ? item.militaryServiceCard.picturePath : "")}" class="preview-image">`;
|
||||
} else {
|
||||
html += `<img id="militaryServiceCard_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">کارت پایان خدمت</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width6 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">پیغام: </div>
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage1.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage1_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage1.picturePath ? item.idCardPage1.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage1_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه اول</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage2.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage2_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage2.picturePath ? item.idCardPage2.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage2_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه دوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage3.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage3_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage3.picturePath ? item.idCardPage3.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage3_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه سوم</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="documentFileBox">`;
|
||||
if (item.idCardPage4.picturePath) {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage4_${item.employeeId}" src="${showPictureUrl + `&filePath=` + (item.idCardPage4.picturePath ? item.idCardPage4.picturePath : "")}" class="preview-image"></div>`;
|
||||
} else {
|
||||
html += `<div class="documentFileBox"><img id="idCardPage4_${item.employeeId}" src="/assetsclient/images/pd-image.png" class="preview-image"/></div>`;
|
||||
}
|
||||
html += `</div>
|
||||
<div class="txtMonilePD">شناسنامه صفحه چهارم</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter d-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center d-block d-md-flex align-items-center gap-1 h-100">
|
||||
|
||||
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalEmployeeDocuments(${item.employeeId}, '${id}')">
|
||||
<span class="mx-1">عملیات</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$(`.workshopID_${id}`).html(html);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showModalEmployeeDocuments(employeeId, workshopId) {
|
||||
var goTo = `#showmodal=/AdminNew/Company/WorkFlow/EmployeesDocuments?handler=CreateUploadDocument&workshopId=${workshopId}&employeeId=${employeeId}`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
async function CountWorkFlow() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'Get',
|
||||
url: loadCountWorkFlowOfAbsentAndCut,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.spinner-grow').hide();
|
||||
|
||||
if (response.dataAbsent === 0) {
|
||||
$('#CountAbsent').hide();
|
||||
$('#CountAbsentMobile').hide();
|
||||
} else {
|
||||
$('#CountAbsent').show();
|
||||
$('#CountAbsentMobile').show();
|
||||
$('#CountAbsent').text(response.dataAbsent);
|
||||
$('#CountAbsentMobile').text(response.dataAbsent);
|
||||
}
|
||||
|
||||
if (response.dataCut === 0) {
|
||||
$('#CountCut').hide();
|
||||
$('#CountCutMobile').hide();
|
||||
} else {
|
||||
$('#CountCut').show();
|
||||
$('#CountCutMobile').show();
|
||||
$('#CountCut').text(response.dataCut);
|
||||
$('#CountCutMobile').text(response.dataCut);
|
||||
}
|
||||
|
||||
if (response.dataLunchBreak === 0) {
|
||||
$('#CountLunchBreak').hide();
|
||||
$('#CountLunchBreakMobile').hide();
|
||||
} else {
|
||||
$('#CountLunchBreak').show();
|
||||
$('#CountLunchBreakMobile').show();
|
||||
$('#CountLunchBreak').text(response.dataLunchBreak);
|
||||
$('#CountLunchBreakMobile').text(response.dataLunchBreak);
|
||||
}
|
||||
|
||||
if (response.dataUndefined === 0) {
|
||||
$('#CountUndefined').hide();
|
||||
$('#CountUndefinedMobile').hide();
|
||||
} else {
|
||||
$('#CountUndefined').show();
|
||||
$('#CountUndefinedMobile').show();
|
||||
$('#CountUndefined').text(response.dataUndefined);
|
||||
$('#CountUndefinedMobile').text(response.dataUndefined);
|
||||
}
|
||||
|
||||
if (response.dataOverlappingLeave === 0) {
|
||||
$('#CountOverlappingLeave').hide();
|
||||
$('#CountOverlappingLeaveMobile').hide();
|
||||
} else {
|
||||
$('#CountOverlappingLeave').show();
|
||||
$('#CountOverlappingLeaveMobile').show();
|
||||
$('#CountOverlappingLeave').text(response.dataOverlappingLeave);
|
||||
$('#CountOverlappingLeaveMobile').text(response.dataOverlappingLeave);
|
||||
}
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateIndexesWorkFlow(dateDiv) {
|
||||
let index = 1;
|
||||
|
||||
$(`#${dateDiv} .employee-row:visible .table-number`).each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
|
||||
function updateMainWorkFlow(dateDiv) {
|
||||
let indexMain = 1;
|
||||
|
||||
$(`#${dateDiv} .number-of-count`).each(function () {
|
||||
var text = Number($(this).text());
|
||||
$(this).text(text - 1);
|
||||
|
||||
if (text - 1 === 0) {
|
||||
$(`#${dateDiv}`).next().remove();
|
||||
$(`#${dateDiv}`).remove();
|
||||
|
||||
$(`.Rtable-cell.width1 .Rtable-cell--content span`).each(function () {
|
||||
$(this).text(indexMain++);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
407
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/js/EmployeesNew.js
Normal file
407
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/js/EmployeesNew.js
Normal file
@@ -0,0 +1,407 @@
|
||||
var lengthMenu = 0;
|
||||
var loadFunctionStartDate = true;
|
||||
var loadFunctionNewEmployee = true;
|
||||
|
||||
loadMenuAnime();
|
||||
$(document).ready(function () {
|
||||
//CountWorkFlowOfAbsentAndCut();
|
||||
loadWorkshopsForEmployeeStartWork();
|
||||
|
||||
$("#clickStartDateTab").click(function () {
|
||||
//$('.cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
// $('.StartDateLists').fadeIn(200);
|
||||
//});
|
||||
if (loadFunctionStartDate) {
|
||||
loadWorkshopsForEmployeeStartWork();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function loadMenuAnime() {
|
||||
var tabsNewAnim = $('#navbar-animmenu');
|
||||
var selectorNewAnim = $('#navbar-animmenu').find('li').length;
|
||||
var activeItemNewAnim = tabsNewAnim.find('.active');
|
||||
var activeHeightNewAnimHeight = activeItemNewAnim.innerHeight();
|
||||
var itemPosNewAnimTop = activeItemNewAnim.position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.active').each(function () {
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
if (lengthMenu === 1) {
|
||||
if ($('.main-navbar li').hasClass('lastRole')) {
|
||||
$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
}
|
||||
|
||||
$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
if ($(this).hasClass('lastRole')) {
|
||||
//$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
//$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
|
||||
$('#navbar-animmenu ul li').removeClass("active");
|
||||
$(this).addClass('active');
|
||||
|
||||
var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
var itemPosNewAnimTop = $(this).position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.form-section').hide();
|
||||
$('.accountListHead').text($(this).find('a').text());
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
//$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
// var targetForm = $(this).data('target');
|
||||
// $('#navbar-animmenu ul li').removeClass("active");
|
||||
// $(this).addClass('active');
|
||||
|
||||
// var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
// var itemPosNewAnimTop = $(this).position();
|
||||
|
||||
// $(".verti-selector").stop(true, true).animate({
|
||||
// "top": itemPosNewAnimTop.top + "px",
|
||||
// "height": activeHeightNewAnimHeight + "px"
|
||||
// }, 300); // انیمیشن با مدت زمان 300 میلیثانیه
|
||||
|
||||
// $('.form-section').fadeOut(200);
|
||||
// $('#' + targetForm).fadeIn(300); // انیمیشن تغییر صفحه
|
||||
//});
|
||||
}
|
||||
|
||||
$(document).on('click', ".openActionMain", function () {
|
||||
$('.toggle').not($(this).find('.toggle')).removeClass('open');
|
||||
|
||||
$(this).next().find(".operations-btns-main").slideToggle(500);
|
||||
$(".operations-btns-main").not($(this).next().find(".operations-btns-main")).slideUp(500);
|
||||
|
||||
$(this).find('.toggle').toggleClass('open');
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 768px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
async function loadWorkshopsForEmployeeStartWork() {
|
||||
$('#loadingSkeletonStartDate').show();
|
||||
var mainIndexNum = 1;
|
||||
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
//async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadWorkshopsForEmployeeStartWorkUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
$('#loadingSkeletonStartDate').hide();
|
||||
|
||||
if (response.success) {
|
||||
if (data.result.length > 0) {
|
||||
data.result.forEach(function (item) {
|
||||
html += `
|
||||
<div id="absentMain_${item.workshopId}" class="Rtable-row Rtable-row--head align-items-center d-flex sticky openActionMain" onclick="loadClientEmployeesStartWork('${item.workshopId}')" style="background: #58B3B3;border: none !important; cursor: pointer; ">
|
||||
<div class="col-2 col-md-4 text-start">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center" style="background: #deffff;margin: 0 10px 0 0;">
|
||||
${mainIndexNum++}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-md-4 text-center d-flex">
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-end">
|
||||
<span>${item.workshopName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-start">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span>${item.employerName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 text-center">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span class="number-of-count">${item.addedEmployeesCount}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 col-md-4 text-end">
|
||||
<span class="toggle">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 18L9 12L15 6" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="w-100 operation-div">
|
||||
<div id="DocumentsAwaitingUpload_${item.workshopId}" class="operations-btns-main workshopID_${item.workshopId}" style="padding: 1px 10px 0 10px; background: rgb(255, 255, 255); box-shadow: none;width: 100%;">
|
||||
</div></div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$('#loadStartDateWorkFlow').html(html);
|
||||
loadFunctionStartDate = false;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadClientEmployeesStartWork(id) {
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadClientEmployeesStartWorkUrl,
|
||||
data: { 'workshopId': id },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
|
||||
if (response.success) {
|
||||
if (data.result.length > 0) {
|
||||
|
||||
data.result.forEach(function (item, i) {
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative workflow-list employee-row">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center table-number">
|
||||
${i + 1}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
${item.employeeName}
|
||||
<p class="m-0 mt-2 d-block d-md-none"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width4 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width5 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width6 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">پیغام: </div>
|
||||
<div class="d-flex justify-content-center ms-1">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Rtable-cell position-relative width7 bg-filter d-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center d-block d-md-flex align-items-center gap-1 h-100">
|
||||
|
||||
<button class="btn-workflow-rollcall-edit position-relative" onclick="showModalLeftWork(${item.employeeId}, '${item.employeeName}')">
|
||||
<span class="mx-1">عملیات</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$(`.workshopID_${id}`).html(html);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showModalLeftWork(employeeId, employeeName) {
|
||||
var goTo = `#showmodal=/AdminNew/Company/WorkFlow/EmployeesNew?handler=LeftWork&employeeId=${employeeId}&employeeName=${employeeName}`;
|
||||
window.location.href = goTo;
|
||||
}
|
||||
|
||||
async function CountWorkFlow() {
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
type: 'Get',
|
||||
url: loadCountWorkFlowOfAbsentAndCut,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('.spinner-grow').hide();
|
||||
|
||||
if (response.dataAbsent === 0) {
|
||||
$('#CountAbsent').hide();
|
||||
$('#CountAbsentMobile').hide();
|
||||
} else {
|
||||
$('#CountAbsent').show();
|
||||
$('#CountAbsentMobile').show();
|
||||
$('#CountAbsent').text(response.dataAbsent);
|
||||
$('#CountAbsentMobile').text(response.dataAbsent);
|
||||
}
|
||||
|
||||
if (response.dataCut === 0) {
|
||||
$('#CountCut').hide();
|
||||
$('#CountCutMobile').hide();
|
||||
} else {
|
||||
$('#CountCut').show();
|
||||
$('#CountCutMobile').show();
|
||||
$('#CountCut').text(response.dataCut);
|
||||
$('#CountCutMobile').text(response.dataCut);
|
||||
}
|
||||
|
||||
if (response.dataLunchBreak === 0) {
|
||||
$('#CountLunchBreak').hide();
|
||||
$('#CountLunchBreakMobile').hide();
|
||||
} else {
|
||||
$('#CountLunchBreak').show();
|
||||
$('#CountLunchBreakMobile').show();
|
||||
$('#CountLunchBreak').text(response.dataLunchBreak);
|
||||
$('#CountLunchBreakMobile').text(response.dataLunchBreak);
|
||||
}
|
||||
|
||||
if (response.dataUndefined === 0) {
|
||||
$('#CountUndefined').hide();
|
||||
$('#CountUndefinedMobile').hide();
|
||||
} else {
|
||||
$('#CountUndefined').show();
|
||||
$('#CountUndefinedMobile').show();
|
||||
$('#CountUndefined').text(response.dataUndefined);
|
||||
$('#CountUndefinedMobile').text(response.dataUndefined);
|
||||
}
|
||||
|
||||
if (response.dataOverlappingLeave === 0) {
|
||||
$('#CountOverlappingLeave').hide();
|
||||
$('#CountOverlappingLeaveMobile').hide();
|
||||
} else {
|
||||
$('#CountOverlappingLeave').show();
|
||||
$('#CountOverlappingLeaveMobile').show();
|
||||
$('#CountOverlappingLeave').text(response.dataOverlappingLeave);
|
||||
$('#CountOverlappingLeaveMobile').text(response.dataOverlappingLeave);
|
||||
}
|
||||
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function () {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
}, 3500);
|
||||
}
|
||||
},
|
||||
error: function (err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateIndexesWorkFlow(dateDiv) {
|
||||
let index = 1;
|
||||
|
||||
$(`#${dateDiv} .employee-row:visible .table-number`).each(function () {
|
||||
$(this).text(index++);
|
||||
});
|
||||
}
|
||||
|
||||
function updateMainWorkFlow(dateDiv) {
|
||||
let indexMain = 1;
|
||||
|
||||
$(`#${dateDiv} .number-of-count`).each(function () {
|
||||
var text = Number($(this).text());
|
||||
$(this).text(text - 1);
|
||||
|
||||
if (text - 1 === 0) {
|
||||
$(`#${dateDiv}`).next().remove();
|
||||
$(`#${dateDiv}`).remove();
|
||||
|
||||
$(`.Rtable-cell.width1 .Rtable-cell--content span`).each(function () {
|
||||
$(this).text(indexMain++);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,529 @@
|
||||
var employeePicture;
|
||||
var nationalCardFront;
|
||||
var nationalCardRear;
|
||||
var militaryServiceCard;
|
||||
var idCardPage1;
|
||||
var idCardPage2;
|
||||
var idCardPage3;
|
||||
var idCardPage4;
|
||||
var uploadFileCount = UploadedCount;
|
||||
|
||||
var pendingMessage = `<div class="pendingMessage">بررسی</div>`;
|
||||
var pendingIcon = `<svg width="24" height="24" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11 19.25C15.5563 19.25 19.25 15.5563 19.25 11C19.25 6.44365 15.5563 2.75 11 2.75C6.44365 2.75 2.75 6.44365 2.75 11C2.75 15.5563 6.44365 19.25 11 19.25Z" fill="#FDBA74"/>
|
||||
<path d="M11.4168 14.6667C11.4168 14.8968 11.2303 15.0833 11.0002 15.0833C10.77 15.0833 10.5835 14.8968 10.5835 14.6667C10.5835 14.4365 10.77 14.25 11.0002 14.25C11.2303 14.25 11.4168 14.4365 11.4168 14.6667Z" fill="white" stroke="white"/>
|
||||
<path d="M11 11.916V6.41602V11.916Z" fill="white"/>
|
||||
<path d="M11 11.916V6.41602" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
var confirmMessage = `<div class="confirmedMessage">تایید</div>`;
|
||||
var confirmIcon = `<svg width="24" height="24" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7" cy="7" r="5.25" fill="#00C04D"/>
|
||||
<path d="M4.66659 7L6.41659 8.75L9.33325 5.25" stroke="white" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
var rejectMessage = `<div class="rejectMessage">رد شده</div>`;
|
||||
var rejectIcon = `<svg width="24" height="24" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="7" cy="7" r="5.25" fill="#FF5D5D"/>
|
||||
<path d="M9.33341 4.66602L4.66675 9.33268" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M4.66659 4.66602L9.33325 9.33268" stroke="white" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`;
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
var employeeId = $("#employeeIdForList").val();
|
||||
|
||||
//$('.btnDeletingPD').each(function () {
|
||||
// if ($(this).hasClass('Unsubmitted')) { // Remove the extra class selector '.btnDeletingPD'
|
||||
// $(this).closest('.pdBox').addClass('justUploaded'); // Add 'justUploaded' to the closest parent .pdBox
|
||||
// }
|
||||
//});
|
||||
|
||||
|
||||
$(".btnDeletingPD ").each(function () {
|
||||
if ($(this).hasClass("SubmittedByAdmin") || $(this).hasClass("Rejected") || $(this).hasClass("Confirmed")) {
|
||||
$(this).addClass("disable");
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
});
|
||||
$(document).off('click', '.btnUploadingPD').on('click', '.btnUploadingPD', function (event) {
|
||||
event.preventDefault();
|
||||
const index = $(this).data('index');
|
||||
$('input[type="file"][data-index="' + index + '"]').click();
|
||||
});
|
||||
|
||||
$('.pdBox').each(function () {
|
||||
if ($(".isTrue").hasClass("isTrue") && $(".Unsubmitted").hasClass("Unsubmitted") || $(".SubmittedByClient").hasClass("SubmittedByClient")) {
|
||||
$(".btnCreateNew").prop("disabled", false);
|
||||
$(".btnCreateNew ").removeClass("disable");
|
||||
} else {
|
||||
$(".btnCreateNew ").addClass("disable");
|
||||
}
|
||||
});
|
||||
|
||||
$('.pdBox').each(function () {
|
||||
// Check if there's a button with the 'submitted' class inside the pdBox
|
||||
if ($(this).find('button.SubmittedByAdmin').length > 0) {
|
||||
$(this).addClass('pending');
|
||||
$(this).find(".pdImageBox .sign").addClass("pendingSign").html(pendingIcon);
|
||||
$(this).find(".btnUploadingPD").addClass("disable");
|
||||
$(this).find(".resultMessage").html(pendingMessage);
|
||||
}
|
||||
if ($(this).find('button.Confirmed').length > 0) {
|
||||
$(this).addClass('complete');
|
||||
$(this).find(".pdImageBox .sign").addClass("completeSign").html(confirmIcon);
|
||||
$(this).find(".resultMessage").html(confirmMessage);
|
||||
}
|
||||
if ($(this).find('button.Rejected').length > 0) {
|
||||
$(this).addClass('discomplete');
|
||||
$(this).find(".pdImageBox .sign").addClass("discompleteSign").html(rejectIcon);
|
||||
$(this).find(".resultMessage").html(rejectMessage);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off('change', '.file-input').on('change', '.file-input', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
const fileInputFile = this.files[0];
|
||||
const indexFileValue = $(this).data('index');
|
||||
const validExtensions = ['jpg', 'jpeg', 'png'];
|
||||
const validPdfExtensions = ['pdf'];
|
||||
|
||||
const label = $(`#label_${indexFileValue}`).val();
|
||||
|
||||
if (fileInputFile) {
|
||||
const fileName = fileInputFile.name.toLowerCase();
|
||||
const extension = fileName.split('.').pop();
|
||||
|
||||
if (validExtensions.includes(extension)) {
|
||||
if (fileInputFile.size > 5000000) {
|
||||
showAlertMessage('.alert-msg', 'لطفا فایل حجم کمتر از 5 مگابایت را آپلود کنید.', 3500);
|
||||
$(this).val('');
|
||||
return;
|
||||
}
|
||||
uploadFile(fileInputFile, indexFileValue, label);
|
||||
} else if (validPdfExtensions.includes(extension)) {
|
||||
|
||||
var fileReader = new FileReader();
|
||||
|
||||
fileReader.onload = function () {
|
||||
var typedarray = new Uint8Array(this.result);
|
||||
pdfjsLib.getDocument(typedarray).promise.then(function (pdf) {
|
||||
totalPageCount = pdf.numPages;
|
||||
|
||||
if (totalPageCount > 1) {
|
||||
showAlertMessage('.alert-msg', 'آپلود مجاز نیست! تعداد صفحات نباید بیشتر از ۱ باشد.', 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
pdf.getPage(1).then(function (page) { // فقط صفحه اول پردازش میشود
|
||||
var scale = 2.0;
|
||||
var viewport = page.getViewport({ scale: scale });
|
||||
|
||||
var canvas = document.createElement("canvas");
|
||||
canvas.className = "page";
|
||||
canvas.title = "Page 1";
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
var context = canvas.getContext("2d");
|
||||
|
||||
page.render({
|
||||
canvasContext: context,
|
||||
viewport: viewport
|
||||
})
|
||||
.promise.then(function () {
|
||||
uploadCanvasAsFile(canvas, `${label}_${indexFileValue}.jpg`, indexFileValue, label);
|
||||
})
|
||||
.catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'مشکلی در پردازش PDF رخ داده است!', 3500);
|
||||
});
|
||||
}).catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'خطا در دریافت صفحه PDF!', 3500);
|
||||
});
|
||||
|
||||
}).catch(function (error) {
|
||||
showAlertMessage('.alert-msg', 'خطا در بارگذاری فایل PDF!', 3500);
|
||||
});
|
||||
};
|
||||
|
||||
fileReader.readAsArrayBuffer(fileInputFile);
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', 'فرمت فایل باید یکی از موارد jpeg, jpg یا png باشد.', 3500);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(document).off('click', '.btnDeletingPD').on('click', '.btnDeletingPD', function (event) {
|
||||
event.preventDefault();
|
||||
const indexId = $(this).data('index');
|
||||
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "آیا میخواهید تصویر موجود را حذف کنید؟",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
removeEmployeeDocumentByLabel(indexId, employeeId);
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const img = pdBox.find('.preview-image');
|
||||
img.attr('src', '/assetsclient/images/pd-image.png');
|
||||
$(this).addClass('disable');
|
||||
} else {
|
||||
$(this).removeClass('disable');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".exitModal").click(function () {
|
||||
if (uploadFileCount > 0) {
|
||||
swal.fire({
|
||||
title: "اخطار",
|
||||
text: "در صورت انصراف عملیات ثبت نخواهد شد!",
|
||||
icon: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
confirmButtonColor: '#84cc16',
|
||||
reverseButtons: true
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
cancelOperation();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('#MainModal').modal('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function cancelOperation() {
|
||||
$.ajax({
|
||||
url: cancelOperationUrl,
|
||||
method: 'POST',
|
||||
data: { workshopId: workshopId, employeeId: employeeId },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.success) {
|
||||
$('#MainModal').modal('hide');
|
||||
} else {
|
||||
showAlertMessage('.alert-success-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var indexCount = 0;
|
||||
var activeUploads = 0;
|
||||
function uploadFile(file, indexId, label) {
|
||||
const formData = new FormData();
|
||||
formData.append('command.EmployeeId', employeeId);
|
||||
formData.append('command.WorkshopId', workshopId);
|
||||
formData.append('command.Label', label);
|
||||
formData.append('command.PictureFile', file);
|
||||
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const spinner = pdBox.find('.spinner-loading-progress');
|
||||
|
||||
const percentageText = pdBox.find('.percentageText');
|
||||
|
||||
spinner.show();
|
||||
activeUploads++;
|
||||
$('#createUploadingFiles').prop('disabled', true).addClass('disable');
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', saveUploadFileModalAjax, true);
|
||||
xhr.setRequestHeader('RequestVerificationToken', antiForgeryToken);
|
||||
|
||||
const uploadStartTime = new Date().getTime();
|
||||
let simulatedProgress = 0;
|
||||
let actualProgress = 0;
|
||||
let isUploadComplete = false;
|
||||
|
||||
// Simulate progress every 20ms, gradually increasing the bar until the actual progress is reached
|
||||
const progressInterval = setInterval(function () {
|
||||
if (simulatedProgress < actualProgress && !isUploadComplete) {
|
||||
simulatedProgress += 1; // Gradually increase simulated progress
|
||||
spinner.css('width', `${simulatedProgress}%`);
|
||||
percentageText.text(`${simulatedProgress}%`);
|
||||
}
|
||||
|
||||
if (simulatedProgress >= 100) {
|
||||
clearInterval(progressInterval); // Stop once the progress hits 100%
|
||||
}
|
||||
}, 30); // Increases by 1% every 20ms, making it smooth
|
||||
|
||||
// Actual upload progress listener
|
||||
xhr.upload.addEventListener('progress', function (e) {
|
||||
if (e.lengthComputable) {
|
||||
actualProgress = Math.round((e.loaded / e.total) * 100);
|
||||
|
||||
// If the actual progress is slow, allow the simulated progress to match it naturally
|
||||
if (actualProgress >= simulatedProgress) {
|
||||
simulatedProgress = actualProgress;
|
||||
spinner.css('width', `${simulatedProgress}%`);
|
||||
percentageText.text(`${simulatedProgress}%`);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// On upload completion
|
||||
xhr.onload = function () {
|
||||
spinner.css('transition', 'all 2s ease-in');
|
||||
const uploadEndTime = new Date().getTime();
|
||||
const timeDiff = uploadEndTime - uploadStartTime;
|
||||
const minUploadTime = 2500; // Minimum of 2 seconds for the whole process
|
||||
|
||||
const response = JSON.parse(xhr.responseText);
|
||||
isUploadComplete = true; // Mark the upload as complete
|
||||
const delayTime = Math.max(minUploadTime - timeDiff, 0);
|
||||
|
||||
setTimeout(function () {
|
||||
clearInterval(progressInterval); // Clear the interval when done
|
||||
simulatedProgress = 100;
|
||||
spinner.css('width', '100%');
|
||||
percentageText.text('100%');
|
||||
|
||||
var id2 = $("#employeeIdForList").val();
|
||||
|
||||
if (xhr.status === 200 && response.isSuccedded) {
|
||||
indexCount++;
|
||||
const reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
|
||||
uploadFileCount = uploadFileCount + 1;
|
||||
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
const img = pdBox.find('.preview-image');
|
||||
img.attr('src', e.target.result);
|
||||
|
||||
//employeePicture = $('#EmployeePicture').attr('src');
|
||||
//nationalCardFront = $('#NationalCardFront').attr('src');
|
||||
//nationalCardRear = $('#NationalCardRear').attr('src');
|
||||
//militaryServiceCard = $('#MilitaryServiceCard').attr('src');
|
||||
//idCardPage1 = $('#IdCardPage1').attr('src');
|
||||
//idCardPage2 = $('#IdCardPage2').attr('src');
|
||||
//idCardPage3 = $('#IdCardPage3').attr('src');
|
||||
//idCardPage4 = $('#IdCardPage4').attr('src');
|
||||
//console.log(idCardPage2);
|
||||
|
||||
// updatePreviewImage(indexId, id2, e.target.result);
|
||||
|
||||
};
|
||||
|
||||
if (pdBox.hasClass("complete") || pdBox.hasClass("discomplete")) {
|
||||
|
||||
pdBox.removeClass("discomplete complete");
|
||||
pdBox.find(".sign").removeClass("discompleteSign completeSign");
|
||||
pdBox.find(".sign").empty();
|
||||
pdBox.find(".btnDeletingPD").removeClass("Rejected Confirmed");
|
||||
pdBox.find("confirmedMessage ").remove();
|
||||
pdBox.find(".resultMessage").empty();
|
||||
}
|
||||
|
||||
pdBox.find('.btnDeletingPD').removeClass('disable').addClass("Unsubmitted");
|
||||
|
||||
reader.readAsDataURL(file);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message || 'Error uploading file', 3500);
|
||||
$('input[type="file"][data-index="' + indexId + '"]').val('');
|
||||
}
|
||||
spinner.css('width', '0%'); // Reset the progress bar
|
||||
spinner.hide();
|
||||
handleActiveUploads();
|
||||
}, delayTime); // Ensure a minimum of 2 seconds for the full process
|
||||
};
|
||||
|
||||
// Handle upload error
|
||||
xhr.onerror = function () {
|
||||
clearInterval(progressInterval); // Stop progress on error
|
||||
showAlertMessage('.alert-msg', 'مشکلی در آپلود فایل به وجود آمد.', 3500);
|
||||
$('input[type="file"][data-index="' + indexId + '"]').val('');
|
||||
spinner.css('width', '0%');
|
||||
spinner.hide();
|
||||
handleActiveUploads();
|
||||
};
|
||||
|
||||
xhr.send(formData);
|
||||
}
|
||||
|
||||
function handleActiveUploads() {
|
||||
activeUploads--;
|
||||
if (activeUploads === 0) {
|
||||
$('#createUploadingFiles').prop('disabled', false).removeClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
function uploadCanvasAsFile(canvas, fileName, indexFileValue, label) {
|
||||
canvas.toBlob(function (blob) {
|
||||
if (!blob) {
|
||||
showAlertMessage('.alert-msg', 'مشکلی در تبدیل تصویر رخ داده است!', 3500);
|
||||
return;
|
||||
}
|
||||
|
||||
let file = new File([blob], fileName, { type: 'image/png' });
|
||||
|
||||
uploadFile(file, indexFileValue, label);
|
||||
|
||||
}, "image/png");
|
||||
}
|
||||
|
||||
|
||||
function showAlertMessage(selector, message, timeout) {
|
||||
$(selector).show();
|
||||
$(selector + ' p').text(message);
|
||||
setTimeout(function () {
|
||||
$(selector).hide();
|
||||
$(selector + ' p').text('');
|
||||
}, timeout);
|
||||
}
|
||||
|
||||
function removeEmployeeDocumentByLabel(indexId, employeeId) {
|
||||
const label = $(`#label_${indexId}`).val();
|
||||
const pdBox = $('input[data-index="' + indexId + '"]').closest('.pdBox');
|
||||
|
||||
$.ajax({
|
||||
url: deleteFileAjaxUrl,
|
||||
method: 'POST',
|
||||
data: { label: label, employeeId: employeeId, workshopId: workshopId },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
if (response.isSuccedded) {
|
||||
uploadFileCount = uploadFileCount - 1;
|
||||
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت حذف شد.', 3500);
|
||||
/* $(`#label_${indexId}`).val('');*/
|
||||
pdBox.find('.btnDeletingPD').removeClass("Unsubmitted");
|
||||
pdBox.find('.uploaderSign').hide();
|
||||
updatePreviewImage(Number(indexId), Number(employeeId), "/assetsclient/images/pd-image.png");
|
||||
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-success-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updatePreviewImage(indexId, id2, result) {
|
||||
switch (indexId) {
|
||||
case 0:
|
||||
$(`#employeePicture_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 1:
|
||||
$(`#nationalCardFront_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 2:
|
||||
$(`#nationalCardRear_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 3:
|
||||
$(`#militaryServiceCard_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 4:
|
||||
$(`#idCardPage1_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 5:
|
||||
$(`#idCardPage2_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 6:
|
||||
$(`#idCardPage3_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
case 7:
|
||||
$(`#idCardPage4_${id2}.preview-image`).attr('src', result);
|
||||
break;
|
||||
default:
|
||||
console.warn('Unexpected indexId:', indexId);
|
||||
}
|
||||
}
|
||||
|
||||
function saveSubmit(id) {
|
||||
var loading = $(".spinner-loading");
|
||||
|
||||
loading.show();
|
||||
|
||||
var data = {
|
||||
'cmd.EmployeeDocumentsId': id
|
||||
}
|
||||
$.ajax({
|
||||
url: saveSubmitAjax,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
loading.hide();
|
||||
|
||||
if (response.isSuccedded) {
|
||||
|
||||
var employeeSectionDiv = $(`[data-employee-id="${employeeId}"]`);
|
||||
employeeSectionDiv.remove();
|
||||
|
||||
var employeeCountElement = $(`#EmployeeCountOfWorkshop_${workshopId}`);
|
||||
var employeeNumberOfWorkshop = Number(employeeCountElement.text().trim());
|
||||
employeeNumberOfWorkshop -= 1;
|
||||
employeeCountElement.text(employeeNumberOfWorkshop);
|
||||
|
||||
if (employeeNumberOfWorkshop === 0) {
|
||||
var mainElement = $(`#Main_${workshopId}`);
|
||||
mainElement.next(".operation-div").remove();
|
||||
mainElement.remove();
|
||||
}
|
||||
|
||||
var countDocumentsElement = $(`#CountDocumentsAwaitingUpload`);
|
||||
var countDocumentsAwaitingUpload = Number(countDocumentsElement.text().trim());
|
||||
countDocumentsAwaitingUpload -= 1;
|
||||
countDocumentsElement.text(countDocumentsAwaitingUpload);
|
||||
|
||||
updateMainWorkFlow();
|
||||
updateIndexesWorkFlow(`DocumentsAwaitingUpload_${workshopId}`);
|
||||
|
||||
_RefreshWorkFlowCountMenu();
|
||||
_RefreshCheckerCountMenu();
|
||||
|
||||
$('#MainModal').modal('hide');
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت ارسال شد.', 3500);
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
loading.hide();
|
||||
showAlertMessage('.alert-msg', 'مشکلی در ارسال تصویر به وجود آمد.', 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function cancelOP() {
|
||||
$.ajax({
|
||||
url: saveSubmitAjax,
|
||||
method: 'POST',
|
||||
data: { employeeId: employeeId, },
|
||||
headers: { 'RequestVerificationToken': antiForgeryToken },
|
||||
success: function (response) {
|
||||
loading.hide();
|
||||
$('#MainModal').modal('hide');
|
||||
|
||||
if (response.isSuccedded) {
|
||||
showAlertMessage('.alert-success-msg', 'تصویر موجود با موفقیت ارسال شد.', 3500);
|
||||
|
||||
} else {
|
||||
showAlertMessage('.alert-msg', response.message, 3500);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
loading.hide();
|
||||
showAlertMessage('.alert-msg', 'مشکلی در ارسال تصویر به وجود آمد.', 3500);
|
||||
}
|
||||
});
|
||||
}
|
||||
246
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/js/insurance.js
Normal file
246
ServiceHost/wwwroot/AssetsAdminNew/WorkFlow/js/insurance.js
Normal file
@@ -0,0 +1,246 @@
|
||||
var lengthMenu = 0;
|
||||
|
||||
$(document).ready(function () {
|
||||
loadInsuredEmployeesWithoutContract();
|
||||
loadMenuAnime();
|
||||
|
||||
$("#clickAbsentTab").click(function () {
|
||||
$('.cutWorkFlowLists, .lunchBreakWorkFlowLists, .undefinedWorkFlowLists, .overlappingLeavesLists').fadeOut(200, function () {
|
||||
$('.absentWorkFlowLists').fadeIn(200);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function loadMenuAnime() {
|
||||
var tabsNewAnim = $('#navbar-animmenu');
|
||||
var selectorNewAnim = $('#navbar-animmenu').find('li').length;
|
||||
var activeItemNewAnim = tabsNewAnim.find('.active');
|
||||
var activeHeightNewAnimHeight = activeItemNewAnim.innerHeight();
|
||||
var itemPosNewAnimTop = activeItemNewAnim.position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.active').each(function () {
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
});
|
||||
|
||||
if (lengthMenu === 1) {
|
||||
if ($('.main-navbar li').hasClass('lastRole')) {
|
||||
$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
}
|
||||
|
||||
$("#navbar-animmenu").on("click", "li", function (e) {
|
||||
if ($(this).hasClass('lastRole')) {
|
||||
//$('.verti-selector .top').addClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '25px 0 0 0');
|
||||
} else {
|
||||
//$('.verti-selector .top').removeClass('last-role');
|
||||
$('#hideCircle').css('border-radius', '0 0 0 0');
|
||||
}
|
||||
|
||||
$('#navbar-animmenu ul li').removeClass("active");
|
||||
$(this).addClass('active');
|
||||
|
||||
var activeHeightNewAnimHeight = $(this).innerHeight();
|
||||
var itemPosNewAnimTop = $(this).position();
|
||||
$(".verti-selector").css({
|
||||
"top": itemPosNewAnimTop.top + "px",
|
||||
"height": activeHeightNewAnimHeight + "px"
|
||||
});
|
||||
|
||||
$('.form-section').hide();
|
||||
$('.accountListHead').text($(this).find('a').text());
|
||||
var targetForm = $(this).data('target');
|
||||
$('#' + targetForm).show();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('click', ".openActionMain", function () {
|
||||
$('.toggle').not($(this).find('.toggle')).removeClass('open');
|
||||
|
||||
$(this).next().find(".operations-btns-main").slideToggle(500);
|
||||
$(".operations-btns-main").not($(this).next().find(".operations-btns-main")).slideUp(500);
|
||||
|
||||
$(this).find('.toggle').toggleClass('open');
|
||||
});
|
||||
|
||||
$(document).on('click', ".openAction", function () {
|
||||
if (window.matchMedia('(max-width: 768px)').matches) {
|
||||
$(this).next().find(".operations-btns").slideToggle(500);
|
||||
$(".operations-btns").not($(this).next().find(".operations-btns")).slideUp(500);
|
||||
}
|
||||
});
|
||||
|
||||
function loadInsuredEmployeesWithoutContract() {
|
||||
var mainIndexNum = 1;
|
||||
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadInsuredEmployeesWithoutContractUrl,
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
data.forEach(function (item) {
|
||||
html += `
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-flex sticky openActionMain" onclick="loadInsuredEmployeesWithoutContractByWorkshopId(${item.workshopId})" style="background: #58B3B3;border: none !important; cursor: pointer; ">
|
||||
<div class="col-2 col-md-4 text-start">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center" style="background: #deffff;margin: 0 10px 0 0;">
|
||||
${mainIndexNum++}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 col-md-4 text-center d-flex">
|
||||
<div class="col-10 text-start">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span>${item.workshopName}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 text-center">
|
||||
<div class="Rtable-cell column-heading text-center justify-content-center">
|
||||
<span class="number-of-count">${item.insuredEmployeesWithoutContractCount}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 col-md-4 text-end">
|
||||
<span class="toggle">
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 18L9 12L15 6" stroke-width="2" stroke-linecap="round" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
html += `<div class="w-100 operation-div">
|
||||
<div class="operations-btns-main workshopId_${item.workshopId}" style="padding: 1px 10px 0 10px; background: rgb(255, 255, 255); box-shadow: none;width: 100%;">
|
||||
</div></div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$('#loadInsuredEmployeesWithoutContract').html(html);
|
||||
$('#loadInsuredEmployeesWithoutContractMobile').html(html);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadInsuredEmployeesWithoutContractByWorkshopId(id) {
|
||||
var html = ``;
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: loadInsuredEmployeesWithoutContractByWorkshopIdUrl,
|
||||
data: { 'workshopId': id },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
success: function (response) {
|
||||
var data = response.data;
|
||||
if (response.success) {
|
||||
if (data.length > 0) {
|
||||
data.forEach(function (item, i) {
|
||||
html += `<div></div>
|
||||
<div class="Rtable-row align-items-center position-relative workflow-list employee-row">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--heading d-none">
|
||||
ردیف
|
||||
</div>
|
||||
<div class="Rtable-cell--content">
|
||||
<span class="d-flex justify-content-center align-items-center justify-content-center table-number">
|
||||
${i + 1}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--heading d-none">نام پرسنل</div>
|
||||
<div class="Rtable-cell--content employee-name">
|
||||
${item.employeeFullName}
|
||||
<p class="m-0 mt-2 d-block d-md-none">تاریخ پایان بیمه ${item.insuranceEndDateFa}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="Rtable-cell width3 d-none d-md-block">
|
||||
<div class="Rtable-cell--content text-center">
|
||||
<div class="d-md-none d-none">پیغام: </div>
|
||||
<div class="d-flex ms-1">تاریخ پایان بیمه ${item.insuranceEndDateFa}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="Rtable-cell position-relative width4 bg-filter d-flex justify-content-end">
|
||||
<div class="Rtable-cell--content text-center d-block d-md-flex align-items-center gap-1 h-100">
|
||||
|
||||
<button type="button" class="btn-workflow-leave">
|
||||
<span class="mx-1">مرخصی</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn-workflow-absent">
|
||||
<span class="mx-1">غیبت</span>
|
||||
</button>
|
||||
|
||||
<button class="btn-workflow-rollcall-edit position-relative" >
|
||||
<span class="mx-1">ویرایش</span>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
});
|
||||
|
||||
} else {
|
||||
html += `<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
<div class="text-center bg-white d-flex align-items-center justify-content-center w-100">
|
||||
<div class="">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
$(`.workshopId_${id}`).html(html);
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(response);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
16435
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.js
Normal file
16435
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.js
Normal file
File diff suppressed because it is too large
Load Diff
1
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.js.map
Normal file
1
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.js.map
Normal file
File diff suppressed because one or more lines are too long
282
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.sandbox.js
Normal file
282
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.sandbox.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
58571
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.worker.js
vendored
Normal file
58571
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.worker.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.worker.js.map
vendored
Normal file
1
ServiceHost/wwwroot/AssetsClient/libs/pdf/pdf.worker.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
|
||||
namespace WorkFlow.Application.Contracts.AdminWorkFlow;
|
||||
|
||||
/// <summary>
|
||||
/// پرسنل شروع به کار خورده توسط کلاینت
|
||||
/// </summary>
|
||||
public class ClientStartedWorkEmployeesWorkFlowViewModel
|
||||
{
|
||||
public long EmployeeId { get; set; }
|
||||
|
||||
public long WorkshopId { get; set; }
|
||||
|
||||
public string EmployeeName { get; set; } = string.Empty;
|
||||
|
||||
public bool HasCompleteEmployeeDocument { get; set; }
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user