0
0
Fork 0

Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 5835-fixListAndSummary

This commit is contained in:
Jorge Penadés 2024-01-02 12:48:03 +01:00
commit 34e71c1900
4 changed files with 38 additions and 13 deletions

View File

@ -81,6 +81,10 @@ function logout() {
session.destroy();
router.push('/login');
}
function copyUserToken(){
navigator.clipboard.writeText(session.getToken());
}
</script>
<template>
@ -122,7 +126,8 @@ function logout() {
<div class="text-subtitle1 q-mt-md">
<strong>{{ user.nickname }}</strong>
</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
id="logout"
@ -143,4 +148,10 @@ function logout() {
.panel {
width: 150px;
}
.copyUserToken {
&:hover{
cursor: alias;
}
}
</style>

View File

@ -17,9 +17,9 @@ a {
// Removes chrome autofill background
input:-webkit-autofill,
select:-webkit-autofill {
color: $input-text-color !important;
color: var(--vn-text) ;
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;
background-clip: text !important;
}

View File

@ -174,7 +174,23 @@ const columns = ref([
]);
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 () => {
@ -187,13 +203,13 @@ const search = async () => {
}
});
const searchFilter = {
limit: 20
}
limit: 20,
};
if (and.length) {
searchFilter.where = {
and
}
and,
};
}
const params = {
@ -230,9 +246,7 @@ const selectWorkerId = (id) => {
selectedWorkerId.value = id;
};
onMounted(async () => {
refresh();
});
onMounted(() => refresh());
</script>
<template>

View File

@ -219,9 +219,9 @@ export const useInvoiceOutGlobalStore = defineStore({
throw err;
},
async getNegativeBasesCsv(from, to) {
async getNegativeBasesCsv(from, to, filter = {}) {
try {
const params = { from: from, to: to };
const params = { from: from, to: to, filter };
const CSVResponse = await invoiceOutService.getNegativeBasesCsv(params);
if (CSVResponse.data && CSVResponse.data.error) throw new Error();