@@ -5,36 +5,51 @@ import type { AugmentedColumnDef } from '~/components/common/DataTable/column';
55export function createColumns ( {
66 onDeviceKindLinkClick,
77} : {
8- onDeviceKindLinkClick : ( id : string ) => void ,
8+ onDeviceKindLinkClick : ( id : string ) => void ;
99} ) : AugmentedColumnDef < DeviceKindInCartList > [ ] {
1010 return [
1111 {
1212 id : 'id' ,
1313 title : 'Mã loại thiết bị' ,
1414 cell : ( { row } ) =>
15- h (
16- 'p' ,
17- { class : 'text-normal pl-3' } ,
18- [ row . original . id . toUpperCase ( ) ] ,
19- ) ,
15+ h ( 'p' , { class : 'text-normal pl-3' } , [ row . original . id . toUpperCase ( ) ] ) ,
2016 } ,
2117 {
2218 id : 'name' ,
2319 title : 'Tên loại thiết bị' ,
2420 cell : ( { row } ) =>
2521 h (
2622 'p' ,
27- { class : 'line-clamp-2 text-slate-500 text-normal leading-6 font-normal' } ,
23+ {
24+ class :
25+ 'line-clamp-2 text-slate-500 text-normal leading-6 font-normal' ,
26+ } ,
2827 row . original . name ,
2928 ) ,
3029 } ,
30+ {
31+ id : 'category' ,
32+ title : 'Phân nhóm' ,
33+ cell : ( { row } ) =>
34+ h (
35+ 'p' ,
36+ {
37+ class :
38+ 'line-clamp-2 text-slate-500 text-normal leading-6 font-normal' ,
39+ } ,
40+ row . original . category ,
41+ ) ,
42+ } ,
3143 {
3244 id : 'quantity' ,
3345 title : 'SL' ,
3446 cell : ( { row } ) =>
3547 h (
3648 'p' ,
37- { class : 'line-clamp-2 text-slate-500 text-right text-normal leading-6 font-normal' } ,
49+ {
50+ class :
51+ 'line-clamp-2 text-slate-500 text-center text-normal leading-6 font-normal' ,
52+ } ,
3853 row . original . quantity ,
3954 ) ,
4055 } ,
@@ -44,7 +59,10 @@ export function createColumns ({
4459 cell : ( { row } ) =>
4560 h (
4661 'div' ,
47- { class : 'flex justify-end items-center text-lg hover:cursor-pointer' , onClick : ( ) => onDeviceKindLinkClick ( row . original . id ) } ,
62+ {
63+ class : 'flex justify-end items-center text-lg hover:cursor-pointer' ,
64+ onClick : ( ) => onDeviceKindLinkClick ( row . original . id ) ,
65+ } ,
4866 h ( Icon , { name : 'i-heroicons-arrow-top-right-on-square' } ) ,
4967 ) ,
5068 } ,
0 commit comments