From a131cb559dbbc8f012f650bd6cbdd0130042a6d4 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Wed, 21 Aug 2024 13:34:40 +0200 Subject: [PATCH 01/16] feat: add max rule --- src/components/common/VnInput.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue index 75d4b8a28..e79a235d5 100644 --- a/src/components/common/VnInput.vue +++ b/src/components/common/VnInput.vue @@ -67,9 +67,13 @@ const mixinRules = [ requiredFieldRule, ...($attrs.rules ?? []), (val) => { - const { min } = vnInputRef.value.$attrs; + const { min, max } = vnInputRef.value.$attrs; if (!min) return null; if (min >= 0) if (Math.floor(val) < min) return t('inputMin', { value: min }); + if (!max) return null; + if (max > 0) { + if (Math.floor(val) > max) return t('inputMax', { value: max }); + } }, ]; @@ -116,6 +120,8 @@ const mixinRules = [ en: inputMin: Must be more than {value} + inputMax: Must be less than {value} es: inputMin: Debe ser mayor a {value} + inputMax: Debe ser menor a {value} From 2b012d2de4ce72f253b9d8d7e2a99f4ceb03f34f Mon Sep 17 00:00:00 2001 From: jorgep Date: Wed, 11 Sep 2024 10:04:40 +0200 Subject: [PATCH 02/16] fix: refs #7353 use same datakey --- src/pages/Monitor/Ticket/MonitorTicketSearchbar.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Monitor/Ticket/MonitorTicketSearchbar.vue b/src/pages/Monitor/Ticket/MonitorTicketSearchbar.vue index 4950ab381..f1c347588 100644 --- a/src/pages/Monitor/Ticket/MonitorTicketSearchbar.vue +++ b/src/pages/Monitor/Ticket/MonitorTicketSearchbar.vue @@ -3,7 +3,7 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue'; diff --git a/src/pages/Entry/locale/en.yml b/src/pages/Entry/locale/en.yml index f0965b097..a9faa814b 100644 --- a/src/pages/Entry/locale/en.yml +++ b/src/pages/Entry/locale/en.yml @@ -11,4 +11,4 @@ shipped: Shipped fromShipped: Shipped(from) toShipped: Shipped(to) printLabels: Print stickers -printLabel: Print sticker +viewLabel: View sticker diff --git a/src/pages/Entry/locale/es.yml b/src/pages/Entry/locale/es.yml index aba04571e..eb1e3f88a 100644 --- a/src/pages/Entry/locale/es.yml +++ b/src/pages/Entry/locale/es.yml @@ -15,4 +15,4 @@ shipped: F. salida fromShipped: F. salida(desde) toShipped: F. salida(hasta) printLabels: Imprimir etiquetas -printLabel: Imprimir etiqueta +viewLabel: Ver etiqueta From 6e6af0af8085fb1e82da7f3c3c17620ba2ecf0e7 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 13 Sep 2024 15:16:40 +0200 Subject: [PATCH 11/16] perf: improve style --- src/pages/Item/ItemFixedPrice.vue | 110 ++++++++++++------------------ 1 file changed, 44 insertions(+), 66 deletions(-) diff --git a/src/pages/Item/ItemFixedPrice.vue b/src/pages/Item/ItemFixedPrice.vue index d91b5189e..bd8c4b78c 100644 --- a/src/pages/Item/ItemFixedPrice.vue +++ b/src/pages/Item/ItemFixedPrice.vue @@ -76,16 +76,8 @@ const columns = computed(() => [ name: 'rate2', ...defaultColumnAttrs, cardVisible: true, - columnField: { - class: 'expand', - component: 'input', - type: 'number', - }, - columnFilter: { - class: 'expand', - component: 'input', - type: 'number', - }, + component: 'input', + type: 'number', }, { label: t('item.fixedPrice.packingPrice'), @@ -93,35 +85,18 @@ const columns = computed(() => [ name: 'rate3', ...defaultColumnAttrs, cardVisible: true, - columnField: { - class: 'expand', - component: 'input', - type: 'number', - }, - columnFilter: { - class: 'expand', - component: 'input', - type: 'number', - }, + component: 'input', + type: 'number', }, { label: t('item.fixedPrice.minPrice'), field: 'minPrice', - columnClass: 'shrink', name: 'minPrice', ...defaultColumnAttrs, cardVisible: true, - columnField: { - class: 'expand', - component: 'input', - type: 'number', - }, - columnFilter: { - class: 'expand', - component: 'input', - type: 'number', - }, + component: 'input', + type: 'number', }, { label: t('item.fixedPrice.started'), @@ -162,16 +137,9 @@ const columns = computed(() => [ name: 'warehouseFk', ...defaultColumnAttrs, columnClass: 'shrink', - columnFilter: { - component: 'select', - }, - columnField: { - component: 'select', - class: 'expand', - }, - attrs: { - options: warehousesOptions, - }, + component: 'select', + + options: warehousesOptions, }, { align: 'right', @@ -518,29 +486,35 @@ function handleOnDataSave({ CrudModelRef }) { {{ row.subName }} - +