forked from verdnatura/salix-front
reset changes
This commit is contained in:
parent
c87629f2ec
commit
30c912fa62
|
@ -7,10 +7,6 @@ const $props = defineProps({
|
|||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
dataKey: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
url: {
|
||||
type: String,
|
||||
default: '',
|
||||
|
@ -53,7 +49,7 @@ async function fetch(fetchFilter = {}) {
|
|||
if ($props.sortBy) filter.order = $props.sortBy;
|
||||
if ($props.limit) filter.limit = $props.limit;
|
||||
|
||||
const { data } = await axios($props.url, {
|
||||
const { data } = await axios.get($props.url, {
|
||||
params: { filter: JSON.stringify(filter), ...$props.params },
|
||||
});
|
||||
|
||||
|
|
|
@ -96,7 +96,6 @@ function copyUserToken() {
|
|||
<template>
|
||||
<FetchData
|
||||
url="Warehouses"
|
||||
data-key
|
||||
order="name"
|
||||
@on-fetch="(data) => (warehousesData = data)"
|
||||
auto-load
|
||||
|
|
|
@ -21,13 +21,6 @@ const filter = {
|
|||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="Countries"
|
||||
data-key
|
||||
auto-load
|
||||
@on-fetch="(data) => (countries = data)"
|
||||
sort-by="name"
|
||||
/>
|
||||
<VnCard
|
||||
data-key="InvoiceIn"
|
||||
base-url="InvoiceIns"
|
||||
|
|
|
@ -16,7 +16,7 @@ const currency = computed(
|
|||
);
|
||||
const invoceInIntrastat = ref([]);
|
||||
const rowsSelected = ref([]);
|
||||
const countries = computed(() => useArrayData('Countries').store.data);
|
||||
const countries = ref([]);
|
||||
const intrastats = ref([]);
|
||||
const invoiceInFormRef = ref();
|
||||
const invoiceInId = computed(() => +route.params.id);
|
||||
|
@ -76,6 +76,12 @@ const getTotal = (data, key) =>
|
|||
data.reduce((acc, cur) => acc + +String(cur[key]).replace(',', '.'), 0);
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
url="Countries"
|
||||
auto-load
|
||||
@on-fetch="(data) => (countries = data)"
|
||||
sort-by="name"
|
||||
/>
|
||||
<FetchData
|
||||
url="Intrastats"
|
||||
sort-by="id"
|
||||
|
|
|
@ -182,12 +182,6 @@ const getLink = (param) => `#/invoice-in/${entityId.value}/${param}`;
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<FetchData
|
||||
url="Countries"
|
||||
auto-load
|
||||
@on-fetch="(data) => (countries = data)"
|
||||
sort-by="name"
|
||||
/>
|
||||
<CardSummary
|
||||
data-key="InvoiceInSummary"
|
||||
:url="`InvoiceIns/${entityId}/summary`"
|
||||
|
|
Loading…
Reference in New Issue