From ff67a2a72ccddd0237496fb984c0510a635549b2 Mon Sep 17 00:00:00 2001 From: bach Date: Wed, 9 Mar 2022 10:33:31 +0100 Subject: [PATCH] added profiles on user view & edit pages --- config/sync/block.block.pieddepage.yml | 2 +- ..._form_display.profile.customer.default.yml | 9 +++- ....entity_form_display.user.user.default.yml | 31 ++++++++++--- ..._view_display.profile.customer.default.yml | 13 +++++- ....entity_view_display.user.user.default.yml | 44 ++++++++++++++++--- config/sync/profile.type.contact_company.yml | 22 +++------- config/sync/user.role.adherent.yml | 1 - config/sync/user.role.admin.yml | 3 ++ config/sync/user.role.alpha_testeur.yml | 1 - config/sync/user.role.contact_company.yml | 1 - config/sync/user.role.free_user.yml | 1 - config/sync/user.role.student.yml | 1 - 12 files changed, 95 insertions(+), 34 deletions(-) diff --git a/config/sync/block.block.pieddepage.yml b/config/sync/block.block.pieddepage.yml index c655b6d2..4634fb75 100644 --- a/config/sync/block.block.pieddepage.yml +++ b/config/sync/block.block.pieddepage.yml @@ -1,6 +1,6 @@ uuid: 4c2a2713-7fd0-4b0a-ab12-0e23ac5f266d langcode: fr -status: true +status: false dependencies: config: - system.menu.footer diff --git a/config/sync/core.entity_form_display.profile.customer.default.yml b/config/sync/core.entity_form_display.profile.customer.default.yml index 3486aace..c50ac46f 100644 --- a/config/sync/core.entity_form_display.profile.customer.default.yml +++ b/config/sync/core.entity_form_display.profile.customer.default.yml @@ -10,6 +10,7 @@ dependencies: module: - address - commerce_tax + - telephone enforced: module: - commerce_order @@ -26,6 +27,13 @@ content: region: content settings: { } third_party_settings: { } + phone: + type: telephone_default + weight: 2 + region: content + settings: + placeholder: '' + third_party_settings: { } tax_number: type: commerce_tax_number_default weight: 1 @@ -34,4 +42,3 @@ content: third_party_settings: { } hidden: is_default: true - phone: true diff --git a/config/sync/core.entity_form_display.user.user.default.yml b/config/sync/core.entity_form_display.user.user.default.yml index 1dc59a41..916c7da4 100644 --- a/config/sync/core.entity_form_display.user.user.default.yml +++ b/config/sync/core.entity_form_display.user.user.default.yml @@ -10,6 +10,7 @@ dependencies: - field.field.user.user.field_showroom module: - path + - profile - user id: user.user.default targetEntityType: user @@ -21,6 +22,20 @@ content: region: content settings: { } third_party_settings: { } + contact_company_profiles: + type: profile_form + weight: 8 + region: content + settings: + form_mode: default + third_party_settings: { } + customer_profiles: + type: profile_form + weight: 7 + region: content + settings: + form_mode: default + third_party_settings: { } field_company: type: entity_reference_autocomplete weight: 1 @@ -56,7 +71,7 @@ content: placeholder: '' third_party_settings: { } language: - weight: 6 + weight: 9 region: content settings: { } third_party_settings: { } @@ -65,9 +80,16 @@ content: region: content settings: { } third_party_settings: { } + member_profiles: + type: profile_form + weight: 6 + region: content + settings: + form_mode: default + third_party_settings: { } path: type: path - weight: 8 + weight: 11 region: content settings: { } third_party_settings: { } @@ -77,15 +99,12 @@ content: settings: { } third_party_settings: { } timezone: - weight: 7 + weight: 10 region: content settings: { } third_party_settings: { } hidden: commerce_remote_id: true contact: true - contact_company_profiles: true - customer_profiles: true google_analytics: true langcode: true - member_profiles: true diff --git a/config/sync/core.entity_view_display.profile.customer.default.yml b/config/sync/core.entity_view_display.profile.customer.default.yml index cbc24b9c..1a99f49e 100644 --- a/config/sync/core.entity_view_display.profile.customer.default.yml +++ b/config/sync/core.entity_view_display.profile.customer.default.yml @@ -10,6 +10,7 @@ dependencies: module: - address - commerce_tax + - telephone_formatter enforced: module: - commerce_order @@ -27,6 +28,16 @@ content: third_party_settings: { } weight: 0 region: content + phone: + type: telephone_formatter + label: above + settings: + format: 1 + link: true + default_country: null + third_party_settings: { } + weight: 2 + region: content tax_number: type: commerce_tax_number_default label: above @@ -36,5 +47,5 @@ content: weight: 1 region: content hidden: - phone: true search_api_excerpt: true + synonyms: true diff --git a/config/sync/core.entity_view_display.user.user.default.yml b/config/sync/core.entity_view_display.user.user.default.yml index 275abddd..a7c35e4b 100644 --- a/config/sync/core.entity_view_display.user.user.default.yml +++ b/config/sync/core.entity_view_display.user.user.default.yml @@ -16,6 +16,24 @@ targetEntityType: user bundle: user mode: default content: + contact_company_profiles: + type: entity_reference_entity_view + label: above + settings: + view_mode: default + link: true + third_party_settings: { } + weight: 11 + region: content + customer_profiles: + type: entity_reference_entity_view + label: above + settings: + view_mode: default + link: true + third_party_settings: { } + weight: 10 + region: content field_company: type: entity_reference_label label: above @@ -46,27 +64,43 @@ content: third_party_settings: { } weight: 2 region: content + masquerade: + settings: { } + third_party_settings: { } + weight: 5 + region: content member_for: settings: { } third_party_settings: { } weight: 0 region: content + member_profiles: + type: entity_reference_entity_view + label: above + settings: + view_mode: default + link: true + third_party_settings: { } + weight: 9 + region: content + role_expire: + settings: { } + third_party_settings: { } + weight: 8 + region: content user_email_verification_verified: settings: { } third_party_settings: { } - weight: 100 + weight: 6 region: content user_email_verification_verified_date: settings: { } third_party_settings: { } - weight: 100 + weight: 7 region: content hidden: commerce_remote_id: true - contact_company_profiles: true - customer_profiles: true langcode: true - member_profiles: true profile_contact_company: true profile_customer: true profile_member: true diff --git a/config/sync/profile.type.contact_company.yml b/config/sync/profile.type.contact_company.yml index d99a3344..3e2ad89a 100644 --- a/config/sync/profile.type.contact_company.yml +++ b/config/sync/profile.type.contact_company.yml @@ -2,23 +2,15 @@ uuid: 2af6f5f9-510a-4a3f-89d1-ef8f2e94b09e langcode: en status: true dependencies: { } +third_party_settings: + commerce_order: + customer_profile_type: false id: contact_company label: 'Contact Company' -multiple: true +display_label: '' +multiple: false registration: false roles: contact_company: contact_company - unverified: '0' - authenticated: '0' - free_user: '0' - alpha_testeur: '0' - student: '0' - premium: '0' - adherent: '0' - translator: '0' - admin_showroom: '0' - admin: '0' - root: '0' -weight: 0 -use_revisions: false -description: '' +allow_revisions: false +new_revision: false diff --git a/config/sync/user.role.adherent.yml b/config/sync/user.role.adherent.yml index 82583ecf..bc834b67 100644 --- a/config/sync/user.role.adherent.yml +++ b/config/sync/user.role.adherent.yml @@ -22,7 +22,6 @@ is_admin: null permissions: - 'access materio search' - 'add flag lists' - - 'create member profile' - 'create note content' - 'create workflow workflow_transition' - 'display eu cookie compliance popup' diff --git a/config/sync/user.role.admin.yml b/config/sync/user.role.admin.yml index 4e241c17..fc872ddd 100644 --- a/config/sync/user.role.admin.yml +++ b/config/sync/user.role.admin.yml @@ -239,7 +239,10 @@ permissions: - 'update any commerce_license' - 'update any commerce_promotion' - 'update any commerce_subscription' + - 'update any contact_company profile' + - 'update any customer profile' - 'update any materio_product_type commerce_product' + - 'update any member profile' - 'update any online commerce_store' - 'update content translations' - 'update default commerce_order' diff --git a/config/sync/user.role.alpha_testeur.yml b/config/sync/user.role.alpha_testeur.yml index 3b635e43..55ad3f93 100644 --- a/config/sync/user.role.alpha_testeur.yml +++ b/config/sync/user.role.alpha_testeur.yml @@ -22,7 +22,6 @@ is_admin: null permissions: - 'access materio search' - 'add flag lists' - - 'create member profile' - 'create note content' - 'create workflow workflow_transition' - 'display eu cookie compliance popup' diff --git a/config/sync/user.role.contact_company.yml b/config/sync/user.role.contact_company.yml index dcdadcb9..e2a9f5ea 100644 --- a/config/sync/user.role.contact_company.yml +++ b/config/sync/user.role.contact_company.yml @@ -11,7 +11,6 @@ label: 'Contact Company' weight: -6 is_admin: null permissions: - - 'create member profile' - 'display eu cookie compliance popup' - 'update own contact_company profile' - 'update own member profile' diff --git a/config/sync/user.role.free_user.yml b/config/sync/user.role.free_user.yml index b9326616..8dbfc35b 100644 --- a/config/sync/user.role.free_user.yml +++ b/config/sync/user.role.free_user.yml @@ -11,7 +11,6 @@ label: 'Free User' weight: -7 is_admin: null permissions: - - 'create member profile' - 'display eu cookie compliance popup' - 'update own member profile' - 'view field_thesaurus' diff --git a/config/sync/user.role.student.yml b/config/sync/user.role.student.yml index e28e3610..47ac6a6c 100644 --- a/config/sync/user.role.student.yml +++ b/config/sync/user.role.student.yml @@ -20,7 +20,6 @@ is_admin: null permissions: - 'access materio search' - 'add flag lists' - - 'create member profile' - 'create note content' - 'create workflow workflow_transition' - 'display eu cookie compliance popup'