mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-23 00:37:47 +00:00
Fix schedule total (#2250)
Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
parent
14181885a8
commit
42ba7c0944
@ -36,8 +36,8 @@
|
|||||||
)
|
)
|
||||||
$: endDate = new Date(
|
$: endDate = new Date(
|
||||||
mode === CalendarMode.Year
|
mode === CalendarMode.Year
|
||||||
? new Date(startDate).setFullYear(new Date(startDate).getFullYear() + 1)
|
? new Date(new Date(startDate).setFullYear(new Date(startDate).getFullYear() + 1)).setDate(-1)
|
||||||
: new Date(startDate).setMonth(new Date(startDate).getMonth() + 1)
|
: new Date(new Date(startDate).setMonth(new Date(startDate).getMonth() + 1)).setDate(-1)
|
||||||
)
|
)
|
||||||
$: departments = [department, ...getDescendants(department, descendants)]
|
$: departments = [department, ...getDescendants(department, descendants)]
|
||||||
|
|
||||||
@ -84,7 +84,7 @@
|
|||||||
'tzDueDate.year': { $gte: startDate.getFullYear() },
|
'tzDueDate.year': { $gte: startDate.getFullYear() },
|
||||||
'tzDueDate.month': { $gte: startDate.getMonth() },
|
'tzDueDate.month': { $gte: startDate.getMonth() },
|
||||||
'tzDate.year': { $lte: endDate.getFullYear() },
|
'tzDate.year': { $lte: endDate.getFullYear() },
|
||||||
'tzDate.month': { $lte: endDate.getFullYear() },
|
'tzDate.month': { $lte: endDate.getMonth() },
|
||||||
space: { $in: departments }
|
space: { $in: departments }
|
||||||
},
|
},
|
||||||
(res) => {
|
(res) => {
|
||||||
|
@ -105,7 +105,7 @@ export function getRequestDays (request: Request, types: Map<Ref<RequestType>, R
|
|||||||
const endDate =
|
const endDate =
|
||||||
request.tzDueDate.month === month
|
request.tzDueDate.month === month
|
||||||
? fromTzDate(request.tzDueDate)
|
? fromTzDate(request.tzDueDate)
|
||||||
: fromTzDate({ ...request.tzDueDate, month: month + 1, day: -1 })
|
: fromTzDate({ ...request.tzDueDate, month: month + 1, day: 0 })
|
||||||
const days = Math.floor(Math.abs((1 + endDate - startDate) / 1000 / 60 / 60 / 24)) + 1
|
const days = Math.floor(Math.abs((1 + endDate - startDate) / 1000 / 60 / 60 / 24)) + 1
|
||||||
const stDate = new Date(startDate)
|
const stDate = new Date(startDate)
|
||||||
const stDateDate = stDate.getDate()
|
const stDateDate = stDate.getDate()
|
||||||
|
Loading…
Reference in New Issue
Block a user