7336_devToTest #354

Merged
alexm merged 359 commits from 7336_devToTest into test 2024-05-07 06:34:00 +00:00
1 changed files with 129 additions and 156 deletions
Showing only changes of commit c9ab98471e - Show all commits

View File

@ -20,6 +20,7 @@ const { t } = useI18n();
const stateStore = useStateStore(); const stateStore = useStateStore();
const arrayData = useArrayData('ClaimLines'); const arrayData = useArrayData('ClaimLines');
const store = arrayData.store; const store = arrayData.store;
const claimFilter = { const claimFilter = {
fields: ['ticketFk'], fields: ['ticketFk'],
}; };
@ -179,8 +180,7 @@ function saveWhenHasChanges() {
@on-fetch="onFetchClaim" @on-fetch="onFetchClaim"
auto-load auto-load
/> />
<div class="column items-center"> <div class="q-pa-md">
<div class="list">
<CrudModel <CrudModel
data-key="ClaimLines" data-key="ClaimLines"
ref="claimLinesForm" ref="claimLinesForm"
@ -193,39 +193,27 @@ function saveWhenHasChanges() {
:default-save="false" :default-save="false"
:default-reset="false" :default-reset="false"
auto-load auto-load
:limit="0"
> >
<template #body="{ rows }"> <template #body="{ rows }">
<QTable <QTable
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
:dense="$q.screen.lt.md" :dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
row-key="id" row-key="id"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"
hide-pagination
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
> >
<template #body-cell-claimed="{ row, value }"> <template #body-cell-claimed="{ row }">
<QTd auto-width align="right" class="text-primary"> <QTd auto-width align="right" class="text-primary">
<span>{{ value }}</span>
<QPopupEdit
v-model="row.quantity"
v-slot="scope"
:title="t('Claimed quantity')"
@update:model-value="updateQuantity(row)"
buttons
>
<QInput <QInput
v-model="scope.value" v-model="row.quantity"
type="number" type="number"
dense dense
autofocus @keyup.enter="saveWhenHasChanges()"
@keyup.enter="scope.set" @blur="saveWhenHasChanges()"
@focus="($event) => $event.target.select()"
/> />
</QPopupEdit>
</QTd> </QTd>
</template> </template>
<template #body-cell-description="{ row, value }"> <template #body-cell-description="{ row, value }">
@ -272,32 +260,18 @@ function saveWhenHasChanges() {
</QItemLabel> </QItemLabel>
</QItemSection> </QItemSection>
<QItemSection side> <QItemSection side>
<template <template v-if="column.name === 'claimed'">
v-if="column.name === 'claimed'"
>
<QItemLabel class="text-primary"> <QItemLabel class="text-primary">
{{ column.value }}
<QPopupEdit
v-model="props.row.quantity"
v-slot="scope"
:title="t('Claimed quantity')"
@update:model-value="
updateQuantity(props.row)
"
buttons
>
<QInput <QInput
v-model="scope.value" v-model="props.row.quantity"
type="number" type="number"
dense dense
autofocus autofocus
@keyup.enter="scope.set" @keyup.enter="
@focus=" saveWhenHasChanges()
($event) =>
$event.target.select()
" "
@blur="saveWhenHasChanges()"
/> />
</QPopupEdit>
</QItemLabel> </QItemLabel>
</template> </template>
<template <template
@ -336,7 +310,6 @@ function saveWhenHasChanges() {
</template> </template>
</CrudModel> </CrudModel>
</div> </div>
</div>
<QPageSticky position="bottom-right" :offset="[25, 25]"> <QPageSticky position="bottom-right" :offset="[25, 25]">
<QBtn fab color="primary" icon="add" @click="showImportDialog()" /> <QBtn fab color="primary" icon="add" @click="showImportDialog()" />