| @@ -132,6 +132,13 @@ export const getPaymentMethod = (paymentMethod) => { | |||||
| return "other"; | 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) =>{ | export const getSearchCriteria = (path) =>{ | ||||
| let searchCriteria = "" | let searchCriteria = "" | ||||
| if (localStorage.getItem('searchCriteria')==""){ | if (localStorage.getItem('searchCriteria')==""){ | ||||
| @@ -155,4 +162,12 @@ export const checkSearchCriteriaPath = (path) =>{ | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | |||||
| } | |||||
| 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"; | |||||
| }; | |||||
| @@ -173,6 +173,11 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData, _paymentCount, _p | |||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue" | label="Gazette Issue" | ||||
| @@ -174,6 +174,11 @@ const SearchPublicNoticeForm = ({ applySearch, issueComboData }) => { | |||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue" | label="Gazette Issue" | ||||
| @@ -211,6 +211,11 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -256,6 +261,11 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| setOrgSelected({}); | setOrgSelected({}); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Organisation" | label="Organisation" | ||||
| @@ -420,6 +430,11 @@ const SearchDemandNoteForm = ({ applySearch, orgComboData, searchCriteria, issue | |||||
| setSelectedStatus(newValue); | setSelectedStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| getOptionLabel={(option) => option.label} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| @@ -167,6 +167,11 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData, onG | |||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label={intl.formatMessage({ id: 'gazetteCount' })} | label={intl.formatMessage({ id: 'gazetteCount' })} | ||||
| @@ -274,6 +279,11 @@ const SearchDemandNoteForm = ({ applySearch, searchCriteria, issueComboData, onG | |||||
| setSelectedStatus(newValue); | setSelectedStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| {...params} | {...params} | ||||
| @@ -180,6 +180,11 @@ const SearchPublicNoticeForm = ({ applySearch, generateXML, searchCriteria, onGr | |||||
| setPayMethod(newValue); | setPayMethod(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Payment Means" | label="Payment Means" | ||||
| @@ -81,9 +81,9 @@ const SearchGazetteIssueForm = ({ applyExport, comboData, waitDownload}) => { | |||||
| setSelectedYear(newValue); | setSelectedYear(newValue); | ||||
| }} | }} | ||||
| sx={{ | 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) => <TextField {...params} placeholder={""}/>} | renderInput={(params) => <TextField {...params} placeholder={""}/>} | ||||
| /> | /> | ||||
| @@ -79,9 +79,9 @@ const SearchGazetteIssueForm = ({ applySearch, comboData, onGridReady}) => { | |||||
| setSelectedYear(newValue); | setSelectedYear(newValue); | ||||
| }} | }} | ||||
| sx={{ | 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) => <TextField {...params} placeholder={""}/>} | renderInput={(params) => <TextField {...params} placeholder={""}/>} | ||||
| /> | /> | ||||
| @@ -1,4 +1,3 @@ | |||||
| // material-ui | |||||
| import { | import { | ||||
| Grid, | Grid, | ||||
| Typography, | Typography, | ||||
| @@ -16,7 +15,7 @@ import MainCard from 'components/MainCard'; | |||||
| const ExportForm = Loadable(React.lazy(() => import('./ExportForm'))); | const ExportForm = Loadable(React.lazy(() => import('./ExportForm'))); | ||||
| const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); | const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); | ||||
| const GazetteIssueTable = Loadable(React.lazy(() => import('./DataGrid'))) | |||||
| const GazetteIssueTable = Loadable(React.lazy(() => import('./DataGrid'))); | |||||
| const BackgroundHead = { | const BackgroundHead = { | ||||
| backgroundImage: `url(${titleBackgroundImg})`, | backgroundImage: `url(${titleBackgroundImg})`, | ||||
| @@ -26,9 +25,9 @@ const BackgroundHead = { | |||||
| backgroundRepeat: 'no-repeat', | backgroundRepeat: 'no-repeat', | ||||
| backgroundColor: '#0C489E', | backgroundColor: '#0C489E', | ||||
| backgroundPosition: 'right' | 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 { dateStr_Year } from "utils/DateUtils"; | ||||
| import { notifySaveSuccess } from 'utils/CommonFunction'; | import { notifySaveSuccess } from 'utils/CommonFunction'; | ||||
| import { isGrantedAny } from "auth/utils"; | import { isGrantedAny } from "auth/utils"; | ||||
| @@ -40,19 +39,12 @@ const Index = () => { | |||||
| const [holidayComboData, setHolidayComboData] = React.useState([]); | const [holidayComboData, setHolidayComboData] = React.useState([]); | ||||
| const [onReady, setOnReady] = React.useState(false); | const [onReady, setOnReady] = React.useState(false); | ||||
| const [onGridReady, setGridOnReady] = React.useState(false); | const [onGridReady, setGridOnReady] = React.useState(false); | ||||
| const [onSearchReady, setOnSearchReady] = React.useState(false); | const [onSearchReady, setOnSearchReady] = React.useState(false); | ||||
| const [onExportReady, setOnExportReady] = React.useState(false); | const [onExportReady, setOnExportReady] = React.useState(false); | ||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| year: dateStr_Year(new Date()), | 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 [attachments, setAttachments] = React.useState([]); | ||||
| const [waitImport, setWaitImport] = React.useState(false); | const [waitImport, setWaitImport] = React.useState(false); | ||||
| const [waitDownload, setWaitDownload] = React.useState(false); | const [waitDownload, setWaitDownload] = React.useState(false); | ||||
| @@ -60,11 +52,9 @@ const Index = () => { | |||||
| const [warningText, setWarningText] = React.useState(""); | const [warningText, setWarningText] = React.useState(""); | ||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| // console.log(searchCriteria) | |||||
| setOnSearchReady(false) | |||||
| setOnSearchReady(false); | |||||
| loadCombo(); | loadCombo(); | ||||
| }, [searchCriteria]); | }, [searchCriteria]); | ||||
| function loadCombo() { | function loadCombo() { | ||||
| HttpUtils.get({ | HttpUtils.get({ | ||||
| @@ -72,9 +62,8 @@ const Index = () => { | |||||
| onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
| let combo = responseData; | let combo = responseData; | ||||
| setComboData(combo); | setComboData(combo); | ||||
| setOnSearchReady(true) | |||||
| loadHolidayCombo(true) | |||||
| // setOnReady(true); | |||||
| setOnSearchReady(true); | |||||
| loadHolidayCombo(true); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| @@ -83,19 +72,19 @@ const Index = () => { | |||||
| HttpUtils.get({ | HttpUtils.get({ | ||||
| url: UrlUtils.GET_HOLIDAY_COMBO, | url: UrlUtils.GET_HOLIDAY_COMBO, | ||||
| onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
| let combo = responseData | |||||
| setHolidayComboData(combo) | |||||
| setOnExportReady(true) | |||||
| setOnReady(true) | |||||
| let combo = responseData; | |||||
| setHolidayComboData(combo); | |||||
| setOnExportReady(true); | |||||
| setOnReady(true); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| function applySearch(input) { | function applySearch(input) { | ||||
| setGridOnReady(true) | |||||
| setGridOnReady(true); | |||||
| setSearchCriteria(input); | setSearchCriteria(input); | ||||
| } | } | ||||
| function applyExport(input) { | function applyExport(input) { | ||||
| setExportCriteria(input); | setExportCriteria(input); | ||||
| } | } | ||||
| @@ -105,8 +94,7 @@ const Index = () => { | |||||
| } | } | ||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| if (Object.keys(exportCriteria).length > 0) { | |||||
| // console.log(exportCriteria) | |||||
| if (Object.keys(exportCriteria).length > 0) { | |||||
| doExport(); | doExport(); | ||||
| } | } | ||||
| }, [exportCriteria]); | }, [exportCriteria]); | ||||
| @@ -120,51 +108,47 @@ const Index = () => { | |||||
| const readFile = (event) => { | const readFile = (event) => { | ||||
| let file = event.target.files[0]; | let file = event.target.files[0]; | ||||
| if (file) { | 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)."); | setWarningText("Please upload a valid file (File format: .xlsx)."); | ||||
| setIsWarningPopUp(true); | setIsWarningPopUp(true); | ||||
| document.getElementById("uploadFileBtn").value = ""; | |||||
| event.target.value = ""; | |||||
| return; | return; | ||||
| } | } | ||||
| file['id'] = attachments.length; | 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({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GET_ISSUE_LIST, | url: UrlUtils.GET_ISSUE_LIST, | ||||
| params: exportCriteria, | params: exportCriteria, | ||||
| onResponse: () => { | onResponse: () => { | ||||
| setTimeout(()=> setWaitDownload(false), 500) | |||||
| setTimeout(() => setWaitDownload(false), 500); | |||||
| } | } | ||||
| }); | }); | ||||
| } | |||||
| }; | |||||
| const importHoliday = () => { | const importHoliday = () => { | ||||
| setWaitImport(true); | setWaitImport(true); | ||||
| if (!attachments || attachments.length <= 0) { | if (!attachments || attachments.length <= 0) { | ||||
| setWarningText("Please upload file."); | setWarningText("Please upload file."); | ||||
| setSaving(false); | |||||
| setWaitImport(false); | |||||
| return; | return; | ||||
| } | } | ||||
| HttpUtils.postWithFiles({ | HttpUtils.postWithFiles({ | ||||
| url: UrlUtils.POST_ISSUE_FILE, | url: UrlUtils.POST_ISSUE_FILE, | ||||
| files: attachments, | files: attachments, | ||||
| onSuccess: () => { | onSuccess: () => { | ||||
| notifySaveSuccess() | |||||
| notifySaveSuccess(); | |||||
| setWaitImport(false); | setWaitImport(false); | ||||
| setAttachments([]); | setAttachments([]); | ||||
| loadCombo(); | loadCombo(); | ||||
| loadForm(); | |||||
| } | } | ||||
| }); | }); | ||||
| } | |||||
| }; | |||||
| return ( | return ( | ||||
| !onReady ? | !onReady ? | ||||
| @@ -175,7 +159,7 @@ const Index = () => { | |||||
| </Grid> | </Grid> | ||||
| : | : | ||||
| ( | ( | ||||
| <Grid container sx={{minHeight: '87vh', backgroundColor: 'backgroundColor.default'}} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid container sx={{ minHeight: '87vh', backgroundColor: 'backgroundColor.default' }} direction="column" justifyContent="flex-start" alignItems="center"> | |||||
| <Grid item xs={12} width="100%"> | <Grid item xs={12} width="100%"> | ||||
| <div style={BackgroundHead} width="100%"> | <div style={BackgroundHead} width="100%"> | ||||
| <Stack direction="row" height='70px'> | <Stack direction="row" height='70px'> | ||||
| @@ -183,63 +167,56 @@ const Index = () => { | |||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| {!onExportReady? | |||||
| <LoadingComponent />: | |||||
| {!onExportReady ? | |||||
| <LoadingComponent /> : | |||||
| <Grid item xs={12} md={12} lg={12} width="100%"> | <Grid item xs={12} md={12} lg={12} width="100%"> | ||||
| <ExportForm | |||||
| <ExportForm | |||||
| applyExport={applyExport} | applyExport={applyExport} | ||||
| comboData={holidayComboData} | comboData={holidayComboData} | ||||
| waitDownload={waitDownload} | waitDownload={waitDownload} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| } | } | ||||
| {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? | |||||
| {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) && | |||||
| <Grid item xs={12} md={12} lg={6} width="100%"> | <Grid item xs={12} md={12} lg={6} width="100%"> | ||||
| <Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ml:2,mt:1}} > | |||||
| <Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ ml: 2, mt: 1 }}> | |||||
| <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | ||||
| <input | |||||
| id="uploadFileBtn" | |||||
| name="file" | |||||
| type="file" | |||||
| accept=".xlsx" | |||||
| style={{ display: 'none' }} | |||||
| <Button | |||||
| component="label" | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={waitImport} | disabled={waitImport} | ||||
| onChange={(event) => { | |||||
| readFile(event) | |||||
| }} | |||||
| /> | |||||
| <label htmlFor="uploadFileBtn"> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| <input | |||||
| type="file" | |||||
| accept=".xlsx" | |||||
| hidden | |||||
| disabled={waitImport} | disabled={waitImport} | ||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| </Button> | |||||
| </label> | |||||
| onChange={readFile} | |||||
| /> | |||||
| </Button> | |||||
| </ThemeProvider> | </ThemeProvider> | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| :null | |||||
| } | } | ||||
| {/*row 1*/} | |||||
| {/* Row 1 */} | |||||
| <Grid item xs={12} md={12} lg={12} width="100%"> | <Grid item xs={12} md={12} lg={12} width="100%"> | ||||
| <SearchForm | |||||
| <SearchForm | |||||
| applySearch={applySearch} | applySearch={applySearch} | ||||
| comboData={comboData} | comboData={comboData} | ||||
| onGridReady={onGridReady} | onGridReady={onGridReady} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| {/*row 2*/} | |||||
| {!onSearchReady? | |||||
| <LoadingComponent/>: | |||||
| {/* Row 2 */} | |||||
| {!onSearchReady ? | |||||
| <LoadingComponent /> : | |||||
| <Grid item xs={12} md={12} lg={12} width="100%"> | <Grid item xs={12} md={12} lg={12} width="100%"> | ||||
| <MainCard elevation={0} | |||||
| border={false} | |||||
| content={false} | |||||
| > | |||||
| <MainCard elevation={0} border={false} content={false}> | |||||
| <GazetteIssueTable | <GazetteIssueTable | ||||
| searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
| applyGridOnReady={applyGridOnReady} | applyGridOnReady={applyGridOnReady} | ||||
| @@ -247,30 +224,33 @@ const Index = () => { | |||||
| </MainCard> | </MainCard> | ||||
| </Grid> | </Grid> | ||||
| } | } | ||||
| <div> | |||||
| <Dialog | |||||
| open={isWarningPopUp} | |||||
| onClose={() => setIsWarningPopUp(false)} | |||||
| PaperProps={{ | |||||
| sx: { | |||||
| minWidth: '40vw', | |||||
| maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, | |||||
| maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } | |||||
| } | |||||
| }} | |||||
| > | |||||
| <DialogTitle><Typography variant="h3">Warning</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setIsWarningPopUp(false)}><Typography variant="h5">OK</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </div> | |||||
| </Grid > | |||||
| <Dialog | |||||
| open={isWarningPopUp} | |||||
| onClose={() => setIsWarningPopUp(false)} | |||||
| PaperProps={{ | |||||
| sx: { | |||||
| minWidth: '40vw', | |||||
| maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, | |||||
| maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } | |||||
| } | |||||
| }} | |||||
| > | |||||
| <DialogTitle> | |||||
| <Typography variant="h3">Warning</Typography> | |||||
| </DialogTitle> | |||||
| <DialogContent style={{ display: 'flex' }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setIsWarningPopUp(false)}> | |||||
| <Typography variant="h5">OK</Typography> | |||||
| </Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </Grid> | |||||
| ) | ) | ||||
| ); | ); | ||||
| }; | }; | ||||
| export default Index; | |||||
| export default Index; | |||||
| @@ -79,9 +79,9 @@ const SearchHolidayForm = ({ applySearch, comboData, onGridReady}) => { | |||||
| setSelectedYear(newValue); | setSelectedYear(newValue); | ||||
| }} | }} | ||||
| sx={{ | 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) => <TextField {...params} placeholder={""}/>} | renderInput={(params) => <TextField {...params} placeholder={""}/>} | ||||
| /> | /> | ||||
| @@ -1,4 +1,3 @@ | |||||
| // material-ui | |||||
| import { | import { | ||||
| Grid, | Grid, | ||||
| Typography, | Typography, | ||||
| @@ -12,9 +11,8 @@ import * as HttpUtils from "utils/HttpUtils"; | |||||
| import Loadable from 'components/Loadable'; | import Loadable from 'components/Loadable'; | ||||
| const LoadingComponent = Loadable(React.lazy(() => import('pages/extra-pages/LoadingComponent'))); | 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'; | import MainCard from 'components/MainCard'; | ||||
| const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); | const SearchForm = Loadable(React.lazy(() => import('./SearchForm'))); | ||||
| @@ -26,10 +24,10 @@ const BackgroundHead = { | |||||
| backgroundRepeat: 'no-repeat', | backgroundRepeat: 'no-repeat', | ||||
| backgroundColor: '#0C489E', | backgroundColor: '#0C489E', | ||||
| backgroundPosition: 'right' | 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 { dateStr_Year } from "utils/DateUtils"; | ||||
| import { notifySaveSuccess } from 'utils/CommonFunction'; | import { notifySaveSuccess } from 'utils/CommonFunction'; | ||||
| import { isGrantedAny } from "auth/utils"; | import { isGrantedAny } from "auth/utils"; | ||||
| @@ -44,10 +42,8 @@ const Index = () => { | |||||
| const [onSearchReady, setOnSearchReady] = React.useState(false); | const [onSearchReady, setOnSearchReady] = React.useState(false); | ||||
| const [onGridReady, setGridOnReady] = React.useState(false); | const [onGridReady, setGridOnReady] = React.useState(false); | ||||
| // const navigate = useNavigate() | |||||
| const [searchCriteria, setSearchCriteria] = React.useState({ | const [searchCriteria, setSearchCriteria] = React.useState({ | ||||
| year: dateStr_Year(new Date()), | year: dateStr_Year(new Date()), | ||||
| // dateFrom: DateUtils.dateValue(new Date().setDate(new Date().getDate()-14)), | |||||
| }); | }); | ||||
| const [attachments, setAttachments] = React.useState([]); | const [attachments, setAttachments] = React.useState([]); | ||||
| const [waitImport, setWaitImport] = React.useState(false); | const [waitImport, setWaitImport] = React.useState(false); | ||||
| @@ -55,33 +51,21 @@ const Index = () => { | |||||
| const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); | const [isWarningPopUp, setIsWarningPopUp] = React.useState(false); | ||||
| const [warningText, setWarningText] = React.useState(""); | const [warningText, setWarningText] = React.useState(""); | ||||
| // React.useLayoutEffect(() => { | |||||
| // loadForm(); | |||||
| // }, []); | |||||
| // React.useLayoutEffect(() => { | |||||
| // if (comboData) { | |||||
| // setOnReady(true); | |||||
| // } | |||||
| // }, [comboData]); | |||||
| React.useEffect(() => { | React.useEffect(() => { | ||||
| // console.log(searchCriteria) | |||||
| setOnSearchReady(false) | |||||
| setOnSearchReady(false); | |||||
| loadForm(); | loadForm(); | ||||
| }, [searchCriteria]); | }, [searchCriteria]); | ||||
| function loadForm() { | function loadForm() { | ||||
| HttpUtils.get({ | HttpUtils.get({ | ||||
| url: UrlUtils.GET_HOLIDAY, | url: UrlUtils.GET_HOLIDAY, | ||||
| params: searchCriteria, | params: searchCriteria, | ||||
| onSuccess: (responseData) => { | onSuccess: (responseData) => { | ||||
| // console.log(responseData) | |||||
| setRecord(responseData); | setRecord(responseData); | ||||
| if (comboData.length == 0) { | |||||
| if (comboData.length === 0) { | |||||
| loadCombo(); | loadCombo(); | ||||
| }else{ | |||||
| setOnSearchReady(true) | |||||
| } else { | |||||
| setOnSearchReady(true); | |||||
| } | } | ||||
| } | } | ||||
| }); | }); | ||||
| @@ -94,13 +78,13 @@ const Index = () => { | |||||
| let combo = responseData; | let combo = responseData; | ||||
| setComboData(combo); | setComboData(combo); | ||||
| setOnReady(true); | setOnReady(true); | ||||
| setOnSearchReady(true) | |||||
| setOnSearchReady(true); | |||||
| } | } | ||||
| }); | }); | ||||
| } | } | ||||
| function applySearch(input) { | function applySearch(input) { | ||||
| setGridOnReady(true) | |||||
| setGridOnReady(true); | |||||
| setSearchCriteria(input); | setSearchCriteria(input); | ||||
| } | } | ||||
| @@ -115,52 +99,51 @@ const Index = () => { | |||||
| }, [attachments]); | }, [attachments]); | ||||
| const readFile = (event) => { | const readFile = (event) => { | ||||
| let file = event.target.files[0]; | |||||
| let file = event.target.files && event.target.files[0]; | |||||
| if (file) { | 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)."); | setWarningText("Please upload a valid file (File format: .xlsx)."); | ||||
| setIsWarningPopUp(true); | setIsWarningPopUp(true); | ||||
| document.getElementById("uploadFileBtn").value = ""; | |||||
| // clear the input value | |||||
| event.target.value = ""; | |||||
| return; | return; | ||||
| } | } | ||||
| file['id'] = attachments.length; | 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({ | HttpUtils.fileDownload({ | ||||
| url: UrlUtils.GET_HOLIDAY_TEMPLATE, | url: UrlUtils.GET_HOLIDAY_TEMPLATE, | ||||
| onResponse: () => { | onResponse: () => { | ||||
| setTimeout(()=> setWaitDownload(false), 500) | |||||
| setTimeout(() => setWaitDownload(false), 500); | |||||
| } | } | ||||
| }); | }); | ||||
| } | |||||
| }; | |||||
| const importHoliday = () => { | const importHoliday = () => { | ||||
| setWaitImport(true); | setWaitImport(true); | ||||
| setOnSearchReady(false); | setOnSearchReady(false); | ||||
| if (!attachments || attachments.length <= 0) { | if (!attachments || attachments.length <= 0) { | ||||
| setWarningText("Please upload file."); | setWarningText("Please upload file."); | ||||
| setSaving(false); | |||||
| setWaitImport(false); | |||||
| return; | return; | ||||
| } | } | ||||
| HttpUtils.postWithFiles({ | HttpUtils.postWithFiles({ | ||||
| url: UrlUtils.POST_HOLIDAY, | url: UrlUtils.POST_HOLIDAY, | ||||
| files: attachments, | files: attachments, | ||||
| onSuccess: () => { | onSuccess: () => { | ||||
| notifySaveSuccess() | |||||
| notifySaveSuccess(); | |||||
| setWaitImport(false); | setWaitImport(false); | ||||
| setAttachments([]); | setAttachments([]); | ||||
| loadForm(); | loadForm(); | ||||
| } | } | ||||
| }); | }); | ||||
| } | |||||
| }; | |||||
| return ( | return ( | ||||
| !onReady ? | !onReady ? | ||||
| @@ -171,7 +154,7 @@ const Index = () => { | |||||
| </Grid> | </Grid> | ||||
| : | : | ||||
| ( | ( | ||||
| <Grid container sx={{minHeight: '87vh', backgroundColor: 'backgroundColor.default'}} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid container sx={{ minHeight: '87vh', backgroundColor: 'backgroundColor.default' }} direction="column" justifyContent="flex-start" alignItems="center" > | |||||
| <Grid item xs={12} width="100%"> | <Grid item xs={12} width="100%"> | ||||
| <div style={BackgroundHead} width="100%"> | <div style={BackgroundHead} width="100%"> | ||||
| <Stack direction="row" height='70px'> | <Stack direction="row" height='70px'> | ||||
| @@ -179,69 +162,60 @@ const Index = () => { | |||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={6} width="100%"> | <Grid item xs={12} md={12} lg={6} width="100%"> | ||||
| <Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ml:2,mt:1}} > | |||||
| <Stack direction="row" justifyContent="flex-start" alignItems="center" spacing={2} sx={{ ml: 2, mt: 1 }} > | |||||
| <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | ||||
| <label htmlFor="downloadFileBtn"> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={waitDownload} | |||||
| onClick={doExport} | |||||
| > | |||||
| <Typography variant="h5">Export</Typography> | |||||
| </Button> | |||||
| </label> | |||||
| <Button | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={waitDownload} | |||||
| onClick={doExport} | |||||
| > | |||||
| <Typography variant="h5">Export</Typography> | |||||
| </Button> | |||||
| </ThemeProvider> | </ThemeProvider> | ||||
| {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? | {isGrantedAny(["MAINTAIN_GAZETTE_ISSUE"]) ? | ||||
| <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | <ThemeProvider theme={PNSPS_LONG_BUTTON_THEME}> | ||||
| <input | |||||
| id="uploadFileBtn" | |||||
| name="file" | |||||
| type="file" | |||||
| accept=".xlsx" | |||||
| style={{ display: 'none' }} | |||||
| <Button | |||||
| component="label" | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={waitImport} | disabled={waitImport} | ||||
| onChange={(event) => { | |||||
| readFile(event) | |||||
| }} | |||||
| /> | |||||
| <label htmlFor="uploadFileBtn"> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| <input | |||||
| name="file" | |||||
| type="file" | |||||
| accept=".xlsx" | |||||
| hidden | |||||
| disabled={waitImport} | disabled={waitImport} | ||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| </Button> | |||||
| </label> | |||||
| onChange={readFile} | |||||
| /> | |||||
| </Button> | |||||
| </ThemeProvider> | </ThemeProvider> | ||||
| :null | |||||
| : null | |||||
| } | } | ||||
| </Stack> | </Stack> | ||||
| </Grid> | </Grid> | ||||
| {/*row 1*/} | |||||
| {/* row 1 */} | |||||
| <Grid item xs={12} md={12} lg={12} width="100%"> | <Grid item xs={12} md={12} lg={12} width="100%"> | ||||
| <SearchForm | |||||
| <SearchForm | |||||
| applySearch={applySearch} | applySearch={applySearch} | ||||
| // generateXML={generateXML} | |||||
| searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
| comboData={comboData} | comboData={comboData} | ||||
| onGridReady={onGridReady} | onGridReady={onGridReady} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| {/*row 2*/} | |||||
| {!onSearchReady? | |||||
| <LoadingComponent/>: | |||||
| {/* row 2 */} | |||||
| {!onSearchReady ? | |||||
| <LoadingComponent /> : | |||||
| <Grid item xs={12} md={12} lg={12} width="100%"> | <Grid item xs={12} md={12} lg={12} width="100%"> | ||||
| <MainCard elevation={0} | |||||
| border={false} | |||||
| content={false} | |||||
| > | |||||
| <MainCard elevation={0} border={false} content={false}> | |||||
| <HolidayTable | <HolidayTable | ||||
| recordList={record} | recordList={record} | ||||
| applyGridOnReady={applyGridOnReady} | applyGridOnReady={applyGridOnReady} | ||||
| @@ -249,30 +223,29 @@ const Index = () => { | |||||
| </MainCard> | </MainCard> | ||||
| </Grid> | </Grid> | ||||
| } | } | ||||
| <div> | |||||
| <Dialog | |||||
| open={isWarningPopUp} | |||||
| onClose={() => setIsWarningPopUp(false)} | |||||
| PaperProps={{ | |||||
| sx: { | |||||
| minWidth: '40vw', | |||||
| maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, | |||||
| maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } | |||||
| } | |||||
| }} | |||||
| > | |||||
| <DialogTitle><Typography variant="h3">Warning</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex', }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setIsWarningPopUp(false)}><Typography variant="h5">OK</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </div> | |||||
| <Dialog | |||||
| open={isWarningPopUp} | |||||
| onClose={() => setIsWarningPopUp(false)} | |||||
| PaperProps={{ | |||||
| sx: { | |||||
| minWidth: '40vw', | |||||
| maxWidth: { xs: '90vw', s: '90vw', m: '70vw', lg: '70vw' }, | |||||
| maxHeight: { xs: '90vh', s: '70vh', m: '70vh', lg: '60vh' } | |||||
| } | |||||
| }} | |||||
| > | |||||
| <DialogTitle><Typography variant="h3">Warning</Typography></DialogTitle> | |||||
| <DialogContent style={{ display: 'flex' }}> | |||||
| <Typography variant="h4" style={{ padding: '16px' }}>{warningText}</Typography> | |||||
| </DialogContent> | |||||
| <DialogActions> | |||||
| <Button onClick={() => setIsWarningPopUp(false)}><Typography variant="h5">OK</Typography></Button> | |||||
| </DialogActions> | |||||
| </Dialog> | |||||
| </Grid > | </Grid > | ||||
| ) | ) | ||||
| ); | ); | ||||
| }; | }; | ||||
| export default Index; | |||||
| export default Index; | |||||
| @@ -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} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| @@ -8,6 +8,8 @@ import * as PaymentStatus from "utils/statusUtils/PaymentStatus" | |||||
| import { useNavigate } from "react-router-dom"; | import { useNavigate } from "react-router-dom"; | ||||
| import { FiDataGrid } from "components/FiDataGrid"; | import { FiDataGrid } from "components/FiDataGrid"; | ||||
| import { clickableLink } from 'utils/CommonFunction'; | import { clickableLink } from 'utils/CommonFunction'; | ||||
| import { getPaymentMethodByCode} from "auth/utils"; | |||||
| import { | import { | ||||
| Checkbox, | Checkbox, | ||||
| Dialog, DialogTitle, DialogContent, DialogActions, | Dialog, DialogTitle, DialogContent, DialogActions, | ||||
| @@ -99,7 +101,7 @@ export default function SearchPaymentTable({ searchCriteria, applyGridOnReady, a | |||||
| flex: 1, | flex: 1, | ||||
| width: 150, | width: 150, | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| return params?.value | |||||
| return getPaymentMethodByCode(params?.value) | |||||
| } | } | ||||
| }, | }, | ||||
| { | { | ||||
| @@ -204,6 +204,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
| setStatus(newValue); | setStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Status" | label="Status" | ||||
| @@ -233,6 +238,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
| setPayMethod(newValue); | setPayMethod(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Payment Means" | label="Payment Means" | ||||
| @@ -200,6 +200,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
| setStatus(ComboData.paymentStatus[0]); | setStatus(ComboData.paymentStatus[0]); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label={intl.formatMessage({id: 'status'})} | label={intl.formatMessage({id: 'status'})} | ||||
| @@ -1,4 +1,3 @@ | |||||
| // material-ui | |||||
| import { | import { | ||||
| Dialog, DialogTitle, DialogContent, DialogActions, | Dialog, DialogTitle, DialogContent, DialogActions, | ||||
| Typography, | Typography, | ||||
| @@ -180,17 +179,18 @@ const FormPanel = ({ formData }) => { | |||||
| }); | }); | ||||
| const readFile = (event) => { | const readFile = (event) => { | ||||
| let file = event.target.files[0]; | |||||
| let file = event.target.files && event.target.files[0]; | |||||
| if (file) { | if (file) { | ||||
| if (!file.name.toLowerCase().substr(file.name.length - 4).includes(".pdf")) { | if (!file.name.toLowerCase().substr(file.name.length - 4).includes(".pdf")) { | ||||
| setWarningText("Please upload a valid file (File format: .pdf)."); | setWarningText("Please upload a valid file (File format: .pdf)."); | ||||
| setIsWarningPopUp(true); | setIsWarningPopUp(true); | ||||
| document.getElementById("uploadFileBtn").value = ""; | |||||
| event.target.value = ""; | |||||
| return; | return; | ||||
| } | } | ||||
| if (file.size >= (10 * 1024 * 1034)) { | if (file.size >= (10 * 1024 * 1034)) { | ||||
| setWarningText("The file size for uploading should be less than 10MB"); | setWarningText("The file size for uploading should be less than 10MB"); | ||||
| setIsWarningPopUp(true); | setIsWarningPopUp(true); | ||||
| event.target.value = ""; | |||||
| return; | return; | ||||
| } | } | ||||
| file['id'] = attachments.length; | file['id'] = attachments.length; | ||||
| @@ -198,10 +198,12 @@ const FormPanel = ({ formData }) => { | |||||
| ...attachments, | ...attachments, | ||||
| file | file | ||||
| ]); | ]); | ||||
| document.getElementById("uploadFileBtn").value = ""; | |||||
| event.target.value = ""; | |||||
| } | } | ||||
| } | } | ||||
| const maxUploadsForType = (groupType) => (groupType === "Private Bill" ? 2 : 1); | |||||
| return ( | return ( | ||||
| <MainCard xs={12} md={12} lg={12} | <MainCard xs={12} md={12} lg={12} | ||||
| border={false} | border={false} | ||||
| @@ -275,27 +277,22 @@ const FormPanel = ({ formData }) => { | |||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12}> | <Grid item xs={12} md={12}> | ||||
| <input | |||||
| id="uploadFileBtn" | |||||
| name="file" | |||||
| type="file" | |||||
| accept=".pdf" | |||||
| style={{ display: 'none' }} | |||||
| disabled={attachments.length >= (formik.values.groupType == "Private Bill" ? 2 : 1)} | |||||
| onChange={(event) => { | |||||
| readFile(event) | |||||
| }} | |||||
| /> | |||||
| <label htmlFor="uploadFileBtn"> | |||||
| <Button | |||||
| component="span" | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={attachments.length >= (formik.values.groupType == "Private Bill" ? 2 : 1)} | |||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| </Button> | |||||
| </label> | |||||
| <Button | |||||
| component="label" | |||||
| variant="contained" | |||||
| size="large" | |||||
| disabled={attachments.length >= maxUploadsForType(formik.values.groupType)} | |||||
| > | |||||
| <Typography variant="h5">Upload Files</Typography> | |||||
| <input | |||||
| name="file" | |||||
| type="file" | |||||
| accept=".pdf" | |||||
| hidden | |||||
| disabled={attachments.length >= maxUploadsForType(formik.values.groupType)} | |||||
| onChange={readFile} | |||||
| /> | |||||
| </Button> | |||||
| </Grid> | </Grid> | ||||
| @@ -403,7 +400,10 @@ const FormPanel = ({ formData }) => { | |||||
| <Autocomplete | <Autocomplete | ||||
| sx={{ | sx={{ | ||||
| width: "15%" | |||||
| width: "15%", | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | }} | ||||
| disablePortal | disablePortal | ||||
| id="price" | id="price" | ||||
| @@ -232,6 +232,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -256,6 +261,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setGroupSelected(newValue); | setGroupSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Group" | label="Gazette Group" | ||||
| @@ -355,6 +365,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setStatus(newValue); | setStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Status" | label="Status" | ||||
| @@ -387,6 +402,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setOrgSelected({}); | setOrgSelected({}); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Organisation" | label="Organisation" | ||||
| @@ -210,6 +210,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData, o | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label={intl.formatMessage({id: 'gazetteCount'})} | label={intl.formatMessage({id: 'gazetteCount'})} | ||||
| @@ -335,6 +340,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, issueComboData, o | |||||
| setStatus(ComboData.proofStatus[0]); | setStatus(ComboData.proofStatus[0]); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label={intl.formatMessage({id: 'status'})} | label={intl.formatMessage({id: 'status'})} | ||||
| @@ -9,7 +9,7 @@ import { | |||||
| Stack, | Stack, | ||||
| Dialog, DialogTitle, DialogContent, DialogActions, InputAdornment, Autocomplete | Dialog, DialogTitle, DialogContent, DialogActions, InputAdornment, Autocomplete | ||||
| } from '@mui/material'; | } from '@mui/material'; | ||||
| import { isGranted, delBugMode, getPaymentMethod} from "auth/utils"; | |||||
| import { isGranted, delBugMode, getPaymentMethodGLD} from "auth/utils"; | |||||
| const MainCard = Loadable(lazy(() => import('components/MainCard'))); | const MainCard = Loadable(lazy(() => import('components/MainCard'))); | ||||
| import { useForm } from "react-hook-form"; | import { useForm } from "react-hook-form"; | ||||
| import { | import { | ||||
| @@ -34,7 +34,7 @@ import DownloadIcon from '@mui/icons-material/Download'; | |||||
| import ReplayIcon from '@mui/icons-material/Replay'; | import ReplayIcon from '@mui/icons-material/Replay'; | ||||
| import { notifyDownloadSuccess } from 'utils/CommonFunction'; | import { notifyDownloadSuccess } from 'utils/CommonFunction'; | ||||
| import { isGrantedAny } from "auth/utils"; | import { isGrantedAny } from "auth/utils"; | ||||
| import { useIntl } from "react-intl"; | |||||
| // import { useIntl } from "react-intl"; | |||||
| // ==============================|| DASHBOARD - DEFAULT ||============================== // | // ==============================|| DASHBOARD - DEFAULT ||============================== // | ||||
| const ApplicationDetailCard = ( | const ApplicationDetailCard = ( | ||||
| @@ -58,7 +58,7 @@ const ApplicationDetailCard = ( | |||||
| const [mode, setMode] = useState(""); | const [mode, setMode] = useState(""); | ||||
| const { register, handleSubmit } = useForm() | const { register, handleSubmit } = useForm() | ||||
| const intl = useIntl(); | |||||
| // const intl = useIntl(); | |||||
| const [isWarningPopUp, setIsWarningPopUp] = useState(false); | const [isWarningPopUp, setIsWarningPopUp] = useState(false); | ||||
| const [warningText, setWarningText] = useState(""); | const [warningText, setWarningText] = useState(""); | ||||
| @@ -762,7 +762,7 @@ const ApplicationDetailCard = ( | |||||
| id='paymentMethod' | id='paymentMethod' | ||||
| variant="h5" | variant="h5" | ||||
| > | > | ||||
| {currentApplicationDetailData.paymentMethod!=null?intl.formatMessage({ id: getPaymentMethod(currentApplicationDetailData.paymentMethod)}):""} | |||||
| {currentApplicationDetailData.paymentMethod!=null?getPaymentMethodGLD(currentApplicationDetailData.paymentMethod):""} | |||||
| </Typography> | </Typography> | ||||
| </FormControl> | </FormControl> | ||||
| </Grid> | </Grid> | ||||
| @@ -935,6 +935,11 @@ const ApplicationDetailCard = ( | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setPaymentMeans(newValue); | setPaymentMeans(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="" | label="" | ||||
| @@ -160,6 +160,11 @@ const StatusChangeDialog = (props) => { | |||||
| props.setSelectedGazetteGroupInputType(""); | 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" },}} | // sx={{"& .MuiInputBase-root": { height: "41px" },"#idDocType":{padding: "0px 0px 0px 0px"}, "& .MuiAutocomplete-endAdornment": { top: "auto" },}} | ||||
| renderInput={(params) => <TextField {...params} placeholder="" />} | renderInput={(params) => <TextField {...params} placeholder="" />} | ||||
| /> | /> | ||||
| @@ -393,6 +393,11 @@ export default function SubmittedTab({ setCount, url }) { | |||||
| // console.log(newValue) | // console.log(newValue) | ||||
| setSelectedCareOf(newValue); | setSelectedCareOf(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => <TextField {...params} />} | renderInput={(params) => <TextField {...params} />} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -242,6 +242,11 @@ const SearchPublicNoticeForm = ({ applySearch, searchCriteria, onGridReady }) => | |||||
| setStatus(newValue); | setStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label={intl.formatMessage({id: 'status'})} | label={intl.formatMessage({id: 'status'})} | ||||
| @@ -279,6 +279,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setSelectedStatus(newValue); | setSelectedStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| getOptionLabel={(option) => option.label} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| @@ -304,8 +309,8 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| size="small" | size="small" | ||||
| value={orgSelected} | value={orgSelected} | ||||
| getOptionLabel={(option) => option?.name ?? ""} | getOptionLabel={(option) => option?.name ?? ""} | ||||
| inputValue={inputValue} // 👈 controlled input text | |||||
| onInputChange={(event, newInputValue) => { // 👈 update when user types | |||||
| inputValue={inputValue} | |||||
| onInputChange={(event, newInputValue) => { | |||||
| setInputValue(newInputValue); | setInputValue(newInputValue); | ||||
| }} | }} | ||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| @@ -315,6 +320,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setOrgSelected({}); | setOrgSelected({}); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| {...params} | {...params} | ||||
| @@ -351,6 +361,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -375,6 +390,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setGroupSelected(newValue); | setGroupSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Group" | label="Gazette Group" | ||||
| @@ -412,6 +432,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setSelectedMode(newValue); | setSelectedMode(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| getOptionLabel={(option) => option.label} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField | <TextField | ||||
| @@ -185,7 +185,7 @@ export default function SearchPublicNoticeTable({ searchCriteria, applyGridOnRea | |||||
| { | { | ||||
| id: 'demandNoteNo', | id: 'demandNoteNo', | ||||
| field: 'demandNoteNo', | field: 'demandNoteNo', | ||||
| headerName: 'Demand Note No.', | |||||
| headerName: 'Remarks', | |||||
| flex: 2, | flex: 2, | ||||
| minWidth: 200, | minWidth: 200, | ||||
| renderCell: (params) => { | renderCell: (params) => { | ||||
| @@ -266,38 +266,10 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setSelectedStatus(newValue); | setSelectedStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| getOptionLabel={(option) => option.label} | |||||
| renderInput={(params) => ( | |||||
| <TextField | |||||
| {...params} | |||||
| label="Status" | |||||
| InputLabelProps={{ | |||||
| shrink: true | |||||
| }} | |||||
| /> | |||||
| )} | |||||
| /> | |||||
| {/* <Autocomplete | |||||
| multiple | |||||
| {...register("status")} | |||||
| id="status" | |||||
| size="small" | |||||
| options={ComboData.publicNoticeStatic_GLD} | |||||
| value={selectedStatus} | |||||
| onChange={(event, newValue) => { | |||||
| 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} | getOptionLabel={(option) => option.label} | ||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| @@ -309,7 +281,7 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| }} | }} | ||||
| /> | /> | ||||
| )} | )} | ||||
| /> */} | |||||
| /> | |||||
| </Grid> | </Grid> | ||||
| { | { | ||||
| @@ -325,7 +297,6 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| value={orgSelected} | value={orgSelected} | ||||
| getOptionLabel={(option) => option.name? option.name : ""} | getOptionLabel={(option) => option.name? option.name : ""} | ||||
| inputValue={orgSelected ? orgSelected.name!=undefined?orgSelected.name:"" : ""} | inputValue={orgSelected ? orgSelected.name!=undefined?orgSelected.name:"" : ""} | ||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| if (newValue !== null) { | if (newValue !== null) { | ||||
| setOrgSelected(newValue); | setOrgSelected(newValue); | ||||
| @@ -333,6 +304,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| setOrgSelected({}); | setOrgSelected({}); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Organisation" | label="Organisation" | ||||
| @@ -367,6 +343,11 @@ const SearchPublicNoticeForm = ({ applySearch, orgComboData, searchCriteria, iss | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -192,6 +192,11 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, onLoad }) => { | |||||
| setMethod(newValue); | setMethod(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Payment Method" | label="Payment Method" | ||||
| @@ -219,6 +224,11 @@ const SearchPublicNoticeForm = ({ applySearch, generateReport, onLoad }) => { | |||||
| setStatus(newValue); | setStatus(newValue); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Payment Status" | label="Payment Status" | ||||
| @@ -125,6 +125,11 @@ const FullListForm = ({ searchCriteria, issueComboData}) => { | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -145,6 +145,11 @@ const SummaryForm = ({ searchCriteria, issueComboData}) => { | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setIssueSelected(newValue); | setIssueSelected(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Gazette Issue No." | label="Gazette Issue No." | ||||
| @@ -72,21 +72,28 @@ const ReportSearchPage = () => { | |||||
| </Grid> | </Grid> | ||||
| : | : | ||||
| <Grid container sx={{ minHeight: '95vh',backgroundColor: 'backgroundColor.default' }} direction="column"> | <Grid container sx={{ minHeight: '95vh',backgroundColor: 'backgroundColor.default' }} direction="column"> | ||||
| <Grid item xs={12}> | |||||
| <Grid item xs={12} mb={2}> | |||||
| <div style={BackgroundHead}> | <div style={BackgroundHead}> | ||||
| <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | <Stack direction="row" height='70px' justifyContent="flex-start" alignItems="center"> | ||||
| <Typography ml={15} color='#FFF' variant="h4" sx={{ "textShadow": "0px 0px 25px #0C489E" }}>Announcement</Typography> | |||||
| <Typography ml={15} color='#FFF' variant="h4" sx={{ "textShadow": "0px 0px 25px #0C489E" }}>Report</Typography> | |||||
| </Stack> | </Stack> | ||||
| </div> | </div> | ||||
| </Grid> | </Grid> | ||||
| {/*row 1*/} | {/*row 1*/} | ||||
| <Grid item xs={12} md={12} lg={12} sx={{mb: -1}}> | |||||
| <Grid item xs={12} md={12} lg={12} sx={{mb: 2}}> | |||||
| <Typography variant="pnspsFormHeader" ml={2}> | |||||
| Gazette Notice Full List | |||||
| </Typography> | |||||
| <FullListForm | <FullListForm | ||||
| searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
| issueComboData={issueCombo} | issueComboData={issueCombo} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| <Grid item xs={12} md={12} lg={12} sx={{mb: -1}}> | <Grid item xs={12} md={12} lg={12} sx={{mb: -1}}> | ||||
| <Typography variant="pnspsFormHeader" ml={2}> | |||||
| Summary of Gazette Notice | |||||
| </Typography> | |||||
| <SummaryForm | <SummaryForm | ||||
| searchCriteria={searchCriteria} | searchCriteria={searchCriteria} | ||||
| issueComboData={issueCombo} | issueComboData={issueCombo} | ||||
| @@ -147,6 +147,11 @@ const UserSearchForm_Individual = ({ applySearch, onGridReady, searchCriteria }) | |||||
| setAccountFilter("All"); | setAccountFilter("All"); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Status" | label="Status" | ||||
| @@ -119,6 +119,11 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se | |||||
| setOrgSelected({}); | setOrgSelected({}); | ||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Organisation" | label="Organisation" | ||||
| @@ -214,12 +219,17 @@ const UserSearchForm_Organization = ({applySearch, orgComboData, onGridReady, se | |||||
| options={["All", "Active","Locked","Not Verified"]} | options={["All", "Active","Locked","Not Verified"]} | ||||
| value={accountFilter} | value={accountFilter} | ||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| 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) => ( | renderInput={(params) => ( | ||||
| <TextField {...params} | <TextField {...params} | ||||
| label="Status" | label="Status" | ||||
| @@ -1035,9 +1035,11 @@ const BusCustomFormWizard = (props) => { | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setSelectedAddress4(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) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({id: 'region'})} | renderInput={(params) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({id: 'region'})} | ||||
| />} | />} | ||||
| /> | /> | ||||
| @@ -1083,8 +1085,11 @@ const BusCustomFormWizard = (props) => { | |||||
| setCheckCountry(true) | 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) => <TextField {...params} placeholder={intl.formatMessage({id: 'regionOrCountry'})} />} | renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({id: 'regionOrCountry'})} />} | ||||
| /> | /> | ||||
| {formik.touched.address1 && formik.errors.address1 && ( | {formik.touched.address1 && formik.errors.address1 && ( | ||||
| @@ -1101,7 +1101,11 @@ const CustomFormWizard = (props) => { | |||||
| setSelectedIdDocType({}); | 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) => <TextField | renderInput={(params) => <TextField | ||||
| {...params} | {...params} | ||||
| error={formik.touched.idDocType && (selectedIdDocType === null || selectedIdDocType?.type == null)} | error={formik.touched.idDocType && (selectedIdDocType === null || selectedIdDocType?.type == null)} | ||||
| @@ -1402,9 +1406,9 @@ const CustomFormWizard = (props) => { | |||||
| setSelectedAddress4(newValue); | setSelectedAddress4(newValue); | ||||
| }} | }} | ||||
| sx={{ | 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) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({ id: 'region' })} | renderInput={(params) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({ id: 'region' })} | ||||
| />} | />} | ||||
| @@ -1452,8 +1456,11 @@ const CustomFormWizard = (props) => { | |||||
| setCheckCountry(true) | 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) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />} | renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />} | ||||
| /> | /> | ||||
| {formik.touched.address1 && formik.errors.address1 && ( | {formik.touched.address1 && formik.errors.address1 && ( | ||||
| @@ -615,7 +615,11 @@ const CustomFormWizard = (props) => { | |||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| setSelectedAddress4(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) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({ id: 'region' })} | renderInput={(params) => <TextField error={checkDistrict} {...params} placeholder={intl.formatMessage({ id: 'region' })} | ||||
| />} | />} | ||||
| /> | /> | ||||
| @@ -640,8 +644,11 @@ const CustomFormWizard = (props) => { | |||||
| setCheckCountry(true) | 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) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />} | renderInput={(params) => <TextField {...params} placeholder={intl.formatMessage({ id: 'regionOrCountry' })} />} | ||||
| /> | /> | ||||
| {formik.touched.address1 && formik.errors.address1 && ( | {formik.touched.address1 && formik.errors.address1 && ( | ||||
| @@ -128,6 +128,11 @@ const UserAddCard = ({ isCollectData, updateGroupMember, userGroupData, isNewRec | |||||
| // console.log(newValue) | // console.log(newValue) | ||||
| setSelectedUser(newValue); | setSelectedUser(newValue); | ||||
| }} | }} | ||||
| sx={{ | |||||
| '& .MuiInputBase-root': { alignItems: 'center' }, | |||||
| '& .MuiAutocomplete-endAdornment': { top: '50%', transform: 'translateY(-50%)' }, | |||||
| '& .MuiOutlinedInput-root': { height: 40 } | |||||
| }} | |||||
| renderInput={(params) => <TextField {...params} />} | renderInput={(params) => <TextField {...params} />} | ||||
| /> | /> | ||||
| </Grid> | </Grid> | ||||
| @@ -41,13 +41,9 @@ export default function Combo ({valueName, disabled, form, dataList, filterOptio | |||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | 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": { | "& .MuiInputBase-input.Mui-disabled": { | ||||
| WebkitTextFillColor: "#000000", | WebkitTextFillColor: "#000000", | ||||
| background: "#f8f8f8", | background: "#f8f8f8", | ||||
| @@ -40,13 +40,9 @@ export default function Combo ({valueName, disabled, form, dataList, filterOptio | |||||
| } | } | ||||
| }} | }} | ||||
| sx={{ | 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": { | "& .MuiInputBase-input.Mui-disabled": { | ||||
| WebkitTextFillColor: "#000000", | WebkitTextFillColor: "#000000", | ||||
| background: "#f8f8f8", | background: "#f8f8f8", | ||||