diff --git a/README.md b/README.md index cb07b75..318bf1f 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,9 @@ End-to-end encrypted appointment booking platform ## Local development +- Create your own local `.env` file. You can base it on [.env.example](./.env.example) - `npm install` - `npm run docker:dev:up` -- `npm run db:migrate` -- `npm run db:push` - `npm run dev` ## Funding diff --git a/src/lib/server/services/channel-service.ts b/src/lib/server/services/channel-service.ts index 43e43ed..c31cd43 100644 --- a/src/lib/server/services/channel-service.ts +++ b/src/lib/server/services/channel-service.ts @@ -12,7 +12,6 @@ const CHANNEL_COLORS = ["#FF0000", "#00FF00", "#0000FF"] as const; const NEXT_COLOR_KEY = "nextChannelColor"; const slotTemplateSchema = z.object({ - name: z.string().min(1).max(100), weekdays: z.number().int().min(0).max(127).optional(), from: z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/), to: z.string().regex(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]$/), diff --git a/src/routes/(pages)/dashboard/channels/(components)/add-channel-form/add-channel-form.svelte b/src/routes/(pages)/dashboard/channels/(components)/add-channel-form/add-channel-form.svelte index cc24591..3164909 100644 --- a/src/routes/(pages)/dashboard/channels/(components)/add-channel-form/add-channel-form.svelte +++ b/src/routes/(pages)/dashboard/channels/(components)/add-channel-form/add-channel-form.svelte @@ -15,7 +15,7 @@ import { get } from "svelte/store"; import { superForm } from "sveltekit-superforms"; import { zodClient } from "sveltekit-superforms/adapters"; - import { generateSlotTemplate } from "../utils"; + import { DEFAULT_SLOT_TEMPLATE } from "../utils"; import { formSchema } from "./schema"; let { done }: { done: () => void } = $props(); @@ -35,7 +35,7 @@ agentIds: [] as string[], isPublic: true, requiresConfirmation: false, - slotTemplates: [generateSlotTemplate(0)], + slotTemplates: [DEFAULT_SLOT_TEMPLATE], }, { dataType: "json", @@ -58,10 +58,7 @@ const { form: formData, enhance } = form; const onAddSlotTemplate = () => { - $formData.slotTemplates = [ - ...$formData.slotTemplates, - generateSlotTemplate($formData.slotTemplates.length), - ]; + $formData.slotTemplates = [...$formData.slotTemplates, DEFAULT_SLOT_TEMPLATE]; }; const onRemoveSlotTemplate = (index: number) => { @@ -166,7 +163,8 @@ {m["channels.add.fields.slotTemplates.description"]()}