diff --git a/src/assets/style/navbarStyles.css b/src/assets/style/navbarStyles.css index c718620..a7618ce 100644 --- a/src/assets/style/navbarStyles.css +++ b/src/assets/style/navbarStyles.css @@ -112,7 +112,7 @@ #navbar div li a:hover, #navbar div li button.navTrigger:hover{ - color: #1976d2; + color: #1565C0; } #navbar div li a:hover::after, @@ -122,7 +122,7 @@ content: ""; width: 80%; height: 3px; - background:#1976d2; + background:#1565C0; position: absolute; bottom: -5px; left: 20px; diff --git a/src/components/FileDeleteButton.js b/src/components/FileDeleteButton.js new file mode 100644 index 0000000..21c4f50 --- /dev/null +++ b/src/components/FileDeleteButton.js @@ -0,0 +1,27 @@ +import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; +import { IconButton } from '@mui/material'; +import { useIntl } from 'react-intl'; +import { handleActionKeyDown } from 'utils/CommonFunction'; + +export default function FileDeleteButton({ onDelete, icon: IconComponent = RemoveCircleOutlineIcon, color = 'error' }) { + const intl = useIntl(); + const label = intl.formatMessage({ id: 'ariaDeleteFile' }); + + const handleDelete = (event) => { + onDelete(event); + }; + + return ( + handleActionKeyDown(event, handleDelete)} + > + + + ); +} diff --git a/src/components/FileList.js b/src/components/FileList.js index 412649f..48f9156 100644 --- a/src/components/FileList.js +++ b/src/components/FileList.js @@ -11,6 +11,8 @@ import { FiDataGrid } from './FiDataGrid'; import {useTheme} from "@emotion/react"; import {useMediaQuery} from "@mui/material"; import {useIntl} from "react-intl"; +import { createDeleteFileColumn } from 'utils/fileListColumns'; +import { CONTAINED_PRIMARY_BLUE } from "themes/colorConst"; // ==============================|| EVENT TABLE ||============================== // export default function FileList({ refType, refId, allowDelete, sx, dateHideable,lang, ...props }) { @@ -94,11 +96,10 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable return [ } + icon={} label="Download" className="textPrimary" onClick={onDownloadClick(params.id, params.row.skey, params.row.filename)} - color="primary" disabled={onDownload} />] }, @@ -143,11 +144,10 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable return [ } + icon={} label="Download" className="textPrimary" onClick={onDownloadClick(params.id, params.row.skey, params.row.filename)} - color="primary" disabled={onDownload} />] }, @@ -175,24 +175,10 @@ export default function FileList({ refType, refId, allowDelete, sx, dateHideable if (allowDelete) { - columns.push({ - field: 'actions', - type: 'actions', - headerName: 'Delete', - width: 100, - cellClassName: 'actions', - getActions: (params) => { - return [ - } - label="Delete" - className="textPrimary" - onClick={onDeleteClick(params.id, params.row.skey, params.row.filename)} - color="primary" - />] - }, - }); + columns.push(createDeleteFileColumn( + (id, row) => onDeleteClick(id, row.skey, row.filename), + { icon: Icon.Delete, color: 'primary', width: 100 } + )); } return ( diff --git a/src/pages/Message/Details/index.js b/src/pages/Message/Details/index.js index 2b48397..f3f4c5c 100644 --- a/src/pages/Message/Details/index.js +++ b/src/pages/Message/Details/index.js @@ -92,8 +92,8 @@ const Index = () => { {record?.subject} {DateUtils.datetimeStr(record?.sentDate)} - -
+ +
diff --git a/src/pages/Payment/FPS/FPS.js b/src/pages/Payment/FPS/FPS.js index eb009af..f0708c2 100644 --- a/src/pages/Payment/FPS/FPS.js +++ b/src/pages/Payment/FPS/FPS.js @@ -485,11 +485,17 @@ const Index = () => { component="span" variant="contained" size="large" - color="error" onClick={()=>{ cancelPayment(); }} - sx={{ m: 4 }} + sx={{ + m: 4, + backgroundColor: (theme) => theme.palette.error.darker, + color: (theme) => theme.palette.error.contrastText, + '&:hover': { + backgroundColor: (theme) => theme.palette.error.dark, + }, + }} > diff --git a/src/pages/Payment/MultiPaymentWindow.js b/src/pages/Payment/MultiPaymentWindow.js index ea8f397..976e281 100644 --- a/src/pages/Payment/MultiPaymentWindow.js +++ b/src/pages/Payment/MultiPaymentWindow.js @@ -32,6 +32,7 @@ import UnionPayIcon from "assets/images/icons/unionpay.svg"; import PpsIcon from "assets/images/icons/ppshk.svg"; import FpsIcon from "assets/images/icons/fps.svg"; import {FormattedMessage, useIntl} from "react-intl"; +import { PRIMARY_CONTAINED_BUTTON_SX, PAY_CONTAINED_BUTTON_SX } from "themes/colorConst"; import * as HttpUtils from "utils/HttpUtils" import * as UrlUtils from "utils/ApiPathConst" @@ -442,7 +443,7 @@ const MultiPaymentWindow = (props) => { - @@ -451,7 +452,7 @@ const MultiPaymentWindow = (props) => { props.onPayment? : - } diff --git a/src/pages/Payment/index.js b/src/pages/Payment/index.js index ae965ca..c9c203f 100644 --- a/src/pages/Payment/index.js +++ b/src/pages/Payment/index.js @@ -23,6 +23,7 @@ import { import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' import {ThemeProvider} from "@emotion/react"; import {PNSPS_BUTTON_THEME} from "../../themes/buttonConst"; +import { PRIMARY_CONTAINED_BUTTON_SX, PAY_CONTAINED_BUTTON_SX } from "themes/colorConst"; import { FormattedMessage, useIntl @@ -490,16 +491,16 @@ const Index = () => { variant="contained" // color="error" onClick={() => paymentClick()} - sx={{ mt: 4 }} + sx={{ mt: 4, ...PAY_CONTAINED_BUTTON_SX }} > - + diff --git a/src/pages/Proof/Create_FromApp/UploadFileTable.js b/src/pages/Proof/Create_FromApp/UploadFileTable.js index e264f79..02b1e0f 100644 --- a/src/pages/Proof/Create_FromApp/UploadFileTable.js +++ b/src/pages/Proof/Create_FromApp/UploadFileTable.js @@ -2,12 +2,10 @@ import * as React from 'react'; import { DataGrid, - GridActionsCellItem, GridRowModes } from "@mui/x-data-grid"; -import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import { useEffect } from "react"; -import { useIntl } from 'react-intl'; +import { createDeleteFileColumn } from 'utils/fileListColumns'; // import {useNavigate} from "react-router-dom"; // import { useTheme } from '@mui/material/styles'; import { @@ -18,9 +16,6 @@ import { // ==============================|| EVENT TABLE ||============================== // export default function UploadFileTable({ recordList, setRecordList, showPageColumn, _checkCode, _expectedCode }) { - const intl = useIntl(); - const deleteFileLabel = intl.formatMessage({ id: 'ariaDeleteFile' }); - const [rows, setRows] = React.useState(recordList); const [rowModesModel, setRowModesModel] = React.useState({}); const [showPage, setShowPage] = React.useState(false); @@ -70,24 +65,7 @@ export default function UploadFileTable({ recordList, setRecordList, showPageCol setRows(rows.filter((row) => row.id !== id)); } - const renderDeleteAction = (id) => ( - } - label={deleteFileLabel} - title={deleteFileLabel} - className="textPrimary" - onClick={handleCancelClick(id)} - onKeyDown={(event) => { - if (event.key === 'Enter' || event.key === ' ') { - event.preventDefault(); - event.stopPropagation(); - handleCancelClick(id)(event); - } - }} - color="error" - /> - ); + const deleteColumn = createDeleteFileColumn((id) => handleCancelClick(id)); const handlePreviewClick = (param) => () => { var reader = new FileReader(); @@ -109,15 +87,7 @@ export default function UploadFileTable({ recordList, setRecordList, showPageCol const columns = showPage?[ - { - field: 'actions', - type: 'actions', - headerName: '', - width: 30, - cellClassName: 'actions', - // hide:true, - getActions: ({ id }) => [renderDeleteAction(id)], - }, + deleteColumn, { field: 'name', headerName: 'File Name', @@ -144,15 +114,7 @@ export default function UploadFileTable({ recordList, setRecordList, showPageCol hide: true }, ]:[ - { - field: 'actions', - type: 'actions', - headerName: '', - width: 30, - cellClassName: 'actions', - // hide:true, - getActions: ({ id }) => [renderDeleteAction(id)], - }, + deleteColumn, { field: 'name', headerName: 'File Name', diff --git a/src/pages/Proof/Payment/Pay_Online.js b/src/pages/Proof/Payment/Pay_Online.js index e71c457..3358299 100644 --- a/src/pages/Proof/Payment/Pay_Online.js +++ b/src/pages/Proof/Payment/Pay_Online.js @@ -32,6 +32,37 @@ const BackgroundHead = { backgroundPosition: 'right' } +const contentBoxSx = { + px: { xs: 2, sm: 3, md: 5, lg: 6 }, + maxWidth: 1500, + width: '100%', +}; + +const headerSx = { + textAlign: 'left', + mt: 4, + fontSize: { xs: '1.15rem', sm: '1.35rem', md: '1.5rem' }, + textDecoration: 'underline', + textDecorationThickness: '2px', + textUnderlineOffset: '4px', +}; + +const bodySx = { + mt: 4, + textAlign: 'left', + fontSize: { xs: '1rem', sm: '1.1rem', md: '1.25rem' }, + lineHeight: 1.6, +}; + +const payButtonSx = { + minWidth: 'unset', + px: { xs: 2, sm: 3 }, + py: 1.25, + whiteSpace: 'nowrap', + width: { xs: '100%', sm: 'auto' }, + fontSize: { xs: '1rem', sm: '1.2rem' }, +}; + import { // useEffect, useState @@ -151,37 +182,19 @@ const Index = () => { {/*row 1*/} - -
- + + {isAfter ? ( - + ) : ( - + )} - +
{ {!checkPaymentSuspension()? - + - + + + - :null + :null } - +
{ -
diff --git a/src/pages/Proof/Reply_GLD/UploadFileTable.js b/src/pages/Proof/Reply_GLD/UploadFileTable.js index 4fa573c..2ac6050 100644 --- a/src/pages/Proof/Reply_GLD/UploadFileTable.js +++ b/src/pages/Proof/Reply_GLD/UploadFileTable.js @@ -1,19 +1,16 @@ // material-ui -import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import { DataGrid, - GridActionsCellItem, GridRowModes } from "@mui/x-data-grid"; import * as React from 'react'; import { useEffect } from "react"; -// import {useNavigate} from "react-router-dom"; -// import { useTheme } from '@mui/material/styles'; import { Box, Stack } from '@mui/material'; import {useIntl} from "react-intl"; +import { createDeleteFileColumn } from 'utils/fileListColumns'; // ==============================|| EVENT TABLE ||============================== // export default function UploadFileTable({recordList, setRecordList,}) { @@ -52,26 +49,10 @@ export default function UploadFileTable({recordList, setRecordList,}) { setRows(rows.filter((row) => row.id !== id)); } + const deleteColumn = createDeleteFileColumn((id) => handleCancelClick(id)); + const columns = [ - { - field: 'actions', - type: 'actions', - headerName: '', - width: 30, - cellClassName: 'actions', - // hide:true, - getActions: ({id}) => { - return [ - } - label="delete" - className="textPrimary" - onClick={handleCancelClick(id)} - color="error" - />] - }, - }, + deleteColumn, { id: 'name', field: 'name', diff --git a/src/pages/Proof/Reply_Public/ProofForm.js b/src/pages/Proof/Reply_Public/ProofForm.js index 2dc5997..2e17d31 100644 --- a/src/pages/Proof/Reply_Public/ProofForm.js +++ b/src/pages/Proof/Reply_Public/ProofForm.js @@ -24,6 +24,7 @@ import * as DateUtils from "utils/DateUtils" import Loadable from 'components/Loadable'; import { notifyActionSuccess } from 'utils/CommonFunction'; import { PNSPS_BUTTON_THEME } from "themes/buttonConst"; +import { PRIMARY_CONTAINED_BUTTON_SX } from "themes/colorConst"; import { ThemeProvider } from "@emotion/react"; import { FormattedMessage, useIntl } from "react-intl"; import { @@ -632,10 +633,10 @@ const FormPanel = ({ formData }) => { diff --git a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js index cdbda1c..af6677f 100644 --- a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js +++ b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js @@ -29,7 +29,7 @@ import { import { ThemeProvider, useTheme } from "@emotion/react"; import { PNSPS_BUTTON_THEME } from "../../../themes/buttonConst"; import { FormattedMessage, useIntl } from "react-intl"; -import { PRIMARY_TEXT_BUTTON_SX } from "themes/colorConst"; +import { PRIMARY_TEXT_BUTTON_SX, PRIMARY_CONTAINED_BUTTON_SX } from "themes/colorConst"; // ==============================|| EVENT TABLE ||============================== // export default function SubmittedTab({ setCount, url }) { @@ -485,13 +485,13 @@ export default function SubmittedTab({ setCount, url }) { - - diff --git a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js index 5e69bdf..9512edd 100644 --- a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js +++ b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js @@ -17,6 +17,7 @@ import * as ComboData from "utils/ComboData"; const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingComponent'))); import Loadable from 'components/Loadable'; import { notifyActiveSuccess, notifyLockSuccess, notifySaveSuccess, notifyVerifySuccess } from 'utils/CommonFunction'; +import { PRIMARY_CONTAINED_BUTTON_SX } from 'themes/colorConst'; import { useIntl } from "react-intl"; import { PNSPS_BUTTON_THEME } from "themes/buttonConst"; import { ThemeProvider } from "@emotion/react"; @@ -288,7 +289,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { diff --git a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js index 61e6c31..ca2b791 100644 --- a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js +++ b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual_Pub.js @@ -19,6 +19,7 @@ const LoadingComponent = Loadable(lazy(() => import('../../extra-pages/LoadingCo import Loadable from 'components/Loadable'; import { lazy } from 'react'; import {notifySaveSuccess,} from 'utils/CommonFunction'; +import { PRIMARY_CONTAINED_BUTTON_SX } from 'themes/colorConst'; import {FormattedMessage, useIntl} from "react-intl"; import {PNSPS_BUTTON_THEME} from "../../../themes/buttonConst"; import {ThemeProvider} from "@emotion/react"; @@ -166,7 +167,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { aria-label={intl.formatMessage({id: 'save'})} variant="contained" type="submit" - color="success" + sx={PRIMARY_CONTAINED_BUTTON_SX} disabled={formik.isSubmitting} > diff --git a/src/pages/authentication/BusRegister.js b/src/pages/authentication/BusRegister.js index fc5d3c6..741b8e2 100644 --- a/src/pages/authentication/BusRegister.js +++ b/src/pages/authentication/BusRegister.js @@ -23,6 +23,7 @@ const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); import axios from "axios"; import { POST_USERNAME, POST_VERIFY_CAPTCHA } from "utils/ApiPathConst"; import {FormattedMessage, useIntl} from "react-intl"; +import { PRIMARY_CONTAINED_BUTTON_SX } from "themes/colorConst"; // import CustomFormWizard from './auth-forms/BusCustomFormWizard'; // import AuthWrapper from './AuthWrapperCustom'; @@ -249,33 +250,33 @@ const BusRegister = () => { {activeStep === totalSteps() - 2 ? ( ) : (activeStep === totalSteps() - 1 ? ( - ) : ( // diff --git a/src/pages/authentication/Register.js b/src/pages/authentication/Register.js index da8d29f..2e50f4f 100644 --- a/src/pages/authentication/Register.js +++ b/src/pages/authentication/Register.js @@ -25,6 +25,7 @@ import { notifyActionError } from 'utils/CommonFunction'; import axios from "axios"; import {FormattedMessage, useIntl} from "react-intl"; import usePageTitle from "components/usePageTitle"; +import { PRIMARY_CONTAINED_BUTTON_SX } from "themes/colorConst"; const CustomFormWizard = Loadable(lazy(() => import('./auth-forms/CustomFormWizard'))); const AuthWrapper = Loadable(lazy(() => import('./AuthWrapperCustom'))); // ================================|| REGISTER ||================================ // @@ -255,33 +256,33 @@ const Register = () => { {activeStep === totalSteps() - 2 ? ( ) : (activeStep === totalSteps() - 1 ? ( - ) : ( // diff --git a/src/pages/authentication/auth-forms/UploadFileTable.js b/src/pages/authentication/auth-forms/UploadFileTable.js index 537300e..b344c8b 100644 --- a/src/pages/authentication/auth-forms/UploadFileTable.js +++ b/src/pages/authentication/auth-forms/UploadFileTable.js @@ -1,10 +1,8 @@ // material-ui -import RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline'; import * as React from 'react'; import { useEffect } from "react"; import { Box, - IconButton, Stack, Table, TableBody, @@ -14,7 +12,7 @@ import { Typography } from '@mui/material'; import { FormattedMessage, useIntl } from "react-intl"; -import { handleActionKeyDown } from 'utils/CommonFunction'; +import FileDeleteButton from 'components/FileDeleteButton'; // ==============================|| EVENT TABLE ||============================== // export default function UploadFileTable({ recordList, setUpdateRows, }) { @@ -71,17 +69,7 @@ export default function UploadFileTable({ recordList, setUpdateRows, }) { {rows.map((row) => ( - handleCancelClick(row.id)} - onKeyDown={(event) => handleActionKeyDown(event, () => handleCancelClick(row.id))} - > - - + handleCancelClick(row.id)} /> diff --git a/src/pages/dashboard/Public/Notice.js b/src/pages/dashboard/Public/Notice.js index 2b6e7bb..9ecd0f9 100644 --- a/src/pages/dashboard/Public/Notice.js +++ b/src/pages/dashboard/Public/Notice.js @@ -32,9 +32,15 @@ const SearchDemandNoteForm = (props) => { listData.map((item, index) => { list.push( - {locale === 'en' ?item.subjectEng:locale === 'zh-HK' ?item.subjectCht:item.subjectChs} - {DateUtils.dateValue(item.announceDate)} - {locale === 'en' ?item.contentEng:locale === 'zh-HK' ?item.contentCht:item.contentChs} + + {locale === 'en' ? item.subjectEng : locale === 'zh-HK' ? item.subjectCht : item.subjectChs} + + + {DateUtils.dateValue(item.announceDate)} + + + {locale === 'en' ? item.contentEng : locale === 'zh-HK' ? item.contentCht : item.contentChs} + ) diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index 2ddf838..a9838f1 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -100,22 +100,35 @@ const DashboardDefault = () => { p: 2, justifyContent: "flex-start", textTransform: "none", + fontSize: "inherit", + fontWeight: "inherit", // text always readable color: "#1A1A1A", // unread gets subtle highlight backgroundColor: item.readTime ? "transparent" : "#F5F7FA", - fontWeight: item.readTime ? 400 : 600, "&:hover": { backgroundColor: "#EEF2F7", }, }} > - - {item.subject} - {DateUtils.datetimeStr(item.sentDate)} + + ({ + ...theme.typography.h6, + fontWeight: item.readTime ? 400 : 600, + })} + > + {item.subject} + + + {DateUtils.datetimeStr(item.sentDate)} + )); @@ -193,7 +206,7 @@ const DashboardDefault = () => { backgroundColor: "#e1edfc", border: "0px solid #1976d2", // DARKER border (3:1+) borderRadius: "10px", - color: "#1976d2", // icon + default text color + color: "#1565C0", // icon + default text color "&:hover": { backgroundColor: "#d6e6fb" } @@ -202,7 +215,7 @@ const DashboardDefault = () => { - + @@ -220,7 +233,7 @@ const DashboardDefault = () => { aria-label={intl.formatMessage({ id: 'viewAllAnnouncement' })} onClick={() => { navigate("/announcement/search"); }} sx={{ - color: '#1976d2', + color: '#1565C0', textTransform: 'none', textDecoration: 'underline', '&:hover': { textDecoration: 'underline' } @@ -245,7 +258,7 @@ const DashboardDefault = () => { aria-label={intl.formatMessage({ id: 'viewAllSystemMessage' })} onClick={() => { navigate("/msg/search"); }} sx={{ - color: '#1976d2', + color: '#1565C0', textTransform: 'none', textDecoration: 'underline', '&:hover': { @@ -256,7 +269,7 @@ const DashboardDefault = () => { - + @@ -281,7 +294,7 @@ const DashboardDefault = () => { - +
diff --git a/src/themes/colorConst.js b/src/themes/colorConst.js index 3451676..153f729 100644 --- a/src/themes/colorConst.js +++ b/src/themes/colorConst.js @@ -37,7 +37,7 @@ export const chartLineColor = [ export const GENERAL_RED_COLOR = '#e03c04'; -export const TABLE_HEADER_TEXT_COLOR = "#3367D1"; +export const TABLE_HEADER_TEXT_COLOR = "#1565C0"; export const GENERAL_INFO_COLOR = '#448df2'; @@ -66,6 +66,17 @@ export const PRIMARY_CONTAINED_BUTTON_SX = { }, }; +/** Dark green for Pay actions — matches PNSPS_BUTTON_THEME create color (#57B962), not light green (#4ac234). */ +export const CONTAINED_DARK_GREEN = '#57B962'; + +export const PAY_CONTAINED_BUTTON_SX = { + backgroundColor: CONTAINED_DARK_GREEN, + color: '#FFFFFF', + '&:hover': { + backgroundColor: '#488F52', + }, +}; + export const PRIMARY_OUTLINED_BUTTON_SX = { color: CONTAINED_PRIMARY_BLUE, borderColor: CONTAINED_PRIMARY_BLUE, diff --git a/src/translations/en.json b/src/translations/en.json index 1072e14..561a242 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -423,6 +423,7 @@ "payMethod": "Payment methods", "epayMethod": " e-Payment Method", "selectPaymentMethod": "Please select a payment method", + "selectPaymentMethodBtn": "Select payment method", "payReceipt": "Payment Receipt", "contactPerson": "Contact Person", "requireContactPerson": "Please enter contact person", diff --git a/src/translations/zh-CN.json b/src/translations/zh-CN.json index 4a62172..8d719e5 100644 --- a/src/translations/zh-CN.json +++ b/src/translations/zh-CN.json @@ -456,6 +456,7 @@ "payMethod": "付款方式", "epayMethod": "电子付款方法", "selectPaymentMethod": "请选择付款方法", + "selectPaymentMethodBtn": "选择付款方法", "payReceipt": "付款收据", "contactPerson": "联络人", "requireContactPerson": "请输入联络人", diff --git a/src/translations/zh-HK.json b/src/translations/zh-HK.json index a4c8423..c210abe 100644 --- a/src/translations/zh-HK.json +++ b/src/translations/zh-HK.json @@ -457,6 +457,7 @@ "payMethod": "付款方式", "epayMethod": "電子付款方法", "selectPaymentMethod": "請選擇付款方法", + "selectPaymentMethodBtn": "選擇付款方法", "payReceipt": "付款收據", "contactPerson": "聯絡人", "requireContactPerson": "請輸入聯絡人", diff --git a/src/utils/CommonFunction.js b/src/utils/CommonFunction.js index a2edd83..5edba37 100644 --- a/src/utils/CommonFunction.js +++ b/src/utils/CommonFunction.js @@ -14,6 +14,7 @@ export const clickableLink=(link, label)=> { export const handleActionKeyDown = (event, action) => { if (event.key === 'Enter' || event.key === ' ') { event.preventDefault(); + event.stopPropagation(); action(event); } }; diff --git a/src/utils/fileListColumns.js b/src/utils/fileListColumns.js new file mode 100644 index 0000000..9314a0b --- /dev/null +++ b/src/utils/fileListColumns.js @@ -0,0 +1,17 @@ +import FileDeleteButton from 'components/FileDeleteButton'; + +export const createDeleteFileColumn = (getOnDelete, options = {}) => ({ + field: 'delete', + headerName: '', + width: options.width ?? 48, + sortable: false, + filterable: false, + disableColumnMenu: true, + renderCell: (params) => ( + + ), +});