Compare commits
20 Commits
FixCheckou
...
Feature/In
| Author | SHA1 | Date | |
|---|---|---|---|
| c9183fb57e | |||
| 36cdde7e6a | |||
|
|
34358a36c9 | ||
|
|
babecda188 | ||
|
|
98c3e7c821 | ||
|
|
5d91b29f2b | ||
|
|
c948498307 | ||
| 87b0d248a3 | |||
| a410d0c216 | |||
| a640f91703 | |||
|
|
99c8dcb764 | ||
| f35aca8e44 | |||
| 16d45c6dc4 | |||
| 45e746b194 | |||
|
|
d44935329f | ||
|
|
3a7fc7087b | ||
|
|
c2fc7dabc1 | ||
|
|
f04749043e | ||
|
|
e8a9a674a1 | ||
|
|
d8b6b0f5e8 |
@@ -4,12 +4,13 @@ using System.Collections.Generic;
|
||||
|
||||
namespace AccountManagement.Application.Contracts.Media
|
||||
{
|
||||
public interface IMediaApplication
|
||||
{
|
||||
MediaViewModel Get(long id);
|
||||
OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength, List<string> allowedExtensions);
|
||||
OperationResult MoveFile(long mediaId, string newRelativePath);
|
||||
OperationResult DeleteFile(long mediaId);
|
||||
List<MediaViewModel> GetRange(IEnumerable<long> select);
|
||||
}
|
||||
}
|
||||
public interface IMediaApplication
|
||||
{
|
||||
MediaViewModel Get(long id);
|
||||
OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength,
|
||||
List<string> allowedExtensions, string category);
|
||||
OperationResult MoveFile(long mediaId, string newRelativePath);
|
||||
OperationResult DeleteFile(long mediaId);
|
||||
List<MediaViewModel> GetRange(IEnumerable<long> select);
|
||||
}
|
||||
}
|
||||
@@ -9,147 +9,113 @@ using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace AccountManagement.Application
|
||||
{
|
||||
public class MediaApplication:IMediaApplication
|
||||
{
|
||||
public class MediaApplication : IMediaApplication
|
||||
{
|
||||
|
||||
|
||||
private const string _basePath = "Medias";
|
||||
private readonly IMediaRepository _mediaRepository;
|
||||
private const string _basePath = "Medias";
|
||||
private readonly IMediaRepository _mediaRepository;
|
||||
|
||||
public MediaApplication(IMediaRepository mediaRepository)
|
||||
{
|
||||
_mediaRepository = mediaRepository;
|
||||
}
|
||||
public MediaApplication(IMediaRepository mediaRepository)
|
||||
{
|
||||
_mediaRepository = mediaRepository;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت فایل و نوشتن آن در مسیر داده شده، و ثبت مدیا
|
||||
/// </summary>
|
||||
/// <param name="file">فایل</param>
|
||||
/// <param name="fileLabel">برچسب فایل که در نام فایل ظاهر می شود</param>
|
||||
/// <param name="relativePath">مسیر فایل</param>
|
||||
/// <param name="allowedExtensions">[.png,.jpg,.jpeg] پسوند های مجاز مثلا </param>
|
||||
/// <param name="maximumFileLength">حداکثر حجم فایل به مگابایت</param>
|
||||
/// <returns></returns>
|
||||
public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath,int maximumFileLength,List<string> allowedExtensions)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var path = Path.Combine(_basePath, relativePath);
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
|
||||
if (file == null || file.Length == 0)
|
||||
return op.Failed("خطای سیستمی");
|
||||
|
||||
if (file.Length > (maximumFileLength * 1024 * 1024))
|
||||
return op.Failed($"حجم فایل نمی تواند بیشتر از " +
|
||||
$"{maximumFileLength}" +
|
||||
$"مگابایت باشد");
|
||||
|
||||
if (!allowedExtensions.Contains(fileExtension.ToLower()))
|
||||
{
|
||||
var operationMessage = ":فرمت فایل باید یکی از موارد زیر باشد";
|
||||
operationMessage += "\n";
|
||||
operationMessage += string.Join(" ", allowedExtensions);
|
||||
return op.Failed(operationMessage);
|
||||
}
|
||||
/// <summary>
|
||||
/// دریافت فایل و نوشتن آن در مسیر داده شده، و ثبت مدیا
|
||||
/// </summary>
|
||||
/// <param name="file">فایل</param>
|
||||
/// <param name="fileLabel">برچسب فایل که در نام فایل ظاهر می شود</param>
|
||||
/// <param name="relativePath">مسیر فایل</param>
|
||||
/// <param name="maximumFileLength">حداکثر حجم فایل به مگابایت</param>
|
||||
/// <param name="allowedExtensions">[.png,.jpg,.jpeg] پسوند های مجاز مثلا </param>
|
||||
/// <param name="category"></param>
|
||||
/// <returns></returns>
|
||||
public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength,
|
||||
List<string> allowedExtensions, string category)
|
||||
{
|
||||
return _mediaRepository.UploadFile(file, fileLabel, relativePath, maximumFileLength, allowedExtensions, category);
|
||||
}
|
||||
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
/// <summary>
|
||||
/// حذف فایل
|
||||
/// </summary>
|
||||
public OperationResult DeleteFile(long mediaId)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
if (media == null)
|
||||
return op.Failed("رکورد مورد نظر یافت نشد");
|
||||
try
|
||||
{
|
||||
if (File.Exists(media.Path))
|
||||
File.Delete(media.Path);
|
||||
else
|
||||
return op.Failed("فایل یافت نشد");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return op.Failed("خطایی در حذف فایل رخ داده است");
|
||||
}
|
||||
|
||||
var extension = Path.GetExtension(file.FileName);
|
||||
_mediaRepository.Remove(media.id);
|
||||
_mediaRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
var uniqueFileName = $"{fileLabel}-{DateTime.Now.Ticks}{extension}";
|
||||
var filePath = Path.Combine(path, uniqueFileName);
|
||||
using (var fileStream = new FileStream(filePath, FileMode.CreateNew))
|
||||
{
|
||||
file.CopyTo(fileStream);
|
||||
}
|
||||
var mediaEntity = new Media(filePath, extension, "فایل", "EmployeeDocuments");
|
||||
_mediaRepository.Create(mediaEntity);
|
||||
_mediaRepository.SaveChanges();
|
||||
/// <summary>
|
||||
/// جابجا کردن فایل
|
||||
/// </summary>
|
||||
public OperationResult MoveFile(long mediaId, string newRelativePath)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine(_basePath, newRelativePath);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
return op.Succcedded(mediaEntity.id);
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
try
|
||||
{
|
||||
File.Move(oldPath, filepath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return op.Failed("در جابجایی فایل خطایی رخ داده است");
|
||||
}
|
||||
|
||||
}
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
_mediaRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public MediaViewModel Get(long id)
|
||||
{
|
||||
var media = _mediaRepository.Get(id);
|
||||
if (media == null)
|
||||
return new();
|
||||
return new MediaViewModel()
|
||||
{
|
||||
Category = media.Category,
|
||||
Path = media.Path,
|
||||
Id = media.id,
|
||||
Type = media.Type
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// حذف فایل
|
||||
/// </summary>
|
||||
public OperationResult DeleteFile(long mediaId)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
if (media == null)
|
||||
return op.Failed("رکورد مورد نظر یافت نشد");
|
||||
try
|
||||
{
|
||||
if (File.Exists(media.Path))
|
||||
File.Delete(media.Path);
|
||||
else
|
||||
return op.Failed("فایل یافت نشد");
|
||||
}
|
||||
catch
|
||||
{
|
||||
return op.Failed("خطایی در حذف فایل رخ داده است");
|
||||
}
|
||||
public List<MediaViewModel> GetRange(IEnumerable<long> ids)
|
||||
{
|
||||
var medias = _mediaRepository.GetRange(ids);
|
||||
return medias.Select(x => new MediaViewModel()
|
||||
{
|
||||
Category = x.Category,
|
||||
Path = x.Path,
|
||||
Id = x.id,
|
||||
Type = x.Type,
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
_mediaRepository.Remove(media.id);
|
||||
_mediaRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// جابجا کردن فایل
|
||||
/// </summary>
|
||||
public OperationResult MoveFile(long mediaId, string newRelativePath)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var media = _mediaRepository.Get(mediaId);
|
||||
var oldPath = media.Path;
|
||||
var path = Path.Combine(_basePath, newRelativePath);
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
string filepath = Path.Combine(path, Path.GetFileName(oldPath));
|
||||
try
|
||||
{
|
||||
File.Move(oldPath, filepath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return op.Failed("در جابجایی فایل خطایی رخ داده است");
|
||||
}
|
||||
|
||||
media.Edit(filepath, media.Type, media.Category);
|
||||
_mediaRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public MediaViewModel Get(long id)
|
||||
{
|
||||
var media = _mediaRepository.Get(id);
|
||||
if (media == null)
|
||||
return new();
|
||||
return new MediaViewModel()
|
||||
{
|
||||
Category = media.Category,
|
||||
Path = media.Path,
|
||||
Id = media.id,
|
||||
Type = media.Type
|
||||
};
|
||||
}
|
||||
|
||||
public List<MediaViewModel> GetRange(IEnumerable<long> ids)
|
||||
{
|
||||
var medias = _mediaRepository.GetRange(ids);
|
||||
return medias.Select(x=>new MediaViewModel()
|
||||
{
|
||||
Category = x.Category,
|
||||
Path = x.Path,
|
||||
Id = x.id,
|
||||
Type = x.Type,
|
||||
}).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using AccountManagement.Application.Contracts.Media;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
|
||||
namespace AccountManagement.Domain.MediaAgg;
|
||||
|
||||
public interface IMediaRepository:IRepository<long,Media>
|
||||
public interface IMediaRepository : IRepository<long, Media>
|
||||
{
|
||||
public string BasePath { get; protected set; }
|
||||
void CreateMediaWithTaskMedia(long taskId, long mediaId);
|
||||
List<MediaViewModel> GetMediaByTaskId(long taskId);
|
||||
void Remove(long id);
|
||||
@@ -23,4 +26,6 @@ public interface IMediaRepository:IRepository<long,Media>
|
||||
|
||||
#endregion
|
||||
|
||||
OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength,
|
||||
List<string> allowedExtensions, string category);
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountManagement.Application.Contracts.Media;
|
||||
using AccountManagement.Domain.AdminResponseMediaAgg;
|
||||
@@ -7,27 +10,35 @@ using AccountManagement.Domain.ClientResponseMediaAgg;
|
||||
using AccountManagement.Domain.MediaAgg;
|
||||
using AccountManagement.Domain.TaskMediaAgg;
|
||||
using AccountManagement.Domain.TicketMediasAgg;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace AccountMangement.Infrastructure.EFCore.Repository;
|
||||
|
||||
public class MediaRepository:RepositoryBase<long,Media>,IMediaRepository
|
||||
public class MediaRepository : RepositoryBase<long, Media>, IMediaRepository
|
||||
{
|
||||
private const string _basePath = "Storage/Medias";
|
||||
public string BasePath { get; set; }
|
||||
|
||||
|
||||
private readonly AccountContext _accountContext;
|
||||
public MediaRepository( AccountContext taskManagerContext) : base(taskManagerContext)
|
||||
public MediaRepository(AccountContext taskManagerContext, IWebHostEnvironment webHostEnvironment) : base(taskManagerContext)
|
||||
{
|
||||
_accountContext = taskManagerContext;
|
||||
BasePath = webHostEnvironment.ContentRootPath + "/Storage";
|
||||
}
|
||||
//ساخت جدول واسط بین مدیا و نسک
|
||||
//نکته: این متد ذخیره انجام نمیدهد
|
||||
|
||||
public void CreateMediaWithTaskMedia(long taskId, long mediaId)
|
||||
{
|
||||
var Taskmedias = new TaskMedia(taskId,mediaId);
|
||||
var Taskmedias = new TaskMedia(taskId, mediaId);
|
||||
_accountContext.Add(Taskmedias);
|
||||
}
|
||||
public void Remove(long id)
|
||||
{
|
||||
var media = Get(id);
|
||||
var media = Get(id);
|
||||
Remove(media);
|
||||
}
|
||||
|
||||
@@ -77,6 +88,48 @@ public class MediaRepository:RepositoryBase<long,Media>,IMediaRepository
|
||||
{
|
||||
return _accountContext.Medias.Where(x => mediaIds.Contains(x.id)).ToList();
|
||||
}
|
||||
|
||||
public OperationResult UploadFile(IFormFile file, string fileLabel, string relativePath, int maximumFileLength,
|
||||
List<string> allowedExtensions, string category)
|
||||
{
|
||||
OperationResult op = new();
|
||||
var path = Path.Combine(_basePath, relativePath);
|
||||
var fileExtension = Path.GetExtension(file.FileName);
|
||||
|
||||
if (file == null || file.Length == 0)
|
||||
return op.Failed("خطای سیستمی");
|
||||
|
||||
if (file.Length > (maximumFileLength * 1024 * 1024))
|
||||
return op.Failed($"حجم فایل نمی تواند بیشتر از " +
|
||||
$"{maximumFileLength}" +
|
||||
$"مگابایت باشد");
|
||||
|
||||
if (!allowedExtensions.Contains(fileExtension.ToLower()))
|
||||
{
|
||||
var operationMessage = ":فرمت فایل باید یکی از موارد زیر باشد";
|
||||
operationMessage += "\n";
|
||||
operationMessage += string.Join(" ", allowedExtensions);
|
||||
return op.Failed(operationMessage);
|
||||
}
|
||||
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var extension = Path.GetExtension(file.FileName);
|
||||
|
||||
var uniqueFileName = $"{fileLabel}-{DateTime.Now.Ticks}{extension}";
|
||||
var filePath = Path.Combine(path, uniqueFileName);
|
||||
using (var fileStream = new FileStream(filePath, FileMode.CreateNew))
|
||||
{
|
||||
file.CopyTo(fileStream);
|
||||
}
|
||||
var mediaEntity = new Media(filePath, extension, "فایل", category);
|
||||
Create(mediaEntity);
|
||||
SaveChanges();
|
||||
|
||||
return op.Succcedded(mediaEntity.id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -60,4 +60,13 @@ public interface IInsuranceListRepository:IRepository<long, InsuranceList>
|
||||
#region client
|
||||
List<InsuranceListViewModel> SearchForClient(InsuranceListSearchModel searchModel);
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region Mahan
|
||||
Task<InsuranceListConfirmOperation> GetInsuranceOperationDetails(long id);
|
||||
|
||||
Task<InsuranceListTabsCountViewModel> GetTabCounts(long accountId,int month,int year);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,9 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Domain;
|
||||
using Company.Domain.InsuranceListAgg.ValueObjects;
|
||||
using Company.Domain.InsuranceWorkshopAgg;
|
||||
using CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
namespace Company.Domain.InsuranceListAgg;
|
||||
|
||||
@@ -151,6 +153,21 @@ public class InsuranceList : EntityBase
|
||||
/// </summary>
|
||||
public double SumOfMarriedAllowance { get; private set; }
|
||||
|
||||
#region Mahan
|
||||
/// <summary>
|
||||
/// بازرسی
|
||||
/// </summary>
|
||||
public InsuranceListInspection Inspection { get; set; } =new (InsuranceListInspectionType.None,DateTime.MinValue, 0);
|
||||
/// <summary>
|
||||
/// بدهی
|
||||
/// </summary>
|
||||
public InsuranceListDebt Debt { get; set; } = new(InsuranceListDebtType.None, DateTime.MinValue, 0, 0);
|
||||
/// <summary>
|
||||
/// تاییدیه کارفرما
|
||||
/// </summary>
|
||||
public InsuranceListEmployerApproval EmployerApproval { get; set; } = new(InsuranceListEmployerApprovalStatus.None, string.Empty);
|
||||
#endregion
|
||||
|
||||
public List<InsuranceListWorkshop> InsuranceListWorkshops { get; set; }
|
||||
|
||||
public void Edit(int sumOfEmployees, int sumOfWorkingDays, double sumOfSalaries, double sumOfBenefitsIncluded, double included,
|
||||
@@ -174,4 +191,22 @@ public class InsuranceList : EntityBase
|
||||
SumOfDailyWagePlusBaseYears = sumOfDailyWage + sumOfBaseYears;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void SetDebt(InsuranceListDebt debt)
|
||||
{
|
||||
Debt = debt;
|
||||
}
|
||||
public void SetInspection(InsuranceListInspection inspection)
|
||||
{
|
||||
Inspection = inspection;
|
||||
}
|
||||
public void SetEmployerApproval(InsuranceListEmployerApproval employerApproval)
|
||||
{
|
||||
EmployerApproval = employerApproval;
|
||||
}
|
||||
public void SetConfirmSentlist(bool confirmSentlist)
|
||||
{
|
||||
ConfirmSentlist = confirmSentlist;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
namespace Company.Domain.InsuranceListAgg.ValueObjects;
|
||||
|
||||
public class InsuranceListDebt
|
||||
{
|
||||
public InsuranceListDebt(InsuranceListDebtType type, DateTime debtDate, double amount, long mediaId)
|
||||
{
|
||||
Type = type;
|
||||
if (type == InsuranceListDebtType.None)
|
||||
{
|
||||
DebtDate = DateTime.MinValue;
|
||||
Amount = 0;
|
||||
MediaId = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
DebtDate = debtDate;
|
||||
Amount = amount;
|
||||
MediaId = mediaId;
|
||||
IsDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
public InsuranceListDebtType Type { get; set; }
|
||||
public DateTime DebtDate { get; set; }
|
||||
public double Amount { get; set; }
|
||||
public long MediaId { get; set; }
|
||||
public bool IsDone { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Security.Cryptography;
|
||||
using CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
namespace Company.Domain.InsuranceListAgg.ValueObjects;
|
||||
|
||||
public class InsuranceListEmployerApproval
|
||||
{
|
||||
public InsuranceListEmployerApproval(InsuranceListEmployerApprovalStatus status, string description)
|
||||
{
|
||||
Status = status;
|
||||
if (status == InsuranceListEmployerApprovalStatus.None)
|
||||
{
|
||||
Description = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Description = description;
|
||||
IsDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
public InsuranceListEmployerApprovalStatus Status { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsDone { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
namespace Company.Domain.InsuranceListAgg.ValueObjects;
|
||||
|
||||
public class InsuranceListInspection
|
||||
{
|
||||
public InsuranceListInspection(InsuranceListInspectionType type, DateTime lastInspectionDateTime, long mediaId)
|
||||
{
|
||||
Type = type;
|
||||
if (type == InsuranceListInspectionType.None)
|
||||
{
|
||||
LastInspectionDateTime = DateTime.MinValue;
|
||||
MediaId = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
LastInspectionDateTime = lastInspectionDateTime;
|
||||
MediaId = mediaId;
|
||||
IsDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
public InsuranceListInspectionType Type { get; set; }
|
||||
public DateTime LastInspectionDateTime { get; set; }
|
||||
public long MediaId { get; set; }
|
||||
public bool IsDone { get; set; }
|
||||
|
||||
}
|
||||
@@ -132,6 +132,8 @@ public class CheckoutViewModel
|
||||
/// مدت مرخصی استحقاقی
|
||||
/// </summary>
|
||||
public string TotalPaidLeave { get; set; }
|
||||
|
||||
public TimeSpan TotalHourlyLeave { get; set; }
|
||||
public List<CheckoutDailyRollCallViewModel> MonthlyRollCall { get; set; }
|
||||
public List<LoanInstallmentViewModel> InstallmentViewModels { get; set; }
|
||||
public List<SalaryAidViewModel> SalaryAidViewModels { get; set; }
|
||||
|
||||
@@ -14,9 +14,6 @@ public class EditInsuranceList:CreateInsuranceList
|
||||
public bool FixedSalary { get; set; }
|
||||
public string Population { get; set; }
|
||||
public long? InsuranceJobId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پرسنل هایی که قرارداد ترک کار کرده اند ولی ترک کار بیمه ندارند
|
||||
/// </summary>
|
||||
public List<LeftWorkViewModel> LeftWorkEmployees { get; set; }
|
||||
|
||||
}
|
||||
@@ -298,4 +298,6 @@ public class EmployeeDetailsForInsuranceListViewModel
|
||||
///// DSK_SPOUSE
|
||||
///// </summary>
|
||||
//public double SumOfMarriedAllowance { get; set; }
|
||||
public string Month { get; set; }
|
||||
public string Year { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
public enum InsuranceListDebtType
|
||||
{
|
||||
None,
|
||||
Old,
|
||||
New
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
public enum InsuranceListEmployerApprovalStatus
|
||||
{
|
||||
None,
|
||||
/// <summary>
|
||||
/// تاییدیه شفاهی (اذنی)
|
||||
/// </summary>
|
||||
VerbalApproval,
|
||||
/// <summary>
|
||||
/// تاییدیه کاغذی
|
||||
/// </summary>
|
||||
WrittenApproval
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
|
||||
public enum InsuranceListInspectionType
|
||||
{
|
||||
None,
|
||||
Old,
|
||||
New
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList;
|
||||
|
||||
@@ -17,9 +18,9 @@ public interface IInsuranceListApplication
|
||||
MainEmployeeDetailsViewModel SearchEmployeeForCreateInsuranceList(EmployeeForCreateInsuranceListSearchModel searchModel);
|
||||
|
||||
double MarriedAllowance(string maritalStatus, long jobId, bool includedStatus,
|
||||
int countWorkingDays, double marriedAlowance, int endMonthCurrentDay);
|
||||
int countWorkingDays, double marriedAlowance, int endMonthCurrentDay);
|
||||
|
||||
OperationResult CreateEmployeeDetailsInfo(EmployeeDetailsForInsuranceListViewModel command);
|
||||
OperationResult CreateEmployeeDetailsInfo(EmployeeDetailsForInsuranceListViewModel command);
|
||||
OperationResult EditEmployeeDetailsInfo(EmployeeDetailsForInsuranceListViewModel command);
|
||||
OperationResult Remove(long id);
|
||||
EditInsuranceList GetDetailsForEdit(long id);
|
||||
@@ -34,4 +35,16 @@ public interface IInsuranceListApplication
|
||||
//farokhiChanges
|
||||
(double basic, int totalYear) BasicYear(long employeeId, long worshopId, DateTime startDate);
|
||||
double GetMonthlyBaseYear(double dayliBase, int countWorkingDays);
|
||||
|
||||
#region Mahan
|
||||
/// <summary>
|
||||
/// مراحل اجرایی برای تکمیل و ارسال لیست بیمه
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> ConfirmInsuranceOperation(InsuranceListConfirmOperation command);
|
||||
Task<InsuranceListConfirmOperation> GetInsuranceOperationDetails(long id);
|
||||
|
||||
Task<InsuranceListTabsCountViewModel> GetTabCounts(long accountId, int month, int year);
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using CompanyManagment.App.Contracts.InsuranceList.Enums;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList;
|
||||
|
||||
public class InsuranceListConfirmOperation
|
||||
{
|
||||
public long InsuranceListId { get; set; }
|
||||
/// <summary>
|
||||
/// بازرسی
|
||||
/// </summary>
|
||||
public CreateInsuranceListInspection Inspection { get; set; }
|
||||
/// <summary>
|
||||
/// بدهی
|
||||
/// </summary>
|
||||
public CreateInsuranceListDebt Debt { get; set; }
|
||||
/// <summary>
|
||||
/// تاییدیه کارفرما
|
||||
/// </summary>
|
||||
public CreateInsuranceListApproval Approval { get; set; }
|
||||
public bool ConfirmSentList { get; set; }
|
||||
}
|
||||
public class CreateInsuranceListApproval
|
||||
{
|
||||
public InsuranceListEmployerApprovalStatus ApprovalStatus { get; set; }
|
||||
public string Description { get; set; }
|
||||
}
|
||||
|
||||
public class CreateInsuranceListDebt
|
||||
{
|
||||
public InsuranceListDebtType Type { get; set; }
|
||||
public string DebtDate { get; set; }
|
||||
public string Amount { get; set; }
|
||||
public IFormFile DebtFile { get; set; }
|
||||
public long DebtFileMediaId { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
}
|
||||
|
||||
public class CreateInsuranceListInspection
|
||||
{
|
||||
public InsuranceListInspectionType Type { get; set; }
|
||||
public string LastInspectionDate { get; set; }
|
||||
public IFormFile InspectionFile { get; set; }
|
||||
public long InspectionFileMediaId { get; set; }
|
||||
public string FilePath { get; set; }
|
||||
|
||||
|
||||
}
|
||||
@@ -25,4 +25,29 @@ public class InsuranceListSearchModel
|
||||
public int PageIndex { get; set; }
|
||||
|
||||
public bool SearchAll { get; set; }
|
||||
|
||||
public InsuranceListSearchStatus Status { get; set; }
|
||||
}
|
||||
|
||||
public enum InsuranceListSearchStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// انجام نشده
|
||||
/// </summary>
|
||||
NotStarted = 0,
|
||||
|
||||
/// <summary>
|
||||
/// در حال انجام امور
|
||||
/// </summary>
|
||||
InProgress = 1,
|
||||
|
||||
/// <summary>
|
||||
/// آماده ارسال لیست
|
||||
/// </summary>
|
||||
ReadyToSendList = 2,
|
||||
|
||||
/// <summary>
|
||||
/// انجام بیمه
|
||||
/// </summary>
|
||||
Done = 3
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace CompanyManagment.App.Contracts.InsuranceList;
|
||||
|
||||
public class InsuranceListTabsCountViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// انجام نشده
|
||||
/// </summary>
|
||||
public int NotStarted { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// در حال انجام امور
|
||||
/// </summary>
|
||||
public int InProgress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آماده ارسال لیست
|
||||
/// </summary>
|
||||
public int ReadyToSendList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// انجام بیمه
|
||||
/// </summary>
|
||||
public int Done { get; set; }
|
||||
}
|
||||
@@ -27,4 +27,11 @@ public class InsuranceListViewModel
|
||||
public long WorkShopId { get; set; }
|
||||
public string IsBlockCantracingParty { get; set; }
|
||||
public long EmployerId { get; set; }
|
||||
|
||||
/// <summary>وضعیت بازرسی</summary>
|
||||
public bool InspectionDone { get; set; }
|
||||
/// <summary>وضعیت بدهی</summary>
|
||||
public bool DebtDone { get; set; }
|
||||
/// <summary>وضعیت تاییدیه کارفرما</summary>
|
||||
public bool EmployerApproved { get; set; }
|
||||
}
|
||||
@@ -25,4 +25,5 @@ public interface IYearlySalaryApplication
|
||||
InsuranceYearlySalaryModel GetInsuranceItems(DateTime startDate, DateTime endDate, string year);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -48,9 +48,9 @@ public class AndroidApkVersionApplication : IAndroidApkVersionApplication
|
||||
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
|
||||
//var apk = new ApkReader.ApkReader().Read(file.OpenReadStream());
|
||||
|
||||
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}.v{apk.VersionName}{Path.GetExtension(file.FileName)}";
|
||||
string uniqueFileName = $"{Path.GetFileNameWithoutExtension(file.FileName)}{Path.GetExtension(file.FileName)}";
|
||||
|
||||
|
||||
string filepath = Path.Combine(path, uniqueFileName);
|
||||
@@ -60,7 +60,7 @@ public class AndroidApkVersionApplication : IAndroidApkVersionApplication
|
||||
await file.CopyToAsync(stream);
|
||||
}
|
||||
|
||||
var entity = new AndroidApkVersion(apk.VersionName, apk.VersionCode, IsActive.True, filepath);
|
||||
var entity = new AndroidApkVersion("0", "0", IsActive.True, filepath);
|
||||
_androidApkVersionRepository.Create(entity);
|
||||
_androidApkVersionRepository.SaveChanges();
|
||||
return op.Succcedded();
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace CompanyManagment.Application
|
||||
if(command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length >0 )
|
||||
{
|
||||
var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName,
|
||||
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"]);
|
||||
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"], "Bank");
|
||||
if (uploadResult.IsSuccedded == false)
|
||||
return uploadResult;
|
||||
mediaId = uploadResult.SendId;
|
||||
@@ -81,7 +81,7 @@ namespace CompanyManagment.Application
|
||||
if (command.BankLogoPictureFile != null && command.BankLogoPictureFile.Length > 0)
|
||||
{
|
||||
var uploadResult = _mediaApplication.UploadFile(command.BankLogoPictureFile, command.BankName,
|
||||
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"]);
|
||||
_basePath, 10, [".jpg", ".jpeg", ".png",".svg"], "Bank");
|
||||
if (uploadResult.IsSuccedded == false)
|
||||
return uploadResult;
|
||||
_mediaApplication.DeleteFile(entity.BankLogoMediaId);
|
||||
|
||||
@@ -19,490 +19,505 @@ namespace CompanyManagment.Application;
|
||||
|
||||
public class CheckoutApplication : ICheckoutApplication
|
||||
{
|
||||
private readonly ICheckoutRepository _checkoutRepository;
|
||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||
private readonly ILeftWorkRepository _leftWorkRepository;
|
||||
private readonly IEmployerRepository _employerRepository;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly ILeaveApplication _leaveApplication;
|
||||
private readonly IMandatoryHoursApplication _mandatoryHoursApplication;
|
||||
private readonly IRollCallMandatoryRepository _rollCallMandatoryRepository;
|
||||
|
||||
|
||||
public CheckoutApplication(ICheckoutRepository checkoutRepository, IYearlySalaryRepository yearlySalaryRepository,
|
||||
ILeftWorkRepository leftWorkRepository,
|
||||
IEmployerRepository employerRepository, IPersonalContractingPartyApp contractingPartyApp, ILeaveApplication leaveApplication, IMandatoryHoursApplication mandatoryHoursApplication, IRollCallMandatoryRepository rollCallMandatoryRepository)
|
||||
{
|
||||
_checkoutRepository = checkoutRepository;
|
||||
_yearlySalaryRepository = yearlySalaryRepository;
|
||||
_leftWorkRepository = leftWorkRepository;
|
||||
_employerRepository = employerRepository;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_leaveApplication = leaveApplication;
|
||||
_mandatoryHoursApplication = mandatoryHoursApplication;
|
||||
_rollCallMandatoryRepository = rollCallMandatoryRepository;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper.DPA", "DPA0007: Large number of DB records", MessageId = "count: 241")]
|
||||
public void Create(CreateCheckout command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
var syear = Convert.ToInt32(command.ContractStart.Substring(0, 4));
|
||||
var smonth = Convert.ToInt32(command.ContractStart.Substring(5, 2));
|
||||
string month = string.Empty;
|
||||
switch (smonth)
|
||||
{
|
||||
case 1:
|
||||
month = "فروردین";
|
||||
break;
|
||||
case 2:
|
||||
month = "اردیبهشت";
|
||||
break;
|
||||
case 3:
|
||||
month = "خرداد";
|
||||
break;
|
||||
case 4:
|
||||
month = "تیر";
|
||||
break;
|
||||
case 5:
|
||||
month = "مرداد";
|
||||
break;
|
||||
case 6:
|
||||
month = "شهریور";
|
||||
break;
|
||||
case 7:
|
||||
month = "مهر";
|
||||
break;
|
||||
case 8:
|
||||
month = "آبان";
|
||||
break;
|
||||
case 9:
|
||||
month = "آذر";
|
||||
break;
|
||||
case 10:
|
||||
month = "دی";
|
||||
break;
|
||||
case 11:
|
||||
month = "بهمن";
|
||||
break;
|
||||
case 12:
|
||||
month = "اسفند";
|
||||
break;
|
||||
}
|
||||
var year = syear.ToString();
|
||||
|
||||
#region SickLeav
|
||||
|
||||
//var serachModel = new LeaveSearchModel()
|
||||
//{
|
||||
// EmployeeId = command.EmployeeId,
|
||||
// WorkshopId = command.WorkshopId,
|
||||
// LeaveType = "استعلاجی",
|
||||
// StartLeave = command.ContractStart,
|
||||
// EndLeave = command.ContractEnd,
|
||||
// IsAccepted = true,
|
||||
//};
|
||||
//var leavList = _leaveApplication.search(serachModel);
|
||||
// int sickLeaveCount = 0;
|
||||
//if (leavList.Count > 0)
|
||||
//{
|
||||
|
||||
// foreach (var leave in leavList)
|
||||
// {
|
||||
// if (leave.StartLeaveGr < command.ContractStartGr && leave.EndLeaveGr <= command.ContractEndGr)
|
||||
// {
|
||||
// int res = (int)((leave.EndLeaveGr - command.ContractStartGr).TotalDays +1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
// else if (leave.StartLeaveGr >= command.ContractStartGr && leave.EndLeaveGr > command.ContractEndGr)
|
||||
// {
|
||||
// int res = (int)((command.ContractEndGr - leave.StartLeaveGr).TotalDays + 1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int res = (int)((leave.EndLeaveGr - leave.StartLeaveGr).TotalDays + 1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
var dayliWage = command.DayliWage.MoneyToDouble();
|
||||
// کمک هزینه اقلام
|
||||
var consumableItem = command.ConsumableItems.MoneyToDouble();
|
||||
//حق اولاد
|
||||
var familyAllowance = command.FamilyAllowance.MoneyToDouble();
|
||||
//کمک هزینه مسکن
|
||||
var housingAllowance = command.HousingAllowance.MoneyToDouble();
|
||||
//حق تاهل
|
||||
var marriedAllowance = command.MarriedAllowance.MoneyToDouble();
|
||||
var MontlyYearsBunos =
|
||||
_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
var monthlyWage = MontlyYearsBunos.MontlyWage;
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//عیدی و پاداش
|
||||
var bunos = command.BonusesPay;
|
||||
//پایه سنوات
|
||||
var bacicYears = MontlyYearsBunos.BasicYears;
|
||||
var sumOfWorkingDays = MontlyYearsBunos.SumOfWorkingDay;
|
||||
if (command.friday > 0)
|
||||
{
|
||||
var fridayPercent = dayliWage * 40 / 100;
|
||||
//فوق العاده جمعه کاری
|
||||
command.FridayPay = fridayPercent * command.friday;
|
||||
}
|
||||
//حق بیمه سهم کارگر
|
||||
var insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance) * 7 / 100;
|
||||
|
||||
if (command.OvertimePay > 0 && command.AbsenceDeduction > 0)
|
||||
{
|
||||
if (command.AbsenceDeduction >= command.OvertimePay)
|
||||
{
|
||||
command.AbsenceDeduction = command.AbsenceDeduction - command.OvertimePay;
|
||||
command.OvertimePay = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
command.OvertimePay = command.OvertimePay - command.AbsenceDeduction;
|
||||
command.AbsenceDeduction = 0;
|
||||
}
|
||||
|
||||
}
|
||||
var checkoutStart = $"{command.Year}/{command.Month}/01";
|
||||
var checkoutEnd = checkoutStart.FindeEndOfMonth();
|
||||
var salaryAids =
|
||||
_rollCallMandatoryRepository.SalaryAidsForCheckout(command.EmployeeId, command.WorkshopId, checkoutStart.ToGeorgianDateTime(), checkoutEnd.ToGeorgianDateTime())
|
||||
.Select(x => new CheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa, x.CalculationDateTimeGe, x.CalculationDateTimeFa, x.Id)).ToList();
|
||||
|
||||
command.SalaryAidDeduction = salaryAids.Sum(x => x.Amount.MoneyToDouble());
|
||||
|
||||
|
||||
var loanInstallments = _rollCallMandatoryRepository.LoanInstallmentForCheckout(command.EmployeeId,
|
||||
command.WorkshopId, command.ContractStartGr, command.ContractEndGr)
|
||||
.Select(x => new CheckoutLoanInstallment(x.Amount, x.Month, x.Year, x.IsActive, x.RemainingAmount, x.LoanAmount, x.Id)).ToList();
|
||||
|
||||
command.InstallmentDeduction = loanInstallments.Sum(x => x.AmountForMonth.MoneyToDouble());
|
||||
|
||||
|
||||
var totalClaimsDouble = monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance + command.OvertimePay +
|
||||
command.NightworkPay + familyAllowance + bunos + years + command.LeavePay + command.FridayPay + command.ShiftPay;
|
||||
var totalClaims = totalClaimsDouble.ToMoney();
|
||||
var totalDeductionDouble = insuranceDeduction + command.AbsenceDeduction + command.InstallmentDeduction + command.SalaryAidDeduction;
|
||||
var totalDeductions = totalDeductionDouble.ToMoney();
|
||||
var totalPayment = totalClaimsDouble - totalDeductionDouble;
|
||||
|
||||
if (_checkoutRepository.Exists(x =>
|
||||
x.Month == command.Month && x.Year == command.Year && x.ContractNo == command.ContractNo))
|
||||
{
|
||||
operation.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(command.Signature))
|
||||
{
|
||||
command.Signature = "0";
|
||||
}
|
||||
|
||||
|
||||
|
||||
var checkout = new Checkout(command.EmployeeFullName, command.FathersName, command.NationalCode
|
||||
, command.DateOfBirth, command.EmployeeId, command.WorkshopName, command.WorkshopId, command.ContractNo, command.ContractStartGr, command.ContractEndGr, month, year,
|
||||
command.ContractId, command.WorkingHoursId, monthlyWage, bacicYears, consumableItem, housingAllowance
|
||||
, command.OvertimePay, command.NightworkPay, command.FridayPay, 0, command.ShiftPay, familyAllowance, bunos, years, command.LeavePay, insuranceDeduction, 0, command.InstallmentDeduction, command.SalaryAidDeduction, command.AbsenceDeduction, sumOfWorkingDays,
|
||||
command.ArchiveCode, command.PersonnelCode, totalClaims, totalDeductions, totalPayment, command.Signature, marriedAllowance, command.LeaveCheckout, command.CreditLeaves, command.AbsencePeriod, command.AverageHoursPerDay, command.HasRollCall, command.OverTimeWorkValue, command.OverNightWorkValue
|
||||
, command.FridayWorkValue, command.RotatingShiftValue, command.AbsenceValue, command.TotalDayOfLeaveCompute, command.TotalDayOfYearsCompute, command.TotalDayOfBunosesCompute, loanInstallments, salaryAids);
|
||||
_checkoutRepository.CreateCkeckout(checkout).GetAwaiter().GetResult();
|
||||
//_checkoutRepository.SaveChanges();
|
||||
|
||||
//var employeeFullName = new SqlParameter("@EmployeeFullName", SqlDbType.NVarChar, 50);
|
||||
//employeeFullName.Value = command.EmployeeFullName;
|
||||
//var fathersName = new SqlParameter("@FathersName", SqlDbType.NVarChar, 20);
|
||||
//fathersName.Value = command.EmployeeFullName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public OperationResult Edit(EditCheckout command)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public EditCheckout GetDetails(long id)
|
||||
{
|
||||
return _checkoutRepository.GetDetails(id);
|
||||
}
|
||||
|
||||
public async Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
|
||||
string contractStart, string contractEnd)
|
||||
{
|
||||
return await _checkoutRepository.GetContractResultToCreateCheckout(workshopId, employeeId, year, month, contractStart,
|
||||
contractEnd);
|
||||
|
||||
}
|
||||
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
||||
{
|
||||
var result = new List<CheckoutViewModel>();
|
||||
var query = await _checkoutRepository.SearchForMainCheckout(searchModel);
|
||||
query = query.Select(x => new CheckoutViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
ContractStart = x.ContractStart,
|
||||
ContractEnd = x.ContractEnd,
|
||||
ContractStartGr = x.ContractStartGr,
|
||||
ContractEndGr = x.ContractEndGr,
|
||||
PersonnelCode = x.PersonnelCode,
|
||||
PersonnelCodeInt = x.PersonnelCodeInt,
|
||||
ArchiveCode = x.ArchiveCode,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopName,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
ContractId = x.ContractId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Signature = x.Signature,
|
||||
CreationDate = x.CreationDate,
|
||||
EmployerName = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.EmployerFullName,
|
||||
IsBlockCantracingParty = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.IsBlockContractingParty,
|
||||
}).ToList();
|
||||
//foreach (var items in query)
|
||||
//{
|
||||
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
||||
// if (s != null)
|
||||
// {
|
||||
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
||||
// }
|
||||
// result.Add(items);
|
||||
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
||||
// // .Select(x => x.EmployerId).FirstOrDefault();
|
||||
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
||||
// // = employerName;
|
||||
|
||||
//}
|
||||
|
||||
return query;
|
||||
|
||||
}
|
||||
|
||||
public List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return _checkoutRepository.SimpleSearch(searchModel);
|
||||
}
|
||||
|
||||
public List<CheckoutViewModel> PrintAll(List<long> id)
|
||||
{
|
||||
var result = _checkoutRepository.PrintAll(id);
|
||||
var oneRecord = result.FirstOrDefault();
|
||||
if (oneRecord == null)
|
||||
return new();
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
||||
|
||||
int yearFa;
|
||||
int monthFa;
|
||||
try
|
||||
{
|
||||
yearFa = int.Parse(oneRecord.Year);
|
||||
monthFa = oneRecord.Month.ToMonthByStringValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
double mandatoryHours = _mandatoryHoursApplication.GetMandatoryHoursByYearAndMonth(yearFa, monthFa);
|
||||
int mandatoryWholeHours = (int)mandatoryHours;
|
||||
int mandatoryMinutes = (int)((mandatoryHours - mandatoryWholeHours) * 60);
|
||||
var totalWorking = new TimeSpan(x.MonthlyRollCall.Sum(y => y.TotalhourseSpan.Ticks));
|
||||
var totalBreakTime = new TimeSpan(x.MonthlyRollCall.Sum(y => y.BreakTimeTimeSpan.Ticks));
|
||||
var totalPresent = totalWorking + totalBreakTime;
|
||||
x.TotalWorkingTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalWorking.TotalHours, totalWorking.Minutes, "-");
|
||||
x.TotalBreakTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalBreakTime.TotalHours, totalBreakTime.Minutes, "-");
|
||||
x.TotalPresentTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalPresent.TotalHours, totalPresent.Minutes, "-");
|
||||
x.TotalMandatoryTimeStr = Tools.ToFarsiHoursAndMinutes(mandatoryWholeHours, mandatoryMinutes, "-");
|
||||
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public CheckoutViewModel PrintOne(long id)
|
||||
{
|
||||
var result = _checkoutRepository.PrintOne(id);
|
||||
|
||||
int yearFa;
|
||||
int monthFa;
|
||||
try
|
||||
{
|
||||
yearFa = int.Parse(result.Year);
|
||||
monthFa = result.Month.ToMonthByStringValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
double mandatoryHours = _mandatoryHoursApplication.GetMandatoryHoursByYearAndMonth(yearFa, monthFa);
|
||||
int mandatoryWholeHours = (int)mandatoryHours;
|
||||
int mandatoryMinutes = (int)((mandatoryHours - mandatoryWholeHours) * 60);
|
||||
TimeSpan totalWorking;
|
||||
TimeSpan totalBreakTime;
|
||||
TimeSpan totalPresent;
|
||||
if (result.HasRollCall)
|
||||
{
|
||||
totalWorking = new TimeSpan(result.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks));
|
||||
totalBreakTime = new TimeSpan(result.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = totalWorking + totalBreakTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
totalBreakTime = new TimeSpan(result.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = new TimeSpan(result.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks));
|
||||
totalWorking = totalPresent - totalBreakTime;
|
||||
}
|
||||
|
||||
result.TotalWorkingTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalWorking.TotalHours, totalWorking.Minutes, "-");
|
||||
result.TotalBreakTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalBreakTime.TotalHours, totalBreakTime.Minutes, "-");
|
||||
result.TotalPresentTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalPresent.TotalHours, totalPresent.Minutes, "-");
|
||||
result.TotalMandatoryTimeStr = Tools.ToFarsiHoursAndMinutes(mandatoryWholeHours, mandatoryMinutes, "-");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public CheckoutLeavePrintViewModel LeavePrint(long id)
|
||||
{
|
||||
return _checkoutRepository.PrintLeave(id);
|
||||
}
|
||||
|
||||
public OperationResult Sign(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.Sign();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult UnSign(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.UnSign();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult Active(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.Active();
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult DeActive(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.DeActive();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult RemoveCheckout(long id)
|
||||
{
|
||||
return _checkoutRepository.RemoveCheckout(id);
|
||||
}
|
||||
|
||||
public OperationResult CustomSet(long id, double rewardPay, double salaryAidDeduction)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var checkout = _checkoutRepository.Get(id);
|
||||
var totalClaimsDouble = checkout.TotalClaims.MoneyToDouble();
|
||||
var totalDeductionsDouble = checkout.TotalDeductions.MoneyToDouble();
|
||||
totalClaimsDouble = (double)(totalClaimsDouble - checkout.RewardPay);
|
||||
totalDeductionsDouble = totalDeductionsDouble - checkout.SalaryAidDeduction;
|
||||
|
||||
var totalClaims = totalClaimsDouble + rewardPay;
|
||||
var totalDeductions = totalDeductionsDouble + salaryAidDeduction;
|
||||
|
||||
|
||||
|
||||
var totalClaimsString = totalClaims.ToMoney();
|
||||
var totalDeductionsString = totalDeductions.ToMoney();
|
||||
var totalPayment = totalClaims - totalDeductions;
|
||||
|
||||
checkout.CustomSet(rewardPay, salaryAidDeduction, totalClaimsString, totalDeductionsString, totalPayment);
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
#region Client
|
||||
|
||||
public List<CheckoutViewModel> SearchForClient(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return _checkoutRepository.SearchForClient(searchModel);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region NewChangeByHeydari
|
||||
public List<long> CheckHasSignature(List<long> ids)
|
||||
{
|
||||
return _checkoutRepository.CheckHasSignature(ids);
|
||||
}
|
||||
public OperationResult DeleteAllCheckouts(List<long> ids)
|
||||
{
|
||||
return _checkoutRepository.DeleteAllCheckouts(ids);
|
||||
}
|
||||
public OperationResult DeleteCheckout(long id)
|
||||
{
|
||||
return _checkoutRepository.DeleteCheckout(id);
|
||||
}
|
||||
public async Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return await _checkoutRepository.SearchForMainCheckout(searchModel);
|
||||
}
|
||||
#endregion
|
||||
#region Pooya
|
||||
|
||||
|
||||
public List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopIdForWorkFlow(long workshopId, DateTime start, DateTime end)
|
||||
{
|
||||
return _checkoutRepository.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, start, end);
|
||||
}
|
||||
private readonly ICheckoutRepository _checkoutRepository;
|
||||
private readonly IYearlySalaryRepository _yearlySalaryRepository;
|
||||
private readonly ILeftWorkRepository _leftWorkRepository;
|
||||
private readonly IEmployerRepository _employerRepository;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly ILeaveApplication _leaveApplication;
|
||||
private readonly IMandatoryHoursApplication _mandatoryHoursApplication;
|
||||
private readonly IRollCallMandatoryRepository _rollCallMandatoryRepository;
|
||||
|
||||
|
||||
public CheckoutApplication(ICheckoutRepository checkoutRepository, IYearlySalaryRepository yearlySalaryRepository,
|
||||
ILeftWorkRepository leftWorkRepository,
|
||||
IEmployerRepository employerRepository, IPersonalContractingPartyApp contractingPartyApp, ILeaveApplication leaveApplication, IMandatoryHoursApplication mandatoryHoursApplication, IRollCallMandatoryRepository rollCallMandatoryRepository)
|
||||
{
|
||||
_checkoutRepository = checkoutRepository;
|
||||
_yearlySalaryRepository = yearlySalaryRepository;
|
||||
_leftWorkRepository = leftWorkRepository;
|
||||
_employerRepository = employerRepository;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_leaveApplication = leaveApplication;
|
||||
_mandatoryHoursApplication = mandatoryHoursApplication;
|
||||
_rollCallMandatoryRepository = rollCallMandatoryRepository;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper.DPA", "DPA0007: Large number of DB records", MessageId = "count: 241")]
|
||||
public void Create(CreateCheckout command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
var syear = Convert.ToInt32(command.ContractStart.Substring(0, 4));
|
||||
var smonth = Convert.ToInt32(command.ContractStart.Substring(5, 2));
|
||||
string month = string.Empty;
|
||||
switch (smonth)
|
||||
{
|
||||
case 1:
|
||||
month = "فروردین";
|
||||
break;
|
||||
case 2:
|
||||
month = "اردیبهشت";
|
||||
break;
|
||||
case 3:
|
||||
month = "خرداد";
|
||||
break;
|
||||
case 4:
|
||||
month = "تیر";
|
||||
break;
|
||||
case 5:
|
||||
month = "مرداد";
|
||||
break;
|
||||
case 6:
|
||||
month = "شهریور";
|
||||
break;
|
||||
case 7:
|
||||
month = "مهر";
|
||||
break;
|
||||
case 8:
|
||||
month = "آبان";
|
||||
break;
|
||||
case 9:
|
||||
month = "آذر";
|
||||
break;
|
||||
case 10:
|
||||
month = "دی";
|
||||
break;
|
||||
case 11:
|
||||
month = "بهمن";
|
||||
break;
|
||||
case 12:
|
||||
month = "اسفند";
|
||||
break;
|
||||
}
|
||||
var year = syear.ToString();
|
||||
|
||||
#region SickLeav
|
||||
|
||||
//var serachModel = new LeaveSearchModel()
|
||||
//{
|
||||
// EmployeeId = command.EmployeeId,
|
||||
// WorkshopId = command.WorkshopId,
|
||||
// LeaveType = "استعلاجی",
|
||||
// StartLeave = command.ContractStart,
|
||||
// EndLeave = command.ContractEnd,
|
||||
// IsAccepted = true,
|
||||
//};
|
||||
//var leavList = _leaveApplication.search(serachModel);
|
||||
// int sickLeaveCount = 0;
|
||||
//if (leavList.Count > 0)
|
||||
//{
|
||||
|
||||
// foreach (var leave in leavList)
|
||||
// {
|
||||
// if (leave.StartLeaveGr < command.ContractStartGr && leave.EndLeaveGr <= command.ContractEndGr)
|
||||
// {
|
||||
// int res = (int)((leave.EndLeaveGr - command.ContractStartGr).TotalDays +1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
// else if (leave.StartLeaveGr >= command.ContractStartGr && leave.EndLeaveGr > command.ContractEndGr)
|
||||
// {
|
||||
// int res = (int)((command.ContractEndGr - leave.StartLeaveGr).TotalDays + 1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// int res = (int)((leave.EndLeaveGr - leave.StartLeaveGr).TotalDays + 1);
|
||||
// sickLeaveCount += res;
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
#endregion
|
||||
|
||||
var dayliWage = command.DayliWage.MoneyToDouble();
|
||||
// کمک هزینه اقلام
|
||||
var consumableItem = command.ConsumableItems.MoneyToDouble();
|
||||
//حق اولاد
|
||||
var familyAllowance = command.FamilyAllowance.MoneyToDouble();
|
||||
//کمک هزینه مسکن
|
||||
var housingAllowance = command.HousingAllowance.MoneyToDouble();
|
||||
//حق تاهل
|
||||
var marriedAllowance = command.MarriedAllowance.MoneyToDouble();
|
||||
var MontlyYearsBunos =
|
||||
_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
var monthlyWage = MontlyYearsBunos.MontlyWage;
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//عیدی و پاداش
|
||||
var bunos = command.BonusesPay;
|
||||
//پایه سنوات
|
||||
var bacicYears = MontlyYearsBunos.BasicYears;
|
||||
var sumOfWorkingDays = MontlyYearsBunos.SumOfWorkingDay;
|
||||
if (command.friday > 0)
|
||||
{
|
||||
var fridayPercent = dayliWage * 40 / 100;
|
||||
//فوق العاده جمعه کاری
|
||||
command.FridayPay = fridayPercent * command.friday;
|
||||
}
|
||||
//حق بیمه سهم کارگر
|
||||
var insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance) * 7 / 100;
|
||||
|
||||
if (command.OvertimePay > 0 && command.AbsenceDeduction > 0)
|
||||
{
|
||||
if (command.AbsenceDeduction >= command.OvertimePay)
|
||||
{
|
||||
command.AbsenceDeduction = command.AbsenceDeduction - command.OvertimePay;
|
||||
command.OvertimePay = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
command.OvertimePay = command.OvertimePay - command.AbsenceDeduction;
|
||||
command.AbsenceDeduction = 0;
|
||||
}
|
||||
|
||||
}
|
||||
var checkoutStart = $"{command.Year}/{command.Month}/01";
|
||||
var checkoutEnd = checkoutStart.FindeEndOfMonth();
|
||||
var salaryAids =
|
||||
_rollCallMandatoryRepository.SalaryAidsForCheckout(command.EmployeeId, command.WorkshopId, checkoutStart.ToGeorgianDateTime(), checkoutEnd.ToGeorgianDateTime())
|
||||
.Select(x => new CheckoutSalaryAid(x.Amount, x.SalaryAidDateTimeGe, x.SalaryAidDateTimeFa, x.CalculationDateTimeGe, x.CalculationDateTimeFa, x.Id)).ToList();
|
||||
|
||||
command.SalaryAidDeduction = salaryAids.Sum(x => x.Amount.MoneyToDouble());
|
||||
|
||||
|
||||
var loanInstallments = _rollCallMandatoryRepository.LoanInstallmentForCheckout(command.EmployeeId,
|
||||
command.WorkshopId, command.ContractStartGr, command.ContractEndGr)
|
||||
.Select(x => new CheckoutLoanInstallment(x.Amount, x.Month, x.Year, x.IsActive, x.RemainingAmount, x.LoanAmount, x.Id)).ToList();
|
||||
|
||||
command.InstallmentDeduction = loanInstallments.Sum(x => x.AmountForMonth.MoneyToDouble());
|
||||
|
||||
|
||||
var totalClaimsDouble = monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance + command.OvertimePay +
|
||||
command.NightworkPay + familyAllowance + bunos + years + command.LeavePay + command.FridayPay + command.ShiftPay;
|
||||
var totalClaims = totalClaimsDouble.ToMoney();
|
||||
var totalDeductionDouble = insuranceDeduction + command.AbsenceDeduction + command.InstallmentDeduction + command.SalaryAidDeduction;
|
||||
var totalDeductions = totalDeductionDouble.ToMoney();
|
||||
var totalPayment = totalClaimsDouble - totalDeductionDouble;
|
||||
|
||||
if (_checkoutRepository.Exists(x =>
|
||||
x.Month == command.Month && x.Year == command.Year && x.ContractNo == command.ContractNo))
|
||||
{
|
||||
operation.Failed("امکان ثبت رکورد تکراری وجود ندارد");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(command.Signature))
|
||||
{
|
||||
command.Signature = "0";
|
||||
}
|
||||
|
||||
|
||||
|
||||
var checkout = new Checkout(command.EmployeeFullName, command.FathersName, command.NationalCode
|
||||
, command.DateOfBirth, command.EmployeeId, command.WorkshopName, command.WorkshopId, command.ContractNo, command.ContractStartGr, command.ContractEndGr, month, year,
|
||||
command.ContractId, command.WorkingHoursId, monthlyWage, bacicYears, consumableItem, housingAllowance
|
||||
, command.OvertimePay, command.NightworkPay, command.FridayPay, 0, command.ShiftPay, familyAllowance, bunos, years, command.LeavePay, insuranceDeduction, 0, command.InstallmentDeduction, command.SalaryAidDeduction, command.AbsenceDeduction, sumOfWorkingDays,
|
||||
command.ArchiveCode, command.PersonnelCode, totalClaims, totalDeductions, totalPayment, command.Signature, marriedAllowance, command.LeaveCheckout, command.CreditLeaves, command.AbsencePeriod, command.AverageHoursPerDay, command.HasRollCall, command.OverTimeWorkValue, command.OverNightWorkValue
|
||||
, command.FridayWorkValue, command.RotatingShiftValue, command.AbsenceValue, command.TotalDayOfLeaveCompute, command.TotalDayOfYearsCompute, command.TotalDayOfBunosesCompute, loanInstallments, salaryAids);
|
||||
_checkoutRepository.CreateCkeckout(checkout).GetAwaiter().GetResult();
|
||||
//_checkoutRepository.SaveChanges();
|
||||
|
||||
//var employeeFullName = new SqlParameter("@EmployeeFullName", SqlDbType.NVarChar, 50);
|
||||
//employeeFullName.Value = command.EmployeeFullName;
|
||||
//var fathersName = new SqlParameter("@FathersName", SqlDbType.NVarChar, 20);
|
||||
//fathersName.Value = command.EmployeeFullName;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public OperationResult Edit(EditCheckout command)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public EditCheckout GetDetails(long id)
|
||||
{
|
||||
return _checkoutRepository.GetDetails(id);
|
||||
}
|
||||
|
||||
public async Task<CreateCheckoutListViewModel> GetContractResultToCreateCheckout(long workshopId, long employeeId, string year, string month,
|
||||
string contractStart, string contractEnd)
|
||||
{
|
||||
return await _checkoutRepository.GetContractResultToCreateCheckout(workshopId, employeeId, year, month, contractStart,
|
||||
contractEnd);
|
||||
|
||||
}
|
||||
public async Task<List<CheckoutViewModel>> Search(CheckoutSearchModel searchModel)
|
||||
{
|
||||
var result = new List<CheckoutViewModel>();
|
||||
var query = await _checkoutRepository.SearchForMainCheckout(searchModel);
|
||||
query = query.Select(x => new CheckoutViewModel()
|
||||
{
|
||||
Id = x.Id,
|
||||
EmployeeFullName = x.EmployeeFullName,
|
||||
ContractStart = x.ContractStart,
|
||||
ContractEnd = x.ContractEnd,
|
||||
ContractStartGr = x.ContractStartGr,
|
||||
ContractEndGr = x.ContractEndGr,
|
||||
PersonnelCode = x.PersonnelCode,
|
||||
PersonnelCodeInt = x.PersonnelCodeInt,
|
||||
ArchiveCode = x.ArchiveCode,
|
||||
SumOfWorkingDays = x.SumOfWorkingDays,
|
||||
WorkshopName = x.WorkshopName,
|
||||
Month = x.Month,
|
||||
Year = x.Year,
|
||||
ContractNo = x.ContractNo,
|
||||
ContractId = x.ContractId,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
IsActiveString = x.IsActiveString,
|
||||
Signature = x.Signature,
|
||||
CreationDate = x.CreationDate,
|
||||
EmployerName = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.EmployerFullName,
|
||||
IsBlockCantracingParty = _employerRepository.GetEmployerByWorkshopId(x.WorkshopId).FirstOrDefault()?.IsBlockContractingParty,
|
||||
}).ToList();
|
||||
//foreach (var items in query)
|
||||
//{
|
||||
// var s = _employerRepository.GetEmployerByWorkshopId(items.WorkshopId);
|
||||
// if (s != null)
|
||||
// {
|
||||
// items.EmployerName = s.FirstOrDefault().EmployerFullName;
|
||||
// }
|
||||
// result.Add(items);
|
||||
// //var employeId = _context.WorkshopEmployers?.Where(x => x.WorkshopId == items.WorkshopId)
|
||||
// // .Select(x => x.EmployerId).FirstOrDefault();
|
||||
// //var employerName = _context.Employers?.FirstOrDefault(x => x.id == employeId).FullName;
|
||||
// // = employerName;
|
||||
|
||||
//}
|
||||
|
||||
return query;
|
||||
|
||||
}
|
||||
|
||||
public List<CheckoutViewModel> SimpleSearch(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return _checkoutRepository.SimpleSearch(searchModel);
|
||||
}
|
||||
|
||||
public List<CheckoutViewModel> PrintAll(List<long> id)
|
||||
{
|
||||
var result = _checkoutRepository.PrintAll(id);
|
||||
var oneRecord = result.FirstOrDefault();
|
||||
if (oneRecord == null)
|
||||
return new();
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
||||
|
||||
int yearFa;
|
||||
int monthFa;
|
||||
try
|
||||
{
|
||||
yearFa = int.Parse(oneRecord.Year);
|
||||
monthFa = oneRecord.Month.ToMonthByStringValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return;
|
||||
}
|
||||
double mandatoryHours = _mandatoryHoursApplication.GetMandatoryHoursByYearAndMonth(yearFa, monthFa);
|
||||
int mandatoryWholeHours = (int)mandatoryHours;
|
||||
int mandatoryMinutes = (int)((mandatoryHours - mandatoryWholeHours) * 60);
|
||||
var totalWorking = new TimeSpan(x.MonthlyRollCall.Sum(y => y.TotalhourseSpan.Ticks));
|
||||
var totalBreakTime = new TimeSpan(x.MonthlyRollCall.Sum(y => y.BreakTimeTimeSpan.Ticks));
|
||||
TimeSpan totalPresent = totalWorking + totalBreakTime;
|
||||
|
||||
if (x.HasRollCall)
|
||||
{
|
||||
totalWorking = new TimeSpan(x.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks)) - x.TotalHourlyLeave;
|
||||
totalBreakTime = new TimeSpan(x.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = totalWorking + totalBreakTime ;
|
||||
}
|
||||
else
|
||||
{
|
||||
totalBreakTime = new TimeSpan(x.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = new TimeSpan(x.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks));
|
||||
totalWorking = totalPresent - totalBreakTime;
|
||||
}
|
||||
|
||||
x.TotalWorkingTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalWorking.TotalHours, totalWorking.Minutes, "-");
|
||||
x.TotalBreakTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalBreakTime.TotalHours, totalBreakTime.Minutes, "-");
|
||||
x.TotalPresentTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalPresent.TotalHours, totalPresent.Minutes, "-");
|
||||
x.TotalMandatoryTimeStr = Tools.ToFarsiHoursAndMinutes(mandatoryWholeHours, mandatoryMinutes, "-");
|
||||
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
public CheckoutViewModel PrintOne(long id)
|
||||
{
|
||||
var result = _checkoutRepository.PrintOne(id);
|
||||
|
||||
int yearFa;
|
||||
int monthFa;
|
||||
try
|
||||
{
|
||||
yearFa = int.Parse(result.Year);
|
||||
monthFa = result.Month.ToMonthByStringValue();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
double mandatoryHours = _mandatoryHoursApplication.GetMandatoryHoursByYearAndMonth(yearFa, monthFa);
|
||||
int mandatoryWholeHours = (int)mandatoryHours;
|
||||
int mandatoryMinutes = (int)((mandatoryHours - mandatoryWholeHours) * 60);
|
||||
TimeSpan totalWorking;
|
||||
TimeSpan totalBreakTime;
|
||||
TimeSpan totalPresent;
|
||||
TimeSpan totalHoursLeave;
|
||||
if (result.HasRollCall)
|
||||
{
|
||||
totalWorking = new TimeSpan(result.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks)) - result.TotalHourlyLeave;
|
||||
totalBreakTime = new TimeSpan(result.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = totalWorking + totalBreakTime ;
|
||||
}
|
||||
else
|
||||
{
|
||||
totalBreakTime = new TimeSpan(result.MonthlyRollCall.Sum(x => x.BreakTimeTimeSpan.Ticks));
|
||||
totalPresent = new TimeSpan(result.MonthlyRollCall.Sum(x => x.TotalhourseSpan.Ticks));
|
||||
totalWorking = totalPresent - totalBreakTime;
|
||||
}
|
||||
|
||||
result.TotalWorkingTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalWorking.TotalHours, totalWorking.Minutes, "-");
|
||||
result.TotalBreakTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalBreakTime.TotalHours, totalBreakTime.Minutes, "-");
|
||||
result.TotalPresentTimeStr = Tools.ToFarsiHoursAndMinutes((int)totalPresent.TotalHours, totalPresent.Minutes, "-");
|
||||
result.TotalMandatoryTimeStr = Tools.ToFarsiHoursAndMinutes(mandatoryWholeHours, mandatoryMinutes, "-");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public CheckoutLeavePrintViewModel LeavePrint(long id)
|
||||
{
|
||||
return _checkoutRepository.PrintLeave(id);
|
||||
}
|
||||
|
||||
public OperationResult Sign(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.Sign();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult UnSign(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.UnSign();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult Active(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.Active();
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult DeActive(long id)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var contract = _checkoutRepository.Get(id);
|
||||
if (contract == null)
|
||||
return opration.Failed("رکورد مورد نظر یافت نشد");
|
||||
|
||||
contract.DeActive();
|
||||
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public OperationResult RemoveCheckout(long id)
|
||||
{
|
||||
return _checkoutRepository.RemoveCheckout(id);
|
||||
}
|
||||
|
||||
public OperationResult CustomSet(long id, double rewardPay, double salaryAidDeduction)
|
||||
{
|
||||
var opration = new OperationResult();
|
||||
var checkout = _checkoutRepository.Get(id);
|
||||
var totalClaimsDouble = checkout.TotalClaims.MoneyToDouble();
|
||||
var totalDeductionsDouble = checkout.TotalDeductions.MoneyToDouble();
|
||||
totalClaimsDouble = (double)(totalClaimsDouble - checkout.RewardPay);
|
||||
totalDeductionsDouble = totalDeductionsDouble - checkout.SalaryAidDeduction;
|
||||
|
||||
var totalClaims = totalClaimsDouble + rewardPay;
|
||||
var totalDeductions = totalDeductionsDouble + salaryAidDeduction;
|
||||
|
||||
|
||||
|
||||
var totalClaimsString = totalClaims.ToMoney();
|
||||
var totalDeductionsString = totalDeductions.ToMoney();
|
||||
var totalPayment = totalClaims - totalDeductions;
|
||||
|
||||
checkout.CustomSet(rewardPay, salaryAidDeduction, totalClaimsString, totalDeductionsString, totalPayment);
|
||||
|
||||
_checkoutRepository.SaveChanges();
|
||||
opration.IsSuccedded = true;
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
#region Client
|
||||
|
||||
public List<CheckoutViewModel> SearchForClient(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return _checkoutRepository.SearchForClient(searchModel);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region NewChangeByHeydari
|
||||
public List<long> CheckHasSignature(List<long> ids)
|
||||
{
|
||||
return _checkoutRepository.CheckHasSignature(ids);
|
||||
}
|
||||
public OperationResult DeleteAllCheckouts(List<long> ids)
|
||||
{
|
||||
return _checkoutRepository.DeleteAllCheckouts(ids);
|
||||
}
|
||||
public OperationResult DeleteCheckout(long id)
|
||||
{
|
||||
return _checkoutRepository.DeleteCheckout(id);
|
||||
}
|
||||
public async Task<List<CheckoutViewModel>> SearchForMainCheckout(CheckoutSearchModel searchModel)
|
||||
{
|
||||
return await _checkoutRepository.SearchForMainCheckout(searchModel);
|
||||
}
|
||||
#endregion
|
||||
#region Pooya
|
||||
|
||||
|
||||
public List<(long EmployeeId, DateTime CheckoutStart, DateTime CheckoutEnd)> GetLastCheckoutsByWorkshopIdForWorkFlow(long workshopId, DateTime start, DateTime end)
|
||||
{
|
||||
return _checkoutRepository.GetLastCheckoutsByWorkshopIdForWorkFlow(workshopId, start, end);
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -160,7 +160,7 @@ public class YearlySalaryApplication : IYearlySalaryApplication
|
||||
public InsuranceYearlySalaryModel GetInsuranceItems(DateTime startDate, DateTime endDate, string year)
|
||||
{
|
||||
return _yearlySalaryRepository.GetInsuranceItems(startDate, endDate, year);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -13,5 +13,32 @@ public class InsuranceListMapping : IEntityTypeConfiguration<InsuranceList>
|
||||
|
||||
builder.Property(x => x.Year).HasMaxLength(4);
|
||||
builder.Property(x => x.Month).HasMaxLength(2);
|
||||
|
||||
builder.ComplexProperty(x => x.Inspection, inspection =>
|
||||
{
|
||||
inspection.IsRequired();
|
||||
inspection.Property(x => x.Type).HasConversion<string>().HasMaxLength(50);
|
||||
inspection.Property(x => x.LastInspectionDateTime);
|
||||
inspection.Property(x => x.MediaId);
|
||||
});
|
||||
|
||||
builder.ComplexProperty(x => x.Debt, debt =>
|
||||
{
|
||||
debt.IsRequired();
|
||||
debt.Property(x => x.Type).HasConversion<string>().HasMaxLength(50);
|
||||
debt.Property(x => x.DebtDate);
|
||||
debt.Property(x => x.Amount);
|
||||
debt.Property(x => x.MediaId);
|
||||
});
|
||||
|
||||
builder.ComplexProperty(x => x.EmployerApproval, approval =>
|
||||
{
|
||||
approval.IsRequired();
|
||||
approval.Property(x => x.Status).HasConversion<string>().HasMaxLength(50);
|
||||
approval.Property(x => x.Description).HasMaxLength(500);
|
||||
});
|
||||
|
||||
//builder.HasMany(x => x.EmployerSignatures)
|
||||
// .WithOne(x => x.InsuranceList).HasForeignKey(x => x.InsuranceListId);
|
||||
}
|
||||
}
|
||||
9589
CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.Designer.cs
generated
Normal file
9589
CompanyManagment.EFCore/Migrations/20250521125646_add inspection-debt-approval to insurance list.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class addinspectiondebtapprovaltoinsurancelist : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Debt_Amount",
|
||||
table: "InsuranceLists",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "Debt_DebtDate",
|
||||
table: "InsuranceLists",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Debt_MediaId",
|
||||
table: "InsuranceLists",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Debt_Type",
|
||||
table: "InsuranceLists",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "None");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EmployerApproval_Description",
|
||||
table: "InsuranceLists",
|
||||
type: "nvarchar(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EmployerApproval_Status",
|
||||
table: "InsuranceLists",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "None");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "Inspection_LastInspectionDateTime",
|
||||
table: "InsuranceLists",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "Inspection_MediaId",
|
||||
table: "InsuranceLists",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Inspection_Type",
|
||||
table: "InsuranceLists",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
defaultValue: "None");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Debt_Amount",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Debt_DebtDate",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Debt_MediaId",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Debt_Type",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployerApproval_Description",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployerApproval_Status",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Inspection_LastInspectionDateTime",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Inspection_MediaId",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Inspection_Type",
|
||||
table: "InsuranceLists");
|
||||
}
|
||||
}
|
||||
}
|
||||
9719
CompanyManagment.EFCore/Migrations/20250602185437_insurance operation list.Designer.cs
generated
Normal file
9719
CompanyManagment.EFCore/Migrations/20250602185437_insurance operation list.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,51 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class insuranceoperationlist : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Debt_IsDone",
|
||||
table: "InsuranceLists",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "EmployerApproval_IsDone",
|
||||
table: "InsuranceLists",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Inspection_IsDone",
|
||||
table: "InsuranceLists",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Debt_IsDone",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EmployerApproval_IsDone",
|
||||
table: "InsuranceLists");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Inspection_IsDone",
|
||||
table: "InsuranceLists");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
@@ -3350,6 +3351,64 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(4)
|
||||
.HasColumnType("nvarchar(4)");
|
||||
|
||||
b.ComplexProperty<Dictionary<string, object>>("Debt", "Company.Domain.InsuranceListAgg.InsuranceList.Debt#InsuranceListDebt", b1 =>
|
||||
{
|
||||
b1.IsRequired();
|
||||
|
||||
b1.Property<double>("Amount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b1.Property<DateTime>("DebtDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b1.Property<bool>("IsDone")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b1.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
});
|
||||
|
||||
b.ComplexProperty<Dictionary<string, object>>("EmployerApproval", "Company.Domain.InsuranceListAgg.InsuranceList.EmployerApproval#InsuranceListEmployerApproval", b1 =>
|
||||
{
|
||||
b1.IsRequired();
|
||||
|
||||
b1.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b1.Property<bool>("IsDone")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b1.Property<string>("Status")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
});
|
||||
|
||||
b.ComplexProperty<Dictionary<string, object>>("Inspection", "Company.Domain.InsuranceListAgg.InsuranceList.Inspection#InsuranceListInspection", b1 =>
|
||||
{
|
||||
b1.IsRequired();
|
||||
|
||||
b1.Property<bool>("IsDone")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b1.Property<DateTime>("LastInspectionDateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b1.Property<long>("MediaId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b1.Property<string>("Type")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
});
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.ToTable("InsuranceLists", (string)null);
|
||||
|
||||
@@ -1058,8 +1058,8 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
});
|
||||
|
||||
var totalPaidLeaveTimeSpans = hourlyPaidLeaveTimeSpans.Concat(dailyPaidLeaveTimeSpans);
|
||||
|
||||
ch.TotalPaidLeave = new TimeSpan(totalPaidLeaveTimeSpans.Sum(x => x.Ticks)).ToFarsiDaysAndHoursAndMinutes("-");
|
||||
ch.TotalHourlyLeave = new TimeSpan(hourlyPaidLeaveTimeSpans.Sum(x => x.Ticks));
|
||||
ch.TotalPaidLeave = new TimeSpan(totalPaidLeaveTimeSpans.Sum(x => x.Ticks)).ToFarsiDaysAndHoursAndMinutes("-");
|
||||
|
||||
|
||||
|
||||
@@ -1387,7 +1387,7 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
|
||||
ch.TotalSickLeave = new TimeSpan(sickLeaveTimeSpans.Sum(x => x.Ticks)).ToFarsiDaysAndHoursAndMinutes("-");
|
||||
|
||||
var hourlyPaidLeaveTimeSpans = hourlyPaidLeave.Select(x => TimeOnly.Parse(x.LeaveHourses).ToTimeSpan());
|
||||
var hourlyPaidLeaveTimeSpans = hourlyPaidLeave.Select(x => TimeOnly.Parse(x.LeaveHourses).ToTimeSpan()).ToList();
|
||||
|
||||
var dailyPaidLeaveTimeSpans = dailyPaidLeave.Select(x =>
|
||||
{
|
||||
@@ -1397,7 +1397,7 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
});
|
||||
|
||||
var totalPaidLeaveTimeSpans = hourlyPaidLeaveTimeSpans.Concat(dailyPaidLeaveTimeSpans);
|
||||
|
||||
ch.TotalHourlyLeave = new TimeSpan(hourlyPaidLeaveTimeSpans.Sum(x => x.Ticks));
|
||||
ch.TotalPaidLeave = new TimeSpan(totalPaidLeaveTimeSpans.Sum(x => x.Ticks)).ToFarsiDaysAndHoursAndMinutes("-");
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using AccountMangement.Infrastructure.EFCore;
|
||||
using Company.Domain.EmployeeAgg;
|
||||
using Company.Domain.EmployeeChildrenAgg;
|
||||
using Company.Domain.EmployeeInsurancListDataAgg;
|
||||
@@ -16,6 +20,7 @@ using CompanyManagment.App.Contracts.EmployeeInsurancListData;
|
||||
using CompanyManagment.App.Contracts.InsuranceList;
|
||||
using CompanyManagment.App.Contracts.InsuranceWorkshopInfo;
|
||||
using CompanyManagment.App.Contracts.PersonalContractingParty;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Identity.Client;
|
||||
using PersianTools.Core;
|
||||
@@ -32,7 +37,10 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IPersonalContractingPartyApp _contractingPartyApp;
|
||||
private readonly IInsuranceYearlySalaryRepository _insuranceYearlySalaryRepository;
|
||||
public InsuranceListRepository(CompanyContext context, IEmployeeInsurancListDataRepository employeeInsurancListDataRepository, IInsuranceListWorkshopRepository insuranceListWorkshopRepository , IInsuranceWorkshopInfoRepository insuranceWorkshopInfoRepository, IAuthHelper authHelper, IPersonalContractingPartyApp contractingPartyApp, IInsuranceYearlySalaryRepository insuranceYearlySalaryRepository) : base(context)
|
||||
private readonly IWebHostEnvironment _webHostEnvironment;
|
||||
private readonly AccountContext _accountContext;
|
||||
|
||||
public InsuranceListRepository(CompanyContext context, IEmployeeInsurancListDataRepository employeeInsurancListDataRepository, IInsuranceListWorkshopRepository insuranceListWorkshopRepository, IInsuranceWorkshopInfoRepository insuranceWorkshopInfoRepository, IAuthHelper authHelper, IPersonalContractingPartyApp contractingPartyApp, IInsuranceYearlySalaryRepository insuranceYearlySalaryRepository, IWebHostEnvironment webHostEnvironment, AccountContext accountContext) : base(context)
|
||||
{
|
||||
_context = context;
|
||||
_employeeInsurancListDataRepository = employeeInsurancListDataRepository;
|
||||
@@ -41,20 +49,22 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
_authHelper = authHelper;
|
||||
_contractingPartyApp = contractingPartyApp;
|
||||
_insuranceYearlySalaryRepository = insuranceYearlySalaryRepository;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_accountContext = accountContext;
|
||||
}
|
||||
public OperationResult CreateInsuranceListworkshop(long id, List<long> workshopIds)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
//try
|
||||
//{
|
||||
var list= new List<InsuranceListWorkshop>();
|
||||
var list = new List<InsuranceListWorkshop>();
|
||||
foreach (var item in workshopIds)
|
||||
{
|
||||
|
||||
list.Add(new InsuranceListWorkshop()
|
||||
{
|
||||
WorkshopId =item,
|
||||
InsurancListId= id
|
||||
WorkshopId = item,
|
||||
InsurancListId = id
|
||||
});
|
||||
}
|
||||
|
||||
@@ -76,11 +86,11 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
public OperationResult CreateInsuranceListworkshopInfo(CreateInsuranceWorkshopInfo command)
|
||||
{
|
||||
var operation = new OperationResult();
|
||||
|
||||
var obj = _context.InsuranceWorkshopInformationSet.Where(x=>x.WorkshopId== command.WorkshopId).FirstOrDefault();
|
||||
|
||||
var obj = _context.InsuranceWorkshopInformationSet.Where(x => x.WorkshopId == command.WorkshopId).FirstOrDefault();
|
||||
if (obj != null)
|
||||
{
|
||||
obj.Edit(command.WorkshopName, command.InsuranceCode, command.AgreementNumber, command.EmployerName, command.Address,command.ListNumber);
|
||||
obj.Edit(command.WorkshopName, command.InsuranceCode, command.AgreementNumber, command.EmployerName, command.Address, command.ListNumber);
|
||||
_context.SaveChanges();
|
||||
}
|
||||
else
|
||||
@@ -91,7 +101,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
_context.SaveChanges();
|
||||
|
||||
}
|
||||
|
||||
|
||||
return operation;
|
||||
}
|
||||
|
||||
@@ -103,9 +113,9 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
try
|
||||
{
|
||||
var insuranceListObj = Get(command.Id);
|
||||
insuranceListObj.Edit(command.SumOfEmployees,command.SumOfWorkingDays,command.SumOfSalaries,command.SumOfBenefitsIncluded,command.Included,command.IncludedAndNotIncluded,command.InsuredShare,
|
||||
command.EmployerShare,command.UnEmploymentInsurance,command.DifficultJobsInsuranc,command.StartDate,command.SumOfDailyWage,command.SumOfBaseYears,command.SumOfMarriedAllowance, command.ConfirmSentlist);
|
||||
|
||||
insuranceListObj.Edit(command.SumOfEmployees, command.SumOfWorkingDays, command.SumOfSalaries, command.SumOfBenefitsIncluded, command.Included, command.IncludedAndNotIncluded, command.InsuredShare,
|
||||
command.EmployerShare, command.UnEmploymentInsurance, command.DifficultJobsInsuranc, command.StartDate, command.SumOfDailyWage, command.SumOfBaseYears, command.SumOfMarriedAllowance, command.ConfirmSentlist);
|
||||
|
||||
var id = insuranceListObj.id;
|
||||
if (command.EmployeeInsurancListDataList != null && command.EmployeeInsurancListDataList.Count > 0)
|
||||
{
|
||||
@@ -121,14 +131,14 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
item.BenefitsIncludedContinuous,
|
||||
item.BenefitsIncludedNonContinuous,
|
||||
item.InsuranceShare, item.StartWorkDate,
|
||||
item.LeftWorkDate, item.JobId,item.IncludeStatus,item.BaseYears,item.MarriedAllowance,item.OverTimePay,item.FamilyAllowance);
|
||||
item.LeftWorkDate, item.JobId, item.IncludeStatus, item.BaseYears, item.MarriedAllowance, item.OverTimePay, item.FamilyAllowance);
|
||||
_employeeInsurancListDataRepository.Create(employeeInsurancListData);
|
||||
}
|
||||
else
|
||||
{
|
||||
var employeeInsurancListDataObj = _employeeInsurancListDataRepository.Get(item.EmployeeInsurancListDataId);
|
||||
employeeInsurancListDataObj.Edit(item.WorkingDays,item.DailyWage,item.MonthlySalary,item.MonthlyBenefits,item .MonthlyBenefitsIncluded,item.BenefitsIncludedContinuous,
|
||||
item.BenefitsIncludedNonContinuous,item.InsuranceShare,item.StartWorkDate,item.LeftWorkDate,item.JobId,item.IncludeStatus,item.BaseYears,item.MarriedAllowance,item.OverTimePay,item.FamilyAllowance);
|
||||
employeeInsurancListDataObj.Edit(item.WorkingDays, item.DailyWage, item.MonthlySalary, item.MonthlyBenefits, item.MonthlyBenefitsIncluded, item.BenefitsIncludedContinuous,
|
||||
item.BenefitsIncludedNonContinuous, item.InsuranceShare, item.StartWorkDate, item.LeftWorkDate, item.JobId, item.IncludeStatus, item.BaseYears, item.MarriedAllowance, item.OverTimePay, item.FamilyAllowance);
|
||||
}
|
||||
}
|
||||
_employeeInsurancListDataRepository.SaveChanges();
|
||||
@@ -210,7 +220,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
// نام کارفرما
|
||||
EmployerName = x.EmployerName,
|
||||
//آدرس کارگاه
|
||||
Address = x.Address,
|
||||
Address = x.Address,
|
||||
ListNumber = x.ListNumber,
|
||||
}).FirstOrDefault();
|
||||
#endregion
|
||||
@@ -234,7 +244,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//مزایای ماهانه
|
||||
employeeInsurancListData.MonthlyBenefits = item.MonthlyBenefits;
|
||||
//دستمزد و مزایای ماهانه مشمول
|
||||
employeeInsurancListData.MonthlyBenefitsIncluded =item.MonthlyBenefitsIncluded;
|
||||
employeeInsurancListData.MonthlyBenefitsIncluded = item.MonthlyBenefitsIncluded;
|
||||
// مزایای مشمول و غیر مشمول
|
||||
employeeInsurancListData.BenefitsIncludedContinuous = item.BenefitsIncludedContinuous;
|
||||
//مزایای مشمول غیر مستمر
|
||||
@@ -252,8 +262,8 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
employeeInsurancListData.JobName = job != null ? job.JobName : string.Empty; ;
|
||||
employeeInsurancListData.JobCode = job != null ? job.JobCode : string.Empty; ;
|
||||
employeeInsurancListData.StrStartWorkDate = item.StartWorkDate.ToFarsi();
|
||||
|
||||
if(item.LeftWorkDate!=null)
|
||||
|
||||
if (item.LeftWorkDate != null)
|
||||
employeeInsurancListData.StrLeftWorkDate = item.LeftWorkDate.ToFarsi();
|
||||
|
||||
|
||||
@@ -266,7 +276,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
#endregion
|
||||
|
||||
#region WorkshopIds
|
||||
var workshopIds = _context.InsuranceListWorkshopSet.Where(x=>x.InsurancListId==id).Select(x => x.WorkshopId).ToList();
|
||||
var workshopIds = _context.InsuranceListWorkshopSet.Where(x => x.InsurancListId == id).Select(x => x.WorkshopId).ToList();
|
||||
#endregion
|
||||
|
||||
#region InsuranceEmployeeInformation
|
||||
@@ -286,7 +296,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
employeeDetails.DateOfBirthGr = item.DateOfBirth;
|
||||
employeeDetails.DateOfIssueGr = item.DateOfIssue;
|
||||
employeeDetails.DateOfBirth = item.DateOfBirth.ToFarsi();
|
||||
employeeDetails.DateOfIssue = ((item.DateOfIssue.ToFarsi())=="1300/10/11")?"": item.DateOfIssue.ToFarsi();
|
||||
employeeDetails.DateOfIssue = ((item.DateOfIssue.ToFarsi()) == "1300/10/11") ? "" : item.DateOfIssue.ToFarsi();
|
||||
employeeDetails.PlaceOfIssue = item.PlaceOfIssue;
|
||||
employeeDetails.NationalCode = item.NationalCode;
|
||||
//employeeDetails.Nationality = item.Nationality;
|
||||
@@ -329,7 +339,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
public List<InsuranceListViewModel> OptimizedSearch(InsuranceListSearchModel searchModel)
|
||||
{
|
||||
|
||||
|
||||
var acountId = _authHelper.CurrentAccountId();
|
||||
var workshopIds = _context.WorkshopAccounts.Where(x => x.AccountId == acountId).Select(x => x.WorkshopId);
|
||||
|
||||
@@ -380,7 +390,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
result => result.workshop.id,
|
||||
employer => employer.WorkshopId,
|
||||
(result, employer) => new { result.insurance, result.workshop, employer })
|
||||
.Select(result => new InsuranceListViewModel
|
||||
.Select(result => new InsuranceListViewModel
|
||||
{
|
||||
Id = result.insurance.id,
|
||||
Year = result.insurance.Year,
|
||||
@@ -402,9 +412,27 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
.Where(p => p.Employers.Any(e => e.id == result.employer.First().EmployerId))
|
||||
.Select(p => p.IsBlock)
|
||||
.FirstOrDefault(),
|
||||
EmployerId = result.employer.First().EmployerId
|
||||
EmployerId = result.employer.First().EmployerId,
|
||||
DebtDone = result.insurance.Debt.IsDone,
|
||||
EmployerApproved = result.insurance.EmployerApproval.IsDone,
|
||||
InspectionDone = result.insurance.Inspection.IsDone
|
||||
});
|
||||
|
||||
query = searchModel.Status switch
|
||||
{
|
||||
InsuranceListSearchStatus.NotStarted => query.Where(x =>
|
||||
!x.DebtDone && !x.EmployerApproved && !x.InspectionDone && !x.ConfirmSentlist),
|
||||
|
||||
InsuranceListSearchStatus.InProgress => query.Where(x =>
|
||||
(x.DebtDone || x.EmployerApproved || x.InspectionDone)&& !(x.DebtDone && x.EmployerApproved && x.InspectionDone) && !x.ConfirmSentlist),
|
||||
|
||||
InsuranceListSearchStatus.ReadyToSendList => query.Where(x =>
|
||||
x.DebtDone && x.EmployerApproved && x.InspectionDone && !x.ConfirmSentlist),
|
||||
|
||||
InsuranceListSearchStatus.Done => query.Where(x => x.ConfirmSentlist),
|
||||
|
||||
_ => query
|
||||
};
|
||||
|
||||
if (!string.IsNullOrEmpty(searchModel.Year) && searchModel.Year != "0" && !string.IsNullOrEmpty(searchModel.Month) && searchModel.Month != "0")
|
||||
query = query.Where(x => x.Year == searchModel.Year && x.Month == searchModel.Month).OrderByDescending(x => x.Id);
|
||||
@@ -456,7 +484,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
//var testquery = query.Where(x => x.Year == searchModel.Year).AsEnumerable();
|
||||
|
||||
return query.ToList();
|
||||
return query.Skip(searchModel.PageIndex).Take(30).ToList();
|
||||
}
|
||||
public List<InsuranceListViewModel> Search(InsuranceListSearchModel searchModel)
|
||||
{
|
||||
@@ -465,9 +493,9 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
var acountID = _authHelper.CurrentAccountId();
|
||||
var workshopIds = _context.WorkshopAccounts.Where(x => x.AccountId == acountID).Select(x => x.WorkshopId).ToList();
|
||||
List<InsuranceListViewModel> list = new List<InsuranceListViewModel>();
|
||||
var query = _context.InsuranceListSet.Where(x=> workshopIds.Contains(x.WorkshopId)).ToList();
|
||||
var query = _context.InsuranceListSet.Where(x => workshopIds.Contains(x.WorkshopId)).ToList();
|
||||
var insuranceWorkshopInformationList = _context.InsuranceWorkshopInformationSet.Where(u => workshopIds.Contains(u.WorkshopId));
|
||||
var workshopList = _context.Workshops.Where(u => workshopIds.Contains(u.id));
|
||||
var workshopList = _context.Workshops.Where(u => workshopIds.Contains(u.id));
|
||||
|
||||
foreach (var item in query)
|
||||
{
|
||||
@@ -475,7 +503,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
var workshop = workshopList.FirstOrDefault(u => u.id == item.WorkshopId);
|
||||
var employerId = _context.WorkshopEmployers.Where(x => x.WorkshopId == item.WorkshopId)
|
||||
.Select(x => x.EmployerId).FirstOrDefault();
|
||||
|
||||
|
||||
string typeOfInsuranceSend = "";
|
||||
if (workshop.TypeOfInsuranceSend == "NormalList")
|
||||
{
|
||||
@@ -489,20 +517,20 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
{
|
||||
typeOfInsuranceSend = "خانوادگی";
|
||||
}
|
||||
|
||||
var insuranceListViewModel =new InsuranceListViewModel()
|
||||
|
||||
var insuranceListViewModel = new InsuranceListViewModel()
|
||||
{
|
||||
Id = item.id,
|
||||
Year = item.Year,
|
||||
Month = item.Month,
|
||||
MonthNumber = item.Month,
|
||||
WorkShopCode = insuranceWorkshopInformation==null? workshop.InsuranceCode: insuranceWorkshopInformation.InsuranceCode,
|
||||
WorkShopCode = insuranceWorkshopInformation == null ? workshop.InsuranceCode : insuranceWorkshopInformation.InsuranceCode,
|
||||
WorkShopName = insuranceWorkshopInformation == null ? workshop.WorkshopName : insuranceWorkshopInformation.WorkshopName,
|
||||
WorkShopId = workshop.id ,
|
||||
WorkShopId = workshop.id,
|
||||
TypeOfInsuranceSend = typeOfInsuranceSend,
|
||||
FixedSalary = workshop.FixedSalary,
|
||||
StrFixedSalary = workshop.FixedSalary?"دارد":"ندارد",
|
||||
EmployerName = insuranceWorkshopInformation == null? workshop.WorkshopFullName: insuranceWorkshopInformation.EmployerName,
|
||||
StrFixedSalary = workshop.FixedSalary ? "دارد" : "ندارد",
|
||||
EmployerName = insuranceWorkshopInformation == null ? workshop.WorkshopFullName : insuranceWorkshopInformation.EmployerName,
|
||||
Branch = "",
|
||||
City = "",
|
||||
ConfirmSentlist = item.ConfirmSentlist,
|
||||
@@ -530,7 +558,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
list = list.Where(x => x.WorkShopCode == searchModel.WorkShopCode).OrderByDescending(x => x.Year).OrderByDescending(x => x.Month).ThenByDescending(x => x.EmployerName).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(searchModel.WorkShopName))
|
||||
list = list.Where(x => x.WorkShopName.Contains(searchModel.WorkShopName) ).OrderByDescending(x => x.EmployerName).ThenByDescending(x => x.Year).OrderByDescending(x => x.Month).ToList();
|
||||
list = list.Where(x => x.WorkShopName.Contains(searchModel.WorkShopName)).OrderByDescending(x => x.EmployerName).ThenByDescending(x => x.Year).OrderByDescending(x => x.Month).ToList();
|
||||
|
||||
|
||||
if (searchModel.WorkshopId > 0)
|
||||
@@ -553,7 +581,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
list = list.Where(x => x.EmployerName.Contains(searchModel.EmployerName)).OrderByDescending(x => x.EmployerName).ThenByDescending(x => x.Year).OrderByDescending(x => x.Month).ToList();
|
||||
|
||||
|
||||
if (searchModel.FixedSalary!=null)
|
||||
if (searchModel.FixedSalary != null)
|
||||
list = list.Where(x => x.FixedSalary == searchModel.FixedSalary).ToList();
|
||||
|
||||
if (!string.IsNullOrEmpty(searchModel.TypeOfInsuranceSend) && searchModel.TypeOfInsuranceSend != "0")
|
||||
@@ -574,7 +602,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
OperationResult result = new OperationResult();
|
||||
using (var transaction = _context.Database.BeginTransaction())
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
//var employeeInsurancList= _context.EmployeeInsurancListDataSet.Where(x => x.InsuranceListId == id).ToList();
|
||||
@@ -584,10 +612,10 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//var insuranceListWorkshopList = _context.InsuranceListWorkshopSet.Where(x => x.InsurancListId == id).ToList();
|
||||
//if (insuranceListWorkshopList != null && insuranceListWorkshopList.Count > 0)
|
||||
_insuranceListWorkshopRepository.RemoveRange(id);
|
||||
|
||||
|
||||
|
||||
var insuranceListObj = _context.InsuranceListSet.Where(x => x.id == id).FirstOrDefault();
|
||||
if(insuranceListObj!=null)
|
||||
if (insuranceListObj != null)
|
||||
Remove(insuranceListObj);
|
||||
|
||||
SaveChanges();
|
||||
@@ -606,11 +634,11 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// ایجاد لیست بیمه
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// ایجاد لیست بیمه
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public OperationResult CreateInsuranceList(CreateInsuranceList command)
|
||||
{
|
||||
OperationResult result = new OperationResult();
|
||||
@@ -625,7 +653,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
command.InsuredShare,
|
||||
command.EmployerShare, command.UnEmploymentInsurance, command.DifficultJobsInsuranc,
|
||||
command.StartDate,
|
||||
command.EndDate, command.SumOfDailyWage,command.SumOfBaseYears,command.SumOfMarriedAllowance);
|
||||
command.EndDate, command.SumOfDailyWage, command.SumOfBaseYears, command.SumOfMarriedAllowance);
|
||||
Create(insuranceListObj);
|
||||
SaveChanges();
|
||||
var id = insuranceListObj.id;
|
||||
@@ -641,10 +669,11 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
item.BenefitsIncludedContinuous,
|
||||
item.BenefitsIncludedNonContinuous,
|
||||
item.InsuranceShare, item.StartWorkDate,
|
||||
item.LeftWorkDate, item.JobId,item.IncludeStatus,item.BaseYears,item.MarriedAllowance,item.OverTimePay,item.FamilyAllowance);
|
||||
item.LeftWorkDate, item.JobId, item.IncludeStatus, item.BaseYears, item.MarriedAllowance, item.OverTimePay, item.FamilyAllowance);
|
||||
_employeeInsurancListDataRepository.Create(employeeInsurancListData);
|
||||
|
||||
}_employeeInsurancListDataRepository.SaveChanges();
|
||||
|
||||
}
|
||||
_employeeInsurancListDataRepository.SaveChanges();
|
||||
}
|
||||
|
||||
if (command.WorkshopIds != null && command.WorkshopIds.Count > 0)
|
||||
@@ -831,10 +860,10 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
editInsuranceList.WorkshopIds = workshopIds;
|
||||
|
||||
return editInsuranceList;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public MainEmployeeDetailsViewModel SearchEmployeeListForEditByInsuranceListId(EmployeeForEditInsuranceListSearchModel searchModel )
|
||||
public MainEmployeeDetailsViewModel SearchEmployeeListForEditByInsuranceListId(EmployeeForEditInsuranceListSearchModel searchModel)
|
||||
{
|
||||
var employeeDetailsViewModel = new MainEmployeeDetailsViewModel();
|
||||
|
||||
@@ -845,7 +874,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
{
|
||||
var leftWorkInsurance = _context.LeftWorkInsuranceList
|
||||
.Where(i => i.EmployeeId == item.EmployeeId && i.WorkshopId == searchModel.WorkshopId)
|
||||
.AsNoTracking().OrderByDescending(x=>x.id).FirstOrDefault();
|
||||
.AsNoTracking().OrderByDescending(x => x.id).FirstOrDefault();
|
||||
var job = _context.Jobs.Where(i => i.id == item.JobId).AsNoTracking().FirstOrDefault();
|
||||
var employeeInsurancListData = new EmployeeInsurancListDataViewModel();
|
||||
employeeInsurancListData.EmployeeInsurancListDataId = item.id;
|
||||
@@ -866,7 +895,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//// مزایای ماهیانه مشمول
|
||||
employeeInsurancListData.BenefitsIncludedNonContinuous = item.BenefitsIncludedNonContinuous;
|
||||
//// حقوق و مزایای ماهیانه مشمول و غیر مشمول **
|
||||
employeeInsurancListData.IncludedAndNotIncluded = item.BenefitsIncludedContinuous;
|
||||
employeeInsurancListData.IncludedAndNotIncluded = item.BenefitsIncludedContinuous;
|
||||
|
||||
employeeInsurancListData.BaseYears = item.BaseYears;
|
||||
employeeInsurancListData.MarriedAllowance = item.MarriedAllowance;
|
||||
@@ -875,7 +904,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//سهم بیمه حق کارگر
|
||||
employeeInsurancListData.InsuranceShare = item.InsuranceShare;
|
||||
// تاریخ شروع به کار
|
||||
employeeInsurancListData.StartWorkDate =item.StartWorkDate;
|
||||
employeeInsurancListData.StartWorkDate = item.StartWorkDate;
|
||||
//تاریخ ترک کار
|
||||
employeeInsurancListData.LeftWorkDate = item.LeftWorkDate;
|
||||
// آی دی شغل
|
||||
@@ -883,7 +912,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
employeeInsurancListData.JobName = job != null ? job.JobName : string.Empty;
|
||||
employeeInsurancListData.JobCode = job != null ? job.JobCode : string.Empty;
|
||||
employeeInsurancListData.StrStartWorkDate = item.StartWorkDate.ToFarsi();
|
||||
|
||||
|
||||
if (item.LeftWorkDate != null)
|
||||
employeeInsurancListData.StrLeftWorkDate = item.LeftWorkDate.ToFarsi();
|
||||
|
||||
@@ -893,7 +922,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//ممکن است کسی شامل مزایا باشد و در آن ماه برایش یا مزد روزانه رد نشده باشد
|
||||
// باید با یک فیلد چک شود
|
||||
//
|
||||
if (leftWorkInsurance != null && ((leftWorkInsurance.IncludeStatus!=leftWorkInsurance.IncludeStatus ) || ((leftWorkInsurance.LeftWorkDate!=item.LeftWorkDate)||(leftWorkInsurance.StartWorkDate != item.StartWorkDate ) ||(leftWorkInsurance.JobId != item.JobId))))
|
||||
if (leftWorkInsurance != null && ((leftWorkInsurance.IncludeStatus != leftWorkInsurance.IncludeStatus) || ((leftWorkInsurance.LeftWorkDate != item.LeftWorkDate) || (leftWorkInsurance.StartWorkDate != item.StartWorkDate) || (leftWorkInsurance.JobId != item.JobId))))
|
||||
{
|
||||
employeeInsurancListData.HasConfilictLeftWork = true;
|
||||
if (leftWorkInsurance.LeftWorkDate != null)
|
||||
@@ -924,7 +953,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
var employeeDetailsForInsuranceList = new List<EmployeeDetailsForInsuranceListViewModel>();
|
||||
foreach (var item in insuranceEmployeeInformationList)
|
||||
{
|
||||
var employeeObject = _context.Employees.Where(x=>x.id==item.EmployeeId)?.FirstOrDefault();
|
||||
var employeeObject = _context.Employees.Where(x => x.id == item.EmployeeId)?.FirstOrDefault();
|
||||
var employeeInsurancListData = employeeInsurancListDataViewModelList.Where(x => x.EmployeeId == item.EmployeeId)?.FirstOrDefault();
|
||||
var employeeDetails = new EmployeeDetailsForInsuranceListViewModel();
|
||||
employeeDetails.EmployeeId = item.EmployeeId;
|
||||
@@ -993,13 +1022,13 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
public OperationResult ConfirmInsuranceList(long id)
|
||||
{
|
||||
OperationResult result = new OperationResult();
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var insuranceListObj = Get(id);
|
||||
insuranceListObj.Edit(insuranceListObj.SumOfEmployees, insuranceListObj.SumOfWorkingDays, insuranceListObj.SumOfSalaries, insuranceListObj.SumOfBenefitsIncluded, insuranceListObj.Included, insuranceListObj.IncludedAndNotIncluded, insuranceListObj.InsuredShare,
|
||||
insuranceListObj.EmployerShare, insuranceListObj.UnEmploymentInsurance, insuranceListObj.DifficultJobsInsuranc, insuranceListObj.StartDate, insuranceListObj.SumOfDailyWage,insuranceListObj.SumOfBaseYears,insuranceListObj.SumOfMarriedAllowance,true);
|
||||
insuranceListObj.EmployerShare, insuranceListObj.UnEmploymentInsurance, insuranceListObj.DifficultJobsInsuranc, insuranceListObj.StartDate, insuranceListObj.SumOfDailyWage, insuranceListObj.SumOfBaseYears, insuranceListObj.SumOfMarriedAllowance, true);
|
||||
|
||||
SaveChanges();
|
||||
|
||||
@@ -1009,9 +1038,9 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
{
|
||||
|
||||
result.Message = "تایید ارسال لیست بیمه با موفقیت انجام شد";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
@@ -1020,7 +1049,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
{
|
||||
var insuranceListViewModel = new InsuranceListViewModel();
|
||||
|
||||
var insuranceList = _context.InsuranceListSet.Where(x => x.WorkshopId == workshopId && x.Year == year).OrderByDescending(x=>x.id)?.FirstOrDefault();
|
||||
var insuranceList = _context.InsuranceListSet.Where(x => x.WorkshopId == workshopId && x.Year == year).OrderByDescending(x => x.id)?.FirstOrDefault();
|
||||
|
||||
if (insuranceList != null)
|
||||
{
|
||||
@@ -1031,7 +1060,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
insuranceListViewModel.WorkShopId = insuranceList.WorkshopId;
|
||||
insuranceListViewModel.ConfirmSentlist = insuranceList.ConfirmSentlist;
|
||||
}
|
||||
return insuranceListViewModel;
|
||||
return insuranceListViewModel;
|
||||
}
|
||||
|
||||
#region client
|
||||
@@ -1113,11 +1142,46 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
default: return query.OrderByDescending(x => x.Id).Skip(searchModel.PageIndex).ToList();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<InsuranceListConfirmOperation> GetInsuranceOperationDetails(long id)
|
||||
{
|
||||
var res = await _context.InsuranceListSet.Select(x => new InsuranceListConfirmOperation()
|
||||
{
|
||||
InsuranceListId = x.id,
|
||||
Approval = new CreateInsuranceListApproval()
|
||||
{
|
||||
ApprovalStatus = x.EmployerApproval.Status,
|
||||
Description = x.EmployerApproval.Description,
|
||||
},
|
||||
Debt = new CreateInsuranceListDebt()
|
||||
{
|
||||
Amount = x.Debt.Amount.ToMoney(),
|
||||
DebtDate = x.Debt.DebtDate.ToFarsi(),
|
||||
DebtFileMediaId = x.Debt.MediaId,
|
||||
Type = x.Debt.Type
|
||||
},
|
||||
Inspection = new CreateInsuranceListInspection()
|
||||
{
|
||||
Type = x.Inspection.Type,
|
||||
InspectionFileMediaId = x.Inspection.MediaId,
|
||||
LastInspectionDate = x.Inspection.LastInspectionDateTime.ToFarsi()
|
||||
},
|
||||
ConfirmSentList = x.ConfirmSentlist,
|
||||
}).FirstOrDefaultAsync(x => x.InsuranceListId == id);
|
||||
|
||||
res.Inspection.FilePath = GetInsuranceListFilePath(res.Inspection.InspectionFileMediaId);
|
||||
res.Debt.FilePath = GetInsuranceListFilePath(res.Debt.DebtFileMediaId);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public List<InsuranceListViewModel> SearchForClientOld(InsuranceListSearchModel searchModel)
|
||||
{
|
||||
|
||||
List<InsuranceListViewModel> list = new List<InsuranceListViewModel>();
|
||||
var query = _context.InsuranceListSet.Where(x=>x.WorkshopId== searchModel.WorkshopId).ToList();
|
||||
var query = _context.InsuranceListSet.Where(x => x.WorkshopId == searchModel.WorkshopId).ToList();
|
||||
foreach (var item in query)
|
||||
{
|
||||
var insuranceWorkshopInformation = _context.InsuranceWorkshopInformationSet.FirstOrDefault(u => u.WorkshopId == item.WorkshopId);
|
||||
@@ -1194,16 +1258,16 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
#endregion
|
||||
|
||||
public (int insuranceHistoryYearsCount, double baseYear) GetEmployeeInsuranceBaseYear(long employeeId, long workshopId, int countWorkingDay,DateTime listStartDate, DateTime listEndDate, DateTime startWorkDate, DateTime leftDate, bool hasLeft)
|
||||
public (int insuranceHistoryYearsCount, double baseYear) GetEmployeeInsuranceBaseYear(long employeeId, long workshopId, int countWorkingDay, DateTime listStartDate, DateTime listEndDate, DateTime startWorkDate, DateTime leftDate, bool hasLeft)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
var lefts = _context.LeftWorkInsuranceList
|
||||
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x=> new
|
||||
.Where(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId).Select(x => new
|
||||
{
|
||||
startWork = x.StartWorkDate,
|
||||
leftWork = x.LeftWorkDate == null ? listStartDate : x.LeftWorkDate.Value,
|
||||
}).OrderBy(x=>x.startWork).ToList();
|
||||
startWork = x.StartWorkDate,
|
||||
leftWork = x.LeftWorkDate == null ? listStartDate : x.LeftWorkDate.Value,
|
||||
}).OrderBy(x => x.startWork).ToList();
|
||||
int countDay = 0;
|
||||
foreach (var left in lefts)
|
||||
{
|
||||
@@ -1212,12 +1276,12 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//شمارش فقط تا روز قبل از شروع لیست انجام شود
|
||||
if (left.leftWork >= listStartDate)
|
||||
{
|
||||
var endBeforStartList = new DateTime(listStartDate.Year, listStartDate.Month, listStartDate.Day);
|
||||
end = endBeforStartList.AddDays(-1).ToPersianDateTime();
|
||||
}
|
||||
|
||||
|
||||
var count = (int)(end - start).TotalDays +1;
|
||||
var endBeforStartList = new DateTime(listStartDate.Year, listStartDate.Month, listStartDate.Day);
|
||||
end = endBeforStartList.AddDays(-1).ToPersianDateTime();
|
||||
}
|
||||
|
||||
|
||||
var count = (int)(end - start).TotalDays + 1;
|
||||
countDay += count;
|
||||
}
|
||||
|
||||
@@ -1226,12 +1290,12 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
//تعداد سال های سابقه بیمه
|
||||
int yearsCount = countDay / 365;
|
||||
|
||||
|
||||
//بدست آوردن مزد سنوات بر اساس سابقه به سال
|
||||
var baseYear = _insuranceYearlySalaryRepository.GetBaseYearByDate(listStartDate, yearsCount);
|
||||
if(baseYear == 0)
|
||||
if (baseYear == 0)
|
||||
return (0, 0);
|
||||
|
||||
|
||||
|
||||
//اگر ترک کار کرده بود
|
||||
//یا
|
||||
@@ -1250,7 +1314,7 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
return (yearsCount, baseYear);
|
||||
}
|
||||
|
||||
@@ -1278,109 +1342,109 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
public List<EmployeeDetailsForInsuranceListViewModel> GetEmployeeInsuranceDataForEdit(long insuranceListId, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
|
||||
var res = _context.EmployeeInsurancListDataSet
|
||||
.Where(x => x.InsuranceListId == insuranceListId)
|
||||
.Join(_context.LeftWorkInsuranceList
|
||||
.Where(x =>
|
||||
((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) &&
|
||||
((DateTime)x.LeftWorkDate >= startDate &&
|
||||
(DateTime)x.LeftWorkDate <= endDate)) ||
|
||||
((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) &&
|
||||
(DateTime)x.LeftWorkDate >= endDate) ||
|
||||
(x.LeftWorkDate == null || x.LeftWorkDate == DateTime.MinValue))
|
||||
.Where(x => x.StartWorkDate <= endDate)
|
||||
.Include(x => x.Employee),
|
||||
employeeData => employeeData.EmployeeId,
|
||||
leftwork => leftwork.EmployeeId,
|
||||
(employeeData, leftwork) => new { employeeData, leftwork })
|
||||
.Join(_context.Jobs,
|
||||
result => result.leftwork.JobId,
|
||||
job => job.id,
|
||||
(result, job) => new { result, job })
|
||||
.GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(),
|
||||
allResult => allResult.result.employeeData.EmployeeId,
|
||||
employeeInfo => employeeInfo.EmployeeId,
|
||||
(allResult, employeeInfo) => new
|
||||
{
|
||||
allResult.result,
|
||||
allResult.job,
|
||||
employeeInfo
|
||||
})
|
||||
.SelectMany(x => x.employeeInfo.DefaultIfEmpty(), (x, employeeInfo) => new { x, employeeInfo })
|
||||
.Select(result => new EmployeeDetailsForInsuranceListViewModel
|
||||
{
|
||||
StartWorkDateNew = result.x.result.leftwork.StartWorkDate,
|
||||
LeftWorkDateNew = result.x.result.leftwork.LeftWorkDate,
|
||||
JobIdNew = result.x.result.leftwork.JobId,
|
||||
|
||||
|
||||
StartWorkDateGr = result.x.result.leftwork.StartWorkDate,
|
||||
LeftWorkDateGr = result.x.result.leftwork.LeftWorkDate,
|
||||
IncludeStatus = result.x.result.employeeData.IncludeStatus,
|
||||
JobId = result.x.result.employeeData.JobId,
|
||||
JobName = result.x.job != null ? result.x.job.JobName : string.Empty,
|
||||
JobCode = result.x.job != null ? result.x.job.JobCode : string.Empty,
|
||||
InsuranceEmployeeInformationId = result.employeeInfo != null ? result.employeeInfo.id : 0,
|
||||
EmployeeId = result.x.result.employeeData.EmployeeId,
|
||||
|
||||
//اطلاعات هویتی
|
||||
FName = result.employeeInfo != null ? result.employeeInfo.FName : result.x.result.leftwork.Employee.FName,
|
||||
LName = result.employeeInfo != null ? result.employeeInfo.LName : result.x.result.leftwork.Employee.LName,
|
||||
FatherName = result.employeeInfo != null ? result.employeeInfo.FatherName : result.x.result.leftwork.Employee.FatherName,
|
||||
DateOfBirthGr = result.employeeInfo != null ? result.employeeInfo.DateOfBirth : result.x.result.leftwork.Employee.DateOfBirth,
|
||||
DateOfIssueGr = result.employeeInfo != null ? result.employeeInfo.DateOfIssue : result.x.result.leftwork.Employee.DateOfIssue,
|
||||
PlaceOfIssue = result.employeeInfo != null ? result.employeeInfo.PlaceOfIssue : result.x.result.leftwork.Employee.PlaceOfIssue,
|
||||
IdNumber = result.employeeInfo != null ? result.employeeInfo.IdNumber : result.x.result.leftwork.Employee.IdNumber,
|
||||
Gender = result.employeeInfo != null ? result.employeeInfo.Gender : result.x.result.leftwork.Employee.Gender,
|
||||
NationalCode = result.x.result.leftwork.Employee.NationalCode,
|
||||
Nationality = result.x.result.leftwork.Employee.Nationality,
|
||||
InsuranceCode = result.x.result.leftwork.Employee.InsuranceCode,
|
||||
MaritalStatus = result.x.result.leftwork.Employee.MaritalStatus,
|
||||
IsMaritalStatusSet = !string.IsNullOrWhiteSpace(result.x.result.leftwork.Employee.MaritalStatus),
|
||||
|
||||
//اطاعات محاسباتی
|
||||
EmployeeInsurancListDataId = result.x.result.employeeData.id,
|
||||
DailyWage = result.x.result.employeeData.DailyWage,
|
||||
// LeftWorkDateGr = x.LeftWorkDate,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
MonthlyBenefitsIncluded = result.x.result.employeeData.MonthlyBenefitsIncluded,
|
||||
// JobId = x.JobId,
|
||||
WorkingDays = result.x.result.employeeData.WorkingDays,
|
||||
//پایه سنوات
|
||||
BaseYears = result.x.result.employeeData.BaseYears,
|
||||
|
||||
//مجموع مزد روزانه و پایه سنوات
|
||||
DailyWagePlusBaseYears = result.x.result.employeeData.DailyWagePlusBaseYears,
|
||||
|
||||
//حق تاهل
|
||||
MarriedAllowance = result.x.result.employeeData.MarriedAllowance,
|
||||
|
||||
//دستمزد ماهانه
|
||||
MonthlySalary = result.x.result.employeeData.MonthlySalary,
|
||||
var res = _context.EmployeeInsurancListDataSet
|
||||
.Where(x => x.InsuranceListId == insuranceListId)
|
||||
.Join(_context.LeftWorkInsuranceList
|
||||
.Where(x =>
|
||||
((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) &&
|
||||
((DateTime)x.LeftWorkDate >= startDate &&
|
||||
(DateTime)x.LeftWorkDate <= endDate)) ||
|
||||
((x.LeftWorkDate != null && x.LeftWorkDate != DateTime.MinValue) &&
|
||||
(DateTime)x.LeftWorkDate >= endDate) ||
|
||||
(x.LeftWorkDate == null || x.LeftWorkDate == DateTime.MinValue))
|
||||
.Where(x => x.StartWorkDate <= endDate)
|
||||
.Include(x => x.Employee),
|
||||
employeeData => employeeData.EmployeeId,
|
||||
leftwork => leftwork.EmployeeId,
|
||||
(employeeData, leftwork) => new { employeeData, leftwork })
|
||||
.Join(_context.Jobs,
|
||||
result => result.leftwork.JobId,
|
||||
job => job.id,
|
||||
(result, job) => new { result, job })
|
||||
.GroupJoin(_context.InsuranceEmployeeInformationSet.AsSplitQuery(),
|
||||
allResult => allResult.result.employeeData.EmployeeId,
|
||||
employeeInfo => employeeInfo.EmployeeId,
|
||||
(allResult, employeeInfo) => new
|
||||
{
|
||||
allResult.result,
|
||||
allResult.job,
|
||||
employeeInfo
|
||||
})
|
||||
.SelectMany(x => x.employeeInfo.DefaultIfEmpty(), (x, employeeInfo) => new { x, employeeInfo })
|
||||
.Select(result => new EmployeeDetailsForInsuranceListViewModel
|
||||
{
|
||||
StartWorkDateNew = result.x.result.leftwork.StartWorkDate,
|
||||
LeftWorkDateNew = result.x.result.leftwork.LeftWorkDate,
|
||||
JobIdNew = result.x.result.leftwork.JobId,
|
||||
|
||||
|
||||
//مزایای ماهانه
|
||||
MonthlyBenefits = result.x.result.employeeData.MonthlyBenefits,
|
||||
StartWorkDateGr = result.x.result.leftwork.StartWorkDate,
|
||||
LeftWorkDateGr = result.x.result.leftwork.LeftWorkDate,
|
||||
IncludeStatus = result.x.result.employeeData.IncludeStatus,
|
||||
JobId = result.x.result.employeeData.JobId,
|
||||
JobName = result.x.job != null ? result.x.job.JobName : string.Empty,
|
||||
JobCode = result.x.job != null ? result.x.job.JobCode : string.Empty,
|
||||
InsuranceEmployeeInformationId = result.employeeInfo != null ? result.employeeInfo.id : 0,
|
||||
EmployeeId = result.x.result.employeeData.EmployeeId,
|
||||
|
||||
//مزایای مشمول
|
||||
BenefitsIncludedContinuous = result.x.result.employeeData.MonthlyBenefitsIncluded,
|
||||
//اطلاعات هویتی
|
||||
FName = result.employeeInfo != null ? result.employeeInfo.FName : result.x.result.leftwork.Employee.FName,
|
||||
LName = result.employeeInfo != null ? result.employeeInfo.LName : result.x.result.leftwork.Employee.LName,
|
||||
FatherName = result.employeeInfo != null ? result.employeeInfo.FatherName : result.x.result.leftwork.Employee.FatherName,
|
||||
DateOfBirthGr = result.employeeInfo != null ? result.employeeInfo.DateOfBirth : result.x.result.leftwork.Employee.DateOfBirth,
|
||||
DateOfIssueGr = result.employeeInfo != null ? result.employeeInfo.DateOfIssue : result.x.result.leftwork.Employee.DateOfIssue,
|
||||
PlaceOfIssue = result.employeeInfo != null ? result.employeeInfo.PlaceOfIssue : result.x.result.leftwork.Employee.PlaceOfIssue,
|
||||
IdNumber = result.employeeInfo != null ? result.employeeInfo.IdNumber : result.x.result.leftwork.Employee.IdNumber,
|
||||
Gender = result.employeeInfo != null ? result.employeeInfo.Gender : result.x.result.leftwork.Employee.Gender,
|
||||
NationalCode = result.x.result.leftwork.Employee.NationalCode,
|
||||
Nationality = result.x.result.leftwork.Employee.Nationality,
|
||||
InsuranceCode = result.x.result.leftwork.Employee.InsuranceCode,
|
||||
MaritalStatus = result.x.result.leftwork.Employee.MaritalStatus,
|
||||
IsMaritalStatusSet = !string.IsNullOrWhiteSpace(result.x.result.leftwork.Employee.MaritalStatus),
|
||||
|
||||
//مزایای غیر مشمول
|
||||
BenefitsIncludedNonContinuous = result.x.result.employeeData.BenefitsIncludedNonContinuous,
|
||||
//اطاعات محاسباتی
|
||||
EmployeeInsurancListDataId = result.x.result.employeeData.id,
|
||||
DailyWage = result.x.result.employeeData.DailyWage,
|
||||
// LeftWorkDateGr = x.LeftWorkDate,
|
||||
// StartWorkDateGr = x.StartWorkDate,
|
||||
MonthlyBenefitsIncluded = result.x.result.employeeData.MonthlyBenefitsIncluded,
|
||||
// JobId = x.JobId,
|
||||
WorkingDays = result.x.result.employeeData.WorkingDays,
|
||||
//پایه سنوات
|
||||
BaseYears = result.x.result.employeeData.BaseYears,
|
||||
|
||||
// جمع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول
|
||||
IncludedAndNotIncluded = result.x.result.employeeData.BenefitsIncludedContinuous,
|
||||
//مجموع مزد روزانه و پایه سنوات
|
||||
DailyWagePlusBaseYears = result.x.result.employeeData.DailyWagePlusBaseYears,
|
||||
|
||||
//حق بیمه سهم بیمه شده
|
||||
InsuranceShare = result.x.result.employeeData.InsuranceShare,
|
||||
//حق تاهل
|
||||
MarriedAllowance = result.x.result.employeeData.MarriedAllowance,
|
||||
|
||||
//اضافه کار فیش حقوقی
|
||||
OverTimePay = result.x.result.employeeData.OverTimePay,
|
||||
//دستمزد ماهانه
|
||||
MonthlySalary = result.x.result.employeeData.MonthlySalary,
|
||||
|
||||
//حق اولا فیش حقوقی
|
||||
FamilyAllowance = result.x.result.employeeData.FamilyAllowance,
|
||||
});
|
||||
|
||||
//مزایای ماهانه
|
||||
MonthlyBenefits = result.x.result.employeeData.MonthlyBenefits,
|
||||
|
||||
//مزایای مشمول
|
||||
BenefitsIncludedContinuous = result.x.result.employeeData.MonthlyBenefitsIncluded,
|
||||
|
||||
//مزایای غیر مشمول
|
||||
BenefitsIncludedNonContinuous = result.x.result.employeeData.BenefitsIncludedNonContinuous,
|
||||
|
||||
// جمع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول
|
||||
IncludedAndNotIncluded = result.x.result.employeeData.BenefitsIncludedContinuous,
|
||||
|
||||
//حق بیمه سهم بیمه شده
|
||||
InsuranceShare = result.x.result.employeeData.InsuranceShare,
|
||||
|
||||
//اضافه کار فیش حقوقی
|
||||
OverTimePay = result.x.result.employeeData.OverTimePay,
|
||||
|
||||
//حق اولا فیش حقوقی
|
||||
FamilyAllowance = result.x.result.employeeData.FamilyAllowance,
|
||||
});
|
||||
|
||||
|
||||
//.Select(x => new EmployeeDetailsForInsuranceListViewModel
|
||||
@@ -1427,4 +1491,45 @@ public class InsuranceListRepository : RepositoryBase<long, InsuranceList>, IIns
|
||||
|
||||
return res.ToList();
|
||||
}
|
||||
|
||||
public async Task<InsuranceListTabsCountViewModel> GetTabCounts(long accountId, int month, int year)
|
||||
{
|
||||
var workshopIds = _context.WorkshopAccounts
|
||||
.Where(a => a.AccountId == accountId)
|
||||
.Select(a => a.WorkshopId);
|
||||
var res = await _context.InsuranceListSet
|
||||
.Where(x =>
|
||||
x.Year == year.ToString("0000") &&
|
||||
x.Month == month.ToString("00") &&
|
||||
workshopIds.Contains(x.WorkshopId)
|
||||
)
|
||||
.GroupBy(x => 1)
|
||||
.Select(g => new InsuranceListTabsCountViewModel
|
||||
{
|
||||
NotStarted = g.Count(x =>
|
||||
!x.Debt.IsDone && !x.EmployerApproval.IsDone && !x.Inspection.IsDone && !x.ConfirmSentlist),
|
||||
InProgress = g.Count(x =>
|
||||
(x.Debt.IsDone || x.EmployerApproval.IsDone || x.Inspection.IsDone)&& !(x.Debt.IsDone && x.EmployerApproval.IsDone && x.Inspection.IsDone) && !x.ConfirmSentlist),
|
||||
ReadyToSendList = g.Count(x =>
|
||||
x.Debt.IsDone && x.EmployerApproval.IsDone && x.Inspection.IsDone && !x.ConfirmSentlist),
|
||||
Done = g.Count(x => x.ConfirmSentlist)
|
||||
})
|
||||
.FirstOrDefaultAsync() ?? new InsuranceListTabsCountViewModel();
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="year"></param>
|
||||
/// <param name="month"></param>
|
||||
/// <param name="insuranceListId"></param>
|
||||
/// <param name="type">debt / inspection</param>
|
||||
/// <returns></returns>
|
||||
private string GetInsuranceListFilePath(long mediaId)
|
||||
{
|
||||
return _accountContext.Medias.FirstOrDefault(x => x.id == mediaId)?.Path ?? "";
|
||||
}
|
||||
}
|
||||
@@ -3876,7 +3876,6 @@ public class YearlySalaryRepository : RepositoryBase<long, YearlySalary>, IYearl
|
||||
|
||||
return query;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Govermentlist/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mcls/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@@ -770,15 +770,28 @@
|
||||
<i class="ion-plus"></i> <i class="ion-minus" style="display: none;"></i><input type="checkbox" style="display: none" class="open-btn" />
|
||||
</label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> <span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
|
||||
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80217" class="check-btn"> <span style="bottom: 2px;position: relative"> تب انجام نشده </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80218" class="check-btn"> <span style="bottom: 2px;position: relative"> تب در حال انجام </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80219" class="check-btn"> <span style="bottom: 2px;position: relative"> تب آماده ارسال لیست </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80220" class="check-btn"> <span style="bottom: 2px;position: relative"> تب انجام بیمه </span> </label>
|
||||
</div>
|
||||
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> <span style="bottom: 2px;position: relative"> ایجاد </span> </label>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> <span style="bottom: 2px;position: relative"> ایجاد لیست بیمه </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> <span style="bottom: 2px;position: relative"> حذف </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> <span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> <span style="bottom: 2px;position: relative"> مراحل تایید </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> <span style="bottom: 2px;position: relative"> ویرایش </span> </label>
|
||||
|
||||
@@ -783,13 +783,26 @@
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 parentLevel2"> <input type="checkbox" disabled="disabled" value="802" class="check-btn"> <span style="bottom: 2px;position: relative"> صفحه اصلی </span> </label>
|
||||
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> <span style="bottom: 2px;position: relative"> ایجاد </span> </label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80217" class="check-btn"> <span style="bottom: 2px;position: relative"> تب انجام نشده </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80218" class="check-btn"> <span style="bottom: 2px;position: relative"> تب در حال انجام </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80219" class="check-btn"> <span style="bottom: 2px;position: relative"> تب آماده ارسال لیست </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80220" class="check-btn"> <span style="bottom: 2px;position: relative"> تب انجام بیمه </span> </label>
|
||||
</div>
|
||||
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80210" class="check-btn"> <span style="bottom: 2px;position: relative"> ایجاد لیست بیمه </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children "><input type="checkbox" disabled="disabled" value="80211" class="check-btn"> <span style="bottom: 2px;position: relative"> حذف </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> <span style="bottom: 2px;position: relative"> تایید ارسال </span> </label>
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80212" class="check-btn"> <span style="bottom: 2px;position: relative"> مراحل تایید </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="80213" class="check-btn"> <span style="bottom: 2px;position: relative"> ویرایش </span> </label>
|
||||
|
||||
@@ -1013,7 +1013,7 @@ public class IndexModel : PageModel
|
||||
|
||||
public IActionResult OnGetPrintOne(long id)
|
||||
{
|
||||
var res = _checkoutApplication.PrintOne(id);
|
||||
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
|
||||
|
||||
//var res = _contractApplication.PrintAll(ids);
|
||||
if (res.HasRollCall) return Partial("PrintDetailsRollCall", res);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@using _0_Framework.Application
|
||||
@model CompanyManagment.App.Contracts.Checkout.CheckoutViewModel
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
}
|
||||
|
||||
<link href="~/assetsadmin/page/checkouts/css/printdetailsrollcall.css?ver=@adminVersion" rel="stylesheet" />
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="modal-body print" id="printThis">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset style="border: 1px solid black;
|
||||
<fieldset style="border: 1px solid black;
|
||||
padding: revert;
|
||||
border-radius: 10px;
|
||||
height: 28cm;
|
||||
@@ -54,336 +54,336 @@
|
||||
{
|
||||
<span>@Model.FathersName</span>
|
||||
|
||||
}
|
||||
</div>
|
||||
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">به کد ملی<span>:</span></span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
|
||||
{
|
||||
<span style="margin-left: 15px; visibility: hidden"></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
@Model.NationalCode
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">متولد<span>:</span></span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.DateOfBirth))
|
||||
{
|
||||
<span style="visibility: hidden">1401/01/01</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@Model.DateOfBirth</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12" style="font-size: 12px; text-align: justify; padding: 0 10px;">
|
||||
<div style="display: flex;align-items: center;border-bottom: 1px solid #000000 !important;height: 23px; padding: 0;">
|
||||
@{
|
||||
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
||||
{
|
||||
<div style="width: 50%; padding: 3px 0 !important;">
|
||||
<div>
|
||||
<span class="cusSpanTitle">نام کارگاه<span>:</span> </span>
|
||||
<span>@Model.WorkshopName</span>
|
||||
}
|
||||
</div>
|
||||
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">به کد ملی<span>:</span></span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.NationalCode))
|
||||
{
|
||||
<span style="margin-left: 15px; visibility: hidden"></span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
@Model.NationalCode
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<div style="width: 22%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">متولد<span>:</span></span>
|
||||
@if (string.IsNullOrWhiteSpace(@Model.DateOfBirth))
|
||||
{
|
||||
<span style="visibility: hidden">1401/01/01</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@Model.DateOfBirth</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12" style="font-size: 12px; text-align: justify; padding: 0 10px;">
|
||||
<div style="display: flex;align-items: center;border-bottom: 1px solid #000000 !important;height: 23px; padding: 0;">
|
||||
@{
|
||||
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
||||
{
|
||||
<div style="width: 50%; padding: 3px 0 !important;">
|
||||
<div>
|
||||
<span class="cusSpanTitle">نام کارگاه<span>:</span> </span>
|
||||
<span>@Model.WorkshopName</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="width: 50%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">نام کارفرما<span>:</span> </span>
|
||||
@if (Model.EmployerList.Count > 1)
|
||||
{
|
||||
<div style="width: 50%; padding: 3px 0 !important; border-right: 1px solid #000000 !important;">
|
||||
<span class="cusSpanTitle">نام کارفرما<span>:</span> </span>
|
||||
@if (Model.EmployerList.Count > 1)
|
||||
{
|
||||
<span>
|
||||
@Model.EmployerList[0].EmployerFullName <span>،</span>
|
||||
<span> </span>@Model.EmployerList[1].EmployerFullName
|
||||
@if (@Model.EmployerList.Count > 2)
|
||||
{
|
||||
<span>و غیره</span>
|
||||
}
|
||||
</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
@Model.EmployerList.FirstOrDefault().EmployerFullName
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
else if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقوقی")
|
||||
{
|
||||
<div style="width: 100%; padding: 3px 0 !important;">
|
||||
<span class="cusSpanTitle">پـرسنل شرکت/موسسه<span>:</span> </span>
|
||||
<span>
|
||||
@Model.EmployerList[0].EmployerFullName <span>،</span>
|
||||
<span> </span>@Model.EmployerList[1].EmployerFullName
|
||||
@if (@Model.EmployerList.Count > 2)
|
||||
{
|
||||
<span>و غیره</span>
|
||||
}
|
||||
@Model.WorkshopName
|
||||
</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
@Model.EmployerList.FirstOrDefault().EmployerFullName
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div style="text-align: justify; padding: 0 6px;">
|
||||
@{
|
||||
var items = new List<string>();
|
||||
|
||||
if (Model.MonthlySalary != "0") items.Add("حقوق و مزد");
|
||||
if (Model.ConsumableItems != "0") items.Add("کمک هزینه اقلام مصرفی خانوار");
|
||||
if (Model.HousingAllowance != "0") items.Add("کمک هزینه مسکن");
|
||||
if (!string.IsNullOrWhiteSpace(Model.OvertimePay) && Model.OvertimePay != "0") items.Add("فوق العاده اضافه کاری");
|
||||
if (!string.IsNullOrWhiteSpace(Model.NightworkPay) && Model.NightworkPay != "0") items.Add("فوق العاده شب کاری");
|
||||
if (!string.IsNullOrWhiteSpace(Model.FridayPay) && Model.FridayPay != "0") items.Add("فوق العاده جمعه کاری");
|
||||
if (Model.MissionPay != "0") items.Add("فوق العاده ماموریت");
|
||||
if (Model.ShiftPay != "0") items.Add("فوق العاده نوبت کاری");
|
||||
if (Model.FamilyAllowance != "0") items.Add("کمک هزینه عائله مندی");
|
||||
if (Model.MarriedAllowance != "0") items.Add("حق تاهل");
|
||||
if (Model.RewardPay != "0") items.Add("پاداش");
|
||||
if (Model.BonusesPay != "0") items.Add("عیدی و پاداش");
|
||||
if (Model.YearsPay != "0") items.Add("سنوات");
|
||||
if (Model.LeavePay != "0") items.Add("مزد مرخصی");
|
||||
|
||||
string finalText = "";
|
||||
if (items.Count == 1)
|
||||
{
|
||||
finalText = items[0];
|
||||
}
|
||||
else if (items.Count > 1)
|
||||
{
|
||||
finalText = string.Join("<span>،</span> ", items.Take(items.Count - 1)) + " و " + items.Last();
|
||||
}
|
||||
}
|
||||
else if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقوقی")
|
||||
{
|
||||
<div style="width: 100%; padding: 3px 0 !important;">
|
||||
<span class="cusSpanTitle">پـرسنل شرکت/موسسه<span>:</span> </span>
|
||||
<span>
|
||||
@Model.WorkshopName
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
<span>
|
||||
کلیه حق السعی خود اعم از @Html.Raw(finalText) @Model.Month ماه سال @Model.Year برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: justify; padding: 0 6px;">
|
||||
@{
|
||||
var items = new List<string>();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
if (Model.MonthlySalary != "0") items.Add("حقوق و مزد");
|
||||
if (Model.ConsumableItems != "0") items.Add("کمک هزینه اقلام مصرفی خانوار");
|
||||
if (Model.HousingAllowance != "0") items.Add("کمک هزینه مسکن");
|
||||
if (!string.IsNullOrWhiteSpace(Model.OvertimePay) && Model.OvertimePay != "0") items.Add("فوق العاده اضافه کاری");
|
||||
if (!string.IsNullOrWhiteSpace(Model.NightworkPay) && Model.NightworkPay != "0") items.Add("فوق العاده شب کاری");
|
||||
if (!string.IsNullOrWhiteSpace(Model.FridayPay) && Model.FridayPay != "0") items.Add("فوق العاده جمعه کاری");
|
||||
if (Model.MissionPay != "0") items.Add("فوق العاده ماموریت");
|
||||
if (Model.ShiftPay != "0") items.Add("فوق العاده نوبت کاری");
|
||||
if (Model.FamilyAllowance != "0") items.Add("کمک هزینه عائله مندی");
|
||||
if (Model.MarriedAllowance != "0") items.Add("حق تاهل");
|
||||
if (Model.RewardPay != "0") items.Add("پاداش");
|
||||
if (Model.BonusesPay != "0") items.Add("عیدی و پاداش");
|
||||
if (Model.YearsPay != "0") items.Add("سنوات");
|
||||
if (Model.LeavePay != "0") items.Add("مزد مرخصی");
|
||||
|
||||
string finalText = "";
|
||||
if (items.Count == 1)
|
||||
{
|
||||
finalText = items[0];
|
||||
}
|
||||
else if (items.Count > 1)
|
||||
{
|
||||
finalText = string.Join("<span>،</span> ", items.Take(items.Count - 1)) + " و " + items.Last();
|
||||
}
|
||||
}
|
||||
<div class="row m-t-20">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
<span>
|
||||
کلیه حق السعی خود اعم از @Html.Raw(finalText) @Model.Month ماه سال @Model.Year برابر با قرارداد به شماره فوق را از کارفرما بصورت وجه نقد و واریز به حساب دریافت نموده ام.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row m-t-20">
|
||||
<fieldset style="border: 1px solid black !important;-webkit-print-color-adjust: exact;print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 10px;overflow:hidden">
|
||||
<table style="/* table-layout: fixed; */ width: 100%">
|
||||
|
||||
<tr style="border-bottom: 1px solid; height: 25px; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@* <th style="text-align: center; width: 8mm; font-size: 12px; padding: 2px; border-collapse: separate; border-radius: 0px 10px 0px 0px;"> </th> *@
|
||||
<th colspan="4" style="text-align: center; position: relative ; font-size: 13px;padding-top:4px;border-left: 2px solid #000;"> مطالبات </th>
|
||||
@* <th style="text-align: center;"> </th>
|
||||
<tr style="border-bottom: 1px solid; height: 25px; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
@* <th style="text-align: center; width: 8mm; font-size: 12px; padding: 2px; border-collapse: separate; border-radius: 0px 10px 0px 0px;"> </th> *@
|
||||
<th colspan="4" style="text-align: center; position: relative ; font-size: 13px;padding-top:4px;border-left: 2px solid #000;"> مطالبات </th>
|
||||
@* <th style="text-align: center;"> </th>
|
||||
<th style="text-align: center; border-left: 2px solid #000; font-size: 12px"> </th> *@
|
||||
<th colspan="3" style="text-align: center; font-size: 13px; position: relative; padding-top: 4px;"> کسورات </th>
|
||||
@* <th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 0px 0px 0px 0px;"> </th>
|
||||
<th colspan="3" style="text-align: center; font-size: 13px; position: relative; padding-top: 4px;"> کسورات </th>
|
||||
@* <th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 0px 0px 0px 0px;"> </th>
|
||||
<th style="text-align: center; font-size: 12px; border-collapse: separate; border-radius: 10px 0px 0px 0px;"> </th> *@
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important ;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<th style="width: 5%; text-align: center; border-left: 1px solid #000; font-size: 12px;padding: 2px"> ردیف </th>
|
||||
<th style="width: 23%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; border-left: 2px solid #000; font-size: 12px"> مبلغ(ریال) </th>
|
||||
<th style="width: 28%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; font-size: 12px"> مبلغ(ریال) </th>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important ;-webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<th style="width: 5%; text-align: center; border-left: 1px solid #000; font-size: 12px;padding: 2px"> ردیف </th>
|
||||
<th style="width: 23%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; border-left: 2px solid #000; font-size: 12px"> مبلغ(ریال) </th>
|
||||
<th style="width: 28%; text-align: center; border-left: 1px solid #000; font-size: 12px"> شرح </th>
|
||||
<th style="width: 10%; text-align: center; border-left: 1px solid #000; font-size: 9px"> ساعت/روز/تعداد </th>
|
||||
<th style="width: 12%; text-align: center; font-size: 12px"> مبلغ(ریال) </th>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr style="font-size: 12px; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">1</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حقوق و مزد </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.SumOfWorkingDays </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MonthlySalary == "0" ? "-" : Model.MonthlySalary) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق بیمه سهم کارگر </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InsuranceDeduction == "0" ? "-" : Model.InsuranceDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">1</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حقوق و مزد </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.SumOfWorkingDays </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MonthlySalary == "0" ? "-" : Model.MonthlySalary) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق بیمه سهم کارگر </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InsuranceDeduction == "0" ? "-" : Model.InsuranceDeduction) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">2</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پایه سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مالیات بر حقوق </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TaxDeducation == "0" ? "-" : Model.TaxDeducation) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">2</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پایه سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BaseYearsPay == "0" ? "-" : Model.BaseYearsPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مالیات بر حقوق </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TaxDeducation == "0" ? "-" : Model.TaxDeducation) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">3</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000; white-space: nowrap;"> کمک هزینه اقلام مصرفی خانوار </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.ConsumableItems) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> قسط تسهیلات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InstallmentDeduction == "0" ? "-" : Model.InstallmentDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">3</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000; white-space: nowrap;"> کمک هزینه اقلام مصرفی خانوار </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ConsumableItems == "0" ? "-" : Model.ConsumableItems) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> قسط تسهیلات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.InstallmentDeduction == "0" ? "-" : Model.InstallmentDeduction) </td>
|
||||
</tr>
|
||||
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">4</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه مسکن </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.HousingAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مساعده </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.SalaryAidDeduction == "0" ? "-" : Model.SalaryAidDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">5</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده اضافه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverTimeWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverTimeWorkValue)) ? "-" : Model.OverTimeWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.OvertimePay == "0" || string.IsNullOrWhiteSpace(Model.OvertimePay)) ? "-" : Model.OvertimePay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> غیبت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.AbsenceDeduction == "0" ? "-" : Model.AbsenceDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">6</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده شب کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverNightWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverNightWorkValue)) ? "-" : Model.OverNightWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.NightworkPay == "0" || string.IsNullOrWhiteSpace(Model.NightworkPay)) ? "-" : Model.NightworkPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">7</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده جمعه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.FridayWorkValue == "0" || string.IsNullOrWhiteSpace(Model.FridayWorkValue)) ? "-" : Model.FridayWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.FridayPay == "0" || string.IsNullOrWhiteSpace(Model.FridayPay)) ? "-" : Model.FridayPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">8</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده ماموریت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MissionPay == "0" ? "-" : Model.MissionPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">9</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده نوبت کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.RotatingShiftValue == "0" || string.IsNullOrWhiteSpace(Model.RotatingShiftValue)) ? "-" : "%" + Model.RotatingShiftValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ShiftPay == "0" ? "-" : Model.ShiftPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه عائله مندی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.FamilyAllowance == "0" ? "-" : Model.FamilyAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق تاهل </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.MaritalStatus </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MarriedAllowance == "0" ? "-" : Model.MarriedAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">12</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.RewardPay == "0" ? "-" : Model.RewardPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">13</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی و پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
|
||||
|
||||
@{
|
||||
if (Model.IsLeft)
|
||||
{
|
||||
<td style="text-align: center; background-color: #ffffff !important;" colspan="3" rowspan="3">
|
||||
<div style="border-top: 1px solid #000;border-top-left-radius: 15px;border-top-right-radius: 15px; height: 65px;">
|
||||
<div style="padding: 0 6px; text-align: start;display: block;align-items: center;height: 64px;margin: 6px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span>
|
||||
<span>@Model.LastDayOfWork</span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span>
|
||||
<span>@Model.LeftWorkDate</span>
|
||||
<span>می باشد</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">4</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه مسکن </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.HousingAllowance == "0" ? "-" : Model.HousingAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مساعده </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.SalaryAidDeduction == "0" ? "-" : Model.SalaryAidDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">5</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده اضافه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverTimeWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverTimeWorkValue)) ? "-" : Model.OverTimeWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.OvertimePay == "0" || string.IsNullOrWhiteSpace(Model.OvertimePay)) ? "-" : Model.OvertimePay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> غیبت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.AbsenceDeduction == "0" ? "-" : Model.AbsenceDeduction) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">6</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده شب کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.OverNightWorkValue == "00:00" || string.IsNullOrWhiteSpace(Model.OverNightWorkValue)) ? "-" : Model.OverNightWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.NightworkPay == "0" || string.IsNullOrWhiteSpace(Model.NightworkPay)) ? "-" : Model.NightworkPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">14</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.SumOfWorkingDays)</td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.YearsPay) </td>
|
||||
|
||||
@{
|
||||
if (!Model.IsLeft)
|
||||
{
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">7</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده جمعه کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.FridayWorkValue == "0" || string.IsNullOrWhiteSpace(Model.FridayWorkValue)) ? "-" : Model.FridayWorkValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @((Model.FridayPay == "0" || string.IsNullOrWhiteSpace(Model.FridayPay)) ? "-" : Model.FridayPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">15</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
|
||||
|
||||
@{
|
||||
if (!Model.IsLeft)
|
||||
{
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">8</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده ماموریت </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MissionPay == "0" ? "-" : Model.MissionPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
|
||||
<td style="text-align: center; padding: 2px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع مطالبات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalClaims == "0" ? "-" : Model.TotalClaims) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع کسورات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TotalDeductions == "0" ? "-" : Model.TotalDeductions) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; border-radius: 0px 0px 10px 10px !important; height: 20px; background-color: #efefef !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; padding: 2px; border-radius: 0px 0px 10px 0px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000; "> مبلغ قابل پرداخت </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalPayment == "0" ? "-" : Model.TotalPayment) </td>
|
||||
<td style="padding-right: 8px;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-radius:0px 0px 0px 10px"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">9</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> فوق العاده نوبت کاری </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @((Model.RotatingShiftValue == "0" || string.IsNullOrWhiteSpace(Model.RotatingShiftValue)) ? "-" : "%" + Model.RotatingShiftValue) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.ShiftPay == "0" ? "-" : Model.ShiftPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">10</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> کمک هزینه عائله مندی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.FamilyAllowance == "0" ? "-" : Model.FamilyAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">11</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> حق تاهل </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @Model.MaritalStatus </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.MarriedAllowance == "0" ? "-" : Model.MarriedAllowance) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">12</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.RewardPay == "0" ? "-" : Model.RewardPay) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">13</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> عیدی و پاداش </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.BonusesPay == "0" ? "-" : Model.BonusesPay) </td>
|
||||
|
||||
@{
|
||||
if (Model.IsLeft)
|
||||
{
|
||||
<td style="text-align: center; background-color: #ffffff !important;" colspan="3" rowspan="3">
|
||||
<div style="border-top: 1px solid #000;border-top-left-radius: 15px;border-top-right-radius: 15px; height: 65px;">
|
||||
<div style="padding: 0 6px; text-align: start;display: block;align-items: center;height: 64px;margin: 6px;">
|
||||
<span>طبق تصفیه حساب نهایی تنظیمی فوق، آخرین روز اشتغال بکار اینجانب</span>
|
||||
<span>@Model.LastDayOfWork</span>
|
||||
<span>بوده و قطع همکاری با کارفرما و کارگاه از تاریخ</span>
|
||||
<span>@Model.LeftWorkDate</span>
|
||||
<span>می باشد</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
|
||||
</tr>
|
||||
<tr style="font-size: 12px; background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">14</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> سنوات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.SumOfWorkingDays)</td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.YearsPay == "0" ? "-" : Model.YearsPay) </td>
|
||||
|
||||
@{
|
||||
if (!Model.IsLeft)
|
||||
{
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr style="font-size: 12px;">
|
||||
<td style="text-align: center; border-left: 1px solid #000; padding: 2px ">15</td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> مزد مرخصی </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.SumOfWorkingDays) </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.LeavePay == "0" ? "-" : Model.LeavePay) </td>
|
||||
|
||||
@{
|
||||
if (!Model.IsLeft)
|
||||
{
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center;"> </td>
|
||||
}
|
||||
}
|
||||
</tr>
|
||||
<tr style="font-size: 12px; height: 20px; background-color: #dddcdc !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; border-bottom: 1px solid #000; border-top: 1px solid #000; ">
|
||||
<td style="text-align: center; padding: 2px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع مطالبات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalClaims == "0" ? "-" : Model.TotalClaims) </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> جمع کسورات </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> - </td>
|
||||
<td style="text-align: center;"> @(Model.TotalDeductions == "0" ? "-" : Model.TotalDeductions) </td>
|
||||
</tr>
|
||||
<tr style="font-size: 12px; border-radius: 0px 0px 10px 10px !important; height: 20px; background-color: #efefef !important; -webkit-print-color-adjust: exact;print-color-adjust: exact; ">
|
||||
<td style="text-align: center; padding: 2px; border-radius: 0px 0px 10px 0px "></td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000; "> مبلغ قابل پرداخت </td>
|
||||
<td style="padding-right: 8px; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-left: 2px solid #000;"> @(Model.TotalPayment == "0" ? "-" : Model.TotalPayment) </td>
|
||||
<td style="padding-right: 8px;"> </td>
|
||||
<td style="text-align: center; border-left: 1px solid #000;"> </td>
|
||||
<td style="text-align: center; border-radius:0px 0px 0px 10px"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div style="">
|
||||
<div class="" style="margin-top: 8px;background-color: #F6F6F6 !important;border: 1px solid #000;border-radius: 10px;display: grid;gap: 8px;padding: 8px 0;-webkit-print-color-adjust: exact;print-color-adjust: exact;padding: 6px;grid-template-columns: repeat(2, minmax(0, 1fr));width: 100%;">
|
||||
@@ -580,47 +580,47 @@
|
||||
|
||||
<div class="" style="margin: 10px 0 0 0;display: flex;gap: 0px;">
|
||||
<div style="width: 65%;">
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
|
||||
|
||||
<div class="table-container">
|
||||
<table style="width: 100%;">
|
||||
<colgroup>
|
||||
<col style="width: 50%;">
|
||||
<col style="width: 50%;">
|
||||
</colgroup>
|
||||
<div class="table-container">
|
||||
<table style="width: 100%;">
|
||||
<colgroup>
|
||||
<col style="width: 50%;">
|
||||
<col style="width: 50%;">
|
||||
</colgroup>
|
||||
|
||||
<tr style="text-align: center; font-size: 10px; padding: 1px 4px; height: 15px; border-bottom: 1px solid; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<th colspan="3" style="text-align: center; font-size: 11px;">مساعده</th>
|
||||
</tr>
|
||||
<tr style="text-align: center; font-size: 10px; padding: 1px 4px; height: 15px; border-bottom: 1px solid; border-collapse: separate; background-color: #cdcdcd !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;">
|
||||
<th colspan="3" style="text-align: center; font-size: 11px;">مساعده</th>
|
||||
</tr>
|
||||
|
||||
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9px; height: 15px;">
|
||||
<th style="padding: 1px 4px; text-align: center; border-left: 1px solid black; min-width: 3rem; font-size: 11px;">تاریخ</th>
|
||||
<th style="padding: 1px 4px; text-align: center; min-width: 4rem; font-size: 11px;">مبلغ</th>
|
||||
</tr>
|
||||
<tr style="border-bottom: 1px solid; background-color: #e1e1e1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; font-size: 9px; height: 15px;">
|
||||
<th style="padding: 1px 4px; text-align: center; border-left: 1px solid black; min-width: 3rem; font-size: 11px;">تاریخ</th>
|
||||
<th style="padding: 1px 4px; text-align: center; min-width: 4rem; font-size: 11px;">مبلغ</th>
|
||||
</tr>
|
||||
|
||||
@for (int i = 0; i < 5; i++)
|
||||
{
|
||||
<tr class="trTable" style="text-align: right; font-size: 10px; height: 15px;">
|
||||
<td style="font-size: 8px; text-align: center;border-left: 1px solid black">
|
||||
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
|
||||
? Model.SalaryAidViewModels[i]?.SalaryAidDateTimeFa ?? ""
|
||||
: "")
|
||||
</td>
|
||||
<td style="font-size: 8px; text-align: center;">
|
||||
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
|
||||
? Model.SalaryAidViewModels[i]?.Amount ?? ""
|
||||
: "")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@for (int i = 0; i < 5; i++)
|
||||
{
|
||||
<tr class="trTable" style="text-align: right; font-size: 10px; height: 15px;">
|
||||
<td style="font-size: 8px; text-align: center;border-left: 1px solid black">
|
||||
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
|
||||
? Model.SalaryAidViewModels[i]?.SalaryAidDateTimeFa ?? ""
|
||||
: "")
|
||||
</td>
|
||||
<td style="font-size: 8px; text-align: center;">
|
||||
@(Model.SalaryAidViewModels != null && i < Model.SalaryAidViewModels.Count
|
||||
? Model.SalaryAidViewModels[i]?.Amount ?? ""
|
||||
: "")
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
</table>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset style="border: 1px solid black !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-radius: 10px 10px 10px 10px; margin: 0px 0px; overflow: hidden; padding: 0; display: flex; width: 50%;">
|
||||
|
||||
<div class="table-container">
|
||||
@@ -680,7 +680,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -690,7 +690,7 @@
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
|
||||
|
||||
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">
|
||||
<input type="hidden" id="shiftWorkval" name="shiftWorkval" value="@Model.CreateWorkingHoursTemp.ShiftWork">
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -297,7 +297,22 @@
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#workshops').on('submit', function (e) {
|
||||
var $submitBtn = $(this).find('button[type="submit"]');
|
||||
|
||||
if ($submitBtn.prop('disabled')) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
$submitBtn.prop('disabled', true);
|
||||
|
||||
setTimeout(function () {
|
||||
$submitBtn.prop('disabled', false);
|
||||
}, 3000);
|
||||
});
|
||||
});
|
||||
$(".select2-tag").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
|
||||
@@ -2,23 +2,34 @@
|
||||
@Html.AntiForgeryToken()
|
||||
|
||||
@{
|
||||
<style>
|
||||
<style>
|
||||
.modal-content {
|
||||
height: 847px !important;
|
||||
}
|
||||
|
||||
.select2.select2-container .select2-selection {
|
||||
border: 1px solid #aeaeae;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
min-height: 50px !important;
|
||||
padding: 6px 8px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@media (max-width: 1550px) {
|
||||
.modal-content {
|
||||
height: 847px !important;
|
||||
height: 655px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 1550px) {
|
||||
.modal-content {
|
||||
height: 655px !important;
|
||||
}
|
||||
@@media (max-width: 1370px) {
|
||||
.modal-content {
|
||||
height: 582px !important;
|
||||
}
|
||||
|
||||
@@media (max-width: 1370px) {
|
||||
.modal-content {
|
||||
height: 582px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="container">
|
||||
@@ -36,7 +47,7 @@
|
||||
<div class="row form" style="width: 100%;">
|
||||
|
||||
<input type="hidden" class="input td-ellipsis" id="isLegal" />
|
||||
<input type="hidden" class="input " id="hfTypeOfInsuranceSendWorkshop" />
|
||||
<input type="hidden" class="input" id="hfTypeOfInsuranceSendWorkshop" />
|
||||
<input type="hidden" class="input" id="hfFixedSalary">
|
||||
<input type="hidden" class="input" id="hfPopulation">
|
||||
<input type="hidden" class="input" id="hfInsuranceJobId">
|
||||
@@ -44,7 +55,7 @@
|
||||
<div class="col-md-3 col-3 col-sm-3 inputs" id="karfarma-container" disabled>
|
||||
<input type="text" class="input td-ellipsis" id="karfarma" />
|
||||
</div>
|
||||
<div id="divWorkshopId" class="col-md-3 col-3 col-sm-3 inputs ">
|
||||
<div id="divWorkshopId" class="col-md-3 col-3 col-sm-3 inputs">
|
||||
<select class="input select-city" asp-for="@Model.WorkshopId" onchange="getEmployerAndWorkshopInfo(this.value);" asp-items="@Model.WorkShopSelectList">
|
||||
<option value="0" selected hidden> کارگاه </option>
|
||||
</select>
|
||||
@@ -77,7 +88,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-12 col-sm-12 inputs">
|
||||
<div class="col-md-12 col-12 col-sm-12 inputs" style="padding: 0 18px;height: 45px">
|
||||
@* <select name="dropdown5" id="workshops" asp-for="@Model.WorkshopIds" asp-items='@Model.WorkShopSelectList' class="input multi-drop text-right select-city2" multiple>
|
||||
<option value="0" disabled hidden> کارگاه ها </option>
|
||||
</select>*@
|
||||
@@ -87,7 +98,7 @@
|
||||
</div>
|
||||
<!--اطلاعات کارگاه-->
|
||||
<div class="col-md-12 col-12 col-sm-12 form-box" id="divInsuranceWorkshopInfo">
|
||||
@* <div class="d-flex">
|
||||
@* <div class="d-flex">
|
||||
<span class="form-title">کپی از آخرین لیست ارسالی </span>
|
||||
<div id="resultExistPersonel" class="alert alert-danger" style="display:none"></div>
|
||||
</div> *@
|
||||
@@ -127,7 +138,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-md-12 col-12 col-sm-12 sml-pad">
|
||||
<ul class="nav nav-tabs" style="margin-right: -36px;">
|
||||
<ul class="nav nav-tabs" style="margin-right: 4px;">
|
||||
<li class="active pull-right DSSKAR">
|
||||
<a href="#DSSKAR" data-toggle="tab">DSSKAR</a>
|
||||
</li>
|
||||
@@ -137,87 +148,87 @@
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="DSSKAR">
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> تعداد نفرات </label>
|
||||
<input type="text" placeholder="" id="txtSumOfEmployees" asp-for="SumOfEmployees" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع پایه سنواتی </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBaseYears" asp-for="SumOfBaseYears" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع روزهای کارکرد کل پرسنل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfWorkingDays" asp-for="SumOfWorkingDays" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد و مزایای ماهانه مشمول </label>
|
||||
<input type="text" placeholder="" id="txtIncluded" asp-for="Included" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد روزانه کل پرسنل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfDailyWage" asp-for="SumOfDailyWage" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع مزایای ماهانه غیرمشمول </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncludedNonContinuous" value="0" name="SumOfBenefitsIncludedNonContinuous" class="input yellow col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع دستمزد روزانه <br/> (دستمزد روزانه + پایه سنواتی) </label>
|
||||
<input type="text" placeholder="" id="txtSumOfDailyWagePlusBaseYears" value="0" name="SumOfDailyWagePlusBaseYears" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد و مزایای ماهانه مشمول و غیرمشمول (ریال) </label>
|
||||
<input type="text" placeholder="" id="txtIncludedAndNotIncluded" asp-for="IncludedAndNotIncluded" class="input yellow col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد ماهانه (حقوق ماهانه) </label>
|
||||
<input type="text" placeholder="" id="txtSumOfSalaries" asp-for="SumOfSalaries" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه سهم بیمه شده (7%) </label>
|
||||
<input type="text" placeholder="" id="txtInsuredShare" asp-for="InsuredShare" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع حق تاهل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfMarriedAllowance" asp-for="SumOfMarriedAllowance" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه سهم کارفرما (20%) </label>
|
||||
<input type="text" placeholder="" id="txtEmployerShare" asp-for="EmployerShare" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع مزایای ماهیانه مشمول </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncluded" asp-for="SumOfBenefitsIncluded" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
<label class="col-md-10 col-10 col-sm-10"> تعداد نفرات </label>
|
||||
<input type="text" placeholder="" id="txtSumOfEmployees" asp-for="SumOfEmployees" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه بیکاری (3%) </label>
|
||||
<input type="text" placeholder="" id="txtUnEmploymentInsurance" asp-for="UnEmploymentInsurance" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع پایه سنواتی </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBaseYears" asp-for="SumOfBaseYears" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع روزهای کارکرد کل پرسنل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfWorkingDays" asp-for="SumOfWorkingDays" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد و مزایای ماهانه مشمول </label>
|
||||
<input type="text" placeholder="" id="txtIncluded" asp-for="Included" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد روزانه کل پرسنل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfDailyWage" asp-for="SumOfDailyWage" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع مزایای ماهانه غیرمشمول </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncludedNonContinuous" value="0" name="SumOfBenefitsIncludedNonContinuous" class="input yellow col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع دستمزد روزانه <br /> (دستمزد روزانه + پایه سنواتی) </label>
|
||||
<input type="text" placeholder="" id="txtSumOfDailyWagePlusBaseYears" value="0" name="SumOfDailyWagePlusBaseYears" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد و مزایای ماهانه مشمول و غیرمشمول (ریال) </label>
|
||||
<input type="text" placeholder="" id="txtIncludedAndNotIncluded" asp-for="IncludedAndNotIncluded" class="input yellow col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> جمع دستمزد ماهانه (حقوق ماهانه) </label>
|
||||
<input type="text" placeholder="" id="txtSumOfSalaries" asp-for="SumOfSalaries" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه سهم بیمه شده (7%) </label>
|
||||
<input type="text" placeholder="" id="txtInsuredShare" asp-for="InsuredShare" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع حق تاهل </label>
|
||||
<input type="text" placeholder="" id="txtSumOfMarriedAllowance" asp-for="SumOfMarriedAllowance" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه سهم کارفرما (20%) </label>
|
||||
<input type="text" placeholder="" id="txtEmployerShare" asp-for="EmployerShare" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع مزایای ماهیانه مشمول </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncluded" asp-for="SumOfBenefitsIncluded" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10"> حق بیمه بیکاری (3%) </label>
|
||||
<input type="text" placeholder="" id="txtUnEmploymentInsurance" asp-for="UnEmploymentInsurance" class="input blue col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6" style="display: none">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group" style="display: none">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> 4% سخت و زیان آور </label>
|
||||
<input type="text" placeholder="" id="txtDifficultJobsInsuranc" asp-for="DifficultJobsInsuranc" class="input green col-md-2 col-2 col-sm-2">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tab-pane" id="DSKWOR">
|
||||
<div id="table-container">
|
||||
@@ -346,9 +357,9 @@
|
||||
<div class="s9s">
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
<label for="WorkingDays"> روزهای کارکرد</label>
|
||||
@* <input type="number" min="0" max="31" class="input s7 " id="WorkingDays" autocomplete="off" onkeyup="getMonthlySalaryByWorkingDays()" name="WorkingDays" maxlength="2"> *@
|
||||
<input type="number" min="0" max="31" class="input s7 " id="WorkingDays" autocomplete="off" onkeyup="changeWorkingDays()" name="WorkingDays" maxlength="2">
|
||||
<input type="hidden" class="input s7 " id="OldWorkingDays" maxlength="2">
|
||||
@* <input type="number" min="0" max="31" class="input s7" id="WorkingDays" autocomplete="off" onkeyup="getMonthlySalaryByWorkingDays()" name="WorkingDays" maxlength="2"> *@
|
||||
<input type="number" min="0" max="31" class="input s7" id="WorkingDays" autocomplete="off" onkeyup="changeWorkingDays()" name="WorkingDays" maxlength="2">
|
||||
<input type="hidden" class="input s7" id="OldWorkingDays" maxlength="2">
|
||||
<input type="hidden" class="input s7" id="HousingAllowance" name="HousingAllowance">
|
||||
<input type="hidden" class="input s7" id="ConsumableItems" name="ConsumableItems">
|
||||
<input type="hidden" class="input s7" id="EndMonthCurrentDay" name="EndMonthCurrentDay">
|
||||
@@ -360,8 +371,8 @@
|
||||
</div>
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
<label for="DailyWage">دستمزد روزانه</label>
|
||||
<input type="text" class="input s7 " id="DailyWage" name="DailyWage" autocomplete="off" onkeyup="changeDailyWage();getMoneyValue(this);">
|
||||
<input type="hidden" class="input s7 " id="yearlySalaryItem">
|
||||
<input type="text" class="input s7" id="DailyWage" name="DailyWage" autocomplete="off" onkeyup="changeDailyWage();getMoneyValue(this);">
|
||||
<input type="hidden" class="input s7" id="yearlySalaryItem">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
@@ -402,7 +413,7 @@
|
||||
<input type="hidden" class="input" id="LeftWorkDateGr" name="LeftWorkDateGr" autocomplete="off" style="background-color: #f7aeae;">
|
||||
</div>
|
||||
</div>
|
||||
<div id="divComputing" class="col-md-12 col-12 text-center ">
|
||||
<div id="divComputing" class="col-md-12 col-12 text-center">
|
||||
<button type="button" id="btnComputing" onclick="computing()" disabled="disabled" class="btn modal2-btn insurance-disabled btn-primary">محاسبه </button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -419,9 +430,9 @@
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="col-md-5">
|
||||
<a href="#" class=" btn btn-modal" id="save">ذخیره</a>
|
||||
<a href="#" class=" btn btn-modal btn-text-disable" style="display: none" id="fakeSave">ذخیره</a>
|
||||
@*<button type="submit" class=" btn btn-modal" id="saveData" style="display: none">ذخیره</button>*@
|
||||
<a href="#" class="btn btn-modal" id="save">ذخیره</a>
|
||||
<a href="#" class="btn btn-modal btn-text-disable" style="display: none" id="fakeSave">ذخیره</a>
|
||||
@*<button type="submit" class="btn btn-modal" id="saveData" style="display: none">ذخیره</button>*@
|
||||
<button class="btn btn-modal" id="close" data-dismiss="modal">بستن</button>
|
||||
|
||||
</div>
|
||||
@@ -727,12 +738,12 @@
|
||||
var employeeId = $(this).attr("data-employeeid");
|
||||
|
||||
if (employeeId == id) {
|
||||
|
||||
|
||||
$(this).find('td:eq(1)').text($('#LeftWorkDate').val());
|
||||
$(this).find('td:eq(2)').text($('#StartWorkDate').val());
|
||||
$(this).find('td:eq(3)').text(jobName);
|
||||
$(this).find('td:eq(4)').text($('#InsuranceShare').val());
|
||||
|
||||
|
||||
var monthlySalaryPlusBaseyear = getNumberValue($('#hiddenMonthlySalaryPlusBaseYear').val());
|
||||
var benefitsIncludedContinuous = getNumberValue($('#BenefitsIncludedContinuous').val());
|
||||
var benefitsIncluded = Number(monthlySalaryPlusBaseyear) + Number(benefitsIncludedContinuous);
|
||||
@@ -757,10 +768,10 @@
|
||||
$(this).find('td:eq(7)').attr('data-monthlybenefits', benefitsIncludedContinuous);
|
||||
|
||||
$(this).find('td:eq(8)').text($('#hiddenMonthlySalaryPlusBaseYear').val());
|
||||
$(this).find('td:eq(8)').attr("data-monthlysalary", monthlySalaryPlusBaseyear);
|
||||
$(this).find('td:eq(8)').attr("data-monthlysalary", monthlySalaryPlusBaseyear);
|
||||
$(this).find('td:eq(8)').attr("data-MonthlySalaryPlusBaseyear", monthlySalaryPlusBaseyear);
|
||||
|
||||
$(this).find('td:eq(11)').text($('#DailyWage').val());
|
||||
$(this).find('td:eq(11)').text($('#DailyWage').val());
|
||||
$(this).find('td:eq(11)').attr("data-dailywage", getNumberValue($('#DailyWage').val()));
|
||||
$(this).find('td:eq(11)').attr("data-DailyWagePlusBaseYears", getNumberValue($('#hiddendaailyWagePlusBaseYear').val()));
|
||||
|
||||
@@ -781,7 +792,7 @@
|
||||
var marriedAllowance = getNumberValue($('#hiddenMarriedAllowance').val());
|
||||
$(this).find('td:eq(9)').text($('#hiddenMarriedAllowance').val());
|
||||
$(this).find('td:eq(9)').attr("data-MarriedAllowance", marriedAllowance);
|
||||
|
||||
|
||||
var baseYears = getNumberValue($('#hiddenBaseYearToEditModal').val());
|
||||
$(this).find('td:eq(10)').text($('#hiddenBaseYearToEditModal').val());
|
||||
$(this).find('td:eq(10)').attr("data-BaseYears", baseYears);
|
||||
@@ -1041,12 +1052,15 @@
|
||||
employeeDetails.IncludedAndNotIncluded = Number($(this).find('td:eq(5)').attr('data-includedandnotincluded'));
|
||||
employeeDetails.InsuranceShare = Number($(this).find('td:eq(4)').attr('data-insuranceshare'));
|
||||
employeeDetails.WorkingDays = Number($(this).find('td:eq(12)').text());
|
||||
|
||||
|
||||
employeeDetails.MarriedAllowance = Number($(this).find('td:eq(9)').attr('data-MarriedAllowance'));
|
||||
employeeDetails.BaseYears = Number($(this).find('td:eq(10)').attr('data-BaseYears'));
|
||||
employeeDetails.DailyWagePlusBaseYears = Number($(this).find('td:eq(11)').attr('data-DailyWagePlusBaseYears'));
|
||||
employeeDetails.BenefitsIncludedNonContinuous = Number($(this).find('td:eq(5)').attr('data-BenefitsIncludedNonContinuous'));
|
||||
|
||||
employeeDetails.Year = $("#Year").val();
|
||||
employeeDetails.Month = $("#ddlMonth").val();
|
||||
|
||||
|
||||
employeeDetailsForInsuranceList.push(employeeDetails);
|
||||
});
|
||||
|
||||
@@ -1088,7 +1102,7 @@
|
||||
$('#txtSumOfMarriedAllowance').val(response.sumOfMarriedAllowance);
|
||||
$('#txtSumOfDailyWagePlusBaseYears').val(response.sumOfDailyWagePlusBaseYears);
|
||||
$('#txtSumOfBenefitsIncludedNonContinuous').val(response.sumOfBenefitsIncludedNonContinuous);
|
||||
|
||||
|
||||
console.log(response.sumOfBenefitsIncludedNonContinuous);
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -1240,7 +1254,7 @@
|
||||
|
||||
$("#divEmployeeInsurancListData").append(`<input type="hidden" name="SumOfBaseYears" id="SumOfBaseYears" value="${getNumberValue($("#txtSumOfBaseYears").val())}" />`);
|
||||
$("#divEmployeeInsurancListData").append(`<input type="hidden" name="SumOfMarriedAllowance" id="SumOfMarriedAllowance" value="${getNumberValue($("#txtSumOfMarriedAllowance").val())}" />`);
|
||||
|
||||
|
||||
//$("#divEmployeeInsurancListData").append('<input type="hidden" name="InsuranceWorkshopInfo.FixedSalary" id="InsuranceWorkshopInfo_FixedSalary" value="'+fixedSalary+'" />');
|
||||
//$("#divEmployeeInsurancListData").append('<input type="hidden" name="InsuranceWorkshopInfo.Population" id="InsuranceWorkshopInfo_Population" value="'+population+'" />');
|
||||
|
||||
@@ -1369,7 +1383,17 @@
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
$("#MainModal").modal('hide');
|
||||
$('.btn-search1').click();
|
||||
// $('.btn-search1').click();
|
||||
|
||||
// Reload Function
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
$('#load-data-html').html('');
|
||||
loadGetTabCounts();
|
||||
loadSearchNew(activeValue);
|
||||
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,17 @@
|
||||
height: 847px !important;
|
||||
}
|
||||
|
||||
.select2.select2-container .select2-selection {
|
||||
border: 1px solid #aeaeae;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
min-height: 50px !important;
|
||||
padding: 6px 8px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@media (max-width: 1550px) {
|
||||
.modal-content {
|
||||
height: 655px !important;
|
||||
@@ -18,7 +29,6 @@
|
||||
height: 582px !important;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -37,7 +47,7 @@
|
||||
data-ajax="true">
|
||||
<div id="divEmployeeInsurancListData"></div>
|
||||
<input type="hidden" class="input td-ellipsis" id="isLegal"/>
|
||||
<input type="hidden" class="input " id="hfTypeOfInsuranceSendWorkshop" value="@Model.TypeOfInsuranceSend"/>
|
||||
<input type="hidden" class="input" id="hfTypeOfInsuranceSendWorkshop" value="@Model.TypeOfInsuranceSend"/>
|
||||
<input type="hidden" class="input" id="hfFixedSalary" value="@Model.FixedSalary" >
|
||||
<input type="hidden" class="input" id="hfPopulation" value="@Model.Population" >
|
||||
<input type="hidden" class="input" id="hfInsuranceJobId" >*@
|
||||
@@ -47,9 +57,9 @@
|
||||
<div class="col-md-3 col-3 col-sm-3 inputs" id="karfarma-container" disabled>
|
||||
<input type="text" class="input td-ellipsis" id="karfarma"/>
|
||||
</div>
|
||||
<div id="divWorkshopId" class="col-md-3 col-3 col-sm-3 inputs ">
|
||||
<div id="divWorkshopId" class="col-md-3 col-3 col-sm-3 inputs">
|
||||
<input type="text" class="input" asp-for="@Model.WorkshopName" disabled/>
|
||||
<input type="hidden" class="input " asp-for="@Model.WorkshopId"/>
|
||||
<input type="hidden" class="input" asp-for="@Model.WorkshopId"/>
|
||||
@* <select class="input select-city" disabled="disabled" asp-for="@Model.WorkshopId" asp-items='@Model.WorkShopSelectList'>
|
||||
<option value="0" selected hidden> کارگاه </option>
|
||||
</select>
|
||||
@@ -79,7 +89,7 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-12 col-sm-12 inputs">
|
||||
<div class="col-md-12 col-12 col-sm-12 inputs" style="padding: 0 18px;height: 45px">
|
||||
@* <select name="dropdown5" id="workshops" asp-for="@Model.WorkshopIds" asp-items='@Model.WorkShopSelectList' class="input multi-drop text-right select-city2" multiple>
|
||||
<option value="0" disabled hidden> کارگاه ها </option>
|
||||
</select>*@
|
||||
@@ -95,7 +105,7 @@
|
||||
</div> *@
|
||||
|
||||
<div class="col-md-3 col-3 col-sm-3 inputs">
|
||||
<input type="hidden" class="input green input-field" asp-for="@Model.InsuranceWorkshopInfo.InsuranceWorkshopInfoId">
|
||||
<input type="hidden" class="input green input-field" asp-for="@Model.InsuranceWorkshopInfo.InsuranceWorkshopInfoId">
|
||||
<input type="text" class="input green notEmpty input-field" asp-for="@Model.InsuranceWorkshopInfo.WorkshopName" placeholder="نام کارگاه">
|
||||
</div>
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs">
|
||||
@@ -128,7 +138,7 @@
|
||||
<input type="hidden" class="input green" value="" id="InsuranceWorkshopInfo_ListNumber" name="InsuranceWorkshopInfo.ListNumber">
|
||||
</div>
|
||||
<div class="col-md-12 col-12 col-sm-12 sml-pad">
|
||||
<ul class="nav nav-tabs" style="margin-right: -36px;">
|
||||
<ul class="nav nav-tabs" style="margin-right: 4px;">
|
||||
<li class="active pull-right DSSKAR">
|
||||
<a href="#DSSKAR" data-toggle="tab">DSSKAR</a>
|
||||
</li>
|
||||
@@ -200,7 +210,7 @@
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
<label class="col-md-10 col-10 col-sm-10 text-small"> جمع مزایای ماهیانه مشمول </label>
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncluded" asp-for="SumOfBenefitsIncluded" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
<input type="text" placeholder="" id="txtSumOfBenefitsIncluded" asp-for="SumOfBenefitsIncluded" class="input green col-md-2 col-2 col-sm-2 notEmpty">
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-6 col-sm-6 inputs-group">
|
||||
@@ -262,7 +272,7 @@
|
||||
<label for="LName"> نام خانوادگی</label>
|
||||
<input type="text" class="input f9" id="LName" name="LName" autocomplete="off">
|
||||
</div>
|
||||
<div class="col-md-4 col-4 col-sm-4 " style="padding:10px">
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
|
||||
<label for="Gender"> جنسیت </label>
|
||||
<input type="text" class="input f9" id="Gender" name="Gender" autocomplete="off">
|
||||
@@ -292,8 +302,8 @@
|
||||
<div class="s9s">
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
<label for="WorkingDays"> روزهای کارکرد</label>
|
||||
<input type="number" min="0" max="31" class="input s7 " id="WorkingDays" autocomplete="off" onkeyup="changeDailyWage();" name="WorkingDays">
|
||||
<input type="hidden" class="input s7 " id="OldWorkingDays" maxlength="2">
|
||||
<input type="number" min="0" max="31" class="input s7" id="WorkingDays" autocomplete="off" onkeyup="changeDailyWage();" name="WorkingDays">
|
||||
<input type="hidden" class="input s7" id="OldWorkingDays" maxlength="2">
|
||||
<input type="hidden" class="input s7" id="HousingAllowance" name="HousingAllowance">
|
||||
<input type="hidden" class="input s7" id="ConsumableItems" name="ConsumableItems">
|
||||
<input type="hidden" class="input s7" id="EndMonthCurrentDay" name="EndMonthCurrentDay">
|
||||
@@ -305,8 +315,8 @@
|
||||
</div>
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
<label for="DailyWage">دستمزد روزانه</label>
|
||||
<input type="text" class="input s7 " id="DailyWage" name="DailyWage" autocomplete="off" onkeyup="changeDailyWage();getMoneyValue(this);">
|
||||
<input type="hidden" class="input s7 " id="yearlySalaryItem">
|
||||
<input type="text" class="input s7" id="DailyWage" name="DailyWage" autocomplete="off" onkeyup="changeDailyWage();getMoneyValue(this);">
|
||||
<input type="hidden" class="input s7" id="yearlySalaryItem">
|
||||
</div>
|
||||
<div class="col-md-4 col-4 col-sm-4" style="padding:10px">
|
||||
<label for="MonthlySalary"> حقوق ماهیانه + پایه سنوات </label>
|
||||
@@ -342,7 +352,7 @@
|
||||
<input type="hidden" class="input" id="LeftWorkDateGr" name="LeftWorkDateGr" autocomplete="off" style="background-color: #f7aeae;">
|
||||
</div>
|
||||
</div>
|
||||
<div id="divComputing" class="col-md-12 col-12 text-center ">
|
||||
<div id="divComputing" class="col-md-12 col-12 text-center">
|
||||
<button type="button" id="btnComputing" onclick="computing()" disabled="disabled" class="btn insurance-disabled modal2-btn btn-primary">محاسبه </button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -358,9 +368,9 @@
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="col-md-5">
|
||||
<a href="#" class=" btn btn-modal" id="save">ویرایش</a>
|
||||
<a href="#" class=" btn btn-modal btn-text-disable" style="display: none" id="fakeSave">ذخیره</a>
|
||||
@*<button type="submit" class=" btn btn-modal" id="saveData" style="display: none">ذخیره</button>*@
|
||||
<a href="#" class="btn btn-modal" id="save">ویرایش</a>
|
||||
<a href="#" class="btn btn-modal btn-text-disable" style="display: none" id="fakeSave">ذخیره</a>
|
||||
@*<button type="submit" class="btn btn-modal" id="saveData" style="display: none">ذخیره</button>*@
|
||||
<button class="btn btn-modal" id="close" data-dismiss="modal">بستن</button>
|
||||
|
||||
</div>
|
||||
@@ -766,7 +776,8 @@
|
||||
employeeDetails.BaseYears = Number($(this).find('td:eq(10)').attr('data-BaseYears'));
|
||||
employeeDetails.DailyWagePlusBaseYears = Number($(this).find('td:eq(11)').attr('data-DailyWagePlusBaseYears'));
|
||||
employeeDetails.BenefitsIncludedNonContinuous = Number($(this).find('td:eq(5)').attr('data-BenefitsIncludedNonContinuous'));
|
||||
|
||||
employeeDetails.Year = $("#Year").val();
|
||||
employeeDetails.Month = $("#ddlMonth").val();
|
||||
employeeDetailsForInsuranceList.push(employeeDetails);
|
||||
});
|
||||
//console.log(employeeDetailsForInsuranceList);
|
||||
@@ -1244,7 +1255,17 @@
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
$("#MainModal").modal('hide');
|
||||
$('.btn-search1').click();
|
||||
// $('.btn-search1').click();
|
||||
|
||||
// Reload Function
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
$('#load-data-html').html('');
|
||||
loadGetTabCounts();
|
||||
loadSearchNew(activeValue);
|
||||
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,6 +26,8 @@ public class IndexModel : PageModel
|
||||
private readonly IInsuranceListApplication _insuranceListApplication;
|
||||
private readonly IInsuranceWorkshopInfoApplication _insuranceWorkshopInfoApplication;
|
||||
|
||||
private readonly IAuthHelper _authHelper;
|
||||
|
||||
private readonly IJobApplication _jobApplication;
|
||||
|
||||
//private readonly IInsuranceEmployeeInfoApplication _insuranceEmployeeInfoApplication;
|
||||
@@ -45,7 +47,7 @@ public class IndexModel : PageModel
|
||||
IYearlySalaryApplication yearlySalaryApplication, IEmployerApplication employerApplication,
|
||||
IInsuranceWorkshopInfoApplication insuranceWorkshopInfoApplication, IEmployeeApplication employeeApplication,
|
||||
IJobApplication jobApplication,
|
||||
IWebHostEnvironment webHostEnvironment) // , IInsuranceEmployeeInfoApplication insuranceEmployeeInfoApplication )
|
||||
IWebHostEnvironment webHostEnvironment, IAuthHelper authHelper) // , IInsuranceEmployeeInfoApplication insuranceEmployeeInfoApplication )
|
||||
{
|
||||
_jobApplication = jobApplication;
|
||||
_insuranceListApplication = insuranceListApplication;
|
||||
@@ -56,6 +58,7 @@ public class IndexModel : PageModel
|
||||
_employeeApplication = employeeApplication;
|
||||
//_insuranceEmployeeInfoApplication = insuranceEmployeeInfoApplication;
|
||||
_webHostEnvironment = webHostEnvironment;
|
||||
_authHelper = authHelper;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +178,7 @@ public class IndexModel : PageModel
|
||||
double included = 0; //مشمول
|
||||
double sumOfWorkingDays = 0;
|
||||
double benefitsIncludedNonContinuous = 0; //مزایای ماهانه غیر مشمول
|
||||
double sumOfSalaries = 0;
|
||||
double sumOfSalaries = 0;
|
||||
double sumOfDailyWage = 0;
|
||||
double insuredShare = 0;
|
||||
double employerShare = 0; //سهم بیمه کارفرما
|
||||
@@ -189,12 +192,24 @@ public class IndexModel : PageModel
|
||||
double countWithoutLeft = 0;
|
||||
double sumOfBaseYears = 0;
|
||||
double sumOfMarriedAllowance = 0;
|
||||
double sumOfDailyWagePlusBaseYear = 0;
|
||||
|
||||
double sumOfBenefitIncludedAndNotIncluded = 0; //مشمول و غیر مشمول
|
||||
double yearlySalaryDailyWage = 0;
|
||||
if (employeeDetailsForInsuranceList.Count > 0)
|
||||
{
|
||||
var employeeDetail = employeeDetailsForInsuranceList.First();
|
||||
var startMonthFa = $"{employeeDetail.Year}/{employeeDetail.Month.PadLeft(2, '0')}/01";
|
||||
DateTime startDateGr = startMonthFa.ToGeorgianDateTime();
|
||||
DateTime endDateGr = startMonthFa.FindeEndOfMonth()
|
||||
.ToGeorgianDateTime();
|
||||
int endOfMonth = Convert.ToInt32((startMonthFa.FindeEndOfMonth()).Substring(8, 2));
|
||||
yearlySalaryDailyWage = _yearlySalaryApplication.GetInsuranceItems(startDateGr, endDateGr, employeeDetail.Year).DayliWage;
|
||||
}
|
||||
|
||||
double sumOfDailyWagePlusBaseYear = 0;
|
||||
|
||||
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
|
||||
double sumOfBenefitIncludedAndNotIncluded = 0; //مشمول و غیر مشمول
|
||||
double sumOfMonthlySalaryWithoutBaseYears = 0; //جمع حقوق ماهیانه بدون پایه سنوات
|
||||
|
||||
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
|
||||
{
|
||||
var leftWorkDay = "";
|
||||
if (!string.IsNullOrWhiteSpace(employeeDetailsForInsuranceList[i].LeftWorkDate))
|
||||
@@ -211,16 +226,16 @@ public class IndexModel : PageModel
|
||||
}
|
||||
|
||||
//بدست آوردن جمع پایه سنواتی
|
||||
var baseYear = employeeDetailsForInsuranceList[i].BaseYears *
|
||||
employeeDetailsForInsuranceList[i].WorkingDays;
|
||||
sumOfBaseYears += baseYear;
|
||||
var baseYear = employeeDetailsForInsuranceList[i].BaseYears *
|
||||
employeeDetailsForInsuranceList[i].WorkingDays;
|
||||
sumOfBaseYears += baseYear;
|
||||
|
||||
//بدست آوردن جمع حق تاهل
|
||||
sumOfMarriedAllowance += employeeDetailsForInsuranceList[i].MarriedAllowance;
|
||||
//بدست آوردن جمع حق تاهل
|
||||
sumOfMarriedAllowance += employeeDetailsForInsuranceList[i].MarriedAllowance;
|
||||
|
||||
|
||||
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
|
||||
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
|
||||
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
|
||||
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
|
||||
(employeeDetailsForInsuranceList[i].JobCode == "027079" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "024398" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "011015" ||
|
||||
@@ -248,14 +263,18 @@ public class IndexModel : PageModel
|
||||
monthlyBenefits = monthlyBenefits + +employeeDetailsForInsuranceList[i].MonthlyBenefits;
|
||||
sumOfIncluded = sumOfIncluded + employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
|
||||
sumOfDailyWagePlusBaseYear += employeeDetailsForInsuranceList[i].DailyWagePlusBaseYears;
|
||||
sumOfDailyWagePlusBaseYear += employeeDetailsForInsuranceList[i].DailyWagePlusBaseYears;
|
||||
|
||||
//Mahan Changes
|
||||
//مجموع حقوق ماهیانه خالص
|
||||
sumOfMonthlySalaryWithoutBaseYears +=
|
||||
GetRoundValueWhitGovermentlist(yearlySalaryDailyWage * employeeDetailsForInsuranceList[i].WorkingDays, typeOfInsuranceSendWorkshop);
|
||||
|
||||
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
|
||||
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
|
||||
sumOfBenefitIncludedAndNotIncluded += employeeDetailsForInsuranceList[i].IncludedAndNotIncluded;
|
||||
|
||||
benefitsIncludedNonContinuous += employeeDetailsForInsuranceList[i].BenefitsIncludedNonContinuous;
|
||||
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
|
||||
benefitsIncludedNonContinuous += employeeDetailsForInsuranceList[i].BenefitsIncludedNonContinuous;
|
||||
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
|
||||
}
|
||||
|
||||
employerShare = GetRoundValueWhitGovermentlist(sumOfIncluded * 20 / 100, typeOfInsuranceSendWorkshop);
|
||||
@@ -298,6 +317,13 @@ public class IndexModel : PageModel
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
//اگر گارگاه کمک دولت بود بعد از اجرای فرمول ها
|
||||
//بیست درصد از اختلاف ( مجموع حقوق خالص با مجموع مزایای مشمول ) به سهم کارفرما اضافه میشود
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist")
|
||||
{
|
||||
var result = ((sumOfIncluded - sumOfMonthlySalaryWithoutBaseYears) * 20 / 100);
|
||||
employerShare += GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
#endregion
|
||||
|
||||
//sumOfIncluded مجموع حقوق و مزایای ماهیانه مشمول
|
||||
@@ -396,18 +422,18 @@ public class IndexModel : PageModel
|
||||
//جمع پایه سنواتی
|
||||
SumOfBaseYears = sumOfBaseYears.ToMoney(),
|
||||
//جمع حق تاهل
|
||||
SumOfMarriedAllowance = sumOfMarriedAllowance.ToMoney(),
|
||||
SumOfMarriedAllowance = sumOfMarriedAllowance.ToMoney(),
|
||||
|
||||
//جمع دستمزد روزانه + پایه سنوات روزانه
|
||||
SumOfDailyWagePlusBaseYears = sumOfDailyWagePlusBaseYear.ToMoney(),
|
||||
//جمع دستمزد روزانه + پایه سنوات روزانه
|
||||
SumOfDailyWagePlusBaseYears = sumOfDailyWagePlusBaseYear.ToMoney(),
|
||||
|
||||
//جمع مزایای غیر مشمول
|
||||
SumOfBenefitsIncludedNonContinuous = benefitsIncludedNonContinuous.ToMoney(),
|
||||
SumOfBenefitsIncludedNonContinuous = benefitsIncludedNonContinuous.ToMoney(),
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public IActionResult OnPostCreate(CreateInsuranceList command)
|
||||
{
|
||||
//var result =new OperationResult();
|
||||
@@ -559,14 +585,14 @@ public class IndexModel : PageModel
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_DISC", DbfColumn.DbfColumnType.Character, 100, 0));
|
||||
//تعداد کارکنان
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_NUM", DbfColumn.DbfColumnType.Number, 5, 0));
|
||||
//مجموع روزهای کارکرد کارکنان
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TDD", DbfColumn.DbfColumnType.Number, 6, 0));
|
||||
//مجموع روزهای کارکرد کارکنان
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TDD", DbfColumn.DbfColumnType.Number, 6, 0));
|
||||
//مجموع دستمزد روزانه کارکنان
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TROOZ", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
//مجموع دستمزد ماهانه کارکنان
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TMAH", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
//مجموع مزایای ماهانه مشمول
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TMAZ", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
//مجموع مزایای ماهانه مشمول
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TMAZ", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
//مجموع دستمزد و مزایای ماهانه مشمول
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_TMASH", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
// مجموع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول
|
||||
@@ -586,11 +612,11 @@ public class IndexModel : PageModel
|
||||
//ردیف پیمان
|
||||
odbf.Header.AddColumn(new DbfColumn("MON_PYM", DbfColumn.DbfColumnType.Character, 3, 0));
|
||||
|
||||
//مجموع پایه سنواتی ها
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_INC", DbfColumn.DbfColumnType.Character, 12, 0));
|
||||
//مجموع حق تاهل ها
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_SPOUSE", DbfColumn.DbfColumnType.Character, 12, 0));
|
||||
var orec = new DbfRecord(odbf.Header);
|
||||
//مجموع پایه سنواتی ها
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_INC", DbfColumn.DbfColumnType.Character, 12, 0));
|
||||
//مجموع حق تاهل ها
|
||||
odbf.Header.AddColumn(new DbfColumn("DSK_SPOUSE", DbfColumn.DbfColumnType.Character, 12, 0));
|
||||
var orec = new DbfRecord(odbf.Header);
|
||||
|
||||
//کد کارگاه
|
||||
orec[0] = GetSpecifiedCharactes(createInsuranceList.InsuranceWorkshopInfo.InsuranceCode, 10);
|
||||
@@ -612,12 +638,12 @@ public class IndexModel : PageModel
|
||||
orec[8] = GetSpecifiedCharactes("", 100).ToIranSystem();
|
||||
//تعداد کرکنان
|
||||
orec[9] = createInsuranceList.SumOfEmployees.ToString();
|
||||
//مجموع روزهای کارکرد کارکنان
|
||||
orec[10] = createInsuranceList.SumOfWorkingDays.ToString();
|
||||
//مجموع روزهای کارکرد کارکنان
|
||||
orec[10] = createInsuranceList.SumOfWorkingDays.ToString();
|
||||
//مجموع دستمزد روزانه کارکنان
|
||||
orec[11] = createInsuranceList.SumOfDailyWage.ToString();
|
||||
//مجموع دستمزد ماهانه کارکنان
|
||||
orec[12] = createInsuranceList.SumOfSalaries.ToString();
|
||||
//مجموع دستمزد ماهانه کارکنان
|
||||
orec[12] = createInsuranceList.SumOfSalaries.ToString();
|
||||
//مجموع مزایای ماهانه مشمول
|
||||
orec[13] = createInsuranceList.SumOfBenefitsIncluded.ToString();
|
||||
//مجموع دستمزد و مزایای ماهانه مشمول
|
||||
@@ -628,7 +654,7 @@ public class IndexModel : PageModel
|
||||
orec[16] = createInsuranceList.InsuredShare.ToString();
|
||||
//مجموع حق بیمه سهم کارفرما
|
||||
orec[17] = createInsuranceList.EmployerShare.ToString(); //"44911361";
|
||||
//مجموع حق بیمه بیکاری
|
||||
//مجموع حق بیمه بیکاری
|
||||
orec[18] = createInsuranceList.UnEmploymentInsurance.ToString();
|
||||
//نرخ حق بیمه
|
||||
orec[19] = "23";
|
||||
@@ -639,18 +665,18 @@ public class IndexModel : PageModel
|
||||
//ردیف پیمان
|
||||
orec[22] = GetSpecifiedCharactes(createInsuranceList.InsuranceWorkshopInfo.AgreementNumber, 12);
|
||||
|
||||
//مجموع پایه سنواتی ها
|
||||
orec[23] = createInsuranceList.SumOfBaseYears.ToString();
|
||||
//مجموع پایه سنواتی ها
|
||||
orec[23] = createInsuranceList.SumOfBaseYears.ToString();
|
||||
|
||||
//مجموع حق تاهل ها
|
||||
orec[24] = createInsuranceList.SumOfMarriedAllowance.ToString();
|
||||
//مجموع حق تاهل ها
|
||||
orec[24] = createInsuranceList.SumOfMarriedAllowance.ToString();
|
||||
|
||||
odbf.Write(orec);
|
||||
odbf.Write(orec);
|
||||
//odbf.Header.RecordCount = 50;
|
||||
odbf.WriteHeader();
|
||||
odbf.Close();
|
||||
}
|
||||
|
||||
|
||||
//ایجاد فایل پرسنل - DSW
|
||||
if (createInsuranceList.EmployeeInsurancListDataList != null)
|
||||
{
|
||||
@@ -712,12 +738,12 @@ public class IndexModel : PageModel
|
||||
// کد ملی
|
||||
dsw.Header.AddColumn(new DbfColumn("PER_NATCOD", DbfColumn.DbfColumnType.Character, 10, 0));
|
||||
|
||||
// پایه سنوات
|
||||
dsw.Header.AddColumn(new DbfColumn("DSW_INC", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
// حق تاهل
|
||||
dsw.Header.AddColumn(new DbfColumn("DSW_SPOUSE", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
// پایه سنوات
|
||||
dsw.Header.AddColumn(new DbfColumn("DSW_INC", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
// حق تاهل
|
||||
dsw.Header.AddColumn(new DbfColumn("DSW_SPOUSE", DbfColumn.DbfColumnType.Number, 12, 0));
|
||||
|
||||
foreach (var item in createInsuranceList.EmployeeInsurancListDataList)
|
||||
foreach (var item in createInsuranceList.EmployeeInsurancListDataList)
|
||||
{
|
||||
var employee = createInsuranceList.EmployeeDetailsForInsuranceList.FirstOrDefault(p => p.EmployeeId == item.EmployeeId);
|
||||
|
||||
@@ -795,12 +821,12 @@ public class IndexModel : PageModel
|
||||
//کد ملی
|
||||
dswrec[26] = employee.NationalCode;
|
||||
|
||||
//پایه سنوات
|
||||
dswrec[27] = item.BaseYears.ToString();
|
||||
//حق تاهل
|
||||
dswrec[28] = item.MarriedAllowance.ToString();
|
||||
//پایه سنوات
|
||||
dswrec[27] = item.BaseYears.ToString();
|
||||
//حق تاهل
|
||||
dswrec[28] = item.MarriedAllowance.ToString();
|
||||
|
||||
dsw.Write(dswrec);
|
||||
dsw.Write(dswrec);
|
||||
}
|
||||
|
||||
|
||||
@@ -842,18 +868,18 @@ public class IndexModel : PageModel
|
||||
return Partial("Edit", insurance);
|
||||
}
|
||||
|
||||
//-2
|
||||
/// <summary>
|
||||
/// لود اطلاعات پرسنل در مودال ویرایش بیمه -- DSKWOR
|
||||
/// محاسبه تب پرسنل
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEmployeeListForEdit(EmployeeForEditInsuranceListSearchModel searchModel)
|
||||
//-2
|
||||
/// <summary>
|
||||
/// لود اطلاعات پرسنل در مودال ویرایش بیمه -- DSKWOR
|
||||
/// محاسبه تب پرسنل
|
||||
/// </summary>
|
||||
/// <param name="searchModel"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEmployeeListForEdit(EmployeeForEditInsuranceListSearchModel searchModel)
|
||||
{
|
||||
// var result = _insuranceListApplication.SearchEmployeeListForEditByInsuranceListId(searchModel);
|
||||
var result = _insuranceListApplication.GetEmployeeListForEditByInsuranceListId(searchModel);
|
||||
return Partial("./EmployeeListForEdit", result);
|
||||
// var result = _insuranceListApplication.SearchEmployeeListForEditByInsuranceListId(searchModel);
|
||||
var result = _insuranceListApplication.GetEmployeeListForEditByInsuranceListId(searchModel);
|
||||
return Partial("./EmployeeListForEdit", result);
|
||||
}
|
||||
|
||||
//-3
|
||||
@@ -896,7 +922,7 @@ public class IndexModel : PageModel
|
||||
}
|
||||
|
||||
return new JsonResult(result);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public IActionResult OnGetInsuranceSummary(long id)
|
||||
@@ -922,7 +948,7 @@ public class IndexModel : PageModel
|
||||
string benefitsIncludedContinuous, string jobId, string housingAllowance, string includeStatus,
|
||||
string consumableItems, string endMonthCurrentDay, long employeeId, double maritalStatus, double baseYear)
|
||||
{
|
||||
if(workingDays == "0")
|
||||
if (workingDays == "0")
|
||||
return new JsonResult(new
|
||||
{
|
||||
monthlySalaryPlusBaseYear = "0",
|
||||
@@ -936,15 +962,15 @@ public class IndexModel : PageModel
|
||||
baseYears = "0",
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var benefitsIncludedContinuousL = benefitsIncludedContinuous.MoneyToDouble();
|
||||
bool isManager = jobId is "10" or "16" or "17" or "18" or "3498";
|
||||
bool isManager = jobId is "10" or "16" or "17" or "18" or "3498";
|
||||
//if (isManager && includeStatus !="1") شنبه
|
||||
if (isManager)
|
||||
maritalStatus = 0;
|
||||
|
||||
double sum = 0;
|
||||
double sum = 0;
|
||||
var employeeMaritalStatus = _employeeApplication.GetDetails(employeeId);
|
||||
if (employeeMaritalStatus.MaritalStatus == "متاهل")
|
||||
sum = consumableItems.MoneyToDouble() + housingAllowance.MoneyToDouble() + maritalStatus;
|
||||
@@ -957,10 +983,10 @@ public class IndexModel : PageModel
|
||||
var jobIdL = Convert.ToInt64(jobId);
|
||||
var includeStatusL = Convert.ToInt64(includeStatus);
|
||||
var dailyWageL = (dailyWage.MoneyToDouble()) + baseYear;
|
||||
var dailyWageWithOutBaseYear = dailyWage.MoneyToDouble();
|
||||
var dailyWageWithOutBaseYear = dailyWage.MoneyToDouble();
|
||||
|
||||
|
||||
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
|
||||
if (workingDaysL == endMonthCurrentDayL) benefitsIncludedContinuousL = sum;
|
||||
//farokhiChanges
|
||||
if (employeeId == 42783)
|
||||
benefitsIncludedContinuousL = 53082855;
|
||||
@@ -983,24 +1009,24 @@ public class IndexModel : PageModel
|
||||
// benefitsIncludedContinuousL = 0;
|
||||
//}
|
||||
if (isManager && includeStatus != "1")
|
||||
benefitsIncludedContinuousL = 0;
|
||||
benefitsIncludedContinuousL = 0;
|
||||
var monthlySalaryL = workingDaysL * dailyWageL;
|
||||
var insuranceShareL = (benefitsIncludedContinuousL + monthlySalaryL) * 7 / 100;
|
||||
insuranceShareL = _insuranceListApplication.GetRoundValue(insuranceShareL);
|
||||
|
||||
var monthlySalaryWithOutBaseYear = workingDaysL * dailyWageWithOutBaseYear;
|
||||
//var persianBefore = "";
|
||||
//var year = Convert.ToInt32(date.Substring(0, 4));
|
||||
//var month = Convert.ToInt32(date.Substring(5, 2));
|
||||
//var day = Convert.ToInt32(date.Substring(8, 2));
|
||||
//var persianDate = new PersianDateTime(year, month, day);
|
||||
//var persianBeforeDate = persianDate.AddDays(-1);
|
||||
//persianBefore = persianBeforeDate.ToString("yyyy/MM/dd");
|
||||
var monthlySalaryWithOutBaseYear = workingDaysL * dailyWageWithOutBaseYear;
|
||||
//var persianBefore = "";
|
||||
//var year = Convert.ToInt32(date.Substring(0, 4));
|
||||
//var month = Convert.ToInt32(date.Substring(5, 2));
|
||||
//var day = Convert.ToInt32(date.Substring(8, 2));
|
||||
//var persianDate = new PersianDateTime(year, month, day);
|
||||
//var persianBeforeDate = persianDate.AddDays(-1);
|
||||
//persianBefore = persianBeforeDate.ToString("yyyy/MM/dd");
|
||||
|
||||
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 && dailyWageL == 0)
|
||||
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 && dailyWageL == 0)
|
||||
workingDaysL = 0;
|
||||
if (benefitsIncludedContinuousL == 0 && monthlySalaryL == 0 && insuranceShareL == 0 &&
|
||||
workingDaysL == 0) dailyWageL = 0;
|
||||
workingDaysL == 0) dailyWageL = 0;
|
||||
|
||||
var includeStatusBool = includeStatus == "1";
|
||||
double marridAllowance = 0;
|
||||
@@ -1010,23 +1036,23 @@ public class IndexModel : PageModel
|
||||
includeStatusBool, Convert.ToInt32(workingDays), maritalStatus, Convert.ToInt32(endMonthCurrentDay));
|
||||
}
|
||||
|
||||
var baseYears = baseYear;
|
||||
var baseYears = baseYear;
|
||||
Console.WriteLine(baseYears);
|
||||
return new JsonResult(new
|
||||
{
|
||||
monthlySalaryPlusBaseYear = monthlySalaryL.ToMoney(),
|
||||
monthlySalary = monthlySalaryWithOutBaseYear.ToMoney(),
|
||||
monthlySalaryPlusBaseYear = monthlySalaryL.ToMoney(),
|
||||
monthlySalary = monthlySalaryWithOutBaseYear.ToMoney(),
|
||||
benefitsIncludedContinuous = benefitsIncludedContinuousL.ToMoney(),
|
||||
insuranceShare = insuranceShareL.ToMoney(),
|
||||
workingDay = workingDaysL,
|
||||
dailyWag = dailyWageWithOutBaseYear.ToMoney(),
|
||||
dailyWagePlusBaseYear = dailyWageL,
|
||||
dailyWagePlusBaseYear = dailyWageL,
|
||||
marriedAllowance = marridAllowance.ToMoney(),
|
||||
baseYears = baseYears.ToMoney(),
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public double GetRoundValueWhitGovermentlist(double value, string type)
|
||||
{
|
||||
@@ -1078,4 +1104,51 @@ public class IndexModel : PageModel
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Insurance Operations
|
||||
|
||||
public IActionResult OnGetSearchNew(InsuranceListSearchModel searchModel)
|
||||
{
|
||||
var resultData = _insuranceListApplication.Search(searchModel);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
data = resultData,
|
||||
pageIndex = resultData.Count
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetTabCounts(int month, int year)
|
||||
{
|
||||
var accountId = _authHelper.CurrentAccountId();
|
||||
var resultData = await _insuranceListApplication.GetTabCounts(accountId, month, year);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
notStarted = resultData.NotStarted,
|
||||
inProgress = resultData.InProgress,
|
||||
readyToSendList = resultData.ReadyToSendList,
|
||||
done = resultData.Done,
|
||||
});
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetOperationsModal(long id)
|
||||
{
|
||||
var command = await _insuranceListApplication.GetInsuranceOperationDetails(id);
|
||||
return Partial("_Partials/OperationsModal", command);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnPostSaveOperationsModal(InsuranceListConfirmOperation command)
|
||||
{
|
||||
var result = await _insuranceListApplication.ConfirmInsuranceOperation(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
message = result.Message,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,662 @@
|
||||
@page
|
||||
@model ServiceHost.Areas.Admin.Pages.Company.InsuranceList.IndexOldModel
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
Layout = "Shared/_AdminLayout";
|
||||
ViewData["title"] = "بیمه";
|
||||
var selctedOption = "selectedOption";
|
||||
}
|
||||
|
||||
@*select2 css start*@
|
||||
<style>
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #dfdfdf;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: #bed3ca;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.opt {
|
||||
background-color: #d3e7ff;
|
||||
border-radius: 10px;
|
||||
text-align: right;
|
||||
padding: 2px 5px;
|
||||
text-overflow: ellipsis;
|
||||
overflow-x: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.noResult {
|
||||
background-color: #c0dcfd;
|
||||
border-radius: 10px;
|
||||
text-align: right;
|
||||
padding: 2px 5px;
|
||||
}
|
||||
|
||||
.opt:hover, .noResult:hover {
|
||||
background-color: #afd0f7 !important;
|
||||
color: #343434 !important;
|
||||
}
|
||||
|
||||
.selectDiv {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
border-radius: 10px;
|
||||
min-height: 20px;
|
||||
max-height: 190px;
|
||||
overflow: hidden scroll;
|
||||
width: 100%;
|
||||
background-color: rgb(255 255 255);
|
||||
display: block;
|
||||
box-shadow: 0px -1px 12px 0px rgba(0,0,0,.16), 2px 1px 10px 0 rgba(0,0,0,.12);
|
||||
}
|
||||
|
||||
.selectedOption {
|
||||
color: #424242 !important;
|
||||
background-color: #cee4fb !important;
|
||||
}
|
||||
|
||||
.keyboardSelected {
|
||||
color: #424242 !important;
|
||||
background-color: #b1d5ff !important;
|
||||
}
|
||||
|
||||
.bgGray, .bgGray:hover {
|
||||
background-color: #b5b5b5 !important;
|
||||
color: #646464;
|
||||
}
|
||||
|
||||
a.disabled {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
background-color: grey !important;
|
||||
border-color: grey !important;
|
||||
}
|
||||
</style>
|
||||
<link href="~/admintheme/css/insurance-list.css?ver=@adminVersion" rel="stylesheet" />
|
||||
<div class="row">
|
||||
<div class="col-sm-12 m-r-10">
|
||||
<div class="printBtns" style="display: none;">
|
||||
<button id="closeModal" type="button" class="btn btn-warning btn-rounded waves-effect waves-light m-b-10" data-dismiss="modal" style="float: left">بستن</button>
|
||||
<button id="btnPrint2" type="button" class="btn btn-success btn-rounded waves-effect waves-light" style="float: left">پرینت </button>
|
||||
</div>
|
||||
<p class="">
|
||||
@* pull-right *@
|
||||
<a href="#showmodal=@Url.Page("/Company/InsuranceList/Index", "OperationsModal")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> مودال ویرایش </a>
|
||||
<a permission="80210" id="btnPopModal" href="#showmodal=@Url.Page("/Company/InsuranceList/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; margin-right: 10px "> <i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i> ایجاد لیست بیمه </a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="panel-group panel-group-joined" id="accordion-test">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#accordion-test" href="#collapseOne" class="collapsed">
|
||||
جستجوی لیست بیمه ی کارگاه ها
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapseOne" class="panel-collapse in collapse">
|
||||
<div class="panel-body">
|
||||
@*===================================================================================================================*@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form class="form-inline" role="form" name="search-theme-form" id="search-theme-form" autocomplete="off"
|
||||
method="get"
|
||||
data-ajax="true"
|
||||
data-ajax-method="get"
|
||||
data-ajax-update="#mainPanelSearch"
|
||||
data-ajax-mode="replace"
|
||||
data-ajax-url="@Url.Page("./Index","Search")">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12" style="display: flex;">
|
||||
<div class="date-title">انتخاب تاریخ</div>
|
||||
<div class="year-box">
|
||||
<label class="sr-only"></label>
|
||||
<select class="form-control" asp-for="searchModel.Year" style="width: 100%">
|
||||
<option value="0" >سال</option>
|
||||
@foreach (string itemi in @Model.YearlyList)
|
||||
{
|
||||
if (Model.CurrentYear_ == itemi)
|
||||
{
|
||||
<option selected value="@itemi"> @itemi </option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@itemi"> @itemi </option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
<div class="month-box">
|
||||
<label class="sr-only"></label>
|
||||
<select class="form-control" asp-for="searchModel.Month" style="width: 100%">
|
||||
<option value="0" > ماه</option>
|
||||
<option value="01"> فروردین</option>
|
||||
<option value="02"> اردیبهشت</option>
|
||||
<option value="03"> خرداد</option>
|
||||
<option value="04"> تیر</option>
|
||||
<option value="05"> مرداد</option>
|
||||
<option value="06"> شهریور</option>
|
||||
<option value="07"> مهر</option>
|
||||
<option value="08"> آبان</option>
|
||||
<option value="09"> آذر</option>
|
||||
<option value="10"> دی</option>
|
||||
<option value="11"> بهمن</option>
|
||||
<option value="12"> اسفند</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<label class="sr-only"></label>
|
||||
<input class="form-control" placeholder="کد کارگاهی" asp-for="searchModel.WorkShopCode" style="width: 100%">
|
||||
</div>
|
||||
<div style="height:40px" class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<label class="sr-only"></label>
|
||||
<input type="hidden" class="sendEmployerId" asp-for="searchModel.EmployerId" />
|
||||
<input type="hidden" asp-for="searchModel.EmployerName" />
|
||||
<input type="search" id="empSearchEmployer" value="@Model.EmployerFullName" class="form-control inpt @{ if(!string.IsNullOrWhiteSpace(@Model.EmployerFullName)){ @selctedOption } }" autocomplete="off" placeholder=" نام کارفرما " style="width: 100%;position: relative">
|
||||
<div id="empEmployer" class="selectDiv" style="display: none;">
|
||||
<ul class="searchResultEmployer m-t-10" style="list-style-type: none; padding: 5px">
|
||||
</ul>
|
||||
</div>
|
||||
@* <input class="form-control" placeholder="نام کارفرما" asp-for="searchModel.EmployerName" style="width: 100%"> *@
|
||||
</div>
|
||||
<div style="height:40px" class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
|
||||
<label class="sr-only"></label>
|
||||
<input type="hidden" class="sendWorkshopId" asp-for="searchModel.WorkshopId" />
|
||||
<input type="hidden" asp-for="searchModel.WorkShopName" />
|
||||
<input type="search" id="empSearchWorkshop" value="@Model.WorkshopFullName" class="form-control @{ if(!string.IsNullOrWhiteSpace(@Model.WorkshopFullName)){ @selctedOption } }" autocomplete="off" placeholder=" نام کارگاه /شماره بایگانی " style="width: 100%; position: relative">
|
||||
<div id="empWorkshop" class="selectDiv" style="display: none;">
|
||||
<ul class="searchResultWorkshop m-t-10" style="list-style-type: none; padding: 5px">
|
||||
</ul>
|
||||
</div>
|
||||
@* <input class="form-control" placeholder="نام کارگاه" asp-for="searchModel.WorkShopName" style="width: 100%"> *@
|
||||
</div>
|
||||
</div>
|
||||
<hr style=" margin-top: 12px;margin-bottom: 12px;">
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 belowRow">
|
||||
<label class="sr-only"></label>
|
||||
<select class="form-control" asp-for="searchModel.TypeOfInsuranceSend" style="width: 100%">
|
||||
<option value="0" selected >نوع ارسال لیست</option>
|
||||
<option value="عادی"> عادی </option>
|
||||
<option value="کمک دولت">کمک دولت</option>
|
||||
<option value="خانوادگی">خانوادگی</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 belowRow">
|
||||
<label class="sr-only"></label>
|
||||
<input class="form-control" asp-for="searchModel.Branch" placeholder="شعبه تامین اجتماعی " style="width: 100%">
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 belowRow">
|
||||
<select class="form-control" style="width: 100%" asp-for="searchModel.City">
|
||||
<option value="0" selected >شهرستان</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-12 belowRow">
|
||||
<select class="form-control" style="width: 100%" asp-for="searchModel.FixedSalary">
|
||||
<option selected >لیست مقطوع</option>
|
||||
<option value="true"> دارد</option>
|
||||
<option value="false">ندارد</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-top: 15px">
|
||||
<div class="col-lg-9">
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
<button type="button" class="btn btn-success btn-rounded waves-effect waves-light m-b-5 btn-search1">
|
||||
<i class="fa fa-search" style="padding-left: 3px; font-size: 14px;"></i> جستجو
|
||||
</button>
|
||||
<a onclick="removeSearch()" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 btn-observe">حذف جستجو</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list faSize"></i> لیست بیمه ی کارگاه ها </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12" id="mainPanelSearch">
|
||||
<div id="waiting" style="display: none;padding-right: 10px">
|
||||
<i class="ion-loading-a" style="font-size: 16px"> </i> در حال بارگذاری...
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@section Script
|
||||
{
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/admintheme/js/admin.js" ></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"></script>
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$("#searchModel_Month").val('@Model.BeforCurrentMonth_');
|
||||
$('.btn-search1').click();
|
||||
|
||||
$('#datatable').dataTable({
|
||||
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]]
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('.btn-search1').on('click', function () {
|
||||
$("#waiting").show();
|
||||
var myTable = $("#datatable");
|
||||
myTable.remove();
|
||||
|
||||
if ($("#searchModel_EmployerId").val() == "0" || $("#searchModel_EmployerId").val() == "")
|
||||
$("#searchModel_EmployerName").val($("#empSearchEmployer").val());
|
||||
|
||||
if ($("#searchModel_WorkshopId").val() == "0" || $("#searchModel_WorkshopId").val() == "")
|
||||
$("#searchModel_WorkShopName").val($("#empSearchWorkshop").val());
|
||||
|
||||
$("#search-theme-form").submit();
|
||||
|
||||
});
|
||||
|
||||
function removeSearch()
|
||||
{
|
||||
var month = '@Model.BeforCurrentMonth_';
|
||||
console.log(month);
|
||||
$("#waiting").show();
|
||||
var myTable = $("#datatable");
|
||||
myTable.remove();
|
||||
$("#searchModel_WorkshopId").val("0");
|
||||
$("#searchModel_EmployerId").val("0");
|
||||
$("#searchModel_WorkShopName").val('');
|
||||
$("#searchModel_EmployerName").val('');
|
||||
$(".form-control").val('');
|
||||
$("#searchModel_Year").val(@Model.CurrentYear_);
|
||||
$("#searchModel_Month").val(month);
|
||||
$("#searchModel_TypeOfInsuranceSend").val(0);
|
||||
$("#searchModel_City").val(0);
|
||||
$("#searchModel_FixedSalary").val('لیست مقطوع');
|
||||
$("#search-theme-form").submit();
|
||||
}
|
||||
|
||||
|
||||
$('#search-theme-form').submit(function(e){
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr( 'action' ),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
if (response.isSuccedded == true) {
|
||||
// $.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
}
|
||||
else{
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//------workshop-----
|
||||
var containerWorkshop = $('#empWorkshop');
|
||||
var searchBoxWorkshop = $('#empSearchWorkshop');
|
||||
var hiddenInputValWorkshop = $('.sendWorkshopId');
|
||||
var searchResulWorkshop = $('.searchResultWorkshop');
|
||||
var mixContainerAndSerchResultWorkshop = $('#empWorkshop , .searchResultWorkshop');
|
||||
|
||||
containerWorkshop.hide();
|
||||
var liListWorkshop;
|
||||
var liPointerWorkshop;
|
||||
let countWorkshop = 0;
|
||||
|
||||
//close search Employee when click on body
|
||||
$(document).on('click', function (event) {
|
||||
if (!$(event.target).closest(containerWorkshop).length) {
|
||||
containerWorkshop.hide();
|
||||
}
|
||||
});
|
||||
//select option by mouse
|
||||
function selectItemWorkshop(id, employeeFullName) {
|
||||
searchBoxWorkshop.val(employeeFullName);
|
||||
hiddenInputValWorkshop.val(id);
|
||||
containerWorkshop.hide();
|
||||
searchBoxWorkshop.addClass("selectedOption");
|
||||
};
|
||||
//search by Ajax
|
||||
searchBoxWorkshop.on('keyup keypress',
|
||||
function (e) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
//----clean Employer------
|
||||
$("#searchModel_EmployerName").val('');
|
||||
$("#searchModel_EmployerId").val('0');
|
||||
|
||||
//----clean Employee------
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
// $("#SearchModel_Id").val('0');
|
||||
|
||||
|
||||
if ($(this).val() == '') {
|
||||
|
||||
}
|
||||
//stop submit form with enter
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
e.preventDefault();
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
liPointerWorkshop.click();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
searchBoxWorkshop.removeClass("selectedOption");
|
||||
let searchText = $(this).val();
|
||||
hiddenInputValWorkshop.val(0);
|
||||
|
||||
if (searchText.length > 1) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '@Url.Page("./Index", "WorkshopName")',
|
||||
data: { "searchText": searchText },
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
|
||||
success: function (response) {
|
||||
$(".opt").remove();
|
||||
if (response.mylist.length > 0) {//result Founded
|
||||
|
||||
// console.log(response.mylist);
|
||||
|
||||
$(".noResult").remove();
|
||||
containerWorkshop.show();
|
||||
$.each(response.mylist,
|
||||
function (i, item) {
|
||||
let li = `<li data-workshopId="${item.id}" class="btn btn-block opt" onclick="selectItemWorkshop(${item.id}, '${item.workshopFullName}');" >`;
|
||||
li = li + '<span class="name-right" > ' + item.workshopFullName + ' </span><span class="line">|</span> <span class="code-left" > ' + item.archiveCode + ' </span></li> ';
|
||||
searchResulWorkshop.append(li);
|
||||
});
|
||||
} else {//result NotFounded
|
||||
$(".noResult").remove();
|
||||
containerWorkshop.show();
|
||||
let noResult = `<li class="btn btn-block noResult">نتیجه ای یافت نشد</li>`;
|
||||
searchResulWorkshop.append(noResult);
|
||||
}
|
||||
}// endOfSuccess
|
||||
|
||||
}); //endOfAjax
|
||||
|
||||
} else {
|
||||
containerWorkshop.hide();
|
||||
countWorkshop = 0;
|
||||
}
|
||||
//keyboard Arrow Key Select And Enter
|
||||
liListWorkshop = $('#empWorkshop ul li');
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liListWorkshop.eq(0)).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
},
|
||||
50);
|
||||
if (e.which === 40) {// if ArrowUp
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
|
||||
liPointerWorkshop.removeClass('keyboardSelected');
|
||||
console.log(countWorkshop + "plusOne");
|
||||
liListWorkshop.eq(countWorkshop).addClass('keyboardSelected');
|
||||
liPointerWorkshop = liListWorkshop.eq(countWorkshop);
|
||||
if (countWorkshop > 4) {
|
||||
//ScrollDown
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liPointerWorkshop).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
countWorkshop += 1;
|
||||
|
||||
} else {
|
||||
|
||||
liListWorkshop.eq(0).addClass("keyboardSelected");
|
||||
liPointerWorkshop = liListWorkshop.eq(0);
|
||||
countWorkshop = 1;
|
||||
}
|
||||
} else if (e.which === 38) {//if ArrowDown
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
liPointerWorkshop.removeClass('keyboardSelected');
|
||||
countWorkshop -= 1;
|
||||
liListWorkshop.eq(countWorkshop).addClass('keyboardSelected');
|
||||
liPointerWorkshop = liListWorkshop.eq(countWorkshop);
|
||||
//ScrollUp
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liPointerWorkshop).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$("#empSearchWorkshop").keypress(function (event) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
$("#empSearchEmployer").val('');
|
||||
$("#empSearch").val('');
|
||||
|
||||
$("#searchModel_EmployerName").val('');
|
||||
$("#searchModel_EmployerId").val('');
|
||||
|
||||
// $("#SearchModel_Id").val("0");
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
|
||||
if (event.keyCode === 13) {
|
||||
if ($("#searchModel_WorkshopId").val() == "0")
|
||||
$("#searchModel_WorkShopName").val($("#empSearchWorkshop").val())
|
||||
$('.btn-search1').click();
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
//------Employer-----
|
||||
var containerEmployer = $('#empEmployer');
|
||||
var searchBoxEmployer = $('#empSearchEmployer');
|
||||
var hiddenInputValEmployer = $('.sendEmployerId');
|
||||
var searchResulEmployer = $('.searchResultEmployer');
|
||||
var mixContainerAndSerchResultEmployer = $('#empEmployer , .searchResultEmployer');
|
||||
|
||||
containerEmployer.hide();
|
||||
var liListEmployer;
|
||||
var liPointerEmployer;
|
||||
let countEmployer = 0;
|
||||
|
||||
//close search Employee when click on body
|
||||
$(document).on('click', function (event) {
|
||||
if (!$(event.target).closest(containerEmployer).length) {
|
||||
containerEmployer.hide();
|
||||
}
|
||||
});
|
||||
//select option by mouse
|
||||
function selectItemEmployer(id, employeeFullName) {
|
||||
searchBoxEmployer.val(employeeFullName);
|
||||
hiddenInputValEmployer.val(id);
|
||||
containerEmployer.hide();
|
||||
searchBoxEmployer.addClass("selectedOption");
|
||||
};
|
||||
//search by Ajax
|
||||
searchBoxEmployer.on('keyup keypress',
|
||||
function (e) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
//----clean Workshop------
|
||||
$("#empSearchWorkshop").val('');
|
||||
$("#searchModel_WorkShopName").val('');
|
||||
|
||||
//----clean Employee------
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
// $("#SearchModel_Id").val('0');
|
||||
|
||||
|
||||
if ($(this).val() == '') {
|
||||
$("#searchModel_EmployerId").val("0");
|
||||
$("#searchModel_EmployerName").val('');
|
||||
}
|
||||
//stop submit form with enter
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
e.preventDefault();
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
liPointerEmployer.click();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
searchBoxEmployer.removeClass("selectedOption");
|
||||
let searchText = $(this).val();
|
||||
hiddenInputValEmployer.val(0);
|
||||
|
||||
if (searchText.length > 1) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: '@Url.Page("./Index", "EmployerName")',
|
||||
data: { "searchText": searchText },
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
|
||||
success: function (response) {
|
||||
$(".opt").remove();
|
||||
if (response.mylist.length > 0) {//result Founded
|
||||
|
||||
console.log(response.mylist);
|
||||
|
||||
$(".noResult").remove();
|
||||
containerEmployer.show();
|
||||
$.each(response.mylist,
|
||||
function (i, item) {
|
||||
let li = `<li data-employeeId="${item.id}" class="btn btn-block opt" onclick="selectItemEmployer(${item.id}, '${item.lName}');" >${item.lName}</li>`;
|
||||
searchResulEmployer.append(li);
|
||||
|
||||
});
|
||||
} else {//result NotFounded
|
||||
|
||||
$(".noResult").remove();
|
||||
containerEmployer.show();
|
||||
let noResult = `<li class="btn btn-block noResult">نتیجه ای یافت نشد</li>`;
|
||||
searchResulEmployer.append(noResult);
|
||||
}
|
||||
}// endOfSuccess
|
||||
|
||||
}); //endOfAjax
|
||||
|
||||
} else {
|
||||
containerEmployer.hide();
|
||||
countEmployer = 0;
|
||||
}
|
||||
//keyboard Arrow Key Select And Enter
|
||||
liListEmployer = $('#empEmployer ul li');
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liListEmployer.eq(0)).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
if (e.which === 40) {// if ArrowUp
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
|
||||
liPointerEmployer.removeClass('keyboardSelected');
|
||||
console.log(countEmployer + "plusOne");
|
||||
liListEmployer.eq(countEmployer).addClass('keyboardSelected');
|
||||
liPointerEmployer = liListEmployer.eq(countEmployer);
|
||||
if (countEmployer > 4) {
|
||||
//ScrollDown
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liPointerEmployer).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
countEmployer += 1;
|
||||
|
||||
} else {
|
||||
|
||||
liListEmployer.eq(0).addClass("keyboardSelected");
|
||||
liPointerEmployer = liListEmployer.eq(0);
|
||||
countEmployer = 1;
|
||||
}
|
||||
} else if (e.which === 38) {//if ArrowDown
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
liPointerEmployer.removeClass('keyboardSelected');
|
||||
countEmployer -= 1;
|
||||
liListEmployer.eq(countEmployer).addClass('keyboardSelected');
|
||||
liPointerEmployer = liListEmployer.eq(countEmployer);
|
||||
//ScrollUp
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liPointerEmployer).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
$("#empSearchEmployer").keypress(function (event) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
$("#empSearch").val('');
|
||||
$("#empSearchWorkshop").val('');
|
||||
|
||||
$("#searchModel_WorkshopId").val("0");
|
||||
$("#searchModel_WorkShopName").val('');
|
||||
|
||||
// $("#SearchModel_Id").val("0");
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
|
||||
if (event.keyCode === 13) {
|
||||
if ($("#searchModel_EmployerId").val() == "0")
|
||||
$("#searchModel_EmployerName").val($("#empSearchEmployer").val())
|
||||
$('.btn-search1').click();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,215 @@
|
||||
@using CompanyManagment.App.Contracts.InsuranceList.Enums
|
||||
@using Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@model CompanyManagment.App.Contracts.InsuranceList.InsuranceListConfirmOperation
|
||||
|
||||
@{
|
||||
string adminVersion = _0_Framework.Application.Version.AdminVersion;
|
||||
<link href="~/assetsadmin/page/insurancelist/css/operationsmodal.css?ver=@adminVersion" rel="stylesheet" />
|
||||
}
|
||||
|
||||
<form role="form" method="post" name="create-form" id="create-form" autocomplete="off">
|
||||
<div class="container">
|
||||
<div class="modal-custom">
|
||||
<div class="modal__header">
|
||||
<h2 class="modal__title">تکمیل اطلاعات بیمه</h2>
|
||||
<button type="button" class="modal__close" data-dismiss="modal" aria-hidden="true">
|
||||
<svg width="35" height="35" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22 38.5C19.8332 38.5 17.6876 38.0732 15.6857 37.244C13.6839 36.4148 11.8649 35.1994 10.3327 33.6673C8.80057 32.1351 7.58519 30.3161 6.75599 28.3143C5.92678 26.3124 5.5 24.1668 5.5 22C5.5 19.8332 5.92679 17.6876 6.75599 15.6857C7.58519 13.6838 8.80057 11.8649 10.3327 10.3327C11.8649 8.80057 13.6839 7.58519 15.6857 6.75599C17.6876 5.92678 19.8332 5.5 22 5.5C24.1668 5.5 26.3124 5.92679 28.3143 6.75599C30.3162 7.58519 32.1351 8.80057 33.6673 10.3327C35.1994 11.8649 36.4148 13.6839 37.244 15.6857C38.0732 17.6876 38.5 19.8332 38.5 22C38.5 24.1668 38.0732 26.3124 37.244 28.3143C36.4148 30.3162 35.1994 32.1351 33.6673 33.6673C32.1351 35.1994 30.3161 36.4148 28.3143 37.244C26.3124 38.0732 24.1668 38.5 22 38.5L22 38.5Z" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M16.5 16.5L27.5 27.5" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
<path d="M27.5 16.5L16.5 27.5" stroke="#33363F" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal__content">
|
||||
<input type="hidden" asp-for="@Model.InsuranceListId" />
|
||||
|
||||
<div class="card-action @(Model.Inspection.Type == InsuranceListInspectionType.None ? "" : "card-action__success")" style="pointer-events: @(Model.ConfirmSentList ? "none" : "auto")">
|
||||
<div class="card-action__title">بازرسی</div>
|
||||
|
||||
<div class="card-action__container">
|
||||
<div class="card-action__container-right">
|
||||
<div class="card-action__status @(Model.Inspection.Type == InsuranceListInspectionType.None ? "" : "card-action__status-success")">
|
||||
<div class="card-action__status-icon">
|
||||
<svg class="card-action__status-icon-svg" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: @(Model.Inspection.Type == InsuranceListInspectionType.None ? "none" : "block")">
|
||||
<circle cx="31.9998" cy="31.9974" r="21.3333" fill="#35EA08"/>
|
||||
<path d="M25.3335 31.9974L30.5608 37.2247C30.6193 37.2832 30.7143 37.2832 30.7729 37.2247L41.3335 26.6641" stroke="white" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__inspection-type">
|
||||
<label class="card-action__checkbox">
|
||||
<input name="Inspection.Type" type="checkbox" @(Model.Inspection.Type == InsuranceListInspectionType.Old ? "checked" : "") value="1" />
|
||||
بازرسی قدیمی
|
||||
</label>
|
||||
|
||||
<label class="card-action__checkbox">
|
||||
<input name="Inspection.Type" type="checkbox" @(Model.Inspection.Type == InsuranceListInspectionType.New ? "checked" : "") value="2" />
|
||||
بازرسی جدید
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__container-left">
|
||||
<div class="card-action__date">
|
||||
<label class="card-action__label" for="last-inspection-date">تاریخ آخرین بازرسی</label>
|
||||
<input type="text" id="last-inspection-date" class="card-action__input date" placeholder="____/__/__" asp-for="@Model.Inspection.LastInspectionDate">
|
||||
</div>
|
||||
|
||||
<div class="card-action__upload" id="card-inspection">
|
||||
<div class="card-action__upload-icon">
|
||||
<img src="~/assetsclient/images/icons/upload.png" style="width: 35px;" />
|
||||
</div>
|
||||
@if (Model.Inspection.InspectionFileMediaId != 0)
|
||||
{
|
||||
<button type="button" class="card-action__upload-btn remove-file-btn" data-type="inspection">حذف فایل</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="button" class="card-action__upload-btn choose-file-btn" data-type="inspection">انتخاب فایل</button>
|
||||
}
|
||||
<input type="file" name="Inspection.InspectionFile" style="display: none;" data-type="inspection">
|
||||
<input type="hidden" class="mediaIds" asp-for="@Model.Inspection.InspectionFileMediaId" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action @(Model.Debt.Type == InsuranceListDebtType.None ? "" : "card-action__success")" style="pointer-events: @(Model.ConfirmSentList ? "none" : "auto")">
|
||||
<div class="card-action__title">بدهی</div>
|
||||
|
||||
<div class="card-action__container">
|
||||
<div class="card-action__container-right">
|
||||
<div class="card-action__status @(Model.Debt.Type == InsuranceListDebtType.None ? "" : "card-action__status-success")">
|
||||
<div class="card-action__status-icon">
|
||||
<svg class="card-action__status-icon-svg" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: @(Model.Debt.Type == InsuranceListDebtType.None ? "none" : "block")">
|
||||
<circle cx="31.9998" cy="31.9974" r="21.3333" fill="#35EA08"/>
|
||||
<path d="M25.3335 31.9974L30.5608 37.2247C30.6193 37.2832 30.7143 37.2832 30.7729 37.2247L41.3335 26.6641" stroke="white" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__inspection-type">
|
||||
<label class="card-action__checkbox">
|
||||
<input name="Debt.Type" type="checkbox" @(Model.Debt.Type == InsuranceListDebtType.Old ? "checked" : "") value="1" />
|
||||
بدهی قدیمی
|
||||
</label>
|
||||
|
||||
<label class="card-action__checkbox">
|
||||
<input name="Debt.Type" type="checkbox" @(Model.Debt.Type == InsuranceListDebtType.New ? "checked" : "") value="2" />
|
||||
بدهی جدید
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__container-left">
|
||||
<div class="card-action__inspection-type">
|
||||
<div class="card-action__date--group">
|
||||
<div class="card-action__date">
|
||||
<label class="card-action__label" for="last-inspection-date">تاریخ</label>
|
||||
<input type="text" asp-for="@Model.Debt.DebtDate" class="card-action__input date" placeholder="____/__/__">
|
||||
</div>
|
||||
<div class="card-action__price">
|
||||
<label class="card-action__label" for="last-inspection-date">مبلغ</label>
|
||||
<input type="text" asp-for="@Model.Debt.Amount" class="card-action__input" placeholder="">
|
||||
<span class="card-action__price-rial">ریال</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__upload" id="card-debt">
|
||||
<div class="card-action__upload-icon">
|
||||
<img src="~/assetsclient/images/icons/upload.png" style="width: 35px;" />
|
||||
</div>
|
||||
@if (Model.Debt.DebtFileMediaId != 0)
|
||||
{
|
||||
<button type="button" class="card-action__upload-btn remove-file-btn" data-type="debt">حذف فایل</button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button type="button" class="card-action__upload-btn choose-file-btn" data-type="debt">انتخاب فایل</button>
|
||||
}
|
||||
<input type="file" name="Debt.DebtFile" style="display: none;" data-type="debt">
|
||||
<input type="hidden" class="mediaIds" asp-for="@Model.Debt.DebtFileMediaId" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action @(Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.WrittenApproval ? "card-action__success" : "")" style="pointer-events: @(Model.ConfirmSentList ? "none" : "auto")">
|
||||
<div class="card-action__title">تاییده کارفرما</div>
|
||||
|
||||
<div class="card-action__container">
|
||||
<div class="card-action__container-right">
|
||||
<div class="card-action__status @(Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.WrittenApproval ? "" : "card-action__status-success")">
|
||||
<div class="card-action__status-icon">
|
||||
<svg class="card-action__status-icon-svg d-none" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: @(Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.WrittenApproval ? "none" : "block")">
|
||||
<circle cx="31.9998" cy="31.9974" r="21.3333" fill="#35EA08"/>
|
||||
<path d="M25.3335 31.9974L30.5608 37.2247C30.6193 37.2832 30.7143 37.2832 30.7729 37.2247L41.3335 26.6641" stroke="white" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__inspection-type">
|
||||
<label class="card-action__checkbox">
|
||||
<input type="checkbox" name="Approval.ApprovalStatus" class="WrittenVerbal" id="Written" @(Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.WrittenApproval ? "checked" : "") value="2" />
|
||||
کاغذی
|
||||
</label>
|
||||
|
||||
<label class="card-action__checkbox">
|
||||
<input type="checkbox" name="Approval.ApprovalStatus" class="WrittenVerbal" id="Verbal" @(Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.VerbalApproval ? "checked" : "") value="1" />
|
||||
اذنی
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__container-left">
|
||||
<div id="descriptionSection" class="card-action__date disable">
|
||||
<label class="card-action__label" for="description">توضیحات</label>
|
||||
<textarea class="card-action__textarea" asp-for="@Model.Approval.Description" id="description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="sendListSection" class="card-action @(Model.Inspection.Type == InsuranceListInspectionType.None || Model.Debt.Type == InsuranceListDebtType.None || Model.Approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.None ? "disable-blur" : "")">
|
||||
<div class="card-action__title">ارسال لیست</div>
|
||||
|
||||
<div class="card-action__container">
|
||||
<div class="card-action__container-right">
|
||||
<div class="card-action__status @(Model.ConfirmSentList ? "card-action__status-success" : "")">
|
||||
<div class="card-action__status-icon">
|
||||
<svg class="card-action__status-icon-svg d-none" width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: @(Model.ConfirmSentList ? "block" : "none")">
|
||||
<circle cx="31.9998" cy="31.9974" r="21.3333" fill="#35EA08"/>
|
||||
<path d="M25.3335 31.9974L30.5608 37.2247C30.6193 37.2832 30.7143 37.2832 30.7729 37.2247L41.3335 26.6641" stroke="white" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-action__inspection-type">
|
||||
<label class="card-action__checkbox">
|
||||
<input name="ConfirmSentList" type="checkbox" @(Model.ConfirmSentList ? "checked" : "") value="true"/>
|
||||
ارسال لیست به سازمان تامین اجتماعی انجام شد
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal__footer">
|
||||
<button type="button" class="modal__button modal__button--cancel" data-dismiss="modal" aria-hidden="true">انصراف</button>
|
||||
<button type="button" class="modal__button modal__button--success" onclick="SaveData()">ثبت</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
var antiForgeryToken = $(`@Html.AntiForgeryToken()`).val();
|
||||
var saveOperationsModal = "@Url.Page("./Index", "SaveOperationsModal")";
|
||||
</script>
|
||||
<script src="~/assetsadmin/page/insurancelist/js/operationsmodal.js?ver=@adminVersion"></script>
|
||||
@@ -60,6 +60,14 @@
|
||||
.sweet-alert {
|
||||
font-family: 'IranSans' !important
|
||||
}
|
||||
|
||||
table.dataTable tbody tr {
|
||||
transition: all .1s ease-in
|
||||
}
|
||||
|
||||
table.dataTable tbody tr:hover {
|
||||
background-color: #d5e5e5 !important;
|
||||
}
|
||||
</style>
|
||||
<link href="~/AdminTheme/assets/sweet-alert/sweet-alert.min.css" rel="stylesheet">
|
||||
<link href="~/AdminTheme/assets/css/alert.css" rel="stylesheet">
|
||||
@@ -127,8 +135,8 @@
|
||||
}
|
||||
|
||||
<div>
|
||||
<p class="text-right fw-bold text-nowrap" style="font-size: 14px;color: #7b7b7b;font-weight: 600;">@currentAccount.Fullname</p>
|
||||
<p class="text-right fw-bold text-nowrap">@currentAccount.Role</p>
|
||||
<p class="fw-bold text-nowrap text-right" style="font-size: 14px;color: #7b7b7b;font-weight: 600;">@currentAccount.Fullname</p>
|
||||
<p class="fw-bold text-nowrap text-right">@currentAccount.Role</p>
|
||||
</div>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="10" viewBox="0 0 12 10" fill="none">
|
||||
@@ -162,7 +170,7 @@
|
||||
<i class="md md-notifications"></i> <span class="badge badge-xs badge-danger">3</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu dropdown-menu-lg">
|
||||
<li class="text-center notifi-title">Notification</li>
|
||||
<li class="notifi-title text-center">Notification</li>
|
||||
<li class="list-group">-->
|
||||
<!-- list item-->
|
||||
<!--<a href="javascript:void(0);" class="list-group-item">
|
||||
@@ -272,8 +280,8 @@
|
||||
</div>
|
||||
<!-- END wrapper -->
|
||||
<script>
|
||||
var resizefunc = [];
|
||||
</script>
|
||||
var resizefunc = [];
|
||||
</script>
|
||||
|
||||
|
||||
<div id="MainModal" class="modal fade" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
@@ -301,7 +309,10 @@
|
||||
<script src="~/AdminTheme/assets/fastclick/fastclick.js"></script>
|
||||
<script src="~/AdminTheme/assets/jquery-slimscroll/jquery.slimscroll.js"></script>
|
||||
<script src="~/AdminTheme/assets/jquery-blockui/jquery.blockUI.js"></script>
|
||||
|
||||
|
||||
<script src="~/assetsclient/js/services/ajax-service.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsclient/js/services/url-params-builder.js?ver=@Version.AdminVersion"></script>
|
||||
<script src="~/assetsclient/js/services/jalali-date-validator.js?ver=@Version.AdminVersion"></script>
|
||||
|
||||
<!-- sweet alerts -->
|
||||
<script src="~/AdminTheme/assets/sweet-alert/sweet-alert.min.js"></script>
|
||||
@@ -366,261 +377,281 @@
|
||||
</script>*@
|
||||
|
||||
<script>
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function () { };
|
||||
$(document).ready(function () {
|
||||
$(".select-city").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
$.fn.modal.Constructor.prototype.enforceFocus = function () { };
|
||||
$(document).ready(function () {
|
||||
$(".select-city").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
|
||||
$('.has_sub.active').find(".md-add").removeClass("md-add").addClass("md-remove");
|
||||
$('.has_sub.active').find('.MainMenuItem').addClass('active');
|
||||
})
|
||||
$('.has_sub.active').find(".md-add").removeClass("md-add").addClass("md-remove");
|
||||
$('.has_sub.active').find('.MainMenuItem').addClass('active');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
|
||||
//vafa After Modal fix
|
||||
// $('#MainModal').on('hidden.bs.modal', function () {
|
||||
// $("#ModalContent").html("");
|
||||
// $("#printSection").html("");
|
||||
// });
|
||||
var url = window.location.href.split('?')[0];
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
function convertPersianNumbersToEnglish(input) {
|
||||
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g];
|
||||
var arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g];
|
||||
|
||||
var str = input;
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
var antiForgeryTokenLayout = $('@Html.AntiForgeryToken()').val();
|
||||
//vafa After Modal fix
|
||||
// $('#MainModal').on('hidden.bs.modal', function () {
|
||||
// $("#ModalContent").html("");
|
||||
// $("#printSection").html("");
|
||||
// });
|
||||
var url = window.location.href.split('?')[0];
|
||||
var url2 = window.location.href.split('#')[0];
|
||||
|
||||
$('.btnDashboard').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).addClass('active');
|
||||
};
|
||||
});
|
||||
$('.btnDashboard').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(this).addClass('active');
|
||||
};
|
||||
});
|
||||
|
||||
$('.clik').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf1").slideDown(1);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik2').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf2").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik3').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf3").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik4').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf4").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik5').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf5").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik6').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf6").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik7').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf7").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik8').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf8").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.btnWorkFlow').filter(function () {
|
||||
if (this.href === url || this.href === url2) {
|
||||
$(this).addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf1").slideDown(1);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik2').filter(function() {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf2").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik3').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf3").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik4').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf4").slideDown(350);
|
||||
/* $(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik5').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf5").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik6').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf6").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik7').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf7").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).closest("li").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik8').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf8").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$('.clik9').filter(function () {
|
||||
if (this.href == url || this.href == url2) {
|
||||
$(".sdf9").slideDown(350);
|
||||
/*$(".wav").addClass("subdrop");*/
|
||||
$(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
};
|
||||
});
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', function (e) {
|
||||
var $target = $(e.target);
|
||||
if (!$target.closest('.dropdown').length &&
|
||||
$('.dropdown-menu').is(':visible')) {
|
||||
$('.dropdown-menu').removeClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', function (e) {
|
||||
var $target = $(e.target);
|
||||
if (!$target.closest('.dropdown').length &&
|
||||
$('.dropdown-menu').is(':visible')) {
|
||||
$('.dropdown-menu').removeClass('show');
|
||||
}
|
||||
});
|
||||
$('.profile-box').on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
var $dropdownMenu = $(this).siblings('.dropdown-menu');
|
||||
if ($dropdownMenu.hasClass('show')) {
|
||||
$dropdownMenu.removeClass('show');
|
||||
} else {
|
||||
$('.dropdown-menu').removeClass('show');
|
||||
$dropdownMenu.addClass('show');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.profile-box').on('click', function (e) {
|
||||
e.stopPropagation();
|
||||
var $dropdownMenu = $(this).siblings('.dropdown-menu');
|
||||
if ($dropdownMenu.hasClass('show')) {
|
||||
$dropdownMenu.removeClass('show');
|
||||
} else {
|
||||
$('.dropdown-menu').removeClass('show');
|
||||
$dropdownMenu.addClass('show');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//$('ul.sdf3 a').filter(function() {
|
||||
// if (this.href == url || this.href == url2) {
|
||||
//$('ul.sdf3 a').filter(function() {
|
||||
// if (this.href == url || this.href == url2) {
|
||||
|
||||
// $(".sdf1").slideDown(350);
|
||||
// $(".wav").addClass("subdrop");
|
||||
// $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
// };
|
||||
//});
|
||||
// $(".sdf1").slideDown(350);
|
||||
// $(".wav").addClass("subdrop");
|
||||
// $(this).parentsUntil("#sidebar-menu > ul > li > a").addClass('active');
|
||||
// };
|
||||
//});
|
||||
|
||||
|
||||
//$(".waves-effect").click(function () {
|
||||
// if ($("div, ul, li").hasClass("active")) {
|
||||
//$(".waves-effect").click(function () {
|
||||
// if ($("div, ul, li").hasClass("active")) {
|
||||
|
||||
// $("div, ul, li").removeClass("active");
|
||||
// $("div, ul, li").removeClass("active");
|
||||
|
||||
|
||||
|
||||
// }
|
||||
//});
|
||||
// }
|
||||
//});
|
||||
|
||||
_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);
|
||||
}
|
||||
});
|
||||
}
|
||||
_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);
|
||||
}
|
||||
});
|
||||
}
|
||||
_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);
|
||||
}
|
||||
});
|
||||
}
|
||||
_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);
|
||||
_RefreshCheckerCountMenu();
|
||||
function _RefreshCheckerCountMenu() {
|
||||
$.ajax({
|
||||
//async: true,
|
||||
dataType: 'json',
|
||||
url: '/AdminNew?handler=LayoutCountChecker',
|
||||
headers: { "RequestVerificationToken": antiForgeryTokenLayout },
|
||||
type: 'GET',
|
||||
success: function (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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// 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>
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
}
|
||||
|
||||
<h1>Upload File</h1>
|
||||
@* <form asp-page-handler="Upload" id="1" method="post" enctype="multipart/form-data">
|
||||
<form asp-page-handler="Upload" id="1" method="post" enctype="multipart/form-data">
|
||||
<div>
|
||||
<label asp-for="File">Choose a file:</label>
|
||||
<input asp-for="File" type="file" required>
|
||||
</div>
|
||||
<button type="submit">Upload</button>
|
||||
</form> *@
|
||||
</form>
|
||||
|
||||
<form asp-page-handler="ShiftDate" id="8" method="post">
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<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" />
|
||||
|
||||
<script src="~/assetsadminnew/assets/js/jquery-3.7.1.min.js"></script>
|
||||
@@ -35,7 +34,7 @@
|
||||
<partial name="_Menu" />
|
||||
<partial name="_header" />
|
||||
|
||||
<div class="p-2 content-container">
|
||||
<div class="content-container p-2">
|
||||
<div class="container-fluid">
|
||||
@RenderBody()
|
||||
</div>
|
||||
@@ -46,7 +45,7 @@
|
||||
<script src="~/assetsadminnew/assets/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="~/AssetsClient/libs/select2/js/select2.js"></script>
|
||||
<script src="~/AssetsClient/libs/select2/js/i18n/fa.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script src="~/assetsadminnew/assets/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script src="~/assetsadminnew/assets/js/datevalidation.js"></script>
|
||||
|
||||
|
||||
@@ -59,11 +58,10 @@
|
||||
<script src="~/AdminTheme/assets/notifications/notify.min.js"></script>
|
||||
<script src="~/AdminTheme/assets/notifications/notify-metro.js"></script>
|
||||
<script src="~/AdminTheme/assets/notifications/notifications.js"></script>
|
||||
|
||||
<script src="~/assetsadminnew/sidbar_adminnew/sidebar_admin.js"></script>
|
||||
|
||||
<script src="~/assetsadminnew/sidbar_adminnew/sidebar_admin.js"></script>
|
||||
<script src="~/assetsclient/js/services/ajax-service.js?ver=@Version.AdminVersion"></script>
|
||||
|
||||
|
||||
@* <script src="~/assetsclient/js/smooth-scrollbar.js"></script> *@
|
||||
|
||||
<script>
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
public IActionResult OnGetPrintOne(long id)
|
||||
{
|
||||
|
||||
var res = _checkoutApplication.PrintOne(id);
|
||||
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
|
||||
if (res.HasRollCall)
|
||||
return Partial("PrintOneRollCall", res);
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.Checkouts
|
||||
public IActionResult OnGetPrintOneMobile(long id)
|
||||
{
|
||||
|
||||
var res = _checkoutApplication.PrintOne(id);
|
||||
var res = _checkoutApplication.PrintAll([id]).FirstOrDefault();
|
||||
if (res.HasRollCall)
|
||||
return Partial("PrintOneRollCall", res);
|
||||
|
||||
|
||||
484
ServiceHost/wwwroot/AssetsAdmin/page/InsuranceList/css/Index.css
Normal file
484
ServiceHost/wwwroot/AssetsAdmin/page/InsuranceList/css/Index.css
Normal file
@@ -0,0 +1,484 @@
|
||||
.btn-search {
|
||||
background: #84CC16;
|
||||
}
|
||||
|
||||
.btn-search {
|
||||
border-radius: 7px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-search span {
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.sweet-alert h2 {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.custom-scrollbar-x::-webkit-scrollbar {
|
||||
height: 6px;
|
||||
}
|
||||
|
||||
.custom-scrollbar-x::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.custom-scrollbar-x::-webkit-scrollbar-thumb {
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.tab-bar {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.tab-bar__tab {
|
||||
width: 128px;
|
||||
height: 33px;
|
||||
background-color: #24c4c4;
|
||||
color: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 0 6px;
|
||||
border-radius: 7px 7px 0 0;
|
||||
}
|
||||
|
||||
|
||||
.tab-bar__tab--active {
|
||||
background-color: #FFFFFF;
|
||||
color: #1A3E7B;
|
||||
border-top: 1px solid #24c4c4
|
||||
}
|
||||
|
||||
.tab-bar__tab-label {
|
||||
font-weight: 400;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.tab-bar__tab-badge {
|
||||
background-color: #FF6363;
|
||||
color: white;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 30px;
|
||||
font-size: 9px;
|
||||
font-weight: 400;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
border-radius: 10px;
|
||||
padding: 10px 10px 20px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
|
||||
.insurance-card-mobile {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
background-color: white;
|
||||
padding: 10px 10px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.insurance-table__head {
|
||||
position: sticky;
|
||||
top: 2px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.u-tactile {
|
||||
cursor: pointer;
|
||||
transition: opacity 300ms ease-in-out;
|
||||
}
|
||||
|
||||
.u-tactile:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.insurance-table__cell-card {
|
||||
display: inline-block;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.insurance-table__cell-card--small {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
|
||||
.insurance-table__cell-card--medium {
|
||||
background-color: #8DDD8D;
|
||||
color: #FFFFFF;
|
||||
width: 57px;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.insurance-table__cell-card--large {
|
||||
background-color: #8DDD8D;
|
||||
color: #FFFFFF;
|
||||
width: 33.3%;
|
||||
height: 22px;
|
||||
line-height: 22px;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tooltip-container {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tooltip-container__text {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
width: max-content;
|
||||
max-width: 300px;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
padding: 5px 8px;
|
||||
z-index: 100000;
|
||||
bottom: 35px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
transition: opacity 0.3s;
|
||||
white-space: normal
|
||||
}
|
||||
|
||||
.tooltip-container:hover .tooltip-container__text {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
.insurance-table__toggle {
|
||||
background-color: #F1F5F9 !important;
|
||||
border: 0.5px solid #E9E9E9;
|
||||
border-bottom-left-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
opacity: 0;
|
||||
max-height: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
margin-top: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
overflow: hidden;
|
||||
transition: opacity 0.4s ease, max-height 0.4s ease, padding 0.4s ease, margin 0.4s ease;
|
||||
will-change: max-height, opacity, padding, margin;
|
||||
}
|
||||
|
||||
.insurance-table__toggle.show {
|
||||
opacity: 1;
|
||||
max-height: 350px;
|
||||
padding-top: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem !important;
|
||||
}
|
||||
|
||||
|
||||
.insurance-table__operation-button {
|
||||
width: 71px;
|
||||
height: 27px;
|
||||
border-radius: 5px;
|
||||
background-color: #275197;
|
||||
color: white
|
||||
}
|
||||
|
||||
|
||||
|
||||
.insurance-table__toggle-label {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #202020
|
||||
}
|
||||
|
||||
.insurance-table__toggle-value {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
color: #818181
|
||||
}
|
||||
/*Awaiting reference Table*/
|
||||
.insurance-table__stage-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 23px;
|
||||
border-radius: 5px;
|
||||
background-color: #84CC16;
|
||||
color: white;
|
||||
font-size: 10px;
|
||||
padding: 0 4px;
|
||||
white-space: nowrap
|
||||
}
|
||||
|
||||
/* The whole workshop */
|
||||
.insurance-table__status-button {
|
||||
width: 88px;
|
||||
height: 32px;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
border-radius: 0
|
||||
}
|
||||
|
||||
.insurance-table__status-button--documents-setup {
|
||||
background-color: #C8C8C8 !important;
|
||||
}
|
||||
|
||||
.insurance-table__status-button--step1 {
|
||||
background-color: #87DFFF !important;
|
||||
}
|
||||
|
||||
.insurance-table__status-button--step2 {
|
||||
background-color: #FEA99A !important;
|
||||
}
|
||||
|
||||
.insurance-table__status-button--step3 {
|
||||
background-color: #FEDE76 !important;
|
||||
}
|
||||
|
||||
.insurance-table__status-button--step4 {
|
||||
background-color: #A3FF87 !important;
|
||||
}
|
||||
|
||||
.card-button__create-new {
|
||||
background-color: #84CC16 !important;
|
||||
color: #ffffff;
|
||||
border-radius: 8px;
|
||||
width: 141px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
justify-content: center;
|
||||
padding: 5px;
|
||||
margin: auto 0 5px;
|
||||
transition: .2s all ease-in;
|
||||
}
|
||||
|
||||
.card-button__create-new:hover {
|
||||
background-color: #76B713 !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------------- offcanvas
|
||||
/* Overlay */
|
||||
.offcanvas-overlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: 0.3s ease;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.offcanvas-overlay.active {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* پنل offcanvas */
|
||||
.offcanvas {
|
||||
position: fixed;
|
||||
bottom: -100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: white;
|
||||
border-radius: 20px 20px 0 0;
|
||||
box-shadow: 0 -2px 20px rgba(0,0,0,0.2);
|
||||
padding: 10px 20px;
|
||||
transition: bottom 0.4s ease;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.offcanvas.active {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.offcanvas-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: bold;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.offcanvas-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-group input,
|
||||
.form-group textarea {
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 5px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
margin: 5px 0px;
|
||||
padding: 8px 0;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background-color: #101827;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-submit {
|
||||
background-color: #9CDD4F;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-clear-filter {
|
||||
background-color: #FF8798;
|
||||
border-radius: 7px;
|
||||
padding: 6px 10px;
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
transition: all ease-in-out .3s;
|
||||
}
|
||||
|
||||
.btn-clear-filter:hover {
|
||||
background-color: #cb6977;
|
||||
}
|
||||
|
||||
.btn-clear-filter span {
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.tooltip-container {
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tooltip__trigger {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tooltip-container__text {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
width: max-content;
|
||||
/*max-width: 400px;*/
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
text-align: start;
|
||||
border-radius: 4px;
|
||||
padding: 5px 8px;
|
||||
z-index: 100000;
|
||||
bottom: 35px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
transition: opacity 0.3s;
|
||||
white-space: normal
|
||||
}
|
||||
|
||||
.tooltip-container:hover .tooltip-container__text {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@media(min-width:768px) {
|
||||
.tab-bar__tab-label {
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.insurance-table__status-button {
|
||||
width: 166px;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.insurance-table__status-button--documents-setup {
|
||||
background-color: #C8C8C8 !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media(max-width:768px) {
|
||||
.btn-clear-filter {
|
||||
margin: 15px 0 0 0;
|
||||
}
|
||||
|
||||
.waves-effect {
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
#_workFlowCountSection, #_checkerCountSection, #_ticketCountSection, #_taskCountSection {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#_workFlowCount, #_checkerCount, #_ticketCount, #_taskCount {
|
||||
position: absolute;
|
||||
top: -20px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
right: -29px;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#wrapper.enlarged .left.side-menu #sidebar-menu ul > li > a span {
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.btn-search span {
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,353 @@
|
||||
.error-input {
|
||||
border: 1px solid #FD5757 !important;
|
||||
background-color: #ffefef;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
right: 50%;
|
||||
transform: translate(50%, -52%) !important;
|
||||
width: 750px !important;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
/*height: 370px;*/
|
||||
background-color: #FFFFFF !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.d-none {
|
||||
display: none
|
||||
}
|
||||
|
||||
.modal-custom {
|
||||
position: relative;
|
||||
/*display: flex;*/
|
||||
/*justify-content: center;*/
|
||||
/*align-items: center;*/
|
||||
}
|
||||
|
||||
.modal__dialog {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
width: 500px;
|
||||
max-width: 100%;
|
||||
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal__header,
|
||||
.modal__footer {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.modal__footer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.modal__title {
|
||||
margin: 0;
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.modal__close {
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
right: -12px;
|
||||
}
|
||||
|
||||
.modal__content {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.modal__button {
|
||||
padding: 0.5rem 1rem;
|
||||
border: none;
|
||||
background-color: #ddd;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.modal__button--success {
|
||||
background-color: #84CC16;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.modal__button--cancel {
|
||||
background-color: #454D5C;
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* --------------------------------------------------- Card Action */
|
||||
.disable {
|
||||
filter: grayscale(100%);
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.disable-blur {
|
||||
filter: blur(2px) grayscale(100%);
|
||||
pointer-events: none;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.card-action {
|
||||
position: relative;
|
||||
border: 1px solid #E4E4E7;
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin: 0 0 18px 0;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.card-action__success {
|
||||
border: 1px solid #55d187;
|
||||
background-color: #e9fdf2;
|
||||
}
|
||||
|
||||
.card-action__title {
|
||||
font-weight: bold;
|
||||
position: absolute;
|
||||
top: -12px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.card-action__container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-action__container-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.card-action__container-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
.card-action__upload {
|
||||
border: 1px dashed #ccc;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 6px;
|
||||
border-radius: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card-action__upload-btn {
|
||||
background-color: #C7FFE9;
|
||||
border: none;
|
||||
padding: 6px 12px;
|
||||
border-radius: 50px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
width: 89px;
|
||||
}
|
||||
|
||||
.remove-file-btn {
|
||||
background-color: #e74c3c;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.remove-file-btn:hover {
|
||||
background-color: #c0392b;
|
||||
}
|
||||
|
||||
.card-action__upload-icon {
|
||||
font-size: 24px;
|
||||
color: #00c07e;
|
||||
}
|
||||
|
||||
.card-action__date {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.card-action__price {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.card-action__price-rial {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 7px;
|
||||
font-size: 12px;
|
||||
color: #5e5e5e;
|
||||
}
|
||||
|
||||
.card-action__label {
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: 6px;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.card-action__input {
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 9px;
|
||||
padding: 6px 10px;
|
||||
text-align: center;
|
||||
min-width: 90px;
|
||||
width: 180px;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.card-action__textarea {
|
||||
border: 1px solid #DADADA;
|
||||
border-radius: 9px;
|
||||
padding: 6px 10px;
|
||||
min-width: 90px;
|
||||
width: 380px;
|
||||
height: 80px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.card-action__inspection-type {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.card-action__checkbox {
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
color: #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.card-action__checkbox input {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card-action__status {
|
||||
margin-right: auto;
|
||||
background-color: #EEE;
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.card-action__status-success {
|
||||
background-color: #C6FFB4;
|
||||
}
|
||||
|
||||
.card-action__status-icon {
|
||||
color: white;
|
||||
font-size: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.file-info {
|
||||
font-size: 0.9rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.card-action__date--group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@media(max-width:768px) {
|
||||
.modal-dialog {
|
||||
width: 500px !important;
|
||||
}
|
||||
|
||||
.modal__content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.card-action {
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.card-action__status {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-action__container-right .card-action__inspection-type {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.card-action__inspection-type {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-action__container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-action__container-left {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.card-action__input {
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
.card-action__upload {
|
||||
flex-direction: row-reverse;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.card-action__date--group {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.card-action__date--group .card-action__input {
|
||||
width: 130px;
|
||||
}
|
||||
|
||||
.card-action__container {
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.card-action__textarea {
|
||||
width: 272px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 576px) {
|
||||
.modal-dialog {
|
||||
width: 350px !important;
|
||||
}
|
||||
}
|
||||
998
ServiceHost/wwwroot/AssetsAdmin/page/InsuranceList/js/Index.js
Normal file
998
ServiceHost/wwwroot/AssetsAdmin/page/InsuranceList/js/Index.js
Normal file
@@ -0,0 +1,998 @@
|
||||
var pageIndexJs = 0;
|
||||
var hasMoreData = true;
|
||||
|
||||
var isMobile = window.matchMedia('(max-width: 768px)').matches;
|
||||
var overlay = document.querySelector('.offcanvas-overlay');
|
||||
var offcanvas = document.getElementById('offcanvas');
|
||||
|
||||
function openOffcanvas() {
|
||||
overlay.classList.add('active');
|
||||
offcanvas.classList.add('active');
|
||||
document.body.style.overflow = 'hidden';
|
||||
}
|
||||
|
||||
function closeOffcanvas() {
|
||||
overlay.classList.remove('active');
|
||||
offcanvas.classList.remove('active');
|
||||
document.body.style.overflow = '';
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(".modal").on("hidden.bs.modal", function () {
|
||||
$(".printBtns").css("display", "none");
|
||||
});
|
||||
|
||||
$(document).on("click", ".printModal", function () {
|
||||
$(".printBtns").css("display", "flex");
|
||||
});
|
||||
|
||||
// select2
|
||||
$("#searchModel_Year").select2({ language: "fa", dir: "rtl" });
|
||||
$("#searchModel_Month").select2({ language: "fa", dir: "rtl" });
|
||||
$("#searchModel_TypeOfInsuranceSend").select2({ language: "fa", dir: "rtl" });
|
||||
$("#searchModel_City").select2({ language: "fa", dir: "rtl" });
|
||||
$("#searchModel_FixedSalary").select2({ language: "fa", dir: "rtl" });
|
||||
|
||||
var paramsUrl = UrlParamsBuilder.readParams([
|
||||
"year",
|
||||
"month",
|
||||
"workshop-code",
|
||||
"employee-id",
|
||||
"employee-name",
|
||||
"workshop-id",
|
||||
"workshop-name",
|
||||
"type-of-insurance",
|
||||
"branch",
|
||||
"city",
|
||||
"fixed-salary"
|
||||
]);
|
||||
|
||||
paramsUrl['year'] !== "" ? $("#searchModel_Year").val(paramsUrl['year']).trigger("change") : $("#searchModel_Year").val(year).trigger("change");
|
||||
paramsUrl['month'] !== "" ? $("#searchModel_Month").val(paramsUrl['month']).trigger("change") : $("#searchModel_Month").val(month).trigger("change");
|
||||
$("#searchModel_WorkShopCode").val(paramsUrl['workshop-code']);
|
||||
$("#searchModel_EmployerId").val(paramsUrl['employee-id']);
|
||||
paramsUrl['employee-id'] !== "" && $("#empSearchEmployer").val(paramsUrl['employee-name']).addClass('selectedOption');
|
||||
$("#searchModel_WorkshopId").val(paramsUrl['workshop-id']);
|
||||
paramsUrl['workshop-id'] !== "" && $("#empSearchWorkshop").val(paramsUrl['workshop-name']).addClass('selectedOption');
|
||||
paramsUrl['type-of-insurance'] === "" ? $("#searchModel_TypeOfInsuranceSend").val("0").trigger("change") : $("#searchModel_TypeOfInsuranceSend").val(paramsUrl['type-of-insurance']).trigger("change");
|
||||
$("#searchModel_Branch").val(paramsUrl['branch']);
|
||||
paramsUrl['city'] === "" ? $("#searchModel_City").val(0).trigger("change") : $("#searchModel_City").val(paramsUrl['city']).trigger("change");
|
||||
paramsUrl['fixed-salary'] === "" ? $("#searchModel_FixedSalary").val(0).trigger("change") : $("#searchModel_FixedSalary").val(paramsUrl['fixed-salary']).trigger("change");
|
||||
|
||||
var isAnyNotEmpty = false;
|
||||
for (var key in paramsUrl) {
|
||||
if (paramsUrl[key] !== "") {
|
||||
isAnyNotEmpty = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var isDefaultMonthYear = (paramsUrl["year"] === year && paramsUrl["month"] === month);
|
||||
|
||||
if (isAnyNotEmpty && !isDefaultMonthYear) {
|
||||
$('.btn-clear-filter').removeClass('disable');
|
||||
} else {
|
||||
$('.btn-clear-filter').addClass('disable');
|
||||
}
|
||||
|
||||
// Open Div Mobile
|
||||
$(document).on('click', '.insurance-table__row', function () {
|
||||
var container = $(this).closest('.insurance-table__container');
|
||||
var toggleDiv = container.find('.insurance-table__toggle');
|
||||
var isOpen = toggleDiv.hasClass('show');
|
||||
|
||||
// Close all
|
||||
$('.insurance-table__toggle.show').removeClass('show');
|
||||
|
||||
// Open this one only if it wasn't already open
|
||||
if (!isOpen) {
|
||||
toggleDiv.addClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.js-document-click', function () {
|
||||
isMobile
|
||||
? ($('#overviewSteps').hide(), $('#overviewSteps-mobile').show())
|
||||
: ($('#overviewSteps').show(), $('#overviewSteps-mobile').hide());
|
||||
|
||||
$('.js-document-click').removeClass('tab-bar__tab--active');
|
||||
$(this).addClass('tab-bar__tab--active');
|
||||
var statusValue = $(this).prop('value');
|
||||
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
$("#load-data-html-mobile").html('');
|
||||
$('#load-data-html').html('');
|
||||
|
||||
switch (statusValue) {
|
||||
case "0":
|
||||
loadSearchNew(0);
|
||||
break;
|
||||
case "1":
|
||||
loadSearchNew(1);
|
||||
break;
|
||||
case "2":
|
||||
loadSearchNew(2);
|
||||
break;
|
||||
case "3":
|
||||
loadSearchNew(3);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
});
|
||||
|
||||
$('.btn-search-click').click(function () {
|
||||
urlParamsSearch
|
||||
.addParam("year", $("#searchModel_Year").val())
|
||||
.addParam("month", $("#searchModel_Month").val())
|
||||
.addParam("workshop-code", $("#searchModel_WorkShopCode").val())
|
||||
.addParam("employee-id", $("#searchModel_EmployerId").val() === "0" ? "" : $("#searchModel_EmployerId").val())
|
||||
.addParam("employee-name", $("#empSearchEmployer").val())
|
||||
.addParam("workshop-id", $("#searchModel_WorkshopId").val() === "0" ? "" : $("#searchModel_WorkshopId").val())
|
||||
.addParam("workshop-name", $("#empSearchWorkshop").val())
|
||||
.addParam("type-of-insurance", $("#searchModel_TypeOfInsuranceSend").val())
|
||||
.addParam("branch", $("#searchModel_Branch").val())
|
||||
.addParam("city", $("#searchModel_City").val())
|
||||
.addParam("fixed-salary", $("#searchModel_FixedSalary").val())
|
||||
.pushState();
|
||||
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
$("#load-data-html-mobile").html('');
|
||||
$('#load-data-html').html('');
|
||||
loadGetTabCounts();
|
||||
loadSearchNew(activeValue);
|
||||
|
||||
$('.btn-clear-filter').removeClass('disable');
|
||||
});
|
||||
|
||||
loadGetTabCounts();
|
||||
loadSearchNew();
|
||||
});
|
||||
|
||||
function removeSearch() {
|
||||
window.location.href = baseUrl;
|
||||
}
|
||||
|
||||
async function loadGetTabCounts() {
|
||||
var paramsUrl = UrlParamsBuilder.readParams(["year", "month"]);
|
||||
|
||||
var yearSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['year']) : year;
|
||||
var monthSelect = Number(paramsUrl['month']) !== 0 ? Number(paramsUrl['month']) : month;
|
||||
|
||||
try {
|
||||
var response = await ajaxService.get(ajaxGetTabCountsUrl, { month: monthSelect, year: yearSelect }, true);
|
||||
|
||||
updateStatus('notStarted', response.notStarted);
|
||||
updateStatus('inProgress', response.inProgress);
|
||||
updateStatus('readyToSendList', response.readyToSendList);
|
||||
updateStatus('done', response.done);
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
function updateStatus(id, value) {
|
||||
$(`#${id}`).show();
|
||||
if (parseInt(value) === 0) {
|
||||
$(`#${id}`).hide();
|
||||
} else {
|
||||
$(`#${id}`).text(value).show();
|
||||
}
|
||||
}
|
||||
|
||||
$('.goToTop').on('click', function () {
|
||||
$('html, body').animate({ scrollTop: 0 }, 360);
|
||||
return false;
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() + $(window).height() > $(document).height() - 600) {
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
loadSearchNew(activeValue);
|
||||
}
|
||||
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('.goToTop').show().fadeIn();
|
||||
} else {
|
||||
$('.goToTop').fadeOut().hide();
|
||||
}
|
||||
});
|
||||
|
||||
function loadSearchNew(status = 0) {
|
||||
var pageIndex = pageIndexJs;
|
||||
|
||||
var html = "";
|
||||
var htmlMobile = "";
|
||||
|
||||
var paramsUrl = UrlParamsBuilder.readParams([
|
||||
"year",
|
||||
"month",
|
||||
"workshop-code",
|
||||
"employee-id",
|
||||
"workshop-id",
|
||||
"type-of-insurance",
|
||||
"branch",
|
||||
"city",
|
||||
"fixed-salary"
|
||||
]);
|
||||
|
||||
var searchModel = {
|
||||
Year: paramsUrl['year'] !== "" ? paramsUrl['year'] : year,
|
||||
Month: paramsUrl['month'] !== "" ? paramsUrl['month'] : month,
|
||||
WorkShopCode: paramsUrl['workshop-code'],
|
||||
EmployerId: paramsUrl['employee-id'],
|
||||
WorkshopId: paramsUrl['workshop-id'],
|
||||
TypeOfInsuranceSend: paramsUrl['type-of-insurance'],
|
||||
Branch: paramsUrl['branch'],
|
||||
City: paramsUrl['city'],
|
||||
FixedSalary: paramsUrl['fixed-salary'],
|
||||
Status: status,
|
||||
PageIndex: pageIndex
|
||||
};
|
||||
|
||||
var b = pageIndexJs % 30;
|
||||
|
||||
if (b === 0 && hasMoreData) {
|
||||
ajaxService.get(ajaxSearchNewUrl, searchModel, false)
|
||||
.then(response => {
|
||||
|
||||
var responseData = response.data;
|
||||
if (responseData.length > 0) {
|
||||
responseData.forEach(function (item) {
|
||||
var n = pageIndexJs + 1;
|
||||
var pathDSKKAR00 = item.workShopId + "\\" + item.year + "_" + item.month + "\\DSKKAR00.dbf";
|
||||
var pathDSKWOR00 = item.workShopId + "\\" + item.year + "_" + item.month + "\\DSKWOR00.dbf";
|
||||
|
||||
const rowBgClass = item.isBlockCantracingParty === "true"
|
||||
? "tw-bg-[#b1c3c3] hover:tw-bg-[#bbc6c6]"
|
||||
: item.confirmSentlist
|
||||
? "tw-bg-[#d8f5d2] hover:tw-bg-[#c7ebc0]"
|
||||
: (n % 2 === 0
|
||||
? "tw-bg-[#ecffff] hover:tw-bg-[#C9F0F0]"
|
||||
: "tw-bg-[#ddf4f4] hover:tw-bg-[#C9F0F0]");
|
||||
|
||||
html += `
|
||||
<div class="insurance-table__container">
|
||||
<div class="insurance-table__row tw-transition-all tw-font-[400] tw-flex tw-h-[35px] tw-items-center tw-rounded-[5px] ${rowBgClass} tw-px-2 tw-text-[12px]">
|
||||
<div class="insurance-table__cell tw-w-[3%]">
|
||||
<div class="insurance-table__cell-card insurance-table__cell-card--small ${item.isBlockCantracingParty === "true" ? `` : item.confirmSentlist ? `!tw-bg-[#a3d798]` : ``} ${item.isBlockCantracingParty === "true" ? `!tw-bg-[#9b9d9d] !tw-text-white` : ``}">
|
||||
${n++}
|
||||
</div>
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[4%] tw-text-center">${item.year}</div>
|
||||
<div class="insurance-table__cell tw-w-[5%] tw-text-center">${convertMonthToString(item.month)}</div>
|
||||
<div class="insurance-table__cell tw-w-[10%] tw-text-center">${item.workShopCode}</div>
|
||||
<div class="insurance-table__cell tw-w-[15%] tw-text-right">
|
||||
<div class="tooltip-container tw-text-right">
|
||||
<div class="tooltip__trigger tw-truncate tw-text-right">${item.employerName}</div>
|
||||
<div class="tooltip-container__text">
|
||||
${item.employerName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[15%] tw-text-right">
|
||||
<div class="tooltip-container tw-text-right">
|
||||
<div class="tooltip__trigger tw-truncate tw-text-right">${item.workShopName}</div>
|
||||
<div class="tooltip-container__text">
|
||||
${item.workShopName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[7%] tw-text-center">${item.typeOfInsuranceSend}</div>
|
||||
<div class="insurance-table__cell tw-w-[7%] tw-text-center tw-flex tw-justify-center">
|
||||
${booleanSvgResponse(item.inspectionDone)}
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[7%] tw-text-center tw-flex tw-justify-center">
|
||||
${booleanSvgResponse(item.debtDone)}
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[7%] tw-text-center tw-flex tw-justify-center">
|
||||
${booleanSvgResponse(item.employerApproved)}
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[7%] tw-text-center tw-flex tw-justify-center">
|
||||
${booleanSvgResponse(item.confirmSentlist)}
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[13%] tw-text-end">
|
||||
<div class="tw-flex tw-justify-end tw-gap-2">
|
||||
|
||||
|
||||
${generateButtons(item, pathDSKKAR00, pathDSKWOR00)}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- toggle content -->
|
||||
<div class="insurance-table__toggle tw-mx-auto tw-flex tw-w-[97%] tw-flex-col tw-gap-2 tw-px-2">
|
||||
<div class="insurance-table__toggle-row tw-flex tw-gap-2">
|
||||
<div class="insurance-table__toggle-item tw-mb-2 tw-flex tw-w-[20%]">
|
||||
<span class="insurance-table__toggle-label tw-w-[30%]">شعبه تامین اجتماعی:</span>
|
||||
<span class="insurance-table__toggle-value tw-w-[50%]">${item.branch === `` ? `-` : item.branch}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-mb-2 tw-flex tw-flex tw-w-[20%] tw-gap-40 tw-gap-2">
|
||||
<span class="insurance-table__toggle-label tw-w-[30%]">شهرستان:</span>
|
||||
<span class="insurance-table__toggle-value tw-w-[50%]">${item.city === `` ? `-` : item.city}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-mb-2 tw-flex tw-flex tw-w-[20%] tw-gap-40 tw-gap-2">
|
||||
<span class="insurance-table__toggle-label tw-w-[30%]">لیست مقطوع:</span>
|
||||
<span class="insurance-table__toggle-value tw-w-[50%]">${item.strFixedSalary}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-mb-2 tw-flex tw-flex tw-w-[20%] tw-gap-40 tw-gap-2">
|
||||
<span class="insurance-table__toggle-label tw-w-[30%]"></span>
|
||||
<span class="insurance-table__toggle-value tw-w-[50%]"></span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-mb-2 tw-flex tw-flex tw-w-[20%] tw-gap-40 tw-gap-2">
|
||||
<span class="insurance-table__toggle-label tw-w-[30%]"></span>
|
||||
<span class="insurance-table__toggle-value tw-w-[50%]"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
htmlMobile += `<div class="insurance-table__container tw-cursor-pointer">
|
||||
<div class="insurance-table__row tw-font-[500] tw-flex tw-h-[35px] tw-items-center tw-rounded-[5px] ${rowBgClass} tw-px-2 tw-text-[12px] md:tw-font-[400] md:tw-text-[14px]">
|
||||
<div class="insurance-table__cell tw-w-[10%]">
|
||||
<div class="insurance-table__cell-card insurance-table__cell-card--small tw-text-center ${item.isBlockCantracingParty === "true" ? `` : item.confirmSentlist ? `!tw-bg-[#a3d798]` : ``} ${item.isBlockCantracingParty === "true" ? `!tw-bg-[#9b9d9d] !tw-text-white` : ``}">
|
||||
${n++}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="insurance-table__cell tw-w-[15%] tw-text-center">${item.year}</div>
|
||||
<div class="insurance-table__cell tw-w-[20%] tw-text-center">${convertMonthToString(item.month)}</div>
|
||||
|
||||
<div class="insurance-table__cell tw-w-[50%] tw-text-right">
|
||||
<div class="tooltip-container tw-text-right">
|
||||
<div class="tooltip__trigger tw-truncate tw-text-right">${item.workShopName}</div>
|
||||
<div class="tooltip-container__text">
|
||||
${item.employerName}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__cell tw-flex tw-w-[10%] tw-justify-end tw-gap-2">
|
||||
<button class="u-tactile">
|
||||
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="21" height="21" rx="3" fill="#23bab9"/>
|
||||
<path d="M10.4375 14.1484C11.3436 14.1484 12.0781 14.8891 12.0781 15.8028C12.0781 16.7166 11.3436 17.4573 10.4375 17.4573C9.53141 17.4573 8.79688 16.7166 8.79688 15.8028C8.79688 14.8891 9.53141 14.1484 10.4375 14.1484Z" fill="white"/>
|
||||
<path d="M10.4375 9.07031C11.3436 9.07031 12.0781 9.81102 12.0781 10.7247C12.0781 11.6384 11.3436 12.3791 10.4375 12.3791C9.53141 12.3791 8.79688 11.6384 8.79688 10.7247C8.79688 9.81102 9.53141 9.07031 10.4375 9.07031Z" fill="white"/>
|
||||
<path d="M12.0781 5.65441C12.0781 4.7407 11.3436 4 10.4375 4C9.53141 4 8.79688 4.74071 8.79688 5.65441C8.79688 6.56812 9.53141 7.30882 10.4375 7.30882C11.3436 7.30882 12.0781 6.56812 12.0781 5.65441Z" fill="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- toggle content -->
|
||||
<div class="insurance-table__toggle tw-mx-auto tw-flex tw-w-[95%] tw-flex-col tw-gap-2 tw-px-2">
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex">
|
||||
<div class="insurance-table__toggle-item tw-flex tw-items-center tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">بازرسی: </span>
|
||||
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.inspectionDone)}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-flex tw-items-center tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">بدهی: </span>
|
||||
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.debtDone)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex">
|
||||
<div class="insurance-table__toggle-item tw-flex tw-items-center tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">تاییده کارفرما: </span>
|
||||
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.employerApproved)}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-flex tw-items-center tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">ارسال لیست: </span>
|
||||
<span class="insurance-table__toggle-value">${booleanSvgResponse(item.confirmSentlist)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex">
|
||||
<div class="insurance-table__toggle-item tw-flex tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">شعبه تامین اجتماعی: </span>
|
||||
<span class="insurance-table__toggle-value">${item.branch === `` ? `-` : item.branch}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-flex tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">لیست مقطوع: </span>
|
||||
<span class="insurance-table__toggle-value">${item.strFixedSalary}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex ">
|
||||
<div class="insurance-table__toggle-item tw-flex tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">شهرستان: </span>
|
||||
<span class="insurance-table__toggle-value">${item.city === `` ? `-` : item.city}</span>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-item tw-flex tw-w-[50%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">نوع ارسال لیست: </span>
|
||||
<span class="insurance-table__toggle-value">${item.typeOfInsuranceSend}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex ">
|
||||
<div class="insurance-table__toggle-item tw-flex tw-w-[100%] tw-gap-2">
|
||||
<span class="insurance-table__toggle-label">نام کافرما:</span>
|
||||
<span class="insurance-table__toggle-value">${item.employerName}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="insurance-table__toggle-row tw-flex ">
|
||||
${generateButtons(item, pathDSKKAR00, pathDSKWOR00)}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
pageIndexJs++;
|
||||
});
|
||||
} else {
|
||||
var emptyHtml = ``;
|
||||
if (pageIndexJs === responseData.length) {
|
||||
emptyHtml = `
|
||||
<div class="text-center bg-white card py-5 d-flex align-items-center justify-content-center">
|
||||
<div class="tw-w-full text-center">
|
||||
<img src="/assetsclient/images/empty.png" alt="" class="img-fluid" style="margin: auto;" />
|
||||
<h5>اطلاعاتی وجود ندارد.</h5>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
html += emptyHtml;
|
||||
htmlMobile += emptyHtml;
|
||||
hasMoreData = false;
|
||||
}
|
||||
|
||||
$("#load-data-html").append(html);
|
||||
$("#load-data-html-mobile").append(htmlMobile);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
||||
var html = '';
|
||||
var htmlMobile = '';
|
||||
|
||||
var canShowActions = (currentAccountId === 1 && item.confirmSentlist) || !item.confirmSentlist;
|
||||
var isDisabled = item.isBlockCantracingParty === 'true' ? 'disable' : '';
|
||||
|
||||
// Operations Button
|
||||
if (hasPermission_80212) {
|
||||
html += `
|
||||
<button class="tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#84D500] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}" onclick="openOperationsModal(${item.id})">
|
||||
<svg width="22" height="22" viewBox="0 0 19 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M10.273 2.97957L14.6952 4.15881C15.1329 4.27555 15.4375 4.672 15.4375 5.12505V9.06233C15.4375 11.0685 14.4349 12.9418 12.7657 14.0546L10.0547 15.862C9.7188 16.0859 9.2812 16.0859 8.9453 15.862L6.2343 14.0546C4.56511 12.9418 3.5625 11.0685 3.5625 9.06234V5.12505C3.5625 4.672 3.86708 4.27555 4.30484 4.15881L8.72701 2.97957C9.23349 2.84451 9.76651 2.84451 10.273 2.97957Z" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M7.52083 9.10156L8.92739 10.5081C9.02502 10.6058 9.18331 10.6058 9.28094 10.5081L11.875 7.91406" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">تکمیل اطلاعات</span>
|
||||
</button>`;
|
||||
}
|
||||
|
||||
if (item.inspectionDone && item.debtDone && item.employerApproved) {
|
||||
// Download Button
|
||||
if (hasPermission_80216) {
|
||||
html += `
|
||||
<a href="${downloadFileUrl}&path=${pathDSKWOR00}&fileName=DSKWOR00.dbf" download class="tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#6E6E6E] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}">
|
||||
<svg width="22" height="21" viewBox="0 0 20 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M6.14905 7.1276L10.1074 11.0859M10.1074 11.0859L14.0657 7.1276M10.1074 11.0859L10.1074 3.96094" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M4.5658 12.6641L4.5658 13.4557C4.5658 14.3302 5.27468 15.0391 6.14913 15.0391L14.0658 15.0391C14.9402 15.0391 15.6491 14.3302 15.6491 13.4557V12.6641" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">دانلود</span>
|
||||
</a>`;
|
||||
}
|
||||
|
||||
// Download Button
|
||||
if (hasPermission_80216) {
|
||||
html += `
|
||||
<a href="${downloadFileUrl}&path=${pathDSKKAR00}&fileName=DSKKAR00.dbf" download class="tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#414141] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}">
|
||||
<svg width="22" height="21" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.09973 9.87709C4.36561 10.8694 4.95149 11.7462 5.76649 12.3716C6.5815 12.997 7.58009 13.3359 8.60738 13.3359C9.63467 13.3359 10.6333 12.997 11.4483 12.3716C12.2633 11.7462 12.8492 10.8694 13.115 9.87709" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M5.27405 5.9974L8.60738 8.66406M8.60738 8.66406L11.9407 5.9974M8.60738 8.66406L8.60738 2.66406" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">دانلود</span>
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.inspectionDone && item.debtDone && item.employerApproved && item.confirmSentlist) {
|
||||
// Confirm List and Print Button
|
||||
if (hasPermission_80215) {
|
||||
html += `
|
||||
<a href="${insuranceConfirmUrl + `&id=` + item.id}" class="printModal tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#38BBF6] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}">
|
||||
<svg width="22" height="22" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="16" height="16" fill="#38BBF6"/>
|
||||
<path d="M12 9.0026H12.1111C12.6293 9.0026 12.8883 9.0026 13.0893 8.90891C13.3023 8.80955 13.4736 8.6383 13.573 8.42522C13.6666 8.2243 13.6666 7.96522 13.6666 7.44705V7.44705C13.6666 6.41071 13.6666 5.89255 13.4793 5.4907C13.2805 5.06455 12.938 4.72204 12.5119 4.52332C12.11 4.33594 11.5919 4.33594 10.5555 4.33594H6.06665C4.43893 4.33594 3.62508 4.33594 3.07467 4.78165C2.96606 4.8696 2.86697 4.96869 2.77902 5.0773C2.33331 5.6277 2.33331 6.44156 2.33331 8.06927V8.06927C2.33331 8.4762 2.33331 8.67966 2.44474 8.81726C2.46673 8.84442 2.4915 8.86919 2.51865 8.89118C2.65625 9.0026 2.85972 9.0026 3.26665 9.0026H3.99998" stroke="#FFFEFE"/>
|
||||
<path d="M4.33331 12.9703L4.33331 8.33073C4.33331 7.38792 4.33331 6.91652 4.62621 6.62362C4.9191 6.33073 5.3905 6.33073 6.33331 6.33073L9.66665 6.33073C10.6095 6.33073 11.0809 6.33073 11.3738 6.62362C11.6666 6.91652 11.6666 7.38792 11.6666 8.33073L11.6666 12.9703C11.6666 13.2869 11.6666 13.4452 11.5628 13.52C11.459 13.5948 11.3088 13.5448 11.0085 13.4447L9.8404 13.0553C9.75444 13.0267 9.71145 13.0123 9.66712 13.0136C9.6228 13.0149 9.58073 13.0318 9.49659 13.0654L8.18567 13.5898C8.09398 13.6265 8.04813 13.6448 7.99998 13.6448C7.95183 13.6448 7.90598 13.6265 7.81428 13.5898L6.50337 13.0654C6.41923 13.0318 6.37716 13.0149 6.33284 13.0136C6.28851 13.0123 6.24552 13.0267 6.15956 13.0553L4.99143 13.4447C4.69111 13.5448 4.54096 13.5948 4.43714 13.52C4.33331 13.4452 4.33331 13.2869 4.33331 12.9703Z" stroke="#FFFEFE"/>
|
||||
<path d="M6.33331 9L8.99998 9" stroke="#FFFEFE" stroke-linecap="round"/>
|
||||
<path d="M6.33331 11L9.66665 11" stroke="#FFFEFE" stroke-linecap="round"/>
|
||||
<path d="M11.6666 4.33073V4.33073C11.6666 3.52332 11.6666 3.11961 11.5395 2.79949C11.3565 2.33894 10.9918 1.9742 10.5312 1.79124C10.2111 1.66406 9.80739 1.66406 8.99998 1.66406H6.99998C6.19257 1.66406 5.78886 1.66406 5.46874 1.79124C5.00819 1.9742 4.64345 2.33894 4.46049 2.79949C4.33331 3.11961 4.33331 3.52332 4.33331 4.33073V4.33073" stroke="#FFFEFE"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">پرینت</span>
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.inspectionDone || item.debtDone || item.employerApproved) {
|
||||
// Summary List and Print Button
|
||||
if (hasPermission_80214) {
|
||||
html += `
|
||||
<a href="${insuranceSummaryUrl + `&id=` + item.id}" class="printModal tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#2090C2] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}">
|
||||
<svg width="22" height="22" viewBox="0 0 19 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18" height="18" transform="translate(0.027832)" fill="#2090C2"/>
|
||||
<path d="M6.40283 9.375L11.6528 9.375" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M6.40283 11.625L9.40283 11.625" stroke="white" stroke-linecap="round"/>
|
||||
<path d="M4.15283 5.025C4.15283 4.18492 4.15283 3.76488 4.31632 3.44401C4.46013 3.16177 4.6896 2.9323 4.97185 2.78849C5.29271 2.625 5.71275 2.625 6.55283 2.625H9.15872C9.52561 2.625 9.70905 2.625 9.88168 2.66645C10.0347 2.70319 10.1811 2.7638 10.3153 2.84604C10.4666 2.9388 10.5963 3.06852 10.8558 3.32794L13.1999 5.67206C13.4593 5.93148 13.589 6.0612 13.6818 6.21257C13.764 6.34678 13.8246 6.4931 13.8614 6.64615C13.9028 6.81878 13.9028 7.00223 13.9028 7.36911V12.975C13.9028 13.8151 13.9028 14.2351 13.7393 14.556C13.5955 14.8382 13.3661 15.0677 13.0838 15.2115C12.763 15.375 12.3429 15.375 11.5028 15.375H6.55283C5.71275 15.375 5.29271 15.375 4.97185 15.2115C4.6896 15.0677 4.46013 14.8382 4.31632 14.556C4.15283 14.2351 4.15283 13.8151 4.15283 12.975V5.025Z" stroke="white"/>
|
||||
<path d="M9.40283 2.625V4.725C9.40283 5.56508 9.40283 5.98512 9.56632 6.30599C9.71013 6.58823 9.9396 6.8177 10.2218 6.96151C10.5427 7.125 10.9628 7.125 11.8028 7.125H13.9028" stroke="white"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">پرینت</span>
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
|
||||
if (canShowActions) {
|
||||
if (hasPermission_80213) {
|
||||
html += `
|
||||
<a href="${editUrl}&id=${item.id}" class="tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#ADE7F2] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}">
|
||||
<svg width="22" height="22" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"/>
|
||||
<path d="M11.3213 5.25293C11.5664 5.19964 11.8217 5.20913 12.0635 5.28027L12.2178 5.33691C12.3659 5.40344 12.4945 5.49613 12.6152 5.59766C12.7711 5.72874 12.9467 5.90375 13.1504 6.10742L13.4326 6.39258C13.5184 6.48132 13.5946 6.56459 13.6602 6.64258C13.7953 6.80336 13.914 6.97832 13.9775 7.19434L14.0049 7.29883C14.0506 7.50888 14.0506 7.72647 14.0049 7.93652L13.9775 8.04102C13.914 8.25701 13.7953 8.43201 13.6602 8.59277C13.5946 8.67073 13.5184 8.75407 13.4326 8.84277L13.1504 9.12793L7.75879 14.5186C7.62672 14.6506 7.50929 14.7722 7.37793 14.8701L7.24121 14.959C7.14574 15.013 7.04539 15.0527 6.93848 15.0859L6.59766 15.1768L4.85938 15.6113C4.69519 15.6524 4.51668 15.6984 4.36816 15.7129C4.23271 15.7261 4.01567 15.7249 3.82324 15.584L3.74316 15.5146C3.53379 15.3053 3.52979 15.0444 3.54492 14.8896C3.55945 14.7411 3.60544 14.5626 3.64648 14.3984L4.08105 12.6602L4.17188 12.3193C4.20508 12.2124 4.24479 12.1121 4.29883 12.0166L4.3877 11.8799C4.48563 11.7485 4.60719 11.6311 4.73926 11.499L10.1299 6.10742L10.415 5.8252C10.5036 5.7396 10.5862 5.66312 10.6641 5.59766C10.8249 5.46245 11.0007 5.34385 11.2168 5.28027L11.3213 5.25293Z" stroke="#009EE2"/>
|
||||
<path d="M9.7124 6.46393L12.0255 4.92188L14.3386 7.23496L12.7965 9.54804L9.7124 6.46393Z" fill="#009EE2"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-[#009EE2]">ویرایش</span>
|
||||
</a>
|
||||
`;
|
||||
}
|
||||
|
||||
if (hasPermission_80211) {
|
||||
html += `
|
||||
<button class="tw-flex tw-items-center tw-justify-center tw-rounded-[5px] tw-bg-[#DDD3E0] tw-w-full md:tw-w-[25px] tw-h-[25px] ${isDisabled}"
|
||||
onclick="removeInsuranceList(${item.id}, '${pathDSKKAR00.replace(/\\/g, "-")}', '${pathDSKWOR00.replace(/\\/g, "-")}')">
|
||||
<svg width="22" height="22" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.523438 0.523438)" fill="#DDD3E0"/>
|
||||
<path d="M7.84814 11.7031L7.84814 9.39004" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M11.7031 11.7031L11.7031 9.39004" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M2.83643 5.53125H16.7149V5.53125C16.0652 5.53125 15.7403 5.53125 15.4745 5.60604C14.8039 5.79477 14.2799 6.31884 14.0911 6.98943C14.0163 7.25518 14.0163 7.58007 14.0163 8.22985V11.5546C14.0163 13.4402 14.0163 14.383 13.4305 14.9688C12.8448 15.5546 11.902 15.5546 10.0163 15.5546H9.53502C7.64941 15.5546 6.7066 15.5546 6.12081 14.9688C5.53502 14.383 5.53502 13.4402 5.53502 11.5546V8.22985C5.53502 7.58007 5.53502 7.25518 5.46023 6.98943C5.27151 6.31884 4.74744 5.79477 4.07685 5.60604C3.8111 5.53125 3.48621 5.53125 2.83643 5.53125V5.53125Z" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M7.84799 3.22434C7.84799 3.22434 8.2335 2.45312 9.77556 2.45312C11.3176 2.45312 11.7031 3.22415 11.7031 3.22415" stroke="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-[#BF3737]">حذف</span>
|
||||
</button>
|
||||
`;
|
||||
}
|
||||
}
|
||||
|
||||
htmlMobile += `
|
||||
<div class="tw-grid tw-grid-cols-3 tw-gap-2 tw-mt-6 tw-w-full">
|
||||
${html}
|
||||
</div>
|
||||
`;
|
||||
|
||||
return isMobile ? htmlMobile : html;
|
||||
}
|
||||
|
||||
function booleanSvgResponse(bool) {
|
||||
var svg = ``;
|
||||
if (bool) {
|
||||
svg = `<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="#A7E1C7"/>
|
||||
<path d="M8.5 11L11.3939 13.8939C11.4525 13.9525 11.5475 13.9525 11.6061 13.8939L19.5 6" stroke="#00B521" stroke-width="1.2" stroke-linecap="round"/>
|
||||
<path d="M19.3578 10.5465C19.6899 12.2277 19.4363 13.9719 18.6391 15.4889C17.8419 17.0059 16.5493 18.2041 14.9763 18.8842C13.4033 19.5642 11.6449 19.6851 9.99369 19.2267C8.34247 18.7682 6.89803 17.7582 5.90077 16.3646C4.90351 14.9709 4.41358 13.2778 4.51251 11.567C4.61144 9.85619 5.29327 8.23085 6.44453 6.96147C7.59578 5.6921 9.14703 4.85527 10.8401 4.59024C12.5331 4.32521 14.2659 4.64797 15.75 5.50481" stroke="#00B521" stroke-linecap="round"/>
|
||||
</svg>`;
|
||||
} else {
|
||||
svg = `<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="9" fill="#E0C7D2"/>
|
||||
<path d="M16 8L8 16" stroke="#E54B4B" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M8 8L16 16" stroke="#E54B4B" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>`;
|
||||
}
|
||||
return svg;
|
||||
}
|
||||
|
||||
function convertMonthToString(value) {
|
||||
var result = ``;
|
||||
|
||||
switch (value) {
|
||||
case "01":
|
||||
result = "فروردین";
|
||||
break;
|
||||
case "02":
|
||||
result = "اردیبهشت";
|
||||
break;
|
||||
case "03":
|
||||
result = "خرداد";
|
||||
break;
|
||||
case "04":
|
||||
result = "تیر";
|
||||
break;
|
||||
case "05":
|
||||
result = "مرداد";
|
||||
break;
|
||||
case "06":
|
||||
result = "شهریور";
|
||||
break;
|
||||
case "07":
|
||||
result = "مهر";
|
||||
break;
|
||||
case "08":
|
||||
result = "آبان";
|
||||
break;
|
||||
case "09":
|
||||
result = "آذر";
|
||||
break;
|
||||
case "10":
|
||||
result = "دی";
|
||||
break;
|
||||
case "11":
|
||||
result = "بهمن";
|
||||
break;
|
||||
case "12":
|
||||
result = "اسفند";
|
||||
break;
|
||||
default:
|
||||
result = "بدون ماه";
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function openOperationsModal(id) {
|
||||
var url = `#showmodal=` + openOperationsModalUrl + `&id=${id}`;
|
||||
window.location.href = url;
|
||||
}
|
||||
|
||||
function removeInsuranceList(id, pathDSKKAR00, pathDSKWOR00) {
|
||||
swal({
|
||||
title: "توجه داشته باشید با تایید این پیام، اطلاعات لیست مورد نظر بطور کامل از بانک اطلاعاتی حذف خواهد شد.",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
},
|
||||
function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
ajaxService.post(removeInsuranceListUrl, { "id": id, "pathDSKKAR00": pathDSKKAR00, "pathDSKWOR00": pathDSKWOR00 }, false)
|
||||
.then(response => {
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', response.message);
|
||||
|
||||
// Reload Function
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
$("#load-data-html-mobile").html('');
|
||||
$('#load-data-html').html('');
|
||||
loadGetTabCounts();
|
||||
loadSearchNew(activeValue);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------- Workshop -----
|
||||
var containerWorkshop = $('#empWorkshop');
|
||||
var searchBoxWorkshop = $('#empSearchWorkshop');
|
||||
var hiddenInputValWorkshop = $('.sendWorkshopId');
|
||||
var searchResulWorkshop = $('.searchResultWorkshop');
|
||||
var mixContainerAndSerchResultWorkshop = $('#empWorkshop , .searchResultWorkshop');
|
||||
|
||||
containerWorkshop.hide();
|
||||
var liListWorkshop;
|
||||
var liPointerWorkshop;
|
||||
let countWorkshop = 0;
|
||||
|
||||
//close search Employee when click on body
|
||||
$(document).on('click', function (event) {
|
||||
if (!$(event.target).closest(containerWorkshop).length) {
|
||||
containerWorkshop.hide();
|
||||
}
|
||||
});
|
||||
//select option by mouse
|
||||
function selectItemWorkshop(id, employeeFullName) {
|
||||
searchBoxWorkshop.val(employeeFullName);
|
||||
hiddenInputValWorkshop.val(id);
|
||||
containerWorkshop.hide();
|
||||
searchBoxWorkshop.addClass("selectedOption");
|
||||
};
|
||||
//search by Ajax
|
||||
searchBoxWorkshop.on('keyup keypress', function (e) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
//----clean Employer------
|
||||
$("#searchModel_EmployerName").val('');
|
||||
$("#searchModel_EmployerId").val('0');
|
||||
|
||||
//----clean Employee------
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
// $("#SearchModel_Id").val('0');
|
||||
|
||||
|
||||
if ($(this).val() == '') {
|
||||
|
||||
}
|
||||
//stop submit form with enter
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
e.preventDefault();
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
liPointerWorkshop.click();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
searchBoxWorkshop.removeClass("selectedOption");
|
||||
let searchText = $(this).val();
|
||||
hiddenInputValWorkshop.val(0);
|
||||
|
||||
if (searchText.length > 1) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: workshopNameUrl,
|
||||
data: { "searchText": searchText },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
|
||||
success: function (response) {
|
||||
$(".opt").remove();
|
||||
if (response.mylist.length > 0) {//result Founded
|
||||
|
||||
// console.log(response.mylist);
|
||||
|
||||
$(".noResult").remove();
|
||||
containerWorkshop.show();
|
||||
$.each(response.mylist,
|
||||
function (i, item) {
|
||||
let li = `<li data-workshopId="${item.id}" class="btn btn-block opt" onclick="selectItemWorkshop(${item.id}, '${item.workshopFullName}');" >`;
|
||||
li = li + '<span class="name-right" > ' + item.workshopFullName + ' </span><span class="line">|</span> <span class="code-left" > ' + item.archiveCode + ' </span></li> ';
|
||||
searchResulWorkshop.append(li);
|
||||
});
|
||||
} else {//result NotFounded
|
||||
$(".noResult").remove();
|
||||
containerWorkshop.show();
|
||||
let noResult = `<li class="btn btn-block noResult">نتیجه ای یافت نشد</li>`;
|
||||
searchResulWorkshop.append(noResult);
|
||||
}
|
||||
}// endOfSuccess
|
||||
|
||||
}); //endOfAjax
|
||||
|
||||
} else {
|
||||
containerWorkshop.hide();
|
||||
countWorkshop = 0;
|
||||
}
|
||||
//keyboard Arrow Key Select And Enter
|
||||
liListWorkshop = $('#empWorkshop ul li');
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liListWorkshop.eq(0)).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
},
|
||||
50);
|
||||
if (e.which === 40) {// if ArrowUp
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
|
||||
liPointerWorkshop.removeClass('keyboardSelected');
|
||||
console.log(countWorkshop + "plusOne");
|
||||
liListWorkshop.eq(countWorkshop).addClass('keyboardSelected');
|
||||
liPointerWorkshop = liListWorkshop.eq(countWorkshop);
|
||||
if (countWorkshop > 4) {
|
||||
//ScrollDown
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liPointerWorkshop).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
countWorkshop += 1;
|
||||
|
||||
} else {
|
||||
|
||||
liListWorkshop.eq(0).addClass("keyboardSelected");
|
||||
liPointerWorkshop = liListWorkshop.eq(0);
|
||||
countWorkshop = 1;
|
||||
}
|
||||
} else if (e.which === 38) {//if ArrowDown
|
||||
if (countWorkshop > 0 && countWorkshop <= liListWorkshop.length) {
|
||||
liPointerWorkshop.removeClass('keyboardSelected');
|
||||
countWorkshop -= 1;
|
||||
liListWorkshop.eq(countWorkshop).addClass('keyboardSelected');
|
||||
liPointerWorkshop = liListWorkshop.eq(countWorkshop);
|
||||
//ScrollUp
|
||||
mixContainerAndSerchResultWorkshop.animate({
|
||||
scrollTop: $(liPointerWorkshop).offset().top - containerWorkshop.offset().top + containerWorkshop.scrollTop()
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#empSearchWorkshop").keypress(function (event) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
$("#empSearchEmployer").val('');
|
||||
$("#empSearch").val('');
|
||||
|
||||
$("#searchModel_EmployerName").val('');
|
||||
$("#searchModel_EmployerId").val('');
|
||||
|
||||
// $("#SearchModel_Id").val("0");
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
|
||||
if (event.keyCode === 13) {
|
||||
if ($("#searchModel_WorkshopId").val() == "0")
|
||||
$("#searchModel_WorkShopName").val($("#empSearchWorkshop").val())
|
||||
$('.btn-search1').click();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------- Employer -----
|
||||
var containerEmployer = $('#empEmployer');
|
||||
var searchBoxEmployer = $('#empSearchEmployer');
|
||||
var hiddenInputValEmployer = $('.sendEmployerId');
|
||||
var searchResulEmployer = $('.searchResultEmployer');
|
||||
var mixContainerAndSerchResultEmployer = $('#empEmployer , .searchResultEmployer');
|
||||
|
||||
containerEmployer.hide();
|
||||
var liListEmployer;
|
||||
var liPointerEmployer;
|
||||
let countEmployer = 0;
|
||||
|
||||
//close search Employee when click on body
|
||||
$(document).on('click', function (event) {
|
||||
if (!$(event.target).closest(containerEmployer).length) {
|
||||
containerEmployer.hide();
|
||||
}
|
||||
});
|
||||
//select option by mouse
|
||||
function selectItemEmployer(id, employeeFullName) {
|
||||
searchBoxEmployer.val(employeeFullName);
|
||||
hiddenInputValEmployer.val(id);
|
||||
containerEmployer.hide();
|
||||
searchBoxEmployer.addClass("selectedOption");
|
||||
};
|
||||
//search by Ajax
|
||||
searchBoxEmployer.on('keyup keypress', function (e) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
//----clean Workshop------
|
||||
$("#empSearchWorkshop").val('');
|
||||
$("#searchModel_WorkShopName").val('');
|
||||
|
||||
//----clean Employee------
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
// $("#SearchModel_Id").val('0');
|
||||
|
||||
|
||||
if ($(this).val() == '') {
|
||||
$("#searchModel_EmployerId").val("0");
|
||||
$("#searchModel_EmployerName").val('');
|
||||
}
|
||||
//stop submit form with enter
|
||||
var keyCode = e.keyCode || e.which;
|
||||
if (keyCode === 13) {
|
||||
e.preventDefault();
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
liPointerEmployer.click();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
searchBoxEmployer.removeClass("selectedOption");
|
||||
let searchText = $(this).val();
|
||||
hiddenInputValEmployer.val(0);
|
||||
|
||||
if (searchText.length > 1) {
|
||||
|
||||
$.ajax({
|
||||
async: false,
|
||||
contentType: 'charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'GET',
|
||||
url: employerNameUrl,
|
||||
data: { "searchText": searchText },
|
||||
headers: { "RequestVerificationToken": antiForgeryToken },
|
||||
|
||||
success: function (response) {
|
||||
$(".opt").remove();
|
||||
if (response.mylist.length > 0) {//result Founded
|
||||
|
||||
console.log(response.mylist);
|
||||
|
||||
$(".noResult").remove();
|
||||
containerEmployer.show();
|
||||
$.each(response.mylist,
|
||||
function (i, item) {
|
||||
let li = `<li data-employeeId="${item.id}" class="btn btn-block opt" onclick="selectItemEmployer(${item.id}, '${item.lName}');" >${item.lName}</li>`;
|
||||
searchResulEmployer.append(li);
|
||||
|
||||
});
|
||||
} else {//result NotFounded
|
||||
|
||||
$(".noResult").remove();
|
||||
containerEmployer.show();
|
||||
let noResult = `<li class="btn btn-block noResult">نتیجه ای یافت نشد</li>`;
|
||||
searchResulEmployer.append(noResult);
|
||||
}
|
||||
}// endOfSuccess
|
||||
|
||||
}); //endOfAjax
|
||||
|
||||
} else {
|
||||
containerEmployer.hide();
|
||||
countEmployer = 0;
|
||||
}
|
||||
//keyboard Arrow Key Select And Enter
|
||||
liListEmployer = $('#empEmployer ul li');
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liListEmployer.eq(0)).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
if (e.which === 40) {// if ArrowUp
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
|
||||
liPointerEmployer.removeClass('keyboardSelected');
|
||||
console.log(countEmployer + "plusOne");
|
||||
liListEmployer.eq(countEmployer).addClass('keyboardSelected');
|
||||
liPointerEmployer = liListEmployer.eq(countEmployer);
|
||||
if (countEmployer > 4) {
|
||||
//ScrollDown
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liPointerEmployer).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
countEmployer += 1;
|
||||
|
||||
} else {
|
||||
|
||||
liListEmployer.eq(0).addClass("keyboardSelected");
|
||||
liPointerEmployer = liListEmployer.eq(0);
|
||||
countEmployer = 1;
|
||||
}
|
||||
} else if (e.which === 38) {//if ArrowDown
|
||||
if (countEmployer > 0 && countEmployer <= liListEmployer.length) {
|
||||
liPointerEmployer.removeClass('keyboardSelected');
|
||||
countEmployer -= 1;
|
||||
liListEmployer.eq(countEmployer).addClass('keyboardSelected');
|
||||
liPointerEmployer = liListEmployer.eq(countEmployer);
|
||||
//ScrollUp
|
||||
mixContainerAndSerchResultEmployer.animate({
|
||||
scrollTop: $(liPointerEmployer).offset().top - containerEmployer.offset().top + containerEmployer.scrollTop()
|
||||
},
|
||||
50);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#empSearchEmployer").keypress(function (event) {
|
||||
$(".form-control").removeClass("selectedOption");
|
||||
|
||||
$("#empSearch").val('');
|
||||
$("#empSearchWorkshop").val('');
|
||||
|
||||
$("#searchModel_WorkshopId").val("0");
|
||||
$("#searchModel_WorkShopName").val('');
|
||||
|
||||
// $("#SearchModel_Id").val("0");
|
||||
// $("#SearchModel_EmployeeName").val('');
|
||||
|
||||
if (event.keyCode === 13) {
|
||||
if ($("#searchModel_EmployerId").val() == "0")
|
||||
$("#searchModel_EmployerName").val($("#empSearchEmployer").val())
|
||||
$('.btn-search1').click();
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,369 @@
|
||||
$(document).ready(function () {
|
||||
if (!hasPermission_80212) {
|
||||
$('#sendListSection').hide();
|
||||
}
|
||||
|
||||
var $inputDebtAmount = $('#Debt_Amount');
|
||||
var formatted = formatNumber($inputDebtAmount.val());
|
||||
$inputDebtAmount.val(formatted);
|
||||
|
||||
$(".date").each(function () {
|
||||
const input = this;
|
||||
|
||||
input.addEventListener("input", function () {
|
||||
this.value = convertPersianNumbersToEnglish(this.value);
|
||||
});
|
||||
|
||||
new JalaliDateInput(input);
|
||||
});
|
||||
|
||||
$('#Debt_Amount').on('input', function () {
|
||||
const formatted = formatNumber($(this).val());
|
||||
$(this).val(formatted);
|
||||
});
|
||||
|
||||
function checkCardCompletion($card) {
|
||||
const $status = $card.find('.card-action__status');
|
||||
const $icon = $card.find('.card-action__status-icon-svg');
|
||||
|
||||
const isWrittenVerbal = $card.find('.WrittenVerbal').length > 0;
|
||||
|
||||
if (isWrittenVerbal) {
|
||||
const isWritten = $card.find('#Written').is(':checked');
|
||||
const isVerbal = $card.find('#Verbal').is(':checked');
|
||||
const description = $card.find('#description').val()?.trim() || '';
|
||||
const verbalValid = isVerbal && description.length >= 15;
|
||||
const writtenValid = isWritten;
|
||||
|
||||
if (writtenValid || verbalValid) {
|
||||
$status.addClass('card-action__status-success');
|
||||
$icon.show();
|
||||
} else {
|
||||
$status.removeClass('card-action__status-success');
|
||||
$icon.hide();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const isChecked = $card.find('.card-action__inspection-type input[type="checkbox"]:checked').length > 0;
|
||||
|
||||
const $dateInput = $card.find('.card-action__input.date');
|
||||
const dateFilled = $dateInput.length > 0 ? $dateInput.val().trim().length === 10 : true;
|
||||
|
||||
const $priceInput = $card.find('.card-action__price input');
|
||||
const priceFilled = $priceInput.length > 0 ? $priceInput.val().trim() !== '' : true;
|
||||
|
||||
const $fileInput = $card.find('.card-action__upload input[type="file"]');
|
||||
const $mediaId = $card.find('.card-action__upload input.mediaIds');
|
||||
|
||||
let fileSelected = true;
|
||||
if ($fileInput.length > 0 && $mediaId.length > 0) {
|
||||
const mediaIdVal = parseInt($mediaId.val() || "0");
|
||||
if (mediaIdVal === 0) {
|
||||
fileSelected = $fileInput[0].files.length > 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (isChecked && dateFilled && priceFilled && fileSelected) {
|
||||
$status.addClass('card-action__status-success');
|
||||
$icon.show();
|
||||
} else {
|
||||
$status.removeClass('card-action__status-success');
|
||||
$icon.hide();
|
||||
}
|
||||
}
|
||||
|
||||
$('.card-action__inspection-type input[type="checkbox"]').on('change', function () {
|
||||
const $group = $(this).closest('.card-action__inspection-type');
|
||||
const $checkboxes = $group.find('input[type="checkbox"]');
|
||||
const $card = $(this).closest('.card-action');
|
||||
|
||||
if ($(this).is(':checked')) {
|
||||
$checkboxes.not(this).prop('checked', false);
|
||||
}
|
||||
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$('.card-action__input').on('input', function () {
|
||||
const $card = $(this).closest('.card-action');
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$('#description').on('input', function () {
|
||||
const $card = $(this).closest('.card-action');
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$(".card-action").each(function () {
|
||||
const $card = $(this).closest('.card-action');
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$(document).on('click', '.remove-file-btn', function () {
|
||||
const container = $(this).closest('.card-action__upload');
|
||||
const type = $(this).data('type');
|
||||
|
||||
$(this).hide();
|
||||
|
||||
const chooseBtn = container.find('.choose-file-btn[data-type="' + type + '"]');
|
||||
if (chooseBtn.length === 0) {
|
||||
container.append('<button type="button" class="card-action__upload-btn choose-file-btn" data-type="' + type + '">انتخاب فایل</button>');
|
||||
} else {
|
||||
chooseBtn.show();
|
||||
}
|
||||
|
||||
container.find('input[type="file"][data-type="' + type + '"]').val('');
|
||||
|
||||
const $card = $(this).closest('.card-action');
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$(document).on('click', '.choose-file-btn', function () {
|
||||
const type = $(this).data('type');
|
||||
$(this).siblings('input[type="file"][data-type="' + type + '"]').click();
|
||||
});
|
||||
|
||||
$(document).on('change', 'input[type="file"]', function () {
|
||||
const container = $(this).closest('.card-action__upload');
|
||||
const file = this.files[0];
|
||||
const type = $(this).data('type');
|
||||
|
||||
if (file) {
|
||||
container.find('.choose-file-btn[data-type="' + type + '"]').hide();
|
||||
|
||||
const removeBtn = container.find('.remove-file-btn[data-type="' + type + '"]');
|
||||
if (removeBtn.length === 0) {
|
||||
container.append('<button type="button" class="card-action__upload-btn remove-file-btn" data-type="' + type + '">حذف فایل</button>');
|
||||
} else {
|
||||
removeBtn.show();
|
||||
}
|
||||
}
|
||||
|
||||
const $card = $(this).closest('.card-action');
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
|
||||
$('.WrittenVerbal').on('change', function () {
|
||||
const $card = $(this).closest('.card-action');
|
||||
const $descriptionSection = $card.find('#descriptionSection');
|
||||
const $description = $card.find('#description');
|
||||
|
||||
const isWritten = $card.find('#Written').is(':checked');
|
||||
const isVerbal = $card.find('#Verbal').is(':checked');
|
||||
|
||||
if (isVerbal) {
|
||||
$descriptionSection.removeClass('disable');
|
||||
} else {
|
||||
$descriptionSection.addClass('disable');
|
||||
|
||||
$description.val('');
|
||||
}
|
||||
|
||||
checkCardCompletion($card);
|
||||
});
|
||||
$('.WrittenVerbal').each(function () {
|
||||
$(this).trigger('change');
|
||||
});
|
||||
});
|
||||
|
||||
function formatNumber(input) {
|
||||
let raw = convertPersianNumbersToEnglish(input).replace(/[^0-9]/g, '');
|
||||
if (raw === '' || parseInt(raw) === 0) return '';
|
||||
return raw.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
}
|
||||
|
||||
async function SaveData() {
|
||||
const form = document.querySelector("#create-form");
|
||||
const formData = new FormData(form);
|
||||
|
||||
//var checkboxesInspection = form.querySelectorAll('input[name="Inspection.Type"]:checked');
|
||||
//var lastInspectionDate = $('#last-inspection-date');
|
||||
//var inspectionFileMediaId = $('#Inspection_InspectionFileMediaId');
|
||||
//var inspectionFile = $('input[name="Inspection.InspectionFile"]');
|
||||
|
||||
//if (checkboxesInspection.length === 0) {
|
||||
// if (lastInspectionDate.val() !== "") {
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا نوع بازرسی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (inspectionFile.get(0).files.length !== 0) {
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا نوع بازرسی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// formData.append("Inspection.Type", "0");
|
||||
//} else {
|
||||
// if (lastInspectionDate.val() === "") {
|
||||
// errorInput(lastInspectionDate);
|
||||
// $.Notification.autoHideNotify('error', 'top right', "لطفا تاریخ آخرین بازرسی را وارد کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (inspectionFileMediaId.val() === 0) {
|
||||
// if (inspectionFile.get(0).files.length === 0) {
|
||||
// errorInput($('#card-inspection'));
|
||||
// $.Notification.autoHideNotify('error', 'top right', "لطفا فایل بازرسی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//var checkboxesDebt = form.querySelectorAll('input[name="Debt.Type"]:checked');
|
||||
//var debtAmount = $('#Debt_Amount');
|
||||
//var debtDate = $('#Debt_DebtDate');
|
||||
//var debtFileMediaId = $('#Debt_DebtFileMediaId');
|
||||
//var debtFile = $('input[name="Debt.DebtFile"]');
|
||||
|
||||
//if (checkboxesDebt.length === 0) {
|
||||
// if (debtDate.val() !== "") {
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا نوع بدهی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (debtAmount.val() !== "") {
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا نوع بدهی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (debtFile.get(0).files.length !== 0) {
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا نوع بدهی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// formData.append("Debt.Type", "0");
|
||||
//} else {
|
||||
// if (debtDate.val() === "") {
|
||||
// errorInput(debtDate);
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا تاریخ بدهی را وارد کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (debtAmount.val() === "") {
|
||||
// errorInput(debtAmount);
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا مبلغ بدهی را وارد کنید.");
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// if (debtFileMediaId.val() === 0) {
|
||||
// if (debtFile.get(0).files.length === 0) {
|
||||
// errorInput($('#card-debt'));
|
||||
// $.Notification.autoHideNotify('error', 'top right', "خطا", "لطفا فایل بدهی را انتخاب کنید.");
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
function validateSection({ typeCheckboxes, dateInput, amountInput, fileInput, fileMediaIdInput, sectionName, typeFieldName, defaultTypeValue = "0", sectionCard }) {
|
||||
const isTypeChecked = typeCheckboxes.length > 0;
|
||||
const hasDate = dateInput.val() !== "";
|
||||
const hasAmount = amountInput ? amountInput.val() !== "" : false;
|
||||
const hasFile = fileInput.get(0).files.length !== 0;
|
||||
const hasMediaId = fileMediaIdInput.val() !== "0";
|
||||
|
||||
if (!isTypeChecked) {
|
||||
if (hasDate || hasAmount || hasFile) {
|
||||
$.Notification.autoHideNotify('error', 'top right', "خطا", `لطفا نوع ${sectionName} را انتخاب کنید.`);
|
||||
return false;
|
||||
}
|
||||
formData.append(typeFieldName, defaultTypeValue);
|
||||
} else {
|
||||
if (!hasDate) {
|
||||
errorInput(dateInput);
|
||||
$.Notification.autoHideNotify('error', 'top right', `لطفا تاریخ ${sectionName} را وارد کنید.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (amountInput && !hasAmount) {
|
||||
errorInput(amountInput);
|
||||
$.Notification.autoHideNotify('error', 'top right', `لطفا مبلغ ${sectionName} را وارد کنید.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!hasMediaId && !hasFile) {
|
||||
errorInput(sectionCard);
|
||||
$.Notification.autoHideNotify('error', 'top right', `لطفا فایل ${sectionName} را انتخاب کنید.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var isInspectionValid = validateSection({
|
||||
typeCheckboxes: form.querySelectorAll('input[name="Inspection.Type"]:checked'),
|
||||
dateInput: $('#last-inspection-date'),
|
||||
amountInput: null,
|
||||
fileInput: $('input[name="Inspection.InspectionFile"]'),
|
||||
fileMediaIdInput: $('#Inspection_InspectionFileMediaId'),
|
||||
sectionName: 'بازرسی',
|
||||
typeFieldName: 'Inspection.Type',
|
||||
sectionCard: $('#card-inspection')
|
||||
});
|
||||
|
||||
// بدهی
|
||||
var isDebtValid = validateSection({
|
||||
typeCheckboxes: form.querySelectorAll('input[name="Debt.Type"]:checked'),
|
||||
dateInput: $('#Debt_DebtDate'),
|
||||
amountInput: $('#Debt_Amount'),
|
||||
fileInput: $('input[name="Debt.DebtFile"]'),
|
||||
fileMediaIdInput: $('#Debt_DebtFileMediaId'),
|
||||
sectionName: 'بدهی',
|
||||
typeFieldName: 'Debt.Type',
|
||||
sectionCard: $('#card-debt')
|
||||
});
|
||||
|
||||
if (!isInspectionValid || !isDebtValid) return false;
|
||||
|
||||
var checkboxesApproval = form.querySelectorAll('input[name="Approval.ApprovalStatus"]:checked');
|
||||
if (checkboxesApproval.length === 0) {
|
||||
formData.append("Approval.ApprovalStatus", "0");
|
||||
} else {
|
||||
if ($('input[name="Approval.ApprovalStatus"]').val() === "1") {
|
||||
const description = $('#description').val()?.trim() || '';
|
||||
if (description.length < 15) {
|
||||
$.Notification.autoHideNotify('error', 'top right', "خطا", "توضیحات باید حداقل ۱۵ کاراکتر باشد.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const confirmSentList = form.querySelector('input[name="ConfirmSentList"]');
|
||||
formData.append("ConfirmSentList", confirmSentList.checked ? "true" : "false");
|
||||
|
||||
//const formData = new FormData();
|
||||
//formData.append("file", $('#fileInput')[0].files[0]);
|
||||
//formData.append("title", "test");
|
||||
|
||||
try {
|
||||
var response = await ajaxService.post(saveOperationsModal, formData, true);
|
||||
if (response.success) {
|
||||
$.Notification.autoHideNotify('success', 'top right', "موفق", response.message);
|
||||
|
||||
// Reload Function
|
||||
pageIndexJs = 0;
|
||||
hasMoreData = true;
|
||||
var $activeTab = $('.tab-bar__tab--active');
|
||||
var activeValue = $activeTab.val();
|
||||
$('#load-data-html').html('');
|
||||
loadGetTabCounts();
|
||||
loadSearchNew(activeValue);
|
||||
$("#MainModal").modal('hide');
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top right', "خطا", response.message);
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
function errorInput($el) {
|
||||
$el.addClass('error-input');
|
||||
|
||||
setTimeout(() => {
|
||||
$el.removeClass('error-input');
|
||||
}, 2000);
|
||||
}
|
||||
BIN
ServiceHost/wwwroot/AssetsClient/images/icons/InsuranceList.png
Normal file
BIN
ServiceHost/wwwroot/AssetsClient/images/icons/InsuranceList.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
BIN
ServiceHost/wwwroot/AssetsClient/images/icons/upload.png
Normal file
BIN
ServiceHost/wwwroot/AssetsClient/images/icons/upload.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -8,12 +8,16 @@
|
||||
|
||||
sendRequest({ url, method = "GET", data = {}, async = true }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const isFormData = data instanceof FormData;
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: method,
|
||||
data: data,
|
||||
dataType: "json",
|
||||
async: async,
|
||||
processData: !isFormData ? true : false,
|
||||
contentType: !isFormData ? "application/x-www-form-urlencoded; charset=UTF-8" : false,
|
||||
headers: {
|
||||
//...this.defaultHeaders,
|
||||
"RequestVerificationToken": this.antiForgeryToken
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
class JalaliDateInput {
|
||||
constructor(inputElement) {
|
||||
this.input = inputElement;
|
||||
this.input.maxLength = 10;
|
||||
this.input.placeholder = "____/__/__";
|
||||
this.input.addEventListener("input", this.onInput.bind(this));
|
||||
}
|
||||
|
||||
onInput(e) {
|
||||
let value = e.target.value.replace(/\D/g, "");
|
||||
|
||||
let year = value.slice(0, 4);
|
||||
let rawMonth = value.slice(4, 6);
|
||||
let rawDay = value.slice(6, 8);
|
||||
|
||||
//let month = "";
|
||||
//if (rawMonth.length === 1) {
|
||||
// const m = parseInt(rawMonth);
|
||||
// if (m >= 2 && m <= 9) {
|
||||
// month = "0" + m;
|
||||
// } else if (m === 1) {
|
||||
// month = "1";
|
||||
// }
|
||||
//} else if (rawMonth.length === 2) {
|
||||
// let m = parseInt(rawMonth);
|
||||
// if (isNaN(m)) {
|
||||
// month = "";
|
||||
// } else {
|
||||
// if (m > 12) m = 12;
|
||||
// month = m.toString().padStart(2, "0");
|
||||
// }
|
||||
//}
|
||||
let month = "";
|
||||
if (rawMonth.length === 1) {
|
||||
month = rawMonth;
|
||||
} else if (rawMonth.length === 2) {
|
||||
let m = parseInt(rawMonth);
|
||||
if (!isNaN(m)) {
|
||||
if (m < 1) m = 1;
|
||||
if (m > 12) m = 12;
|
||||
month = m.toString().padStart(2, "0");
|
||||
}
|
||||
}
|
||||
|
||||
let day = "";
|
||||
if (rawDay.length === 1) {
|
||||
day = rawDay;
|
||||
} else if (rawDay.length === 2 && year.length === 4 && month.length === 2) {
|
||||
let d = parseInt(rawDay);
|
||||
if (!isNaN(d)) {
|
||||
let maxDay = JalaliDateUtils.maxDayInMonth(parseInt(year), parseInt(month));
|
||||
if (d > maxDay) d = maxDay;
|
||||
day = d.toString().padStart(2, "0");
|
||||
}
|
||||
}
|
||||
|
||||
let formatted = year;
|
||||
if (month) {
|
||||
formatted += "/" + month;
|
||||
} else if (value.length > 4) {
|
||||
formatted += "/";
|
||||
}
|
||||
|
||||
if (day) {
|
||||
formatted += "/" + day;
|
||||
} else if (value.length > 6) {
|
||||
formatted += "/";
|
||||
}
|
||||
|
||||
//let formatted = year;
|
||||
//if (month) {
|
||||
// formatted += "/" + month;
|
||||
//} else if (value.length >= 4) {
|
||||
// formatted += "/";
|
||||
//}
|
||||
|
||||
//if (day) {
|
||||
// formatted += "/" + day;
|
||||
//} else if (value.length >= 6) {
|
||||
// formatted += "/";
|
||||
//}
|
||||
|
||||
this.input.value = formatted;
|
||||
}
|
||||
|
||||
formatMonth(rawMonth) {
|
||||
if (!rawMonth) return "";
|
||||
let month = parseInt(rawMonth, 10);
|
||||
if (isNaN(month)) return "";
|
||||
if (month > 12) month = 12;
|
||||
return month.toString().padStart(2, "0");
|
||||
}
|
||||
|
||||
formatDay(year, month, rawDay) {
|
||||
if (!rawDay || !month) return "";
|
||||
let day = parseInt(rawDay, 10);
|
||||
if (isNaN(day)) return "";
|
||||
|
||||
let maxDay = JalaliDateUtils.maxDayInMonth(parseInt(year), parseInt(month));
|
||||
if (day > maxDay) day = maxDay;
|
||||
return day.toString().padStart(2, "0");
|
||||
}
|
||||
}
|
||||
|
||||
class JalaliDateUtils {
|
||||
static isLeapYear(year) {
|
||||
const leapYears = [1, 5, 9, 13, 17, 22, 26, 30];
|
||||
return leapYears.includes(year % 33);
|
||||
}
|
||||
|
||||
static maxDayInMonth(year, month) {
|
||||
if (month < 1) return 1;
|
||||
if (month <= 6) return 31;
|
||||
if (month <= 11) return 30;
|
||||
return this.isLeapYear(year) ? 30 : 29;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
class UrlParamsBuilder {
|
||||
constructor(basePath) {
|
||||
this.basePath = basePath;
|
||||
this.params = new URLSearchParams();
|
||||
this.hasAnyFilter = false;
|
||||
}
|
||||
|
||||
addParam(key, value) {
|
||||
if (value !== undefined && value !== null && value !== "" && value !== "0") {
|
||||
this.params.set(key, value);
|
||||
this.hasAnyFilter = true;
|
||||
} else {
|
||||
this.params.delete(key);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// اضافهکردن پارامتر از DOM (با val یا data-value-normal)
|
||||
addParamFromDOM(key, selector, { dataAttr = "data-value-normal", fallbackToVal = true } = {}) {
|
||||
const $el = $(selector);
|
||||
let value = $el.attr(dataAttr);
|
||||
if (!value && fallbackToVal) value = $el.val();
|
||||
|
||||
return this.addParam(key, value);
|
||||
}
|
||||
|
||||
buildUrl() {
|
||||
return this.hasAnyFilter
|
||||
? `${window.location.origin}${this.basePath}?${this.params.toString()}`
|
||||
: `${window.location.origin}${this.basePath}`;
|
||||
}
|
||||
|
||||
pushState() {
|
||||
const url = this.buildUrl();
|
||||
window.history.pushState({}, '', url);
|
||||
return url;
|
||||
}
|
||||
|
||||
static readParams(keys = []) {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const result = {};
|
||||
keys.forEach(key => {
|
||||
result[key] = urlParams.get(key) || "";
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
window.UrlParamsBuilder = UrlParamsBuilder;
|
||||
879
ServiceHost/wwwroot/AssetsTailwind/app.output.css
Normal file
879
ServiceHost/wwwroot/AssetsTailwind/app.output.css
Normal file
@@ -0,0 +1,879 @@
|
||||
*, ::before, ::after {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
--tw-translate-x: 0;
|
||||
--tw-translate-y: 0;
|
||||
--tw-rotate: 0;
|
||||
--tw-skew-x: 0;
|
||||
--tw-skew-y: 0;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
--tw-pan-x: ;
|
||||
--tw-pan-y: ;
|
||||
--tw-pinch-zoom: ;
|
||||
--tw-scroll-snap-strictness: proximity;
|
||||
--tw-gradient-from-position: ;
|
||||
--tw-gradient-via-position: ;
|
||||
--tw-gradient-to-position: ;
|
||||
--tw-ordinal: ;
|
||||
--tw-slashed-zero: ;
|
||||
--tw-numeric-figure: ;
|
||||
--tw-numeric-spacing: ;
|
||||
--tw-numeric-fraction: ;
|
||||
--tw-ring-inset: ;
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgb(59 130 246 / 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-shadow: 0 0 #0000;
|
||||
--tw-shadow-colored: 0 0 #0000;
|
||||
--tw-blur: ;
|
||||
--tw-brightness: ;
|
||||
--tw-contrast: ;
|
||||
--tw-grayscale: ;
|
||||
--tw-hue-rotate: ;
|
||||
--tw-invert: ;
|
||||
--tw-saturate: ;
|
||||
--tw-sepia: ;
|
||||
--tw-drop-shadow: ;
|
||||
--tw-backdrop-blur: ;
|
||||
--tw-backdrop-brightness: ;
|
||||
--tw-backdrop-contrast: ;
|
||||
--tw-backdrop-grayscale: ;
|
||||
--tw-backdrop-hue-rotate: ;
|
||||
--tw-backdrop-invert: ;
|
||||
--tw-backdrop-opacity: ;
|
||||
--tw-backdrop-saturate: ;
|
||||
--tw-backdrop-sepia: ;
|
||||
--tw-contain-size: ;
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
}
|
||||
|
||||
::backdrop {
|
||||
--tw-border-spacing-x: 0;
|
||||
--tw-border-spacing-y: 0;
|
||||
--tw-translate-x: 0;
|
||||
--tw-translate-y: 0;
|
||||
--tw-rotate: 0;
|
||||
--tw-skew-x: 0;
|
||||
--tw-skew-y: 0;
|
||||
--tw-scale-x: 1;
|
||||
--tw-scale-y: 1;
|
||||
--tw-pan-x: ;
|
||||
--tw-pan-y: ;
|
||||
--tw-pinch-zoom: ;
|
||||
--tw-scroll-snap-strictness: proximity;
|
||||
--tw-gradient-from-position: ;
|
||||
--tw-gradient-via-position: ;
|
||||
--tw-gradient-to-position: ;
|
||||
--tw-ordinal: ;
|
||||
--tw-slashed-zero: ;
|
||||
--tw-numeric-figure: ;
|
||||
--tw-numeric-spacing: ;
|
||||
--tw-numeric-fraction: ;
|
||||
--tw-ring-inset: ;
|
||||
--tw-ring-offset-width: 0px;
|
||||
--tw-ring-offset-color: #fff;
|
||||
--tw-ring-color: rgb(59 130 246 / 0.5);
|
||||
--tw-ring-offset-shadow: 0 0 #0000;
|
||||
--tw-ring-shadow: 0 0 #0000;
|
||||
--tw-shadow: 0 0 #0000;
|
||||
--tw-shadow-colored: 0 0 #0000;
|
||||
--tw-blur: ;
|
||||
--tw-brightness: ;
|
||||
--tw-contrast: ;
|
||||
--tw-grayscale: ;
|
||||
--tw-hue-rotate: ;
|
||||
--tw-invert: ;
|
||||
--tw-saturate: ;
|
||||
--tw-sepia: ;
|
||||
--tw-drop-shadow: ;
|
||||
--tw-backdrop-blur: ;
|
||||
--tw-backdrop-brightness: ;
|
||||
--tw-backdrop-contrast: ;
|
||||
--tw-backdrop-grayscale: ;
|
||||
--tw-backdrop-hue-rotate: ;
|
||||
--tw-backdrop-invert: ;
|
||||
--tw-backdrop-opacity: ;
|
||||
--tw-backdrop-saturate: ;
|
||||
--tw-backdrop-sepia: ;
|
||||
--tw-contain-size: ;
|
||||
--tw-contain-layout: ;
|
||||
--tw-contain-paint: ;
|
||||
--tw-contain-style: ;
|
||||
}
|
||||
|
||||
/*
|
||||
! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com
|
||||
*/
|
||||
|
||||
/*
|
||||
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
|
||||
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
|
||||
*/
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
box-sizing: border-box;
|
||||
/* 1 */
|
||||
border-width: 0;
|
||||
/* 2 */
|
||||
border-style: solid;
|
||||
/* 2 */
|
||||
border-color: #e5e7eb;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
::before,
|
||||
::after {
|
||||
--tw-content: '';
|
||||
}
|
||||
|
||||
/*
|
||||
1. Use a consistent sensible line-height in all browsers.
|
||||
2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
3. Use a more readable tab size.
|
||||
4. Use the user's configured `sans` font-family by default.
|
||||
5. Use the user's configured `sans` font-feature-settings by default.
|
||||
6. Use the user's configured `sans` font-variation-settings by default.
|
||||
7. Disable tap highlights on iOS
|
||||
*/
|
||||
|
||||
html,
|
||||
:host {
|
||||
line-height: 1.5;
|
||||
/* 1 */
|
||||
-webkit-text-size-adjust: 100%;
|
||||
/* 2 */
|
||||
-moz-tab-size: 4;
|
||||
/* 3 */
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
/* 3 */
|
||||
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
/* 4 */
|
||||
font-feature-settings: normal;
|
||||
/* 5 */
|
||||
font-variation-settings: normal;
|
||||
/* 6 */
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
/* 7 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Remove the margin in all browsers.
|
||||
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
/* 1 */
|
||||
line-height: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Add the correct height in Firefox.
|
||||
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
|
||||
3. Ensure horizontal rules are visible by default.
|
||||
*/
|
||||
|
||||
hr {
|
||||
height: 0;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 2 */
|
||||
border-top-width: 1px;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct text decoration in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
abbr:where([title]) {
|
||||
-webkit-text-decoration: underline dotted;
|
||||
text-decoration: underline dotted;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the default font size and weight for headings.
|
||||
*/
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
Reset links to optimize for opt-in styling instead of opt-out.
|
||||
*/
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: inherit;
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct font weight in Edge and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Use the user's configured `mono` font-family by default.
|
||||
2. Use the user's configured `mono` font-feature-settings by default.
|
||||
3. Use the user's configured `mono` font-variation-settings by default.
|
||||
4. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
samp,
|
||||
pre {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
/* 1 */
|
||||
font-feature-settings: normal;
|
||||
/* 2 */
|
||||
font-variation-settings: normal;
|
||||
/* 3 */
|
||||
font-size: 1em;
|
||||
/* 4 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/*
|
||||
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
|
||||
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
|
||||
3. Remove gaps between table borders by default.
|
||||
*/
|
||||
|
||||
table {
|
||||
text-indent: 0;
|
||||
/* 1 */
|
||||
border-color: inherit;
|
||||
/* 2 */
|
||||
border-collapse: collapse;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
1. Change the font styles in all browsers.
|
||||
2. Remove the margin in Firefox and Safari.
|
||||
3. Remove default padding in all browsers.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit;
|
||||
/* 1 */
|
||||
font-feature-settings: inherit;
|
||||
/* 1 */
|
||||
font-variation-settings: inherit;
|
||||
/* 1 */
|
||||
font-size: 100%;
|
||||
/* 1 */
|
||||
font-weight: inherit;
|
||||
/* 1 */
|
||||
line-height: inherit;
|
||||
/* 1 */
|
||||
letter-spacing: inherit;
|
||||
/* 1 */
|
||||
color: inherit;
|
||||
/* 1 */
|
||||
margin: 0;
|
||||
/* 2 */
|
||||
padding: 0;
|
||||
/* 3 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the inheritance of text transform in Edge and Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the inability to style clickable types in iOS and Safari.
|
||||
2. Remove default button styles.
|
||||
*/
|
||||
|
||||
button,
|
||||
input:where([type='button']),
|
||||
input:where([type='reset']),
|
||||
input:where([type='submit']) {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
background-color: transparent;
|
||||
/* 2 */
|
||||
background-image: none;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Use the modern Firefox focus style for all focusable elements.
|
||||
*/
|
||||
|
||||
:-moz-focusring {
|
||||
outline: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
|
||||
*/
|
||||
|
||||
:-moz-ui-invalid {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct vertical alignment in Chrome and Firefox.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/*
|
||||
Correct the cursor style of increment and decrement buttons in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-inner-spin-button,
|
||||
::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the odd appearance in Chrome and Safari.
|
||||
2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type='search'] {
|
||||
-webkit-appearance: textfield;
|
||||
/* 1 */
|
||||
outline-offset: -2px;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Correct the inability to style clickable types in iOS and Safari.
|
||||
2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
/* 1 */
|
||||
font: inherit;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Add the correct display in Chrome and Safari.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/*
|
||||
Removes the default spacing and border for appropriate elements.
|
||||
*/
|
||||
|
||||
blockquote,
|
||||
dl,
|
||||
dd,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
hr,
|
||||
figure,
|
||||
p,
|
||||
pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
legend {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol,
|
||||
ul,
|
||||
menu {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Reset default styling for dialogs.
|
||||
*/
|
||||
|
||||
dialog {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Prevent resizing textareas horizontally by default.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
|
||||
2. Set the default placeholder color to the user's configured gray 400 color.
|
||||
*/
|
||||
|
||||
input::-moz-placeholder, textarea::-moz-placeholder {
|
||||
opacity: 1;
|
||||
/* 1 */
|
||||
color: #9ca3af;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
input::placeholder,
|
||||
textarea::placeholder {
|
||||
opacity: 1;
|
||||
/* 1 */
|
||||
color: #9ca3af;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Set the default cursor for buttons.
|
||||
*/
|
||||
|
||||
button,
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/*
|
||||
Make sure disabled buttons don't get the pointer cursor.
|
||||
*/
|
||||
|
||||
:disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/*
|
||||
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
|
||||
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
|
||||
This can trigger a poorly considered lint error in some tools but is included by design.
|
||||
*/
|
||||
|
||||
img,
|
||||
svg,
|
||||
video,
|
||||
canvas,
|
||||
audio,
|
||||
iframe,
|
||||
embed,
|
||||
object {
|
||||
display: block;
|
||||
/* 1 */
|
||||
vertical-align: middle;
|
||||
/* 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
|
||||
*/
|
||||
|
||||
img,
|
||||
video {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* Make elements with the HTML hidden attribute stay hidden by default */
|
||||
|
||||
[hidden]:where(:not([hidden="until-found"])) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tw-col-span-2 {
|
||||
grid-column: span 2 / span 2;
|
||||
}
|
||||
|
||||
.tw-mx-auto {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.tw-mb-1 {
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.tw-mb-2 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.tw-mb-4 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tw-mt-0 {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.tw-block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tw-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.tw-grid {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.tw-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tw-h-\[25px\] {
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
.tw-h-\[35px\] {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.tw-w-\[10\%\] {
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
.tw-w-\[13\%\] {
|
||||
width: 13%;
|
||||
}
|
||||
|
||||
.tw-w-\[15\%\] {
|
||||
width: 15%;
|
||||
}
|
||||
|
||||
.tw-w-\[25px\] {
|
||||
width: 25px;
|
||||
}
|
||||
|
||||
.tw-w-\[3\%\] {
|
||||
width: 3%;
|
||||
}
|
||||
|
||||
.tw-w-\[35\%\] {
|
||||
width: 35%;
|
||||
}
|
||||
|
||||
.tw-w-\[4\%\] {
|
||||
width: 4%;
|
||||
}
|
||||
|
||||
.tw-w-\[5\%\] {
|
||||
width: 5%;
|
||||
}
|
||||
|
||||
.tw-w-\[50\%\] {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.tw-w-\[7\%\] {
|
||||
width: 7%;
|
||||
}
|
||||
|
||||
.tw-w-\[97\%\] {
|
||||
width: 97%;
|
||||
}
|
||||
|
||||
.tw-w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tw-w-max {
|
||||
width: -moz-max-content;
|
||||
width: max-content;
|
||||
}
|
||||
|
||||
.tw-grid-cols-12 {
|
||||
grid-template-columns: repeat(12, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.tw-grid-cols-2 {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.tw-grid-cols-3 {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.tw-flex-col {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tw-items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tw-justify-end {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.tw-justify-center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tw-gap-2 {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.tw-gap-3 {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.tw-gap-4 {
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.tw-gap-40 {
|
||||
gap: 10rem;
|
||||
}
|
||||
|
||||
.tw-overflow-x-auto {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.tw-truncate {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tw-whitespace-nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tw-rounded-\[10px\] {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.tw-rounded-\[5px\] {
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.tw-rounded-full {
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
.tw-bg-\[\#2090C2\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(32 144 194 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#37d1d1\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(55 209 209 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#454D5C\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(69 77 92 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#84CC16\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(132 204 22 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#84D500\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(132 213 0 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#ADE7F2\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(173 231 242 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#DDD3E0\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(221 211 224 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#FF8798\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 135 152 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#b1c3c3\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(177 195 195 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#ddf4f4\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(221 244 244 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-\[\#ecffff\] {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(236 255 255 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-bg-white {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(255 255 255 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-p-4 {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.tw-p-\[4px\] {
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.tw-px-2 {
|
||||
padding-left: 0.5rem;
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
.tw-px-6 {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
.tw-py-1 {
|
||||
padding-top: 0.25rem;
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.tw-text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tw-text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.tw-text-end {
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
.tw-text-\[12px\] {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tw-text-\[16px\] {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.tw-text-\[18px\] {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.tw-font-\[400\] {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.tw-font-\[500\] {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.tw-ordinal {
|
||||
--tw-ordinal: ordinal;
|
||||
font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
|
||||
}
|
||||
|
||||
.tw-text-green-500 {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(34 197 94 / var(--tw-text-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-text-white {
|
||||
--tw-text-opacity: 1;
|
||||
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
||||
}
|
||||
|
||||
.tw-transition-all {
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
}
|
||||
|
||||
.hover\:tw-bg-\[\#C9F0F0\]:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(201 240 240 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
.hover\:tw-bg-\[\#bbc6c6\]:hover {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(187 198 198 / var(--tw-bg-opacity, 1));
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:tw-block {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user