This commit is contained in:
Zeeshaun
2026-03-17 09:53:09 -05:00
parent cdcba54aa4
commit 1a0702a79a
590 changed files with 62058 additions and 0 deletions
@@ -0,0 +1,12 @@
using LCU.Library.Internal.IncentiveApiModels.Enums;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class CustomWeightedDispersalRequest
{
public int DepartmentId { get; set; }
public Product DispersalProduct { get; set; }
public Dictionary<string,double> DispersalWeightByRole { get; set; }
public int month { get; set; }
public int year { get; set; }
}
@@ -0,0 +1,11 @@
using LCU.Library.Internal.IncentiveApiModels.Entities;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class DefaultWeightedGoalDispersalData
{
public int DepartmentId { get; set; }
public DateTime DispersalMonthStartDate { get; set; }
public List<AppUser> DispersalMonthPersonnel { get; set; }
public PerProductGoal DispersalMonthDepartmentGoals { get; set; }
}
@@ -0,0 +1,13 @@
using LCU.Library.Internal.IncentiveApiModels.Enums;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class DepartmentGoalExtrapolationRequest
{
public DateTime DepartmentGoalStartDate { get; set; }
public DateTime DepartmentGoalEndDate { get; set; }
public int OriginalDepartmentGoal { get; set; }
public int NewDepartmentGoal { get; set; }
public int DepartmentId { get; set; }
public Product Product;
}
@@ -0,0 +1,14 @@
using LCU.Library.Internal.IncentiveApiModels.Entities;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class ExtrapolationGoalDispersalData
{
public int DepartmentId { get; set; }
public DateTime DispersalMonthStartDate { get; set; }
public PersonnelGoals DispersalMonthPersonnelGoals { get; set; }
public PerProductGoal DispersalMonthDepartmentGoals { get; set; }
public PerProductGoal ModelDepartmentGoals { get; set; }
public PersonnelGoals ModelPersonnelGoals { get; set; }
public List<AppUser> DispersalMonthPersonnel { get; set; }
}
@@ -0,0 +1,32 @@
using LCU.Library.Internal.IncentiveApiModels.Entities;
using LCU.Library.Internal.IncentiveApiModels.Enums;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class GoalDispersalReceipt
{
public GoalDispersalReceipt(int deptId, GoalDispersalStrategy strategy)
{
GoalChanges = new List<GoalChange>();
GoalDispersalErrors = new List<GoalDispersalReceiptItem>();
DepartmentId = deptId;
Strategy = strategy;
}
public int DepartmentId { get; set; }
[JsonIgnore]
public List<GoalChange> GoalChanges { get; set; }
public List<GoalDispersalReceiptItem> GoalDispersalErrors { get; set; }
[JsonConverter(typeof(StringEnumConverter))]
public GoalDispersalStrategy Strategy { get; set; }
public void AddNewDispersalError(GoalDispersalError errorType, string employeeId, string message, string employeeName = null)
{
var newError = new GoalDispersalReceiptItem(errorType, employeeId, message);
if (!String.IsNullOrEmpty(employeeName))
{
newError.EmployeeName = employeeName;
}
GoalDispersalErrors.Add(newError);
}
}
@@ -0,0 +1,20 @@
using LCU.Library.Internal.IncentiveApiModels.Enums;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace LCU.API.Internal.Operations.IncentiveApi.Models.GoalDispersal;
public class GoalDispersalReceiptItem
{
public GoalDispersalReceiptItem(GoalDispersalError errorType, string employeeId, string message)
{
ErrorType = errorType;
EmployeeId = employeeId;
Message = message;
}
[JsonConverter(typeof(StringEnumConverter))]
public GoalDispersalError ErrorType { get; set; }
public string Message { get; set; }
public string EmployeeId { get; set; }
public string EmployeeName { get; set; }
}