feat(wagonCounter): refs #6545 add +30 button and correct images
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
parent
3b018a58e6
commit
e963eddfe6
|
@ -11,19 +11,20 @@ const session = useSession();
|
|||
const token = session.getToken();
|
||||
|
||||
const counters = ref({
|
||||
alquilerBandeja: { count: 0, id: 1, title: 'Alquiler de CC Bandeja' },
|
||||
bandejaRota: { count: 0, id: 2, title: 'CC Bandeja Rota' },
|
||||
carryOficial: { count: 0, id: 3, title: ' Alquiler de CC Carry OFICIAL' },
|
||||
candadoRojo: { count: 0, id: 4, title: 'CC Candado rojo' },
|
||||
sacadores: { count: 0, id: 5, title: 'CC Sacadores' },
|
||||
sinChapa: { count: 0, id: 6, title: 'CC Sin Chapa' },
|
||||
carroRoto: { count: 0, id: 7, title: 'Carro Roto' },
|
||||
alquilerBandeja: { count: 0, id: 96001, title: 'CC Bandeja' },
|
||||
bandejaRota: { count: 0, id: 88381, title: 'CC Bandeja Rota' },
|
||||
carryOficial: { count: 0, id: 96000, title: 'CC Carry OFICIAL TAG5' },
|
||||
candadoRojo: { count: 0, id: 142252, title: 'CC Candado rojo' },
|
||||
sacadores: { count: 0, id: 142260, title: 'CC Sacadores' },
|
||||
sinChapa: { count: 0, id: 142258, title: 'CC Sin Chapa' },
|
||||
carroRoto: { count: 0, id: 142251, title: 'Carro Roto' },
|
||||
});
|
||||
|
||||
const actions = {
|
||||
add: (value) => value + 1,
|
||||
substract: (value) => (value ? value - 1 : 0),
|
||||
subtract: (value) => (value ? value - 1 : 0),
|
||||
flush: () => 0,
|
||||
addSpecific: (value) => value + 30,
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
@ -57,7 +58,7 @@ function confirm() {
|
|||
component: VnConfirm,
|
||||
componentProps: {
|
||||
title: t('Are you sure?'),
|
||||
message: t('Se pondrá el contador a cero'),
|
||||
message: t('The counter will be reset to zero'),
|
||||
},
|
||||
})
|
||||
.onOk(() => resolve(true))
|
||||
|
@ -86,9 +87,20 @@ function confirm() {
|
|||
color="warning"
|
||||
dense
|
||||
size="sm"
|
||||
@click="handleEvent(name, 'substract')"
|
||||
@click="handleEvent(name, 'addSpecific')"
|
||||
>
|
||||
{{ t('Substract 1') }}
|
||||
{{ t('Add 30') }}
|
||||
</QBtn>
|
||||
</QItemLabel>
|
||||
<QItemLabel>
|
||||
<QBtn
|
||||
class="text-center q-mr-xs"
|
||||
color="warning"
|
||||
dense
|
||||
size="sm"
|
||||
@click="handleEvent(name, 'subtract')"
|
||||
>
|
||||
{{ t('Subtract 1') }}
|
||||
</QBtn>
|
||||
<QBtn
|
||||
class="text-center q-ml-xs"
|
||||
|
@ -121,8 +133,10 @@ function confirm() {
|
|||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Substract 1: Quitar 1
|
||||
Subtract 1: Quitar 1
|
||||
Add 30: Añadir 30
|
||||
Flush: Vaciar
|
||||
Are you sure?: ¿Estás seguro?
|
||||
It will set to 0: Se pondrá a 0
|
||||
The counter will be reset to zero: Se pondrá el contador a cero
|
||||
</i18n>
|
||||
|
|
Loading…
Reference in New Issue