Contract Sign opreation completed - new option to check workflow to create checkout

This commit is contained in:
SamSys
2025-06-25 03:50:39 +03:30
parent 8e3a5b46da
commit 83a17a7e86
6 changed files with 7293 additions and 7204 deletions

View File

@@ -44,5 +44,6 @@ public class CreateCheckoutListViewModel
/// </summary>
public bool EmployeeHasCreateCheckout { get; set; }
public bool HasWorkFlow { get; set; }
public List<CreateCheckoutListViewModel> CreateCheckoutList { get; set; }
}

View File

@@ -63,6 +63,10 @@ public class ContractViweModel
public string EmployeeLName { get; set; }
public string IsBlockCantracingParty { get; set; }
/// <summary>
/// آیا مجاز به امضاء قرادا می باشد
/// </summary>
public bool HasSignContract { get; set; }
public IQueryable<WorkshopEmployerViewModel> WorkshopEmployerList { get; set; }
public List<EmployerViewModel> Employers { get; set; }
public List<WorkshopViewModel> Workshops { get; set; }

View File

@@ -12,6 +12,7 @@ using Company.Domain.YearlySalaryAgg;
using Company.Domain.YearlySalaryItemsAgg;
using CompanyManagment.App.Contracts.Contract;
using CompanyManagment.App.Contracts.Employee;
using CompanyManagment.App.Contracts.EmployeeComputeOptions;
using CompanyManagment.App.Contracts.Employer;
using CompanyManagment.App.Contracts.LeftWork;
using CompanyManagment.App.Contracts.PersonalContractingParty;
@@ -39,6 +40,7 @@ public class ContractApplication : IContractApplication
private readonly IPersonnelCodeRepository _personnelCodeRepository;
private readonly IWorkingHoursTempApplication _workingHoursTempApplication;
private readonly IPersonalContractingPartyApp _contractingPartyApp;
private readonly IEmployeeComputeOptionsApplication _employeeComputeOptionsApplication;
public List<EmployerViewModel> EmpList;
@@ -54,7 +56,7 @@ public class ContractApplication : IContractApplication
IYearlySalaryRepository yearlySalaryRepository,
IYearlySalaryItemRepository yearlySalaryItemRepository
, IEmployeeApplication employeeApplication, IEmployerApplication employerApplication, IWorkshopApplication workshopApplication, IEmployerRepository employerRepository,
IWorkingHoursApplication workingHoursApplication, IWorkingHoursItemsApplication workingHoursItemsApplication, ILeftWorkRepository leftWorkRepository, IPersonnelCodeRepository personnelCodeRepository, IWorkingHoursTempApplication workingHoursTempApplication, IPersonalContractingPartyApp contractingPartyApp)
IWorkingHoursApplication workingHoursApplication, IWorkingHoursItemsApplication workingHoursItemsApplication, ILeftWorkRepository leftWorkRepository, IPersonnelCodeRepository personnelCodeRepository, IWorkingHoursTempApplication workingHoursTempApplication, IPersonalContractingPartyApp contractingPartyApp, IEmployeeComputeOptionsApplication employeeComputeOptionsApplication)
{
_contractRepository = contractRepository;
_holidayItemRepository = holidayItemRepository;
@@ -70,6 +72,7 @@ public class ContractApplication : IContractApplication
_personnelCodeRepository = personnelCodeRepository;
_workingHoursTempApplication = workingHoursTempApplication;
_contractingPartyApp = contractingPartyApp;
_employeeComputeOptionsApplication = employeeComputeOptionsApplication;
//_leftWorkApplication = leftWorkApplication;
}
@@ -3155,7 +3158,7 @@ public class ContractApplication : IContractApplication
EmployeeFName = x.EmployeeFName,
EmployeeLName = x.EmployeeLName,
IsBlockCantracingParty = _contractingPartyApp.IsBlockByEmployerId(x.EmployerId),
HasSignContract = _employeeComputeOptionsApplication.GetEmployeeOptions(x.WorkshopIds,x.EmployeeId).SignContract
}).ToList();

View File

@@ -1,4 +1,5 @@
@model CompanyManagment.App.Contracts.Checkout.CreateCheckoutListViewModel
@using Microsoft.CodeAnalysis.CSharp.Syntax
@model CompanyManagment.App.Contracts.Checkout.CreateCheckoutListViewModel
@{
var i = 1;
var b = 0;
@@ -14,7 +15,7 @@
@if (Model.CreateCheckoutList.Count > 0)
@if (Model.CreateCheckoutList.Count > 0 && !Model.HasWorkFlow)
{
@foreach (var item in Model.CreateCheckoutList)
{
@@ -151,6 +152,22 @@
</tr>
}
}
else
{
if (@Model.HasWorkFlow)
{
<div class="container">
<div class="row">
<div class="3"></div>
<div class="6">
<h4 style="color: red">این کارگاه به دلیل داشتن کارپوشه مجاز به ایجاد تصفیه حساب نمی باشد</h4>
</div>
<div class="3"></div>
</div>
</div>
}
}
<script>

File diff suppressed because it is too large Load Diff

View File

@@ -748,30 +748,35 @@
@item.PersonnelCode
</td>
<td class="hidden-xs" id="td_@item.Id" style="font-size: 12px !important; text-align: center; max-width: 60px; width: 65px;">
@if (item.Signature == "1")
@if (@item.HasSignContract)
{
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
@if (item.Signature == "1")
{
<a class="myLinkSign" name="foo1" value="@item.Id" style="font-size: 20px">
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
<input type="hidden" value="@item.Id" name="signed" />
</a>
@* <a class="myLinkSign @(item.IsBlockCantracingParty=="true"?"disabled":"")" name="foo1" value="@item.Id" style="font-size: 20px">
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
<input type="hidden" value="@item.Id" name="signed"/>
</a>
<i class="ion-checkmark-circled" style="color: #1f9c11"></i>
<input type="hidden" value="@item.Id" name="signed" />
</a> *@
}
else
{
<a permission="20117" class="myLinkSign" name="foo2" value="@item.Id" style="font-size: 20px">
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
<input type="hidden" value="@item.Id" name="unsigned"/>
</a>
}
}
else
{
<a permission="20117" class="myLinkSign" name="foo2" value="@item.Id" style="font-size: 20px">
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
<input type="hidden" value="@item.Id" name="unsigned" />
<a class="myLinkSign" style="font-size: 20px">
<i class="ion-checkmark-circled" style="color: #37baf6"></i>
</a>
@* <a permission="20117" class="myLinkSign @(item.IsBlockCantracingParty=="true"?"disabled":"")" name="foo2" value="@item.Id" style="font-size: 20px">
<i class="ion-ios7-circle-outline" style="color: #dd3632"></i>
<input type="hidden" value="@item.Id" name="unsigned" />
</a> *@
}
</td>
@{