Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82f1e3856f | |||
| 526251b63a | |||
| 3aa7631519 | |||
| 511bdf0d7d | |||
| de3877b28d | |||
| 7d3adeae98 | |||
| 1fbe670751 | |||
| f265d61475 | |||
| 7d8d7535a5 | |||
| cc0259975b | |||
| bddbf008b5 | |||
| acb65fa5bb |
@@ -235,6 +235,23 @@ GroomBook is an open-source, self-hostable pet grooming business management & CR
|
||||
| TC-APP-4.20.5 | Unread indicator | 1. Client sends a new message | Thread marked unread until staff views it |
|
||||
| TC-APP-4.20.6 | Cross-tenant isolation | 1. Staff from Business A attempts to read Business B conversations | 403 or empty response returned |
|
||||
|
||||
|
||||
### 4.21 SMS Consent (STOP/HELP Keyword Handler)
|
||||
|
||||
| # | Scenario | Steps | Expected |
|
||||
|---|----------|-------|----------|
|
||||
| TC-APP-4.21.1 | STOP → unsubscribe + auto-reply | 1. Send `STOP` (case-insensitive, with whitespace) from a subscribed client's phone number | Client is opted out (`smsOptIn=false`, `smsOptOutDate` set), event is logged, user receives auto-reply: "You have been unsubscribed and will no longer receive messages. Reply START to resubscribe." |
|
||||
| TC-APP-4.21.2 | START → resubscribe + auto-reply | 1. Send `START` (case-insensitive) from an opted-out client's phone number | Client is opted back in (`smsOptIn=true`, `smsConsentDate` updated, `smsOptOutDate` cleared), event is logged, user receives auto-reply: "You have been resubscribed to messages. Reply STOP to unsubscribe. Msg & data rates may apply." |
|
||||
| TC-APP-4.21.3 | HELP → no opt-in change + default reply | 1. Send `HELP` (case-insensitive) from any client's phone number | No change to opt-in state, no database update, event is logged, user receives auto-reply: "Reply STOP to unsubscribe or START to resubscribe. For help, contact your groomer directly." |
|
||||
| TC-APP-4.21.4 | STOPALL / UNSUBSCRIBE / CANCEL / END / QUIT → opt-out | 1. Send each alias from a subscribed client's phone | Same behaviour as STOP: opt-out applied, correct reply sent |
|
||||
| TC-APP-4.21.5 | UNSTOP / YES / SUBSCRIBE → opt-in | 1. Send each alias from an opted-out client's phone | Same behaviour as START: opt-in applied, correct reply sent |
|
||||
| TC-APP-4.21.6 | INFO → help reply | 1. Send `INFO` from any client's phone | Same behaviour as HELP: no state change, help reply returned |
|
||||
| TC-APP-4.21.7 | Double STOP (idempotency) | 1. Send `STOP` from an already-opted-out client | Event is logged, no update call made, idempotent — no duplicate update |
|
||||
| TC-APP-4.21.8 | Double START (idempotency) | 1. Send `START` from an already-subscribed client | Event is logged, no update call made, idempotent — no duplicate update |
|
||||
| TC-APP-4.21.9 | Case insensitivity | 1. Send `stop`, `Stop`, `sToP`, ` stop ` from subscribed client | All variants are detected and handled as opt-out |
|
||||
| TC-APP-4.21.10 | Whitespace trimming | 1. Send ` START ` or `\tSTOP\n` | Keywords are trimmed before matching |
|
||||
| TC-APP-4.21.11 | Non-keyword messages ignored | 1. Send `STOP IT`, `help me`, `hello` | Returns null from `detectKeyword`, no consent event inserted, no reply sent |
|
||||
| TC-APP-4.21.12 | Consent event audit log | 1. After any keyword, query `messageConsentEvents` table | Record exists with correct `clientId`, `businessId`, `kind`, and `source: "sms_keyword"` |
|
||||
## 5. Pass/Fail Criteria
|
||||
|
||||
**Pass:** All test cases execute without errors. Expected results match actual results. No regressions are observed. All functionality works as documented.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { eq, and, gt, gte, lt, ne, or, asc } from "@groombook/db";
|
||||
import { eq, and, gt, or, asc } from "@groombook/db";
|
||||
import { appointments, clients, pets, services, staff, type Db } from "@groombook/db";
|
||||
import { resolveBufferMinutes } from "./buffer.js";
|
||||
import { sendEmail, buildRescheduleNotificationEmail } from "../services/email.js";
|
||||
@@ -53,12 +53,12 @@ export async function detectAndCascadeOverrun({
|
||||
db,
|
||||
overrunningAppointmentId,
|
||||
newEndTime,
|
||||
originalEndTime,
|
||||
_originalEndTime,
|
||||
}: {
|
||||
db: Db;
|
||||
overrunningAppointmentId: string;
|
||||
newEndTime: Date;
|
||||
originalEndTime: Date;
|
||||
_originalEndTime: Date;
|
||||
}): Promise<CascadeResult> {
|
||||
const result: CascadeResult = { shifted: [], flaggedForReview: [] };
|
||||
|
||||
@@ -178,16 +178,16 @@ export async function detectAndCascadeOverrun({
|
||||
export function isOverrun({
|
||||
originalEndTime,
|
||||
newEndTime,
|
||||
originalStartTime,
|
||||
newStartTime,
|
||||
_originalStartTime,
|
||||
_newStartTime,
|
||||
status,
|
||||
currentTime,
|
||||
bufferMinutes,
|
||||
}: {
|
||||
originalEndTime: Date;
|
||||
newEndTime: Date;
|
||||
originalStartTime: Date;
|
||||
newStartTime?: Date;
|
||||
_originalStartTime: Date;
|
||||
_newStartTime?: Date;
|
||||
status: string;
|
||||
currentTime: Date;
|
||||
bufferMinutes: number;
|
||||
|
||||
@@ -700,7 +700,7 @@ appointmentsRouter.patch(
|
||||
isOverrun({
|
||||
originalEndTime,
|
||||
newEndTime: new Date(updateFields.endTime),
|
||||
originalStartTime: row.startTime,
|
||||
_originalStartTime: row.startTime,
|
||||
status: row.status,
|
||||
currentTime: new Date(),
|
||||
bufferMinutes: row.bufferMinutes ?? 0,
|
||||
@@ -710,7 +710,7 @@ appointmentsRouter.patch(
|
||||
db,
|
||||
overrunningAppointmentId: id,
|
||||
newEndTime: new Date(updateFields.endTime),
|
||||
originalEndTime,
|
||||
_originalEndTime: originalEndTime,
|
||||
});
|
||||
return c.json({ ...row, cascade: cascadeResult });
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ bookRouter.get("/availability", async (c) => {
|
||||
const serviceId = c.req.query("serviceId");
|
||||
const dateStr = c.req.query("date");
|
||||
const petSizeCategory = c.req.query("petSizeCategory") ?? undefined;
|
||||
const petCoatType = c.req.query("petCoatType") ?? undefined;
|
||||
|
||||
if (!serviceId || !dateStr) {
|
||||
return c.json({ error: "serviceId and date are required" }, 400);
|
||||
@@ -61,7 +60,7 @@ bookRouter.get("/availability", async (c) => {
|
||||
if (!service) return c.json({ error: "Service not found" }, 404);
|
||||
|
||||
// Buffer-aware duration: extra time for large/x-large or complex coats
|
||||
const extraBuffer = (petSizeCategory === "large" || petSizeCategory === "x-large")
|
||||
const extraBuffer = (petSizeCategory === "large" || petSizeCategory === "xlarge")
|
||||
? (service.defaultBufferMinutes ?? 0)
|
||||
: 0;
|
||||
const durationMinutes = service.durationMinutes + extraBuffer;
|
||||
@@ -121,7 +120,7 @@ const bookingSchema = z.object({
|
||||
petSpecies: z.string().min(1).max(100),
|
||||
petBreed: z.string().max(100).optional(),
|
||||
petSizeCategory: z
|
||||
.enum(["small", "medium", "large", "x-large"])
|
||||
.enum(["small", "medium", "large", "xlarge"])
|
||||
.optional(),
|
||||
petCoatType: z
|
||||
.enum(["smooth", "double", "curly", "wire", "long", "hairless"])
|
||||
@@ -213,7 +212,7 @@ bookRouter.post(
|
||||
if (!pet) return c.json({ error: "Failed to create pet" }, 500);
|
||||
|
||||
// Buffer-aware end time: large/x-large pets add service bufferMinutes
|
||||
if (body.petSizeCategory === "large" || body.petSizeCategory === "x-large") {
|
||||
if (body.petSizeCategory === "large" || body.petSizeCategory === "xlarge") {
|
||||
end = new Date(start.getTime() + (service.durationMinutes + (service.defaultBufferMinutes ?? 0)) * 60_000);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
import { describe, it, expect, vi, beforeEach } from "vitest";
|
||||
import { detectKeyword } from "../consent.js";
|
||||
|
||||
const mockDb = {
|
||||
insert: vi.fn(),
|
||||
update: vi.fn(),
|
||||
select: vi.fn(),
|
||||
};
|
||||
|
||||
vi.mock("@groombook/db", () => ({
|
||||
getDb: () => mockDb,
|
||||
clients: {},
|
||||
messageConsentEvents: {},
|
||||
businessSettings: {},
|
||||
eq: vi.fn(),
|
||||
}));
|
||||
|
||||
const { handleConsentKeyword } = await import("../consent.js");
|
||||
|
||||
describe("detectKeyword", () => {
|
||||
it.each([
|
||||
["STOP", "opt_out"],
|
||||
["STOPALL", "opt_out"],
|
||||
["UNSUBSCRIBE", "opt_out"],
|
||||
["CANCEL", "opt_out"],
|
||||
["END", "opt_out"],
|
||||
["QUIT", "opt_out"],
|
||||
])("opt-out keyword %s → opt_out", (keyword, expected) => {
|
||||
expect(detectKeyword(keyword)).toEqual({ kind: expected });
|
||||
});
|
||||
|
||||
it.each([
|
||||
["START", "opt_in"],
|
||||
["UNSTOP", "opt_in"],
|
||||
["YES", "opt_in"],
|
||||
["SUBSCRIBE", "opt_in"],
|
||||
])("opt-in keyword %s → opt_in", (keyword, expected) => {
|
||||
expect(detectKeyword(keyword)).toEqual({ kind: expected });
|
||||
});
|
||||
|
||||
it.each([
|
||||
["HELP", "help"],
|
||||
["INFO", "help"],
|
||||
])("help keyword %s → help", (keyword, expected) => {
|
||||
expect(detectKeyword(keyword)).toEqual({ kind: expected });
|
||||
});
|
||||
|
||||
it("is case insensitive", () => {
|
||||
expect(detectKeyword("stop")).toEqual({ kind: "opt_out" });
|
||||
expect(detectKeyword("Stop")).toEqual({ kind: "opt_out" });
|
||||
expect(detectKeyword("sToP")).toEqual({ kind: "opt_out" });
|
||||
});
|
||||
|
||||
it("trims whitespace", () => {
|
||||
expect(detectKeyword(" STOP ")).toEqual({ kind: "opt_out" });
|
||||
expect(detectKeyword("\tSTART\n")).toEqual({ kind: "opt_in" });
|
||||
});
|
||||
|
||||
it("returns null for non-keyword messages", () => {
|
||||
expect(detectKeyword("hello")).toBeNull();
|
||||
expect(detectKeyword("STOP IT")).toBeNull();
|
||||
expect(detectKeyword("help me")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("handleConsentKeyword", () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
mockDb.insert.mockReturnValue({
|
||||
values: vi.fn().mockResolvedValue([{ id: "event-1" }]),
|
||||
} as any);
|
||||
mockDb.update.mockReturnValue({
|
||||
set: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockResolvedValue([]),
|
||||
}),
|
||||
} as any);
|
||||
});
|
||||
|
||||
const baseOpts = {
|
||||
clientId: "client-1",
|
||||
businessId: "biz-1",
|
||||
db: mockDb as unknown as ReturnType<typeof import("@groombook/db").getDb>,
|
||||
};
|
||||
|
||||
describe("opt_out", () => {
|
||||
it("inserts consent event with sms_keyword source", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: true }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_out" });
|
||||
|
||||
expect(mockDb.insert).toHaveBeenCalledOnce();
|
||||
});
|
||||
|
||||
it("sets smsOptIn=false and smsOptOutDate when currently opted in", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: true }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_out" });
|
||||
|
||||
expect(mockDb.update).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("is idempotent — second opt-out logs event but skips client update", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: false }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_out" });
|
||||
|
||||
expect(mockDb.update).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns unsubscribe reply text", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: true }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
const result = await handleConsentKeyword({ ...baseOpts, kind: "opt_out" });
|
||||
expect(result.replyText).toBe(
|
||||
"You have been unsubscribed and will no longer receive messages. Reply START to resubscribe."
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("opt_in", () => {
|
||||
it("sets smsOptIn=true and smsConsentDate when currently opted out", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: false, smsConsentDate: null }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_in" });
|
||||
|
||||
expect(mockDb.update).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("clears smsOptOutDate on opt-in after opt-out", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: false }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_in" });
|
||||
|
||||
expect(mockDb.update).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("is idempotent — second opt-in skips client update", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: true }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
await handleConsentKeyword({ ...baseOpts, kind: "opt_in" });
|
||||
|
||||
expect(mockDb.update).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("returns resubscribe reply text", async () => {
|
||||
mockDb.select.mockReturnValue({
|
||||
from: vi.fn().mockReturnValue({
|
||||
where: vi.fn().mockReturnValue({
|
||||
limit: vi.fn().mockResolvedValue([{ smsOptIn: false }]),
|
||||
}),
|
||||
}),
|
||||
} as any);
|
||||
|
||||
const result = await handleConsentKeyword({ ...baseOpts, kind: "opt_in" });
|
||||
expect(result.replyText).toBe(
|
||||
"You have been resubscribed to messages. Reply STOP to unsubscribe. Msg & data rates may apply."
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("help", () => {
|
||||
it("returns default help reply without querying businessSettings", async () => {
|
||||
const result = await handleConsentKeyword({ ...baseOpts, kind: "help" });
|
||||
|
||||
expect(mockDb.update).not.toHaveBeenCalled();
|
||||
expect(mockDb.select).not.toHaveBeenCalled();
|
||||
expect(result.replyText).toBe(
|
||||
"Reply STOP to unsubscribe or START to resubscribe. For help, contact your groomer directly."
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,77 @@
|
||||
import { clients, messageConsentEvents, eq } from "@groombook/db";
|
||||
import type { Db } from "@groombook/db";
|
||||
|
||||
export type KeywordKind = "opt_in" | "opt_out" | "help";
|
||||
|
||||
const OPT_OUT_KEYWORDS = new Set(["STOP", "STOPALL", "UNSUBSCRIBE", "CANCEL", "END", "QUIT"]);
|
||||
const OPT_IN_KEYWORDS = new Set(["START", "UNSTOP", "YES", "SUBSCRIBE"]);
|
||||
const HELP_KEYWORDS = new Set(["HELP", "INFO"]);
|
||||
|
||||
export function detectKeyword(body: string): { kind: KeywordKind } | null {
|
||||
const normalized = body.trim().toUpperCase();
|
||||
if (OPT_OUT_KEYWORDS.has(normalized)) return { kind: "opt_out" };
|
||||
if (OPT_IN_KEYWORDS.has(normalized)) return { kind: "opt_in" };
|
||||
if (HELP_KEYWORDS.has(normalized)) return { kind: "help" };
|
||||
return null;
|
||||
}
|
||||
|
||||
export async function handleConsentKeyword(opts: {
|
||||
clientId: string;
|
||||
businessId: string;
|
||||
kind: KeywordKind;
|
||||
db: Db;
|
||||
}): Promise<{ replyText: string }> {
|
||||
const { clientId, businessId, kind, db: database } = opts;
|
||||
|
||||
await database.insert(messageConsentEvents).values({
|
||||
clientId,
|
||||
businessId,
|
||||
kind,
|
||||
source: "sms_keyword",
|
||||
});
|
||||
|
||||
if (kind === "opt_out") {
|
||||
const [existing] = await database
|
||||
.select({ smsOptIn: clients.smsOptIn })
|
||||
.from(clients)
|
||||
.where(eq(clients.id, clientId))
|
||||
.limit(1);
|
||||
|
||||
if (existing?.smsOptIn !== false) {
|
||||
await database
|
||||
.update(clients)
|
||||
.set({ smsOptIn: false, smsOptOutDate: new Date() })
|
||||
.where(eq(clients.id, clientId));
|
||||
}
|
||||
|
||||
return {
|
||||
replyText: "You have been unsubscribed and will no longer receive messages. Reply START to resubscribe.",
|
||||
};
|
||||
}
|
||||
|
||||
if (kind === "opt_in") {
|
||||
const [existing] = await database
|
||||
.select({ smsOptIn: clients.smsOptIn, smsConsentDate: clients.smsConsentDate })
|
||||
.from(clients)
|
||||
.where(eq(clients.id, clientId))
|
||||
.limit(1);
|
||||
|
||||
if (existing?.smsOptIn !== true) {
|
||||
await database
|
||||
.update(clients)
|
||||
.set({ smsOptIn: true, smsConsentDate: new Date(), smsOptOutDate: null })
|
||||
.where(eq(clients.id, clientId));
|
||||
}
|
||||
|
||||
return {
|
||||
replyText:
|
||||
"You have been resubscribed to messages. Reply STOP to unsubscribe. Msg & data rates may apply.",
|
||||
};
|
||||
}
|
||||
|
||||
// kind === "help"
|
||||
const replyText =
|
||||
"Reply STOP to unsubscribe or START to resubscribe. For help, contact your groomer directly.";
|
||||
|
||||
return { replyText };
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
import { getDb, conversations, messages, businessSettings, clients, eq, and } from "@groombook/db";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
import { detectKeyword, handleConsentKeyword } from "./consent.js";
|
||||
import { sendMessage } from "./outbound.js";
|
||||
|
||||
export interface TelnyxMessageReceivedPayload {
|
||||
data: {
|
||||
@@ -152,7 +154,7 @@ export async function handleMessageReceived(payload: TelnyxMessageReceivedPayloa
|
||||
throw new Error(`No business owns messaging number: ${toPhone}`);
|
||||
}
|
||||
|
||||
const { id: conversationId } = await findOrCreateConversation(businessId, fromPhone, toPhone);
|
||||
const { id: conversationId, clientId } = await findOrCreateConversation(businessId, fromPhone, toPhone);
|
||||
|
||||
await getDb()
|
||||
.update(conversations)
|
||||
@@ -167,6 +169,22 @@ export async function handleMessageReceived(payload: TelnyxMessageReceivedPayloa
|
||||
"received"
|
||||
);
|
||||
|
||||
const keyword = detectKeyword(message.body ?? "");
|
||||
if (keyword) {
|
||||
const { replyText } = await handleConsentKeyword({
|
||||
clientId,
|
||||
businessId,
|
||||
kind: keyword.kind,
|
||||
db: getDb(),
|
||||
});
|
||||
await sendMessage({
|
||||
businessId,
|
||||
clientId,
|
||||
body: replyText,
|
||||
sentByStaffId: undefined,
|
||||
});
|
||||
}
|
||||
|
||||
return { conversationId, messageId };
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export default defineConfig({
|
||||
reporter: process.env.CI ? "github" : "list",
|
||||
|
||||
use: {
|
||||
baseURL: "http://localhost:8080",
|
||||
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:8080",
|
||||
trace: "on-first-retry",
|
||||
screenshot: "only-on-failure",
|
||||
serviceWorkers: "block",
|
||||
|
||||
@@ -515,7 +515,7 @@ export function BookPage() {
|
||||
<option value="small">Small (under 15 lbs)</option>
|
||||
<option value="medium">Medium (15–40 lbs)</option>
|
||||
<option value="large">Large (40–80 lbs)</option>
|
||||
<option value="x-large">X-Large (over 80 lbs)</option>
|
||||
<option value="xlarge">X-Large (over 80 lbs)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
@@ -568,7 +568,7 @@ export function BookPage() {
|
||||
<div>
|
||||
<div style={{ color: "#9ca3af", fontSize: 12, fontWeight: 600, textTransform: "uppercase" }}>Service</div>
|
||||
<div style={{ fontWeight: 600 }}>{selectedService.name}</div>
|
||||
<div style={{ color: "#6b7280" }}>{fmtPrice(selectedService.basePriceCents)} · {fmtDuration(selectedService.durationMinutes + ((form.petSizeCategory === "large" || form.petSizeCategory === "x-large") ? (selectedService.defaultBufferMinutes ?? 0) : 0))}</div>
|
||||
<div style={{ color: "#6b7280" }}>{fmtPrice(selectedService.basePriceCents)} · {fmtDuration(selectedService.durationMinutes + ((form.petSizeCategory === "large" || form.petSizeCategory === "xlarge") ? (selectedService.defaultBufferMinutes ?? 0) : 0))}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div style={{ color: "#9ca3af", fontSize: 12, fontWeight: 600, textTransform: "uppercase" }}>Date & Time</div>
|
||||
|
||||
@@ -50,6 +50,8 @@ services:
|
||||
dockerfile: apps/web/Dockerfile
|
||||
ports:
|
||||
- "8080:80"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
depends_on:
|
||||
- api
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ export interface Pet {
|
||||
name: string;
|
||||
species: string;
|
||||
breed: string | null;
|
||||
sizeCategory: string | null;
|
||||
coatType: string | null;
|
||||
weightKg: number | null;
|
||||
dateOfBirth: string | null;
|
||||
healthAlerts: string | null;
|
||||
@@ -115,6 +117,7 @@ export interface Appointment {
|
||||
cancelledAt: string | null;
|
||||
confirmationToken: string | null;
|
||||
customerNotes: string | null;
|
||||
bufferMinutes: number;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user