|
@@ -140,64 +140,4 @@ namespace Comal.Stores
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- public class AssignmentFormStore : EntityFormStore<AssignmentForm, Assignment, AssignmentLink>
|
|
|
- {
|
|
|
- protected override void UpdateParentStatus(IDigitalFormInstance instance, Assignment parent)
|
|
|
- {
|
|
|
- if (instance.FormCompleted.IsEmpty() != parent.Completed.IsEmpty())
|
|
|
- parent.Completed = instance.FormCompleted;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public class LeaveRequestFormStore : EntityFormStore<LeaveRequestForm, LeaveRequest, LeaveRequestLink>
|
|
|
- {
|
|
|
- protected override void UpdateParentStatus(IDigitalFormInstance form, LeaveRequest parent)
|
|
|
- {
|
|
|
- base.UpdateParentStatus(form, parent);
|
|
|
- if (!form.FormCancelled.IsEmpty())
|
|
|
- {
|
|
|
- parent.Status = LeaveRequestStatus.Rejected;
|
|
|
- parent.StatusNotes = $"{parent.StatusNotes}\nLeave Form cancelled by user".Trim();
|
|
|
- }
|
|
|
- else if (!form.FormCompleted.IsEmpty())
|
|
|
- {
|
|
|
- if (parent.Status == LeaveRequestStatus.NotSubmitted)
|
|
|
- {
|
|
|
- parent.Status = LeaveRequestStatus.InProgress;
|
|
|
- parent.StatusNotes = $"{parent.StatusNotes}\nLeave Form submitted by user".Trim();
|
|
|
- }
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- parent.Status = LeaveRequestStatus.NotSubmitted;
|
|
|
- parent.StatusNotes = $"{parent.StatusNotes}\nLeave Form re-opened by user".Trim();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- public class JobITPFormStore : EntityFormStore<JobITPForm, JobITP, JobITPLink>
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- public class JobFormStore : EntityFormStore<JobForm, Job, JobLink>
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- public class EmployeeFormStore : EntityFormStore<EmployeeForm, Employee, EmployeeLink>
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- public class TimeSheetFormStore : EntityFormStore<TimeSheetForm, TimeSheet, TimeSheetLink>
|
|
|
- {
|
|
|
- }
|
|
|
-
|
|
|
- public class KanbanFormStore : EntityFormStore<KanbanForm, Kanban, KanbanLink>
|
|
|
- {
|
|
|
- protected override void UpdateParentStatus(IDigitalFormInstance instance, Kanban parent)
|
|
|
- {
|
|
|
- if (instance.FormCompleted.IsEmpty() != parent.Completed.IsEmpty())
|
|
|
- parent.Completed = instance.FormCompleted;
|
|
|
- }
|
|
|
- }
|
|
|
}
|