diff --git a/src/auth/utils.js b/src/auth/utils.js index 72b2b31..06dec65 100644 --- a/src/auth/utils.js +++ b/src/auth/utils.js @@ -132,6 +132,13 @@ export const getPaymentMethod = (paymentMethod) => { return "other"; } +export const getPaymentMethodGLD = (paymentMethod) => { + if (paymentMethod == "online") return 'Online'; + if (paymentMethod == "demandNote") return 'Demand Note'; + if (paymentMethod == "office") return 'NPGO Collection Office'; + return "other"; +} + export const getSearchCriteria = (path) =>{ let searchCriteria = "" if (localStorage.getItem('searchCriteria')==""){ @@ -155,4 +162,12 @@ export const checkSearchCriteriaPath = (path) =>{ } } } -} \ No newline at end of file +} + +export const getPaymentMethodByCode = (code) => { + if (code === "01,PPSB,PPS") return "PPS"; + if (code === "02,BCMP,CreditCard" || code === "03,BCMP,CreditCard") return "CreditCard"; + if (code === "04,BCFP,FPS") return "FPS"; + return "other"; +}; + diff --git a/src/pages/DemandNote/Create/SearchForm.js b/src/pages/DemandNote/Create/SearchForm.js index 014eee0..bd41083 100644 --- a/src/pages/DemandNote/Create/SearchForm.js +++ b/src/pages/DemandNote/Create/SearchForm.js @@ -173,6 +173,11 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p setIssueSelected(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setIssueSelected(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( ( option.label} renderInput={(params) => ( ( ( ( { setSelectedYear(newValue); }} sx={{ - "& .MuiInputBase-root": { height: "41px" }, - "#year-combo": { padding: "0px 0px 0px 0px" }, - "& .MuiAutocomplete-endAdornment": { top: "auto" }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } }} renderInput={(params) => } /> diff --git a/src/pages/GazetteIssue/SearchForm.js b/src/pages/GazetteIssue/SearchForm.js index 7d53fee..37ad3d4 100644 --- a/src/pages/GazetteIssue/SearchForm.js +++ b/src/pages/GazetteIssue/SearchForm.js @@ -79,9 +79,9 @@ const SearchGazetteIssueForm = ({ applySearch, comboData, onGridReady}) => { setSelectedYear(newValue); }} sx={{ - "& .MuiInputBase-root": { height: "41px" }, - "#year-combo": { padding: "0px 0px 0px 0px" }, - "& .MuiAutocomplete-endAdornment": { top: "auto" }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } }} renderInput={(params) => } /> diff --git a/src/pages/GazetteIssue/index.js b/src/pages/GazetteIssue/index.js index 8c68610..4649ddc 100644 --- a/src/pages/GazetteIssue/index.js +++ b/src/pages/GazetteIssue/index.js @@ -1,4 +1,3 @@ -// material-ui import { Grid, Typography, @@ -16,7 +15,7 @@ import MainCard from 'components/MainCard'; const ExportForm = Loadable(React.lazy(() => import('./ExportForm'))); const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); -const GazetteIssueTable = Loadable(React.lazy(() => import('./DataGrid'))) +const GazetteIssueTable = Loadable(React.lazy(() => import('./DataGrid'))); const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, @@ -26,9 +25,9 @@ const BackgroundHead = { backgroundRepeat: 'no-repeat', backgroundColor: '#0C489E', backgroundPosition: 'right' -} -import {PNSPS_LONG_BUTTON_THEME} from "themes/buttonConst"; -import {ThemeProvider} from "@emotion/react"; +}; +import { PNSPS_LONG_BUTTON_THEME } from "themes/buttonConst"; +import { ThemeProvider } from "@emotion/react"; import { dateStr_Year } from "utils/DateUtils"; import { notifySaveSuccess } from 'utils/CommonFunction'; import { isGrantedAny } from "auth/utils"; @@ -40,19 +39,12 @@ const Index = () => { const [holidayComboData, setHolidayComboData] = React.useState([]); const [onReady, setOnReady] = React.useState(false); const [onGridReady, setGridOnReady] = React.useState(false); - const [onSearchReady, setOnSearchReady] = React.useState(false); const [onExportReady, setOnExportReady] = React.useState(false); const [searchCriteria, setSearchCriteria] = React.useState({ year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); - - const [exportCriteria, setExportCriteria] = React.useState({ - // year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), - }); - + const [exportCriteria, setExportCriteria] = React.useState({}); const [attachments, setAttachments] = React.useState([]); const [waitImport, setWaitImport] = React.useState(false); const [waitDownload, setWaitDownload] = React.useState(false); @@ -60,11 +52,9 @@ const Index = () => { const [warningText, setWarningText] = React.useState(""); React.useEffect(() => { - // console.log(searchCriteria) - setOnSearchReady(false) + setOnSearchReady(false); loadCombo(); }, [searchCriteria]); - function loadCombo() { HttpUtils.get({ @@ -72,9 +62,8 @@ const Index = () => { onSuccess: (responseData) => { let combo = responseData; setComboData(combo); - setOnSearchReady(true) - loadHolidayCombo(true) - // setOnReady(true); + setOnSearchReady(true); + loadHolidayCombo(true); } }); } @@ -83,19 +72,19 @@ const Index = () => { HttpUtils.get({ url: UrlUtils.GET_HOLIDAY_COMBO, onSuccess: (responseData) => { - let combo = responseData - setHolidayComboData(combo) - setOnExportReady(true) - setOnReady(true) + let combo = responseData; + setHolidayComboData(combo); + setOnExportReady(true); + setOnReady(true); } }); } function applySearch(input) { - setGridOnReady(true) + setGridOnReady(true); setSearchCriteria(input); } - + function applyExport(input) { setExportCriteria(input); } @@ -105,8 +94,7 @@ const Index = () => { } React.useEffect(() => { - if (Object.keys(exportCriteria).length > 0) { - // console.log(exportCriteria) + if (Object.keys(exportCriteria).length > 0) { doExport(); } }, [exportCriteria]); @@ -120,51 +108,47 @@ const Index = () => { const readFile = (event) => { let file = event.target.files[0]; if (file) { - if (!file.name.toLowerCase().substr(file.name.length - 5).includes(".xlsx")) { + if (!file.name.toLowerCase().endsWith(".xlsx")) { setWarningText("Please upload a valid file (File format: .xlsx)."); setIsWarningPopUp(true); - document.getElementById("uploadFileBtn").value = ""; + event.target.value = ""; return; } file['id'] = attachments.length; - setAttachments([ - ...attachments, - file - ]); - document.getElementById("uploadFileBtn").value = ""; + setAttachments([...attachments, file]); + event.target.value = ""; } - } + }; - const doExport=()=>{ - setWaitDownload(true) + const doExport = () => { + setWaitDownload(true); HttpUtils.fileDownload({ url: UrlUtils.GET_ISSUE_LIST, params: exportCriteria, onResponse: () => { - setTimeout(()=> setWaitDownload(false), 500) + setTimeout(() => setWaitDownload(false), 500); } }); - } + }; const importHoliday = () => { setWaitImport(true); if (!attachments || attachments.length <= 0) { setWarningText("Please upload file."); - setSaving(false); + setWaitImport(false); return; } HttpUtils.postWithFiles({ url: UrlUtils.POST_ISSUE_FILE, files: attachments, onSuccess: () => { - notifySaveSuccess() + notifySaveSuccess(); setWaitImport(false); setAttachments([]); loadCombo(); - loadForm(); } }); - } + }; return ( !onReady ? @@ -175,7 +159,7 @@ const Index = () => { : ( - +
@@ -183,63 +167,56 @@ const Index = () => {
- {!onExportReady? - : + + {!onExportReady ? + : - } - {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? + + {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) && - + - { - readFile(event) - }} - /> - + onChange={readFile} + /> + - - :null } - {/*row 1*/} + + {/* Row 1 */} - - {/*row 2*/} - {!onSearchReady? - : + + {/* Row 2 */} + {!onSearchReady ? + : - + { } -
- setIsWarningPopUp(false)} - PaperProps={{ - sx: { - minWidth: '40vw', - maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, - maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } - } - }} - > - Warning - - {warningText} - - - - - -
-
+ + setIsWarningPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + + Warning + + + {warningText} + + + + + +
) ); }; -export default Index; \ No newline at end of file +export default Index; diff --git a/src/pages/Holiday/SearchForm.js b/src/pages/Holiday/SearchForm.js index 372d65d..3a49ec1 100644 --- a/src/pages/Holiday/SearchForm.js +++ b/src/pages/Holiday/SearchForm.js @@ -79,9 +79,9 @@ const SearchHolidayForm = ({ applySearch, comboData, onGridReady}) => { setSelectedYear(newValue); }} sx={{ - "& .MuiInputBase-root": { height: "41px" }, - "#year-combo": { padding: "0px 0px 0px 0px" }, - "& .MuiAutocomplete-endAdornment": { top: "auto" }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } }} renderInput={(params) => } /> diff --git a/src/pages/Holiday/index.js b/src/pages/Holiday/index.js index 3fe85a7..e027b4e 100644 --- a/src/pages/Holiday/index.js +++ b/src/pages/Holiday/index.js @@ -1,4 +1,3 @@ -// material-ui import { Grid, Typography, @@ -12,9 +11,8 @@ import * as HttpUtils from "utils/HttpUtils"; import Loadable from 'components/Loadable'; const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); -const HolidayTable = Loadable(React.lazy(() => import('pages/Holiday/DataGrid'))) -import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png' -// import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; +const HolidayTable = Loadable(React.lazy(() => import('pages/Holiday/DataGrid'))); +import titleBackgroundImg from 'assets/images/dashboard/gazette-bar.png'; import MainCard from 'components/MainCard'; const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); @@ -26,10 +24,10 @@ const BackgroundHead = { backgroundRepeat: 'no-repeat', backgroundColor: '#0C489E', backgroundPosition: 'right' -} -// import { useNavigate } from "react-router"; -import {PNSPS_LONG_BUTTON_THEME} from "themes/buttonConst"; -import {ThemeProvider} from "@emotion/react"; +}; + +import { PNSPS_LONG_BUTTON_THEME } from "themes/buttonConst"; +import { ThemeProvider } from "@emotion/react"; import { dateStr_Year } from "utils/DateUtils"; import { notifySaveSuccess } from 'utils/CommonFunction'; import { isGrantedAny } from "auth/utils"; @@ -44,10 +42,8 @@ const Index = () => { const [onSearchReady, setOnSearchReady] = React.useState(false); const [onGridReady, setGridOnReady] = React.useState(false); - // const navigate = useNavigate() const [searchCriteria, setSearchCriteria] = React.useState({ year: dateStr_Year(new Date()), - // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), }); const [attachments, setAttachments] = React.useState([]); const [waitImport, setWaitImport] = React.useState(false); @@ -55,33 +51,21 @@ const Index = () => { const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); const [warningText, setWarningText] = React.useState(""); - // React.useLayoutEffect(() => { - // loadForm(); - // }, []); - - // React.useLayoutEffect(() => { - // if (comboData) { - // setOnReady(true); - // } - // }, [comboData]); - React.useEffect(() => { - // console.log(searchCriteria) - setOnSearchReady(false) + setOnSearchReady(false); loadForm(); }, [searchCriteria]); - + function loadForm() { HttpUtils.get({ url: UrlUtils.GET_HOLIDAY, params: searchCriteria, onSuccess: (responseData) => { - // console.log(responseData) setRecord(responseData); - if (comboData.length == 0) { + if (comboData.length === 0) { loadCombo(); - }else{ - setOnSearchReady(true) + } else { + setOnSearchReady(true); } } }); @@ -94,13 +78,13 @@ const Index = () => { let combo = responseData; setComboData(combo); setOnReady(true); - setOnSearchReady(true) + setOnSearchReady(true); } }); } function applySearch(input) { - setGridOnReady(true) + setGridOnReady(true); setSearchCriteria(input); } @@ -115,52 +99,51 @@ const Index = () => { }, [attachments]); const readFile = (event) => { - let file = event.target.files[0]; + let file = event.target.files && event.target.files[0]; if (file) { - if (!file.name.toLowerCase().substr(file.name.length - 5).includes(".xlsx")) { + if (!file.name.toLowerCase().endsWith(".xlsx")) { setWarningText("Please upload a valid file (File format: .xlsx)."); setIsWarningPopUp(true); - document.getElementById("uploadFileBtn").value = ""; + // clear the input value + event.target.value = ""; return; } file['id'] = attachments.length; - setAttachments([ - ...attachments, - file - ]); - document.getElementById("uploadFileBtn").value = ""; + setAttachments(prev => [...prev, file]); + // clear the input value + event.target.value = ""; } - } + }; - const doExport=()=>{ - setWaitDownload(true) + const doExport = () => { + setWaitDownload(true); HttpUtils.fileDownload({ url: UrlUtils.GET_HOLIDAY_TEMPLATE, onResponse: () => { - setTimeout(()=> setWaitDownload(false), 500) + setTimeout(() => setWaitDownload(false), 500); } }); - } + }; const importHoliday = () => { setWaitImport(true); setOnSearchReady(false); if (!attachments || attachments.length <= 0) { setWarningText("Please upload file."); - setSaving(false); + setWaitImport(false); return; } HttpUtils.postWithFiles({ url: UrlUtils.POST_HOLIDAY, files: attachments, onSuccess: () => { - notifySaveSuccess() + notifySaveSuccess(); setWaitImport(false); setAttachments([]); loadForm(); } }); - } + }; return ( !onReady ? @@ -171,7 +154,7 @@ const Index = () => { : ( - +
@@ -179,69 +162,60 @@ const Index = () => {
+ - - + + - + + {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? - { - readFile(event) - }} - /> - + onChange={readFile} + /> + - :null + : null } - {/*row 1*/} + {/* row 1 */} - - {/*row 2*/} - {!onSearchReady? - : + + {/* row 2 */} + {!onSearchReady ? + : - + { } -
- setIsWarningPopUp(false)} - PaperProps={{ - sx: { - minWidth: '40vw', - maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, - maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } - } - }} - > - Warning - - {warningText} - - - - - -
+ + setIsWarningPopUp(false)} + PaperProps={{ + sx: { + minWidth: '40vw', + maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, + maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } + } + }} + > + Warning + + {warningText} + + + + +
) ); }; -export default Index; \ No newline at end of file +export default Index; diff --git a/src/pages/Organization/SearchPage/OrganizationSearchForm.js b/src/pages/Organization/SearchPage/OrganizationSearchForm.js index 5e3f609..914354c 100644 --- a/src/pages/Organization/SearchPage/OrganizationSearchForm.js +++ b/src/pages/Organization/SearchPage/OrganizationSearchForm.js @@ -149,6 +149,11 @@ const OrganizationSearchForm = ({ applySearch, onGridReady, searchCriteria }) => } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} getOptionLabel={(option) => option.label} renderInput={(params) => ( { - return params?.value + return getPaymentMethodByCode(params?.value) } }, { diff --git a/src/pages/Payment/Search_GLD/SearchForm.js b/src/pages/Payment/Search_GLD/SearchForm.js index 20957ef..f93281f 100644 --- a/src/pages/Payment/Search_GLD/SearchForm.js +++ b/src/pages/Payment/Search_GLD/SearchForm.js @@ -204,6 +204,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => setStatus(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( setPayMethod(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( setStatus(ComboData.paymentStatus[0]); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { }); const readFile = (event) => { - let file = event.target.files[0]; + let file = event.target.files && event.target.files[0]; if (file) { if (!file.name.toLowerCase().substr(file.name.length - 4).includes(".pdf")) { setWarningText("Please upload a valid file (File format: .pdf)."); setIsWarningPopUp(true); - document.getElementById("uploadFileBtn").value = ""; + event.target.value = ""; return; } if (file.size >= (10 * 1024 * 1034)) { setWarningText("The file size for uploading should be less than 10MB"); setIsWarningPopUp(true); + event.target.value = ""; return; } file['id'] = attachments.length; @@ -198,10 +198,12 @@ const FormPanel = ({ formData }) => { ...attachments, file ]); - document.getElementById("uploadFileBtn").value = ""; + event.target.value = ""; } } + const maxUploadsForType = (groupType) => (groupType === "Private Bill" ? 2 : 1); + return ( {
- = (formik.values.groupType == "Private Bill" ? 2 : 1)} - onChange={(event) => { - readFile(event) - }} - /> - + @@ -403,7 +400,10 @@ const FormPanel = ({ formData }) => { { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setGroupSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( ( ( { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( ( import('components/MainCard'))); import { useForm } from "react-hook-form"; import { @@ -34,7 +34,7 @@ import DownloadIcon from '@mui/icons-material/Download'; import ReplayIcon from '@mui/icons-material/Replay'; import { notifyDownloadSuccess } from 'utils/CommonFunction'; import { isGrantedAny } from "auth/utils"; -import { useIntl } from "react-intl"; +// import { useIntl } from "react-intl"; // ==============================|| DASHBOARD - DEFAULT ||============================== // const ApplicationDetailCard = ( @@ -58,7 +58,7 @@ const ApplicationDetailCard = ( const [mode, setMode] = useState(""); const { register, handleSubmit } = useForm() - const intl = useIntl(); + // const intl = useIntl(); const [isWarningPopUp, setIsWarningPopUp] = useState(false); const [warningText, setWarningText] = useState(""); @@ -762,7 +762,7 @@ const ApplicationDetailCard = ( id='paymentMethod' variant="h5" > - {currentApplicationDetailData.paymentMethod!=null?intl.formatMessage({ id: getPaymentMethod(currentApplicationDetailData.paymentMethod)}):""} + {currentApplicationDetailData.paymentMethod!=null?getPaymentMethodGLD(currentApplicationDetailData.paymentMethod):""} @@ -935,6 +935,11 @@ const ApplicationDetailCard = ( onChange={(event, newValue) => { setPaymentMeans(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { props.setSelectedGazetteGroupInputType(""); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} // sx={{"& .MuiInputBase-root": { height: "41px" },"#idDocType":{padding: "0px 0px 0px 0px"}, "& .MuiAutocomplete-endAdornment": { top: "auto" },}} renderInput={(params) => } /> diff --git a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js index 8c0881e..09f58a1 100644 --- a/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js +++ b/src/pages/PublicNotice/ListPanel/PendingPaymentTab.js @@ -393,6 +393,11 @@ export default function SubmittedTab({ setCount, url }) { // console.log(newValue) setSelectedCareOf(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> diff --git a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js index a568f4c..6721000 100644 --- a/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js +++ b/src/pages/PublicNotice/ListPanel/SearchPublicNoticeForm.js @@ -242,6 +242,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => setStatus(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( option.label} renderInput={(params) => ( option?.name ?? ""} - inputValue={inputValue} // 👈 controlled input text - onInputChange={(event, newInputValue) => { // 👈 update when user types + inputValue={inputValue} + onInputChange={(event, newInputValue) => { setInputValue(newInputValue); }} onChange={(event, newValue) => { @@ -315,6 +320,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss setOrgSelected({}); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setGroupSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( option.label} renderInput={(params) => ( { diff --git a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js index 4c1c35b..acfc367 100644 --- a/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js +++ b/src/pages/PublicNotice/Search_Mark_As_Paid_GLD/SearchForm.js @@ -266,38 +266,10 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss setSelectedStatus(newValue); } }} - getOptionLabel={(option) => option.label} - renderInput={(params) => ( - - )} - /> - {/* { - const findAllIndex = newValue.findIndex((ele) => { - return ele.type === "all" - }) - - if (findAllIndex > -1) { - setSelectedStatus([newValue[findAllIndex]]); - setSelectedLabelsString('all') - } else { - const selectedLabels = newValue.map(option => option.type); - const selectedLabelsString = `${selectedLabels.join(',')}`; - setSelectedStatus(newValue); - setSelectedLabelsString(selectedLabelsString); - } + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } }} getOptionLabel={(option) => option.label} renderInput={(params) => ( @@ -309,7 +281,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss }} /> )} - /> */} + /> { @@ -325,7 +297,6 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss value={orgSelected} getOptionLabel={(option) => option.name? option.name : ""} inputValue={orgSelected ? orgSelected.name!=undefined?orgSelected.name:"" : ""} - onChange={(event, newValue) => { if (newValue !== null) { setOrgSelected(newValue); @@ -333,6 +304,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss setOrgSelected({}); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setMethod(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { setStatus(newValue); } }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { onChange={(event, newValue) => { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { onChange={(event, newValue) => { setIssueSelected(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { : - +
- Announcement + Report
{/*row 1*/} - + + + Gazette Notice Full List + + + + Summary of Gazette Notice + ( ( { - if (newValue !== null){ - setAccountFilter(newValue); - }else{ - setAccountFilter("All"); - } - }} + if (newValue !== null){ + setAccountFilter(newValue); + }else{ + setAccountFilter("All"); + } + }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => ( { onChange={(event, newValue) => { setSelectedAddress4(newValue); }} - sx={{ "& .MuiInputBase-root": { height: "41px" }, - "#address4-combo": { padding: "0px 0px 0px 3px" }, - "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> @@ -1083,8 +1085,11 @@ const BusCustomFormWizard = (props) => { setCheckCountry(true) } }} - - sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> {formik.touched.address1 && formik.errors.address1 && ( diff --git a/src/pages/authentication/auth-forms/CustomFormWizard.js b/src/pages/authentication/auth-forms/CustomFormWizard.js index 5e0127a..666a4b9 100644 --- a/src/pages/authentication/auth-forms/CustomFormWizard.js +++ b/src/pages/authentication/auth-forms/CustomFormWizard.js @@ -1101,7 +1101,11 @@ const CustomFormWizard = (props) => { setSelectedIdDocType({}); } }} - sx={{ "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => { setSelectedAddress4(newValue); }} sx={{ - "& .MuiInputBase-root": { height: "41px" }, - "#address4-combo": { padding: "0px 0px 0px 3px" }, - "& .MuiAutocomplete-endAdornment": { top: "auto" }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } }} renderInput={(params) => } @@ -1452,8 +1456,11 @@ const CustomFormWizard = (props) => { setCheckCountry(true) } }} - - sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 3px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> {formik.touched.address1 && formik.errors.address1 && ( diff --git a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js index 358f71b..57e5e36 100644 --- a/src/pages/authentication/auth-forms/IAmSmartFormWizard.js +++ b/src/pages/authentication/auth-forms/IAmSmartFormWizard.js @@ -615,7 +615,11 @@ const CustomFormWizard = (props) => { onChange={(event, newValue) => { setSelectedAddress4(newValue); }} - sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address4-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> @@ -640,8 +644,11 @@ const CustomFormWizard = (props) => { setCheckCountry(true) } }} - - sx={{ "& .MuiInputBase-root": { height: "41px" }, "#address5-combo": { padding: "0px 0px 0px 0px" }, "& .MuiAutocomplete-endAdornment": { top: "auto" }, }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> {formik.touched.address1 && formik.errors.address1 && ( diff --git a/src/pages/pnspsUserGroupDetailPage/UserAddCard.js b/src/pages/pnspsUserGroupDetailPage/UserAddCard.js index 2b1af31..4a6a289 100644 --- a/src/pages/pnspsUserGroupDetailPage/UserAddCard.js +++ b/src/pages/pnspsUserGroupDetailPage/UserAddCard.js @@ -128,6 +128,11 @@ const UserAddCard = ({ isCollectData, updateGroupMember, userGroupData, isNewRec // console.log(newValue) setSelectedUser(newValue); }} + sx={{ + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 } + }} renderInput={(params) => } /> diff --git a/src/utils/Combo.js b/src/utils/Combo.js index e426802..6a0b761 100644 --- a/src/utils/Combo.js +++ b/src/utils/Combo.js @@ -41,13 +41,9 @@ export default function Combo ({valueName, disabled, form, dataList, filterOptio } }} sx={{ - "& .MuiInputBase-root": { - height: "41px", - padding: "0px 0px 0px 8px" - }, - "& .MuiAutocomplete-endAdornment": { - top: "auto" - }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 }, "& .MuiInputBase-input.Mui-disabled": { WebkitTextFillColor: "#000000", background: "#f8f8f8", diff --git a/src/utils/SelectBase.js b/src/utils/SelectBase.js index 385e058..806ff0d 100644 --- a/src/utils/SelectBase.js +++ b/src/utils/SelectBase.js @@ -40,13 +40,9 @@ export default function Combo ({valueName, disabled, form, dataList, filterOptio } }} sx={{ - "& .MuiInputBase-root": { - height: "41px", - padding: "0px 0px 0px 8px" - }, - "& .MuiAutocomplete-endAdornment": { - top: "auto" - }, + '& .MuiInputBase-root': { alignItems: 'center' }, + '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, + '& .MuiOutlinedInput-root': { height: 40 }, "& .MuiInputBase-input.Mui-disabled": { WebkitTextFillColor: "#000000", background: "#f8f8f8",