feat: refs #7187 add vnconfirm on delete
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
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 useNotify from 'src/composables/useNotify.js';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
||||||
|
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||||
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
|
@ -19,6 +20,7 @@ const { notify } = useNotify();
|
||||||
const paginate = ref();
|
const paginate = ref();
|
||||||
const dialog = ref();
|
const dialog = ref();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
const { openConfirmationModal } = useVnConfirm();
|
||||||
const routeId = computed(() => route.params.id);
|
const routeId = computed(() => route.params.id);
|
||||||
|
|
||||||
const initialData = computed(() => {
|
const initialData = computed(() => {
|
||||||
|
@ -115,7 +117,13 @@ function reloadData() {
|
||||||
size="sm"
|
size="sm"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="deallocatePDA(row.deviceProductionFk)"
|
@click="
|
||||||
|
openConfirmationModal(
|
||||||
|
t(`Remove PDA`),
|
||||||
|
t('Do you want to remove this PDA?'),
|
||||||
|
() => deallocatePDA(row.deviceProductionFk)
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('worker.pda.removePDA') }}
|
{{ t('worker.pda.removePDA') }}
|
||||||
|
@ -194,6 +202,8 @@ function reloadData() {
|
||||||
</style>
|
</style>
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
|
Remove PDA: Eliminar PDA
|
||||||
|
Do you want to remove this PDA?: ¿Desea eliminar este PDA?
|
||||||
PDA deallocated: PDA desasignada
|
PDA deallocated: PDA desasignada
|
||||||
SIM serial number: Número de serie de la SIM
|
SIM serial number: Número de serie de la SIM
|
||||||
Model: Modelo
|
Model: Modelo
|
||||||
|
|
|
@ -16,6 +16,9 @@ describe('WorkerPda', () => {
|
||||||
|
|
||||||
it('delete pda', () => {
|
it('delete pda', () => {
|
||||||
cy.get('.q-card > .q-item > .q-item__section--side > .q-icon').click();
|
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');
|
cy.get('.q-notification__message').should('have.text', 'PDA deallocated');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue