Browse Source

improved admin views commerce licenses

bach 3 years ago
parent
commit
510d7cb073
1 changed files with 84 additions and 67 deletions
  1. 84 67
      config/sync/views.view.commerce_licenses.yml

+ 84 - 67
config/sync/views.view.commerce_licenses.yml

@@ -3,8 +3,6 @@ langcode: en
 status: true
 dependencies:
   config:
-    - field.storage.profile.field_first_name
-    - field.storage.profile.field_name
     - user.role.adherent
     - user.role.student
   module:
@@ -89,11 +87,12 @@ display:
           summary: ''
           description: ''
           columns:
+            views_bulk_operations_bulk_form: views_bulk_operations_bulk_form
             license_id: license_id
             uuid: uuid
             uid: uid
-            field_name: field_name
-            field_first_name: field_first_name
+            address_given_name: address_given_name
+            address_family_name: view_user
             view_user: view_user
             mail: view_user
             label: view_user
@@ -109,6 +108,11 @@ display:
             product_variation: product_variation
             roles_target_id: roles_target_id
           info:
+            views_bulk_operations_bulk_form:
+              align: ''
+              separator: ''
+              empty_column: false
+              responsive: ''
             license_id:
               sortable: true
               default_sort_order: asc
@@ -128,14 +132,14 @@ display:
               separator: ''
               empty_column: false
               responsive: ''
-            field_name:
+            address_given_name:
               sortable: false
               default_sort_order: asc
               align: ''
               separator: ''
               empty_column: false
               responsive: ''
-            field_first_name:
+            address_family_name:
               sortable: false
               default_sort_order: asc
               align: ''
@@ -219,7 +223,7 @@ display:
               responsive: ''
             granted:
               sortable: true
-              default_sort_order: asc
+              default_sort_order: desc
               align: ''
               separator: ''
               empty_column: false
@@ -228,7 +232,7 @@ display:
               sortable: false
               default_sort_order: asc
               align: ''
-              separator: ''
+              separator: '<br>'
               empty_column: false
               responsive: ''
             roles_target_id:
@@ -238,7 +242,7 @@ display:
               separator: ''
               empty_column: false
               responsive: ''
-          default: expires
+          default: granted
           empty_table: false
       row:
         type: fields
@@ -497,14 +501,14 @@ display:
           entity_type: commerce_license
           entity_field: uid
           plugin_id: field
-        field_name:
-          id: field_name
-          table: profile__field_name
-          field: field_name
-          relationship: profile
+        address_given_name:
+          id: address_given_name
+          table: profile__address
+          field: address_given_name
+          relationship: profile_type
           group_type: group
           admin_label: ''
-          label: Name
+          label: 'Adresse (address : given_name)'
           exclude: true
           alter:
             alter_text: false
@@ -541,37 +545,23 @@ display:
           element_wrapper_type: ''
           element_wrapper_class: ''
           element_default_classes: true
-          empty: 'View user (no profile provided)'
+          empty: ''
           hide_empty: false
-          empty_zero: true
+          empty_zero: false
           hide_alter_empty: true
-          click_sort_column: value
-          type: string
-          settings:
-            link_to_entity: false
-          group_column: value
-          group_columns: {  }
-          group_rows: true
-          delta_limit: 0
-          delta_offset: 0
-          delta_reversed: false
-          delta_first_last: false
-          multi_type: separator
-          separator: ', '
-          field_api_classes: false
-          plugin_id: field
-        field_first_name:
-          id: field_first_name
-          table: profile__field_first_name
-          field: field_first_name
-          relationship: profile
+          plugin_id: standard
+        address_family_name:
+          id: address_family_name
+          table: profile__address
+          field: address_family_name
+          relationship: profile_type
           group_type: group
           admin_label: ''
-          label: 'First Name'
+          label: 'Adresse (address : family_name)'
           exclude: true
           alter:
             alter_text: false
-            text: ''
+            text: '{{ address_given_name }} {{ address_family_name }}'
             make_link: false
             path: ''
             absolute: false
@@ -604,25 +594,11 @@ display:
           element_wrapper_type: ''
           element_wrapper_class: ''
           element_default_classes: true
-          empty: ''
+          empty: 'No customer profil'
           hide_empty: false
           empty_zero: false
           hide_alter_empty: true
-          click_sort_column: value
-          type: string
-          settings:
-            link_to_entity: false
-          group_column: value
-          group_columns: {  }
-          group_rows: true
-          delta_limit: 0
-          delta_offset: 0
-          delta_reversed: false
-          delta_first_last: false
-          multi_type: separator
-          separator: ', '
-          field_api_classes: false
-          plugin_id: field
+          plugin_id: standard
         view_user:
           id: view_user
           table: users
@@ -634,7 +610,7 @@ display:
           exclude: false
           alter:
             alter_text: true
-            text: '<strong>{{ field_name }} {{ field_first_name }}</strong>'
+            text: '<strong>{{ address_given_name }} {{ address_family_name }}</strong>'
             make_link: false
             path: ''
             absolute: false
@@ -1642,6 +1618,50 @@ display:
           entity_type: user
           entity_field: roles
           plugin_id: user_roles
+        roles_target_id_1:
+          id: roles_target_id_1
+          table: user__roles
+          field: roles_target_id
+          relationship: uid
+          group_type: group
+          admin_label: ''
+          operator: or
+          value:
+            student: student
+            adherent: adherent
+          group: 1
+          exposed: false
+          expose:
+            operator_id: ''
+            label: ''
+            description: ''
+            use_operator: false
+            operator: ''
+            operator_limit_selection: false
+            operator_list: {  }
+            identifier: ''
+            required: false
+            remember: false
+            multiple: false
+            remember_roles:
+              authenticated: authenticated
+            reduce: false
+          is_grouped: false
+          group_info:
+            label: ''
+            description: ''
+            identifier: ''
+            optional: true
+            widget: select
+            multiple: false
+            remember: false
+            default_group: All
+            default_group_multiple: {  }
+            group_items: {  }
+          reduce_duplicates: false
+          entity_type: user
+          entity_field: roles
+          plugin_id: user_roles
       sorts: {  }
       title: Licenses
       header:
@@ -1669,16 +1689,17 @@ display:
           entity_type: commerce_license
           entity_field: uid
           plugin_id: standard
-        profile:
-          id: profile
+        profile_type:
+          id: profile_type
           table: users_field_data
-          field: profile
+          field: profile_type
           relationship: uid
           group_type: group
-          admin_label: Profile
+          admin_label: 'Profile Client'
           required: false
+          profile_type: customer
           entity_type: user
-          plugin_id: standard
+          plugin_id: profile_relationship
       arguments: {  }
       display_extenders:
         views_ef_fieldset: {  }
@@ -1690,9 +1711,7 @@ display:
         - url
         - url.query_args
         - user.permissions
-      tags:
-        - 'config:field.storage.profile.field_first_name'
-        - 'config:field.storage.profile.field_name'
+      tags: {  }
   page_1:
     display_plugin: page
     id: page_1
@@ -1710,6 +1729,4 @@ display:
         - url
         - url.query_args
         - user.permissions
-      tags:
-        - 'config:field.storage.profile.field_first_name'
-        - 'config:field.storage.profile.field_name'
+      tags: {  }