9 Commits 2c6e2b6230 ... 8b2c26774f

Auteur SHA1 Message Date
  bach 8b2c26774f user_materio user_block cache max-age 0 il y a 3 semaines
  bach 5c40959059 fixed user logout bug il y a 1 mois
  bach 81ab0ccfd7 fixed user logout bug il y a 1 mois
  bach b5fc279340 patched pwa for empty <p> in head il y a 1 mois
  bach f9c28306e6 updated some contrib modules il y a 1 mois
  bach 1096ac5408 updated some contrib modules, pwa themecolor setting il y a 1 mois
  bach 7759cc5637 updated some contrib modules il y a 1 mois
  bach 8d488a4ef0 updated core il y a 1 mois
  bach 0054045a33 updated commerce modules (<p> in header bug fix), patched advancedqueue il y a 1 mois

+ 7 - 1
composer.json

@@ -68,6 +68,7 @@
         "drupal/advancedqueue": "^1.1",
         "drupal/allowed_formats": "^3.0",
         "drupal/amswap": "^3.0",
+        "drupal/asset_cache_bust": "^1.0",
         "drupal/audiofield": "^1.10",
         "drupal/auto_entitylabel": "^3.1",
         "drupal/better_messages": "^2.0@alpha",
@@ -113,6 +114,7 @@
         "drupal/jsonapi_extras": "^3.21",
         "drupal/login_history": "^2.0",
         "drupal/login_tracker": "^2.0",
+        "drupal/logout_token": "^1.0",
         "drupal/mailjet": "^4.0",
         "drupal/maillog": "^1.1",
         "drupal/masquerade": "^2.0",
