Browse Source

company migration: email, address; company edit form display

Bachir Soussi Chiadmi 5 years ago
parent
commit
25d6177874

+ 34 - 10
modules/custom/materio_migrate/config/install/migrate_plus.migration.d7_taxonomy_term_company.yml

@@ -49,23 +49,47 @@ process:
       options: attributes
   field_memo: field_memo
   field_public_phone: public_phone
-    # plugin: iterator
-    # source: field_public_phone
-    # process:
-    #   value: number
-    #   # ??: country_codes
-    #   # ??: extension
+  field_public_email:
+    plugin: iterator
+    source: field_public_email
+    process:
+      value: email
+  field_public_address:
+    plugin: iterator
+    source: field_public_address
+    process:
+      # langcode:
+      country_code: country
+      administrative_area: administrative_area
+      locality: locality
+      dependent_locality: dependent_locality
+      postal_code: postal_code
+      # sorting_code:
+      address_line1: thoroughfare
+      # address_line2:
+      organization: organisation_name
+      given_name: first_name
+      # additional_name:
+      family_name: last_name
+
+      # SOURCES
+      # sub_administrative_area
+      # premise
+      # sub_premise
+      # name_line
+      # data
 
+  field_note: field_note
+
+
+  # work in progress
 
-  field_public_email: field_public_email
+  # not ready
   field_departement: field_departement
   field_description: body
   # 'description/value': description
   # 'description/format': format
   field_infos_from_company: field_infos_from_company
-  field_public_address: field_public_address
-
-  field_note: field_note
   field_attachments: field_attachments
 
   # workflow ??

+ 98 - 25
sites/default/config/sync/core.entity_form_display.taxonomy_term.company.default.yml

@@ -16,33 +16,111 @@ dependencies:
     - taxonomy.vocabulary.company
   module:
     - address
+    - field_group
     - file
     - link
-    - path
     - telephone
     - text
+third_party_settings:
+  field_group:
+    group_tabs:
+      children:
+        - group_infos
+        - group_contents
+        - group_attachments
+        - group_internal
+      parent_name: ''
+      weight: 1
+      format_type: tabs
+      format_settings:
+        id: ''
+        classes: ''
+        direction: horizontal
+      label: Tabs
+    group_infos:
+      children:
+        - field_departement
+        - field_public_phone
+        - field_public_email
+        - field_website
+        - field_public_address
+      parent_name: group_tabs
+      weight: 12
+      format_type: tab
+      format_settings:
+        label: 'Public infos'
+        formatter: open
+        description: ''
+        required_fields: true
+        id: ''
+        classes: ''
+      label: 'Public infos'
+    group_contents:
+      children:
+        - description
+        - field_description
+        - field_infos_from_company
+      parent_name: group_tabs
+      weight: 13
+      format_type: tab
+      format_settings:
+        id: ''
+        classes: ''
+        formatter: closed
+        description: ''
+        required_fields: true
+      label: Contents
+    group_internal:
+      children:
+        - field_note
+        - field_memo
+        - langcode
+        - translation
+      parent_name: group_tabs
+      weight: 15
+      format_type: tab
+      format_settings:
+        id: ''
+        classes: ''
+        formatter: closed
+        description: ''
+        required_fields: true
+      label: Internal
+    group_attachments:
+      children:
+        - field_attachments
+      parent_name: group_tabs
+      weight: 14
+      format_type: tab
+      format_settings:
+        id: ''
+        classes: ''
+        formatter: closed
+        description: ''
+        required_fields: true
+      label: Attachments
 id: taxonomy_term.company.default
 targetEntityType: taxonomy_term
 bundle: company
 mode: default
 content:
   description:
-    type: text_textfield
-    weight: 0
+    type: text_textarea
+    weight: 2
     region: content
     settings:
-      size: 60
       placeholder: ''
+      rows: 5
     third_party_settings: {  }
   field_attachments:
-    weight: 40
+    weight: 11
     settings:
       progress_indicator: throbber
     third_party_settings: {  }
     type: file_generic
     region: content
   field_departement:
-    weight: 31
+    weight: 13
     settings:
       size: 60
       placeholder: ''
@@ -50,7 +128,7 @@ content:
     type: string_textfield
     region: content
   field_description:
-    weight: 33
+    weight: 3
     settings:
       rows: 5
       placeholder: ''
@@ -58,7 +136,7 @@ content:
     type: text_textarea
     region: content
   field_infos_from_company:
-    weight: 35
+    weight: 4
     settings:
       rows: 5
       placeholder: ''
@@ -66,7 +144,7 @@ content:
     type: text_textarea
     region: content
   field_memo:
-    weight: 39
+    weight: 6
     settings:
       rows: 5
       placeholder: ''
@@ -74,20 +152,20 @@ content:
     type: string_textarea
     region: content
   field_note:
-    weight: 38
+    weight: 5
     settings: {  }
     third_party_settings: {  }
     type: options_select
     region: content
   field_public_address:
-    weight: 36
+    weight: 17
     settings:
       default_country: null
     third_party_settings: {  }
     type: address_default
     region: content
   field_public_email:
