@vtex/faststore-plugin-buyer-portal 1.3.78 → 1.3.80
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/CHANGELOG.md +19 -1
- package/package.json +1 -1
- package/src/features/addresses/components/AddRecipientsDrawer/AddRecipientsDrawer.tsx +2 -1
- package/src/features/addresses/components/AddressDropdownMenu/AddressDropdownMenu.tsx +3 -2
- package/src/features/addresses/components/CreateAddressDrawer/CreateAddressDrawer.tsx +2 -1
- package/src/features/addresses/components/CreateAddressSettingsDrawer/CreateAddressSettingsDrawer.tsx +3 -2
- package/src/features/addresses/components/DeleteAddressDrawer/DeleteAddressDrawer.tsx +2 -1
- package/src/features/addresses/components/DeleteAddressLocationDrawer/DeleteAddressLocationDrawer.tsx +2 -1
- package/src/features/addresses/components/DeleteRecipientAddressDrawer/DeleteRecipientAddressDrawer.tsx +2 -1
- package/src/features/addresses/components/EditAddressDrawer/EditAddressDrawer.tsx +2 -1
- package/src/features/addresses/components/EditAddressLocationDrawer/EditAddressLocationDrawer.tsx +5 -2
- package/src/features/addresses/components/EditRecipientAddressDrawer/EditRecipientAddressDrawer.tsx +5 -2
- package/src/features/addresses/components/LocationsDrawer/LocationsDrawer.tsx +2 -1
- package/src/features/addresses/components/RemoveAddressDrawer/RemoveAddressDrawer.tsx +2 -1
- package/src/features/budgets/components/BudgetDeleteDrawer/BudgetDeleteDrawer.tsx +2 -1
- package/src/features/budgets/components/BudgetEditNotificationDrawer/BudgetEditNotificationDrawer.tsx +5 -1
- package/src/features/budgets/components/CreateBudgetAllocationDrawer/CreateBudgetAllocationDrawer.tsx +2 -1
- package/src/features/budgets/components/CreateBudgetDrawer/CreateBudgetDrawer.tsx +4 -3
- package/src/features/budgets/components/DeleteBudgetAllocationDrawer/DeleteBudgetAllocationDrawer.tsx +2 -1
- package/src/features/budgets/components/EditBudgetDrawer/EditBudgetDrawer.tsx +5 -1
- package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx +2 -1
- package/src/features/buying-policies/components/DeleteBuyingPolicyDrawer/DeleteBuyingPolicyDrawer.tsx +2 -1
- package/src/features/buying-policies/components/UpdateBuyingPolicyDrawer/UpdateBuyingPolicyDrawer.tsx +2 -1
- package/src/features/credit-cards/components/CreateCreditCardDrawer/CreateCreditCardDrawer.tsx +2 -1
- package/src/features/credit-cards/components/CreditCardDropdownMenu/CreditCardDropdownMenu.tsx +3 -2
- package/src/features/credit-cards/components/CreditCardSettingsDrawer/CreditCardSettingsDrawer.tsx +2 -1
- package/src/features/credit-cards/components/DeleteCreditCardDrawer/DeleteCreditCardDrawer.tsx +2 -1
- package/src/features/credit-cards/components/EditCreditCardDrawer/EditCreditCardDrawer.tsx +2 -1
- package/src/features/credit-cards/components/RemoveCreditCardDrawer/RemoveCreditCardDrawer.tsx +2 -1
- package/src/features/custom-fields/components/CreateCustomFieldValueDrawer/CreateCustomFieldValueDrawer.tsx +3 -2
- package/src/features/custom-fields/components/CustomFieldSettingsDrawer/CustomFieldSettingsDrawer.tsx +2 -1
- package/src/features/custom-fields/components/DeleteCustomFieldValueDrawer/DeleteCustomFieldValueDrawer.tsx +3 -2
- package/src/features/custom-fields/components/UpdateCustomFieldValueDrawer/UpdateCustomFieldValueDrawer.tsx +2 -1
- package/src/features/custom-fields/layouts/CustomFieldsLayout/CustomFieldsLayout.tsx +3 -2
- package/src/features/org-units/components/AuthSetupDrawer/AuthSetupDrawer.tsx +2 -1
- package/src/features/org-units/components/CreateOrgUnitDrawer/CreateOrgUnitDrawer.tsx +2 -1
- package/src/features/org-units/components/DeleteOrgUnitDrawer/DeleteOrgUnitDrawer.tsx +2 -1
- package/src/features/org-units/components/UpdateOrgUnitDrawer/UpdateOrgUnitDrawer.tsx +2 -1
- package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +2 -1
- package/src/features/payment-methods/components/PaymentMethodSettingsDrawer/PaymentMethodSettingsDrawer.tsx +2 -1
- package/src/features/payment-methods/hooks/useRemovePaymentMethodSubmit.ts +2 -1
- package/src/features/product-assortment/services/index.ts +0 -5
- package/src/features/product-assortment/types/index.ts +0 -7
- package/src/features/shared/components/Toast/toast.scss +1 -0
- package/src/features/shared/utils/constants.ts +4 -1
- package/src/features/users/components/CreateUserDrawer/CreateUserDrawer.tsx +2 -1
- package/src/features/users/components/CreateUserDrawerWithUsername/CreateUserDrawerWithUsername.tsx +2 -1
- package/src/features/users/components/DeleteUserDrawer/DeleteUserDrawer.tsx +2 -1
- package/src/features/users/components/ReassignOrgUnitDrawer/ReassignOrgUnitDrawer.tsx +2 -1
- package/src/features/users/components/UpdateUserDrawer/UpdateUserDrawer.tsx +2 -1
- package/src/features/users/components/UpdateUserDrawerWithUsername/UpdateUserDrawerWithUsername.tsx +2 -1
- package/src/features/product-assortment/components/AddProductAssortmentDrawer/AddProductAssortmentDrawer.tsx +0 -197
- package/src/features/product-assortment/components/AddProductAssortmentDrawer/add-product-assortment-drawer.scss +0 -66
- package/src/features/product-assortment/components/CollectionsSettingsDrawer/CollectionsSettingsDrawer.tsx +0 -80
- package/src/features/product-assortment/components/RemoveProductAssortmentDrawer/RemoveProductAssortmentDrawer.tsx +0 -78
- package/src/features/product-assortment/components/RemoveProductAssortmentDrawer/remove-product-assortment-drawer.scss +0 -9
- package/src/features/product-assortment/components/table/AddProductAssortmentDrawerTable.tsx +0 -124
- package/src/features/product-assortment/components/table/add-product-assortment-drawer-table.scss +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.80] - 2026-04-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Remove the following components/exports to fix broken 1.3.79 build:
|
|
14
|
+
- CollectionsSettingsDrawer
|
|
15
|
+
- AddProductAssortmentDrawer
|
|
16
|
+
- RemoveProductAssortmentDrawer
|
|
17
|
+
- AddProductAssortmentDrawerTable
|
|
18
|
+
- getProductAssortmentFromScopeService
|
|
19
|
+
- RemoveProductAssortmentDrawerProps
|
|
20
|
+
|
|
21
|
+
## [1.3.79] - 2026-04-23
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Add propagation delay message to CRUD success toasts
|
|
25
|
+
|
|
10
26
|
## [1.3.78] - 2026-04-23
|
|
11
27
|
|
|
12
28
|
### Changed
|
|
@@ -581,7 +597,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
581
597
|
- Add CHANGELOG file
|
|
582
598
|
- Add README file
|
|
583
599
|
|
|
584
|
-
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.
|
|
600
|
+
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.80...HEAD
|
|
585
601
|
[1.3.55]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.54...v1.3.55
|
|
586
602
|
[1.3.54]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.53...v1.3.54
|
|
587
603
|
[1.3.53]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.52...v1.3.53
|
|
@@ -649,6 +665,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
649
665
|
[1.3.65]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.64...v1.3.65
|
|
650
666
|
[1.3.64]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.64
|
|
651
667
|
[1.3.69]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.69
|
|
668
|
+
[1.3.80]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.79...v1.3.80
|
|
669
|
+
[1.3.79]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.78...v1.3.79
|
|
652
670
|
[1.3.78]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.77...v1.3.78
|
|
653
671
|
[1.3.77]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.76...v1.3.77
|
|
654
672
|
[1.3.76]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.75...v1.3.76
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
|
9
9
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
10
10
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
11
11
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
12
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
12
13
|
import { useAddRecipientsToAddress } from "../../hooks/useAddRecipientsToAddress";
|
|
13
14
|
|
|
14
15
|
import type { RecipientInput } from "../../types";
|
|
@@ -50,7 +51,7 @@ export const AddRecipientsDrawer = ({
|
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
pushToast({
|
|
53
|
-
message:
|
|
54
|
+
message: `Recipients added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
54
55
|
status: "INFO",
|
|
55
56
|
icon: (
|
|
56
57
|
<button
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "..";
|
|
12
12
|
import { BasicDropdownMenu, Icon } from "../../../shared/components";
|
|
13
13
|
import { useDrawerProps } from "../../../shared/hooks";
|
|
14
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
14
15
|
import { ADDRESS_MESSAGES } from "../../constants/messages";
|
|
15
16
|
import { useSetDefaultAddress } from "../../hooks/useSetDefaultAddress";
|
|
16
17
|
import { useUnsetDefaultAddress } from "../../hooks/useUnsetDefaultAddress";
|
|
@@ -40,7 +41,7 @@ export const AddressDropdownMenu = ({
|
|
|
40
41
|
|
|
41
42
|
const handleCreateNewAddressSuccess = () => {
|
|
42
43
|
pushToast({
|
|
43
|
-
message: ADDRESS_MESSAGES.defaultSaved
|
|
44
|
+
message: `${ADDRESS_MESSAGES.defaultSaved}\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
44
45
|
status: "INFO",
|
|
45
46
|
});
|
|
46
47
|
onUpdate?.();
|
|
@@ -48,7 +49,7 @@ export const AddressDropdownMenu = ({
|
|
|
48
49
|
|
|
49
50
|
const handleRemoveDefaultAddressSuccess = () => {
|
|
50
51
|
pushToast({
|
|
51
|
-
message: ADDRESS_MESSAGES.defaultUnset
|
|
52
|
+
message: `${ADDRESS_MESSAGES.defaultUnset}\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
52
53
|
status: "INFO",
|
|
53
54
|
});
|
|
54
55
|
onUpdate?.();
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
useBuyerPortal,
|
|
19
19
|
} from "../../../shared/hooks";
|
|
20
20
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
21
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
21
22
|
import { useCreateNewAddress } from "../../hooks";
|
|
22
23
|
import { LocationInput } from "../../types/AddressData";
|
|
23
24
|
|
|
@@ -92,7 +93,7 @@ export const CreateAddressDrawer = ({
|
|
|
92
93
|
});
|
|
93
94
|
|
|
94
95
|
pushToast({
|
|
95
|
-
message:
|
|
96
|
+
message: `Address added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
96
97
|
status: "INFO",
|
|
97
98
|
});
|
|
98
99
|
onUpdate?.();
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { OptionSelected } from "../../../shared/components/OptionSelected/OptionSelected";
|
|
15
15
|
import { SearchHighlight } from "../../../shared/components/SearchHighlight/SearchHighlight";
|
|
16
16
|
import { useSetScopeConfig, SCOPE_KEYS } from "../../../shared/hooks";
|
|
17
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
17
18
|
import { ADDRESS_MESSAGES } from "../../constants/messages";
|
|
18
19
|
import { useDebouncedSearchAddressByUnitId } from "../../hooks/useDebouncedSearchAddressByUnitId";
|
|
19
20
|
import { useGetDefaultAddress } from "../../hooks/useGetDefaultAddresses";
|
|
@@ -90,7 +91,7 @@ export const CreateAddressSettingsDrawer = ({
|
|
|
90
91
|
|
|
91
92
|
const handleCreateNewAddressSuccess = () => {
|
|
92
93
|
pushToast({
|
|
93
|
-
message: ADDRESS_MESSAGES.defaultSaved
|
|
94
|
+
message: `${ADDRESS_MESSAGES.defaultSaved}\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
94
95
|
status: "INFO",
|
|
95
96
|
});
|
|
96
97
|
onUpdate?.();
|
|
@@ -111,7 +112,7 @@ export const CreateAddressSettingsDrawer = ({
|
|
|
111
112
|
const { setScopeConfig, isSetScopeConfigLoading } = useSetScopeConfig({
|
|
112
113
|
onSuccess: () => {
|
|
113
114
|
pushToast({
|
|
114
|
-
message:
|
|
115
|
+
message: `Scope configuration updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
115
116
|
status: "INFO",
|
|
116
117
|
});
|
|
117
118
|
},
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../../../shared/components";
|
|
10
10
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
11
11
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
12
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
12
13
|
import { useDeleteAddress } from "../../hooks";
|
|
13
14
|
|
|
14
15
|
export type DeleteAddressDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
@@ -44,7 +45,7 @@ export const DeleteAddressDrawer = ({
|
|
|
44
45
|
});
|
|
45
46
|
|
|
46
47
|
pushToast({
|
|
47
|
-
message:
|
|
48
|
+
message: `Address deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
48
49
|
status: "INFO",
|
|
49
50
|
});
|
|
50
51
|
onUpdate?.();
|
|
@@ -5,6 +5,7 @@ import { useUI } from "@faststore/ui";
|
|
|
5
5
|
import { BasicDrawer, BasicDrawerProps } from "../../../shared/components";
|
|
6
6
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
7
7
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
8
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
8
9
|
import { useAddressLocationDelete } from "../../hooks";
|
|
9
10
|
import { LocationField } from "../LocationForm/LocationField/LocationField";
|
|
10
11
|
|
|
@@ -48,7 +49,7 @@ export const DeleteAddressLocationDrawer = ({
|
|
|
48
49
|
});
|
|
49
50
|
|
|
50
51
|
pushToast({
|
|
51
|
-
message:
|
|
52
|
+
message: `Location removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
52
53
|
status: "INFO",
|
|
53
54
|
});
|
|
54
55
|
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
13
13
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
14
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
14
15
|
import { useDeleteRecipientAddress } from "../../hooks/useDeleteRecipientAddress";
|
|
15
16
|
|
|
16
17
|
export type DeleteRecipientAddressDrawerProps = Omit<
|
|
@@ -52,7 +53,7 @@ export const DeleteRecipientAddressDrawer = ({
|
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
pushToast({
|
|
55
|
-
message:
|
|
56
|
+
message: `Recipient deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
56
57
|
status: "INFO",
|
|
57
58
|
});
|
|
58
59
|
refetchRecipients();
|
|
@@ -6,6 +6,7 @@ import { AddressForm } from "..";
|
|
|
6
6
|
import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
7
7
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
8
8
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
9
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
9
10
|
import { useEditAddress } from "../../hooks";
|
|
10
11
|
|
|
11
12
|
import type { AddressInput, AddressData } from "../../types";
|
|
@@ -50,7 +51,7 @@ export const EditAddressDrawer = ({
|
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
pushToast({
|
|
53
|
-
message:
|
|
54
|
+
message: `Address updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
54
55
|
status: "INFO",
|
|
55
56
|
});
|
|
56
57
|
onUpdate?.();
|
package/src/features/addresses/components/EditAddressLocationDrawer/EditAddressLocationDrawer.tsx
CHANGED
|
@@ -5,7 +5,10 @@ import { CheckboxField, useUI } from "@faststore/ui";
|
|
|
5
5
|
import { BasicDrawer, BasicDrawerProps } from "../../../shared/components";
|
|
6
6
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
7
7
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
CHANGES_TIMEOUT_MESSAGE,
|
|
10
|
+
LOCAL_STORAGE_LOCATION_EDIT_KEY,
|
|
11
|
+
} from "../../../shared/utils/constants";
|
|
9
12
|
import { useAddressLocationEdit } from "../../hooks";
|
|
10
13
|
import { LocationField } from "../LocationForm/LocationField/LocationField";
|
|
11
14
|
|
|
@@ -57,7 +60,7 @@ export const EditAddressLocationDrawer = ({
|
|
|
57
60
|
});
|
|
58
61
|
|
|
59
62
|
pushToast({
|
|
60
|
-
message:
|
|
63
|
+
message: `Location edited successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
61
64
|
status: "INFO",
|
|
62
65
|
});
|
|
63
66
|
|
package/src/features/addresses/components/EditRecipientAddressDrawer/EditRecipientAddressDrawer.tsx
CHANGED
|
@@ -7,7 +7,10 @@ import { CheckboxField, useUI } from "@faststore/ui";
|
|
|
7
7
|
import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
8
8
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
9
9
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
CHANGES_TIMEOUT_MESSAGE,
|
|
12
|
+
LOCAL_STORAGE_RECIPIENT_EDIT_KEY,
|
|
13
|
+
} from "../../../shared/utils/constants";
|
|
11
14
|
import { useEditRecipientsToAddress } from "../../hooks/useEditRecipientsToAddress";
|
|
12
15
|
import { type RecipientData, RecipientInput } from "../../types";
|
|
13
16
|
import { RecipientItem } from "../RecipientsForm/RecipientItem/RecipientItem";
|
|
@@ -64,7 +67,7 @@ export const EditRecipientAddressDrawer = ({
|
|
|
64
67
|
});
|
|
65
68
|
|
|
66
69
|
pushToast({
|
|
67
|
-
message:
|
|
70
|
+
message: `Recipient edited successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
68
71
|
status: "INFO",
|
|
69
72
|
});
|
|
70
73
|
refetchRecipients();
|
|
@@ -9,6 +9,7 @@ import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
|
9
9
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
10
10
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
11
11
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
12
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
12
13
|
import { useAddLocationsToAddress } from "../../hooks";
|
|
13
14
|
|
|
14
15
|
import type { LocationInput } from "../../types/AddressData";
|
|
@@ -58,7 +59,7 @@ export const LocationDrawer = ({
|
|
|
58
59
|
});
|
|
59
60
|
|
|
60
61
|
pushToast({
|
|
61
|
-
message:
|
|
62
|
+
message: `Locations added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
62
63
|
status: "INFO",
|
|
63
64
|
icon: (
|
|
64
65
|
<button
|
|
@@ -2,6 +2,7 @@ import { useUI } from "@faststore/ui";
|
|
|
2
2
|
|
|
3
3
|
import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
4
4
|
import { useRemoveFromScope, useBuyerPortal } from "../../../shared/hooks";
|
|
5
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
5
6
|
|
|
6
7
|
export type RemoveAddressDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
7
8
|
readonly?: boolean;
|
|
@@ -22,7 +23,7 @@ export const RemoveAddressDrawer = ({
|
|
|
22
23
|
|
|
23
24
|
const handeRemoveFromScopeSuccess = () => {
|
|
24
25
|
pushToast({
|
|
25
|
-
message:
|
|
26
|
+
message: `Address removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
26
27
|
status: "INFO",
|
|
27
28
|
});
|
|
28
29
|
onUpdate?.();
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from "../../../shared/components";
|
|
13
13
|
import { useAnalytics, useDebounce } from "../../../shared/hooks";
|
|
14
14
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
15
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
15
16
|
import { useDeleteBudget } from "../../hooks/useDeleteBudget";
|
|
16
17
|
|
|
17
18
|
export interface BudgetDeleteDrawerProps
|
|
@@ -92,7 +93,7 @@ export function BudgetDeleteDrawer({
|
|
|
92
93
|
|
|
93
94
|
pushToast({
|
|
94
95
|
status: "INFO",
|
|
95
|
-
message:
|
|
96
|
+
message: `Budget deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
96
97
|
});
|
|
97
98
|
|
|
98
99
|
if (redirect) {
|
|
@@ -7,6 +7,7 @@ import { useUI } from "@faststore/ui";
|
|
|
7
7
|
import { BasicDrawer, type BasicDrawerProps } from "../../../shared/components";
|
|
8
8
|
import { useBuyerPortal } from "../../../shared/hooks";
|
|
9
9
|
import { parseAmount } from "../../../shared/utils/budgetAmountParse";
|
|
10
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
10
11
|
import { useUpdateBudget } from "../../hooks";
|
|
11
12
|
import { BUDGET_NOTIFICATION_BLOCK_MESSAGES } from "../../messages/budgetNotifications";
|
|
12
13
|
import { handleBudgetError } from "../../utils";
|
|
@@ -57,7 +58,10 @@ export function BudgetEditNotificationDrawer({
|
|
|
57
58
|
const { mutate: updateBudget, isLoading } = useUpdateBudget({
|
|
58
59
|
options: {
|
|
59
60
|
onSuccess: () => {
|
|
60
|
-
pushToast({
|
|
61
|
+
pushToast({
|
|
62
|
+
message: `Budget updated successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
63
|
+
status: "INFO",
|
|
64
|
+
});
|
|
61
65
|
close();
|
|
62
66
|
router.reload();
|
|
63
67
|
},
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../../../shared/components";
|
|
10
10
|
import { useBuyerPortal } from "../../../shared/hooks";
|
|
11
11
|
import { sortingOptionsAllocations } from "../../../shared/utils";
|
|
12
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
12
13
|
import { getKeyByValue } from "../../../shared/utils/getKeyByValue";
|
|
13
14
|
import { useAddAllocations } from "../../hooks/useAddAllocations";
|
|
14
15
|
import { useGetAllocations } from "../../hooks/useGetAllocations";
|
|
@@ -58,7 +59,7 @@ export const CreateBudgetAllocationDrawer = ({
|
|
|
58
59
|
options: {
|
|
59
60
|
onSuccess: () => {
|
|
60
61
|
pushToast({
|
|
61
|
-
message: `Allocation successfully added`,
|
|
62
|
+
message: `Allocation successfully added\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
62
63
|
status: "INFO",
|
|
63
64
|
});
|
|
64
65
|
close();
|
|
@@ -18,6 +18,7 @@ import { logMutationFailure } from "../../../shared/services/logger";
|
|
|
18
18
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
19
19
|
import { sortingOptionsAllocations } from "../../../shared/utils";
|
|
20
20
|
import { parseAmount } from "../../../shared/utils/budgetAmountParse";
|
|
21
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
21
22
|
import { getKeyByValue } from "../../../shared/utils/getKeyByValue";
|
|
22
23
|
import { useCreateBudget } from "../../hooks/useCreateBudget";
|
|
23
24
|
import { useGetAllocations } from "../../hooks/useGetAllocations";
|
|
@@ -189,7 +190,7 @@ export const CreateBudgetDrawer = ({
|
|
|
189
190
|
});
|
|
190
191
|
|
|
191
192
|
pushToast({
|
|
192
|
-
message:
|
|
193
|
+
message: `Budget added successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
193
194
|
status: "INFO",
|
|
194
195
|
});
|
|
195
196
|
close();
|
|
@@ -240,14 +241,14 @@ export const CreateBudgetDrawer = ({
|
|
|
240
241
|
}
|
|
241
242
|
|
|
242
243
|
pushToast({
|
|
243
|
-
message:
|
|
244
|
+
message: `Budget added successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
244
245
|
status: "INFO",
|
|
245
246
|
});
|
|
246
247
|
|
|
247
248
|
setTimeout(
|
|
248
249
|
() =>
|
|
249
250
|
pushToast({
|
|
250
|
-
message:
|
|
251
|
+
message: `Budget policy added successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
251
252
|
status: "INFO",
|
|
252
253
|
}),
|
|
253
254
|
1500
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type BasicDrawerProps,
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { useBuyerPortal } from "../../../shared/hooks";
|
|
13
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
13
14
|
import { useDeleteAllocation } from "../../hooks/useDeleteAllocations";
|
|
14
15
|
|
|
15
16
|
import type { BudgetAllocation } from "../../types";
|
|
@@ -47,7 +48,7 @@ export const DeleteBudgetAllocationDrawer = ({
|
|
|
47
48
|
options: {
|
|
48
49
|
onSuccess: () => {
|
|
49
50
|
pushToast({
|
|
50
|
-
message: `Allocation deleted successfully`,
|
|
51
|
+
message: `Allocation deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
51
52
|
status: "INFO",
|
|
52
53
|
});
|
|
53
54
|
|
|
@@ -8,6 +8,7 @@ import { BasicDrawer, type BasicDrawerProps } from "../../../shared/components";
|
|
|
8
8
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
9
9
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
10
10
|
import { parseAmount } from "../../../shared/utils/budgetAmountParse";
|
|
11
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
11
12
|
import { useUpdateBudget } from "../../hooks";
|
|
12
13
|
import { BUDGET_NOTIFICATION_BLOCK_MESSAGES } from "../../messages/budgetNotifications";
|
|
13
14
|
import {
|
|
@@ -118,7 +119,10 @@ export const EditBudgetDrawer = ({
|
|
|
118
119
|
contract_id: contractId,
|
|
119
120
|
});
|
|
120
121
|
|
|
121
|
-
pushToast({
|
|
122
|
+
pushToast({
|
|
123
|
+
message: `Budget updated successfully.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
124
|
+
status: "INFO",
|
|
125
|
+
});
|
|
122
126
|
onSubmit?.(budget);
|
|
123
127
|
close();
|
|
124
128
|
router.reload();
|
package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import { BasicBuyingPolicyDrawer, type BasicBuyingPolicyDrawerProps } from "..";
|
|
|
8
8
|
import { useAnalytics } from "../../../shared/hooks";
|
|
9
9
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
10
10
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
11
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
11
12
|
import { useAddBuyingPolicy } from "../../hooks";
|
|
12
13
|
import {
|
|
13
14
|
buyingPolicyDefault,
|
|
@@ -66,7 +67,7 @@ export const AddBuyingPolicyDrawer = ({
|
|
|
66
67
|
);
|
|
67
68
|
|
|
68
69
|
pushToast({
|
|
69
|
-
message:
|
|
70
|
+
message: `Buying policy added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
70
71
|
status: "INFO",
|
|
71
72
|
icon: (
|
|
72
73
|
<button
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
11
11
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
12
12
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
13
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
13
14
|
import { useRemoveBuyingPolicy } from "../../hooks";
|
|
14
15
|
|
|
15
16
|
export type DeleteBuyingPolicyDrawerProps = Omit<
|
|
@@ -50,7 +51,7 @@ export const DeleteBuyingPolicyDrawer = ({
|
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
pushToast({
|
|
53
|
-
message:
|
|
54
|
+
message: `Buying policy deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
54
55
|
status: "INFO",
|
|
55
56
|
});
|
|
56
57
|
onDelete?.();
|
|
@@ -8,6 +8,7 @@ import { BasicBuyingPolicyDrawer, type BasicBuyingPolicyDrawerProps } from "..";
|
|
|
8
8
|
import { useAnalytics } from "../../../shared/hooks";
|
|
9
9
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
10
10
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
11
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
11
12
|
import { useGetBuyingPolicy, useUpdateBuyingPolicy } from "../../hooks";
|
|
12
13
|
import {
|
|
13
14
|
buyingPolicyDefault,
|
|
@@ -68,7 +69,7 @@ export const UpdateBuyingPolicyDrawer = ({
|
|
|
68
69
|
});
|
|
69
70
|
|
|
70
71
|
pushToast({
|
|
71
|
-
message:
|
|
72
|
+
message: `Buying policy updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
72
73
|
status: "INFO",
|
|
73
74
|
icon: (
|
|
74
75
|
<button
|
package/src/features/credit-cards/components/CreateCreditCardDrawer/CreateCreditCardDrawer.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
InputText,
|
|
13
13
|
} from "../../../shared/components";
|
|
14
14
|
import { useBuyerPortal, useDebounce } from "../../../shared/hooks";
|
|
15
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
15
16
|
import { findCardNetwork } from "../../../shared/utils/creditCard";
|
|
16
17
|
import {
|
|
17
18
|
useTokenizeCreditCard,
|
|
@@ -103,7 +104,7 @@ export const CreateCreditCardDrawer = ({
|
|
|
103
104
|
const handleSaveCrediCardSuccess = () => {
|
|
104
105
|
setIsLoading(false);
|
|
105
106
|
pushToast({
|
|
106
|
-
message:
|
|
107
|
+
message: `Credit card added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
107
108
|
status: "INFO",
|
|
108
109
|
});
|
|
109
110
|
router.reload();
|
package/src/features/credit-cards/components/CreditCardDropdownMenu/CreditCardDropdownMenu.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import { DropdownItem, useUI } from "@faststore/ui";
|
|
|
5
5
|
import { DeleteCreditCardDrawer } from "..";
|
|
6
6
|
import { BasicDropdownMenu, Icon } from "../../../shared/components";
|
|
7
7
|
import { useDrawerProps } from "../../../shared/hooks";
|
|
8
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
8
9
|
import { CREDIT_CARD_MESSAGES } from "../../constants/messages";
|
|
9
10
|
import { useSetDefaultCreditCard } from "../../hooks/useSetDefaultsCreditCard";
|
|
10
11
|
import { useUnsetDefaultCreditCard } from "../../hooks/useUnsetDefaultsCreditCard";
|
|
@@ -42,7 +43,7 @@ export const CreditCardDropdownMenu = ({
|
|
|
42
43
|
|
|
43
44
|
const handleCreateNewCreditCardSuccess = () => {
|
|
44
45
|
pushToast({
|
|
45
|
-
message: CREDIT_CARD_MESSAGES.defaultSaved
|
|
46
|
+
message: `${CREDIT_CARD_MESSAGES.defaultSaved}\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
46
47
|
status: "INFO",
|
|
47
48
|
});
|
|
48
49
|
onUpdate?.();
|
|
@@ -50,7 +51,7 @@ export const CreditCardDropdownMenu = ({
|
|
|
50
51
|
|
|
51
52
|
const handleRemoveDefaultCreditCardSuccess = () => {
|
|
52
53
|
pushToast({
|
|
53
|
-
message: CREDIT_CARD_MESSAGES.defaultUnset
|
|
54
|
+
message: `${CREDIT_CARD_MESSAGES.defaultUnset}\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
54
55
|
status: "INFO",
|
|
55
56
|
});
|
|
56
57
|
onUpdate?.();
|
package/src/features/credit-cards/components/CreditCardSettingsDrawer/CreditCardSettingsDrawer.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
createListTypeOptions,
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { useSetScopeConfig, SCOPE_KEYS } from "../../../shared/hooks";
|
|
13
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
13
14
|
|
|
14
15
|
export type CreditCardSettingsDrawerProps = Omit<
|
|
15
16
|
BasicDrawerProps,
|
|
@@ -32,7 +33,7 @@ export const CreditCardSettingsDrawer = ({
|
|
|
32
33
|
const { setScopeConfig, isSetScopeConfigLoading } = useSetScopeConfig({
|
|
33
34
|
onSuccess: () => {
|
|
34
35
|
pushToast({
|
|
35
|
-
message:
|
|
36
|
+
message: `Scope configuration updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
36
37
|
status: "INFO",
|
|
37
38
|
});
|
|
38
39
|
close();
|
package/src/features/credit-cards/components/DeleteCreditCardDrawer/DeleteCreditCardDrawer.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
InputText,
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { useBuyerPortal } from "../../../shared/hooks";
|
|
13
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
13
14
|
import { useDeleteCreditCard } from "../../hooks";
|
|
14
15
|
|
|
15
16
|
export type DeleteCreditCardDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
@@ -36,7 +37,7 @@ export const DeleteCreditCardDrawer = ({
|
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
pushToast({
|
|
39
|
-
message:
|
|
40
|
+
message: `Credit card deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
40
41
|
status: "INFO",
|
|
41
42
|
});
|
|
42
43
|
router.reload();
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
BasicDrawer,
|
|
10
10
|
InputText,
|
|
11
11
|
} from "../../../shared/components";
|
|
12
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
12
13
|
|
|
13
14
|
import type { CreditCardData } from "../../types";
|
|
14
15
|
|
|
@@ -36,7 +37,7 @@ export const EditCreditCardDrawer = ({
|
|
|
36
37
|
const handleConfirmClick = () => {
|
|
37
38
|
if (onConfirmationStep) {
|
|
38
39
|
pushToast({
|
|
39
|
-
message:
|
|
40
|
+
message: `Credit card updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
40
41
|
status: "INFO",
|
|
41
42
|
});
|
|
42
43
|
router.reload();
|
package/src/features/credit-cards/components/RemoveCreditCardDrawer/RemoveCreditCardDrawer.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { useUI } from "@faststore/ui";
|
|
|
4
4
|
|
|
5
5
|
import { type BasicDrawerProps, BasicDrawer } from "../../../shared/components";
|
|
6
6
|
import { useRemoveFromScope, useBuyerPortal } from "../../../shared/hooks";
|
|
7
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
7
8
|
|
|
8
9
|
export type RemoveCreditCardDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
9
10
|
readonly?: boolean;
|
|
@@ -23,7 +24,7 @@ export const RemoveCreditCardDrawer = ({
|
|
|
23
24
|
|
|
24
25
|
const handeRemoveFromScopeSuccess = () => {
|
|
25
26
|
pushToast({
|
|
26
|
-
message:
|
|
27
|
+
message: `Credit card removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
27
28
|
status: "INFO",
|
|
28
29
|
});
|
|
29
30
|
router.reload();
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
useAddCustomFieldValueToUnitScope,
|
|
12
12
|
} from "../../../shared/hooks/custom-field";
|
|
13
13
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
14
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
14
15
|
|
|
15
16
|
export type CustomFieldType = "Cost Center" | "PO Number" | "Release";
|
|
16
17
|
|
|
@@ -64,7 +65,7 @@ export function CreateCustomFieldValueDrawer({
|
|
|
64
65
|
);
|
|
65
66
|
|
|
66
67
|
pushToast({
|
|
67
|
-
message: `${customField} added successfully`,
|
|
68
|
+
message: `${customField} added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
68
69
|
status: "INFO",
|
|
69
70
|
});
|
|
70
71
|
|
|
@@ -109,7 +110,7 @@ export function CreateCustomFieldValueDrawer({
|
|
|
109
110
|
);
|
|
110
111
|
|
|
111
112
|
pushToast({
|
|
112
|
-
message: `${customField} added successfully`,
|
|
113
|
+
message: `${customField} added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
113
114
|
status: "INFO",
|
|
114
115
|
});
|
|
115
116
|
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
useUpdateCustomFieldSettings,
|
|
23
23
|
} from "../../../shared/hooks/custom-field";
|
|
24
24
|
import { useCustomFieldSettings } from "../../../shared/hooks/custom-field/useCustomFieldSettings";
|
|
25
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
25
26
|
import { CustomFieldData } from "../../types";
|
|
26
27
|
|
|
27
28
|
type FormState = {
|
|
@@ -110,7 +111,7 @@ export function CustomFieldSettingsDrawer({
|
|
|
110
111
|
onSuccess: () =>
|
|
111
112
|
pushToast({
|
|
112
113
|
status: "INFO",
|
|
113
|
-
message: `${customField} settings saved successfully`,
|
|
114
|
+
message: `${customField} settings saved successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
114
115
|
}),
|
|
115
116
|
onError: (err) =>
|
|
116
117
|
pushToast({
|