|
@@ -17,7 +17,7 @@
|
|
|
:show-search-button="false"
|
|
:show-search-button="false"
|
|
|
:show-expand-button="false"
|
|
:show-expand-button="false"
|
|
|
:show-reload-button="false">
|
|
:show-reload-button="false">
|
|
|
- <template #entity-index-table-cell="{inputData}">
|
|
|
|
|
|
|
+ <template #entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
|
|
|
<template v-if="inputData.col.name === 'number'">
|
|
<template v-if="inputData.col.name === 'number'">
|
|
|
{{ inputData.rowNumber }}
|
|
{{ inputData.rowNumber }}
|
|
|
</template>
|
|
</template>
|
|
@@ -26,10 +26,13 @@
|
|
|
width="100px" />
|
|
width="100px" />
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="inputData.col.name === 'action'">
|
|
<template v-else-if="inputData.col.name === 'action'">
|
|
|
- <q-btn color="primary"
|
|
|
|
|
- :to="{name: 'Admin.ContentCategory.Show', params: {id: inputData.props.row.id}}">
|
|
|
|
|
- مشاهده جزییات
|
|
|
|
|
- </q-btn>
|
|
|
|
|
|
|
+ <div class="action-column-entity-index">
|
|
|
|
|
+ <q-btn color="primary"
|
|
|
|
|
+ :to="{name: 'Admin.ContentCategory.Show', params: {id: inputData.props.row.id}}">
|
|
|
|
|
+ مشاهده جزییات
|
|
|
|
|
+ </q-btn>
|
|
|
|
|
+ <delete-btn @click="showConfirmRemoveDialog(inputData.props.row, 'id', getRemoveMessage(inputData.props.row))" />
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else>
|
|
<template v-else>
|
|
|
{{ inputData.col.value }}
|
|
{{ inputData.col.value }}
|
|
@@ -45,10 +48,11 @@ import { EntityIndex } from 'quasar-crud'
|
|
|
import { mixinWidget } from 'src/mixin/Mixins.js'
|
|
import { mixinWidget } from 'src/mixin/Mixins.js'
|
|
|
import { APIGateway } from 'src/api/APIGateway.js'
|
|
import { APIGateway } from 'src/api/APIGateway.js'
|
|
|
import { FormBuilderAssist } from 'quasar-form-builder'
|
|
import { FormBuilderAssist } from 'quasar-form-builder'
|
|
|
|
|
+import DeleteBtn from 'components/Control/DeleteBtn.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: 'AdminContentCategoryList',
|
|
name: 'AdminContentCategoryList',
|
|
|
- components: { EntityIndex },
|
|
|
|
|
|
|
+ components: { DeleteBtn, EntityIndex },
|
|
|
mixins: [mixinWidget],
|
|
mixins: [mixinWidget],
|
|
|
props: {
|
|
props: {
|
|
|
title: {
|
|
title: {
|
|
@@ -125,6 +129,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.mounted = true
|
|
this.mounted = true
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getRemoveMessage (row) {
|
|
|
|
|
+ return 'آیا از حذف ' + row.title + ' اطمینان دارید؟'
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
@@ -144,5 +153,10 @@ export default {
|
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
+ .action-column-entity-index {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|