Imporvements on started management of assignment
This commit is contained in:
@@ -38,3 +38,14 @@ export const activeAssignmentFilter = (a: Assignment) => {
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
export const unstartedAssignmentFilter = (a: Assignment) => {
|
||||
const currentDate = moment();
|
||||
if(moment(a.endDate).isBefore(currentDate)) return false;
|
||||
if(a.archived) return false;
|
||||
|
||||
if(a.autoStart && a.autoStartDate && moment(a.autoStartDate).isBefore(currentDate)) return false;
|
||||
|
||||
if(!a.start) return true;
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user