diff --git a/packages/admin/dashboard/src/i18n/translations/en.json b/packages/admin/dashboard/src/i18n/translations/en.json index 9e6f766bbd..f3763ea143 100644 --- a/packages/admin/dashboard/src/i18n/translations/en.json +++ b/packages/admin/dashboard/src/i18n/translations/en.json @@ -779,6 +779,7 @@ "noRecordsMessage": "This customer doesn't belong to any group." }, "add": { + "success": "Customer added to: {{groups}}.", "list": { "noRecordsMessage": "Please create a customer group first." } diff --git a/packages/admin/dashboard/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx b/packages/admin/dashboard/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx index cbc53a95f8..edcf219e48 100644 --- a/packages/admin/dashboard/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx +++ b/packages/admin/dashboard/src/routes/customers/customers-add-customer-group/components/add-customers-form/add-customer-groups-form.tsx @@ -126,6 +126,16 @@ export const AddCustomerGroupsForm = ({ await Promise.all(promises) + toast.success(t("general.success"), { + description: t("customers.groups.add.success", { + groups: data.customer_group_ids + .map((id) => customer_groups?.find((g) => g.id === id)) + .filter(Boolean) + .map((cg) => cg.name), + }), + dismissLabel: t("actions.close"), + }) + await queryClient.invalidateQueries({ queryKey: customerGroupsQueryKeys.lists(), }) @@ -155,19 +165,6 @@ export const AddCustomerGroupsForm = ({ {form.formState.errors.customer_group_ids.message} )} - - - - @@ -187,6 +184,21 @@ export const AddCustomerGroupsForm = ({ }} /> + + + + + + )