This commit is contained in:
parent
d2d80645d0
commit
410012df55
|
@ -71,7 +71,7 @@ function reloadData() {
|
||||||
bordered
|
bordered
|
||||||
:key="row.id"
|
:key="row.id"
|
||||||
v-for="row of rows"
|
v-for="row of rows"
|
||||||
class="card q-px-md q-mb-sm"
|
class="card q-px-md q-mb-sm container"
|
||||||
>
|
>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
|
@ -94,26 +94,23 @@ function reloadData() {
|
||||||
:model-value="row?.simSerialNumber"
|
:model-value="row?.simSerialNumber"
|
||||||
disable
|
disable
|
||||||
/>
|
/>
|
||||||
|
<QBtn
|
||||||
<div class="icon">
|
flat
|
||||||
<QIcon
|
icon="delete"
|
||||||
name="delete"
|
color="primary"
|
||||||
size="sm"
|
class="btn-delete"
|
||||||
color="primary"
|
@click="
|
||||||
class="cursor-pointer"
|
openConfirmationModal(
|
||||||
@click="
|
t(`Remove PDA`),
|
||||||
openConfirmationModal(
|
t('Do you want to remove this PDA?'),
|
||||||
t(`Remove PDA`),
|
() => deallocatePDA(row.deviceProductionFk)
|
||||||
t('Do you want to remove this PDA?'),
|
)
|
||||||
() => deallocatePDA(row.deviceProductionFk)
|
"
|
||||||
)
|
>
|
||||||
"
|
<QTooltip>
|
||||||
>
|
{{ t('worker.pda.removePDA') }}
|
||||||
<QTooltip>
|
</QTooltip>
|
||||||
{{ t('worker.pda.removePDA') }}
|
</QBtn>
|
||||||
</QTooltip>
|
|
||||||
</QIcon>
|
|
||||||
</div>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
@ -171,12 +168,9 @@ function reloadData() {
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.icon {
|
.btn-delete {
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: 2%;
|
|
||||||
max-width: 4%;
|
max-width: 4%;
|
||||||
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -14,17 +14,8 @@ 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('.icon > .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();
|
||||||
|
|
Loading…
Reference in New Issue