MED-103: add booking functionality

This commit is contained in:
Helena
2025-09-17 18:11:13 +03:00
parent 7c92b787ce
commit 22f7fa134b
44 changed files with 1923 additions and 479 deletions

View File

@@ -20,7 +20,7 @@ export function toTitleCase(str?: string) {
?.toLowerCase()
.replace(/[^-'\s]+/g, (match) =>
match.replace(/^./, (first) => first.toUpperCase()),
) ?? ""
) ?? ''
);
}
@@ -145,6 +145,13 @@ export default class PersonalCode {
gender,
dob: parsed.getBirthday(),
age: parsed.getAge(),
}
};
}
}
export const findProductTypeIdByHandle = (
productTypes: { metadata?: Record<string, unknown> | null; id: string }[],
handle: string,
) => {
return productTypes.find(({ metadata }) => metadata?.handle === handle)?.id;
};