@@ -258,7 +260,8 @@
             },
             "drupal/pwa": {
               "Manifest doesn't have a maskable icon https://www.drupal.org/project/pwa/issues/3165433": "https://www.drupal.org/files/issues/2024-03-10/manifest-doesnt-have-a-maskable-icon-error-3165433-20.patch",
-              "Undefined array key name https://www.drupal.org/project/pwa/issues/3422906": "https://www.drupal.org/files/issues/2024-02-21/pwa-3422906-3.patch"
+              "Undefined array key name https://www.drupal.org/project/pwa/issues/3422906": "https://www.drupal.org/files/issues/2024-02-21/pwa-3422906-3.patch",
+              "The module adds white space at the top of the olivero theme https://www.drupal.org/project/pwa/issues/3427753" : "https://www.drupal.org/files/issues/2024-04-03/pwa-pwa_extras-decode_entities.patch"
             },
             "drupal/toolbar_theme": {
               "Automated Drupal 9 compatibility fixes https://www.drupal.org/project/toolbar_themes/issues/3149099": "https://www.drupal.org/files/issues/2020-06-06/toolbar_themes.1.x-dev.rector.patch"
@@ -280,6 +283,9 @@
             },
             "drupal/term_reference_tree": {
               "Term Reference Tree: Re-implement Track List https://www.drupal.org/project/term_reference_tree/issues/3064280": "https://www.drupal.org/files/issues/2024-08-26/term_reference_tree-3064280_bring_back_tracklist-22.patch"
+            },
+            "drupal/advancedqueue": {
+              "Issue with configuration schema advancedqueue.backend.[id] https://www.drupal.org/project/advancedqueue/issues/3469869": "https://git.drupalcode.org/project/advancedqueue/-/commit/a8864851cdfa40c9e38a3f5f64885baf1937375e.patch"
             }
         },
         "archived-patches": {

Fichier diff supprimé car celui-ci est trop grand
+ 235 - 180
composer.lock


+ 3 - 0
config/sync/core.entity_form_display.commerce_order.recurring.default.yml

@@ -6,6 +6,7 @@ dependencies:
     - commerce_order.commerce_order_type.recurring
     - field.field.commerce_order.recurring.billing_period
     - field.field.commerce_order.recurring.billing_schedule
+    - field.field.commerce_order.recurring.commerce_recurring_queued
     - field.field.commerce_order.recurring.field_mailjet_campaign_id
   module:
     - commerce_order
@@ -64,6 +65,8 @@ hidden:
   billing_period: true
   billing_schedule: true
   cart: true
+  commerce_recurring_queued: true
+  customer_comments: true
   ip_address: true
   mail: true
   order_number: true

+ 1 - 1
config/sync/core.entity_form_display.workflow_transition.workflow.default.yml

@@ -34,7 +34,7 @@ content:
       autocomplete_route_name: autocomplete_deluxe.autocomplete
       size: 60
       selection_handler: default
-      limit: 10
+      match_limit: 10
       min_length: 0
       delimiter: ''
       not_found_message_allow: false

+ 12 - 2
config/sync/core.entity_view_display.commerce_order.recurring.default.yml

@@ -6,6 +6,7 @@ dependencies:
     - commerce_order.commerce_order_type.recurring
     - field.field.commerce_order.recurring.billing_period
     - field.field.commerce_order.recurring.billing_schedule
+    - field.field.commerce_order.recurring.commerce_recurring_queued
     - field.field.commerce_order.recurring.field_mailjet_campaign_id
   module:
     - commerce_order
@@ -75,13 +76,21 @@ content:
     weight: 3
     region: content
   coupons:
-    label: above
     type: entity_reference_label
+    label: above
     settings:
       link: true
-    region: content
+    third_party_settings: {  }
     weight: 12
+    region: content
+  customer_comments:
+    type: string
+    label: above
+    settings:
+      link_to_entity: false
     third_party_settings: {  }
+    weight: 13
+    region: content
   field_mailjet_campaign_id:
     type: number_integer
     label: above
@@ -156,6 +165,7 @@ content:
 hidden:
   billing_profile: true
   billing_schedule: true
+  commerce_recurring_queued: true
   order_number: true
   search_api_excerpt: true
   store_id: true

+ 12 - 2
config/sync/core.entity_view_display.commerce_order.recurring.user.yml

@@ -7,6 +7,7 @@ dependencies:
     - core.entity_view_mode.commerce_order.user
     - field.field.commerce_order.recurring.billing_period
     - field.field.commerce_order.recurring.billing_schedule
+    - field.field.commerce_order.recurring.commerce_recurring_queued
     - field.field.commerce_order.recurring.field_mailjet_campaign_id
   module:
     - commerce_order
@@ -75,13 +76,21 @@ content:
     weight: 4
     region: content
   coupons:
-    label: above
     type: entity_reference_label
+    label: above
     settings:
       link: true
-    region: content
+    third_party_settings: {  }
     weight: 13
+    region: content
+  customer_comments:
+    type: string
+    label: above
+    settings:
+      link_to_entity: false
     third_party_settings: {  }
+    weight: 14
+    region: content
   mail:
     type: email_mailto
     label: inline
@@ -155,6 +164,7 @@ content:
 hidden:
   balance: true
   billing_schedule: true
+  commerce_recurring_queued: true
   field_mailjet_campaign_id: true
   ip_address: true
   search_api_excerpt: true

+ 1 - 0
config/sync/core.extension.yml

@@ -124,6 +124,7 @@ module:
   locale: 0
   login_history: 0
   login_tracker: 0
+  logout_token: 0
   mailjet: 0
   mailjet_commerce: 0
   mailjet_event: 0

+ 23 - 0
config/sync/field.field.commerce_order.recurring.commerce_recurring_queued.yml

@@ -0,0 +1,23 @@
+uuid: 149949ee-88a4-4807-97b8-ce17ea87fbaf
+langcode: en
+status: true
+dependencies:
+  config:
+    - commerce_order.commerce_order_type.recurring
+    - field.storage.commerce_order.commerce_recurring_queued
+id: commerce_order.recurring.commerce_recurring_queued
+field_name: commerce_recurring_queued
+entity_type: commerce_order
+bundle: recurring
+label: Queued
+description: ''
+required: false
+translatable: false
+default_value:
+  -
+    value: 0
+default_value_callback: ''
+settings:
+  on_label: 'Yes'
+  off_label: 'No'
+field_type: boolean

+ 18 - 0
config/sync/field.storage.commerce_order.commerce_recurring_queued.yml

@@ -0,0 +1,18 @@
+uuid: 69712edc-46a8-4945-aa76-be9d9d77d5c2
+langcode: en
+status: true
+dependencies:
+  module:
+    - commerce_order
+id: commerce_order.commerce_recurring_queued
+field_name: commerce_recurring_queued
+entity_type: commerce_order
+type: boolean
+settings: {  }
+module: core
+locked: true
+cardinality: 1
+translatable: true
+indexes: {  }
+persist_with_no_fields: false
+custom_storage: false

+ 1 - 0
config/sync/language/fr/pwa.config.yml

@@ -2,3 +2,4 @@ description: "L'inspiration par la matière"
 lang: fr
 start_url: /
 scope: /
+dir: auto

+ 1 - 1
config/sync/pwa.config.yml

@@ -11,7 +11,7 @@ dir: auto
 orientation: portrait
 categories:
   - design
-theme_color: '#ffffff'
+theme_color: '#69cecd'
 background_color: '#ffffff'
 display: standalone
 cross_origin: false

+ 17 - 0
config/sync/ultimate_cron.job.commerce_promotion_cron.yml

@@ -0,0 +1,17 @@
+uuid: 36f7c233-67e6-4847-88e3-327be6752439
+langcode: en
+status: true
+dependencies:
+  module:
+    - commerce_promotion
+title: 'Default cron handler'
+id: commerce_promotion_cron
+weight: 0
+module: commerce_promotion
+callback: commerce_promotion_cron
+scheduler:
+  id: simple
+launcher:
+  id: serial
+logger:
+  id: database

+ 1 - 1
config/sync/views.view.commerce_user_orders.yml

@@ -108,7 +108,7 @@ display:
             alter_text: false
             text: ''
             make_link: true
-            path: 'user/{{ arguments.uid }}/orders/{{ order_id }}'
+            path: 'user/{{ raw_arguments.uid }}/orders/{{ order_id }}'
             absolute: false
             external: false
             replace_spaces: false

+ 7 - 0
web/modules/custom/materio_user/src/Plugin/Block/UserBlock.php

@@ -50,6 +50,11 @@ class UserBlock extends BlockBase   implements ContainerFactoryPluginInterface{
    */
   public function build() {
     $build = [];
+    
+    $build['#cache'] = [
+      'max-age' => 0,
+    ];
+    
     // dpm($this->user);
     if($this->user->id()){
       $user_url = Url::fromRoute('entity.user.canonical', ['user' => $this->user->id()]);
@@ -76,6 +81,8 @@ class UserBlock extends BlockBase   implements ContainerFactoryPluginInterface{
           )
         )
       );
+
+      
     }
     return $build;
   }

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


