This commit is contained in:
2020-04-01 18:48:38 +00:00
parent bd7d43f462
commit 810e060fed
4 changed files with 25 additions and 9 deletions

View File

@@ -27,6 +27,7 @@
v-model="isVisible"
:max-width="options.width"
@keydown.esc="cancel"
data-cy="gzconfirm"
>
<v-card elevation="24">
<v-card-title class="headline lighten-2" primary-title>
@@ -46,11 +47,16 @@
color="primary darken-1"
text
@click.native="cancel"
data-cy="gzconfirm:nobutton"
>{{ options.noButtonText }}</v-btn
>
<v-btn color="primary darken-1" text @click.native="agree">{{
options.yesButtonText
}}</v-btn>
<v-btn
color="primary darken-1"
text
@click.native="agree"
data-cy="gzconfirm:yesbutton"
>{{ options.yesButtonText }}</v-btn
>
</v-card-actions>
</v-card>
</v-dialog>

View File

@@ -1,10 +1,19 @@
<template>
<!-- <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">
{{ currentNotification.message }}
</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") }}
</v-btn>
</v-snackbar>

View File

@@ -255,9 +255,9 @@ export default {
readOnly: readOnly
});
//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...
vm.rights.delete = false;
// //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...
// vm.rights.delete = false;
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({
title: window.$gz.translation.get("Delete"),
icon: "fa-trash-alt",

View File

@@ -113,5 +113,6 @@ describe("WIDGET FORM", () => {
//delete the record
cy.get('[data-cy="widget-edit:delete"]').click();
cy.get('[data-cy="gzconfirm:yesbutton"]').click();
});
});