Skip to content

Commit

Permalink
fix: listing options order (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini authored Dec 27, 2023
1 parent 99fe070 commit 226c67e
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const addBandiInEvidenceTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/cardWithImageTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const addCardWithImageTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const addCardWithSlideUpTextTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const addCompleteBlockLinksTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/defaultOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/inEvidenceTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const addInEvidenceTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/mapTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/photogalleryTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const addPhotogalleryTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/ribbonCardTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const addRibbonCardTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/simpleCardTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const addSimpleCardTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;
pos = addLighthouseField(schema, intl, pos);
Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/simpleListTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const addSimpleListTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
2 changes: 1 addition & 1 deletion src/config/Blocks/ListingOptions/sliderTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const addSliderTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const addSmallBlockLinksTemplateOptions = (
schema,
formData,
intl,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down
6 changes: 3 additions & 3 deletions src/config/Blocks/ListingOptions/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -86,7 +86,7 @@ export const templatesOptions = (
intl,
fields,
fieldsConfig,
position = 0,
position = 1,
) => {
let pos = position;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 226c67e

Please sign in to comment.