Refactor API types and sync logic
Rename and refactor the types passed over the API to be based on an entity that's either living or a tombstone. A living entity has a deleted property that's either undefined or false, while a tombstone has a deleted property set to true. All entities have a numeric id and an updatedAt timestamp. To sync entities, an array of replacements are passed around. Living entities are replaced with tombstones when they're deleted. And tombstones are replaced with living entities when restored.
This commit is contained in:
parent
251e83f640
commit
fe06d0d6bd
36 changed files with 1242 additions and 834 deletions
|
@ -1,5 +1,8 @@
|
|||
<template>
|
||||
<div>
|
||||
<div v-if="schedule.deleted">
|
||||
Error: Unexpected deleted schedule.
|
||||
</div>
|
||||
<div v-else>
|
||||
<Timetable :schedule="schedulePreview" :eventSlotFilter :shiftSlotFilter />
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -47,7 +50,7 @@
|
|||
v-model="newShiftRole"
|
||||
>
|
||||
<option
|
||||
v-for="role in schedule.roles"
|
||||
v-for="role in schedule.roles?.filter(r => !r.deleted)"
|
||||
:key="role.id"
|
||||
:value="role.id"
|
||||
:selected="role.id === newShiftRole"
|
||||
|
@ -99,14 +102,14 @@
|
|||
<td>{{ status(ss) }}</td>
|
||||
<td>
|
||||
<select
|
||||
:value="ss.role"
|
||||
@change="editShiftSlot(ss, { role: ($event as any).target.value })"
|
||||
:value="ss.roleId"
|
||||
@change="editShiftSlot(ss, { roleId: parseInt(($event as any).target.value) })"
|
||||
>
|
||||
<option
|
||||
v-for="role in schedule.roles"
|
||||
v-for="role in schedule.roles?.filter(r => !r.deleted)"
|
||||
:key="role.id"
|
||||
:value="role.id"
|
||||
:selected="role.id === ss.role"
|
||||
:selected="role.id === ss.roleId"
|
||||
>{{ role.name }}</option>
|
||||
</select>
|
||||
</td>
|
||||
|
@ -124,7 +127,7 @@
|
|||
@click="delShiftSlot(ss)"
|
||||
>Remove</button>
|
||||
<button
|
||||
v-if="changes.some(c => c.data.id === ss.id)"
|
||||
v-if="changes.some(c => c.id === ss.id)"
|
||||
type="button"
|
||||
@click="revertShiftSlot(ss.id)"
|
||||
>Revert</button>
|
||||
|
@ -184,7 +187,7 @@
|
|||
<td>{{ ss.end.diff(ss.start).toFormat('hh:mm') }}</td>
|
||||
<td>{{ ss.name }}</td>
|
||||
<td>{{ status(ss) }}</td>
|
||||
<td>{{ ss.role }}</td>
|
||||
<td>{{ ss.roleId }}</td>
|
||||
<td><AssignedCrew :modelValue="ss.assigned" :edit="false" /></td>
|
||||
</template>
|
||||
</tr>
|
||||
|
@ -203,13 +206,13 @@
|
|||
<b>ShiftSlot changes</b>
|
||||
<ol>
|
||||
<li v-for="change in changes">
|
||||
<pre><code>{{ JSON.stringify((({ shift, slot, ...data }) => ({ op: change.op, data }))(change.data as any), undefined, " ") }}</code></pre>
|
||||
<pre><code>{{ JSON.stringify((({ shift, slot, ...data }) => data)(change as any), undefined, " ") }}</code></pre>
|
||||
</li>
|
||||
</ol>
|
||||
<b>Shift changes</b>
|
||||
<ol>
|
||||
<li v-for="change in shiftChanges">
|
||||
<pre><code>{{ JSON.stringify((({ shift, slot, ...data }) => ({ op: change.op, data }))(change.data as any), undefined, " ") }}</code></pre>
|
||||
<pre><code>{{ JSON.stringify((({ shift, slot, ...data }) => data)(change as any), undefined, " ") }}</code></pre>
|
||||
</li>
|
||||
</ol>
|
||||
</details>
|
||||
|
@ -218,25 +221,28 @@
|
|||
|
||||
<script lang="ts" setup>
|
||||
import { DateTime, Duration } from 'luxon';
|
||||
import type { ChangeRecord, Schedule, Shift, Role, ShiftSlot as ShiftTimeSlot, TimeSlot} from '~/shared/types/schedule';
|
||||
import { applyChangeArray } from '~/shared/utils/changes';
|
||||
import { enumerate, pairs, toId } from '~/shared/utils/functions';
|
||||
import type { ApiSchedule, ApiScheduleEventSlot, ApiScheduleShift, ApiScheduleShiftSlot } from '~/shared/types/api';
|
||||
import { applyUpdatesToArray } from '~/shared/utils/update';
|
||||
import { enumerate, pairs } from '~/shared/utils/functions';
|
||||
import type { Entity } from '~/shared/types/common';
|
||||
|
||||
const props = defineProps<{
|
||||
edit?: boolean,
|
||||
role?: string,
|
||||
eventSlotFilter?: (slot: TimeSlot) => boolean,
|
||||
shiftSlotFilter?: (slot: ShiftTimeSlot) => boolean,
|
||||
roleId?: number,
|
||||
eventSlotFilter?: (slot: ApiScheduleEventSlot) => boolean,
|
||||
shiftSlotFilter?: (slot: ApiScheduleShiftSlot) => boolean,
|
||||
}>();
|
||||
|
||||
interface ShiftSlot {
|
||||
type: "slot",
|
||||
id: string,
|
||||
shift?: Shift,
|
||||
slot?: ShiftTimeSlot,
|
||||
origRole: string,
|
||||
id: number,
|
||||
updatedAt: string,
|
||||
deleted?: boolean,
|
||||
shift?: Extract<ApiScheduleShift, { deleted?: false }>,
|
||||
slot?: ApiScheduleShiftSlot,
|
||||
origRole: number,
|
||||
name: string,
|
||||
role: string,
|
||||
roleId: number,
|
||||
assigned: number[],
|
||||
start: DateTime,
|
||||
end: DateTime,
|
||||
|
@ -248,40 +254,47 @@ interface Gap {
|
|||
shift?: undefined,
|
||||
slot?: undefined,
|
||||
name?: undefined,
|
||||
role?: string,
|
||||
roleId?: number,
|
||||
start: DateTime,
|
||||
end: DateTime,
|
||||
}
|
||||
|
||||
function status(shiftSlot: ShiftSlot) {
|
||||
if (schedule.value.deleted) {
|
||||
throw new Error("Unexpected deleted schedule");
|
||||
}
|
||||
if (
|
||||
!shiftSlot.shift
|
||||
|| shiftSlot.shift.name !== shiftSlot.name
|
||||
) {
|
||||
const shift = schedule.value.rota?.find(shift => shift.name === shiftSlot.name);
|
||||
const shift = schedule.value.shifts?.find(shift => !shift.deleted && shift.name === shiftSlot.name);
|
||||
return shift ? "L" : "N";
|
||||
}
|
||||
return shiftSlot.shift.slots.length === 1 ? "" : shiftSlot.shift.slots.length;
|
||||
}
|
||||
|
||||
// Filter out set records where a del record exists for the same id.
|
||||
function filterSetOps<T extends { op: "set" | "del", data: { id: string }}>(changes: T[]) {
|
||||
const deleteIds = new Set(changes.filter(c => c.op === "del").map(c => c.data.id));
|
||||
return changes.filter(c => c.op !== "set" || !deleteIds.has(c.data.id));
|
||||
function filterSetOps<T extends Entity>(changes: T[]) {
|
||||
const deleteIds = new Set(changes.filter(c => c.deleted).map(c => c.id));
|
||||
return changes.filter(c => c.deleted || !deleteIds.has(c.id));
|
||||
}
|
||||
|
||||
function findShift(
|
||||
shiftSlot: ShiftSlot,
|
||||
changes: ChangeRecord<Shift>[],
|
||||
schedule: Schedule,
|
||||
changes: ApiScheduleShift[],
|
||||
schedule: ApiSchedule,
|
||||
) {
|
||||
let setShift = changes.find(
|
||||
if (schedule.deleted) {
|
||||
throw new Error("Unexpected deleted schedule");
|
||||
}
|
||||
let setShift = changes.filter(
|
||||
c => !c.deleted,
|
||||
).find(
|
||||
c => (
|
||||
c.op === "set"
|
||||
&& c.data.name === shiftSlot.name
|
||||
&& c.data.role === shiftSlot.role
|
||||
c.name === shiftSlot.name
|
||||
&& c.roleId === shiftSlot.roleId
|
||||
)
|
||||
)?.data as Shift | undefined;
|
||||
);
|
||||
if (
|
||||
!setShift
|
||||
&& shiftSlot.shift
|
||||
|
@ -290,32 +303,35 @@ function findShift(
|
|||
setShift = shiftSlot.shift;
|
||||
}
|
||||
if (!setShift) {
|
||||
setShift = schedule.rota?.find(e => e.name === shiftSlot.name);
|
||||
setShift = schedule.shifts?.filter(s => !s.deleted).find(s => s.name === shiftSlot.name);
|
||||
}
|
||||
let delShift;
|
||||
if (shiftSlot.shift) {
|
||||
delShift = changes.find(
|
||||
c => c.op === "set" && c.data.name === shiftSlot.shift!.name
|
||||
)?.data as Shift | undefined;
|
||||
delShift = changes.filter(c => !c.deleted).find(
|
||||
c => c.name === shiftSlot.shift!.name
|
||||
);
|
||||
if (!delShift) {
|
||||
delShift = schedule.rota?.find(e => e.name === shiftSlot.shift!.name);
|
||||
delShift = schedule.shifts?.filter(s => !s.deleted).find(s => s.name === shiftSlot.shift!.name);
|
||||
}
|
||||
}
|
||||
return { setShift, delShift };
|
||||
}
|
||||
|
||||
function mergeSlot(shift: Shift, shiftSlot: ShiftSlot): Shift {
|
||||
function mergeSlot(
|
||||
shift: Extract<ApiScheduleShift, { deleted?: false }>,
|
||||
shiftSlot: ShiftSlot,
|
||||
): Extract<ApiScheduleShift, { deleted?: false }> {
|
||||
if (schedule.value.deleted) {
|
||||
throw new Error("Unexpected deleted schedule");
|
||||
}
|
||||
const oldSlot = shift.slots.find(s => s.id === shiftSlot.id);
|
||||
const nextId = Math.max(-1, ...shift.slots.map(s => {
|
||||
const id = /-(\d+)$/.exec(s.id)?.[1];
|
||||
return id ? parseInt(id) : 0;
|
||||
})) + 1;
|
||||
const nextId = Math.max(0, ...schedule.value.shifts?.filter(s => !s.deleted).flatMap(s => s.slots.map(slot => slot.id)) ?? []) + 1;
|
||||
const start = shiftSlot.start.toUTC().toISO({ suppressSeconds: true })!;
|
||||
const end = shiftSlot.end.toUTC().toISO({ suppressSeconds: true })!;
|
||||
const assigned = shiftSlot.assigned.length ? shiftSlot.assigned : undefined;
|
||||
|
||||
if (shift.role !== shiftSlot.role) {
|
||||
console.warn(`Attempt to add slot id=${shiftSlot.id} role=${shiftSlot.role} to shift id=${shift.id} role=${shift.role}`);
|
||||
if (shift.roleId !== shiftSlot.roleId) {
|
||||
console.warn(`Attempt to add slot id=${shiftSlot.id} roleId=${shiftSlot.roleId} to shift id=${shift.id} roleId=${shift.roleId}`);
|
||||
}
|
||||
|
||||
// Edit slot in-place if possible
|
||||
|
@ -330,7 +346,7 @@ function mergeSlot(shift: Shift, shiftSlot: ShiftSlot): Shift {
|
|||
return {
|
||||
...shift,
|
||||
slots: [...(oldSlot ? shift.slots.filter(s => s.id !== oldSlot.id) : shift.slots), {
|
||||
id: oldSlot ? oldSlot.id : `${shift.id}-${nextId}`,
|
||||
id: oldSlot ? oldSlot.id : nextId,
|
||||
assigned,
|
||||
start,
|
||||
end,
|
||||
|
@ -339,35 +355,33 @@ function mergeSlot(shift: Shift, shiftSlot: ShiftSlot): Shift {
|
|||
}
|
||||
|
||||
const shiftChanges = computed(() => {
|
||||
let eventChanges: ChangeRecord<Shift>[] = [];
|
||||
let eventChanges: Extract<ApiScheduleShift, { deleted?: false }>[] = [];
|
||||
for (const change of filterSetOps(changes.value)) {
|
||||
if (change.op === "set") {
|
||||
let { setShift, delShift } = findShift(change.data, eventChanges, schedule.value);
|
||||
if (!change.deleted) {
|
||||
let { setShift, delShift } = findShift(change, eventChanges, schedule.value);
|
||||
if (delShift && delShift !== setShift) {
|
||||
eventChanges = removeSlot(eventChanges, delShift, change.data);
|
||||
eventChanges = removeSlot(eventChanges, delShift, change);
|
||||
}
|
||||
if (!setShift) {
|
||||
setShift = {
|
||||
id: toId(change.data.name),
|
||||
name: change.data.name,
|
||||
role: change.data.role,
|
||||
id: Math.floor(Math.random() * -1000), // XXX This wont work.
|
||||
updatedAt: "",
|
||||
name: change.name,
|
||||
roleId: change.roleId,
|
||||
slots: [],
|
||||
};
|
||||
}
|
||||
setShift = {
|
||||
...setShift,
|
||||
role: change.data.role,
|
||||
roleId: change.roleId,
|
||||
}
|
||||
|
||||
eventChanges = replaceChange({
|
||||
op: "set",
|
||||
data: mergeSlot(setShift, change.data),
|
||||
}, eventChanges);
|
||||
eventChanges = replaceChange(mergeSlot(setShift, change), eventChanges);
|
||||
|
||||
} else if (change.op === "del") {
|
||||
let { delShift } = findShift(change.data, eventChanges, schedule.value);
|
||||
} else if (change.deleted) {
|
||||
let { delShift } = findShift(change, eventChanges, schedule.value);
|
||||
if (delShift) {
|
||||
eventChanges = removeSlot(eventChanges, delShift, change.data);
|
||||
eventChanges = removeSlot(eventChanges, delShift, change);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -375,20 +389,27 @@ const shiftChanges = computed(() => {
|
|||
});
|
||||
|
||||
const schedulePreview = computed(() => {
|
||||
const rota = [...schedule.value.rota ?? []]
|
||||
applyChangeArray(shiftChanges.value, rota);
|
||||
if (schedule.value.deleted) {
|
||||
throw new Error("Unexpected deleted schedule");
|
||||
}
|
||||
const shifts = [...schedule.value.shifts ?? []]
|
||||
applyUpdatesToArray(shiftChanges.value, shifts);
|
||||
return {
|
||||
...schedule.value,
|
||||
rota,
|
||||
shifts,
|
||||
};
|
||||
});
|
||||
|
||||
function removeSlot(eventChanges: ChangeRecord<Shift>[], shift: Shift, shiftSlot: ShiftSlot) {
|
||||
function removeSlot(
|
||||
eventChanges: Extract<ApiScheduleShift, { deleted?: false }>[],
|
||||
shift: Extract<ApiScheduleShift, { deleted?: false }>,
|
||||
shiftSlot: ShiftSlot,
|
||||
) {
|
||||
let oldSlot = shift.slots.find(s => s.id === shiftSlot.id);
|
||||
if (oldSlot) {
|
||||
eventChanges = replaceChange({
|
||||
op: "set",
|
||||
data: { ...shift, slots: shift.slots.filter(s => s.id !== oldSlot.id) },
|
||||
...shift,
|
||||
slots: shift.slots.filter(s => s.id !== oldSlot.id)
|
||||
}, eventChanges);
|
||||
}
|
||||
return eventChanges;
|
||||
|
@ -397,17 +418,15 @@ function removeSlot(eventChanges: ChangeRecord<Shift>[], shift: Shift, shiftSlot
|
|||
const accountStore = useAccountStore();
|
||||
const schedule = await useSchedule();
|
||||
|
||||
type ShiftSlotChange = { op: "set" | "del", data: ShiftSlot } ;
|
||||
const changes = ref<ShiftSlot[]>([]);
|
||||
const removed = computed(() => new Set(changes.value.filter(c => c.deleted).map(c => c.id)));
|
||||
|
||||
const changes = ref<ShiftSlotChange[]>([]);
|
||||
const removed = computed(() => new Set(changes.value.filter(c => c.op === "del").map(c => c.data.id)));
|
||||
|
||||
function replaceChange<T extends { op: "set" | "del", data: { id: string }}>(
|
||||
function replaceChange<T extends Entity>(
|
||||
change: T,
|
||||
changes: T[],
|
||||
) {
|
||||
const index = changes.findIndex(item => (
|
||||
item.op === change.op && item.data.id === change.data.id
|
||||
item.deleted === change.deleted && item.id === change.id
|
||||
));
|
||||
const copy = [...changes];
|
||||
if (index !== -1)
|
||||
|
@ -416,8 +435,8 @@ function replaceChange<T extends { op: "set" | "del", data: { id: string }}>(
|
|||
copy.push(change);
|
||||
return copy;
|
||||
}
|
||||
function revertChange<T extends { op: "set" | "del", data: { id: string }}>(id: string, changes: T[]) {
|
||||
return changes.filter(change => change.data.id !== id);
|
||||
function revertChange<T extends Entity>(id: number, changes: T[]) {
|
||||
return changes.filter(change => change.id !== id);
|
||||
}
|
||||
|
||||
const oneDayMs = 24 * 60 * 60 * 1000;
|
||||
|
@ -442,9 +461,9 @@ const newShiftEnd = computed({
|
|||
newShiftDuration.value = dropDay(end.diff(start)).toFormat("hh:mm");
|
||||
},
|
||||
});
|
||||
const newShiftRole = ref(props.role);
|
||||
watch(() => props.role, () => {
|
||||
newShiftRole.value = props.role;
|
||||
const newShiftRole = ref(props.roleId);
|
||||
watch(() => props.roleId, () => {
|
||||
newShiftRole.value = props.roleId;
|
||||
});
|
||||
|
||||
function endFromTime(start: DateTime, time: string) {
|
||||
|
@ -469,7 +488,7 @@ function editShiftSlot(
|
|||
end?: string,
|
||||
duration?: string,
|
||||
name?: string,
|
||||
role?: string,
|
||||
roleId?: number,
|
||||
assigned?: number[],
|
||||
}
|
||||
) {
|
||||
|
@ -482,7 +501,6 @@ function editShiftSlot(
|
|||
};
|
||||
}
|
||||
if (edits.end !== undefined) {
|
||||
|
||||
shiftSlot = {
|
||||
...shiftSlot,
|
||||
end: endFromTime(shiftSlot.start, edits.end),
|
||||
|
@ -500,19 +518,19 @@ function editShiftSlot(
|
|||
name: edits.name,
|
||||
};
|
||||
}
|
||||
if (edits.role !== undefined) {
|
||||
if (edits.roleId !== undefined) {
|
||||
let changesCopy = changes.value;
|
||||
for (const slot of shiftSlots.value) {
|
||||
if (slot.type === "slot" && slot.shift?.name === shiftSlot.name) {
|
||||
changesCopy = replaceChange({
|
||||
op: "set",
|
||||
data: { ...slot, role: edits.role }
|
||||
...slot,
|
||||
roleId: edits.roleId,
|
||||
}, changesCopy);
|
||||
}
|
||||
}
|
||||
changesCopy = replaceChange({
|
||||
op: "set",
|
||||
data: { ...shiftSlot, role: edits.role }
|
||||
...shiftSlot,
|
||||
roleId: edits.roleId,
|
||||
}, changesCopy);
|
||||
changes.value = changesCopy;
|
||||
return;
|
||||
|
@ -523,20 +541,22 @@ function editShiftSlot(
|
|||
assigned: edits.assigned,
|
||||
};
|
||||
}
|
||||
const change = { op: "set" as const, data: shiftSlot };
|
||||
changes.value = replaceChange(change, changes.value);
|
||||
changes.value = replaceChange(shiftSlot, changes.value);
|
||||
}
|
||||
function delShiftSlot(shiftSlot: ShiftSlot) {
|
||||
const change = { op: "del" as const, data: shiftSlot };
|
||||
const change = {
|
||||
...shiftSlot,
|
||||
deleted: true,
|
||||
};
|
||||
changes.value = replaceChange(change, changes.value);
|
||||
}
|
||||
function revertShiftSlot(id: string) {
|
||||
function revertShiftSlot(id: number) {
|
||||
changes.value = revertChange(id, changes.value);
|
||||
}
|
||||
function newShiftSlot(options: { start?: DateTime, end?: DateTime } = {}) {
|
||||
const name = newShiftName.value;
|
||||
const role = newShiftRole.value;
|
||||
if (!role) {
|
||||
const roleId = newShiftRole.value;
|
||||
if (!roleId) {
|
||||
alert("Invalid role");
|
||||
return;
|
||||
}
|
||||
|
@ -561,18 +581,16 @@ function newShiftSlot(options: { start?: DateTime, end?: DateTime } = {}) {
|
|||
alert("Invalid start and/or end time");
|
||||
return;
|
||||
}
|
||||
const change: ChangeRecord<ShiftSlot> = {
|
||||
op: "set" as const,
|
||||
data: {
|
||||
type: "slot",
|
||||
id: `$new-${Date.now()}`,
|
||||
name,
|
||||
origRole: role,
|
||||
role,
|
||||
assigned: [],
|
||||
start,
|
||||
end,
|
||||
},
|
||||
const change: ShiftSlot = {
|
||||
type: "slot",
|
||||
updatedAt: "",
|
||||
id: Math.floor(Math.random() * -1000), // XXX this wont work.
|
||||
name,
|
||||
origRole: roleId,
|
||||
roleId,
|
||||
assigned: [],
|
||||
start,
|
||||
end,
|
||||
};
|
||||
newShiftName.value = "";
|
||||
changes.value = replaceChange(change, changes.value);
|
||||
|
@ -581,7 +599,11 @@ async function saveShiftSlots() {
|
|||
try {
|
||||
await $fetch("/api/schedule", {
|
||||
method: "PATCH",
|
||||
body: { rota: shiftChanges.value },
|
||||
body: {
|
||||
id: 111,
|
||||
updatedAt: "",
|
||||
shifts: shiftChanges.value
|
||||
} satisfies ApiSchedule,
|
||||
});
|
||||
changes.value = [];
|
||||
} catch (err: any) {
|
||||
|
@ -601,9 +623,12 @@ function gapFormat(gap: Gap) {
|
|||
}
|
||||
|
||||
const shiftSlots = computed(() => {
|
||||
if (schedule.value.deleted) {
|
||||
throw new Error("Unexpected deleted schedule");
|
||||
}
|
||||
const data: (ShiftSlot | Gap)[] = [];
|
||||
for (const shift of schedule.value.rota ?? []) {
|
||||
if (props.role !== undefined && shift.role !== props.role)
|
||||
for (const shift of schedule.value.shifts ?? []) {
|
||||
if (shift.deleted || props.roleId !== undefined && shift.roleId !== props.roleId)
|
||||
continue;
|
||||
for (const slot of shift.slots) {
|
||||
if (props.shiftSlotFilter && !props.shiftSlotFilter(slot))
|
||||
|
@ -611,18 +636,19 @@ const shiftSlots = computed(() => {
|
|||
data.push({
|
||||
type: "slot",
|
||||
id: slot.id,
|
||||
updatedAt: "",
|
||||
shift,
|
||||
slot,
|
||||
name: shift.name,
|
||||
role: shift.role,
|
||||
roleId: shift.roleId,
|
||||
assigned: slot.assigned ?? [],
|
||||
origRole: shift.role,
|
||||
origRole: shift.roleId,
|
||||
start: DateTime.fromISO(slot.start, { zone: accountStore.activeTimezone, locale: "en-US" }),
|
||||
end: DateTime.fromISO(slot.end, { zone: accountStore.activeTimezone, locale: "en-US" }),
|
||||
});
|
||||
}
|
||||
}
|
||||
applyChangeArray(changes.value.filter(change => change.op === "set"), data as ShiftSlot[]);
|
||||
applyUpdatesToArray(changes.value.filter(c => !c.deleted), data as ShiftSlot[]);
|
||||
data.sort((a, b) => a.start.toMillis() - b.start.toMillis() || a.end.toMillis() - b.end.toMillis());
|
||||
|
||||
// Insert gaps
|
||||
|
@ -633,7 +659,7 @@ const shiftSlots = computed(() => {
|
|||
if (maxEnd < second.start.toMillis()) {
|
||||
gaps.push([index, {
|
||||
type: "gap",
|
||||
role: props.role,
|
||||
roleId: props.roleId,
|
||||
start: DateTime.fromMillis(maxEnd, { locale: "en-US" }),
|
||||
end: second.start,
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue