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