udp-react-enterprise-component-library 25.18.4-beta.87 → 25.18.4-beta.88
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/{UdpTransactionTypesPage-ZZkM6RLU.js → UdpTransactionTypesPage-DE8lJoCS.js} +6 -10
- package/dist/UdpTransactionTypesPage-DE8lJoCS.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/types/src/udp/pages/UdpTransactionTypesPage/UdpTransactionTypesPage.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/udp/pages/UdpPages/index.js +1 -1
- package/dist/udp/pages/UdpTransactionTypesPage/index.js +1 -1
- package/export-map.json +1 -1
- package/package.json +1 -1
- package/dist/UdpTransactionTypesPage-ZZkM6RLU.js.map +0 -1
|
@@ -2263,15 +2263,13 @@ const UdpTransactionTypesPage = () => {
|
|
|
2263
2263
|
const [selectedTransactionAttachmentType, setSelectedTransactionAttachmentType] = useState(null);
|
|
2264
2264
|
const [isCreateOrEditTransactionAttachmentTypeSidesheetOpen, setIsCreateOrEditTransactionAttachmentTypeSidesheetOpen] = useState(false);
|
|
2265
2265
|
const [isDeleteTransactionAttachmentTypeDialogOpen, setIsDeleteTransactionAttachmentTypeDialogOpen] = useState(false);
|
|
2266
|
-
const hasDefaultAndCancelledTransactionTypeStatus = useCallback((transactionTypeStatuses, checkHasDefault = false, checkHasCancelledStatus = false
|
|
2266
|
+
const hasDefaultAndCancelledTransactionTypeStatus = useCallback((transactionTypeStatuses, checkHasDefault = false, checkHasCancelledStatus = false) => {
|
|
2267
2267
|
if (!transactionTypeStatuses) return false;
|
|
2268
2268
|
return transactionTypeStatuses?.some((record) => {
|
|
2269
2269
|
if (record.transactionTypeStatusId !== selectedTransactionTypeStatus?.transactionTypeStatusId) {
|
|
2270
2270
|
const isDefault = record?.isDefault;
|
|
2271
|
-
const isClosedStatus = record?.isClosedStatus;
|
|
2272
2271
|
const isCancelledStatus = record?.isCancelledStatus;
|
|
2273
2272
|
if (checkHasDefault && isDefault) return true;
|
|
2274
|
-
if (checkHasClosedStatus && isClosedStatus) return true;
|
|
2275
2273
|
if (checkHasCancelledStatus && isCancelledStatus) return true;
|
|
2276
2274
|
}
|
|
2277
2275
|
return false;
|
|
@@ -2687,12 +2685,11 @@ const UdpTransactionTypesPage = () => {
|
|
|
2687
2685
|
transactionTypeId: selectedTransactionType?.transactionTypeId,
|
|
2688
2686
|
color: formValues?.color?.value || null
|
|
2689
2687
|
};
|
|
2690
|
-
let
|
|
2688
|
+
let hasDefaultOrCancelledStatus = false;
|
|
2691
2689
|
try {
|
|
2692
2690
|
const isCreatingDefaultStatus = formValues?.isDefault === true;
|
|
2693
|
-
const isCreatingClosedStatus = formValues?.isClosedStatus === true;
|
|
2694
2691
|
const isCreatingCancelledStatus = formValues?.isCancelledStatus === true;
|
|
2695
|
-
if (isCreatingDefaultStatus ||
|
|
2692
|
+
if (isCreatingDefaultStatus || isCreatingCancelledStatus) {
|
|
2696
2693
|
const searchTransactionTypeStatusResponse = await searchTransactionTypeStatusByTransactionTypeId(selectedTransactionType?.transactionTypeId);
|
|
2697
2694
|
if (searchTransactionTypeStatusResponse?.status !== 200) {
|
|
2698
2695
|
enqueueSnackbar(t("Unable to validate existing TransactionTypeStatus records. Please try again."), {
|
|
@@ -2704,12 +2701,11 @@ const UdpTransactionTypesPage = () => {
|
|
|
2704
2701
|
});
|
|
2705
2702
|
return;
|
|
2706
2703
|
}
|
|
2707
|
-
|
|
2704
|
+
hasDefaultOrCancelledStatus = hasDefaultAndCancelledTransactionTypeStatus(searchTransactionTypeStatusResponse?.data?.pageList, isCreatingDefaultStatus, isCreatingCancelledStatus);
|
|
2708
2705
|
}
|
|
2709
|
-
if ((isCreatingDefaultStatus ||
|
|
2706
|
+
if ((isCreatingDefaultStatus || isCreatingCancelledStatus) && hasDefaultOrCancelledStatus) {
|
|
2710
2707
|
let statusConflictMessage = "";
|
|
2711
2708
|
if (isCreatingDefaultStatus) statusConflictMessage = "There is already a TransactionTypeStatus for this TransactionType that has IsDefault set to true.";
|
|
2712
|
-
else if (isCreatingClosedStatus) statusConflictMessage = "There is already a TransactionTypeStatus for this TransactionType that has IsClosedStatus set to true.";
|
|
2713
2709
|
else if (isCreatingCancelledStatus) statusConflictMessage = "There is already a TransactionTypeStatus for this TransactionType that has IsCancelledStatus set to true.";
|
|
2714
2710
|
enqueueSnackbar(t(statusConflictMessage), {
|
|
2715
2711
|
variant: "error",
|
|
@@ -3862,4 +3858,4 @@ var UdpTransactionTypesPage_exports = /* @__PURE__ */ __exportAll({
|
|
|
3862
3858
|
//#endregion
|
|
3863
3859
|
export { UdpTransactionTypesPage as a, REQUIRED_COLUMN_DEF_MAPPING as i, DISABLE_ORDERING_FOR_FIELDS as n, REQUIRED_COLUMN_DEF_FIELDS as r, UdpTransactionTypesPage_exports as t };
|
|
3864
3860
|
|
|
3865
|
-
//# sourceMappingURL=UdpTransactionTypesPage-
|
|
3861
|
+
//# sourceMappingURL=UdpTransactionTypesPage-DE8lJoCS.js.map
|