diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue index 691cf63bd..a5560dfc0 100644 --- a/src/components/FormModel.vue +++ b/src/components/FormModel.vue @@ -135,12 +135,11 @@ async function save() { await axios.patch($props.urlUpdate || $props.url, body); } emit('onDataSaved', formData.value); + originalData.value = JSON.parse(JSON.stringify(formData.value)); + hasChanges.value = false; } catch (err) { notify('errors.create', 'negative'); } - - originalData.value = JSON.parse(JSON.stringify(formData.value)); - hasChanges.value = false; isLoading.value = false; } diff --git a/src/components/ui/VnFilterPanel.vue b/src/components/ui/VnFilterPanel.vue index a138e0b64..0a306dc5f 100644 --- a/src/components/ui/VnFilterPanel.vue +++ b/src/components/ui/VnFilterPanel.vue @@ -4,6 +4,8 @@ import { useI18n } from 'vue-i18n'; import { useArrayData } from 'composables/useArrayData'; import toDate from 'filters/toDate'; +import VnFilterPanelChip from 'components/ui/VnFilterPanelChip.vue'; + const { t } = useI18n(); const props = defineProps({ dataKey: { @@ -39,6 +41,10 @@ const props = defineProps({ type: Array, default: () => [], }, + customTags: { + type: Array, + default: () => [], + }, }); const emit = defineEmits(['refresh', 'clear', 'search', 'init', 'remove']); @@ -104,19 +110,26 @@ async function clearFilters() { emit('clear'); } -const tags = computed(() => { - return Object.entries(userParams.value) +const tagsList = computed(() => + Object.entries(userParams.value) .filter(([key, value]) => value && !(props.hiddenTags || []).includes(key)) .map(([key, value]) => ({ label: key, value: value, - })); -}); + })) +); + +const tags = computed(() => + tagsList.value.filter((tag) => !(props.customTags || []).includes(tag.label)) +); +const customTags = computed(() => + tagsList.value.filter((tag) => (props.customTags || []).includes(tag.label)) +); async function remove(key) { userParams.value[key] = null; await search(); - emit('remove', key) + emit('remove', key); } function formatValue(value) { @@ -172,21 +185,17 @@ function formatValue(value) {
{{ t(`No filters applied`) }}
-
@@ -194,7 +203,15 @@ function formatValue(value) { "{{ chip.value }}"
-
+ +
diff --git a/src/components/ui/VnFilterPanelChip.vue b/src/components/ui/VnFilterPanelChip.vue new file mode 100644 index 000000000..89aad39e8 --- /dev/null +++ b/src/components/ui/VnFilterPanelChip.vue @@ -0,0 +1,7 @@ + + + diff --git a/src/pages/Order/Card/OrderBasicData.vue b/src/pages/Order/Card/OrderBasicData.vue deleted file mode 100644 index 0611fa874..000000000 --- a/src/pages/Order/Card/OrderBasicData.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/src/pages/Order/Card/OrderCard.vue b/src/pages/Order/Card/OrderCard.vue index 4163e22a4..e81c6a3eb 100644 --- a/src/pages/Order/Card/OrderCard.vue +++ b/src/pages/Order/Card/OrderCard.vue @@ -15,9 +15,7 @@ const stateStore = useStateStore(); -
- -
+
diff --git a/src/pages/Order/Card/OrderCatalogFilter.vue b/src/pages/Order/Card/OrderCatalogFilter.vue index 0859e14a6..c325a9b05 100644 --- a/src/pages/Order/Card/OrderCatalogFilter.vue +++ b/src/pages/Order/Card/OrderCatalogFilter.vue @@ -1,11 +1,14 @@ diff --git a/src/pages/Order/Card/OrderSummary.vue b/src/pages/Order/Card/OrderSummary.vue index 0ddae2d16..9b26891a1 100644 --- a/src/pages/Order/Card/OrderSummary.vue +++ b/src/pages/Order/Card/OrderSummary.vue @@ -56,148 +56,161 @@ const detailsColumns = ref([ - - - - + +
+ + + + +