2021-10-19 12:12:07 +00:00
|
|
|
<script>
|
2022-03-23 12:07:27 +00:00
|
|
|
import { TYPE_WORK_ITEM } from '~/graphql_shared/constants';
|
2022-03-10 06:09:00 +00:00
|
|
|
import { convertToGraphQLId } from '~/graphql_shared/utils';
|
2022-04-28 09:08:26 +00:00
|
|
|
import { s__ } from '~/locale';
|
2022-03-24 12:07:26 +00:00
|
|
|
import WorkItemDetail from '../components/work_item_detail.vue';
|
2022-01-13 18:16:51 +00:00
|
|
|
|
2021-10-19 12:12:07 +00:00
|
|
|
export default {
|
2021-12-08 12:13:04 +00:00
|
|
|
components: {
|
2022-03-24 12:07:26 +00:00
|
|
|
WorkItemDetail,
|
2021-12-08 12:13:04 +00:00
|
|
|
},
|
2021-10-19 12:12:07 +00:00
|
|
|
props: {
|
|
|
|
id: {
|
|
|
|
type: String,
|
|
|
|
required: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
2022-03-10 06:09:00 +00:00
|
|
|
gid() {
|
2022-03-23 12:07:27 +00:00
|
|
|
return convertToGraphQLId(TYPE_WORK_ITEM, this.id);
|
2021-10-19 12:12:07 +00:00
|
|
|
},
|
2021-12-08 12:13:04 +00:00
|
|
|
},
|
2022-04-28 09:08:26 +00:00
|
|
|
methods: {
|
|
|
|
handleWorkItemDeleted() {
|
|
|
|
this.$root.$toast.show(s__('WorkItem|Work item deleted'));
|
|
|
|
this.$router.push('/');
|
|
|
|
},
|
|
|
|
},
|
2021-10-19 12:12:07 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-04-28 09:08:26 +00:00
|
|
|
<work-item-detail :work-item-id="gid" @workItemDeleted="handleWorkItemDeleted" />
|
2021-10-19 12:12:07 +00:00
|
|
|
</template>
|