-    weight: 32
+    weight: 15
     settings:
       size: 60
       placeholder: ''
@@ -95,14 +173,14 @@ content:
     type: email_default
     region: content
   field_public_phone:
-    weight: 37
+    weight: 14
     settings:
       placeholder: ''
     third_party_settings: {  }
     type: telephone_default
     region: content
   field_website:
-    weight: 34
+    weight: 16
     settings:
       placeholder_url: ''
       placeholder_title: ''
@@ -111,28 +189,23 @@ content:
     region: content
   langcode:
     type: language_select
-    weight: 2
+    weight: 7
     region: content
     settings:
       include_locked: true
     third_party_settings: {  }
   name:
     type: string_textfield
-    weight: -5
+    weight: 0
     region: content
     settings:
       size: 60
       placeholder: ''
     third_party_settings: {  }
-  path:
-    type: path
-    weight: 30
-    region: content
-    settings: {  }
-    third_party_settings: {  }
   translation:
-    weight: 10
+    weight: 8
+    region: content
     settings: {  }
     third_party_settings: {  }
-    region: content
-hidden: {  }
+hidden:
+  path: true

+ 7 - 1
sites/default/config/sync/field.field.taxonomy_term.company.field_public_address.yml

@@ -20,6 +20,12 @@ default_value_callback: ''
 settings:
   available_countries: {  }
   langcode_override: ''
-  field_overrides: {  }
+  field_overrides:
+    givenName:
+      override: optional
+    additionalName:
+      override: optional
+    familyName:
+      override: optional
   fields: {  }
 field_type: address

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_node_materiau.yml

@@ -1,4 +1,4 @@
-uuid: 18d33213-95cf-4161-afe2-ba133279e333
+uuid: 0a24de28-0492-4a63-a5fd-847c5a4fe5a0
 langcode: en
 status: true
 dependencies: {  }

+ 20 - 4
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_company.yml

@@ -1,9 +1,9 @@
-uuid: e383cca0-2dc7-44fb-bd95-b7d5338ac3e1
+uuid: 0bcce6fc-4b6e-4e40-b3a2-b164ffaec3c9
 langcode: en
 status: true
 dependencies: {  }
 _core:
-  default_config_hash: nXvtfVaO5hBFLqxQk2yYGGGNHiXsXNJIuzMUmi305ck
+  default_config_hash: Z1Eszg2PyEx7bcSK4ieINRiMS9CB3AtJOAZbW0U6qG8
 id: d7_taxonomy_term_company
 class: null
 field_plugin_method: null
@@ -45,11 +45,27 @@ process:
       options: attributes
   field_memo: field_memo
   field_public_phone: public_phone
-  field_public_email: field_public_email
+  field_public_email:
+    plugin: iterator
+    source: field_public_email
+    process:
+      value: email
+  field_public_address:
+    plugin: iterator
+    source: field_public_address
+    process:
+      country_code: country
+      administrative_area: administrative_area
+      locality: locality
+      dependent_locality: dependent_locality
+      postal_code: postal_code
+      address_line1: thoroughfare
+      organization: organisation_name
+      given_name: first_name
+      family_name: last_name
   field_departement: field_departement
   field_description: body
   field_infos_from_company: field_infos_from_company
-  field_public_address: field_public_address
   field_note: field_note
   field_attachments: field_attachments
 destination:

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_company_i18n.yml

@@ -1,4 +1,4 @@
-uuid: 47059cf4-b015-4825-aa6e-86f7b61b1c2b
+uuid: 17165199-3121-49d1-b878-a64284025225
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_showroom.yml

@@ -1,4 +1,4 @@
-uuid: 0e13256c-c122-4d40-a43f-76dac1369c0f
+uuid: 05fe6f06-9cee-47ff-933d-268644842a3a
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_tags.yml

@@ -1,4 +1,4 @@
-uuid: d6148224-150a-47fd-bb00-b4bb5986cb53
+uuid: 465171e4-51a9-4444-86a4-7b6f7507db35
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_tags_i18n.yml

@@ -1,4 +1,4 @@
-uuid: ff31d770-4102-41b7-8ef7-9dcb6ad5a4e0
+uuid: e214bf70-9c03-4c85-b43e-2eda414054b5
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_thesaurus.yml

@@ -1,4 +1,4 @@
-uuid: dbb79452-8b5d-4084-a64f-fc805ab2157c
+uuid: 0a8163f7-cc07-4a8b-bc84-c92c5a5bf670
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration.d7_taxonomy_term_thesaurus_i18n.yml

@@ -1,4 +1,4 @@
-uuid: 4d4c3ce5-7305-4568-8946-9a9e98cd8e82
+uuid: 358a06c9-e520-4b68-9ba1-06ad909a2a35
 langcode: en
 status: true
 dependencies: {  }

+ 1 - 1
sites/default/config/sync/migrate_plus.migration_group.d7_materio.yml

@@ -1,4 +1,4 @@
-uuid: 5d539cf2-47e3-4eda-98e9-a78514e6e9de
+uuid: efeba33e-d8cf-4133-9d78-9977d3ff451f
 langcode: en
 status: true
 dependencies: