Skip to content

Commit b058b0a

Browse files
committed
chore(ecom-config): add warehouses to admin settings fields
1 parent 1294fd6 commit b058b0a

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

functions/ecom.config.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,52 @@ const app = {
246246
}
247247
},
248248
hide: false
249+
},
250+
warehouses: {
251+
schema: {
252+
title: 'Armazéns (multi CD)',
253+
description: 'Origens e destinos para cada centro de distribuição',
254+
type: 'array',
255+
maxItems: 30,
256+
items: {
257+
title: 'Centro de distribuição',
258+
type: 'object',
259+
required: ['zip'],
260+
additionalProperties: false,
261+
properties: {
262+
zip: {
263+
type: 'string',
264+
maxLength: 9,
265+
pattern: '^[0-9]{5}-?[0-9]{3}$',
266+
title: 'CEP de origem',
267+
description: 'Código postal do remetente para cálculo do frete'
268+
},
269+
zip_range: {
270+
title: 'Faixa de CEP atendida',
271+
type: 'object',
272+
required: [
273+
'min',
274+
'max'
275+
],
276+
properties: {
277+
min: {
278+
type: 'integer',
279+
minimum: 10000,
280+
maximum: 999999999,
281+
title: 'CEP inicial'
282+
},
283+
max: {
284+
type: 'integer',
285+
minimum: 10000,
286+
maximum: 999999999,
287+
title: 'CEP final'
288+
}
289+
}
290+
}
291+
}
292+
}
293+
},
294+
hide: true
249295
}
250296
}
251297
}

0 commit comments

Comments
 (0)