refs #6062 fix(claimAction): pagination. fix(claimDevelopment): alignament. fix(claimSummary): object can be null

This commit is contained in:
Alex Moreno 2024-01-08 11:39:21 +01:00
parent ba0b3f260f
commit 1775ac85e2
3 changed files with 29 additions and 22 deletions

View File

@ -134,7 +134,10 @@ async function regularizeClaim() {
message: t('globals.dataSaved'), message: t('globals.dataSaved'),
type: 'positive', type: 'positive',
}); });
console.log(claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2);
if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) { if (claim.value.responsibility >= Math.ceil(DEFAULT_MAX_RESPONSABILITY) / 2) {
console.log(claimActionsForm.value);
// claimActionsForm.value.$el.blur();
quasar quasar
.dialog({ .dialog({
component: VnConfirm, component: VnConfirm,
@ -282,6 +285,8 @@ async function importToNewRefundTicket() {
selection="multiple" selection="multiple"
v-model:selected="selectedRows" v-model:selected="selectedRows"
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
:hide-bottom="true"
> >
<template #body-cell-ticket="{ value }"> <template #body-cell-ticket="{ value }">
<QTd align="center"> <QTd align="center">
@ -335,7 +340,23 @@ async function importToNewRefundTicket() {
</QItemSection> </QItemSection>
<QItemSection side> <QItemSection side>
<QItemLabel v-if="column.name === 'destination'"> <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>
<QItemLabel v-else> <QItemLabel v-else>
{{ column.value }} {{ column.value }}
@ -417,25 +438,6 @@ async function importToNewRefundTicket() {
</QCardActions> </QCardActions>
</QCard> </QCard>
</QDialog> </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> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.slider-container { .slider-container {

View File

@ -54,6 +54,7 @@ const columns = computed(() => [
optionValue: 'id', optionValue: 'id',
optionLabel: 'description', optionLabel: 'description',
tabIndex: 1, tabIndex: 1,
align: 'left',
}, },
{ {
name: 'claimResult', name: 'claimResult',
@ -66,6 +67,7 @@ const columns = computed(() => [
optionValue: 'id', optionValue: 'id',
optionLabel: 'description', optionLabel: 'description',
tabIndex: 2, tabIndex: 2,
align: 'left',
}, },
{ {
name: 'claimResponsible', name: 'claimResponsible',
@ -78,6 +80,7 @@ const columns = computed(() => [
optionValue: 'id', optionValue: 'id',
optionLabel: 'description', optionLabel: 'description',
tabIndex: 3, tabIndex: 3,
align: 'left',
}, },
{ {
name: 'worker', name: 'worker',
@ -89,6 +92,7 @@ const columns = computed(() => [
optionValue: 'id', optionValue: 'id',
optionLabel: 'nickname', optionLabel: 'nickname',
tabIndex: 4, tabIndex: 4,
align: 'left',
}, },
{ {
name: 'claimRedelivery', name: 'claimRedelivery',
@ -101,6 +105,7 @@ const columns = computed(() => [
optionValue: 'id', optionValue: 'id',
optionLabel: 'description', optionLabel: 'description',
tabIndex: 5, tabIndex: 5,
align: 'left',
}, },
]); ]);
</script> </script>
@ -158,6 +163,7 @@ const columns = computed(() => [
hide-pagination hide-pagination
v-model:selected="selected" v-model:selected="selected"
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
table-header-class="text-left"
> >
<template #body-cell="{ row, col }"> <template #body-cell="{ row, col }">
<QTd <QTd
@ -165,7 +171,6 @@ const columns = computed(() => [
@keyup.ctrl.enter.stop="claimDevelopmentForm.saveChanges()" @keyup.ctrl.enter.stop="claimDevelopmentForm.saveChanges()"
> >
<VnSelectFilter <VnSelectFilter
:label="col.label"
v-model="row[col.model]" v-model="row[col.model]"
:options="col.options" :options="col.options"
:option-value="col.optionValue" :option-value="col.optionValue"

View File

@ -118,7 +118,7 @@ const developmentColumns = ref([
{ {
name: 'worker', name: 'worker',
label: 'claim.summary.worker', label: 'claim.summary.worker',
field: (row) => row.worker.user.nickname, field: (row) => row.worker?.user.nickname,
sortable: true, sortable: true,
}, },
{ {