Move toId to shared/utils/functions.ts

This commit is contained in:
Hornwitser 2025-03-15 13:46:13 +01:00
parent 02be8a37a5
commit 262a691ed6
4 changed files with 8 additions and 13 deletions

View file

@ -90,15 +90,12 @@
<script lang="ts" setup>
import type { ChangeRecord, ScheduleLocation } from '~/shared/types/schedule';
import { applyChangeArray } from '~/shared/utils/changes';
import { toId } from '~/shared/utils/functions';
defineProps<{
edit?: boolean
}>();
function toId(name: string) {
return name.toLowerCase().replace(/ /g, "-");
}
const schedule = await useSchedule();
const changes = ref<ChangeRecord<ScheduleLocation>[]>([]);