| @@ -24,6 +24,7 @@ | |||||
| "@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
| "@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
| "@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
| "@types/react-input-mask": "^3.0.2", | |||||
| "apexcharts": "^3.35.5", | "apexcharts": "^3.35.5", | ||||
| "axios": "^1.4.0", | "axios": "^1.4.0", | ||||
| "dayjs": "^1.11.9", | "dayjs": "^1.11.9", | ||||
| @@ -42,6 +43,7 @@ | |||||
| "react-draggable": "^4.4.5", | "react-draggable": "^4.4.5", | ||||
| "react-element-to-jsx-string": "^15.0.0", | "react-element-to-jsx-string": "^15.0.0", | ||||
| "react-hook-form": "^7.45.4", | "react-hook-form": "^7.45.4", | ||||
| "react-input-mask": "^3.0.0-alpha.2", | |||||
| "react-number-format": "^4.9.4", | "react-number-format": "^4.9.4", | ||||
| "react-perfect-scrollbar": "^1.5.8", | "react-perfect-scrollbar": "^1.5.8", | ||||
| "react-redux": "^8.0.4", | "react-redux": "^8.0.4", | ||||
| @@ -5732,6 +5734,14 @@ | |||||
| "@types/react": "*" | "@types/react": "*" | ||||
| } | } | ||||
| }, | }, | ||||
| "node_modules/@types/react-input-mask": { | |||||
| "version": "3.0.2", | |||||
| "resolved": "https://registry.npmjs.org/@types/react-input-mask/-/react-input-mask-3.0.2.tgz", | |||||
| "integrity": "sha512-WTli3kUyvUqqaOLYG/so2pLqUvRb+n4qnx2He5klfqZDiQmRyD07jVIt/bco/1BrcErkPMtpOm+bHii4Oed6cQ==", | |||||
| "dependencies": { | |||||
| "@types/react": "*" | |||||
| } | |||||
| }, | |||||
| "node_modules/@types/react-is": { | "node_modules/@types/react-is": { | ||||
| "version": "18.2.1", | "version": "18.2.1", | ||||
| "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz", | "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz", | ||||
| @@ -11087,6 +11097,14 @@ | |||||
| "node": ">= 0.4" | "node": ">= 0.4" | ||||
| } | } | ||||
| }, | }, | ||||
| "node_modules/invariant": { | |||||
| "version": "2.2.4", | |||||
| "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", | |||||
| "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", | |||||
| "dependencies": { | |||||
| "loose-envify": "^1.0.0" | |||||
| } | |||||
| }, | |||||
| "node_modules/ipaddr.js": { | "node_modules/ipaddr.js": { | ||||
| "version": "2.1.0", | "version": "2.1.0", | ||||
| "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", | ||||
| @@ -18181,6 +18199,20 @@ | |||||
| "react": "^16.8.0 || ^17 || ^18" | "react": "^16.8.0 || ^17 || ^18" | ||||
| } | } | ||||
| }, | }, | ||||
| "node_modules/react-input-mask": { | |||||
| "version": "3.0.0-alpha.2", | |||||
| "resolved": "https://registry.npmjs.org/react-input-mask/-/react-input-mask-3.0.0-alpha.2.tgz", | |||||
| "integrity": "sha512-9U7qL+mvDMOJcbOFPdt6Vj+zzmCMNnBjhhjGDrL8BGQmymgvMVKhu/oOVfAkl+5VWOsLr+G3EhZOmae5fBcAkA==", | |||||
| "dependencies": { | |||||
| "invariant": "^2.2.4", | |||||
| "prop-types": "^15.7.2", | |||||
| "warning": "^4.0.3" | |||||
| }, | |||||
| "peerDependencies": { | |||||
| "react": ">=16.8", | |||||
| "react-dom": ">=16.8" | |||||
| } | |||||
| }, | |||||
| "node_modules/react-is": { | "node_modules/react-is": { | ||||
| "version": "17.0.2", | "version": "17.0.2", | ||||
| "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", | "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", | ||||
| @@ -20645,6 +20677,14 @@ | |||||
| "makeerror": "1.0.12" | "makeerror": "1.0.12" | ||||
| } | } | ||||
| }, | }, | ||||
| "node_modules/warning": { | |||||
| "version": "4.0.3", | |||||
| "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", | |||||
| "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", | |||||
| "dependencies": { | |||||
| "loose-envify": "^1.0.0" | |||||
| } | |||||
| }, | |||||
| "node_modules/watchpack": { | "node_modules/watchpack": { | ||||
| "version": "2.4.0", | "version": "2.4.0", | ||||
| "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", | "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", | ||||
| @@ -20,6 +20,7 @@ | |||||
| "@testing-library/jest-dom": "^5.16.5", | "@testing-library/jest-dom": "^5.16.5", | ||||
| "@testing-library/react": "^13.4.0", | "@testing-library/react": "^13.4.0", | ||||
| "@testing-library/user-event": "^14.4.3", | "@testing-library/user-event": "^14.4.3", | ||||
| "@types/react-input-mask": "^3.0.2", | |||||
| "apexcharts": "^3.35.5", | "apexcharts": "^3.35.5", | ||||
| "axios": "^1.4.0", | "axios": "^1.4.0", | ||||
| "dayjs": "^1.11.9", | "dayjs": "^1.11.9", | ||||
| @@ -38,6 +39,7 @@ | |||||
| "react-draggable": "^4.4.5", | "react-draggable": "^4.4.5", | ||||
| "react-element-to-jsx-string": "^15.0.0", | "react-element-to-jsx-string": "^15.0.0", | ||||
| "react-hook-form": "^7.45.4", | "react-hook-form": "^7.45.4", | ||||
| "react-input-mask": "^3.0.0-alpha.2", | |||||
| "react-number-format": "^4.9.4", | "react-number-format": "^4.9.4", | ||||
| "react-perfect-scrollbar": "^1.5.8", | "react-perfect-scrollbar": "^1.5.8", | ||||
| "react-redux": "^8.0.4", | "react-redux": "^8.0.4", | ||||
| @@ -7,6 +7,7 @@ import { | |||||
| import EditIcon from '@mui/icons-material/Visibility'; | import EditIcon from '@mui/icons-material/Visibility'; | ||||
| import {useEffect} from "react"; | import {useEffect} from "react"; | ||||
| import {useNavigate} from "react-router-dom"; | import {useNavigate} from "react-router-dom"; | ||||
| import * as DateUtils from "utils/DateUtils"; | |||||
| // ==============================|| EVENT TABLE ||============================== // | // ==============================|| EVENT TABLE ||============================== // | ||||
| export default function OrganizationTable({recordList}) { | export default function OrganizationTable({recordList}) { | ||||
| @@ -64,12 +65,23 @@ export default function OrganizationTable({recordList}) { | |||||
| field: 'contactTel', | field: 'contactTel', | ||||
| headerName: 'Tel.', | headerName: 'Tel.', | ||||
| flex: 1, | flex: 1, | ||||
| renderCell: (params) => { | |||||
| let phone = JSON.parse(params.value); | |||||
| let contact = ""; | |||||
| if (phone && phone.phoneNumber) { | |||||
| contact = phone?.countryCode + " " + phone?.phoneNumber | |||||
| } | |||||
| return contact; | |||||
| } | |||||
| }, | }, | ||||
| { | { | ||||
| id: 'brExpiryDate', | id: 'brExpiryDate', | ||||
| field: 'brExpiryDate', | field: 'brExpiryDate', | ||||
| headerName: 'Expiry Date', | headerName: 'Expiry Date', | ||||
| flex: 1, | flex: 1, | ||||
| valueGetter:(params)=>{ | |||||
| return DateUtils.dateStr(params?.value); | |||||
| } | |||||
| }, | }, | ||||
| ]; | ]; | ||||
| @@ -88,7 +88,9 @@ const PublicNoticeApplyForm = ({loadedData, selections}) => { | |||||
| }); | }); | ||||
| const readFile=(event)=>{ | const readFile=(event)=>{ | ||||
| setAttachment(event.target.files[0]); | |||||
| if(event.target.files[0]){ | |||||
| setAttachment(event.target.files[0]); | |||||
| } | |||||
| } | } | ||||
| @@ -72,6 +72,9 @@ export default function SearchPublicNoticeTable({ recordList }) { | |||||
| field: 'remarks', | field: 'remarks', | ||||
| headerName: 'Remarks', | headerName: 'Remarks', | ||||
| flex: 3, | flex: 3, | ||||
| valueGetter: (params) => { | |||||
| return (params?.value)?(params?.value):""; | |||||
| } | |||||
| }, | }, | ||||
| { | { | ||||
| id: 'status', | id: 'status', | ||||
| @@ -15,7 +15,7 @@ import * as React from "react"; | |||||
| const UserSearchForm_Organization = ({applySearch}) => { | const UserSearchForm_Organization = ({applySearch}) => { | ||||
| const [type, setType] = useState([]); | const [type, setType] = useState([]); | ||||
| const [accountFilter, setAccountFilter] = useState("Active"); | |||||
| const [accountFilter, setAccountFilter] = useState("All"); | |||||
| const { reset, register, handleSubmit } = useForm() | const { reset, register, handleSubmit } = useForm() | ||||
| @@ -34,13 +34,14 @@ const UserSearchForm_Organization = ({applySearch}) => { | |||||
| phone: data.phone, | phone: data.phone, | ||||
| brNoStr: data.brNoStr, | brNoStr: data.brNoStr, | ||||
| orgName: data.orgName, | orgName: data.orgName, | ||||
| accountFilter: accountFilter, | |||||
| accountFilter: accountFilter=="All"?null:accountFilter, | |||||
| }; | }; | ||||
| applySearch(temp); | applySearch(temp); | ||||
| }; | }; | ||||
| function resetForm(){ | function resetForm(){ | ||||
| setType([]); | setType([]); | ||||
| setAccountFilter("All"); | |||||
| reset(); | reset(); | ||||
| } | } | ||||
| @@ -119,7 +120,7 @@ const UserSearchForm_Organization = ({applySearch}) => { | |||||
| {...register("accountFilter")} | {...register("accountFilter")} | ||||
| disablePortal | disablePortal | ||||
| id="accountFilter" | id="accountFilter" | ||||
| options={["Active","Locked","Not verified"]} | |||||
| options={["All", "Active","Locked","Not verified"]} | |||||
| value={accountFilter} | value={accountFilter} | ||||
| onChange={(event, newValue) => { | onChange={(event, newValue) => { | ||||
| if (newValue !== null){ | if (newValue !== null){ | ||||
| @@ -2634,6 +2634,13 @@ | |||||
| dependencies: | dependencies: | ||||
| "@types/react" "*" | "@types/react" "*" | ||||
| "@types/react-input-mask@^3.0.2": | |||||
| version "3.0.2" | |||||
| resolved "https://registry.npmjs.org/@types/react-input-mask/-/react-input-mask-3.0.2.tgz" | |||||
| integrity sha512-WTli3kUyvUqqaOLYG/so2pLqUvRb+n4qnx2He5klfqZDiQmRyD07jVIt/bco/1BrcErkPMtpOm+bHii4Oed6cQ== | |||||
| dependencies: | |||||
| "@types/react" "*" | |||||
| "@types/react-is@^18.2.1": | "@types/react-is@^18.2.1": | ||||
| version "18.2.1" | version "18.2.1" | ||||
| resolved "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz" | resolved "https://registry.npmjs.org/@types/react-is/-/react-is-18.2.1.tgz" | ||||
| @@ -5998,6 +6005,13 @@ internal-slot@^1.0.3, internal-slot@^1.0.4, internal-slot@^1.0.5: | |||||
| has "^1.0.3" | has "^1.0.3" | ||||
| side-channel "^1.0.4" | side-channel "^1.0.4" | ||||
| invariant@^2.2.4: | |||||
| version "2.2.4" | |||||
| resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" | |||||
| integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== | |||||
| dependencies: | |||||
| loose-envify "^1.0.0" | |||||
| ipaddr.js@^2.0.1: | ipaddr.js@^2.0.1: | ||||
| version "2.1.0" | version "2.1.0" | ||||
| resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz" | resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz" | ||||
| @@ -7214,7 +7228,7 @@ lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: | |||||
| resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" | resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" | ||||
| integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== | integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== | ||||
| loose-envify@^1.1.0, loose-envify@^1.4.0: | |||||
| loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: | |||||
| version "1.4.0" | version "1.4.0" | ||||
| resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" | resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" | ||||
| integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== | integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== | ||||
| @@ -8718,6 +8732,15 @@ react-hook-form@^7.45.4: | |||||
| resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.45.4.tgz" | resolved "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.45.4.tgz" | ||||
| integrity sha512-HGDV1JOOBPZj10LB3+OZgfDBTn+IeEsNOKiq/cxbQAIbKaiJUe/KV8DBUzsx0Gx/7IG/orWqRRm736JwOfUSWQ== | integrity sha512-HGDV1JOOBPZj10LB3+OZgfDBTn+IeEsNOKiq/cxbQAIbKaiJUe/KV8DBUzsx0Gx/7IG/orWqRRm736JwOfUSWQ== | ||||
| react-input-mask@^3.0.0-alpha.2: | |||||
| version "3.0.0-alpha.2" | |||||
| resolved "https://registry.npmjs.org/react-input-mask/-/react-input-mask-3.0.0-alpha.2.tgz" | |||||
| integrity sha512-9U7qL+mvDMOJcbOFPdt6Vj+zzmCMNnBjhhjGDrL8BGQmymgvMVKhu/oOVfAkl+5VWOsLr+G3EhZOmae5fBcAkA== | |||||
| dependencies: | |||||
| invariant "^2.2.4" | |||||
| prop-types "^15.7.2" | |||||
| warning "^4.0.3" | |||||
| react-is@^16.12.0: | react-is@^16.12.0: | ||||
| version "16.13.1" | version "16.13.1" | ||||
| resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" | resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" | ||||
| @@ -10340,6 +10363,13 @@ walker@^1.0.7: | |||||
| dependencies: | dependencies: | ||||
| makeerror "1.0.12" | makeerror "1.0.12" | ||||
| warning@^4.0.3: | |||||
| version "4.0.3" | |||||
| resolved "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz" | |||||
| integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== | |||||
| dependencies: | |||||
| loose-envify "^1.0.0" | |||||
| watchpack@^2.4.0: | watchpack@^2.4.0: | ||||
| version "2.4.0" | version "2.4.0" | ||||
| resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" | resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" | ||||