diff --git a/src/components/MainCard.js b/src/components/MainCard.js index 790f131..bc1a196 100644 --- a/src/components/MainCard.js +++ b/src/components/MainCard.js @@ -62,7 +62,7 @@ const MainCard = forwardRef( fontFamily: theme.typography.fontFamily, fontSize: '0.75rem' }, - maxWidth: { xs: 700, sm: 900, md: 1000, lg: 1300, xl: 1900 }, + maxWidth: { xs: 700, sm: 900, md: 1000, lg: 1300, xl: 1850 }, // minWidth: { xs: 600, sm: 800, md: 900, lg: 1000, xl: 1000 }, margin: { xs: 2.5, md: 3 }, // '& > *': { diff --git a/src/pages/OrganizationDetailPage/OrganizationCard.js b/src/pages/OrganizationDetailPage/OrganizationCard.js index 6523de4..2d4af82 100644 --- a/src/pages/OrganizationDetailPage/OrganizationCard.js +++ b/src/pages/OrganizationDetailPage/OrganizationCard.js @@ -139,7 +139,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { alignItems: 'end' }} > - Create + Create : @@ -154,7 +154,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { alignItems: 'end' }} > - Reset & Back + Reset & Back @@ -168,7 +168,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { alignItems: 'end' }} > - Save + Save @@ -186,7 +186,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { }} onClick={onEditClick} > - Edit + Edit @@ -200,7 +200,7 @@ const OrganizationCard = ({ userData, loadDataFun, id }) => { : - + Organization Details diff --git a/src/pages/OrganizationDetailPage/index.js b/src/pages/OrganizationDetailPage/index.js index 2cb7baf..43a339e 100644 --- a/src/pages/OrganizationDetailPage/index.js +++ b/src/pages/OrganizationDetailPage/index.js @@ -73,7 +73,7 @@ const OrganizationDetailPage = () => { isLoading ? : - +
@@ -91,7 +91,7 @@ const OrganizationDetailPage = () => { - + { {/*row 1*/} - Search Form + Search Form @@ -59,6 +60,9 @@ const OrganizationSearchForm = ({applySearch}) => { {...register("brNo")} id='brNo' label="BR No." + InputLabelProps={{ + shrink: true + }} /> @@ -68,6 +72,9 @@ const OrganizationSearchForm = ({applySearch}) => { {...register("enCompanyName")} id="enCompanyName" label="Name (English)" + InputLabelProps={{ + shrink: true + }} /> @@ -77,6 +84,9 @@ const OrganizationSearchForm = ({applySearch}) => { {...register("chCompanyName")} id="chCompanyName" label="Name (Chinese)" + InputLabelProps={{ + shrink: true + }} /> @@ -95,7 +105,7 @@ const OrganizationSearchForm = ({applySearch}) => { textTransform: 'capitalize', alignItems: 'end' }}> - Clear + Clear @@ -108,7 +118,7 @@ const OrganizationSearchForm = ({applySearch}) => { textTransform: 'capitalize', alignItems: 'end' }}> - Submit + Submit diff --git a/src/pages/OrganizationSearchPage/index.js b/src/pages/OrganizationSearchPage/index.js index a68e5be..eb1a25b 100644 --- a/src/pages/OrganizationSearchPage/index.js +++ b/src/pages/OrganizationSearchPage/index.js @@ -66,7 +66,7 @@ const OrganizationSearchPage = () => { !onReady ? : - +
diff --git a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js index 712ce97..8769056 100644 --- a/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js +++ b/src/pages/User/DetailsPage_Individual/UserInformationCard_Individual.js @@ -159,7 +159,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { alignItems: 'end' }} > - Reset & Back + Reset & Back @@ -174,7 +174,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { alignItems: 'end' }} > - Save + Save @@ -190,7 +190,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { }} onClick={onEditClick} > - Edit + Edit @@ -199,7 +199,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { {/*end top button*/} - + Individual User Details @@ -299,10 +299,9 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { - Verified: + Verified: - { currentUserData.verifiedBy || editMode ? @@ -331,7 +330,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { }} onClick={onVerifiedClick} > - Verify + Verify @@ -343,7 +342,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { - ID No.: + ID No.: @@ -432,7 +431,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { - Status: + Status: { @@ -454,7 +453,7 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { })} {locked ? - + : - + } diff --git a/src/pages/User/DetailsPage_Individual/index.js b/src/pages/User/DetailsPage_Individual/index.js index 0066607..55259d1 100644 --- a/src/pages/User/DetailsPage_Individual/index.js +++ b/src/pages/User/DetailsPage_Individual/index.js @@ -36,9 +36,10 @@ const UserMaintainPage_Individual = () => { const [isLoading, setLoding] = React.useState(true); const _sx = { - ml: 3, + ml: 6, + mr: 6, mb: 3, - mr: 3, + mt: 3, padding: "4 2 4 2", boxShadow: 1, border: 1, @@ -101,7 +102,7 @@ const UserMaintainPage_Individual = () => { isLoading ? : - +
@@ -116,10 +117,10 @@ const UserMaintainPage_Individual = () => { {/*col 1*/} - + - + { - - - + + + Files - - - -
+ + +
diff --git a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js index 7141b28..4c957ab 100644 --- a/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js +++ b/src/pages/User/DetailsPage_Organization/UserInformationCard_Organization.js @@ -191,7 +191,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => alignItems: 'end' }} > - Reset & Back + Reset & Back
@@ -205,7 +205,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => alignItems: 'end' }} > - Save + Save @@ -223,7 +223,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => }} onClick={onEditClick} > - Edit + Edit @@ -234,7 +234,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {/*end top button*/}
- + Organization User Details @@ -343,7 +343,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => - Verified: + Verified: { @@ -374,7 +374,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => }} onClick={() => { onVerifiedClick() }} > - Verify + Verify @@ -397,7 +397,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => - Status: + Status: { editMode ? @@ -420,7 +420,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => {formik.values.locked ? - + : - + } @@ -456,7 +456,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
-
+
@@ -466,7 +466,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => : null @@ -474,7 +474,7 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => - + Organization @@ -556,28 +556,29 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) =>
+
}
setIsWarningPopUp(false)} > - Warning + Warning - {warningText} + {warningText} - +
setIsConfirmPopUp(false)} > - Confirm + Confirm - {confirmText} + {confirmText} - - + +
diff --git a/src/pages/User/DetailsPage_Organization/index.js b/src/pages/User/DetailsPage_Organization/index.js index 8197803..eb9e10b 100644 --- a/src/pages/User/DetailsPage_Organization/index.js +++ b/src/pages/User/DetailsPage_Organization/index.js @@ -41,7 +41,8 @@ const UserMaintainPage_Organization = () => { const _sx = { ml: 3, mb: 3, - mr: 3, + mt: 3, + mr: 6, padding: "4 2 4 2", boxShadow: 1, border: 1, @@ -128,7 +129,7 @@ const UserMaintainPage_Organization = () => { isLoading ? : - +
@@ -146,19 +147,18 @@ const UserMaintainPage_Organization = () => { - + -
- + - + Files { /> -
+
diff --git a/src/pages/User/SearchPage/UserTable.js b/src/pages/User/SearchPage/UserTable.js index 143b6f7..f6c63e4 100644 --- a/src/pages/User/SearchPage/UserTable.js +++ b/src/pages/User/SearchPage/UserTable.js @@ -9,6 +9,7 @@ import { useTheme } from '@mui/material/styles'; import Checkbox from '@mui/material/Checkbox'; import * as UrlUtils from "../../../utils/ApiPathConst"; import * as HttpUtils from '../../../utils/HttpUtils'; +import { notifyLockSuccess, notifyUnlockSuccess } from 'utils/CommonFunction'; // ==============================|| EVENT TABLE ||============================== // @@ -42,6 +43,7 @@ export default function UserTable({recordList,setChangeLocked}) { onSuccess: function(){ setRows(recordList); setChangeLocked(true) + notifyLockSuccess() } }); }; @@ -52,6 +54,7 @@ export default function UserTable({recordList,setChangeLocked}) { onSuccess: function(){ setRows(recordList); setChangeLocked(true) + notifyUnlockSuccess() } }); }; diff --git a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js index 13cab4b..b7b1de2 100644 --- a/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js +++ b/src/pages/User/SearchPage_Individual/UserSearchForm_Individual.js @@ -3,16 +3,17 @@ import { Button, CardContent, Grid, TextField, - Autocomplete + Autocomplete, + Typography } from '@mui/material'; import MainCard from "../../../components/MainCard"; -import {useForm} from "react-hook-form"; -import { useState} from "react"; +import { useForm } from "react-hook-form"; +import { useState } from "react"; import * as React from "react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // -const UserSearchForm_Individual = ({applySearch}) => { +const UserSearchForm_Individual = ({ applySearch }) => { const [type, setType] = useState([]); const [accountFilter, setAccountFilter] = useState("Active"); @@ -22,7 +23,7 @@ const UserSearchForm_Individual = ({applySearch}) => { let typeArray = []; - for(let i =0; i < type.length; i++){ + for (let i = 0; i < type.length; i++) { typeArray.push(type[i].label); } @@ -36,80 +37,95 @@ const UserSearchForm_Individual = ({applySearch}) => { applySearch(temp); }; - function resetForm(){ + function resetForm() { setType([]); reset(); } return ( + border={false} + content={false}>
{/*row 1*/} - Search Form + Search Form {/*row 2*/} - + - + - + - + - - { - if (newValue !== null){ - setAccountFilter(newValue); - } - }} - renderInput={(params) => ( - - )} + + { + if (newValue !== null) { + setAccountFilter(newValue); + } + }} + renderInput={(params) => ( + + )} + /> {/**/} {/* { {/*last row*/} - + - + diff --git a/src/pages/User/SearchPage_Individual/index.js b/src/pages/User/SearchPage_Individual/index.js index 1f9dc25..2d9f4f4 100644 --- a/src/pages/User/SearchPage_Individual/index.js +++ b/src/pages/User/SearchPage_Individual/index.js @@ -3,10 +3,10 @@ import { Grid, Typography, Stack } from '@mui/material'; import MainCard from "../../../components/MainCard"; -import {useEffect, useState} from "react"; +import { useEffect, useState } from "react"; //import axios from "axios"; //import {apiPath} from "../../auth/utils"; -import {GET_IND_USER_PATH} from "../../../utils/ApiPathConst"; +import { GET_IND_USER_PATH } from "../../../utils/ApiPathConst"; import * as React from "react"; import * as HttpUtils from "../../../utils/HttpUtils"; @@ -24,7 +24,7 @@ const BackgroundHead = { backgroundImage: `url(${titleBackgroundImg})`, width: '100%', height: '100%', - backgroundSize:'contain', + backgroundSize: 'contain', backgroundRepeat: 'no-repeat', backgroundColor: '#0C489E', backgroundPosition: 'right' @@ -33,7 +33,7 @@ const BackgroundHead = { const UserSearchPage_Individual = () => { - const [record,setRecord] = useState([]); + const [record, setRecord] = useState([]); const [searchCriteria, setSearchCriteria] = useState({}); const [onReady, setOnReady] = useState(false); @@ -49,11 +49,11 @@ const UserSearchPage_Individual = () => { getUserList(); }, [searchCriteria]); - function getUserList(){ + function getUserList() { HttpUtils.get({ url: GET_IND_USER_PATH, params: searchCriteria, - onSuccess: function(responseData){ + onSuccess: function (responseData) { setRecord(responseData); } }); @@ -65,34 +65,34 @@ const UserSearchPage_Individual = () => { return ( !onReady ? - + : - - -
- - View Individual User - -
-
+ + +
+ + View Individual User + +
+
- {/*row 1*/} - - - - {/*row 2*/} - - - - - + {/*row 1*/} + + + + {/*row 2*/} + + + + + -
+
); }; diff --git a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js index 8030db5..1e414ef 100644 --- a/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js +++ b/src/pages/User/SearchPage_Organization/UserSearchForm_Organization.js @@ -2,7 +2,8 @@ import { Button, CardContent, Autocomplete, - Grid, TextField + Grid, TextField, + Typography } from '@mui/material'; import MainCard from "../../../components/MainCard"; import {useForm} from "react-hook-form"; @@ -54,7 +55,7 @@ const UserSearchForm_Organization = ({applySearch}) => { {/*row 1*/} - Search Form + Search Form @@ -67,6 +68,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("orgName")} id="orgName" label="Org Name" + InputLabelProps={{ + shrink: true + }} />
@@ -76,6 +80,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("brNoStr")} id="brNoStr" label="BR No." + InputLabelProps={{ + shrink: true + }} />
@@ -85,6 +92,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("userName")} id='userName' label="Username" + InputLabelProps={{ + shrink: true + }} />
@@ -94,6 +104,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("contactPerson")} id="contactPerson" label="Name" + InputLabelProps={{ + shrink: true + }} />
@@ -103,6 +116,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("email")} id="email" label="Email" + InputLabelProps={{ + shrink: true + }} />
@@ -112,6 +128,9 @@ const UserSearchForm_Organization = ({applySearch}) => { {...register("phone")} id="phone" label="Phone" + InputLabelProps={{ + shrink: true + }} />
@@ -129,7 +148,10 @@ const UserSearchForm_Organization = ({applySearch}) => { }} renderInput={(params) => ( )} /> @@ -158,7 +180,7 @@ const UserSearchForm_Organization = ({applySearch}) => { textTransform: 'capitalize', alignItems: 'end' }}> - Clear + Clear
@@ -171,7 +193,7 @@ const UserSearchForm_Organization = ({applySearch}) => { textTransform: 'capitalize', alignItems: 'end' }}> - Submit + Submit
diff --git a/src/pages/User/SearchPage_Organization/index.js b/src/pages/User/SearchPage_Organization/index.js index 7d9856c..7200ad8 100644 --- a/src/pages/User/SearchPage_Organization/index.js +++ b/src/pages/User/SearchPage_Organization/index.js @@ -68,7 +68,7 @@ const UserSearchPage_Organization = () => { !onReady ? : - +
@@ -91,7 +91,6 @@ const UserSearchPage_Organization = () => { /> - ); diff --git a/src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js b/src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js index 88c0d72..dc70692 100644 --- a/src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js +++ b/src/pages/pnspsUserGroupDetailPage/GroupAuthCard.js @@ -54,7 +54,7 @@ const GroupAuthCard = ({isCollectData, updateUserAuthList,userGroupData,isNewRec border={false} content={false} > - + User Authority diff --git a/src/pages/pnspsUserGroupDetailPage/UserAddCard.js b/src/pages/pnspsUserGroupDetailPage/UserAddCard.js index 1cf9a4b..40b3468 100644 --- a/src/pages/pnspsUserGroupDetailPage/UserAddCard.js +++ b/src/pages/pnspsUserGroupDetailPage/UserAddCard.js @@ -101,14 +101,14 @@ const UserAddCard = ({ isCollectData, updateGroupMember, userGroupData, isNewRec border={false} content={false} > - + User(s) - User: + User: - Add + Add - + - + Information - + - User Group Name: + sx={{ mr: 3, display: 'flex', alignItems: 'center' }}> + User Group Name: @@ -82,8 +82,8 @@ const UserGroupInfoCard = ({ isCollectData, updateGroupObject, userGroupData }) - User Group Description: + sx={{ mr: 3, display: 'flex', alignItems: 'center' }}> + User Group Description: diff --git a/src/pages/pnspsUserGroupDetailPage/index.js b/src/pages/pnspsUserGroupDetailPage/index.js index 7d41484..caf9ec9 100644 --- a/src/pages/pnspsUserGroupDetailPage/index.js +++ b/src/pages/pnspsUserGroupDetailPage/index.js @@ -169,7 +169,7 @@ const UserMaintainPage = () => { !onReady ? : - +
@@ -187,7 +187,7 @@ const UserMaintainPage = () => { - + { - + { {/*col 2*/} - + { disabled={isNewRecord} onClick={handleDeleteClick} > - Delete User Group + Delete User Group { }} onClick={submitData} > - Save + Save diff --git a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js index 73d9712..1c956ce 100644 --- a/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js +++ b/src/pages/pnspsUserGroupSearchPage/UserGroupSearchForm.js @@ -3,16 +3,17 @@ import { Button, CardContent, Grid, TextField, + Typography } from '@mui/material'; import MainCard from "../../components/MainCard"; -import {useForm} from "react-hook-form"; +import { useForm } from "react-hook-form"; import * as React from "react"; import AddCircleOutlineIcon from '@mui/icons-material/AddCircleOutline'; -import {useNavigate} from "react-router"; +import { useNavigate } from "react-router"; // ==============================|| DASHBOARD - DEFAULT ||============================== // -const UserGroupSearchForm = ({applySearch}) => { +const UserGroupSearchForm = ({ applySearch }) => { const navigate = useNavigate(); const { reset, register, handleSubmit } = useForm() @@ -20,45 +21,52 @@ const UserGroupSearchForm = ({applySearch}) => { applySearch(data); }; - function resetForm(){ + function resetForm() { reset(); } const handleNewGroupClick = (id) => { // console.log(id) - navigate('/userGroup/'+ id); + navigate('/userGroup/' + id); }; return ( + border={false} + content={false} + > {/*row 1*/} - Search Form + Search Form {/*row 2*/} - + - + @@ -66,23 +74,25 @@ const UserGroupSearchForm = ({applySearch}) => { {/*last row*/} - + alignItems="center" + sx={{ mt: 3 }} + > + - + - + - + diff --git a/src/pages/pnspsUserGroupSearchPage/index.js b/src/pages/pnspsUserGroupSearchPage/index.js index 59d2222..fbde832 100644 --- a/src/pages/pnspsUserGroupSearchPage/index.js +++ b/src/pages/pnspsUserGroupSearchPage/index.js @@ -75,7 +75,7 @@ const UserGroupSearchPanel = () => { !onReady ? : - +
diff --git a/src/themes/overrides/Checkbox.js b/src/themes/overrides/Checkbox.js index 0bf2a99..1cc4056 100644 --- a/src/themes/overrides/Checkbox.js +++ b/src/themes/overrides/Checkbox.js @@ -1,11 +1,18 @@ // ==============================|| OVERRIDES - CHECKBOX ||============================== // export default function Checkbox(theme) { + + const checkboxSize = "2rem" + return { MuiCheckbox: { styleOverrides: { root: { - color: theme.palette.secondary[300] + color: theme.palette.secondary[300], + svg: { + width: checkboxSize, + height: checkboxSize, + } } } } diff --git a/src/themes/overrides/DataGrid.js b/src/themes/overrides/DataGrid.js index a400e26..778a5a0 100644 --- a/src/themes/overrides/DataGrid.js +++ b/src/themes/overrides/DataGrid.js @@ -6,6 +6,7 @@ export default function DataGrid() { const cellHeaderFontSize = "1.1rem" const selectedNumberFontSize = "1.2rem" const actionIconSize = "2rem" + const actionCellIconSize = "1.7rem" const cellFontWeight = 600 const cellFooterFontWeight = 600 @@ -16,7 +17,6 @@ export default function DataGrid() { MuiDataGrid: { styleOverrides: { root: { - // fontSize: "3rem" '& .MuiDataGrid-cell': { fontSize: cellFontSize, fontWeight: cellFontWeight @@ -50,6 +50,14 @@ export default function DataGrid() { height: actionIconSize, } }, + '& .MuiDataGrid-actionsCell': { + fontSize: cellFooterFontSize, + fontWeight: cellFooterFontWeight, + svg: { + width: actionCellIconSize, + height: actionCellIconSize, + }, + }, '& .MuiDataGrid-rowCount': { fontSize: cellFooterFontSize, fontWeight: cellFooterFontWeight diff --git a/src/themes/overrides/FormControlLabel.js b/src/themes/overrides/FormControlLabel.js new file mode 100644 index 0000000..8683f16 --- /dev/null +++ b/src/themes/overrides/FormControlLabel.js @@ -0,0 +1,19 @@ +// ==============================|| OVERRIDES - FORMCONTROLLABEL ||============================== // + +export default function FormControlLabel() { + const fontSize = "1.275rem" + const fontWeight = 600 + + return { + MuiFormControlLabel: { + styleOverrides: { + root: { + "& .MuiFormControlLabel-label": { + fontSize: fontSize, + fontWeight: fontWeight, + }, + }, + } + } + }; +} diff --git a/src/themes/overrides/index.js b/src/themes/overrides/index.js index 43864f2..bb2888c 100644 --- a/src/themes/overrides/index.js +++ b/src/themes/overrides/index.js @@ -19,6 +19,7 @@ import Tabs from './Tabs'; import Typography from './Typography'; import Textfield from './Textfield'; import DataGrid from './DataGrid'; +import FormControlLabel from './FormControlLabel'; // ==============================|| OVERRIDES - MAIN ||============================== // @@ -30,6 +31,7 @@ export default function ComponentsOverrides(theme) { Checkbox(theme), Chip(theme), DataGrid(), + FormControlLabel(), IconButton(theme), InputLabel(theme), LinearProgress(), diff --git a/src/utils/CommonFunction.js b/src/utils/CommonFunction.js index c1e6f9b..2101d28 100644 --- a/src/utils/CommonFunction.js +++ b/src/utils/CommonFunction.js @@ -113,6 +113,18 @@ export const notifyLockSuccess = () => { theme: "light", })}; +export const notifyUnlockSuccess = () => { + toast.success('Unlock success!', { + position: "bottom-right", + autoClose: 5000, + hideProgressBar: false, + closeOnClick: true, + pauseOnHover: true, + draggable: true, + progress: undefined, + theme: "light", +})}; + export const notifyActiveSuccess = () => { toast.success('Active success!', { position: "bottom-right", diff --git a/src/utils/FieldUtils.js b/src/utils/FieldUtils.js index f48ed13..945cd50 100644 --- a/src/utils/FieldUtils.js +++ b/src/utils/FieldUtils.js @@ -1,6 +1,6 @@ import { - Grid, TextField, Stack + Grid, TextField, Stack, Typography } from '@mui/material'; import Combo from "./Combo"; @@ -13,7 +13,7 @@ export const notNullFieldLabel = (label) => { export const getDateField = ({ label, valueName, form, disabled }) => { return - {label} + {label} {initField({ @@ -30,7 +30,7 @@ export const getTextField = ({ label, valueName, form, disabled }) => { return - {label} + {label} {initField({ @@ -47,7 +47,7 @@ export const getTextArea = ({ label, valueName, form, disabled, inputProps, ...p return - {label} + {label} {initField({ @@ -79,7 +79,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { return - {label} + {label} @@ -88,7 +88,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { valueName: valueName.code, form: form, disabled: disabled, - width: '25%' + width: '35%' })} {initField({ type: "tel", @@ -103,59 +103,61 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { export const getAddressField = ({ label, valueName, form, disabled }) => { - return - - {label} + return + + + {label} - - - {initField({ - type: "text", - valueName: valueName[0], - form: form, - disabled: disabled - })} - - - {initField({ - type: "text", - valueName: valueName[1], - form: form, - disabled: disabled - })} - - - {initField({ - type: "text", - valueName: valueName[2], - form: form, - disabled: disabled - })} - + + + + {initField({ + type: "text", + valueName: valueName[0], + form: form, + disabled: disabled + })} + + + {initField({ + type: "text", + valueName: valueName[1], + form: form, + disabled: disabled + })} + + + {initField({ + type: "text", + valueName: valueName[2], + form: form, + disabled: disabled + })} - ; + + ; } export const getComboField = ({ label, dataList, valueName, form, disabled, getOptionLabel, onInputChange, onChange, filterOptions, ...props }) => { return - - {label} - - - - - - ; + + {label} + + + + + + ; } export const initField = ({ type, valueName, form, disabled, multiline, placeholder, inputProps, width, ...props }) => {