mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-07 09:19:19 +00:00
Only the server's TitleRequired rejection is shown on the Document Title field; any other rejected value is reported in a toast. Procedure names and the extra safety note stop at the server's length limits.
27 lines
1.1 KiB
TypeScript
27 lines
1.1 KiB
TypeScript
/** Filled in on every generated document; shown read-only so authors don't retype them. */
|
|
export const AUTO_POPULATED_FIELDS = ["WO#", "Site Code", "Address", "Service Type"] as const;
|
|
|
|
/** Server limits; the inputs stop there instead of failing the save. */
|
|
export const PROCEDURE_NAME_MAX_LENGTH = 200;
|
|
export const EXTRA_SAFETY_NOTE_MAX_LENGTH = 2000;
|
|
|
|
export const COMPLETION_TEMPLATE_COPY = {
|
|
pageTitle: "Completion Docs",
|
|
searchPlaceholder: "Search document title…",
|
|
addTemplate: "Add Template",
|
|
saveChanges: "Save changes",
|
|
titleRequired: "Document Title is required",
|
|
noProcedureDetail: "No procedure defined yet",
|
|
noProcedurePreview: "No procedure added yet.",
|
|
untitledDocument: "UNTITLED COMPLETION DOCUMENT",
|
|
autoFilledSuffix: "— auto-filled per work order",
|
|
emptySearchTitle: "No templates found",
|
|
emptySearchHint: "Try a different search, or add a new template.",
|
|
added: "Template added",
|
|
updated: "Template updated",
|
|
deleted: "Template deleted",
|
|
} as const;
|
|
|
|
export function templateCountLabel(count: number): string {
|
|
return `${count} template${count === 1 ? "" : "s"}`;
|
|
}
|