Browse Source

feat(admin-ui): Display auth strategy in customer history

Michael Bromley 5 years ago
parent
commit
bdfc43d36a

+ 12 - 12
packages/admin-ui/i18n-coverage.json

@@ -1,36 +1,36 @@
 {
-  "generatedOn": "2020-06-15T12:08:07.862Z",
-  "lastCommit": "a0ef63ff60e69739c31525a50cae7bd1b5d22977",
+  "generatedOn": "2020-06-25T08:48:13.322Z",
+  "lastCommit": "96f923a0a1d0b8d3ac575dce30148f9d75360069",
   "translationStatus": {
     "de": {
-      "tokenCount": 650,
+      "tokenCount": 652,
       "translatedCount": 609,
-      "percentage": 94
+      "percentage": 93
     },
     "en": {
-      "tokenCount": 650,
-      "translatedCount": 650,
+      "tokenCount": 652,
+      "translatedCount": 651,
       "percentage": 100
     },
     "es": {
-      "tokenCount": 650,
+      "tokenCount": 652,
       "translatedCount": 467,
       "percentage": 72
     },
     "pl": {
-      "tokenCount": 650,
+      "tokenCount": 652,
       "translatedCount": 566,
       "percentage": 87
     },
     "zh_Hans": {
-      "tokenCount": 650,
+      "tokenCount": 652,
       "translatedCount": 550,
-      "percentage": 85
+      "percentage": 84
     },
     "zh_Hant": {
-      "tokenCount": 650,
+      "tokenCount": 652,
       "translatedCount": 550,
-      "percentage": 85
+      "percentage": 84
     }
   }
 }

+ 1 - 2
packages/admin-ui/src/lib/core/src/shared/components/timeline-entry/timeline-entry.component.scss

@@ -67,12 +67,11 @@
     color: $color-grey-500;
 }
 
-.featured-entry {
+.featured-entry ::ng-deep {
     .title {
         color: $color-grey-800;
         font-size: 16px;
         line-height: 26px;
-        background-color: hotpink;
     }
     .note-text {
         color: $color-grey-800;

+ 22 - 1
packages/admin-ui/src/lib/customer/src/components/customer-history/customer-history.component.html

@@ -14,15 +14,36 @@
         [iconShape]="getTimelineIcon(entry)"
         [createdAt]="entry.createdAt"
         [name]="getName(entry)"
+        [featured]="isFeatured(entry)"
     >
         <ng-container [ngSwitch]="entry.type">
             <ng-container *ngSwitchCase="type.CUSTOMER_REGISTERED">
-                {{ 'customer.history-customer-registered' | translate }}
+                <div class="title">
+                    {{ 'customer.history-customer-registered' | translate }}
+                </div>
+                <ng-container *ngIf="entry.data.strategy === 'native'; else namedStrategy">
+                    {{ 'customer.history-using-native-auth-strategy' | translate }}
+                </ng-container>
+                <ng-template #namedStrategy>
+                    {{
+                    'customer.history-using-external-auth-strategy'
+                        | translate: { strategy: entry.data.strategy }
+                    }}
+                </ng-template>
             </ng-container>
             <ng-container *ngSwitchCase="type.CUSTOMER_VERIFIED">
                 <div class="title">
                     {{ 'customer.history-customer-verified' | translate }}
                 </div>
+                <ng-container *ngIf="entry.data.strategy === 'native'; else namedStrategy">
+                    {{ 'customer.history-using-native-auth-strategy' | translate }}
+                </ng-container>
+                <ng-template #namedStrategy>
+                    {{
+                        'customer.history-using-external-auth-strategy'
+                            | translate: { strategy: entry.data.strategy }
+                    }}
+                </ng-template>
             </ng-container>
             <ng-container *ngSwitchCase="type.CUSTOMER_DETAIL_UPDATED">
                 <div class="flex">

+ 2 - 0
packages/admin-ui/src/lib/static/i18n-messages/de.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "",
     "history-customer-removed-from-group": "",
     "history-customer-verified": "",
+    "history-using-external-auth-strategy": "",
+    "history-using-native-auth-strategy": "",
     "last-name": "Nachname",
     "name": "Name",
     "new-email-address": "",

+ 3 - 1
packages/admin-ui/src/lib/static/i18n-messages/en.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "Customer registered",
     "history-customer-removed-from-group": "Customer removed from group \"{ groupName }\"",
     "history-customer-verified": "Customer verified",
+    "history-using-external-auth-strategy": "using { strategy }",
+    "history-using-native-auth-strategy": "using email address",
     "last-name": "Last name",
     "name": "Name",
     "new-email-address": "New email address",
@@ -679,4 +681,4 @@
     "job-result": "Job result",
     "job-state": "Job state"
   }
-}
+}

+ 2 - 0
packages/admin-ui/src/lib/static/i18n-messages/es.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "",
     "history-customer-removed-from-group": "",
     "history-customer-verified": "",
+    "history-using-external-auth-strategy": "",
+    "history-using-native-auth-strategy": "",
     "last-name": "Apellidos",
     "name": "Nombre",
     "new-email-address": "",

+ 2 - 0
packages/admin-ui/src/lib/static/i18n-messages/pl.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "",
     "history-customer-removed-from-group": "",
     "history-customer-verified": "",
+    "history-using-external-auth-strategy": "",
+    "history-using-native-auth-strategy": "",
     "last-name": "Nazwisko",
     "name": "Nazwa",
     "new-email-address": "",

+ 2 - 0
packages/admin-ui/src/lib/static/i18n-messages/zh_Hans.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "",
     "history-customer-removed-from-group": "",
     "history-customer-verified": "",
+    "history-using-external-auth-strategy": "",
+    "history-using-native-auth-strategy": "",
     "last-name": "姓",
     "name": "姓名",
     "new-email-address": "",

+ 2 - 0
packages/admin-ui/src/lib/static/i18n-messages/zh_Hant.json

@@ -240,6 +240,8 @@
     "history-customer-registered": "",
     "history-customer-removed-from-group": "",
     "history-customer-verified": "",
+    "history-using-external-auth-strategy": "",
+    "history-using-native-auth-strategy": "",
     "last-name": "姓",
     "name": "姓名",
     "new-email-address": "",