From 226c67ee53d2d982b33ad214458b82ec892ddd2b Mon Sep 17 00:00:00 2001 From: Giulia Ghisini <51911425+giuliaghisini@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:07:38 +0100 Subject: [PATCH] fix: listing options order (#449) --- src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js | 2 +- src/config/Blocks/ListingOptions/cardWithImageTemplate.js | 2 +- .../Blocks/ListingOptions/cardWithSlideUpTextTemplate.js | 2 +- .../Blocks/ListingOptions/completeBlockLinksTemplate.js | 2 +- src/config/Blocks/ListingOptions/defaultOptions.js | 2 +- src/config/Blocks/ListingOptions/inEvidenceTemplate.js | 2 +- src/config/Blocks/ListingOptions/mapTemplate.js | 2 +- src/config/Blocks/ListingOptions/photogalleryTemplate.js | 2 +- src/config/Blocks/ListingOptions/ribbonCardTemplate.js | 2 +- src/config/Blocks/ListingOptions/simpleCardTemplate.js | 2 +- src/config/Blocks/ListingOptions/simpleListTemplate.js | 2 +- src/config/Blocks/ListingOptions/sliderTemplate.js | 2 +- src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js | 2 +- src/config/Blocks/ListingOptions/utils.js | 6 +++--- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js b/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js index 897783e55..c77e39488 100644 --- a/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js +++ b/src/config/Blocks/ListingOptions/bandiInEvidenceTemplate.js @@ -17,7 +17,7 @@ export const addBandiInEvidenceTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/cardWithImageTemplate.js b/src/config/Blocks/ListingOptions/cardWithImageTemplate.js index b94084087..344c4c35e 100644 --- a/src/config/Blocks/ListingOptions/cardWithImageTemplate.js +++ b/src/config/Blocks/ListingOptions/cardWithImageTemplate.js @@ -30,7 +30,7 @@ export const addCardWithImageTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js b/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js index e95e01272..a0848969b 100644 --- a/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js +++ b/src/config/Blocks/ListingOptions/cardWithSlideUpTextTemplate.js @@ -9,7 +9,7 @@ export const addCardWithSlideUpTextTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/completeBlockLinksTemplate.js b/src/config/Blocks/ListingOptions/completeBlockLinksTemplate.js index c2de3b316..8e41833d5 100644 --- a/src/config/Blocks/ListingOptions/completeBlockLinksTemplate.js +++ b/src/config/Blocks/ListingOptions/completeBlockLinksTemplate.js @@ -9,7 +9,7 @@ export const addCompleteBlockLinksTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/defaultOptions.js b/src/config/Blocks/ListingOptions/defaultOptions.js index 089d81923..90b0ea392 100644 --- a/src/config/Blocks/ListingOptions/defaultOptions.js +++ b/src/config/Blocks/ListingOptions/defaultOptions.js @@ -31,7 +31,7 @@ const messages = defineMessages({ /** DEFAULT **/ -const addDefaultOptions = (schema, formData = {}, intl, position = 0) => { +const addDefaultOptions = (schema, formData = {}, intl, position = 1) => { let listing_items_colors = config.blocks.blocksConfig.listing?.listing_items_colors || []; let listing_bg_colors = diff --git a/src/config/Blocks/ListingOptions/inEvidenceTemplate.js b/src/config/Blocks/ListingOptions/inEvidenceTemplate.js index e4137642d..6dce7b351 100644 --- a/src/config/Blocks/ListingOptions/inEvidenceTemplate.js +++ b/src/config/Blocks/ListingOptions/inEvidenceTemplate.js @@ -18,7 +18,7 @@ export const addInEvidenceTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/mapTemplate.js b/src/config/Blocks/ListingOptions/mapTemplate.js index a57e0558f..edb38df4f 100644 --- a/src/config/Blocks/ListingOptions/mapTemplate.js +++ b/src/config/Blocks/ListingOptions/mapTemplate.js @@ -25,7 +25,7 @@ const messages = defineMessages({ }, }); -export const addMapTemplateOptions = (schema, formData, intl, position = 0) => { +export const addMapTemplateOptions = (schema, formData, intl, position = 1) => { let pos = position; addSchemaField( diff --git a/src/config/Blocks/ListingOptions/photogalleryTemplate.js b/src/config/Blocks/ListingOptions/photogalleryTemplate.js index c6bde99f3..fe20e5624 100644 --- a/src/config/Blocks/ListingOptions/photogalleryTemplate.js +++ b/src/config/Blocks/ListingOptions/photogalleryTemplate.js @@ -12,7 +12,7 @@ export const addPhotogalleryTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/ribbonCardTemplate.js b/src/config/Blocks/ListingOptions/ribbonCardTemplate.js index 72fc6f644..349946a8b 100644 --- a/src/config/Blocks/ListingOptions/ribbonCardTemplate.js +++ b/src/config/Blocks/ListingOptions/ribbonCardTemplate.js @@ -18,7 +18,7 @@ export const addRibbonCardTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/simpleCardTemplate.js b/src/config/Blocks/ListingOptions/simpleCardTemplate.js index e61df6391..ae82f9320 100644 --- a/src/config/Blocks/ListingOptions/simpleCardTemplate.js +++ b/src/config/Blocks/ListingOptions/simpleCardTemplate.js @@ -36,7 +36,7 @@ export const addSimpleCardTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; pos = addLighthouseField(schema, intl, pos); diff --git a/src/config/Blocks/ListingOptions/simpleListTemplate.js b/src/config/Blocks/ListingOptions/simpleListTemplate.js index 518262b85..590dfa7ee 100644 --- a/src/config/Blocks/ListingOptions/simpleListTemplate.js +++ b/src/config/Blocks/ListingOptions/simpleListTemplate.js @@ -13,7 +13,7 @@ export const addSimpleListTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/sliderTemplate.js b/src/config/Blocks/ListingOptions/sliderTemplate.js index 7c82dc562..f5a09b5ad 100644 --- a/src/config/Blocks/ListingOptions/sliderTemplate.js +++ b/src/config/Blocks/ListingOptions/sliderTemplate.js @@ -37,7 +37,7 @@ export const addSliderTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js b/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js index 227596ebd..b807a8797 100644 --- a/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js +++ b/src/config/Blocks/ListingOptions/smallBlockLinksTemplate.js @@ -14,7 +14,7 @@ export const addSmallBlockLinksTemplateOptions = ( schema, formData, intl, - position = 0, + position = 1, ) => { let pos = position; diff --git a/src/config/Blocks/ListingOptions/utils.js b/src/config/Blocks/ListingOptions/utils.js index 322ae0b90..7dd0c04d1 100644 --- a/src/config/Blocks/ListingOptions/utils.js +++ b/src/config/Blocks/ListingOptions/utils.js @@ -67,7 +67,7 @@ export const addSchemaField = ( title, description, properties = {}, - position = 0, + position = 1, fieldset = 'default', ) => { let fieldsetIndex = schema.fieldsets.findIndex((x) => x.id === fieldset); @@ -86,7 +86,7 @@ export const templatesOptions = ( intl, fields, fieldsConfig, - position = 0, + position = 1, ) => { let pos = position; @@ -151,7 +151,7 @@ export const templatesOptions = ( return pos; }; -export const addLighthouseField = (schema, intl, position = 0) => { +export const addLighthouseField = (schema, intl, position = 1) => { let pos = position; const fieldset = schema.id === 'search' ? 'listingTemplateOptions' : undefined;