diff --git a/project.inlang/messages/de.json b/project.inlang/messages/de.json index 3f6d6b9..476399b 100644 --- a/project.inlang/messages/de.json +++ b/project.inlang/messages/de.json @@ -661,8 +661,8 @@ "title": "Einmalig", "description": "für Urlaub etc." }, - "REGULAR": { - "title": "Dauerhaft", + "RECURRING": { + "title": "Wiederholend", "description": "jede Woche" } } diff --git a/project.inlang/messages/en.json b/project.inlang/messages/en.json index 827970d..96f5263 100644 --- a/project.inlang/messages/en.json +++ b/project.inlang/messages/en.json @@ -669,8 +669,8 @@ "title": "One-Time", "description": "for vacation etc." }, - "REGULAR": { - "title": "Regular", + "RECURRING": { + "title": "Recurring", "description": "every week" } } diff --git a/src/lib/server/db/tenant-schema.ts b/src/lib/server/db/tenant-schema.ts index c1ca53c..dc9dc24 100644 --- a/src/lib/server/db/tenant-schema.ts +++ b/src/lib/server/db/tenant-schema.ts @@ -26,7 +26,7 @@ export const appointmentStatusEnum = pgEnum("appointment_status", [ "NO_SHOW", ]); -export const absenceTypeEnum = pgEnum("agent_absence_type", ["ONE_TIME", "REGULAR"]); +export const absenceTypeEnum = pgEnum("agent_absence_type", ["ONE_TIME", "RECURRING"]); export const notificationTypes = [ "APPOINTMENT_CONFIRMED", @@ -202,7 +202,7 @@ export const appointment = pgTable("appointment", { export const agentAbsence = pgTable("agent_absence", { /** Primary key - unique identifier */ id: uuid("id").primaryKey().defaultRandom(), - /** Enum ONE_TIME or REGULAR, defaults to ONE_TIME */ + /** Enum ONE_TIME or RECURRING, defaults to ONE_TIME */ type: absenceTypeEnum("type").notNull().default("ONE_TIME"), /** Foreign key to agent who is absent */ agentId: uuid("agent_id") @@ -216,11 +216,11 @@ export const agentAbsence = pgTable("agent_absence", { absenceType: text("absence_type").notNull().default(""), /** Optional description/reason for absence */ description: text("description"), - /** Set, when of type REGULAR: Bitmask for weekdays (1=Monday, 2=Tuesday, 4=Wednesday, etc.), is NULL by default */ + /** Set, when of type RECURRING: Bitmask for weekdays (1=Monday, 2=Tuesday, 4=Wednesday, etc.), is NULL by default */ weekdays: integer("weekdays"), - /** Set, when of type REGULAR: Start time for the regular absence */ + /** Set, when of type RECURRING: Start time for the recurring absence */ from: time("from"), - /** Set, when of type REGULAR: End time for the regular absence */ + /** Set, when of type RECURRING: End time for the recurring absence */ to: time("to"), }); diff --git a/src/lib/server/services/__tests__/agent-service.test.ts b/src/lib/server/services/__tests__/agent-service.test.ts index bdc844e..447dae6 100644 --- a/src/lib/server/services/__tests__/agent-service.test.ts +++ b/src/lib/server/services/__tests__/agent-service.test.ts @@ -747,9 +747,9 @@ describe("AgentService", () => { }); }); - it("should create regular absence successfully", async () => { + it("should create recurring absence successfully", async () => { const request: AbsenceCreationRequest = { - type: "REGULAR", + type: "RECURRING", agentId: "123e4567-e89b-12d3-a456-426614174001", startDate: "2024-01-01T08:00:00.000Z", endDate: "2024-01-01T17:00:00.000Z", @@ -833,9 +833,9 @@ describe("AgentService", () => { ).rejects.toThrow(ValidationError); }); - it("should validate regular absence from-time to be before to-time", async () => { + it("should validate recurring absence from-time to be before to-time", async () => { const invalidRequest: AbsenceCreationRequest = { - type: "REGULAR", + type: "RECURRING", agentId: "123e4567-e89b-12d3-a456-426614174001", startDate: "2024-01-01T08:00:00.000Z", endDate: "2024-01-01T17:00:00.000Z", @@ -1063,7 +1063,7 @@ describe("AgentService", () => { it("should update absence successfully", async () => { const updateData: AbsenceUpdateRequest = { - type: "REGULAR", + type: "RECURRING", absenceType: "Krankheit", description: "Away every Wed and Fri afternoon", weekdays: 8, @@ -1120,7 +1120,7 @@ describe("AgentService", () => { it("should validate update request", async () => { const invalidUpdate: AbsenceUpdateRequest = { - type: "REGULAR", + type: "RECURRING", startDate: "2024-01-01T08:00:00.000Z", endDate: "2024-01-01T17:00:00.000Z", absenceType: "Urlaub", diff --git a/src/lib/server/services/__tests__/schedule-service.test.ts b/src/lib/server/services/__tests__/schedule-service.test.ts index d0b47c1..1bf3868 100644 --- a/src/lib/server/services/__tests__/schedule-service.test.ts +++ b/src/lib/server/services/__tests__/schedule-service.test.ts @@ -837,7 +837,7 @@ describe("ScheduleService", () => { expect(channel2Schedule.availableSlots[0].from).toBe("2024-01-01T09:00:00.000Z"); }); - it("should exclude slots where an agent has a regular absence", async () => { + it("should exclude slots where an agent has a recurring absence", async () => { const validRequest: ScheduleRequest = { startDate: "2024-01-01T00:00:00.000Z", endDate: "2024-01-01T23:59:59.999Z", @@ -874,7 +874,7 @@ describe("ScheduleService", () => { const mockAbsences = [ { id: "absence1", - type: "REGULAR", + type: "RECURRING", agentId: "agent1", startDate: "2024-01-01T00:00:00.000Z", endDate: "2024-01-01T23:59:59.999Z", diff --git a/src/lib/server/services/agent-service.ts b/src/lib/server/services/agent-service.ts index 904424c..5cfdb93 100644 --- a/src/lib/server/services/agent-service.ts +++ b/src/lib/server/services/agent-service.ts @@ -34,7 +34,7 @@ const absenceCreationSchema = z.discriminatedUnion("type", [ description: z.string().optional(), }), z.object({ - type: z.literal("REGULAR"), + type: z.literal("RECURRING"), agentId: z.uuid({ message: "Invalid UUID format" }), startDate: z.string().datetime({ message: "Invalid datetime format" }), endDate: z.string().datetime({ message: "Invalid datetime format" }), @@ -55,7 +55,7 @@ const absenceUpdateSchema = z.discriminatedUnion("type", [ description: z.string().optional(), }), z.object({ - type: z.literal("REGULAR"), + type: z.literal("RECURRING"), startDate: z.string().datetime({ message: "Invalid datetime format" }).optional(), endDate: z.string().datetime({ message: "Invalid datetime format" }).optional(), absenceType: z.string().min(1).max(100).optional(), @@ -477,7 +477,7 @@ export class AgentService { } // Validate time settings - if (request.type === "REGULAR" && !isToAfterFrom(request.from, request.to)) { + if (request.type === "RECURRING" && !isToAfterFrom(request.from, request.to)) { throw new ValidationError("Impossible time setting: `to` must be after `from` time"); } @@ -507,7 +507,7 @@ export class AgentService { // Check for overlapping absences const overlappingAbsences = - request.type === "REGULAR" + request.type === "RECURRING" ? [] : await db .select() @@ -554,9 +554,9 @@ export class AgentService { endDate: new Date(request.endDate), absenceType: request.absenceType, description: request.description, - weekdays: request.type === "REGULAR" ? request.weekdays : null, - from: request.type === "REGULAR" ? request.from : null, - to: request.type === "REGULAR" ? request.to : null, + weekdays: request.type === "RECURRING" ? request.weekdays : null, + from: request.type === "RECURRING" ? request.from : null, + to: request.type === "RECURRING" ? request.to : null, }) .returning(); @@ -809,7 +809,7 @@ export class AgentService { } // Validate time settings - if (updateData.type === "REGULAR" && !isToAfterFrom(updateData.from, updateData.to)) { + if (updateData.type === "RECURRING" && !isToAfterFrom(updateData.from, updateData.to)) { throw new ValidationError("Impossible time setting: `to` must be after `from` time"); } @@ -844,7 +844,7 @@ export class AgentService { // Check for overlapping absences (excluding current absence) const overlappingAbsences = - updateData.type === "REGULAR" + updateData.type === "RECURRING" ? [] : await db .select() diff --git a/src/lib/server/services/schedule-service.ts b/src/lib/server/services/schedule-service.ts index d811f71..c22e099 100644 --- a/src/lib/server/services/schedule-service.ts +++ b/src/lib/server/services/schedule-service.ts @@ -495,7 +495,7 @@ export class ScheduleService { case "ONE_TIME": { return slotStartsDuringAbsence || slotEndsDuringAbsence || slotCoversEntireAbsence; } - case "REGULAR": { + case "RECURRING": { return ( (slotStartsDuringAbsence || slotEndsDuringAbsence || slotCoversEntireAbsence) && isWithin(slotStart, slotEnd, absence.weekdays, absence.from, absence.to, timeZone) diff --git a/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/add-absence-form.svelte b/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/add-absence-form.svelte index 3b523de..e075f6e 100644 --- a/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/add-absence-form.svelte +++ b/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/add-absence-form.svelte @@ -102,7 +102,7 @@ bind:value={$formData.type} options={Object.values(types)} onValueChange={(v) => { - if (v === "REGULAR") { + if (v === "RECURRING") { isAllDay = true; $formData.absenceType = "OTHER"; $formData.weekdays = 0; @@ -145,7 +145,7 @@ - + {#snippet children({ props })} {m["absences.add.fields.absenceType.title"]()} @@ -179,9 +179,9 @@ setTimeout(() => (endDateTouched = false), 100); } }} - class={cn("mt-2 mb-1", $formData.type === "REGULAR" ? "hidden" : "")} + class={cn("mt-2 mb-1", $formData.type === "RECURRING" ? "hidden" : "")} /> -
+
{#snippet children({ props })} @@ -231,7 +231,7 @@
- {#if $formData.type === "REGULAR"} + {#if $formData.type === "RECURRING"} {#snippet children({ props })} diff --git a/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/schema.ts b/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/schema.ts index d6644f1..c3a0e2a 100644 --- a/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/schema.ts +++ b/src/routes/(pages)/dashboard/absences/(components)/add-absence-form/schema.ts @@ -4,7 +4,7 @@ import { z } from "zod"; export const formSchema = z .object({ - type: z.enum(["ONE_TIME", "REGULAR"]), + type: z.enum(["ONE_TIME", "RECURRING"]), agent: z.string().uuid({ message: m["form.errors.noAgentsSelected"]() }), absenceType: z.string().min(1).max(100), description: z.string().optional(), @@ -21,7 +21,7 @@ export const formSchema = z .optional(), }) .superRefine((data, ctx) => { - if (data.type === "REGULAR") { + if (data.type === "RECURRING") { if (data.weekdays == null || data.weekdays === 0) { ctx.addIssue({ code: "custom", diff --git a/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/edit-absence-form.svelte b/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/edit-absence-form.svelte index b696806..f52c617 100644 --- a/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/edit-absence-form.svelte +++ b/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/edit-absence-form.svelte @@ -109,7 +109,7 @@ bind:value={$formData.type} options={Object.values(types)} onValueChange={(v) => { - if (v === "REGULAR") { + if (v === "RECURRING") { isAllDay = true; $formData.absenceType = "OTHER"; $formData.weekdays = 0; @@ -153,7 +153,7 @@ - + {#snippet children({ props })} {m["absences.add.fields.absenceType.title"]()} @@ -187,9 +187,9 @@ setTimeout(() => (endDateTouched = false), 100); } }} - class={cn("mt-2 mb-1", $formData.type === "REGULAR" ? "hidden" : "")} + class={cn("mt-2 mb-1", $formData.type === "RECURRING" ? "hidden" : "")} /> -
+
{#snippet children({ props })} @@ -239,7 +239,7 @@
- {#if $formData.type === "REGULAR"} + {#if $formData.type === "RECURRING"} {#snippet children({ props })} diff --git a/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/schema.ts b/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/schema.ts index ef8a918..d2de88a 100644 --- a/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/schema.ts +++ b/src/routes/(pages)/dashboard/absences/(components)/edit-absence-form/schema.ts @@ -5,7 +5,7 @@ import { z } from "zod"; export const formSchema = z .object({ id: z.string(), - type: z.enum(["ONE_TIME", "REGULAR"]), + type: z.enum(["ONE_TIME", "RECURRING"]), agent: z.string().uuid({ message: m["form.errors.noAgentsSelected"]() }), absenceType: z.string().min(1).max(100), description: z.string().optional(), @@ -22,7 +22,7 @@ export const formSchema = z .nullable(), }) .superRefine((data, ctx) => { - if (data.type === "REGULAR") { + if (data.type === "RECURRING") { if (data.weekdays == null || data.weekdays === 0) { ctx.addIssue({ code: "custom", diff --git a/src/routes/(pages)/dashboard/absences/(components)/utils.ts b/src/routes/(pages)/dashboard/absences/(components)/utils.ts index a6f5e11..a710fc6 100644 --- a/src/routes/(pages)/dashboard/absences/(components)/utils.ts +++ b/src/routes/(pages)/dashboard/absences/(components)/utils.ts @@ -17,10 +17,10 @@ export const types = { title: m["absences.types.ONE_TIME.title"](), description: m["absences.types.ONE_TIME.description"](), }, - REGULAR: { + RECURRING: { icon: RefreshCw, - value: "REGULAR", - title: m["absences.types.REGULAR.title"](), - description: m["absences.types.REGULAR.description"](), + value: "RECURRING", + title: m["absences.types.RECURRING.title"](), + description: m["absences.types.RECURRING.description"](), }, }; diff --git a/src/routes/(pages)/dashboard/absences/+page.svelte b/src/routes/(pages)/dashboard/absences/+page.svelte index c6b65c8..d86c949 100644 --- a/src/routes/(pages)/dashboard/absences/+page.svelte +++ b/src/routes/(pages)/dashboard/absences/+page.svelte @@ -84,7 +84,7 @@ title={agent?.name || item.agentId} image={agent?.image || UnknownItemIcon} description={renderDescription(item)} - icons={item.type === "REGULAR" ? [RefreshCw] : []} + icons={item.type === "RECURRING" ? [RefreshCw] : []} actions={[ { type: "action", diff --git a/src/routes/(pages)/dashboard/absences/utils.ts b/src/routes/(pages)/dashboard/absences/utils.ts index 7e83a5c..72d9bd3 100644 --- a/src/routes/(pages)/dashboard/absences/utils.ts +++ b/src/routes/(pages)/dashboard/absences/utils.ts @@ -10,8 +10,8 @@ import { getLocalTimeZone } from "@internationalized/date"; export const renderAbsenceTimespan = (item: TAbsence) => { if (item.type === "ONE_TIME") { return renderOneTimeAbsenceTimespan(item); - } else if (item.type === "REGULAR") { - return renderRegularAbsenceTimespan(item); + } else if (item.type === "RECURRING") { + return renderRecurringAbsenceTimespan(item); } else { return ""; } @@ -48,7 +48,7 @@ export const renderOneTimeAbsenceTimespan = (item: TAbsence) => { } }; -export const renderRegularAbsenceTimespan = (item: TAbsence) => { +export const renderRecurringAbsenceTimespan = (item: TAbsence) => { if (!item.from || !item.to) { return ""; } diff --git a/src/routes/api/tenants/[id]/agents/[agentId]/absences/+server.ts b/src/routes/api/tenants/[id]/agents/[agentId]/absences/+server.ts index ac93422..751b06d 100644 --- a/src/routes/api/tenants/[id]/agents/[agentId]/absences/+server.ts +++ b/src/routes/api/tenants/[id]/agents/[agentId]/absences/+server.ts @@ -37,7 +37,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "POST", { properties: { type: { type: "string", - enum: ["ONE_TIME", "REGULAR"], + enum: ["ONE_TIME", "RECURRING"], description: "Type of absence", example: "ONE_TIME", }, @@ -67,19 +67,19 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "POST", { weekdays: { type: "integer", description: - "Bitmask representing weekdays for regular absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for REGULAR absences.", + "Bitmask representing weekdays for recurring absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for RECURRING absences.", example: 62, }, from: { type: "string", format: "time", - description: "Start time for REGULAR absences", + description: "Start time for RECURRING absences", example: "09:00:00", }, to: { type: "string", format: "time", - description: "End time for REGULAR absences", + description: "End time for RECURRING absences", example: "17:00:00", }, }, @@ -103,7 +103,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "POST", { id: { type: "string", format: "uuid", description: "Absence ID" }, type: { type: "string", - enum: ["ONE_TIME", "REGULAR"], + enum: ["ONE_TIME", "RECURRING"], description: "Type of absence", }, agentId: { type: "string", format: "uuid", description: "Agent ID" }, @@ -114,17 +114,17 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "POST", { weekdays: { type: "integer", description: - "Bitmask representing weekdays for regular absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for REGULAR absences.", + "Bitmask representing weekdays for recurring absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for RECURRING absences.", }, from: { type: "string", format: "time", - description: "Start time for REGULAR absences", + description: "Start time for RECURRING absences", }, to: { type: "string", format: "time", - description: "End time for REGULAR absences", + description: "End time for RECURRING absences", }, }, required: ["id", "type", "agentId", "startDate", "endDate", "absenceType"], @@ -238,7 +238,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "GET", { id: { type: "string", format: "uuid", description: "Absence ID" }, type: { type: "string", - enum: ["ONE_TIME", "REGULAR"], + enum: ["ONE_TIME", "RECURRING"], description: "Type of absence", }, agentId: { type: "string", format: "uuid", description: "Agent ID" }, @@ -249,17 +249,17 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences", "GET", { weekdays: { type: "integer", description: - "Bitmask representing weekdays for regular absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for REGULAR absences.", + "Bitmask representing weekdays for recurring absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for RECURRING absences.", }, from: { type: "string", format: "time", - description: "Start time for REGULAR absences", + description: "Start time for RECURRING absences", }, to: { type: "string", format: "time", - description: "End time for REGULAR absences", + description: "End time for RECURRING absences", }, }, required: ["id", "type", "agentId", "startDate", "endDate", "absenceType"], diff --git a/src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts b/src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts index b22181d..bc666b9 100644 --- a/src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts +++ b/src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts @@ -55,7 +55,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences/{absenceId}", "GET id: { type: "string", format: "uuid", description: "Absence ID" }, type: { type: "string", - enum: ["ONE_TIME", "REGULAR"], + enum: ["ONE_TIME", "RECURRING"], description: "Type of absence", }, agentId: { type: "string", format: "uuid", description: "Agent ID" }, @@ -66,17 +66,17 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences/{absenceId}", "GET weekdays: { type: "integer", description: - "Bitmask representing weekdays for regular absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for REGULAR absences.", + "Bitmask representing weekdays for recurring absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for RECURRING absences.", }, from: { type: "string", format: "time", - description: "Start time for REGULAR absences", + description: "Start time for RECURRING absences", }, to: { type: "string", format: "time", - description: "End time for REGULAR absences", + description: "End time for RECURRING absences", }, }, required: ["id", "type", "agentId", "startDate", "endDate", "absenceType"], @@ -201,7 +201,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences/{absenceId}", "PUT id: { type: "string", format: "uuid", description: "Absence ID" }, type: { type: "string", - enum: ["ONE_TIME", "REGULAR"], + enum: ["ONE_TIME", "RECURRING"], description: "Type of absence", }, agentId: { type: "string", format: "uuid", description: "Agent ID" }, @@ -212,17 +212,17 @@ registerOpenAPIRoute("/tenants/{id}/agents/{agentId}/absences/{absenceId}", "PUT weekdays: { type: "integer", description: - "Bitmask representing weekdays for regular absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for REGULAR absences.", + "Bitmask representing weekdays for recurring absences (0 = Sunday, 1 = Monday, ..., 6 = Saturday). Only applicable for RECURRING absences.", }, from: { type: "string", format: "time", - description: "Start time for REGULAR absences", + description: "Start time for RECURRING absences", }, to: { type: "string", format: "time", - description: "End time for REGULAR absences", + description: "End time for RECURRING absences", }, }, required: ["id", "type", "agentId", "startDate", "endDate", "absenceType"], diff --git a/src/routes/api/tenants/[id]/agents/absences/+server.ts b/src/routes/api/tenants/[id]/agents/absences/+server.ts index 3f459b9..fd3550e 100644 --- a/src/routes/api/tenants/[id]/agents/absences/+server.ts +++ b/src/routes/api/tenants/[id]/agents/absences/+server.ts @@ -51,7 +51,7 @@ registerOpenAPIRoute("/tenants/{id}/agents/absences", "GET", { id: { type: "string", format: "uuid", description: "Absence ID" }, type: { type: "string", - enum: ["REGULAR", "ONE_TIME"], + enum: ["RECURRING", "ONE_TIME"], description: "Type of absence", }, agentId: { type: "string", format: "uuid", description: "Agent ID" }, @@ -61,17 +61,17 @@ registerOpenAPIRoute("/tenants/{id}/agents/absences", "GET", { description: { type: "string", description: "Description" }, weekdays: { type: "integer", - description: "Weekdays bitmask for regular absences", + description: "Weekdays bitmask for recurring absences", }, from: { type: "string", format: "time", - description: "Start time for regular absences", + description: "Start time for recurring absences", }, to: { type: "string", format: "time", - description: "End time for regular absences", + description: "End time for recurring absences", }, }, required: [ diff --git a/tenant-migrations/0017_optimal_professor_monster.sql b/tenant-migrations/0017_optimal_professor_monster.sql index 1ab9eb2..fc82a8b 100644 --- a/tenant-migrations/0017_optimal_professor_monster.sql +++ b/tenant-migrations/0017_optimal_professor_monster.sql @@ -1,4 +1,4 @@ -CREATE TYPE "public"."absence_type" AS ENUM('ONE_TIME', 'REGULAR');--> statement-breakpoint +CREATE TYPE "public"."absence_type" AS ENUM('ONE_TIME', 'RECURRING');--> statement-breakpoint ALTER TABLE "agent_absence" ADD COLUMN "type" "absence_type" DEFAULT 'ONE_TIME' NOT NULL;--> statement-breakpoint ALTER TABLE "agent_absence" ADD COLUMN "weekdays" integer;--> statement-breakpoint ALTER TABLE "agent_absence" ADD COLUMN "from" time;--> statement-breakpoint diff --git a/tenant-migrations/meta/0017_snapshot.json b/tenant-migrations/meta/0017_snapshot.json index 7a0c045..28a44f3 100644 --- a/tenant-migrations/meta/0017_snapshot.json +++ b/tenant-migrations/meta/0017_snapshot.json @@ -994,7 +994,7 @@ "public.agent_absence_type": { "name": "agent_absence_type", "schema": "public", - "values": ["ONE_TIME", "REGULAR"] + "values": ["ONE_TIME", "RECURRING"] }, "public.appointment_status": { "name": "appointment_status",