Move toId to shared/utils/functions.ts
This commit is contained in:
parent
02be8a37a5
commit
262a691ed6
4 changed files with 8 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
|||
import { Account } from "~/shared/types/account";
|
||||
import { Role, Schedule, Shift, ShiftSlot, TimeSlot } from "~/shared/types/schedule";
|
||||
import { toId } from "~/shared/utils/functions";
|
||||
|
||||
const locations = [
|
||||
{
|
||||
|
@ -184,10 +185,6 @@ const rota = [
|
|||
},
|
||||
]
|
||||
|
||||
function toId(name: string) {
|
||||
return name.toLowerCase().replace(/ /g, "-");
|
||||
}
|
||||
|
||||
function toIso(date: Date) {
|
||||
return date.toISOString().replace(":00.000Z", "Z");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue