feat(support): filter waiting tickets and staff assignments
This commit is contained in:
1 parent
5d18af932d
commit
25d0a13050
7 files changed
+173
-6
No files matched your search
@@ -0,0 +1,10 @@
|
||||
export function ticketReplyAge(
|
||||
value: Date | string | null,
|
||||
now = Date.now(),
|
||||
): number | null {
|
||||
if (!value) return null;
|
||||
const time = value instanceof Date ? value.getTime() : Date.parse(value);
|
||||
return Number.isFinite(time)
|
||||
? Math.max(0, Math.floor((now - time) / 60000))
|
||||
: null;
|
||||
}
|
||||
Reference in new issue
Block a user