feat: updates TicketTable

This commit is contained in:
Javier Segarra 2024-09-12 08:40:19 +02:00
parent ff918b8a1c
commit d16786d3e1
1 changed files with 31 additions and 19 deletions

View File

@ -13,6 +13,7 @@ import ZoneDescriptorProxy from 'pages/Zone/Card/ZoneDescriptorProxy.vue';
import { useRoute } from 'vue-router';
import VnTable from 'src/components/VnTable/VnTable.vue';
import TicketDescriptorProxy from '../Card/TicketDescriptorProxy.vue';
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
const rowsSelected = ref([]);
const $props = defineProps({
filter: {
@ -133,29 +134,28 @@ const columns = computed(() => [
align: 'left',
format: ({ theoreticalhour }) => toHour(theoreticalhour),
sortable: true,
columnFilter: {
component: 'time',
columnClass: 'shrink',
},
component: 'time',
columnClass: 'shrink',
attrs: { ON: { blur: (data) => console.error(data) } },
columnFilter: {},
},
{
name: 'alertLevelCode',
label: t('negative.detail.state'),
field: 'code',
label: t('negative.detail.stadte'),
align: 'left',
sortable: true,
// columnFilter: {
columnField: {
component: null,
},
columnFilter: {
component: 'select',
attrs: {
url: 'AlertLevels',
fields: ['id', 'code'],
'sort-by': 'code ASC',
event: console.error,
// event: console.error,
options: editableStates.value,
'option-value': 'id',
'option-label': 'code',
dense: true,
'option-label': 'name',
// },
},
},
},
@ -179,11 +179,16 @@ const columns = computed(() => [
field: 'quantity',
align: 'left',
sortable: true,
columnFilter: {
component: 'input',
type: 'number',
class: 'expand',
},
component: 'input',
type: 'number',
// attrs: ({ row }) => {
// return {
// workerId: row.workerFk,
// name: row.userName,
// }
// attrs: (props) => ({
// events: getInputEvents(props),
// }),
},
]);
const emit = defineEmits([...useDialogPluginComponent.emits, 'selection', 'close']);
@ -233,6 +238,7 @@ const tableRef = ref(null);
"
auto-load
/>
{{ editableStates }}
<VnTable
ref="tableRef"
:data-key="URL_KEY"
@ -258,6 +264,12 @@ const tableRef = ref(null);
<template #body="props">
{{ props }}
</template> -->
<template #column-quantity="props">
<VnInputNumber
v-model.number="props.row.quantity"
v-on="getInputEvents(props)"
></VnInputNumber>
</template>
<template #column-status="{ row }">
<QTd style="width: 150px">
<QIcon