690327:0024 Fixing Refactor ADR-019 Naming convention uuid #11
CI / CD Pipeline / build (push) Successful in 6m35s
CI / CD Pipeline / deploy (push) Failing after 12m21s

This commit is contained in:
2026-03-27 00:24:16 +07:00
parent 50b6a0f901
commit 9c5ac74ce5
15 changed files with 72 additions and 42 deletions
@@ -14,12 +14,15 @@ export default function NewTemplatePage() {
const { data: correspondenceTypes = [] } = useCorrespondenceTypes();
const { data: projects = [] } = useProjects();
const projectId = 1; // Default or sync with selection
const { data: contracts = [] } = useContracts(projectId);
const contractId = contracts[0]?.id;
const { data: contractsData } = useContracts(projectId);
const contracts = Array.isArray(contractsData) ? contractsData : [];
const firstContract = contracts[0] as { id?: number; publicId?: string } | undefined;
const contractId = firstContract?.publicId ?? firstContract?.id;
const { data: disciplines = [] } = useDisciplines(contractId);
const selectedProjectName =
projects.find((p: { id: number; projectName: string }) => p.id === projectId)?.projectName || 'LCBP3';
projects.find((p: { id?: number; publicId?: string; projectName: string }) =>
String(p.publicId ?? p.id) === String(projectId))?.projectName || 'LCBP3';
const handleSave = async (data: Partial<NumberingTemplate>) => {
try {