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'),
type: 'positive',
});
console.log(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
.dialog({
component: VnConfirm,
@ -282,6 +285,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 +340,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 +438,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 {

View File

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

View File

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