add recalculateVaues

This commit is contained in:
MahanCh
2025-05-14 13:50:18 +03:30
parent ffa728d05d
commit f4961a46eb

View File

@@ -38,7 +38,7 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public CustomizeWorkshopSettingsViewModel RollCallWorkshopSettings;
public List<RollCallEmployeeViewModel> RollCallEmployeeList;
public GroupingModel(IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ICustomizeWorkshopSettingsApplication rollCallWorkshopSettingsApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, IAuthHelper authHelper, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallApplication rollCallApplication)
public GroupingModel(IPasswordHasher passwordHasher, IWorkshopApplication workshopApplication, ICustomizeWorkshopSettingsApplication rollCallWorkshopSettingsApplication, IEmployeeApplication employeeApplication, IHttpContextAccessor contextAccessor, IAuthHelper authHelper, IRollCallEmployeeApplication rollCallEmployeeApplication, IRollCallApplication rollCallApplication)
{
_passwordHasher = passwordHasher;
_workshopApplication = workshopApplication;
@@ -249,19 +249,19 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public IActionResult OnGetEmployeesHaveToChange(long groupId, bool isChange)
{
var result = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByGroupSettingsId(groupId)
.Where(x => x.IsSettingChanged = isChange).ToList();
return new JsonResult(new
{
success = true,
data = result
});
var result = _customizeWorkshopSettingsApplication.GetEmployeeSettingsByGroupSettingsId(groupId)
.Where(x => x.IsSettingChanged = isChange).ToList();
return new JsonResult(new
{
success = true,
data = result
});
}
public IActionResult OnPostChangeEditEmployee(EditCustomizeEmployeeSettings command, List<ReCalculateRollCallValues> reCalculateCommand)
{
command.WorkshopId = _workshopId;
OperationResult result = _customizeWorkshopSettingsApplication.EditSimpleRollCallEmployeeSetting(command, reCalculateCommand);
command.WorkshopId = _workshopId;
OperationResult result = _customizeWorkshopSettingsApplication.EditSimpleRollCallEmployeeSetting(command, reCalculateCommand);
return new JsonResult(new
{
success = result.IsSuccedded,
@@ -280,14 +280,14 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
public IActionResult OnPostReCalculateValues(List<ReCalculateRollCallValues> command)
{
var result = _rollCallApplication.RecalculateValues(_workshopId, command);
var result = _rollCallApplication.RecalculateValues(_workshopId, command);
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message
});
}
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message
});
}
public IActionResult OnGetDownloadExcel()
{
@@ -359,6 +359,17 @@ namespace ServiceHost.Areas.Client.Pages.Company.RollCall
$"اطلاعات گروهبندی.xlsx");
}
public IActionResult OnPostValidateGroupEdit(List<ReCalculateRollCallValues> command)
{
var result = _customizeWorkshopSettingsApplication.ValidateReCalculateValueForGroupEdit(command, _workshopId);
return new JsonResult(new
{
success = result.IsSuccedded,
message = result.Message,
data = result.Data
});
}
// public IActionResult OnGetGroupingSetting(long groupId)
// {
// var command = _customizeWorkshopSettingsApplication.GetCustomizeWorkshopGroupSettingsDetails(groupId);