forked from verdnatura/salix-front
feat: refs #7187 add vnconfirm on delete
This commit is contained in:
parent
9468e409ea
commit
45f56078d7
|
@ -7,6 +7,7 @@ import axios from 'axios';
|
|||
import useNotify from 'src/composables/useNotify.js';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
||||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
|
@ -19,6 +20,7 @@ const { notify } = useNotify();
|
|||
const paginate = ref();
|
||||
const dialog = ref();
|
||||
const route = useRoute();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
const routeId = computed(() => route.params.id);
|
||||
|
||||
const initialData = computed(() => {
|
||||
|
@ -115,7 +117,13 @@ function reloadData() {
|
|||
size="sm"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
@click="deallocatePDA(row.deviceProductionFk)"
|
||||
@click="
|
||||
openConfirmationModal(
|
||||
t(`Remove PDA`),
|
||||
t('Do you want to remove this PDA?'),
|
||||
() => deallocatePDA(row.deviceProductionFk)
|
||||
)
|
||||
"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('worker.pda.removePDA') }}
|
||||
|
@ -194,6 +202,8 @@ function reloadData() {
|
|||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
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
|
||||
|
|
|
@ -16,6 +16,9 @@ describe('WorkerPda', () => {
|
|||
|
||||
it('delete pda', () => {
|
||||
cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click();
|
||||
cy.get(
|
||||
'.q-card__actions > .q-btn--unelevated > .q-btn__content > .block'
|
||||
).click();
|
||||
cy.get('.q-notification__message').should('have.text', 'PDA deallocated');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue