feat: refs #6123 update VnCheckbox and VnLv components to support dynamic size
This commit is contained in:
parent
85e8bca89d
commit
e946dc565d
|
@ -7,6 +7,10 @@ const $props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
infoSize: {
|
||||||
|
type: String,
|
||||||
|
default: 'sm',
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const checkboxModel = computed({
|
const checkboxModel = computed({
|
||||||
|
@ -34,10 +38,10 @@ const checkboxModel = computed({
|
||||||
/>
|
/>
|
||||||
<QIcon
|
<QIcon
|
||||||
v-if="info"
|
v-if="info"
|
||||||
v-bind="$attrs.infoAttrs"
|
v-bind="$attrs"
|
||||||
class="cursor-info q-ml-sm"
|
class="cursor-info q-ml-sm"
|
||||||
name="info"
|
name="info"
|
||||||
size="sm"
|
:size="infoSize"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ info }}
|
{{ info }}
|
||||||
|
|
|
@ -38,6 +38,7 @@ const val = computed(() => $props.value);
|
||||||
:info="info"
|
:info="info"
|
||||||
disable
|
disable
|
||||||
dense
|
dense
|
||||||
|
infoSize="xs"
|
||||||
size="sm"
|
size="sm"
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
|
@ -68,7 +68,6 @@ async function onSubmit() {
|
||||||
:label="t('login.password')"
|
:label="t('login.password')"
|
||||||
:toggle-visibility="true"
|
:toggle-visibility="true"
|
||||||
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
:rules="[(val) => (val && val.length > 0) || t('login.fieldRequired')]"
|
||||||
class="red"
|
|
||||||
/>
|
/>
|
||||||
<QToggle v-model="keepLogin" :label="t('login.keepLogin')" />
|
<QToggle v-model="keepLogin" :label="t('login.keepLogin')" />
|
||||||
<div class="column flex-center q-mt-lg">
|
<div class="column flex-center q-mt-lg">
|
||||||
|
|
|
@ -110,7 +110,6 @@ function confirm() {
|
||||||
</QBtn>
|
</QBtn>
|
||||||
<QBtn
|
<QBtn
|
||||||
class="text-center q-ml-xs"
|
class="text-center q-ml-xs"
|
||||||
color="red"
|
|
||||||
dense
|
dense
|
||||||
size="sm"
|
size="sm"
|
||||||
@click="handleEvent(name, 'flush')"
|
@click="handleEvent(name, 'flush')"
|
||||||
|
|
|
@ -44,44 +44,55 @@ const columns = computed(() => [
|
||||||
create: true,
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
|
||||||
name: 'zoneFk',
|
name: 'zoneFk',
|
||||||
label: t('zone'),
|
label: t('zone.params.zoneFk'),
|
||||||
|
component: 'select',
|
||||||
|
attrs: {
|
||||||
|
url: 'Zones',
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
optionValue: 'id',
|
||||||
|
optionLabel: 'name',
|
||||||
|
sortBy: 'name ASC',
|
||||||
|
},
|
||||||
isId: true,
|
isId: true,
|
||||||
format: ({ name }, dashIfEmpty) => dashIfEmpty(name),
|
format: ({ name }, dashIfEmpty) => dashIfEmpty(name),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'etd',
|
name: 'etd',
|
||||||
label: t('etd'),
|
label: t('zone.params.etd'),
|
||||||
component: 'time',
|
component: 'time',
|
||||||
|
columnFilter: false,
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'volume',
|
name: 'volume',
|
||||||
label: t('volume'),
|
label: t('zone.params.volume'),
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
columnFilter: false,
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'packingVolume',
|
name: 'packingVolume',
|
||||||
label: t('packingVolume'),
|
label: t('packingVolume'),
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
columnFilter: false,
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'packingProgress',
|
name: 'packingProgress',
|
||||||
label: t('packingProgress'),
|
label: t('packingProgress'),
|
||||||
component: 'number',
|
component: 'number',
|
||||||
|
columnFilter: false,
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'isLate',
|
name: 'isLate',
|
||||||
label: t('isLate'),
|
label: t('zone.params.isLate'),
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'isFull',
|
name: 'isFull',
|
||||||
label: t('isFull'),
|
label: t('zone.params.isFull'),
|
||||||
component: 'checkbox',
|
component: 'checkbox',
|
||||||
isEditable: false,
|
isEditable: false,
|
||||||
},
|
},
|
||||||
|
@ -123,11 +134,11 @@ function setFooter(data) {
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInputNumber
|
<VnInputNumber
|
||||||
v-model="data.minTicketsToCloseZone"
|
v-model="data.minTicketsToCloseZone"
|
||||||
:label="t('minTicketsToCloseZone')"
|
:label="t('minTicketsInfo')"
|
||||||
/>
|
/>
|
||||||
<VnCheckbox
|
<VnCheckbox
|
||||||
v-model="data.isZoneClosedByExpeditionActivated"
|
v-model="data.isZoneClosedByExpeditionActivated"
|
||||||
:label="t('isZoneClosedByExpeditionActivated')"
|
:label="t('isZoneClosedInfo')"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
@ -160,13 +171,13 @@ function setFooter(data) {
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('minTicketsToCloseZone')"
|
:label="t('minTicketsToCloseZone')"
|
||||||
:value="productionConfig?.minTicketsToCloseZone"
|
:value="productionConfig?.minTicketsToCloseZone"
|
||||||
info="test"
|
:info="t('minTicketsInfo')"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('isZoneClosedByExpeditionActivated')"
|
:label="t('isZoneClosedByExpeditionActivated')"
|
||||||
:value="productionConfig?.isZoneClosedByExpeditionActivated"
|
:value="productionConfig?.isZoneClosedByExpeditionActivated"
|
||||||
style="color: red !important"
|
style="color: var(--vn-label-color)"
|
||||||
info="test"
|
:info="t('isZoneClosedInfo')"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
style="max-width: 5%"
|
style="max-width: 5%"
|
||||||
|
@ -185,26 +196,20 @@ function setFooter(data) {
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
en:
|
en:
|
||||||
minTicketsToCloseZone: Min tickets to close
|
minTicketsToCloseZone: Min tickets
|
||||||
isZoneClosedByExpeditionActivated: Closed by expedition
|
minTicketsInfo: Min tickets to close zone
|
||||||
|
isZoneClosedByExpeditionActivated: By expedition
|
||||||
|
isZoneClosedInfo: Zone closed by expedition
|
||||||
popUpTitle: Edit config
|
popUpTitle: Edit config
|
||||||
isLate: Is late
|
|
||||||
isFull: Is full
|
|
||||||
zone: Zone
|
|
||||||
warehouse: Warehouse
|
warehouse: Warehouse
|
||||||
etd: Etd
|
|
||||||
volume: Volume
|
|
||||||
packingVolume: Pac. volume
|
packingVolume: Pac. volume
|
||||||
packingProgress: Progress
|
packingProgress: Progress
|
||||||
es:
|
es:
|
||||||
minTicketsToCloseZone: Tickets minimos
|
minTicketsToCloseZone: Tickets minimos
|
||||||
|
minTicketsInfo: Tickets minimos para cerrar zona
|
||||||
isZoneClosedByExpeditionActivated: Por expedición
|
isZoneClosedByExpeditionActivated: Por expedición
|
||||||
|
isZoneClosedInfo: Zona cerrada por expedición
|
||||||
popUpTitle: Editar configuración
|
popUpTitle: Editar configuración
|
||||||
isLate: Tarde
|
|
||||||
isFull: Completo
|
|
||||||
zone: Zona
|
|
||||||
warehouse: Almacen
|
|
||||||
etd: Etd
|
|
||||||
volume: Volumen
|
volume: Volumen
|
||||||
packingVolume: Vol. Encajado
|
packingVolume: Vol. Encajado
|
||||||
packingProgress: Progreso
|
packingProgress: Progreso
|
||||||
|
|
|
@ -18,6 +18,15 @@ zone:
|
||||||
searchInfo: Search zone by id or name
|
searchInfo: Search zone by id or name
|
||||||
searchLocations: Search locations
|
searchLocations: Search locations
|
||||||
searchLocationsInfo: Search locations by post code
|
searchLocationsInfo: Search locations by post code
|
||||||
|
params:
|
||||||
|
dated: Date
|
||||||
|
zoneFk: Zone
|
||||||
|
etd: Etd
|
||||||
|
volume: Volume
|
||||||
|
packingVolume: Packing volume
|
||||||
|
packingProgress: Packing progress
|
||||||
|
isLate: Late
|
||||||
|
isFull: Full
|
||||||
list:
|
list:
|
||||||
clone: Clone
|
clone: Clone
|
||||||
id: Id
|
id: Id
|
||||||
|
|
|
@ -19,6 +19,15 @@ zone:
|
||||||
searchInfo: Buscar zona por Id o nombre
|
searchInfo: Buscar zona por Id o nombre
|
||||||
searchLocations: Buscar localización
|
searchLocations: Buscar localización
|
||||||
searchLocationsInfo: Buscar localización por código postal
|
searchLocationsInfo: Buscar localización por código postal
|
||||||
|
params:
|
||||||
|
dated: Fecha
|
||||||
|
zoneFk: Zona
|
||||||
|
etd: Etd
|
||||||
|
volume: Volumen
|
||||||
|
packingVolume: Volumen encajado
|
||||||
|
packingProgress: Progreso de encajado
|
||||||
|
isLate: Tarde
|
||||||
|
isFull: Completo
|
||||||
list:
|
list:
|
||||||
clone: Clonar
|
clone: Clonar
|
||||||
id: Id
|
id: Id
|
||||||
|
|
Loading…
Reference in New Issue