diff --git a/src/components/CrudModel.vue b/src/components/CrudModel.vue
index d5d8e2a91..fa7761c5f 100644
--- a/src/components/CrudModel.vue
+++ b/src/components/CrudModel.vue
@@ -10,6 +10,7 @@ import VnPaginate from 'components/ui/VnPaginate.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
import SkeletonTable from 'components/ui/SkeletonTable.vue';
import { tMobile } from 'src/composables/tMobile';
+import VnSubToolbar from './ui/VnSubToolbar.vue';
const { push } = useRouter();
const quasar = useQuasar();
@@ -67,7 +68,7 @@ const $props = defineProps({
default: '',
description: 'It is used for redirect on click "save and continue"',
},
- hasSubtoolbar: {
+ hasSubToolbar: {
type: Boolean,
default: true,
},
@@ -313,8 +314,11 @@ watch(formUrl, async () => {
>
-
-
+
+
{
{
const components = computed(() => $props.components ?? defaultComponents);
-
+
({ card: false, table: false }),
+ },
});
const { t } = useI18n();
const stateStore = useStateStore();
@@ -84,11 +88,13 @@ const tableModes = [
icon: 'view_column',
title: t('table view'),
value: TABLE_MODE,
+ disable: $props.disableOption?.table,
},
{
icon: 'grid_view',
title: t('grid view'),
value: DEFAULT_MODE,
+ disable: $props.disableOption?.card,
},
];
@@ -232,7 +238,7 @@ defineExpose({
:search-url="searchUrl"
:disable-infinite-scroll="mode == TABLE_MODE"
@save-changes="reload"
- :has-subtoolbar="$attrs['hasSubtoolbar'] ?? isEditable"
+ :has-sub-toolbar="$attrs['hasSubToolbar'] ?? isEditable"
>
diff --git a/src/components/common/VnComponent.vue b/src/components/common/VnComponent.vue
index 2e2095f23..d7719034a 100644
--- a/src/components/common/VnComponent.vue
+++ b/src/components/common/VnComponent.vue
@@ -12,7 +12,7 @@ const $props = defineProps({
default: () => {},
},
value: {
- type: [Object, Number, String],
+ type: [Object, Number, String, Boolean],
default: () => {},
},
});
diff --git a/src/components/common/VnLog.vue b/src/components/common/VnLog.vue
index 61436b7e8..19765b1f7 100644
--- a/src/components/common/VnLog.vue
+++ b/src/components/common/VnLog.vue
@@ -49,6 +49,7 @@ const filter = {
'changedModelId',
'changedModelValue',
'description',
+ 'summaryId',
],
include: [
{
@@ -459,12 +460,12 @@ onUnmounted(() => {
:style="{
backgroundColor: useColor(modelLog.model),
}"
- :title="modelLog.model"
+ :title="`${modelLog.model} #${modelLog.id}`"
>
{{ t(modelLog.modelI18n) }}
- #{{ modelLog.id }}#{{ modelLog.summaryId }}
{{ modelLog.showValue }}
diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index 3f1f0a00c..2bb5234ad 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -93,13 +93,36 @@ function getValueFromPath(path) {
}
const emit = defineEmits(['onFetch']);
+
+const iconModule = computed(() => route.matched[1].meta.icon);
+const toModule = computed(() =>
+ route.matched[1].path.split('/').length > 2
+ ? route.matched[1].redirect
+ : route.matched[1].children[0].redirect
+);