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