diff --git a/package.json b/package.json
index 4668d2d56..71d80d401 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-front",
- "version": "24.28.1",
+ "version": "24.30.1",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",
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/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/NavBar.vue b/src/components/NavBar.vue
index c6722d875..3051e8b99 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -1,21 +1,19 @@
@@ -109,12 +112,14 @@ function saveUserData(param, value) {
auto-load
/>
(companiesData = data)"
auto-load
/>
(accountBankData = data)"
diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue
index 493f1480e..56d1cbe8f 100644
--- a/src/components/VnTable/VnTable.vue
+++ b/src/components/VnTable/VnTable.vue
@@ -59,6 +59,10 @@ const $props = defineProps({
type: Boolean,
default: false,
},
+ hasSubtoolbar: {
+ type: Boolean,
+ default: true,
+ },
});
const { t } = useI18n();
const stateStore = useStateStore();
@@ -175,11 +179,14 @@ function columnName(col) {
}
function getColAlign(col) {
- return 'text-' + (col.align ?? 'left')
+ return 'text-' + (col.align ?? 'left');
}
+
+const emit = defineEmits(['onFetch', 'update:selected', 'saveChanges']);
defineExpose({
reload,
redirect: redirectFn,
+ selected,
});
@@ -225,11 +232,18 @@ defineExpose({
:search-url="searchUrl"
:disable-infinite-scroll="mode == TABLE_MODE"
@save-changes="reload"
- :has-subtoolbar="isEditable"
+ :has-subtoolbar="$attrs['hasSubtoolbar'] ?? isEditable"
>
+
+
+
rowClickFunction(row)"
+ @update:selected="emit('update:selected', $event)"
>
@@ -310,13 +325,15 @@ defineExpose({
class="no-margin q-px-xs"
:class="getColAlign(col)"
>
-
+
+
+
@@ -412,14 +429,20 @@ defineExpose({
stopEventPropagation($event)
"
>
-
+ >
+
+
@@ -477,6 +500,7 @@ defineExpose({
default="input"
v-model="data[column.name]"
:show-label="true"
+ component-prop="columnCreate"
/>
diff --git a/src/components/common/VnInput.vue b/src/components/common/VnInput.vue
index 4cd964012..33b97e29d 100644
--- a/src/components/common/VnInput.vue
+++ b/src/components/common/VnInput.vue
@@ -93,7 +93,12 @@ const inputRules = [
name="close"
size="xs"
v-if="hover && value && !$attrs.disabled && $props.clearable"
- @click="value = null"
+ @click="
+ () => {
+ value = null;
+ emit('remove');
+ }
+ "
>
diff --git a/src/components/common/VnSelect.vue b/src/components/common/VnSelect.vue
index 52cb68438..3e5cd4216 100644
--- a/src/components/common/VnSelect.vue
+++ b/src/components/common/VnSelect.vue
@@ -61,6 +61,10 @@ const $props = defineProps({
type: Boolean,
default: false,
},
+ useLike: {
+ type: Boolean,
+ default: true,
+ },
});
const { t } = useI18n();
@@ -114,11 +118,14 @@ async function fetchFilter(val) {
if (!$props.url || !dataRef.value) return;
const { fields, sortBy, limit } = $props;
- let key = optionLabel.value;
+ let key = optionFilter.value ?? optionLabel.value;
- if (new RegExp(/\d/g).test(val)) key = optionFilter.value ?? optionValue.value;
+ if (new RegExp(/\d/g).test(val)) key = optionValue.value;
- const where = { ...{ [key]: { like: `%${val}%` } }, ...$props.where };
+ const defaultWhere = $props.useLike
+ ? { [key]: { like: `%${val}%` } }
+ : { [key]: val };
+ const where = { ...defaultWhere, ...$props.where };
const fetchOptions = { where, order: sortBy, limit };
if (fields) fetchOptions.fields = fields;
return dataRef.value.fetch(fetchOptions);
diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue
index 9eff3d322..16217946b 100644
--- a/src/components/ui/VnFilterPanel.vue
+++ b/src/components/ui/VnFilterPanel.vue
@@ -10,7 +10,7 @@ const { t } = useI18n();
const $props = defineProps({
modelValue: {
type: Object,
- default: () => {}
+ default: () => {},
},
dataKey: {
type: String,
@@ -58,7 +58,14 @@ const $props = defineProps({
},
});
-const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']);
+const emit = defineEmits([
+ 'update:modelValue',
+ 'refresh',
+ 'clear',
+ 'search',
+ 'init',
+ 'remove',
+]);
const arrayData = useArrayData($props.dataKey, {
exprBuilder: $props.exprBuilder,
@@ -67,9 +74,9 @@ const arrayData = useArrayData($props.dataKey, {
});
const route = useRoute();
const store = arrayData.store;
-const userParams = ref({})
+const userParams = ref({});
onMounted(() => {
- userParams.value = $props.modelValue ?? {}
+ userParams.value = $props.modelValue ?? {};
emit('init', { params: userParams.value });
});
@@ -92,6 +99,11 @@ watch(
(val) => setUserParams(val)
);
+watch(
+ () => $props.modelValue,
+ (val) => (userParams.value = val ?? {})
+);
+
const isLoading = ref(false);
async function search(evt) {
if (evt && $props.disableSubmitEvent) return;
@@ -145,6 +157,7 @@ async function clearFilters() {
isLoading.value = false;
emit('clear');
+ emit('update:modelValue', userParams.value);
}
const tagsList = computed(() => {
@@ -168,6 +181,7 @@ async function remove(key) {
userParams.value[key] = undefined;
search();
emit('remove', key);
+ emit('update:modelValue', userParams.value);
}
function formatValue(value) {
diff --git a/src/components/ui/VnImg.vue b/src/components/ui/VnImg.vue
index 37c1edefc..8d747963b 100644
--- a/src/components/ui/VnImg.vue
+++ b/src/components/ui/VnImg.vue
@@ -1,5 +1,5 @@
-
+
{});