fix: refs #7187 fix responsive #393

Merged
pablone merged 3 commits from 7187-fix-workerPda into test 2024-05-23 12:43:34 +00:00
2 changed files with 50 additions and 75 deletions

View File

@ -71,66 +71,47 @@ function reloadData() {
bordered bordered
:key="row.id" :key="row.id"
v-for="row of rows" v-for="row of rows"
class="card q-pt-xs q-mb-sm" class="card q-px-md q-mb-sm container"
> >
<QItem> <VnRow>
<QItemSection side-left> <VnInput
<VnRow> :label="t('worker.pda.currentPDA')"
<QField :model-value="row?.deviceProductionFk"
:label="t('worker.pda.currentPDA')" disable
:model-value="row?.deviceProductionFk" />
disable <VnInput
> :label="t('Model')"
<template #control> :model-value="row?.deviceProduction?.modelFk"
<div tabindex="0" style="padding: none"> disable
<span>Id: </span> />
<span> <VnInput
{{ row?.deviceProductionFk }}&nbsp; :label="t('Serial number')"
</span> :model-value="row?.deviceProduction?.serialNumber"
<span>{{ t('Model') }}: </span> disable
<span> />
{{ row?.deviceProduction?.modelFk }}&nbsp; <VnInput
</span> :label="t('Current SIM')"
<span>{{ t('SIM serial number') }}: </span> :model-value="row?.simSerialNumber"
<span> disable
{{ />
row?.deviceProduction?.serialNumber <QBtn
}}&nbsp; flat
</span> icon="delete"
</div> color="primary"
</template> class="btn-delete"
</QField> @click="
<QField openConfirmationModal(
:label="t('Current SIM')" t(`Remove PDA`),
:model-value="row?.simSerialNumber" t('Do you want to remove this PDA?'),
disable () => deallocatePDA(row.deviceProductionFk)
> )
<template #control> "
<div tabindex="0">{{ row?.simSerialNumber }}</div> >
</template> <QTooltip>
</QField> {{ t('worker.pda.removePDA') }}
</VnRow> </QTooltip>
</QItemSection> </QBtn>
<QItemSection side> </VnRow>
<QIcon
name="delete"
size="sm"
class="cursor-pointer"
color="primary"
@click="
openConfirmationModal(
t(`Remove PDA`),
t('Do you want to remove this PDA?'),
() => deallocatePDA(row.deviceProductionFk)
)
"
>
<QTooltip>
{{ t('worker.pda.removePDA') }}
</QTooltip>
</QIcon>
</QItemSection>
</QItem>
</QCard> </QCard>
</template> </template>
</VnPaginate> </VnPaginate>
@ -187,26 +168,20 @@ function reloadData() {
</QPage> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.centerCard { .btn-delete {
padding: 5%; max-width: 4%;
width: 100%; margin-top: 30px;
max-width: 70%;
margin: 0 auto;
}
.label {
color: red;
}
.q-field {
height: 65px;
} }
</style> </style>
<i18n> <i18n>
es: es:
Model: Modelo
Serial number: Número de serie
Current SIM: SIM actual
Add new device: Añadir nuevo dispositivo
PDA deallocated: PDA desasignada
Remove PDA: Eliminar PDA Remove PDA: Eliminar PDA
Do you want to remove this PDA?: ¿Desea eliminar este PDA? Do you want to remove this PDA?: ¿Desea eliminar este PDA?
PDA deallocated: PDA desasignada You can only have one PDA: Solo puedes tener un PDA si no eres autonomo
SIM serial number: Número de serie de la SIM
Model: Modelo
This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario
Add new device: Añadir nuevo dispositivo
</i18n> </i18n>

View File

@ -15,7 +15,7 @@ describe('WorkerPda', () => {
}); });
it('delete pda', () => { it('delete pda', () => {
cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click(); cy.get('.btn-delete').click();
cy.get( cy.get(
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block' '.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
).click(); ).click();