| @@ -11,6 +11,7 @@ import { FiDataGrid } from "components/FiDataGrid"; | |||||
| import {useTheme} from "@emotion/react"; | import {useTheme} from "@emotion/react"; | ||||
| import {useIntl} from "react-intl"; | import {useIntl} from "react-intl"; | ||||
| import { clickableLink } from 'utils/CommonFunction'; | import { clickableLink } from 'utils/CommonFunction'; | ||||
| import { getPaymentMethodByCode } from "auth/utils"; | |||||
| import {PAYMENT_LIST} from "utils/ApiPathConst"; | import {PAYMENT_LIST} from "utils/ApiPathConst"; | ||||
| // ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
| @@ -47,12 +48,6 @@ export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnRea | |||||
| navigate('/paymentPage/details/' + params.row.id); | navigate('/paymentPage/details/' + params.row.id); | ||||
| }; | }; | ||||
| const formatPayMethod = (value) => { | |||||
| if (!value) return ""; | |||||
| const lastCommaIndex = value.lastIndexOf(','); | |||||
| return lastCommaIndex >= 0 ? value.substring(lastCommaIndex + 1) : value; | |||||
| }; | |||||
| const columns = [ | const columns = [ | ||||
| { | { | ||||
| field: 'actions', | field: 'actions', | ||||
| @@ -86,7 +81,7 @@ export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnRea | |||||
| headerName: intl.formatMessage({id: 'paymentMethod'}), | headerName: intl.formatMessage({id: 'paymentMethod'}), | ||||
| width: isMdOrLg ? 'auto' : 160, | width: isMdOrLg ? 'auto' : 160, | ||||
| flex: isMdOrLg ? 1 : undefined, | flex: isMdOrLg ? 1 : undefined, | ||||
| valueGetter: (params) => formatPayMethod(params?.value ?? params.row?.payMethod), | |||||
| renderCell: (params) => getPaymentMethodByCode(params?.value), | |||||
| }, | }, | ||||
| { | { | ||||
| id: 'transDateTime', | id: 'transDateTime', | ||||