From 6fb801460c791adf1de3fbfca0c6327aadf7bb06 Mon Sep 17 00:00:00 2001 From: "jason.lam" Date: Wed, 24 Jan 2024 17:54:53 +0800 Subject: [PATCH] update main page --- src/pages/Message/Search/SearchForm.js | 5 +++++ src/pages/dashboard/Public/index.js | 20 ++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/pages/Message/Search/SearchForm.js b/src/pages/Message/Search/SearchForm.js index 1900f9a..8416206 100644 --- a/src/pages/Message/Search/SearchForm.js +++ b/src/pages/Message/Search/SearchForm.js @@ -77,6 +77,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { fullWidth {...register("keyword")} id='keyword' + aria-label={intl.formatMessage({id: 'keyword'})} label={intl.formatMessage({id: 'keyword'}) + ":"} defaultValue={searchCriteria.code} InputLabelProps={{ @@ -93,6 +94,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { {...register("dateFrom")} id="dateFrom" type="date" + aria-label={intl.formatMessage({id: 'dateFrom'})} label={intl.formatMessage({id: 'dateFrom'})} defaultValue={searchCriteria.dateFrom} InputProps={{ inputProps: { max: maxDate } }} @@ -120,6 +122,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { onChange={(newValue) => { setMaxDate(DateUtils.dateStr(newValue)); }} + aria-label={intl.formatMessage({id: 'dateTo'})} id="dateTo" type="date" //label="付款日期(到)" @@ -139,6 +142,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { @@ -148,6 +152,7 @@ const SearchForm = ({ applySearch, searchCriteria }) => { diff --git a/src/pages/dashboard/Public/index.js b/src/pages/dashboard/Public/index.js index b895e9f..aaa3d18 100644 --- a/src/pages/dashboard/Public/index.js +++ b/src/pages/dashboard/Public/index.js @@ -10,7 +10,7 @@ import { } from '@mui/material'; import { isORGLoggedIn, } from "utils/Utils"; import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' -import { FormattedMessage } from "react-intl"; +import {FormattedMessage, useIntl} from "react-intl"; import AdsClickRoundedIcon from '@mui/icons-material/AdsClickRounded'; import * as React from "react"; import Loadable from 'components/Loadable'; @@ -23,6 +23,7 @@ import { useNavigate } from "react-router-dom"; const DashboardDefault = () => { const navigate = useNavigate() + const intl = useIntl(); const userData = JSON.parse(localStorage.getItem("userData")); const BackgroundHead = { // backgroundColor: '#0d47a1', @@ -49,7 +50,12 @@ const DashboardDefault = () => { - @@ -80,7 +89,10 @@ const DashboardDefault = () => { -