690325:2132 Fixing Naming convention missunderstand #01
This commit is contained in:
@@ -8,28 +8,28 @@ import { CorrespondenceType } from '@/types/master-data';
|
||||
export default function CorrespondenceTypesPage() {
|
||||
const columns: ColumnDef<CorrespondenceType>[] = [
|
||||
{
|
||||
accessorKey: 'type_code',
|
||||
accessorKey: 'typeCode',
|
||||
header: 'Code',
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('type_code')}</span>,
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('typeCode')}</span>,
|
||||
},
|
||||
{
|
||||
accessorKey: 'type_name',
|
||||
accessorKey: 'typeName',
|
||||
header: 'Name',
|
||||
},
|
||||
{
|
||||
accessorKey: 'sort_order',
|
||||
accessorKey: 'sortOrder',
|
||||
header: 'Sort Order',
|
||||
},
|
||||
{
|
||||
accessorKey: 'is_active',
|
||||
accessorKey: 'isActive',
|
||||
header: 'Status',
|
||||
cell: ({ row }) => (
|
||||
<span
|
||||
className={`px-2 py-1 rounded-full text-xs ${
|
||||
row.getValue('is_active') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
row.getValue('isActive') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
}`}
|
||||
>
|
||||
{row.getValue('is_active') ? 'Active' : 'Inactive'}
|
||||
{row.getValue('isActive') ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
@@ -52,10 +52,10 @@ export default function CorrespondenceTypesPage() {
|
||||
deleteFn={(id) => masterDataService.deleteCorrespondenceType(id)}
|
||||
columns={columns}
|
||||
fields={[
|
||||
{ name: 'type_code', label: 'Code', type: 'text', required: true },
|
||||
{ name: 'type_name', label: 'Name', type: 'text', required: true },
|
||||
{ name: 'sort_order', label: 'Sort Order', type: 'text' },
|
||||
{ name: 'is_active', label: 'Active', type: 'checkbox' },
|
||||
{ name: 'typeCode', label: 'Code', type: 'text', required: true },
|
||||
{ name: 'typeName', label: 'Name', type: 'text', required: true },
|
||||
{ name: 'sortOrder', label: 'Sort Order', type: 'text' },
|
||||
{ name: 'isActive', label: 'Active', type: 'checkbox' },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -17,28 +17,28 @@ export default function DisciplinesPage() {
|
||||
|
||||
const columns: ColumnDef<Discipline>[] = [
|
||||
{
|
||||
accessorKey: 'discipline_code',
|
||||
accessorKey: 'disciplineCode',
|
||||
header: 'Code',
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('discipline_code')}</span>,
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('disciplineCode')}</span>,
|
||||
},
|
||||
{
|
||||
accessorKey: 'code_name_th',
|
||||
accessorKey: 'codeNameTh',
|
||||
header: 'Name (TH)',
|
||||
},
|
||||
{
|
||||
accessorKey: 'code_name_en',
|
||||
accessorKey: 'codeNameEn',
|
||||
header: 'Name (EN)',
|
||||
},
|
||||
{
|
||||
accessorKey: 'is_active',
|
||||
accessorKey: 'isActive',
|
||||
header: 'Status',
|
||||
cell: ({ row }) => (
|
||||
<span
|
||||
className={`px-2 py-1 rounded-full text-xs ${
|
||||
row.getValue('is_active') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
row.getValue('isActive') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
}`}
|
||||
>
|
||||
{row.getValue('is_active') ? 'Active' : 'Inactive'}
|
||||
{row.getValue('isActive') ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -17,16 +17,16 @@ export default function RfaTypesPage() {
|
||||
|
||||
const columns: ColumnDef<RfaType>[] = [
|
||||
{
|
||||
accessorKey: 'type_code',
|
||||
accessorKey: 'typeCode',
|
||||
header: 'Code',
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('type_code')}</span>,
|
||||
cell: ({ row }) => <span className="font-mono font-bold">{row.getValue('typeCode')}</span>,
|
||||
},
|
||||
{
|
||||
accessorKey: 'type_name_th',
|
||||
accessorKey: 'typeNameTh',
|
||||
header: 'Name (TH)',
|
||||
},
|
||||
{
|
||||
accessorKey: 'type_name_en',
|
||||
accessorKey: 'typeNameEn',
|
||||
header: 'Name (EN)',
|
||||
},
|
||||
{
|
||||
@@ -34,15 +34,15 @@ export default function RfaTypesPage() {
|
||||
header: 'Remark',
|
||||
},
|
||||
{
|
||||
accessorKey: 'is_active',
|
||||
accessorKey: 'isActive',
|
||||
header: 'Status',
|
||||
cell: ({ row }) => (
|
||||
<span
|
||||
className={`px-2 py-1 rounded-full text-xs ${
|
||||
row.getValue('is_active') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
row.getValue('isActive') ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
|
||||
}`}
|
||||
>
|
||||
{row.getValue('is_active') ? 'Active' : 'Inactive'}
|
||||
{row.getValue('isActive') ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user