+ 8 - 8
web/themes/custom/materiotheme/materiotheme.theme

@@ -151,14 +151,14 @@ function materiotheme_preprocess_html(&$vars) {
   $vars['page']['#attached']['html_head'][] = [$ms, '$ms'];
 
   // <meta name="theme-color" content="#ffffff">
-  $tc = array(
-    '#tag' => 'meta',
-    '#attributes' => array(
-      'name' => 'theme-color',
-      'content' => "#69ccce"
-    ),
-  );
-  $vars['page']['#attached']['html_head'][] = [$tc, '$tc'];
+  // $tc = array(
+  //   '#tag' => 'meta',
+  //   '#attributes' => array(
+  //     'name' => 'theme-color',
+  //     'content' => "#69ccce"
+  //   ),
+  // );
+  // $vars['page']['#attached']['html_head'][] = [$tc, '$tc'];
 
   // <meta http-equiv="pragma" content="no-cache" />
   $pragma = array(

+ 1 - 1
web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue

@@ -13,7 +13,7 @@
       class="mdi mdi-settings"
       title="admin"
     ></a>
-    <a href="/user/logout"
+    <a href="#"
       @click.prevent="onLogout()"
       class="mdi mdi-logout"
       title="logout"

+ 43 - 24
web/themes/custom/materiotheme/vuejs/store/modules/user.js

@@ -41,6 +41,9 @@ export default {
       console.log('SetCsrftoken', token)
       state.csrf_token = token
     },
+    SetLogouttoken (state, token) {
+      state.logout_token = token
+    },
     setToken (state, data) {
       console.log('setToken', data)
       state.uid = data.current_user.uid
@@ -183,10 +186,10 @@ export default {
     },
     userLogin ({ dispatch, commit, state }, credentials) {
       return new Promise((resolve, reject) => {
-        dispatch('getToken', credentials)
+        dispatch('postUserLogin', credentials)
           // TODO: catch failed login
           .then((response) => {
-            console.log('userLogin dispatch getToken response', response)
+            console.log('userLogin dispatch postUserLogin response', response)
 
             if (response.status === 200) {
               commit('setToken', response.data)
@@ -211,18 +214,18 @@ export default {
               })
             } else {
               commit('setLoginMessage', response.data.message)
-              console.warn('Issue with getToken', response)
+              console.warn('Issue with postUserLogin', response)
               console.log('user loggein failed')
               Promise.reject(new Error('user loggein failed'))
             }
           })
           .catch(error => {
-            console.warn('Issue with Dispatch getToken', error)
+            console.warn('Issue with Dispatch postUserLogin', error)
             Promise.reject(error)
           })
       })
     },
-    getToken ({ dispatch, commit, state }, credentials) {
+    postUserLogin ({ dispatch, commit, state }, credentials) {
       return REST.post('/user/login?_format=json',
         credentials,
         {
@@ -237,24 +240,34 @@ export default {
           console.log('csrftoken', data)
           commit('SetCsrftoken', data)
           console.log('state.csrf_token', state.csrf_token)
-          const params = {
-            token: state.csrf_token
-          }
-          REST.get(`/user/${state.uid}?_format=json`, params)
+          // INFO this endpoiunt needs https://www.drupal.org/project/logout_token
+          REST.get('/session/logout/token')
             .then(({ data }) => {
-              console.log('user REST getUser data', data)
-              console.log('roles', data.roles)
-              // with session_limit, only here we are certain that the user is logged
-              commit('setUser', data)
-              if (data.roles) {
-                commit('setRoles', data.roles)
+              console.log('logout_token', data)
+              commit('SetLogouttoken', data)
+              const params = {
+                token: state.csrf_token
               }
-              // console.log('customer_profiles', data.customer_profiles.length)
-              // if (data.customer_profiles.length) {
-              //   dispatch('getUserProfiles', data.customer_profiles[data.customer_profiles.length - 1].target_id)
-              // }
-              dispatch('getUserFlagColls')
-              resolve()
+              REST.get(`/user/${state.uid}?_format=json`, params)
+                .then(({ data }) => {
+                  console.log('user REST getUser data', data)
+                  console.log('roles', data.roles)
+                  // with session_limit, only here we are certain that the user is logged
+                  commit('setUser', data)
+                  if (data.roles) {
+                    commit('setRoles', data.roles)
+                  }
+                  // console.log('customer_profiles', data.customer_profiles.length)
+                  // if (data.customer_profiles.length) {
+                  //   dispatch('getUserProfiles', data.customer_profiles[data.customer_profiles.length - 1].target_id)
+                  // }
+                  dispatch('getUserFlagColls')
+                  resolve()
+                })
+                .catch(error => {
+                  console.warn('Issue with getUser', error)
+                  Promise.reject(error)
+                })
             })
             .catch(error => {
               console.warn('Issue with getUser', error)
@@ -424,10 +437,16 @@ export default {
       commit('closeFlagColl')
     },
     userLogout ({ commit, state }) {
-      const credentials = qs.stringify({
-        token: state.csrf_token
+      const params = qs.stringify({
+        // format: 'json'
+        // token: state.logout_token
       })
-      REST.post('/user/logout', credentials)
+      const config = {
+        headers: {
+          'X-CSRF-Token': state.csrf_token
+        }
+      }
+      REST.post('/user/logout?format=json&token=' + state.logout_token, params, config)
         .then(resp => {
           console.log('userLogout resp', resp)
           commit('setLoggedOut')

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff