Merge branch 'dev' into 6578-orderClaim
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
This commit is contained in:
commit
41066387f9
|
@ -81,6 +81,10 @@ function logout() {
|
||||||
session.destroy();
|
session.destroy();
|
||||||
router.push('/login');
|
router.push('/login');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function copyUserToken(){
|
||||||
|
navigator.clipboard.writeText(session.getToken());
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -122,7 +126,8 @@ function logout() {
|
||||||
<div class="text-subtitle1 q-mt-md">
|
<div class="text-subtitle1 q-mt-md">
|
||||||
<strong>{{ user.nickname }}</strong>
|
<strong>{{ user.nickname }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-subtitle3 text-grey-7 q-mb-xs">@{{ user.name }}</div>
|
<div class="text-subtitle3 text-grey-7 q-mb-xs copyUserToken" @click="copyUserToken()" >@{{ user.name }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<QBtn
|
<QBtn
|
||||||
id="logout"
|
id="logout"
|
||||||
|
@ -143,4 +148,10 @@ function logout() {
|
||||||
.panel {
|
.panel {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copyUserToken {
|
||||||
|
&:hover{
|
||||||
|
cursor: alias;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -17,9 +17,9 @@ a {
|
||||||
// Removes chrome autofill background
|
// Removes chrome autofill background
|
||||||
input:-webkit-autofill,
|
input:-webkit-autofill,
|
||||||
select:-webkit-autofill {
|
select:-webkit-autofill {
|
||||||
color: $input-text-color !important;
|
color: var(--vn-text) ;
|
||||||
font-family: $typography-font-family;
|
font-family: $typography-font-family;
|
||||||
-webkit-text-fill-color: $input-text-color !important;
|
-webkit-text-fill-color: var(--vn-text) ;
|
||||||
-webkit-background-clip: text !important;
|
-webkit-background-clip: text !important;
|
||||||
background-clip: text !important;
|
background-clip: text !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,7 +203,7 @@ function getLink(param) {
|
||||||
@on-fetch="(data) => setData(data)"
|
@on-fetch="(data) => setData(data)"
|
||||||
>
|
>
|
||||||
<template #header="{ entity: invoiceIn }">
|
<template #header="{ entity: invoiceIn }">
|
||||||
<div>{{ invoiceIn.id }} - {{ invoiceIn.supplier.name }}</div>
|
<div>{{ invoiceIn.id }} - {{ invoiceIn.supplier?.name }}</div>
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: invoiceIn }">
|
<template #body="{ entity: invoiceIn }">
|
||||||
<!--Basic Data-->
|
<!--Basic Data-->
|
||||||
|
@ -216,7 +216,7 @@ function getLink(param) {
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.supplier')"
|
:label="t('invoiceIn.summary.supplier')"
|
||||||
:value="invoiceIn.supplier.name"
|
:value="invoiceIn.supplier?.name"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.supplierRef')"
|
:label="t('invoiceIn.summary.supplierRef')"
|
||||||
|
@ -224,7 +224,7 @@ function getLink(param) {
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.currency')"
|
:label="t('invoiceIn.summary.currency')"
|
||||||
:value="invoiceIn.currency.code"
|
:value="invoiceIn.currency?.code"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.docNumber')"
|
:label="t('invoiceIn.summary.docNumber')"
|
||||||
|
@ -265,7 +265,7 @@ function getLink(param) {
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.sage')"
|
:label="t('invoiceIn.summary.sage')"
|
||||||
:value="invoiceIn.sageWithholding.withholding"
|
:value="invoiceIn.sageWithholding?.withholding"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.vat')"
|
:label="t('invoiceIn.summary.vat')"
|
||||||
|
@ -273,7 +273,7 @@ function getLink(param) {
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.company')"
|
:label="t('invoiceIn.summary.company')"
|
||||||
:value="invoiceIn.company.code"
|
:value="invoiceIn.company?.code"
|
||||||
/>
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('invoiceIn.summary.booked')"
|
:label="t('invoiceIn.summary.booked')"
|
||||||
|
|
|
@ -174,7 +174,23 @@ const columns = ref([
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const downloadCSV = async () => {
|
const downloadCSV = async () => {
|
||||||
await invoiceOutGlobalStore.getNegativeBasesCsv(dateRange.from, dateRange.to);
|
const params = filter.value;
|
||||||
|
|
||||||
|
const filterParams = {
|
||||||
|
limit: 20,
|
||||||
|
where: {
|
||||||
|
and: [],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
for (const param in params) {
|
||||||
|
if (params[param]) filterParams.where.and.push({ [param]: params[param] });
|
||||||
|
}
|
||||||
|
|
||||||
|
await invoiceOutGlobalStore.getNegativeBasesCsv(
|
||||||
|
dateRange.from,
|
||||||
|
dateRange.to,
|
||||||
|
JSON.stringify(filterParams)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const search = async () => {
|
const search = async () => {
|
||||||
|
@ -187,13 +203,13 @@ const search = async () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const searchFilter = {
|
const searchFilter = {
|
||||||
limit: 20
|
limit: 20,
|
||||||
}
|
};
|
||||||
|
|
||||||
if (and.length) {
|
if (and.length) {
|
||||||
searchFilter.where = {
|
searchFilter.where = {
|
||||||
and
|
and,
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const params = {
|
const params = {
|
||||||
|
@ -230,9 +246,7 @@ const selectWorkerId = (id) => {
|
||||||
selectedWorkerId.value = id;
|
selectedWorkerId.value = id;
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(() => refresh());
|
||||||
refresh();
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -219,9 +219,9 @@ export const useInvoiceOutGlobalStore = defineStore({
|
||||||
throw err;
|
throw err;
|
||||||
},
|
},
|
||||||
|
|
||||||
async getNegativeBasesCsv(from, to) {
|
async getNegativeBasesCsv(from, to, filter = {}) {
|
||||||
try {
|
try {
|
||||||
const params = { from: from, to: to };
|
const params = { from: from, to: to, filter };
|
||||||
const CSVResponse = await invoiceOutService.getNegativeBasesCsv(params);
|
const CSVResponse = await invoiceOutService.getNegativeBasesCsv(params);
|
||||||
|
|
||||||
if (CSVResponse.data && CSVResponse.data.error) throw new Error();
|
if (CSVResponse.data && CSVResponse.data.error) throw new Error();
|
||||||
|
|
Loading…
Reference in New Issue