This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
v-model="isVisible"
|
v-model="isVisible"
|
||||||
:max-width="options.width"
|
:max-width="options.width"
|
||||||
@keydown.esc="cancel"
|
@keydown.esc="cancel"
|
||||||
|
data-cy="gzconfirm"
|
||||||
>
|
>
|
||||||
<v-card elevation="24">
|
<v-card elevation="24">
|
||||||
<v-card-title class="headline lighten-2" primary-title>
|
<v-card-title class="headline lighten-2" primary-title>
|
||||||
@@ -46,11 +47,16 @@
|
|||||||
color="primary darken-1"
|
color="primary darken-1"
|
||||||
text
|
text
|
||||||
@click.native="cancel"
|
@click.native="cancel"
|
||||||
|
data-cy="gzconfirm:nobutton"
|
||||||
>{{ options.noButtonText }}</v-btn
|
>{{ options.noButtonText }}</v-btn
|
||||||
>
|
>
|
||||||
<v-btn color="primary darken-1" text @click.native="agree">{{
|
<v-btn
|
||||||
options.yesButtonText
|
color="primary darken-1"
|
||||||
}}</v-btn>
|
text
|
||||||
|
@click.native="agree"
|
||||||
|
data-cy="gzconfirm:yesbutton"
|
||||||
|
>{{ options.yesButtonText }}</v-btn
|
||||||
|
>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <v-scale-transition> -->
|
<!-- <v-scale-transition> -->
|
||||||
<v-snackbar :value="isVisible" :color="currentNotification.type">
|
<v-snackbar
|
||||||
|
data-cy="gznotify"
|
||||||
|
:value="isVisible"
|
||||||
|
:color="currentNotification.type"
|
||||||
|
>
|
||||||
<v-alert :type="currentNotification.type" mode="out-in">
|
<v-alert :type="currentNotification.type" mode="out-in">
|
||||||
{{ currentNotification.message }}
|
{{ currentNotification.message }}
|
||||||
</v-alert>
|
</v-alert>
|
||||||
<v-btn text v-if="currentNotification.helpUrl" @click="helpClick()">
|
<v-btn
|
||||||
|
data-cy="gznotify:morebutton"
|
||||||
|
text
|
||||||
|
v-if="currentNotification.helpUrl"
|
||||||
|
@click="helpClick()"
|
||||||
|
>
|
||||||
{{ this.$root.$gz.translation.get("More") }}
|
{{ this.$root.$gz.translation.get("More") }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-snackbar>
|
</v-snackbar>
|
||||||
|
|||||||
@@ -255,9 +255,9 @@ export default {
|
|||||||
readOnly: readOnly
|
readOnly: readOnly
|
||||||
});
|
});
|
||||||
|
|
||||||
//bugbug WTF? This doesn't make sense, if it's an attempt to hide delete button then that's wrong
|
// //bugbug WTF? This doesn't make sense, if it's an attempt to hide delete button then that's wrong
|
||||||
//it's a new record so it can't be deleted so...
|
// //it's a new record so it can't be deleted so...
|
||||||
vm.rights.delete = false;
|
// vm.rights.delete = false;
|
||||||
generateMenu(vm);
|
generateMenu(vm);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -635,7 +635,7 @@ function generateMenu(vm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.rights.delete) {
|
if (vm.rights.delete && vm.$route.params.recordid != 0) {
|
||||||
menuOptions.menuItems.push({
|
menuOptions.menuItems.push({
|
||||||
title: window.$gz.translation.get("Delete"),
|
title: window.$gz.translation.get("Delete"),
|
||||||
icon: "fa-trash-alt",
|
icon: "fa-trash-alt",
|
||||||
|
|||||||
@@ -113,5 +113,6 @@ describe("WIDGET FORM", () => {
|
|||||||
|
|
||||||
//delete the record
|
//delete the record
|
||||||
cy.get('[data-cy="widget-edit:delete"]').click();
|
cy.get('[data-cy="widget-edit:delete"]').click();
|
||||||
|
cy.get('[data-cy="gzconfirm:yesbutton"]').click();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user