forked from verdnatura/salix-front
Merge branch 'master' of https://gitea.verdnatura.es/verdnatura/salix-front into test
This commit is contained in:
commit
dcedc314f7
|
@ -62,7 +62,7 @@ async function getData() {
|
|||
filter: $props.filter,
|
||||
skip: 0,
|
||||
});
|
||||
const { data } = await arrayData.fetch({ append: false });
|
||||
const { data } = await arrayData.fetch({ append: false, updateRouter: false });
|
||||
entity.value = data;
|
||||
emit('onFetch', data);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export function useArrayData(key, userOptions) {
|
|||
}
|
||||
}
|
||||
|
||||
async function fetch({ append = false }) {
|
||||
async function fetch({ append = false, updateRouter = true }) {
|
||||
if (!store.url) return;
|
||||
|
||||
cancelRequest();
|
||||
|
@ -100,15 +100,12 @@ export function useArrayData(key, userOptions) {
|
|||
|
||||
hasMoreData.value = response.data.length === limit;
|
||||
|
||||
if (append === true) {
|
||||
if (append) {
|
||||
if (!store.data) store.data = [];
|
||||
for (const row of response.data) store.data.push(row);
|
||||
}
|
||||
|
||||
if (append === false) {
|
||||
} else {
|
||||
store.data = response.data;
|
||||
|
||||
updateStateParams();
|
||||
updateRouter && updateStateParams();
|
||||
}
|
||||
|
||||
store.isLoading = false;
|
||||
|
@ -155,7 +152,9 @@ export function useArrayData(key, userOptions) {
|
|||
delete store.userParams[param];
|
||||
delete params[param];
|
||||
if (store.filter?.where) {
|
||||
delete store.filter.where[Object.keys(exprBuilder ? exprBuilder(param) : param)[0]];
|
||||
delete store.filter.where[
|
||||
Object.keys(exprBuilder ? exprBuilder(param) : param)[0]
|
||||
];
|
||||
if (Object.keys(store.filter.where).length === 0) {
|
||||
delete store.filter.where;
|
||||
}
|
||||
|
|
|
@ -282,6 +282,8 @@ async function importToNewRefundTicket() {
|
|||
selection="multiple"
|
||||
v-model:selected="selectedRows"
|
||||
:grid="$q.screen.lt.md"
|
||||
:pagination="{ rowsPerPage: 0 }"
|
||||
:hide-bottom="true"
|
||||
>
|
||||
<template #body-cell-ticket="{ value }">
|
||||
<QTd align="center">
|
||||
|
@ -335,7 +337,23 @@ async function importToNewRefundTicket() {
|
|||
</QItemSection>
|
||||
<QItemSection side>
|
||||
<QItemLabel v-if="column.name === 'destination'">
|
||||
{{ column.value.description }}
|
||||
<VnSelectFilter
|
||||
v-model="props.row.claimDestinationFk"
|
||||
:options="destinationTypes"
|
||||
option-label="description"
|
||||
option-value="id"
|
||||
:autofocus="true"
|
||||
dense
|
||||
input-debounce="0"
|
||||
hide-selected
|
||||
@update:model-value="
|
||||
(value) =>
|
||||
updateDestination(
|
||||
value,
|
||||
props.row
|
||||
)
|
||||
"
|
||||
/>
|
||||
</QItemLabel>
|
||||
<QItemLabel v-else>
|
||||
{{ column.value }}
|
||||
|
@ -417,25 +435,6 @@ async function importToNewRefundTicket() {
|
|||
</QCardActions>
|
||||
</QCard>
|
||||
</QDialog>
|
||||
<!-- <QDialog v-model="dialogGreuge">
|
||||
<QCardSection>
|
||||
<QItem class="q-pa-sm">
|
||||
<span class="q-pa-sm q-dialog__title text-white">
|
||||
{{ t('dialogGreuge title') }}
|
||||
</span>
|
||||
<QBtn class="q-pa-sm" icon="close" flat round dense v-close-popup />
|
||||
</QItem>
|
||||
<QCardActions class="justify-end q-mr-sm">
|
||||
<QBtn flat :label="t('globals.close')" color="primary" v-close-popup />
|
||||
<QBtn
|
||||
:label="t('globals.save')"
|
||||
color="primary"
|
||||
v-close-popup
|
||||
@click="onUpdateGreugeAccept"
|
||||
/>
|
||||
</QCardActions>
|
||||
</QCardSection>
|
||||
</QDialog> -->
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.slider-container {
|
||||
|
|
|
@ -54,6 +54,7 @@ const columns = computed(() => [
|
|||
optionValue: 'id',
|
||||
optionLabel: 'description',
|
||||
tabIndex: 1,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'claimResult',
|
||||
|
@ -66,6 +67,7 @@ const columns = computed(() => [
|
|||
optionValue: 'id',
|
||||
optionLabel: 'description',
|
||||
tabIndex: 2,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'claimResponsible',
|
||||
|
@ -78,6 +80,7 @@ const columns = computed(() => [
|
|||
optionValue: 'id',
|
||||
optionLabel: 'description',
|
||||
tabIndex: 3,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'worker',
|
||||
|
@ -89,6 +92,7 @@ const columns = computed(() => [
|
|||
optionValue: 'id',
|
||||
optionLabel: 'nickname',
|
||||
tabIndex: 4,
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'claimRedelivery',
|
||||
|
@ -101,6 +105,7 @@ const columns = computed(() => [
|
|||
optionValue: 'id',
|
||||
optionLabel: 'description',
|
||||
tabIndex: 5,
|
||||
align: 'left',
|
||||
},
|
||||
]);
|
||||
</script>
|
||||
|
@ -158,6 +163,7 @@ const columns = computed(() => [
|
|||
hide-pagination
|
||||
v-model:selected="selected"
|
||||
:grid="$q.screen.lt.md"
|
||||
table-header-class="text-left"
|
||||
>
|
||||
<template #body-cell="{ row, col }">
|
||||
<QTd
|
||||
|
@ -165,7 +171,6 @@ const columns = computed(() => [
|
|||
@keyup.ctrl.enter.stop="claimDevelopmentForm.saveChanges()"
|
||||
>
|
||||
<VnSelectFilter
|
||||
:label="col.label"
|
||||
v-model="row[col.model]"
|
||||
:options="col.options"
|
||||
:option-value="col.optionValue"
|
||||
|
|
|
@ -132,7 +132,7 @@ const developmentColumns = ref([
|
|||
{
|
||||
name: 'worker',
|
||||
label: 'claim.summary.worker',
|
||||
field: (row) => row.worker.user.nickname,
|
||||
field: (row) => row.worker?.user.nickname,
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue