mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Tracker: split "edit issue" dialog to preview / edit (#1731)
This commit is contained in:
@@ -228,3 +228,22 @@ export const getArraysUnion = (a: any[], b: any[]): any[] => {
|
||||
|
||||
return Array.from(union)
|
||||
}
|
||||
|
||||
const WARNING_DAYS = 7
|
||||
|
||||
export const getDueDateIconModifier = (
|
||||
isOverdue: boolean,
|
||||
daysDifference: number | null
|
||||
): 'overdue' | 'critical' | 'warning' | undefined => {
|
||||
if (isOverdue) {
|
||||
return 'overdue'
|
||||
}
|
||||
|
||||
if (daysDifference === 0) {
|
||||
return 'critical'
|
||||
}
|
||||
|
||||
if (daysDifference !== null && daysDifference <= WARNING_DAYS) {
|
||||
return 'warning'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user