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(); 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>

View File

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

View File

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

View File

@ -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();