Account Submodule #412

Merged
jsegarra merged 29 commits from :feature/AccountList into dev 2024-06-19 05:45:08 +00:00
5 changed files with 8 additions and 20 deletions
Showing only changes of commit 30c912fa62 - Show all commits

View File

@ -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 },
});

View File

@ -96,7 +96,6 @@ function copyUserToken() {
<template>
<FetchData
url="Warehouses"
data-key
order="name"
@on-fetch="(data) => (warehousesData = data)"
auto-load

View File

@ -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"

View File

@ -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"

View File

@ -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`"