@vtex/faststore-plugin-buyer-portal 1.3.78 → 1.3.79
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 +7 -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/components/AddProductAssortmentDrawer/AddProductAssortmentDrawer.tsx +2 -1
- package/src/features/product-assortment/components/CollectionsSettingsDrawer/CollectionsSettingsDrawer.tsx +2 -1
- package/src/features/product-assortment/components/RemoveProductAssortmentDrawer/RemoveProductAssortmentDrawer.tsx +2 -1
- 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/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.79] - 2026-04-23
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Add propagation delay message to CRUD success toasts
|
|
14
|
+
|
|
10
15
|
## [1.3.78] - 2026-04-23
|
|
11
16
|
|
|
12
17
|
### Changed
|
|
@@ -581,7 +586,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
581
586
|
- Add CHANGELOG file
|
|
582
587
|
- Add README file
|
|
583
588
|
|
|
584
|
-
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.
|
|
589
|
+
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.79...HEAD
|
|
585
590
|
[1.3.55]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.54...v1.3.55
|
|
586
591
|
[1.3.54]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.53...v1.3.54
|
|
587
592
|
[1.3.53]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.52...v1.3.53
|
|
@@ -649,6 +654,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
649
654
|
[1.3.65]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.64...v1.3.65
|
|
650
655
|
[1.3.64]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.64
|
|
651
656
|
[1.3.69]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.69
|
|
657
|
+
[1.3.79]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.78...v1.3.79
|
|
652
658
|
[1.3.78]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.77...v1.3.78
|
|
653
659
|
[1.3.77]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.76...v1.3.77
|
|
654
660
|
[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({
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
useDeleteCustomFieldValueToUnitScope,
|
|
9
9
|
} from "../../../shared/hooks/custom-field";
|
|
10
10
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
11
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
11
12
|
import { CustomFieldData } from "../../types";
|
|
12
13
|
|
|
13
14
|
export interface DeleteCustomFieldValueDrawerProps
|
|
@@ -61,7 +62,7 @@ export function DeleteCustomFieldValueDrawer({
|
|
|
61
62
|
});
|
|
62
63
|
|
|
63
64
|
pushToast({
|
|
64
|
-
message: `${customField} removed successfully`,
|
|
65
|
+
message: `${customField} removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
65
66
|
status: "INFO",
|
|
66
67
|
});
|
|
67
68
|
|
|
@@ -107,7 +108,7 @@ export function DeleteCustomFieldValueDrawer({
|
|
|
107
108
|
});
|
|
108
109
|
|
|
109
110
|
pushToast({
|
|
110
|
-
message: `${customField} deleted successfully`,
|
|
111
|
+
message: `${customField} deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
111
112
|
status: "INFO",
|
|
112
113
|
});
|
|
113
114
|
|
|
@@ -4,6 +4,7 @@ import { UpdateEntityDrawer } from "../../../shared/components/CustomField/updat
|
|
|
4
4
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
5
5
|
import { useUpdateCustomFieldValue } from "../../../shared/hooks/custom-field";
|
|
6
6
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
7
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
7
8
|
import { CustomFieldData } from "../../types";
|
|
8
9
|
|
|
9
10
|
import type { BasicDrawerProps } from "../../../shared/components";
|
|
@@ -52,7 +53,7 @@ export function UpdateCustomFieldValueDrawer({
|
|
|
52
53
|
});
|
|
53
54
|
|
|
54
55
|
pushToast({
|
|
55
|
-
message: `${customField} renamed successfully`,
|
|
56
|
+
message: `${customField} renamed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
56
57
|
status: "INFO",
|
|
57
58
|
});
|
|
58
59
|
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
CustomFieldLayout,
|
|
23
23
|
GlobalLayout,
|
|
24
24
|
} from "../../../shared/layouts";
|
|
25
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
25
26
|
import { CreateCustomFieldValueDrawer } from "../../components/CreateCustomFieldValueDrawer/CreateCustomFieldValueDrawer";
|
|
26
27
|
import { CustomFieldSettingsDrawer } from "../../components/CustomFieldSettingsDrawer/CustomFieldSettingsDrawer";
|
|
27
28
|
import { DeleteCustomFieldValueDrawer } from "../../components/DeleteCustomFieldValueDrawer/DeleteCustomFieldValueDrawer";
|
|
@@ -139,7 +140,7 @@ export const CustomFieldsLayout = ({
|
|
|
139
140
|
onSuccess: () => {
|
|
140
141
|
pushToast({
|
|
141
142
|
status: "INFO",
|
|
142
|
-
message: `Default ${customField} saved successfully`,
|
|
143
|
+
message: `Default ${customField} saved successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
143
144
|
});
|
|
144
145
|
|
|
145
146
|
restartRequest();
|
|
@@ -157,7 +158,7 @@ export const CustomFieldsLayout = ({
|
|
|
157
158
|
onSuccess: () => {
|
|
158
159
|
pushToast({
|
|
159
160
|
status: "INFO",
|
|
160
|
-
message: `Default ${customField} unset successfully`,
|
|
161
|
+
message: `Default ${customField} unset successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
161
162
|
});
|
|
162
163
|
|
|
163
164
|
restartRequest();
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
Icon,
|
|
13
13
|
} from "../../../shared/components";
|
|
14
14
|
import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
15
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
15
16
|
import { useUpdateOrgUnitSettings } from "../../hooks";
|
|
16
17
|
import {
|
|
17
18
|
AuthenticationMethod,
|
|
@@ -166,7 +167,7 @@ export const AuthSetupDrawer = ({
|
|
|
166
167
|
});
|
|
167
168
|
|
|
168
169
|
pushToast({
|
|
169
|
-
message:
|
|
170
|
+
message: `Authentication settings saved successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
170
171
|
status: "INFO",
|
|
171
172
|
});
|
|
172
173
|
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
import { useAnalytics } from "../../../shared/hooks";
|
|
16
16
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
17
17
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
18
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
18
19
|
import { useCreateNewOrgUnit } from "../../hooks";
|
|
19
20
|
|
|
20
21
|
import type { createNewOrgUnitService } from "../../services";
|
|
@@ -59,7 +60,7 @@ export const CreateOrgUnitDrawer = ({
|
|
|
59
60
|
});
|
|
60
61
|
|
|
61
62
|
pushToast({
|
|
62
|
-
message:
|
|
63
|
+
message: `Organizational unit added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
63
64
|
status: "INFO",
|
|
64
65
|
icon: (
|
|
65
66
|
<button
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
import { useBuyerPortal, useAnalytics } from "../../../shared/hooks";
|
|
15
15
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
16
16
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
17
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
17
18
|
import { useGetUserByOrgUnitId } from "../../../users/hooks/useGetUserByOrgUnitId";
|
|
18
19
|
import { useChildrenOrgUnits } from "../../hooks";
|
|
19
20
|
import { useDeleteOrgUnit } from "../../hooks/useDeleteOrgUnit";
|
|
@@ -59,7 +60,7 @@ export const DeleteOrgUnitDrawer = ({
|
|
|
59
60
|
});
|
|
60
61
|
|
|
61
62
|
pushToast({
|
|
62
|
-
message:
|
|
63
|
+
message: `Organizational unit deleted successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
63
64
|
status: "INFO",
|
|
64
65
|
});
|
|
65
66
|
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { useAnalytics } from "../../../shared/hooks";
|
|
14
14
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
15
15
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
16
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
16
17
|
import { useUpdateOrgUnit } from "../../hooks";
|
|
17
18
|
|
|
18
19
|
export type UpdateOrgUnitDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
@@ -50,7 +51,7 @@ export const UpdateOrgUnitDrawer = ({
|
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
pushToast({
|
|
53
|
-
message:
|
|
54
|
+
message: `Organizational unit successfully edited\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
54
55
|
status: "INFO",
|
|
55
56
|
icon: (
|
|
56
57
|
<button
|
package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
} from "../../../shared/components";
|
|
15
15
|
import { useBuyerPortal, useDebounce } from "../../../shared/hooks";
|
|
16
16
|
import { DEBOUNCE_TIMEOUT } from "../../../shared/utils";
|
|
17
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
17
18
|
import { useAddPaymentMethodsToUnit } from "../../hooks";
|
|
18
19
|
import { useDebouncedSearchPaymentMethods } from "../../hooks/useDebouncedSearchPaymentMethods";
|
|
19
20
|
|
|
@@ -77,7 +78,7 @@ export const AddPaymentMethodsDrawer = ({
|
|
|
77
78
|
|
|
78
79
|
const handleSuccess = () => {
|
|
79
80
|
pushToast({
|
|
80
|
-
message:
|
|
81
|
+
message: `Payment methods added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
81
82
|
status: "INFO",
|
|
82
83
|
});
|
|
83
84
|
router.reload();
|
|
@@ -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 PaymentMethodSettingsDrawerProps = Omit<
|
|
15
16
|
BasicDrawerProps,
|
|
@@ -35,7 +36,7 @@ export const PaymentMethodSettingsDrawer = ({
|
|
|
35
36
|
const { setScopeConfig, isSetScopeConfigLoading } = useSetScopeConfig({
|
|
36
37
|
onSuccess: () => {
|
|
37
38
|
pushToast({
|
|
38
|
-
message:
|
|
39
|
+
message: `Scope configuration updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
39
40
|
status: "INFO",
|
|
40
41
|
});
|
|
41
42
|
onUpdate?.();
|
|
@@ -3,6 +3,7 @@ import { useRouter } from "next/router";
|
|
|
3
3
|
import { useUI } from "@faststore/ui";
|
|
4
4
|
|
|
5
5
|
import { useBuyerPortal } from "../../shared/hooks";
|
|
6
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../shared/utils/constants";
|
|
6
7
|
|
|
7
8
|
import { useRemovePaymentMethodFromUnit } from "./useRemovePaymentMethodsFromUnit";
|
|
8
9
|
|
|
@@ -22,7 +23,7 @@ export function useRemovePaymentMethod(onAfterSuccess?: () => void) {
|
|
|
22
23
|
onSuccess: () => {
|
|
23
24
|
onAfterSuccess?.();
|
|
24
25
|
pushToast({
|
|
25
|
-
message:
|
|
26
|
+
message: `Payment method removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
26
27
|
status: "INFO",
|
|
27
28
|
});
|
|
28
29
|
router.reload();
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from "../../../shared/components";
|
|
13
13
|
import { useBuyerPortal, useDebounce } from "../../../shared/hooks";
|
|
14
14
|
import { DEBOUNCE_TIMEOUT } from "../../../shared/utils";
|
|
15
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
15
16
|
import { useGetProductAssorments } from "../../hooks";
|
|
16
17
|
import { useAddProductAssortmentToScope } from "../../hooks/useAddProductAssortmentToScope";
|
|
17
18
|
import { AddProductAssortmentDrawerTable } from "../table/AddProductAssortmentDrawerTable";
|
|
@@ -82,7 +83,7 @@ export const AddProductAssortmentDrawer = ({
|
|
|
82
83
|
});
|
|
83
84
|
|
|
84
85
|
pushToast({
|
|
85
|
-
message:
|
|
86
|
+
message: `Product assortment added successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
86
87
|
status: "INFO",
|
|
87
88
|
});
|
|
88
89
|
|
|
@@ -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 CollectionsSettingsDrawerProps = Omit<
|
|
15
16
|
BasicDrawerProps,
|
|
@@ -34,7 +35,7 @@ export const CollectionsSettingsDrawer = ({
|
|
|
34
35
|
const { setScopeConfig, isSetScopeConfigLoading } = useSetScopeConfig({
|
|
35
36
|
onSuccess: () => {
|
|
36
37
|
pushToast({
|
|
37
|
-
message:
|
|
38
|
+
message: `Scope configuration updated successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
38
39
|
status: "INFO",
|
|
39
40
|
});
|
|
40
41
|
onUpdate?.();
|
|
@@ -4,6 +4,7 @@ import { Link, useUI } from "@faststore/ui";
|
|
|
4
4
|
|
|
5
5
|
import { BasicDrawer } from "../../../shared/components";
|
|
6
6
|
import { useBuyerPortal } from "../../../shared/hooks";
|
|
7
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
7
8
|
import { useRemoveProductAssortmentFromScope } from "../../hooks/useRemoveProductAssortmentFromScope";
|
|
8
9
|
|
|
9
10
|
import type { RemoveProductAssortmentDrawerProps } from "../../types";
|
|
@@ -27,7 +28,7 @@ export function RemoveProductAssortmentDrawer({
|
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
pushToast({
|
|
30
|
-
message:
|
|
31
|
+
message: `Product assortment access removed successfully\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
31
32
|
status: "INFO",
|
|
32
33
|
});
|
|
33
34
|
close();
|
|
@@ -16,6 +16,7 @@ import { useAnalytics } from "../../../shared/hooks";
|
|
|
16
16
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
17
17
|
import { isValidEmail } from "../../../shared/utils";
|
|
18
18
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
19
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
19
20
|
import {
|
|
20
21
|
maskPhoneNumber,
|
|
21
22
|
normalizePhoneNumber,
|
|
@@ -97,7 +98,7 @@ export const CreateUserDrawer = ({
|
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
pushToast({
|
|
100
|
-
message:
|
|
101
|
+
message: `User successfully added\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
101
102
|
status: "INFO",
|
|
102
103
|
icon: (
|
|
103
104
|
<button
|
package/src/features/users/components/CreateUserDrawerWithUsername/CreateUserDrawerWithUsername.tsx
CHANGED
|
@@ -17,6 +17,7 @@ import { useAnalytics, useBuyerPortal } from "../../../shared/hooks";
|
|
|
17
17
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
18
18
|
import { isValidEmail } from "../../../shared/utils";
|
|
19
19
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
20
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
20
21
|
import { maskPhoneNumber } from "../../../shared/utils/phoneNumber";
|
|
21
22
|
import {
|
|
22
23
|
useAddUserToOrgUnit,
|
|
@@ -220,7 +221,7 @@ export const CreateUserDrawerWithUsername = ({
|
|
|
220
221
|
|
|
221
222
|
pushToast({
|
|
222
223
|
title: "User added successfully",
|
|
223
|
-
message: `An access code has been sent to [${email}](mailto:${email}) for first-time login
|
|
224
|
+
message: `An access code has been sent to [${email}](mailto:${email}) for first-time login.\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
224
225
|
status: "INFO",
|
|
225
226
|
icon: (
|
|
226
227
|
<button
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { useAnalytics } from "../../../shared/hooks";
|
|
12
12
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
13
13
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
14
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
14
15
|
import { useRemoveUserFromOrgUnit } from "../../hooks";
|
|
15
16
|
|
|
16
17
|
export type DeleteUserDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
@@ -45,7 +46,7 @@ export const DeleteUserDrawer = ({
|
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
pushToast({
|
|
48
|
-
message:
|
|
49
|
+
message: `User successfully deleted\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
49
50
|
status: "INFO",
|
|
50
51
|
});
|
|
51
52
|
onDelete?.();
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "../../../shared/components";
|
|
12
12
|
import { OptionSelected } from "../../../shared/components/OptionSelected/OptionSelected";
|
|
13
13
|
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
14
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
14
15
|
import { useDebouncedSearchOrgUnit, useReassignUser } from "../../hooks";
|
|
15
16
|
|
|
16
17
|
export type ReassignOrgUnitDrawerProps = Omit<BasicDrawerProps, "children"> & {
|
|
@@ -41,7 +42,7 @@ export const ReassignOrgUnitDrawer = ({
|
|
|
41
42
|
|
|
42
43
|
const handleReassignNewOrgUnitSuccess = () => {
|
|
43
44
|
pushToast({
|
|
44
|
-
message:
|
|
45
|
+
message: `User successfully edited\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
45
46
|
status: "INFO",
|
|
46
47
|
});
|
|
47
48
|
onReassing?.();
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { useAnalytics } from "../../../shared/hooks";
|
|
14
14
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
15
15
|
import { isValidEmail } from "../../../shared/utils";
|
|
16
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
16
17
|
import {
|
|
17
18
|
maskPhoneNumber,
|
|
18
19
|
normalizePhoneNumber,
|
|
@@ -103,7 +104,7 @@ export const UpdateUserDrawer = ({
|
|
|
103
104
|
});
|
|
104
105
|
|
|
105
106
|
pushToast({
|
|
106
|
-
message:
|
|
107
|
+
message: `User successfully updated\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
107
108
|
status: "INFO",
|
|
108
109
|
});
|
|
109
110
|
onUpdate?.();
|
package/src/features/users/components/UpdateUserDrawerWithUsername/UpdateUserDrawerWithUsername.tsx
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
import { useAnalytics } from "../../../shared/hooks";
|
|
14
14
|
import { ANALYTICS_EVENTS } from "../../../shared/services/logger/analytics/constants";
|
|
15
15
|
import { isValidEmail } from "../../../shared/utils";
|
|
16
|
+
import { CHANGES_TIMEOUT_MESSAGE } from "../../../shared/utils/constants";
|
|
16
17
|
import {
|
|
17
18
|
maskPhoneNumber,
|
|
18
19
|
normalizePhoneNumber,
|
|
@@ -111,7 +112,7 @@ export const UpdateUserDrawerWithUsername = ({
|
|
|
111
112
|
});
|
|
112
113
|
|
|
113
114
|
pushToast({
|
|
114
|
-
message:
|
|
115
|
+
message: `User successfully updated\n${CHANGES_TIMEOUT_MESSAGE}`,
|
|
115
116
|
status: "INFO",
|
|
116
117
|
});
|
|
117
118
|
onUpdate?.();
|