Compare commits
9 Commits
Feature/la
...
Fix/instit
| Author | SHA1 | Date | |
|---|---|---|---|
| f863fb065f | |||
| d0b29e7643 | |||
|
|
5b3c7e471e | ||
|
|
330a3ca839 | ||
| 7c4cf1e2ed | |||
| 1d2c4f26f1 | |||
| 4f68d141e8 | |||
| 75ea35596b | |||
| a0e2b969c0 |
@@ -59,4 +59,5 @@ public interface IInstitutionContractRepository : IRepository<long, InstitutionC
|
||||
Task<InstitutionContractExtensionPlanResponse> GetExtensionInstitutionPlan(InstitutionContractExtensionPlanRequest request);
|
||||
Task<InstitutionContractExtensionPaymentResponse> GetExtensionPaymentMethod(InstitutionContractExtensionPaymentRequest request);
|
||||
Task<OperationResult> ExtensionComplete(InstitutionContractExtensionCompleteRequest request);
|
||||
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected);
|
||||
}
|
||||
@@ -219,8 +219,11 @@ public interface IInstitutionContractApplication
|
||||
InstitutionContractExtensionPaymentRequest request);
|
||||
|
||||
Task<OperationResult> ExtensionComplete(InstitutionContractExtensionCompleteRequest request);
|
||||
Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search,string selected);
|
||||
}
|
||||
|
||||
public class InstitutionContractSelectListViewModel : SelectListViewModel;
|
||||
|
||||
public class InstitutionContractExtensionInquiryResponse
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
@@ -1301,6 +1301,11 @@ public class InstitutionContractApplication : IInstitutionContractApplication
|
||||
{
|
||||
return await _institutionContractRepository.ExtensionComplete(request);
|
||||
}
|
||||
|
||||
public async Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search, string selected)
|
||||
{
|
||||
return await _institutionContractRepository.GetInstitutionContractSelectList(search,selected);
|
||||
}
|
||||
|
||||
|
||||
private async Task<OperationResult<PersonalContractingParty>> CreateLegalContractingPartyEntity(
|
||||
|
||||
@@ -1083,6 +1083,11 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
joinedQuery = joinedQuery.Where(x =>
|
||||
x.contractingParty.RepresentativeFullName.Contains(keyword) ||
|
||||
(x.contractingParty.FName + " " + x.contractingParty.LName).Contains(keyword) ||
|
||||
(x.contractingParty.IsLegal == "حقیقی" ? x.contractingParty.SureName == null
|
||||
? x.contractingParty.FName + " " + x.contractingParty.LName
|
||||
: x.contractingParty.FName + " " + x.contractingParty.LName + " " + x.contractingParty.SureName
|
||||
: x.contractingParty.SureName == null ? x.contractingParty.LName
|
||||
: x.contractingParty.LName + " " + x.contractingParty.SureName).Contains(keyword)||
|
||||
x.contractingParty.Employers.Any(e =>
|
||||
e.FullName.Contains(keyword) ||
|
||||
e.WorkshopEmployers.Any(we =>
|
||||
@@ -2326,6 +2331,60 @@ public class InstitutionContractRepository : RepositoryBase<long, InstitutionCon
|
||||
return opration.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<List<InstitutionContractSelectListViewModel>> GetInstitutionContractSelectList(string search,
|
||||
string selected)
|
||||
{
|
||||
var contractingParties = _context.PersonalContractingParties.Select(x => new InstitutionContractSelectListViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
Text = x.IsLegal == "حقیقی" ? x.SureName == null
|
||||
? x.FName + " " + x.LName
|
||||
: x.FName + " " + x.LName + " " + x.SureName
|
||||
: x.SureName == null ? x.LName
|
||||
: x.LName + " " + x.SureName
|
||||
});
|
||||
|
||||
var workshops = _context.Workshops.Select(x => new InstitutionContractSelectListViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
Text = x.WorkshopFullName
|
||||
});
|
||||
var employers = _context.Employers.Select(x => new InstitutionContractSelectListViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
Text = x.FName + " " + x.LName
|
||||
});
|
||||
var representatives = _context.RepresentativeSet.Select(x => new InstitutionContractSelectListViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
Text = x.FName + " " + x.LName
|
||||
});
|
||||
|
||||
var res = contractingParties
|
||||
.Union(workshops)
|
||||
.Union(employers)
|
||||
.Union(representatives);
|
||||
|
||||
InstitutionContractSelectListViewModel idSelected = null;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(selected))
|
||||
{
|
||||
idSelected = await res.FirstOrDefaultAsync(x => x.Text == selected);
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(search))
|
||||
{
|
||||
res = res.Where(x => x.Text.Contains(search));
|
||||
}
|
||||
|
||||
var list = await res.Take(100).ToListAsync();
|
||||
|
||||
if (idSelected != null)
|
||||
list.Add(idSelected);
|
||||
|
||||
return list.DistinctBy(x => x.Id).ToList();
|
||||
|
||||
}
|
||||
|
||||
|
||||
private InstitutionContractExtensionPaymentResponse CalculateInPersonPayment(
|
||||
InstitutionContractExtensionPlanDetail selectedPlan, double baseAmount, double tenPercent,
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace ServiceHost.Areas.Admin.Controllers
|
||||
var result = await _employerApplication.EditWorkflowRegistration(command);
|
||||
return result;
|
||||
}
|
||||
|
||||
[HttpGet("edit-employer/{employerId}/{institutionWorkshopDetailsId}")]
|
||||
/// <summary>
|
||||
/// حذف کارفرما از گردش کار ثبت نام
|
||||
/// </summary>
|
||||
|
||||
@@ -67,6 +67,14 @@ public class institutionContractController : AdminBaseController
|
||||
{
|
||||
return await _institutionContractApplication.GetList(searchModel);
|
||||
}
|
||||
|
||||
[HttpGet("select-list")]
|
||||
public async Task<ActionResult<List<InstitutionContractSelectListViewModel>>> GetContractingPartySelectList(string search,string selected)
|
||||
{
|
||||
var result = await _institutionContractApplication
|
||||
.GetInstitutionContractSelectList(search,selected);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// وضعیت تب ها
|
||||
|
||||
@@ -473,6 +473,14 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li permission="2">
|
||||
<a href="https://admin@(AppSetting.Value.Domain)/law" class="waves-effect btnWorkFlow">
|
||||
<div class="menuTitle">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path stroke-linejoin="round" d="M4 12.996v1.544c0 3.247 0 4.87.886 5.97q.27.334.603.603C6.59 22 8.211 22 11.456 22c.705 0 1.058 0 1.381-.114q.1-.036.197-.082c.31-.148.559-.397 1.058-.896l4.736-4.74c.579-.578.867-.867 1.02-1.235c.152-.367.152-.776.152-1.594V9.994c0-3.773 0-5.66-1.172-6.832c-.93-.932-2.314-1.123-4.736-1.162M13 21.5V21c0-2.83 0-4.245.879-5.124c.878-.88 2.293-.88 5.121-.88h.5"></path><path d="M8 9.773c1.767 0 3.2-1.466 3.2-3.273S9.767 3.227 8 3.227m0 6.546c-1.767 0-3.2-1.466-3.2-3.273S6.233 3.227 8 3.227m0 6.546V11m0-7.773V2M5.091 4.715l-1.09-.67M12 8.955l-1.09-.67m-.001-3.57l1.09-.67M4 8.955l1.09-.67"></path></g></svg>
|
||||
<span> ویرایش قوانین و مقررات </span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub" permission="307">
|
||||
|
||||
<a class="waves-effect MainMenuItem">
|
||||
|
||||
@@ -694,7 +694,8 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
||||
await _context.SaveChangesAsync();
|
||||
//TODO: set data for institution price
|
||||
var workshops = item.contractingParty.Employers
|
||||
.SelectMany(e => e.WorkshopEmployers.Select(we => we.Workshop)).ToList();
|
||||
.SelectMany(e => e.WorkshopEmployers.Select(we => we.Workshop)).ToList()
|
||||
.DistinctBy(x=>x.id).ToList();
|
||||
|
||||
var initialWorkshop = workshops
|
||||
.Select(w =>
|
||||
@@ -760,7 +761,8 @@ namespace ServiceHost.Areas.AdminNew.Pages.Company.AndroidApk
|
||||
foreach (var item in inPersonContracts)
|
||||
{
|
||||
var workshops = item.contractingParty.Employers
|
||||
.SelectMany(e => e.WorkshopEmployers.Select(we => we.Workshop)).ToList();
|
||||
.SelectMany(e => e.WorkshopEmployers.Select(we => we.Workshop)).ToList()
|
||||
.DistinctBy(x=>x.id).ToList();
|
||||
|
||||
var initialWorkshop = workshops
|
||||
.Select(w =>
|
||||
|
||||
@@ -621,6 +621,14 @@
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li permission="2">
|
||||
<a href="https://admin@(AppSetting.Value.Domain)/law" class="waves-effect btnWorkFlow">
|
||||
<div class="menuTitle">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"><path stroke-linejoin="round" d="M4 12.996v1.544c0 3.247 0 4.87.886 5.97q.27.334.603.603C6.59 22 8.211 22 11.456 22c.705 0 1.058 0 1.381-.114q.1-.036.197-.082c.31-.148.559-.397 1.058-.896l4.736-4.74c.579-.578.867-.867 1.02-1.235c.152-.367.152-.776.152-1.594V9.994c0-3.773 0-5.66-1.172-6.832c-.93-.932-2.314-1.123-4.736-1.162M13 21.5V21c0-2.83 0-4.245.879-5.124c.878-.88 2.293-.88 5.121-.88h.5"></path><path d="M8 9.773c1.767 0 3.2-1.466 3.2-3.273S9.767 3.227 8 3.227m0 6.546c-1.767 0-3.2-1.466-3.2-3.273S6.233 3.227 8 3.227m0 6.546V11m0-7.773V2M5.091 4.715l-1.09-.67M12 8.955l-1.09-.67m-.001-3.57l1.09-.67M4 8.955l1.09-.67"></path></g></svg>
|
||||
<span> ویرایش قوانین و مقررات </span>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<li class="has_sub" permission="307">
|
||||
|
||||
<a class="waves-effect MainMenuItem">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
</handlers>
|
||||
|
||||
<aspNetCore processPath="dotnet" arguments=".\ServiceHost.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
|
||||
|
||||
<security>
|
||||
<requestFiltering>
|
||||
<requestLimits maxAllowedContentLength="200000000" />
|
||||
|
||||
@@ -823,7 +823,7 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
||||
}
|
||||
|
||||
//if (item.inspectionDone && item.debtDone && item.employerApproved && item.confirmSentlist) {
|
||||
if (item.inspectionDone || item.debtDone || item.employerApproved || item.confirmSentlist) {
|
||||
// if (item.inspectionDone || item.debtDone || item.employerApproved || item.confirmSentlist) {
|
||||
// Confirm List and Print Button
|
||||
if (hasPermission_80215) {
|
||||
html += `
|
||||
@@ -839,7 +839,7 @@ function generateButtons(item, pathDSKKAR00, pathDSKWOR00) {
|
||||
<span class="tw-flex md:tw-hidden tw-text-sm tw-text-white">پرینت</span>
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if (item.inspectionDone || item.debtDone || item.employerApproved || item.confirmSentlist) {
|
||||
// Summary List and Print Button
|
||||
|
||||
Reference in New Issue
Block a user