Skip to content

Commit

Permalink
Feat: 마일리지 카테고리에 최근 수정일 추가(#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ohinhyuk committed Sep 21, 2023
1 parent c08d22c commit 575183c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/assets/data/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ export const ORDER_IDX = 'orderIdx';
export const ITEM_MAX_POINTS = 'itemMaxPoints';
export const ISCHECKED = 'isChecked';
export const CATEGORYID = 'categoryId';
export const MOD_DATE = 'modDate';
12 changes: 12 additions & 0 deletions src/pages/mileage/category/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ID,
ORDER_IDX,
TITLE,
MOD_DATE,
} from 'src/assets/data/fields';
import SWModal from 'src/components/common/modal/SWModal';
import { EDITCATEGORY } from 'src/assets/data/modal/modals';
Expand All @@ -26,6 +27,7 @@ export enum MileageCategoryBoard {
'ORDER_IDX' = ORDER_IDX,
'DESCRIPTION1' = DESCRIPTION1,
'DESCRIPTION2' = DESCRIPTION2,
'MOD_DATE' = MOD_DATE,
'MANAGE' = MANAGE,
}

Expand All @@ -40,6 +42,7 @@ interface Data {
[MileageCategoryBoard.ORDER_IDX]: number;
[MileageCategoryBoard.DESCRIPTION1]: string;
[MileageCategoryBoard.DESCRIPTION2]: string;
[MileageCategoryBoard.MOD_DATE]: string;
[MileageCategoryBoard.MANAGE]: ReactNode;
}

Expand All @@ -55,6 +58,7 @@ function createData(
ORDER_IDX: number,
DESCRIPTION1: string,
DESCRIPTION2: string,
MOD_DATE: string,
MANAGE: ReactNode
): Data {
return {
Expand All @@ -63,6 +67,7 @@ function createData(
[MileageCategoryBoard.ORDER_IDX]: ORDER_IDX,
[MileageCategoryBoard.DESCRIPTION1]: DESCRIPTION1,
[MileageCategoryBoard.DESCRIPTION2]: DESCRIPTION2,
[MileageCategoryBoard.MOD_DATE]: MOD_DATE,
[MileageCategoryBoard.MANAGE]: MANAGE,
};
}
Expand Down Expand Up @@ -104,6 +109,12 @@ const headCells = [
disablePadding: false,
label: '설명2',
},
{
id: [MileageCategoryBoard.MOD_DATE],
numeric: true,
disablePadding: false,
label: '최근 수정일',
},
{
id: [MileageCategoryBoard.MANAGE],
numeric: true,
Expand Down Expand Up @@ -182,6 +193,7 @@ export default function MileageCategory({
item[ORDER_IDX],
item[DESCRIPTION1],
item[DESCRIPTION2],
item[MOD_DATE],
<SWModal type={EDITCATEGORY} beforeData={beforeData} />
);
});
Expand Down

0 comments on commit 575183c

Please sign in to comment.