690326:2139 Fixing Refactor ADR-019 Naming convention uuid #07
CI / CD Pipeline / build (push) Successful in 10m6s
CI / CD Pipeline / deploy (push) Failing after 1m16s

This commit is contained in:
2026-03-26 21:39:03 +07:00
parent 25ea2fcd0f
commit 0a1ea1e4bb
8 changed files with 190 additions and 34 deletions
@@ -21,6 +21,18 @@ export default function DisciplinesPage() {
header: 'Code',
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('disciplineCode')}</span>,
},
{
accessorKey: 'contract',
header: 'Contract',
cell: ({ row }) => {
const contract = row.original.contract;
return contract ? (
<span className="text-sm">{contract.contractName} ({contract.contractCode})</span>
) : (
<span className="text-muted-foreground text-sm">-</span>
);
},
},
{
accessorKey: 'codeNameTh',
header: 'Name (TH)',
@@ -44,9 +56,9 @@ export default function DisciplinesPage() {
},
];
const contractOptions = contracts.map((c: { id: number; contractCode: string; contractName: string }) => ({
const contractOptions = contracts.map((c: { id?: number; publicId?: string; contractCode: string; contractName: string }) => ({
label: `${c.contractName} (${c.contractCode})`,
value: String(c.id),
value: String(c.publicId ?? c.id ?? ''),
}));
return (
@@ -86,8 +98,8 @@ export default function DisciplinesPage() {
</SelectTrigger>
<SelectContent>
<SelectItem value="all">All Contracts</SelectItem>
{contracts.map((c: { id: number; contractCode: string; contractName: string }) => (
<SelectItem key={c.id} value={String(c.id)}>
{contracts.map((c: { id?: number; publicId?: string; contractCode: string; contractName: string }) => (
<SelectItem key={String(c.publicId ?? c.id ?? '')} value={String(c.publicId ?? c.id ?? '')}>
{c.contractName} ({c.contractCode})
</SelectItem>
))}