1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-26 22:34:42 +03:00
guide/front/client/components/ConfirmDialog.vue
Gigiman 2fdae50c81 Category item add/delete tests (#238)
* TestCafe added to project. First test written

* Search input test added

* Seacth input test changed, travis job for testcafe tests added

* Travis bugfix test

* Travis testcafe bugfix test try 2

* Travis testcafe bugfix test ry 3

* Travis testcafe test sleep increased to 10

* Test adding category added but bug with click occurs - check!!!

* Category test (testing the group where test was creating) added - bug fix

* Article component rewrite

* Article component rewritten

* Big with rendering content.html in v-for

* Collapse bug fix

* MInor category visual changes/fixes

* Description, reactivity bug fix

* merge

* Refactoring after code review

* Conflict in styles resolved

* Item add/delete feature in category

* merge with vue

* minor code fix

* minor merge fix

* add/delete item test v 0.0.1

* add/delete item tests

* add/delete tests merge with develop branch fix

* Tests bug fix

* minor add/delete item test refactoring

* Tests improved

* Package lock
2018-11-20 15:49:45 +03:00

55 lines
1.1 KiB
Vue

<!-- Universal confirmation dialog, just pass text and function in Props -->
<template>
<v-dialog
:value="value"
@input="close"
max-width="500px"
>
<slot slot="activator" />
<v-card>
<v-card-text>
Are you sure you want to {{ confirmationText }}
</v-card-text>
<v-divider />
<v-card-actions>
<v-spacer />
<v-btn
flat
color="primary"
class="confirm-btn"
@click.native="confirmAction(itemId); close"
>
Continue
</v-btn>
<v-btn
flat
color="primary"
@click.native="close"
>
Cancel
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script lang="ts">
import Vue from 'vue'
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
@Component
export default class ConfirmDialog extends Vue {
@Prop(String) confirmationText!: string
@Prop(Function) confirmAction!: Function
@Prop(Boolean) value!: boolean
@Prop(String) itemId!: string
close() {
this.$emit('input', false)
}
}
</script>