@erpsquad/common 1.10.71 → 1.10.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{ERPUIProvider-DUOrclB1.js → ERPUIProvider-BPpcQgND.js} +6 -5
- package/dist/chunks/ERPUIProvider-BPpcQgND.js.map +1 -0
- package/dist/chunks/{ERPUIProvider-BjGiWErz.esm.js → ERPUIProvider-DZbxFsRb.esm.js} +6 -5
- package/dist/chunks/ERPUIProvider-DZbxFsRb.esm.js.map +1 -0
- package/dist/chunks/{android-12-switch-DBMpexMb.esm.js → android-12-switch-DSM1b9TA.esm.js} +6 -6
- package/dist/chunks/{android-12-switch-DBMpexMb.esm.js.map → android-12-switch-DSM1b9TA.esm.js.map} +1 -1
- package/dist/chunks/{android-12-switch-8FZt3_su.js → android-12-switch-DcPr9cvn.js} +6 -6
- package/dist/chunks/{android-12-switch-8FZt3_su.js.map → android-12-switch-DcPr9cvn.js.map} +1 -1
- package/dist/chunks/{appbar-DUsqcqhx.js → appbar-Bf_GaMVY.js} +3 -3
- package/dist/chunks/{appbar-DUsqcqhx.js.map → appbar-Bf_GaMVY.js.map} +1 -1
- package/dist/chunks/{appbar-B9_uWANQ.esm.js → appbar-DDijzrAm.esm.js} +3 -3
- package/dist/chunks/{appbar-B9_uWANQ.esm.js.map → appbar-DDijzrAm.esm.js.map} +1 -1
- package/dist/chunks/{checkbox-DnQs7CJp.esm.js → checkbox-C5oERyEy.esm.js} +3 -3
- package/dist/chunks/{checkbox-DnQs7CJp.esm.js.map → checkbox-C5oERyEy.esm.js.map} +1 -1
- package/dist/chunks/{checkbox-Dn9rJCo7.js → checkbox-Jgx2gkFF.js} +3 -3
- package/dist/chunks/{checkbox-Dn9rJCo7.js.map → checkbox-Jgx2gkFF.js.map} +1 -1
- package/dist/chunks/{default-data-SL7vE9s3.js → default-data-CmARVEBW.js} +6 -6
- package/dist/chunks/{default-data-SL7vE9s3.js.map → default-data-CmARVEBW.js.map} +1 -1
- package/dist/chunks/{default-data-CT8SRoZj.esm.js → default-data-DSbmaVFY.esm.js} +6 -6
- package/dist/chunks/{default-data-CT8SRoZj.esm.js.map → default-data-DSbmaVFY.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-CgWfXef3.esm.js → fullScreen-B73ASpXc.esm.js} +2 -2
- package/dist/chunks/{fullScreen-CgWfXef3.esm.js.map → fullScreen-B73ASpXc.esm.js.map} +1 -1
- package/dist/chunks/{fullScreen-CBLaTtul.js → fullScreen-GATqKdsG.js} +2 -2
- package/dist/chunks/{fullScreen-CBLaTtul.js.map → fullScreen-GATqKdsG.js.map} +1 -1
- package/dist/chunks/{modules-DEtfCF0Q.js → modules-0TgSOLkZ.js} +2 -2
- package/dist/chunks/{modules-DEtfCF0Q.js.map → modules-0TgSOLkZ.js.map} +1 -1
- package/dist/chunks/{modules-vCRpCUq6.esm.js → modules-CDt6nd-Q.esm.js} +2 -2
- package/dist/chunks/{modules-vCRpCUq6.esm.js.map → modules-CDt6nd-Q.esm.js.map} +1 -1
- package/dist/chunks/{page-context-DR9FWSjI.esm.js → page-context-C_YWMVhh.esm.js} +8 -3
- package/dist/chunks/page-context-C_YWMVhh.esm.js.map +1 -0
- package/dist/chunks/{page-context-C7YuOn6E.js → page-context-_AMJB_ty.js} +8 -3
- package/dist/chunks/{page-context-DR9FWSjI.esm.js.map → page-context-_AMJB_ty.js.map} +1 -1
- package/dist/chunks/{route-page-map-B5JTClV2.js → route-page-map-BMisO6c3.js} +4 -4
- package/dist/chunks/route-page-map-BMisO6c3.js.map +1 -0
- package/dist/chunks/{route-page-map-D0mD4Ap5.esm.js → route-page-map-CwkJKqEq.esm.js} +4 -4
- package/dist/chunks/route-page-map-CwkJKqEq.esm.js.map +1 -0
- package/dist/chunks/{sidebar-CfW9jEHs.esm.js → sidebar-CGU3tdez.esm.js} +2 -2
- package/dist/chunks/{sidebar-CfW9jEHs.esm.js.map → sidebar-CGU3tdez.esm.js.map} +1 -1
- package/dist/chunks/{sidebar-CTnAl3Mf.js → sidebar-CobitAdp.js} +2 -2
- package/dist/chunks/{sidebar-CTnAl3Mf.js.map → sidebar-CobitAdp.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-Cbqswa48.js → sidebarScreen-Kh58mSpF.js} +3 -3
- package/dist/chunks/{sidebarScreen-Cbqswa48.js.map → sidebarScreen-Kh58mSpF.js.map} +1 -1
- package/dist/chunks/{sidebarScreen-BINtOlZh.esm.js → sidebarScreen-R_SLQJpq.esm.js} +3 -3
- package/dist/chunks/{sidebarScreen-BINtOlZh.esm.js.map → sidebarScreen-R_SLQJpq.esm.js.map} +1 -1
- package/dist/chunks/{uom-field-wrapper-Rjqn9-H7.js → uom-field-wrapper-BAFOTp35.js} +46 -36
- package/dist/chunks/uom-field-wrapper-BAFOTp35.js.map +1 -0
- package/dist/chunks/{uom-field-wrapper-B_hEFzVR.esm.js → uom-field-wrapper-Dke2cTpR.esm.js} +46 -36
- package/dist/chunks/uom-field-wrapper-Dke2cTpR.esm.js.map +1 -0
- package/dist/chunks/{useAddressContact-BqS66jS8.js → useAddressContact-DRv6rxkI.js} +20 -7
- package/dist/chunks/{useAddressContact-BqS66jS8.js.map → useAddressContact-DRv6rxkI.js.map} +1 -1
- package/dist/chunks/{useAddressContact-DfKTLjAf.esm.js → useAddressContact-jJ8XlmC_.esm.js} +21 -8
- package/dist/chunks/{useAddressContact-DfKTLjAf.esm.js.map → useAddressContact-jJ8XlmC_.esm.js.map} +1 -1
- package/dist/components/address-modal/address-modal.d.ts +1 -0
- package/dist/components/index.esm.js +7 -7
- package/dist/components/index.js +7 -7
- package/dist/constants/index.esm.js +2 -2
- package/dist/constants/index.js +2 -2
- package/dist/contexts/index.esm.js +1 -1
- package/dist/contexts/index.js +1 -1
- package/dist/hooks/index.esm.js +3 -3
- package/dist/hooks/index.js +3 -3
- package/dist/index.esm.js +13 -13
- package/dist/index.js +13 -13
- package/dist/layout/index.esm.js +2 -2
- package/dist/layout/index.js +2 -2
- package/dist/src/components/address-modal/address-modal.d.ts +1 -0
- package/dist/views/index.esm.js +7 -7
- package/dist/views/index.js +6 -6
- package/package.json +1 -1
- package/dist/chunks/ERPUIProvider-BjGiWErz.esm.js.map +0 -1
- package/dist/chunks/ERPUIProvider-DUOrclB1.js.map +0 -1
- package/dist/chunks/page-context-C7YuOn6E.js.map +0 -1
- package/dist/chunks/route-page-map-B5JTClV2.js.map +0 -1
- package/dist/chunks/route-page-map-D0mD4Ap5.esm.js.map +0 -1
- package/dist/chunks/uom-field-wrapper-B_hEFzVR.esm.js.map +0 -1
- package/dist/chunks/uom-field-wrapper-Rjqn9-H7.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { j as jsxRuntimeExports } from "./jsx-runtime-ClFauRgV.esm.js";
|
|
|
2
2
|
import { useFieldArray, Controller, useForm, useWatch, useFormContext } from "react-hook-form";
|
|
3
3
|
import { P as PropTypes, e as _objectWithoutPropertiesLoose, _ as _extends$1, g as generateUtilityClass, j as capitalize, u as useDefaultProps, k as interopRequireDefaultExports, y as lighten_1, z as darken_1, f as alpha_1 } from "./identifier-0SZUhw_A.esm.js";
|
|
4
4
|
import { i as default_1$3, T as Typography, e as useForkRef, o as ownerWindow, d as useEnhancedEffect, h as debounce, p as isMuiElement, u as useAuth, q as useControlled, r as requireCreateSvgIcon } from "./useAuth-DnwuL4k3.esm.js";
|
|
5
|
-
import { aq as default_1$4, w as DynamicSelect, h as DateTimePicker, D as DatePicker$1, ar as useThemeProps, A as Accordion$1, a8 as Select, f as ChipOrPlaceholder$1, i as DropdownButton, s as DynamicPhone, u as DynamicSearchSelect, k as DynamicCheckBox, af as TitleDropdownButton, T as HeaderCard, ad as TabBar, as as default_1$5, a7 as SearchableSelect, at as Chip$1, ae as TimePicker, aj as UploadMedia, a3 as PhoneInput, Z as ModalLoader, Y as MaterialTable, m as DynamicDate, z as DynamicTime, C as ChipGenerator, M as Footer, F as Fallback, au as IconButton$1, av as TabContext, aw as TabList, ax as Tab, ay as TabPanel, az as default_1$9, a as ActionBar, aA as SwitchBase } from "./android-12-switch-
|
|
6
|
-
import { D as DynamicInput, z as Typography$1, b as Avatar, F as o, M as Modal, c as ConfirmPopUp, B as Box$1, d as Toast, u as useTheme$1, S as SearchBar, G as resolveComponentProps, I as mergeSlotProps, J as appendOwnerState, P as Paper$1, n as chainPropTypes, f as ButtonBase$1, x as default_1$6, T as TextField$1, e as Tooltip$1, E as default_1$7, w as default_1$8, K as Menu$2, N as MenuItem$1, p as useRtl, y as List$1, t as ListItem, O as ListItemText$1, Q as refType } from "./appbar-
|
|
5
|
+
import { aq as default_1$4, w as DynamicSelect, h as DateTimePicker, D as DatePicker$1, ar as useThemeProps, A as Accordion$1, a8 as Select, f as ChipOrPlaceholder$1, i as DropdownButton, s as DynamicPhone, u as DynamicSearchSelect, k as DynamicCheckBox, af as TitleDropdownButton, T as HeaderCard, ad as TabBar, as as default_1$5, a7 as SearchableSelect, at as Chip$1, ae as TimePicker, aj as UploadMedia, a3 as PhoneInput, Z as ModalLoader, Y as MaterialTable, m as DynamicDate, z as DynamicTime, C as ChipGenerator, M as Footer, F as Fallback, au as IconButton$1, av as TabContext, aw as TabList, ax as Tab, ay as TabPanel, az as default_1$9, a as ActionBar, aA as SwitchBase } from "./android-12-switch-DSM1b9TA.esm.js";
|
|
6
|
+
import { D as DynamicInput, z as Typography$1, b as Avatar, F as o, M as Modal, c as ConfirmPopUp, B as Box$1, d as Toast, u as useTheme$1, S as SearchBar, G as resolveComponentProps, I as mergeSlotProps, J as appendOwnerState, P as Paper$1, n as chainPropTypes, f as ButtonBase$1, x as default_1$6, T as TextField$1, e as Tooltip$1, E as default_1$7, w as default_1$8, K as Menu$2, N as MenuItem$1, p as useRtl, y as List$1, t as ListItem, O as ListItemText$1, Q as refType } from "./appbar-DDijzrAm.esm.js";
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
import React__default, { useState, lazy, useMemo, useRef, useEffect, useCallback, useLayoutEffect, useContext, createElement, createContext, cloneElement } from "react";
|
|
9
9
|
import DatePicker from "react-datepicker";
|
|
@@ -23,13 +23,13 @@ import { marked } from "marked";
|
|
|
23
23
|
import { by as streamV1AiFeatureChat, aF as getV1User, bz as getV1ReportsScheduleReport, J as getV1ReportsReportList, bA as deleteV1ReportsScheduleReportId, bB as putV1ReportsUpdateScheduleReportId, bC as postV1ReportsScheduleReport, y as getV1FormBuilder } from "./api-z4kM0HGD.esm.js";
|
|
24
24
|
import { b as getApiConfigSafe, a as auth, g as getApiConfig } from "./api-config-GOys-syK.esm.js";
|
|
25
25
|
import * as Yup from "yup";
|
|
26
|
-
import { C as Checkbox$1, f as usePages, b as useDeepMemo, a as useApi } from "./checkbox-
|
|
26
|
+
import { C as Checkbox$1, f as usePages, b as useDeepMemo, a as useApi } from "./checkbox-C5oERyEy.esm.js";
|
|
27
27
|
import { B as Button } from "./button-CiFUSruA.esm.js";
|
|
28
28
|
import { C as Chip, M as Menu, t as transformTableColumns, d as formateValueByType, r as renderEmptyRowsFallback } from "./form-builder-deconversion-pKIkZ_95.esm.js";
|
|
29
29
|
import { M as MoreIcon, p as Filter, c as ArrowUpDown, f as Export, o as Calendar$1, a as ArrowDown } from "./radio-button-wgwiOmaZ.esm.js";
|
|
30
30
|
import { enqueueSnackbar, useSnackbar, SnackbarProvider } from "notistack";
|
|
31
31
|
import { useDispatch } from "react-redux";
|
|
32
|
-
import { a as apiHelper, c as useGenericDataFetcher, b as useAppTranslations } from "./ERPUIProvider-
|
|
32
|
+
import { a as apiHelper, c as useGenericDataFetcher, b as useAppTranslations } from "./ERPUIProvider-DZbxFsRb.esm.js";
|
|
33
33
|
import Board from "@asseinfo/react-kanban";
|
|
34
34
|
import { a as calculateEntries, t as truncateDecimals } from "./translations-CURTcJu7.esm.js";
|
|
35
35
|
import FullCalendar from "@fullcalendar/react";
|
|
@@ -46,21 +46,21 @@ import { j as Copy$1, e as ArrowUp } from "./arrow-up-BDkqlEB_.esm.js";
|
|
|
46
46
|
import ReactFlagsSelect from "react-flags-select";
|
|
47
47
|
import { useParams, useLocation, useNavigate } from "react-router-dom";
|
|
48
48
|
import { g as getEntityId, R as RANGE, a as handleCompareDateRangeSync, h as handleCompareDateRange } from "./navigation-utils-ChG-fDRf.esm.js";
|
|
49
|
-
import { E as ErpLoader } from "./page-context-
|
|
49
|
+
import { E as ErpLoader } from "./page-context-C_YWMVhh.esm.js";
|
|
50
50
|
import { Gantt, ViewMode } from "gantt-task-react";
|
|
51
51
|
import { DateRange, Calendar } from "react-date-range";
|
|
52
52
|
import { v as viewTypes } from "./action-bar-BsXTcYpL.esm.js";
|
|
53
53
|
import DataEditor, { GridCellKind } from "@glideapps/glide-data-grid";
|
|
54
54
|
import { useExtraCells } from "@glideapps/glide-data-grid-cells";
|
|
55
55
|
import { createPortal } from "react-dom";
|
|
56
|
-
import { C as Collapse$1 } from "./sidebar-
|
|
56
|
+
import { C as Collapse$1 } from "./sidebar-CGU3tdez.esm.js";
|
|
57
57
|
import { useMaterialReactTable, MaterialReactTable } from "material-react-table";
|
|
58
58
|
import { R as RecgtangleIcon, C as CheckBoxIcon$1, T as Trash, E as Edit } from "./trash-Dgfsw2UY.esm.js";
|
|
59
59
|
import { C as Close$1 } from "./document-CFCrnZGh.esm.js";
|
|
60
60
|
import _$1 from "lodash";
|
|
61
|
-
import { P as PathnameDocument } from "./modules-
|
|
61
|
+
import { P as PathnameDocument } from "./modules-CDt6nd-Q.esm.js";
|
|
62
62
|
import { f as PathnameRental, b as PathnameCrm, e as PathnamePurchase, d as PathnameManufacturing, c as PathnameInventory, a as PathnameAccounting } from "./pathname.rental-Dvo5a732.esm.js";
|
|
63
|
-
import { a as PathnameUsers } from "./route-page-map-
|
|
63
|
+
import { a as PathnameUsers } from "./route-page-map-CwkJKqEq.esm.js";
|
|
64
64
|
import { u as useAppDispatch, a as useAppSelector } from "./hooks-Cj9Yhy-E.esm.js";
|
|
65
65
|
import { f as fetchCompanies } from "./store-CKCweEtz.esm.js";
|
|
66
66
|
import { useDropzone } from "react-dropzone";
|
|
@@ -2794,7 +2794,7 @@ function AISummaryPanel(props = {}) {
|
|
|
2794
2794
|
)
|
|
2795
2795
|
] });
|
|
2796
2796
|
}
|
|
2797
|
-
const validationSchema$
|
|
2797
|
+
const validationSchema$2 = Yup.object().shape({
|
|
2798
2798
|
approver_id: Yup.array().required("Please select the approvers").min(1, "Please select the approvers")
|
|
2799
2799
|
});
|
|
2800
2800
|
const QuickApprovalModal = ({
|
|
@@ -2813,7 +2813,7 @@ const QuickApprovalModal = ({
|
|
|
2813
2813
|
});
|
|
2814
2814
|
const { isLoading, isError, error, data } = users;
|
|
2815
2815
|
const { control, handleSubmit, reset, setValue, getValues, watch, trigger } = useForm({
|
|
2816
|
-
resolver: o(validationSchema$
|
|
2816
|
+
resolver: o(validationSchema$2),
|
|
2817
2817
|
mode: "all"
|
|
2818
2818
|
});
|
|
2819
2819
|
watch("approver_id");
|
|
@@ -3673,7 +3673,7 @@ const CalendarWrapper = (props) => {
|
|
|
3673
3673
|
const CardWrapper = ({ children, ...rest }) => {
|
|
3674
3674
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { className: "card-wrapper", ...rest, children });
|
|
3675
3675
|
};
|
|
3676
|
-
const validationSchema$
|
|
3676
|
+
const validationSchema$1 = Yup.object({
|
|
3677
3677
|
login: Yup.object({
|
|
3678
3678
|
password: Yup.string().required("Please enter password").min(8, "Password must be at least 8 characters").matches(/[A-Z]/, "Password must contain at least one uppercase letter").matches(/[!@#$%^&*(),.?":{}|<>]/, "Password must contain at least one special character")
|
|
3679
3679
|
})
|
|
@@ -3683,7 +3683,7 @@ const ChangeUserPasswordModal = ({ showModal, setShowModal, userId }) => {
|
|
|
3683
3683
|
const [isNotify, setIsNotify] = useState(false);
|
|
3684
3684
|
const [toast, setToast] = useState(null);
|
|
3685
3685
|
const { control, handleSubmit, reset, trigger } = useForm({
|
|
3686
|
-
resolver: o(validationSchema$
|
|
3686
|
+
resolver: o(validationSchema$1),
|
|
3687
3687
|
mode: "all"
|
|
3688
3688
|
});
|
|
3689
3689
|
const onSubmit = async (values) => {
|
|
@@ -3804,7 +3804,7 @@ const Loader = styled(CircularProgress)(({ theme }) => {
|
|
|
3804
3804
|
const PageLoader = (props) => {
|
|
3805
3805
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { position: "absolute", left: "50%", top: "50%", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Loader, { size: 50, ...props }) });
|
|
3806
3806
|
};
|
|
3807
|
-
const validationSchema
|
|
3807
|
+
const validationSchema = Yup.object().shape({
|
|
3808
3808
|
contacts: Yup.object().shape({
|
|
3809
3809
|
name: Yup.string().required("Name is required"),
|
|
3810
3810
|
email: Yup.string().email("Invalid email format").required("Email is required")
|
|
@@ -3822,7 +3822,7 @@ const ContactModal = ({
|
|
|
3822
3822
|
const { t } = useTranslation();
|
|
3823
3823
|
const [submitLoading, setSubmitLoading] = useState(false);
|
|
3824
3824
|
const { control, handleSubmit, setValue, reset, getValues, trigger, watch } = useForm({
|
|
3825
|
-
resolver: o(validationSchema
|
|
3825
|
+
resolver: o(validationSchema),
|
|
3826
3826
|
mode: "all"
|
|
3827
3827
|
});
|
|
3828
3828
|
const onSubmit = async (values) => {
|
|
@@ -3960,23 +3960,31 @@ const addressTypeOptions = [
|
|
|
3960
3960
|
{ label: "Office", value: "Office" }
|
|
3961
3961
|
];
|
|
3962
3962
|
const isKSA = false;
|
|
3963
|
-
const
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3963
|
+
const buildValidationSchema = (optionalFields = []) => {
|
|
3964
|
+
const zipOptional = optionalFields.includes("zip_code");
|
|
3965
|
+
const stateOptional = optionalFields.includes("state");
|
|
3966
|
+
return Yup.object().shape({
|
|
3967
|
+
addresses: Yup.object().shape({
|
|
3968
|
+
address_type: Yup.string().required("Address type is required"),
|
|
3969
|
+
contact_name: Yup.string().required("Contact name is required"),
|
|
3970
|
+
street_1: Yup.string().required("Address 1 is required"),
|
|
3971
|
+
street_2: Yup.string(),
|
|
3972
|
+
...{},
|
|
3973
|
+
zip_code: zipOptional ? Yup.string().nullable().test(
|
|
3974
|
+
"optional-digits",
|
|
3975
|
+
"Zip code must contain only digits without special characters",
|
|
3976
|
+
(value) => !value || !value.includes(".") && !value.includes("+") && /^[0-9]+$/.test(value)
|
|
3977
|
+
) : Yup.string().required("Zip code is required").matches(/^[0-9]+$/, "Zip code must contain only digits without special characters").test(
|
|
3978
|
+
"no-dot-plus",
|
|
3979
|
+
'Zip code must not contain "." or "+"',
|
|
3980
|
+
(value) => !(value == null ? void 0 : value.includes(".")) && !(value == null ? void 0 : value.includes("+"))
|
|
3981
|
+
),
|
|
3982
|
+
city: Yup.string().matches(/^[A-Za-z\s]+$/, "City must contain alphabets only"),
|
|
3983
|
+
state: stateOptional ? Yup.number().nullable().typeError("State is not valid") : Yup.number().typeError("State is required").required("State is required"),
|
|
3984
|
+
country: Yup.number().typeError("Country is required").required("Country is required")
|
|
3985
|
+
})
|
|
3986
|
+
});
|
|
3987
|
+
};
|
|
3980
3988
|
const AddressModal = ({
|
|
3981
3989
|
isOpen,
|
|
3982
3990
|
setIsOpen,
|
|
@@ -3986,7 +3994,8 @@ const AddressModal = ({
|
|
|
3986
3994
|
items,
|
|
3987
3995
|
prefillData,
|
|
3988
3996
|
onSave,
|
|
3989
|
-
translationKey
|
|
3997
|
+
translationKey,
|
|
3998
|
+
optionalFields = []
|
|
3990
3999
|
}) => {
|
|
3991
4000
|
var _a;
|
|
3992
4001
|
const { t } = useTranslation();
|
|
@@ -3995,6 +4004,7 @@ const AddressModal = ({
|
|
|
3995
4004
|
country_data: null,
|
|
3996
4005
|
state_data: null
|
|
3997
4006
|
});
|
|
4007
|
+
const validationSchema2 = useMemo(() => buildValidationSchema(optionalFields), [optionalFields]);
|
|
3998
4008
|
const { country_data, state_data } = entryDetails;
|
|
3999
4009
|
const {
|
|
4000
4010
|
control,
|
|
@@ -4006,7 +4016,7 @@ const AddressModal = ({
|
|
|
4006
4016
|
trigger,
|
|
4007
4017
|
getFieldState
|
|
4008
4018
|
} = useForm({
|
|
4009
|
-
resolver: o(
|
|
4019
|
+
resolver: o(validationSchema2),
|
|
4010
4020
|
mode: "all"
|
|
4011
4021
|
});
|
|
4012
4022
|
const watchedValues = useWatch({
|
|
@@ -4279,7 +4289,7 @@ const AddressModal = ({
|
|
|
4279
4289
|
name: "zip_code",
|
|
4280
4290
|
fieldArrayName: "addresses",
|
|
4281
4291
|
placeholder: t(`accounting.${translationKey}.addressModal.zip_code_placeholder`),
|
|
4282
|
-
required:
|
|
4292
|
+
required: !optionalFields.includes("zip_code")
|
|
4283
4293
|
}
|
|
4284
4294
|
) }),
|
|
4285
4295
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -4306,7 +4316,7 @@ const AddressModal = ({
|
|
|
4306
4316
|
apiType: "states",
|
|
4307
4317
|
customeFilter: stateFilter,
|
|
4308
4318
|
getSelectedData: (row) => setDetailsData(row, "state_data"),
|
|
4309
|
-
required:
|
|
4319
|
+
required: !optionalFields.includes("state")
|
|
4310
4320
|
}
|
|
4311
4321
|
) }),
|
|
4312
4322
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Grid, { item: true, sm: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -16964,4 +16974,4 @@ export {
|
|
|
16964
16974
|
DyanmicTextEditor as y,
|
|
16965
16975
|
DynamicDateRange as z
|
|
16966
16976
|
};
|
|
16967
|
-
//# sourceMappingURL=uom-field-wrapper-
|
|
16977
|
+
//# sourceMappingURL=uom-field-wrapper-Dke2cTpR.esm.js.map
|