0
0
Fork 0

fix: refs #7187 fix responsive

This commit is contained in:
Pablo Natek 2024-05-21 19:12:40 +02:00
parent 05587ece9e
commit d2d80645d0
2 changed files with 49 additions and 59 deletions

View File

@ -71,52 +71,36 @@ 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"
> >
<QItem>
<QItemSection side-left>
<VnRow> <VnRow>
<QField <VnInput
:label="t('worker.pda.currentPDA')" :label="t('worker.pda.currentPDA')"
:model-value="row?.deviceProductionFk" :model-value="row?.deviceProductionFk"
disable disable
> />
<template #control> <VnInput
<div tabindex="0" style="padding: none"> :label="t('Model')"
<span>Id: </span> :model-value="row?.deviceProduction?.modelFk"
<span> disable
{{ row?.deviceProductionFk }}&nbsp; />
</span> <VnInput
<span>{{ t('Model') }}: </span> :label="t('Serial number')"
<span> :model-value="row?.deviceProduction?.serialNumber"
{{ row?.deviceProduction?.modelFk }}&nbsp; disable
</span> />
<span>{{ t('SIM serial number') }}: </span> <VnInput
<span>
{{
row?.deviceProduction?.serialNumber
}}&nbsp;
</span>
</div>
</template>
</QField>
<QField
:label="t('Current SIM')" :label="t('Current SIM')"
:model-value="row?.simSerialNumber" :model-value="row?.simSerialNumber"
disable disable
> />
<template #control>
<div tabindex="0">{{ row?.simSerialNumber }}</div> <div class="icon">
</template>
</QField>
</VnRow>
</QItemSection>
<QItemSection side>
<QIcon <QIcon
name="delete" name="delete"
size="sm" size="sm"
class="cursor-pointer"
color="primary" color="primary"
class="cursor-pointer"
@click=" @click="
openConfirmationModal( openConfirmationModal(
t(`Remove PDA`), t(`Remove PDA`),
@ -129,8 +113,8 @@ function reloadData() {
{{ t('worker.pda.removePDA') }} {{ t('worker.pda.removePDA') }}
</QTooltip> </QTooltip>
</QIcon> </QIcon>
</QItemSection> </div>
</QItem> </VnRow>
</QCard> </QCard>
</template> </template>
</VnPaginate> </VnPaginate>
@ -187,26 +171,23 @@ function reloadData() {
</QPage> </QPage>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.centerCard { .icon {
padding: 5%; display: flex;
width: 100%; justify-content: center;
max-width: 70%; align-items: center;
margin: 0 auto; margin-top: 2%;
} max-width: 4%;
.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

@ -14,8 +14,17 @@ describe('WorkerPda', () => {
cy.get('.q-notification__message').should('have.text', 'Data created'); cy.get('.q-notification__message').should('have.text', 'Data created');
}); });
it('assign more than 1 pda', () => {
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
cy.get(deviceProductionField).type('{downArrow}{enter}');
cy.get('.vn-row > #simSerialNumber').type('123{enter}');
cy.get(
':nth-child(1) > .q-notification__wrapper > .q-notification__content > .q-notification__message'
).should('have.text', 'You can only have one PDA');
});
it('delete pda', () => { it('delete pda', () => {
cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click(); cy.get('.icon > .q-icon').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();