Browse Source

feat(admin-ui): Allow creation of verified Customers

Closes #171
Michael Bromley 6 years ago
parent
commit
f4511151b0

+ 8 - 0
packages/admin-ui/src/app/customer/components/customer-detail/customer-detail.component.ts

@@ -152,6 +152,14 @@ export class CustomerDetailComponent extends BaseDetailComponent<CustomerWithOrd
                 this.notificationService.success(_('common.notify-create-success'), {
                     entity: 'Customer',
                 });
+                if (!formValue.password) {
+                    this.notificationService.notify({
+                        message: _('customer.email-verification-sent'),
+                        translationVars: { emailAddress: formValue.emailAddress },
+                        type: 'info',
+                        duration: 10000,
+                    });
+                }
                 this.detailForm.markAsPristine();
                 this.addressDefaultsUpdated = false;
                 this.changeDetector.markForCheck();

+ 1 - 22
packages/admin-ui/src/i18n-messages/en.json

@@ -163,6 +163,7 @@
     "default-billing-address": "Default billing",
     "default-shipping-address": "Default shipping",
     "email-address": "Email address",
+    "email-verification-sent": "A verification email has been sent to { emailAddress }",
     "first-name": "First name",
     "full-name": "Full name",
     "guest": "Guest",
@@ -385,28 +386,6 @@
     "conditions": "Conditions",
     "create-new-promotion": "Create new promotion"
   },
-  "nav": {
-    "administrators": "Administrators",
-    "assets": "Assets",
-    "catalog": "Catalog",
-    "channels": "Channels",
-    "collections": "Collections",
-    "countries": "Countries",
-    "customers": "Customers",
-    "facets": "Facets",
-    "global-settings": "Global settings",
-    "marketing": "Marketing",
-    "orders": "Orders",
-    "payment-methods": "Payment methods",
-    "products": "Products",
-    "promotions": "Promotions",
-    "roles": "Roles",
-    "sales": "Sales",
-    "settings": "Settings",
-    "shipping-methods": "Shipping methods",
-    "tax-categories": "Tax categories",
-    "tax-rates": "Tax Rates"
-  },
   "order": {
     "add-note": "Add note",
     "add-note-success": "Note successfully added",