From 60ebb0fdf8dc88f5a7b4f806bd13884169273542 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Mon, 8 Jan 2024 18:06:56 +0800 Subject: [PATCH] update public notice detail --- .../Details_Public/ApplicationDetailCard.js | 45 +++++++++---------- .../PublicNotice/Details_Public/index.js | 6 +-- .../tabTableDetail/PaymentTab.js | 14 ++++-- .../Details_Public/tabTableDetail/ProofTab.js | 17 ++++--- 4 files changed, 46 insertions(+), 36 deletions(-) diff --git a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js index 2994b10..1f73e27 100644 --- a/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js +++ b/src/pages/PublicNotice/Details_Public/ApplicationDetailCard.js @@ -184,7 +184,7 @@ const ApplicationDetailCard = ( - + @@ -212,7 +212,7 @@ const ApplicationDetailCard = ( - + @@ -249,7 +249,7 @@ const ApplicationDetailCard = ( - + @@ -294,7 +294,7 @@ const ApplicationDetailCard = ( - + @@ -326,7 +326,7 @@ const ApplicationDetailCard = ( - + @@ -354,7 +354,7 @@ const ApplicationDetailCard = ( - + @@ -387,7 +387,7 @@ const ApplicationDetailCard = ( - + @@ -434,7 +434,7 @@ const ApplicationDetailCard = ( { fee > 0 ? - + @@ -451,14 +451,14 @@ const ApplicationDetailCard = ( } - + 傳真號碼: - + - + - + - 稿件檔案: - - - + + + - + @@ -541,7 +538,7 @@ const ApplicationDetailCard = ( {isORGLoggedIn() ? - + @@ -553,7 +550,7 @@ const ApplicationDetailCard = ( : null } - + diff --git a/src/pages/PublicNotice/Details_Public/index.js b/src/pages/PublicNotice/Details_Public/index.js index e747ddb..96588fc 100644 --- a/src/pages/PublicNotice/Details_Public/index.js +++ b/src/pages/PublicNotice/Details_Public/index.js @@ -149,7 +149,7 @@ const DashboardDefault = () => { }; return ( - +
@@ -169,7 +169,7 @@ const DashboardDefault = () => { - + { - + () => { navigate('/paymentPage/details/' + params.row.id); @@ -23,7 +26,8 @@ export default function SubmittedTab({ rows }) { { field: 'actions', headerName: '付款編號', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, cellClassName: 'actions', renderCell: (params) => { return ; @@ -33,7 +37,8 @@ export default function SubmittedTab({ rows }) { id: 'transDateTime', field: 'transDateTime', headerName: '付款日期', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return DateUtils.datetimeStr(params.value); } @@ -42,7 +47,8 @@ export default function SubmittedTab({ rows }) { id: 'status', field: 'status', headerName: '付款狀況', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { return PaymentStatus.getStatus_Cht(params); } diff --git a/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js b/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js index 04e27c8..1f1f65d 100644 --- a/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js +++ b/src/pages/PublicNotice/Details_Public/tabTableDetail/ProofTab.js @@ -1,18 +1,21 @@ // material-ui import * as React from 'react'; import { - Button, + Button, useMediaQuery, } from '@mui/material'; import { useNavigate } from "react-router-dom"; import * as DateUtils from "utils/DateUtils"; import * as ProofStatus from "utils/statusUtils/ProofStatus"; import {FiDataGrid} from "components/FiDataGrid"; import * as FormatUtils from "utils/FormatUtils" +import {useTheme} from "@emotion/react"; // ==============================|| EVENT TABLE ||============================== // export default function ProofTab({rows}) { const navigate = useNavigate() + const theme = useTheme(); + const isMdOrLg = useMediaQuery(theme.breakpoints.up('md')); const handleEditClick = (params) => () => { navigate('/proof/reply/' + params.row.id); @@ -32,7 +35,8 @@ export default function ProofTab({rows}) { { id: 'actions', headerName: '狀態', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, renderCell: (params) => { return ProofStatus.getStatus_Cht(params); }, @@ -41,7 +45,8 @@ export default function ProofTab({rows}) { id: 'created', field: 'created', headerName: '校對日期', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return DateUtils.datetimeStr(params?.value); } @@ -50,7 +55,8 @@ export default function ProofTab({rows}) { id: 'replyDate', field: 'replyDate', headerName: '回覆日期', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return params?.value?DateUtils.datetimeStr(params?.value):""; } @@ -59,7 +65,8 @@ export default function ProofTab({rows}) { id: 'fee', field: 'fee', headerName: '費用', - flex: 1, + width: isMdOrLg ? 'auto' : 160, + flex: isMdOrLg ? 1 : undefined, valueGetter: (params) => { return (params?.value)?"$ "+FormatUtils.currencyFormat(params?.value):""; }