This commit is contained in:
parent
cddef039d6
commit
da24b4d836
|
@ -29,13 +29,6 @@ const { validate } = useValidator();
|
||||||
const quasar = useQuasar();
|
const quasar = useQuasar();
|
||||||
const session = useSession();
|
const session = useSession();
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
|
||||||
onMounted(async () => {
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
allColumnNames.value = columns.value.map((col) => col.name);
|
|
||||||
await arrayData.fetch({ append: false });
|
|
||||||
});
|
|
||||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
|
||||||
|
|
||||||
const selectedRows = ref([]);
|
const selectedRows = ref([]);
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -46,7 +39,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnInput,
|
component: 'VnInput',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -62,7 +55,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnSelectFilter,
|
component: 'VnSelectFilter',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -81,7 +74,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnSelectFilter,
|
component: 'VnSelectFilter',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -100,7 +93,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnSelectFilter,
|
component: 'VnSelectFilter',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -119,7 +112,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnInputDate,
|
component: 'VnInputDate',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -139,7 +132,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnInput,
|
component: 'VnInput',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -152,7 +145,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnInputTime,
|
component: 'VnInputTime',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -165,7 +158,7 @@ const columns = computed(() => [
|
||||||
sortable: true,
|
sortable: true,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
columnFilter: {
|
columnFilter: {
|
||||||
component: VnInputDate,
|
component: 'VnInputDate',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
filterValue: null,
|
filterValue: null,
|
||||||
event: getInputEvents,
|
event: getInputEvents,
|
||||||
|
@ -197,9 +190,6 @@ const updateRoute = async (route) => {
|
||||||
const allColumnNames = ref([]);
|
const allColumnNames = ref([]);
|
||||||
const confirmationDialog = ref(false);
|
const confirmationDialog = ref(false);
|
||||||
const startingDate = ref(null);
|
const startingDate = ref(null);
|
||||||
const store = arrayData.store;
|
|
||||||
const rows = computed(() => store.data);
|
|
||||||
const rowsSelected = ref([]);
|
|
||||||
|
|
||||||
const getInputEvents = (col) => {
|
const getInputEvents = (col) => {
|
||||||
return col.columnFilter.type === 'select'
|
return col.columnFilter.type === 'select'
|
||||||
|
@ -267,6 +257,14 @@ const openTicketsDialog = (id) => {
|
||||||
})
|
})
|
||||||
.onOk(() => refreshKey.value++);
|
.onOk(() => refreshKey.value++);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
allColumnNames.value = columns.value.map((col) => col.name);
|
||||||
|
console.log('les columnes', allColumnNames.value);
|
||||||
|
await arrayData.fetch({ append: false });
|
||||||
|
});
|
||||||
|
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -330,6 +328,7 @@ const openTicketsDialog = (id) => {
|
||||||
class="LeftIcon"
|
class="LeftIcon"
|
||||||
:all-columns="allColumnNames"
|
:all-columns="allColumnNames"
|
||||||
table-code="routesList"
|
table-code="routesList"
|
||||||
|
labels-traductions-path="route.list"
|
||||||
@on-config-saved="visibleColumns = [...$event]"
|
@on-config-saved="visibleColumns = [...$event]"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
@ -386,6 +385,25 @@ const openTicketsDialog = (id) => {
|
||||||
hide-pagination
|
hide-pagination
|
||||||
:no-data-label="t('globals.noResults')"
|
:no-data-label="t('globals.noResults')"
|
||||||
>
|
>
|
||||||
|
<template #top-row="{ cols }">
|
||||||
|
<QTr>
|
||||||
|
<QTd />
|
||||||
|
<QTd
|
||||||
|
v-for="(col, index) in cols"
|
||||||
|
:key="index"
|
||||||
|
style="max-width: 100px"
|
||||||
|
>
|
||||||
|
<component
|
||||||
|
:is="col.columnFilter.component"
|
||||||
|
v-if="col.name !== 'picture'"
|
||||||
|
v-model="col.columnFilter.filterValue"
|
||||||
|
v-bind="col.columnFilter.attrs"
|
||||||
|
v-on="col.columnFilter.event(col)"
|
||||||
|
dense
|
||||||
|
/>
|
||||||
|
</QTd>
|
||||||
|
</QTr>
|
||||||
|
</template>
|
||||||
<template #body-cell-worker="{ row }">
|
<template #body-cell-worker="{ row }">
|
||||||
<QTd>
|
<QTd>
|
||||||
<VnSelectFilter
|
<VnSelectFilter
|
||||||
|
|
Loading…
Reference in New Issue