diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index a0583057..ebb91cef 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -1779,8 +1779,8 @@ public class InsuranceListApplication : IInsuranceListApplication else { - var searchModel = new InsuranceJobItemSearchModel(); - searchModel.InsuranceJobId = (long)insuranceJobId; + var searchModel = new InsuranceJobItemSearchModel(); + searchModel.InsuranceJobId = (long)insuranceJobId; var JobItem = _insuranceJobItemRepository.GetInsuranceJobItemByInsuranceJobIdForFixedSalary((long)insuranceJobId, jobId, year, month); if (JobItem != null && JobItem.Id != 0) @@ -2282,7 +2282,7 @@ public class InsuranceListApplication : IInsuranceListApplication return op.Failed("حجم فایل نمیتواند از 20 مگابایت بیشتر باشد"); - var mediaId = command.Debt.DebtFileMediaId; + var mediaId = inspection.InspectionFileMediaId; if (inspection.InspectionFile is { Length: > 0 }) { mediaId = await CreateMediaAsync(insuranceList, "inspection", inspection.InspectionFile); @@ -2301,7 +2301,7 @@ public class InsuranceListApplication : IInsuranceListApplication if (string.IsNullOrWhiteSpace(approval.Description)) return op.Failed("لطفا توضیحات را وارد کنید"); - if (approval.Description.Length < 15 && approval.ApprovalStatus == InsuranceListEmployerApprovalStatus.VerbalApproval) + if (approval.Description.Length < 15) return op.Failed("توضیحات باید حداقل 15 کاراکتر باشد"); } var approvalEntity = new InsuranceListEmployerApproval(approval.ApprovalStatus, approval.Description); @@ -2317,6 +2317,10 @@ public class InsuranceListApplication : IInsuranceListApplication insuranceList.SetConfirmSentlist(true); } + else + { + insuranceList.SetConfirmSentlist(false); + } await _insuranceListRepositpry.SaveChangesAsync(); return op.Succcedded(); diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml index 32074ae6..ab521c27 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Create.cshtml @@ -1384,6 +1384,7 @@ // Reload Function pageIndexJs = 0; + hasMoreData = true; var $activeTab = $('.tab-bar__tab--active'); var activeValue = $activeTab.val(); $('#load-data-html').html(''); diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml index 9f9d6c35..c2400e0e 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Edit.cshtml @@ -1258,6 +1258,7 @@ // Reload Function pageIndexJs = 0; + hasMoreData = true; var $activeTab = $('.tab-bar__tab--active'); var activeValue = $activeTab.val(); $('#load-data-html').html(''); diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml index c7d4c9f3..b239f68f 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/Index.cshtml @@ -316,175 +316,6 @@ - -
- -
-
@@ -711,6 +542,8 @@ var insuranceConfirmUrl = `#showmodal=@Url.Page("/Company/InsuranceList/Index", "InsuranceConfirm")`; var downloadFileUrl = `@Url.Page("/Company/InsuranceList/Index", "DownloadFile")`; var removeInsuranceListUrl = `@Url.Page("/Company/InsuranceList/Index", "RemoveInsuranceList")`; + var workshopNameUrl = `@Url.Page("/Company/InsuranceList/Index", "WorkshopName")`; + var employerNameUrl = `@Url.Page("/Company/InsuranceList/Index", "EmployerName")`; var currentAccountId = Number(@currentAccount.RoleId); var month = '@Model.BeforCurrentMonth_'; @@ -727,333 +560,4 @@ -} - - - - - +} \ No newline at end of file diff --git a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/_Partials/OperationsModal.cshtml b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/_Partials/OperationsModal.cshtml index 9432bfe1..c8d15d51 100644 --- a/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/_Partials/OperationsModal.cshtml +++ b/ServiceHost/Areas/Admin/Pages/Company/InsuranceList/_Partials/OperationsModal.cshtml @@ -25,7 +25,7 @@