| @@ -289,7 +289,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Typography> | |||
| </FormHelperText> | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel("BR No.:"), | |||
| valueName: "brNo", | |||
| @@ -298,7 +298,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| <FormControlLabel | |||
| control={<Checkbox checked={formik.values.creditor} />} | |||
| label="is Credit Client" | |||
| @@ -311,9 +311,9 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| /> | |||
| </Grid> | |||
| <Grid item lg={4} ></Grid> | |||
| <Grid item xs={12} lg={4} ></Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel("Name (Eng):"), | |||
| valueName: "enCompanyName", | |||
| @@ -322,7 +322,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: "Name (Ch):", | |||
| valueName: "chCompanyName", | |||
| @@ -331,7 +331,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| <Grid container alignItems={"center"}> | |||
| <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> | |||
| <Typography variant="pnspsFormParagraphBold">{FieldUtils.notNullFieldLabel("Expiry Date:")}</Typography> | |||
| @@ -357,7 +357,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel("Contact Person:"), | |||
| valueName: "contactPerson", | |||
| @@ -366,7 +366,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getPhoneField({ | |||
| label: FieldUtils.notNullFieldLabel("Contact Tel:"), | |||
| valueName: { | |||
| @@ -378,7 +378,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getPhoneField({ | |||
| label: "Fax No:", | |||
| valueName: { | |||
| @@ -390,7 +390,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel("Country:"), | |||
| valueName: "country", | |||
| @@ -401,7 +401,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel("District:"), | |||
| valueName: "district", | |||
| @@ -413,7 +413,7 @@ const OrganizationCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={12} > | |||
| {FieldUtils.getAddressField({ | |||
| label: FieldUtils.notNullFieldLabel("Address:"), | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| @@ -214,7 +214,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Typography> | |||
| </FormHelperText> | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: intl.formatMessage({id: 'brNo'}) + ":", | |||
| valueName: "brNo", | |||
| @@ -222,7 +222,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: intl.formatMessage({id: 'creditorAccount'}) + ":", | |||
| valueName: "creditor", | |||
| @@ -232,9 +232,9 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Grid> | |||
| <Grid item lg={4} ></Grid> | |||
| <Grid item xs={12} lg={4} ></Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'nameEng'}) + ":"), | |||
| valueName: "enCompanyName", | |||
| @@ -243,7 +243,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: intl.formatMessage({id: 'nameChi'}) + ":", | |||
| valueName: "chCompanyName", | |||
| @@ -252,7 +252,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getDateField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'expiryDate'}) + ":"), | |||
| valueName: "brExpiryDate", | |||
| @@ -261,7 +261,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'contactPerson'}) + ":"), | |||
| valueName: "contactPerson", | |||
| @@ -270,7 +270,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getPhoneField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'userContactNumber'}) + ":"), | |||
| valueName: { | |||
| @@ -282,7 +282,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getPhoneField({ | |||
| label: intl.formatMessage({id: 'contactFaxNumber'}) + ":", | |||
| valueName: { | |||
| @@ -294,7 +294,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'country'}) + ":"), | |||
| valueName: "country", | |||
| @@ -305,7 +305,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'district'}) + ":"), | |||
| valueName: "district", | |||
| @@ -317,7 +317,7 @@ const OrganizationPubCard = ({ userData, loadDataFun, id, setEditModeFun }) => { | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={12} > | |||
| {FieldUtils.getAddressField({ | |||
| label: FieldUtils.notNullFieldLabel(intl.formatMessage({id: 'formAddress'}) + ":"), | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| @@ -175,7 +175,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| </FormHelperText> | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getTextField({ | |||
| label: "BR No.:", | |||
| valueName: "brNo", | |||
| @@ -183,9 +183,9 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={8}></Grid> | |||
| <Grid item xs={12} lg={8}></Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel("Name (Eng):"), | |||
| valueName: "enCompanyName", | |||
| @@ -193,7 +193,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getTextField({ | |||
| label: "Name (Ch):", | |||
| valueName: "chCompanyName", | |||
| @@ -201,7 +201,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4} > | |||
| <Grid item xs={12} lg={4} > | |||
| <Grid container alignItems={"center"}> | |||
| <Grid item xs={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> | |||
| <Typography variant="pnspsFormParagraphBold">{FieldUtils.notNullFieldLabel("Expiry Date:")}</Typography> | |||
| @@ -226,7 +226,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getTextField({ | |||
| label: FieldUtils.notNullFieldLabel("Contact Person:"), | |||
| valueName: "contactPerson", | |||
| @@ -234,7 +234,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getPhoneField({ | |||
| label: FieldUtils.notNullFieldLabel("Contact Tel:"), | |||
| valueName: { | |||
| @@ -245,7 +245,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getPhoneField({ | |||
| label: "Fax No:", | |||
| valueName: { | |||
| @@ -256,7 +256,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel("Country:"), | |||
| valueName: "country", | |||
| @@ -266,7 +266,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12} lg={4}> | |||
| {FieldUtils.getComboField({ | |||
| label: FieldUtils.notNullFieldLabel("District:"), | |||
| valueName: "district", | |||
| @@ -276,7 +276,7 @@ const OrganizationCard_loadFromUser = ({ userData, userId }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| <Grid item xs={12}> | |||
| {FieldUtils.getAddressField({ | |||
| label: FieldUtils.notNullFieldLabel("Address:"), | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| @@ -494,15 +494,6 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||
| </Grid> | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={4}> | |||
| {FieldUtils.getAddressField({ | |||
| label: "Address:", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: (!editMode), | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={4}> | |||
| {FieldUtils.getComboField({ | |||
| label: "District:", | |||
| @@ -524,6 +515,15 @@ const UserInformationCard_Individual = ({ formData, loadDataFun }) => { | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={12}> | |||
| {FieldUtils.getAddressField({ | |||
| label: "Address:", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: (!editMode), | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| </form> | |||
| @@ -216,7 +216,7 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||
| </Grid> | |||
| <Grid xs={12} sm={12} md={12} lg={4}> | |||
| <Grid container alignItems={"center"} sx={{mb:2}}> | |||
| <Grid container alignItems={"center"} sx={{mb:2}} > | |||
| <Grid item xs={12} sm={12} md={3} lg={3} sx={{ display: 'flex', alignItems: 'center' }}> | |||
| <Typography variant="pnspsFormParagraphBold"> | |||
| <FormattedMessage id="idNo" />: | |||
| @@ -244,11 +244,11 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={2} sm={2} md={2} lg={2}> | |||
| <Grid item xs={2} sm={2} md={2} lg={2} style={{minWidth:50}}> | |||
| {FieldUtils.initField({ | |||
| valueName: "checkDigit", | |||
| disabled: true, | |||
| form: formik | |||
| form: formik, | |||
| })} | |||
| </Grid> | |||
| </> : | |||
| @@ -308,18 +308,6 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={4}> | |||
| {FieldUtils.getAddressField({ | |||
| label: intl.formatMessage({id: 'userAddress'}) + ":", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: (!editMode), | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={4}> | |||
| {FieldUtils.getComboField({ | |||
| label: intl.formatMessage({id: 'district'}) + ":", | |||
| @@ -341,6 +329,16 @@ const UserInformationCard_Individual_Pub = ({ formData, loadDataFun }) => { | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item xs={12} sm={12} md={12} lg={12}> | |||
| {FieldUtils.getAddressField({ | |||
| label: intl.formatMessage({id: 'userAddress'}) + ":", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: (!editMode), | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| </Grid> | |||
| </Grid> | |||
| </form> | |||
| @@ -553,15 +553,6 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| {FieldUtils.getAddressField({ | |||
| label: "Address:", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: true, | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={4}> | |||
| {FieldUtils.getComboField({ | |||
| label: "District:", | |||
| @@ -572,6 +563,15 @@ const UserInformationCard_Organization = ({ userData, loadDataFun, orgData }) => | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| <Grid item lg={12}> | |||
| {FieldUtils.getAddressField({ | |||
| label: "Address:", | |||
| valueName: ["addressLine1", "addressLine2", "addressLine3"], | |||
| disabled: true, | |||
| form: formik | |||
| })} | |||
| </Grid> | |||
| </Grid> | |||
| </div> | |||
| <br /> | |||
| @@ -89,6 +89,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { | |||
| form: form, | |||
| disabled: disabled, | |||
| width: '35%', | |||
| style:{minWidth: 80,}, | |||
| handleChange: (event) => { | |||
| const value = event.target.value; | |||
| const name = event.target.name; | |||
| @@ -122,7 +123,7 @@ export const getPhoneField = ({ label, valueName, form, disabled }) => { | |||
| export const getAddressField = ({ label, valueName, form, disabled }) => { | |||
| return <Grid container alignItems={"top"}> | |||
| <Grid item xs={12} md={3} lg={3} mt={1} sx={{ display: 'flex', alignItems: 'top' }}> | |||
| <Grid item xs={12} md={3} lg={1} mt={1} sx={{ display: 'flex', alignItems: 'top' }}> | |||
| <Grid item lg={12} sx={{ alignItems: 'center' }}> | |||
| <Typography variant="pnspsFormParagraphBold">{label}</Typography> | |||
| </Grid> | |||