forked from verdnatura/salix-front
fix: refs #7187 fix responsive
This commit is contained in:
parent
05587ece9e
commit
d2d80645d0
|
@ -71,52 +71,36 @@ function reloadData() {
|
|||
bordered
|
||||
:key="row.id"
|
||||
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>
|
||||
<QField
|
||||
:label="t('worker.pda.currentPDA')"
|
||||
:model-value="row?.deviceProductionFk"
|
||||
disable
|
||||
>
|
||||
<template #control>
|
||||
<div tabindex="0" style="padding: none">
|
||||
<span>Id: </span>
|
||||
<span>
|
||||
{{ row?.deviceProductionFk }}
|
||||
</span>
|
||||
<span>{{ t('Model') }}: </span>
|
||||
<span>
|
||||
{{ row?.deviceProduction?.modelFk }}
|
||||
</span>
|
||||
<span>{{ t('SIM serial number') }}: </span>
|
||||
<span>
|
||||
{{
|
||||
row?.deviceProduction?.serialNumber
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
</QField>
|
||||
<QField
|
||||
:label="t('Current SIM')"
|
||||
:model-value="row?.simSerialNumber"
|
||||
disable
|
||||
>
|
||||
<template #control>
|
||||
<div tabindex="0">{{ row?.simSerialNumber }}</div>
|
||||
</template>
|
||||
</QField>
|
||||
</VnRow>
|
||||
</QItemSection>
|
||||
<QItemSection side>
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('worker.pda.currentPDA')"
|
||||
:model-value="row?.deviceProductionFk"
|
||||
disable
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('Model')"
|
||||
:model-value="row?.deviceProduction?.modelFk"
|
||||
disable
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('Serial number')"
|
||||
:model-value="row?.deviceProduction?.serialNumber"
|
||||
disable
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('Current SIM')"
|
||||
:model-value="row?.simSerialNumber"
|
||||
disable
|
||||
/>
|
||||
|
||||
<div class="icon">
|
||||
<QIcon
|
||||
name="delete"
|
||||
size="sm"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
class="cursor-pointer"
|
||||
@click="
|
||||
openConfirmationModal(
|
||||
t(`Remove PDA`),
|
||||
|
@ -129,8 +113,8 @@ function reloadData() {
|
|||
{{ t('worker.pda.removePDA') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</div>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
|
@ -187,26 +171,23 @@ function reloadData() {
|
|||
</QPage>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.centerCard {
|
||||
padding: 5%;
|
||||
width: 100%;
|
||||
max-width: 70%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.label {
|
||||
color: red;
|
||||
}
|
||||
.q-field {
|
||||
height: 65px;
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 2%;
|
||||
max-width: 4%;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
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
|
||||
Do you want to remove this PDA?: ¿Desea eliminar este PDA?
|
||||
PDA deallocated: PDA desasignada
|
||||
SIM serial number: Número de serie de la SIM
|
||||
Model: Modelo
|
||||
You can only have one PDA: Solo puedes tener un PDA si no eres autonomo
|
||||
This PDA is already assigned to another user: Este PDA ya está asignado a otro usuario
|
||||
Add new device: Añadir nuevo dispositivo
|
||||
</i18n>
|
||||
|
|
|
@ -14,8 +14,17 @@ describe('WorkerPda', () => {
|
|||
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', () => {
|
||||
cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click();
|
||||
cy.get('.icon > .q-icon').click();
|
||||
cy.get(
|
||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||
).click();
|
||||
|
|
Loading…
Reference in New Issue