@agendar/shared 0.11.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/illustrations/expense-categories-empty-state.svg +20 -0
- package/assets/illustrations/expenses-empty-state.svg +29 -0
- package/assets/illustrations/expenses-overdue-empty-state.svg +24 -0
- package/assets/illustrations/expenses-search-empty-state.svg +24 -0
- package/dist/{chunk-O5UXD5C2.js → chunk-3MIR7JR3.js} +142 -3
- package/dist/chunk-3MIR7JR3.js.map +1 -0
- package/dist/{chunk-KJ2DYUCT.js → chunk-4LJHXDBD.js} +142 -3
- package/dist/chunk-4LJHXDBD.js.map +1 -0
- package/dist/{chunk-EPUN6UMG.js → chunk-EAGC2SHC.js} +142 -3
- package/dist/chunk-EAGC2SHC.js.map +1 -0
- package/dist/i18n/en.cjs +140 -1
- package/dist/i18n/en.cjs.map +1 -1
- package/dist/i18n/en.d.cts +140 -1
- package/dist/i18n/en.d.ts +140 -1
- package/dist/i18n/en.js +1 -1
- package/dist/i18n/es.cjs +140 -1
- package/dist/i18n/es.cjs.map +1 -1
- package/dist/i18n/es.d.cts +140 -1
- package/dist/i18n/es.d.ts +140 -1
- package/dist/i18n/es.js +1 -1
- package/dist/i18n/index.cjs +420 -3
- package/dist/i18n/index.cjs.map +1 -1
- package/dist/i18n/index.js +3 -3
- package/dist/i18n/pt.cjs +140 -1
- package/dist/i18n/pt.cjs.map +1 -1
- package/dist/i18n/pt.d.cts +140 -1
- package/dist/i18n/pt.d.ts +140 -1
- package/dist/i18n/pt.js +1 -1
- package/dist/schemas/create-appointment.cjs +2 -1
- package/dist/schemas/create-appointment.cjs.map +1 -1
- package/dist/schemas/create-appointment.d.cts +2 -2
- package/dist/schemas/create-appointment.d.ts +2 -2
- package/dist/schemas/create-appointment.js +2 -1
- package/dist/schemas/create-appointment.js.map +1 -1
- package/dist/schemas/create-client.cjs +2 -1
- package/dist/schemas/create-client.cjs.map +1 -1
- package/dist/schemas/create-client.d.cts +2 -2
- package/dist/schemas/create-client.d.ts +2 -2
- package/dist/schemas/create-client.js +2 -1
- package/dist/schemas/create-client.js.map +1 -1
- package/dist/schemas/expense-form.cjs +2 -2
- package/dist/schemas/expense-form.cjs.map +1 -1
- package/dist/schemas/expense-form.d.cts +0 -1
- package/dist/schemas/expense-form.d.ts +0 -1
- package/dist/schemas/expense-form.js +2 -2
- package/dist/schemas/expense-form.js.map +1 -1
- package/dist/utils/appointments.cjs +1 -1
- package/dist/utils/appointments.cjs.map +1 -1
- package/dist/utils/appointments.d.cts +2 -1
- package/dist/utils/appointments.d.ts +2 -1
- package/dist/utils/appointments.js +1 -1
- package/dist/utils/appointments.js.map +1 -1
- package/package.json +3 -2
- package/dist/chunk-EPUN6UMG.js.map +0 -1
- package/dist/chunk-KJ2DYUCT.js.map +0 -1
- package/dist/chunk-O5UXD5C2.js.map +0 -1
|
@@ -3,7 +3,6 @@ import { z } from 'zod';
|
|
|
3
3
|
// src/core/schemas/expense-form.ts
|
|
4
4
|
var DEFAULT_EXPENSE_FORM_MESSAGES = {
|
|
5
5
|
descriptionRequired: "expenses.validation.description.required",
|
|
6
|
-
categoryRequired: "expenses.validation.category.required",
|
|
7
6
|
amountRequired: "expenses.validation.amount.required",
|
|
8
7
|
invalidAmount: "expenses.validation.amount.invalid",
|
|
9
8
|
paymentDateRequired: "expenses.validation.paymentDate.required"
|
|
@@ -14,7 +13,8 @@ var createExpenseFormSchema = (messages = {}) => {
|
|
|
14
13
|
const resolved = { ...DEFAULT_EXPENSE_FORM_MESSAGES, ...messages };
|
|
15
14
|
return z.object({
|
|
16
15
|
description: z.string().min(1, resolved.descriptionRequired).max(255),
|
|
17
|
-
|
|
16
|
+
// Optional: an expense can go without a category.
|
|
17
|
+
category_id: z.number().int().positive().nullable().default(null),
|
|
18
18
|
payment_type: expensePaymentTypeSchema.default("one_time"),
|
|
19
19
|
payment_date: z.string().min(1, resolved.paymentDateRequired),
|
|
20
20
|
amount: z.string().min(1, resolved.amountRequired).regex(/^\d+(\.\d{1,2})?$/, resolved.invalidAmount),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/schemas/expense-form.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../../src/core/schemas/expense-form.ts"],"names":[],"mappings":";;;AASA,IAAM,6BAAA,GAA2D;AAAA,EAC/D,mBAAA,EAAqB,0CAAA;AAAA,EACrB,cAAA,EAAgB,qCAAA;AAAA,EAChB,aAAA,EAAe,oCAAA;AAAA,EACf,mBAAA,EAAqB;AACvB,CAAA;AAEO,IAAM,2BAA2B,CAAA,CAAE,IAAA,CAAK,CAAC,UAAA,EAAY,WAAW,CAAC;AACjE,IAAM,sBAAsB,CAAA,CAAE,IAAA,CAAK,CAAC,SAAA,EAAW,MAAM,CAAC;AAEtD,IAAM,uBAAA,GAA0B,CACrC,QAAA,GAA+C,EAAC,KAC7C;AACH,EAAA,MAAM,QAAA,GAAW,EAAE,GAAG,6BAAA,EAA+B,GAAG,QAAA,EAAS;AAEjE,EAAA,OAAO,EAAE,MAAA,CAAO;AAAA,IACd,WAAA,EAAa,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,CAAI,GAAG,QAAA,CAAS,mBAAmB,CAAA,CAAE,GAAA,CAAI,GAAG,CAAA;AAAA;AAAA,IAEpE,WAAA,EAAa,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,EAAI,CAAE,QAAA,EAAS,CAAE,QAAA,EAAS,CAAE,OAAA,CAAQ,IAAI,CAAA;AAAA,IAChE,YAAA,EAAc,wBAAA,CAAyB,OAAA,CAAQ,UAAU,CAAA;AAAA,IACzD,cAAc,CAAA,CAAE,MAAA,GAAS,GAAA,CAAI,CAAA,EAAG,SAAS,mBAAmB,CAAA;AAAA,IAC5D,MAAA,EAAQ,CAAA,CACL,MAAA,EAAO,CACP,GAAA,CAAI,CAAA,EAAG,QAAA,CAAS,cAAc,CAAA,CAC9B,KAAA,CAAM,mBAAA,EAAqB,QAAA,CAAS,aAAa,CAAA;AAAA,IACpD,MAAA,EAAQ,mBAAA,CAAoB,OAAA,CAAQ,SAAS,CAAA;AAAA,IAC7C,KAAA,EAAO,CAAA,CAAE,MAAA,EAAO,CAAE,GAAA,CAAI,GAAI,CAAA,CAAE,QAAA,EAAS,CAAE,EAAA,CAAG,CAAA,CAAE,OAAA,CAAQ,EAAE,CAAC;AAAA,GACxD,CAAA;AACH;AAEO,IAAM,oBAAoB,uBAAA","file":"expense-form.js","sourcesContent":["import { z } from \"zod\";\n\nexport interface ExpenseFormSchemaMessages {\n descriptionRequired: string;\n amountRequired: string;\n invalidAmount: string;\n paymentDateRequired: string;\n}\n\nconst DEFAULT_EXPENSE_FORM_MESSAGES: ExpenseFormSchemaMessages = {\n descriptionRequired: \"expenses.validation.description.required\",\n amountRequired: \"expenses.validation.amount.required\",\n invalidAmount: \"expenses.validation.amount.invalid\",\n paymentDateRequired: \"expenses.validation.paymentDate.required\",\n};\n\nexport const expensePaymentTypeSchema = z.enum([\"one_time\", \"recurring\"]);\nexport const expenseStatusSchema = z.enum([\"pending\", \"paid\"]);\n\nexport const createExpenseFormSchema = (\n messages: Partial<ExpenseFormSchemaMessages> = {}\n) => {\n const resolved = { ...DEFAULT_EXPENSE_FORM_MESSAGES, ...messages };\n\n return z.object({\n description: z.string().min(1, resolved.descriptionRequired).max(255),\n // Optional: an expense can go without a category.\n category_id: z.number().int().positive().nullable().default(null),\n payment_type: expensePaymentTypeSchema.default(\"one_time\"),\n payment_date: z.string().min(1, resolved.paymentDateRequired),\n amount: z\n .string()\n .min(1, resolved.amountRequired)\n .regex(/^\\d+(\\.\\d{1,2})?$/, resolved.invalidAmount),\n status: expenseStatusSchema.default(\"pending\"),\n notes: z.string().max(2000).optional().or(z.literal(\"\")),\n });\n};\n\nexport const expenseFormSchema = createExpenseFormSchema();\n\nexport type ExpenseFormValues = z.infer<typeof expenseFormSchema>;\n"]}
|
|
@@ -69,7 +69,7 @@ function generateTimelineEvents(data, getStatusColorValue) {
|
|
|
69
69
|
title: appointment.client ? getFullName(
|
|
70
70
|
appointment.client.firstname ?? "",
|
|
71
71
|
appointment.client.lastname ?? ""
|
|
72
|
-
) : appointment.phone_number,
|
|
72
|
+
) : appointment.phone_number ?? "",
|
|
73
73
|
summary: appointment.service?.name ?? "-",
|
|
74
74
|
color: getStatusColorValue(appointment.status),
|
|
75
75
|
professionalId: appointment.professional?.id ?? null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/utils/date.ts","../../src/core/utils/fullname.ts","../../src/core/utils/appointments.ts"],"names":["dayjs","localizedFormat","localeData"],"mappings":";;;;;;;;;;;;;AAIAA,sBAAA,CAAM,OAAOC,gCAAe,CAAA;AAC5BD,sBAAA,CAAM,OAAOE,2BAAU,CAAA;AA6EhB,SAAS,gBAAA,CAAiB,MAAc,OAAA,EAAyB;AACtE,EAAA,OAAOF,sBAAA,CAAM,CAAA,WAAA,EAAc,IAAI,CAAA,CAAE,CAAA,CAAE,IAAI,OAAA,EAAS,QAAQ,CAAA,CAAE,MAAA,CAAO,OAAO,CAAA;AAC1E;;;ACpFO,IAAM,WAAA,GAAc,CAAC,SAAA,EAAmB,QAAA,KAC7C,WAAW,CAAA,EAAG,SAAS,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAA,GAAK,SAAA;;;ACoD1C,IAAM,cAAA,GAAiB,WAAA;AACvB,IAAM,wBAAA,GAA2B,EAAA;AAE1B,IAAM,QAAQA,sBAAAA;AAEd,SAAS,sBAAA,CACd,IAAA,EACA,QAAA,EACA,MAAA,EACoB;AACpB,EAAA,MAAM,WAA+B,EAAC;AACtC,EAAA,IAAI,OAAA,GAAUA,uBAAM,QAAQ,CAAA;AAC5B,EAAA,MAAM,GAAA,GAAMA,uBAAM,MAAM,CAAA;AAExB,EAAA,OAAO,CAAC,OAAA,CAAQ,OAAA,CAAQ,GAAG,CAAA,EAAG;AAC5B,IAAA,MAAM,GAAA,GAAM,OAAA,CAA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AAAA,UACA,WAAA,CAAY,gBAAA,IACV,WAAA,CAAY,OAAA,EAAS,gBAAA,IACrB;AAAA,SACJ;AAEA,QAAA,OAAO;AAAA,UACL,IAAI,WAAA,CAAY,EAAA;AAAA,UAChB,KAAA,EAAO,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,SAAS,CAAA,GAAA,CAAA;AAAA,UAC3B,GAAA,EAAK,CAAA,EAAG,IAAI,CAAA,CAAA,EAAI,OAAO,CAAA,GAAA,CAAA;AAAA,UACvB,KAAA,EAAO,YAAY,MAAA,GACf,WAAA;AAAA,YACE,WAAA,CAAY,OAAO,SAAA,IAAa,EAAA;AAAA,YAChC,WAAA,CAAY,OAAO,QAAA,IAAY;AAAA,cAEjC,WAAA,CAAY,YAAA;AAAA,UAChB,OAAA,EAAS,WAAA,CAAY,OAAA,EAAS,IAAA,IAAQ,GAAA;AAAA,UACtC,KAAA,EAAO,mBAAA,CAAoB,WAAA,CAAY,MAAM,CAAA;AAAA,UAC7C,cAAA,EAAgB,WAAA,CAAY,YAAA,EAAc,EAAA,IAAM;AAAA,SAClD;AAAA,MACF,CAAC;AAAA,KACF;AAAA,GACH;AACF","file":"appointments.cjs","sourcesContent":["import dayjs from \"dayjs\";\nimport localeData from \"dayjs/plugin/localeData.js\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat.js\";\n\ndayjs.extend(localizedFormat);\ndayjs.extend(localeData);\n\nexport function addDays(date: Date, days: number): Date {\n return dayjs(date).add(days, \"day\").toDate();\n}\n\n/** Full years elapsed since a \"YYYY-MM-DD\" birthday, as of today. */\nexport function calculateAge(birthday: string): number {\n return dayjs().diff(dayjs(birthday), \"year\");\n}\n\n/**\n * Whether a \"YYYY-MM-DD\" string is a real calendar date (rejects e.g. \"2024-02-30\"\n * or \"2024-13-01\", which a shape-only regex like `birthdayRegex` would let through).\n */\nexport function isValidCalendarDate(value: string): boolean {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(value);\n if (!match) return false;\n\n const [, yearStr, monthStr, dayStr] = match;\n const year = Number(yearStr);\n const month = Number(monthStr);\n const day = Number(dayStr);\n\n const date = new Date(year, month - 1, day);\n return (\n date.getFullYear() === year &&\n date.getMonth() === month - 1 &&\n date.getDate() === day\n );\n}\n\n/** Converts a \"YYYY-MM-DD\" value to \"DD/MM/YYYY\" for masked-input display. Empty in, empty out. */\nexport function isoToDisplayDate(iso: string): string {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso);\n if (!match) return \"\";\n\n const [, year, month, day] = match;\n return `${day}/${month}/${year}`;\n}\n\n/**\n * Converts the raw digits typed into a DD/MM/YYYY mask (e.g. \"15081990\") into\n * \"YYYY-MM-DD\". Returns \"\" until all 8 digits have been entered.\n */\nexport function maskedDigitsToIsoDate(digits: string): string {\n if (digits.length !== 8) return \"\";\n\n const day = digits.slice(0, 2);\n const month = digits.slice(2, 4);\n const year = digits.slice(4, 8);\n return `${year}-${month}-${day}`;\n}\n\nexport function toDateString(date: Date): string {\n return dayjs(date).format(\"YYYY-MM-DD\");\n}\n\nexport function parseDateParts(dateString: string): {\n month: string;\n day: string;\n} {\n const date = dayjs(dateString);\n return {\n month: date.format(\"MMM\").toUpperCase(),\n day: date.format(\"D\"),\n };\n}\n\nexport function formatMonthDay(dateString: string): string {\n return dayjs(dateString).format(\"MMM D\");\n}\n\nexport function formatTime12h(time: string): string {\n return dayjs(`1970-01-01 ${time}`).format(\"h:mm a\");\n}\n\nexport function addMinutesToTime(time: string, minutes: number): string {\n return dayjs(`1970-01-01 ${time}`).add(minutes, \"minute\").format(\"HH:mm\");\n}\n\n/** Formats a date using the active dayjs locale (e.g. DD/MM/YYYY for pt-br, MM/DD/YYYY for en). */\nexport function formatLocalizedDate(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(\"L\");\n}\n\n/** Formats a date and time using the active dayjs locale. */\nexport function formatLocalizedDateTime(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(\"L LT\");\n}\n\n/** Day/month order for the active dayjs locale, derived from its full date pattern (e.g. \"DD/MM\" for pt-br, \"MM/DD\" for en). */\nfunction localizedShortDatePattern(): string {\n const longFormat = dayjs.localeData().longDateFormat(\"L\");\n return longFormat\n .replace(/^[,./\\-\\s]*Y+[,./\\-\\s]*/, \"\")\n .replace(/[,./\\-\\s]*Y+[,./\\-\\s]*$/, \"\");\n}\n\n/** Formats a date as day/month (no year), in the order the active dayjs locale uses. */\nexport function formatLocalizedShortDate(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(localizedShortDatePattern());\n}\n","export const getFullName = (firstname: string, lastname?: string): string =>\n lastname ? `${firstname} ${lastname}` : firstname;\n","import dayjs from \"dayjs\";\n\nimport { addMinutesToTime } from \"./date\";\nimport { getFullName } from \"./fullname\";\n\nexport interface AppointmentLike {\n id: number;\n appointment_time: string;\n status?: string | null;\n phone_number: string;\n /** The whole appointment's length (all its services); falls back to the service's. */\n duration_minutes?: number | null;\n service?: {\n duration_minutes?: number | null;\n name?: string | null;\n } | null;\n client?: {\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n professional?: {\n id: number;\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n}\n\nexport interface AgendaSection<T> {\n title: string;\n data: T[];\n}\n\nexport interface TimelineEvent {\n id: number;\n start: string;\n end: string;\n title: string;\n summary: string;\n color: string;\n professionalId: number | null;\n}\n\nexport interface MarkedDateDot {\n key: string;\n color: string;\n}\n\nexport interface MarkedDate {\n dots: MarkedDateDot[];\n}\n\nexport type MarkedDatesMap = Record<string, MarkedDate>;\n\nconst DEFAULT_STATUS = \"scheduled\";\nconst DEFAULT_DURATION_MINUTES = 30;\n\nexport const today = dayjs();\n\nexport function generateAgendaSections<T>(\n data: Record<string, T[]>,\n dateFrom: string,\n dateTo: string,\n): AgendaSection<T>[] {\n const sections: AgendaSection<T>[] = [];\n let current = dayjs(dateFrom);\n const end = dayjs(dateTo);\n\n while (!current.isAfter(end)) {\n const key = current.format(\"YYYY-MM-DD\");\n sections.push({\n title: key,\n data: data[key] ?? [],\n });\n current = current.add(1, \"day\");\n }\n\n return sections;\n}\n\nexport function generateMarkedDates<T extends { status?: string | null }>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string,\n): MarkedDatesMap {\n return Object.keys(data).reduce<MarkedDatesMap>((acc, date) => {\n const uniqueStatuses = [\n ...new Set(data[date].map((appointment) => appointment.status)),\n ];\n acc[date] = {\n dots: uniqueStatuses.map((status) => ({\n key: status ?? DEFAULT_STATUS,\n color: getStatusColorValue(status),\n })),\n };\n return acc;\n }, {});\n}\n\nexport function generateTimelineEvents<T extends AppointmentLike>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string,\n): Record<string, TimelineEvent[]> {\n return Object.fromEntries(\n Object.entries(data).map(([date, appointments]) => [\n date,\n appointments.map((appointment) => {\n const startTime = appointment.appointment_time.slice(0, 5);\n const endTime = addMinutesToTime(\n startTime,\n appointment.duration_minutes ??\n appointment.service?.duration_minutes ??\n DEFAULT_DURATION_MINUTES,\n );\n\n return {\n id: appointment.id,\n start: `${date} ${startTime}:00`,\n end: `${date} ${endTime}:00`,\n title: appointment.client\n ? getFullName(\n appointment.client.firstname ?? \"\",\n appointment.client.lastname ?? \"\",\n )\n : appointment.phone_number,\n summary: appointment.service?.name ?? \"-\",\n color: getStatusColorValue(appointment.status),\n professionalId: appointment.professional?.id ?? null,\n };\n }),\n ]),\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/core/utils/date.ts","../../src/core/utils/fullname.ts","../../src/core/utils/appointments.ts"],"names":["dayjs","localizedFormat","localeData"],"mappings":";;;;;;;;;;;;;AAIAA,sBAAA,CAAM,OAAOC,gCAAe,CAAA;AAC5BD,sBAAA,CAAM,OAAOE,2BAAU,CAAA;AA6EhB,SAAS,gBAAA,CAAiB,MAAc,OAAA,EAAyB;AACtE,EAAA,OAAOF,sBAAA,C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BAAA,CAAoB,WAAA,CAAY,MAAM,CAAA;AAAA,UAC7C,cAAA,EAAgB,WAAA,CAAY,YAAA,EAAc,EAAA,IAAM;AAAA,SAClD;AAAA,MACF,CAAC;AAAA,KACF;AAAA,GACH;AACF","file":"appointments.cjs","sourcesContent":["import dayjs from \"dayjs\";\nimport localeData from \"dayjs/plugin/localeData.js\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat.js\";\n\ndayjs.extend(localizedFormat);\ndayjs.extend(localeData);\n\nexport function addDays(date: Date, days: number): Date {\n return dayjs(date).add(days, \"day\").toDate();\n}\n\n/** Full years elapsed since a \"YYYY-MM-DD\" birthday, as of today. */\nexport function calculateAge(birthday: string): number {\n return dayjs().diff(dayjs(birthday), \"year\");\n}\n\n/**\n * Whether a \"YYYY-MM-DD\" string is a real calendar date (rejects e.g. \"2024-02-30\"\n * or \"2024-13-01\", which a shape-only regex like `birthdayRegex` would let through).\n */\nexport function isValidCalendarDate(value: string): boolean {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(value);\n if (!match) return false;\n\n const [, yearStr, monthStr, dayStr] = match;\n const year = Number(yearStr);\n const month = Number(monthStr);\n const day = Number(dayStr);\n\n const date = new Date(year, month - 1, day);\n return (\n date.getFullYear() === year &&\n date.getMonth() === month - 1 &&\n date.getDate() === day\n );\n}\n\n/** Converts a \"YYYY-MM-DD\" value to \"DD/MM/YYYY\" for masked-input display. Empty in, empty out. */\nexport function isoToDisplayDate(iso: string): string {\n const match = /^(\\d{4})-(\\d{2})-(\\d{2})$/.exec(iso);\n if (!match) return \"\";\n\n const [, year, month, day] = match;\n return `${day}/${month}/${year}`;\n}\n\n/**\n * Converts the raw digits typed into a DD/MM/YYYY mask (e.g. \"15081990\") into\n * \"YYYY-MM-DD\". Returns \"\" until all 8 digits have been entered.\n */\nexport function maskedDigitsToIsoDate(digits: string): string {\n if (digits.length !== 8) return \"\";\n\n const day = digits.slice(0, 2);\n const month = digits.slice(2, 4);\n const year = digits.slice(4, 8);\n return `${year}-${month}-${day}`;\n}\n\nexport function toDateString(date: Date): string {\n return dayjs(date).format(\"YYYY-MM-DD\");\n}\n\nexport function parseDateParts(dateString: string): {\n month: string;\n day: string;\n} {\n const date = dayjs(dateString);\n return {\n month: date.format(\"MMM\").toUpperCase(),\n day: date.format(\"D\"),\n };\n}\n\nexport function formatMonthDay(dateString: string): string {\n return dayjs(dateString).format(\"MMM D\");\n}\n\nexport function formatTime12h(time: string): string {\n return dayjs(`1970-01-01 ${time}`).format(\"h:mm a\");\n}\n\nexport function addMinutesToTime(time: string, minutes: number): string {\n return dayjs(`1970-01-01 ${time}`).add(minutes, \"minute\").format(\"HH:mm\");\n}\n\n/** Formats a date using the active dayjs locale (e.g. DD/MM/YYYY for pt-br, MM/DD/YYYY for en). */\nexport function formatLocalizedDate(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(\"L\");\n}\n\n/** Formats a date and time using the active dayjs locale. */\nexport function formatLocalizedDateTime(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(\"L LT\");\n}\n\n/** Day/month order for the active dayjs locale, derived from its full date pattern (e.g. \"DD/MM\" for pt-br, \"MM/DD\" for en). */\nfunction localizedShortDatePattern(): string {\n const longFormat = dayjs.localeData().longDateFormat(\"L\");\n return longFormat\n .replace(/^[,./\\-\\s]*Y+[,./\\-\\s]*/, \"\")\n .replace(/[,./\\-\\s]*Y+[,./\\-\\s]*$/, \"\");\n}\n\n/** Formats a date as day/month (no year), in the order the active dayjs locale uses. */\nexport function formatLocalizedShortDate(\n date: Date | string | null | undefined,\n): string {\n if (!date) return \"—\";\n return dayjs(date).format(localizedShortDatePattern());\n}\n","export const getFullName = (firstname: string, lastname?: string): string =>\n lastname ? `${firstname} ${lastname}` : firstname;\n","import dayjs from \"dayjs\";\n\nimport { addMinutesToTime } from \"./date\";\nimport { getFullName } from \"./fullname\";\n\nexport interface AppointmentLike {\n id: number;\n appointment_time: string;\n status?: string | null;\n /** Null when booked without a number. */\n phone_number: string | null;\n /** The whole appointment's length (all its services); falls back to the service's. */\n duration_minutes?: number | null;\n service?: {\n duration_minutes?: number | null;\n name?: string | null;\n } | null;\n client?: {\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n professional?: {\n id: number;\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n}\n\nexport interface AgendaSection<T> {\n title: string;\n data: T[];\n}\n\nexport interface TimelineEvent {\n id: number;\n start: string;\n end: string;\n title: string;\n summary: string;\n color: string;\n professionalId: number | null;\n}\n\nexport interface MarkedDateDot {\n key: string;\n color: string;\n}\n\nexport interface MarkedDate {\n dots: MarkedDateDot[];\n}\n\nexport type MarkedDatesMap = Record<string, MarkedDate>;\n\nconst DEFAULT_STATUS = \"scheduled\";\nconst DEFAULT_DURATION_MINUTES = 30;\n\nexport const today = dayjs();\n\nexport function generateAgendaSections<T>(\n data: Record<string, T[]>,\n dateFrom: string,\n dateTo: string\n): AgendaSection<T>[] {\n const sections: AgendaSection<T>[] = [];\n let current = dayjs(dateFrom);\n const end = dayjs(dateTo);\n\n while (!current.isAfter(end)) {\n const key = current.format(\"YYYY-MM-DD\");\n sections.push({\n title: key,\n data: data[key] ?? [],\n });\n current = current.add(1, \"day\");\n }\n\n return sections;\n}\n\nexport function generateMarkedDates<T extends { status?: string | null }>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string\n): MarkedDatesMap {\n return Object.keys(data).reduce<MarkedDatesMap>((acc, date) => {\n const uniqueStatuses = [\n ...new Set(data[date].map((appointment) => appointment.status)),\n ];\n acc[date] = {\n dots: uniqueStatuses.map((status) => ({\n key: status ?? DEFAULT_STATUS,\n color: getStatusColorValue(status),\n })),\n };\n return acc;\n }, {});\n}\n\nexport function generateTimelineEvents<T extends AppointmentLike>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string\n): Record<string, TimelineEvent[]> {\n return Object.fromEntries(\n Object.entries(data).map(([date, appointments]) => [\n date,\n appointments.map((appointment) => {\n const startTime = appointment.appointment_time.slice(0, 5);\n const endTime = addMinutesToTime(\n startTime,\n appointment.duration_minutes ??\n appointment.service?.duration_minutes ??\n DEFAULT_DURATION_MINUTES\n );\n\n return {\n id: appointment.id,\n start: `${date} ${startTime}:00`,\n end: `${date} ${endTime}:00`,\n title: appointment.client\n ? getFullName(\n appointment.client.firstname ?? \"\",\n appointment.client.lastname ?? \"\"\n )\n : (appointment.phone_number ?? \"\"),\n summary: appointment.service?.name ?? \"-\",\n color: getStatusColorValue(appointment.status),\n professionalId: appointment.professional?.id ?? null,\n };\n }),\n ])\n );\n}\n"]}
|
|
@@ -4,7 +4,8 @@ interface AppointmentLike {
|
|
|
4
4
|
id: number;
|
|
5
5
|
appointment_time: string;
|
|
6
6
|
status?: string | null;
|
|
7
|
-
|
|
7
|
+
/** Null when booked without a number. */
|
|
8
|
+
phone_number: string | null;
|
|
8
9
|
/** The whole appointment's length (all its services); falls back to the service's. */
|
|
9
10
|
duration_minutes?: number | null;
|
|
10
11
|
service?: {
|
|
@@ -4,7 +4,8 @@ interface AppointmentLike {
|
|
|
4
4
|
id: number;
|
|
5
5
|
appointment_time: string;
|
|
6
6
|
status?: string | null;
|
|
7
|
-
|
|
7
|
+
/** Null when booked without a number. */
|
|
8
|
+
phone_number: string | null;
|
|
8
9
|
/** The whole appointment's length (all its services); falls back to the service's. */
|
|
9
10
|
duration_minutes?: number | null;
|
|
10
11
|
service?: {
|
|
@@ -50,7 +50,7 @@ function generateTimelineEvents(data, getStatusColorValue) {
|
|
|
50
50
|
title: appointment.client ? getFullName(
|
|
51
51
|
appointment.client.firstname ?? "",
|
|
52
52
|
appointment.client.lastname ?? ""
|
|
53
|
-
) : appointment.phone_number,
|
|
53
|
+
) : appointment.phone_number ?? "",
|
|
54
54
|
summary: appointment.service?.name ?? "-",
|
|
55
55
|
color: getStatusColorValue(appointment.status),
|
|
56
56
|
professionalId: appointment.professional?.id ?? null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/core/utils/appointments.ts"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"sources":["../../src/core/utils/appointments.ts"],"names":[],"mappings":";;;;AAsDA,IAAM,cAAA,GAAiB,WAAA;AACvB,IAAM,wBAAA,GAA2B,EAAA;AAE1B,IAAM,QAAQ,KAAA;AAEd,SAAS,sBAAA,CACd,IAAA,EACA,QAAA,EACA,MAAA,EACoB;AACpB,EAAA,MAAM,WAA+B,EAAC;AACtC,EAAA,IAAI,OAAA,GAAU,MAAM,QAAQ,CAAA;AAC5B,EAAA,MAAM,GAAA,GAAM,MAAM,MAAM,CAAA;AAExB,EAAA,OAAO,CAAC,OAAA,CAAQ,OAAA,CAAQ,GAAG,CAAA,EAAG;AAC5B,IAAA,MAAM,GAAA,GAAM,OAAA,CAAQ,MAAA,CAAO,YAAY,CAAA;AACvC,IAAA,QAAA,CAAS,IAAA,CAAK;AAAA,MACZ,KAAA,EAAO,GAAA;AAAA,MACP,IAAA,EAAM,IAAA,CAAK,GAAG,CAAA,IAAK;AAAC,KACrB,CAAA;AACD,IAAA,OAAA,GAAU,OAAA,CAAQ,GAAA,CAAI,CAAA,EAAG,KAAK,CAAA;AAAA,EAChC;AAEA,EAAA,OAAO,QAAA;AACT;AAEO,SAAS,mBAAA,CACd,MACA,mBAAA,EACgB;AAChB,EAAA,OAAO,OAAO,IAAA,CAAK,IAAI,EAAE,MAAA,CAAuB,CAAC,KAAK,IAAA,KAAS;AAC7D,IAAA,MAAM,cAAA,GAAiB;AAAA,MACrB,GAAG,IAAI,GAAA,CAAI,IAAA,CAAK,IAAI,CAAA,CAAE,GAAA,CAAI,CAAC,WAAA,KAAgB,WAAA,CAAY,MAAM,CAAC;AAAA,KAChE;AACA,IAAA,GAAA,CAAI,IAAI,CAAA,GAAI;AAAA,MACV,IAAA,EAAM,cAAA,CAAe,GAAA,CAAI,CAAC,MAAA,MAAY;AAAA,QACpC,KAAK,MAAA,IAAU,cAAA;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ACF;AAAA,GACH;AACF","file":"appointments.js","sourcesContent":["import dayjs from \"dayjs\";\n\nimport { addMinutesToTime } from \"./date\";\nimport { getFullName } from \"./fullname\";\n\nexport interface AppointmentLike {\n id: number;\n appointment_time: string;\n status?: string | null;\n /** Null when booked without a number. */\n phone_number: string | null;\n /** The whole appointment's length (all its services); falls back to the service's. */\n duration_minutes?: number | null;\n service?: {\n duration_minutes?: number | null;\n name?: string | null;\n } | null;\n client?: {\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n professional?: {\n id: number;\n firstname?: string | null;\n lastname?: string | null;\n } | null;\n}\n\nexport interface AgendaSection<T> {\n title: string;\n data: T[];\n}\n\nexport interface TimelineEvent {\n id: number;\n start: string;\n end: string;\n title: string;\n summary: string;\n color: string;\n professionalId: number | null;\n}\n\nexport interface MarkedDateDot {\n key: string;\n color: string;\n}\n\nexport interface MarkedDate {\n dots: MarkedDateDot[];\n}\n\nexport type MarkedDatesMap = Record<string, MarkedDate>;\n\nconst DEFAULT_STATUS = \"scheduled\";\nconst DEFAULT_DURATION_MINUTES = 30;\n\nexport const today = dayjs();\n\nexport function generateAgendaSections<T>(\n data: Record<string, T[]>,\n dateFrom: string,\n dateTo: string\n): AgendaSection<T>[] {\n const sections: AgendaSection<T>[] = [];\n let current = dayjs(dateFrom);\n const end = dayjs(dateTo);\n\n while (!current.isAfter(end)) {\n const key = current.format(\"YYYY-MM-DD\");\n sections.push({\n title: key,\n data: data[key] ?? [],\n });\n current = current.add(1, \"day\");\n }\n\n return sections;\n}\n\nexport function generateMarkedDates<T extends { status?: string | null }>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string\n): MarkedDatesMap {\n return Object.keys(data).reduce<MarkedDatesMap>((acc, date) => {\n const uniqueStatuses = [\n ...new Set(data[date].map((appointment) => appointment.status)),\n ];\n acc[date] = {\n dots: uniqueStatuses.map((status) => ({\n key: status ?? DEFAULT_STATUS,\n color: getStatusColorValue(status),\n })),\n };\n return acc;\n }, {});\n}\n\nexport function generateTimelineEvents<T extends AppointmentLike>(\n data: Record<string, T[]>,\n getStatusColorValue: (status: string | null | undefined) => string\n): Record<string, TimelineEvent[]> {\n return Object.fromEntries(\n Object.entries(data).map(([date, appointments]) => [\n date,\n appointments.map((appointment) => {\n const startTime = appointment.appointment_time.slice(0, 5);\n const endTime = addMinutesToTime(\n startTime,\n appointment.duration_minutes ??\n appointment.service?.duration_minutes ??\n DEFAULT_DURATION_MINUTES\n );\n\n return {\n id: appointment.id,\n start: `${date} ${startTime}:00`,\n end: `${date} ${endTime}:00`,\n title: appointment.client\n ? getFullName(\n appointment.client.firstname ?? \"\",\n appointment.client.lastname ?? \"\"\n )\n : (appointment.phone_number ?? \"\"),\n summary: appointment.service?.name ?? \"-\",\n color: getStatusColorValue(appointment.status),\n professionalId: appointment.professional?.id ?? null,\n };\n }),\n ])\n );\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agendar/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -361,12 +361,12 @@
|
|
|
361
361
|
"dependencies": {
|
|
362
362
|
"awesome-phonenumber": "^7.8.0",
|
|
363
363
|
"axios": "^1.11.0",
|
|
364
|
-
"dayjs": "^1.11.13",
|
|
365
364
|
"i18n-iso-countries": "^7.14.0",
|
|
366
365
|
"lodash.debounce": "^4.0.8",
|
|
367
366
|
"zod": "^4.1.0"
|
|
368
367
|
},
|
|
369
368
|
"peerDependencies": {
|
|
369
|
+
"dayjs": "^1.11.13",
|
|
370
370
|
"react": "*",
|
|
371
371
|
"react-native-mask-input": "*"
|
|
372
372
|
},
|
|
@@ -386,6 +386,7 @@
|
|
|
386
386
|
"@types/node": "^22.10.2",
|
|
387
387
|
"@types/react": "^19.2.0",
|
|
388
388
|
"@vitest/coverage-v8": "^4.1.10",
|
|
389
|
+
"dayjs": "^1.11.13",
|
|
389
390
|
"eslint": "^9.39.1",
|
|
390
391
|
"eslint-config-prettier": "^10.1.8",
|
|
391
392
|
"eslint-plugin-import": "^2.32.0",
|