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