6 changed files with 235 additions and 101 deletions
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
<template> |
||||
<v-row justify="center"> |
||||
<v-dialog v-model="dialog" persistent max-width="290"> |
||||
<template #activator="{ on, attrs }"> |
||||
<v-icon small v-bind="attrs" v-on="on"> mdi-delete </v-icon> |
||||
</template> |
||||
|
||||
<ui-rug-card-form :form="form"> |
||||
<v-card-title>{{ |
||||
$t('page.researchStudies.studyId.apps.index.delete_modal.title') |
||||
}}</v-card-title> |
||||
<v-card-text>{{ |
||||
$t('page.researchStudies.studyId.apps.index.delete_modal.text', { |
||||
app_name: app.name, |
||||
researcher_name: app.contributor.researcher.display_name, |
||||
}) |
||||
}}</v-card-text> |
||||
<span slot="actions"> |
||||
<v-spacer></v-spacer> |
||||
<v-btn text @click="dialog = false"> |
||||
{{ |
||||
$t('page.researchStudies.studyId.apps.index.delete_modal.cancel') |
||||
}} |
||||
</v-btn> |
||||
<v-btn text type="submit"> |
||||
{{ $t('page.researchStudies.studyId.apps.index.delete_modal.ok') }} |
||||
</v-btn> |
||||
</span> |
||||
</ui-rug-card-form> |
||||
</v-dialog> |
||||
</v-row> |
||||
</template> |
||||
|
||||
<script> |
||||
import { mapActions } from 'vuex' |
||||
import Form from '@/lib/form' |
||||
|
||||
export default { |
||||
props: { |
||||
studyId: { |
||||
type: [Number, String], |
||||
default: 0, |
||||
}, |
||||
app: { |
||||
type: Object, |
||||
default() { |
||||
return {} |
||||
}, |
||||
}, |
||||
}, |
||||
|
||||
data() { |
||||
return { |
||||
dialog: false, |
||||
formData: { |
||||
studyId: this.studyId, |
||||
appId: this.app.id, |
||||
}, |
||||
form: new Form({ |
||||
vm: this, |
||||
action: this['apps/removeStudyApp'], |
||||
onResponse() { |
||||
this.vm.dialog = false |
||||
this.vm.$nuxt.refresh() |
||||
}, |
||||
}), |
||||
} |
||||
}, |
||||
methods: { |
||||
...mapActions(['apps/removeStudyApp']), |
||||
}, |
||||
} |
||||
</script> |
Loading…
Reference in new issue