diff --git a/CompanyManagment.App.Contracts/TemporaryClientRegistration/CreateWorkshopTemp.cs b/CompanyManagment.App.Contracts/TemporaryClientRegistration/CreateWorkshopTemp.cs
index 9130e657..e4b61063 100644
--- a/CompanyManagment.App.Contracts/TemporaryClientRegistration/CreateWorkshopTemp.cs
+++ b/CompanyManagment.App.Contracts/TemporaryClientRegistration/CreateWorkshopTemp.cs
@@ -27,7 +27,7 @@ public class CreateWorkshopTemp
/// جمع کل مبالغ سرویس ها برای کارگاه
/// فارسی
///
- public double WorkshopServicesAmountStr { get; set; }
+ public string WorkshopServicesAmountStr { get; set; }
#region ServiceSelection
@@ -35,22 +35,22 @@ public class CreateWorkshopTemp
///
/// قرارداد و تصفیه
///
- public bool ContractAndCheckoutPercent { get; set; }
+ public bool ContractAndCheckout { get; set; }
///
/// بیمه
///
- public bool InsurancePercent { get; set; }
+ public bool Insurance { get; set; }
///
/// حضورغباب
///
- public bool RollCallPercent { get; set; }
+ public bool RollCall { get; set; }
///
/// فیش غیر رسمی
///
- public bool CustomizeCheckoutPercent { get; set; }
+ public bool CustomizeCheckout { get; set; }
/////
///// خدمات حضوری قرداد و تصفیه
diff --git a/CompanyManagment.EFCore/Repository/WorkshopTempRepository.cs b/CompanyManagment.EFCore/Repository/WorkshopTempRepository.cs
index 2dc001f2..8f6a8a16 100644
--- a/CompanyManagment.EFCore/Repository/WorkshopTempRepository.cs
+++ b/CompanyManagment.EFCore/Repository/WorkshopTempRepository.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
+using _0_Framework.Application;
using _0_Framework.InfraStructure;
using Company.Domain.TemporaryClientRegistrationAgg;
using CompanyManagment.App.Contracts.TemporaryClientRegistration;
@@ -18,16 +19,23 @@ public class WorkshopTempRepository : RepositoryBase, IWorks
public async Task> GetWorkshopTemp(long contractingPartyTemp)
{
- var result =_context.WorkshopTemps
+ var result = await _context.WorkshopTemps
.Where(x => x.ContractingPartyTempId == contractingPartyTemp)
.Include(x => x.WorkshopServicesTemps)
.Select(x => new WorkshopTempViewModel
{
Id = x.id,
- WorkshopName = x.WorkshopName
+ WorkshopName = x.WorkshopName,
+ WorkshopServicesAmountStr = x.WorkshopServicesAmount.ToMoney(),
+ WorkshopServicesAmount = x.WorkshopServicesAmount,
+ ContractingPartyTempId = x.ContractingPartyTempId,
+ CountPerson = x.CountPerson,
+ ContractAndCheckout = x.WorkshopServicesTemps.Any(s=>s.ServiceName == "ContractAndCheckout"),
+ CustomizeCheckout = x.WorkshopServicesTemps.Any(s => s.ServiceName == "CustomizeCheckout"),
+ Insurance = x.WorkshopServicesTemps.Any(s=> s.ServiceName == "Insurance"),
+ RollCall = x.WorkshopServicesTemps.Any(s => s.ServiceName == "RollCall"),
+ }).ToListAsync();
- });
-
- return new List();
+ return result;
}
}
\ No newline at end of file