diff --git a/public/no-image-dark.png b/public/no-image-dark.png new file mode 100644 index 000000000..2a20d7eb4 Binary files /dev/null and b/public/no-image-dark.png differ diff --git a/public/no-image.png b/public/no-image.png new file mode 100644 index 000000000..11d5317a9 Binary files /dev/null and b/public/no-image.png differ diff --git a/public/no-user.png b/public/no-user.png new file mode 100644 index 000000000..e090bc2eb Binary files /dev/null and b/public/no-user.png differ 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 () => { > - - + + $props.model ?? `formModel_${route?.meta?.title ?? route.name}` + () => $props.model ?? `formModel_${route?.meta?.title ?? route.name}`, ).value; const componentIsRendered = ref(false); const arrayData = useArrayData(modelValue); @@ -137,7 +137,7 @@ onMounted(async () => { JSON.stringify(newVal) !== JSON.stringify(originalData.value); isResetting.value = false; }, - { deep: true } + { deep: true }, ); } }); @@ -145,7 +145,7 @@ onMounted(async () => { if (!$props.url) watch( () => arrayData.store.data, - (val) => updateAndEmit('onFetch', val) + (val) => updateAndEmit('onFetch', val), ); watch(formUrl, async () => { @@ -206,11 +206,11 @@ async function save() { updateAndEmit('onDataSaved', formData.value, response?.data); if ($props.reload) await arrayData.fetch({}); + hasChanges.value = false; } catch (err) { console.error(err); notify('errors.writeRequest', 'negative'); } finally { - hasChanges.value = false; isLoading.value = false; } } @@ -239,7 +239,7 @@ function filter(value, update, filterOptions) { (ref) => { ref.setOptionIndex(-1); ref.moveOptionSelection(1, true); - } + }, ); } diff --git a/src/components/LeftMenu.vue b/src/components/LeftMenu.vue index 3cccd0d2f..213c08d7e 100644 --- a/src/components/LeftMenu.vue +++ b/src/components/LeftMenu.vue @@ -58,6 +58,7 @@ function addChildren(module, route, parent) { } const items = ref([]); + function getRoutes() { if (props.source === 'main') { const modules = Object.assign([], navigation.getModules().value); @@ -66,9 +67,8 @@ function getRoutes() { const moduleDef = routes.find( (route) => toLowerCamel(route.name) === item.module ); - item.children = []; - if (!moduleDef) continue; + item.children = []; addChildren(item.module, moduleDef, item.children); } diff --git a/src/components/LeftMenuItem.vue b/src/components/LeftMenuItem.vue index d12fb8428..f3f2315a3 100644 --- a/src/components/LeftMenuItem.vue +++ b/src/components/LeftMenuItem.vue @@ -21,7 +21,7 @@ const itemComputed = computed(() => {