This commit is contained in:
William Buezas 2024-06-26 08:36:17 -03:00
parent 17e9d95702
commit cd01ba8fe1
1 changed files with 61 additions and 58 deletions

View File

@ -40,63 +40,66 @@ watch(
auto-load auto-load
url="ObservationTypes" url="ObservationTypes"
/> />
<CrudModel <div class="flex justify-center">
ref="ticketNotesCrudRef" <CrudModel
data-key="TicketNotes" ref="ticketNotesCrudRef"
url="TicketObservations" data-key="TicketNotes"
model="TicketNotes" url="TicketObservations"
:filter="crudModelFilter" model="TicketNotes"
:data-required="crudModelRequiredData" :filter="crudModelFilter"
:default-remove="false" :data-required="crudModelRequiredData"
auto-load :default-remove="false"
> auto-load
<template #body="{ rows }"> style="max-width: 800px"
<QCard class="q-px-lg q-py-md"> >
<div <template #body="{ rows }">
v-for="(row, index) in rows" <QCard class="q-px-lg q-py-md">
:key="index" <div
class="q-mb-md row items-center q-gutter-x-md" v-for="(row, index) in rows"
> :key="index"
<VnSelect class="q-mb-md row items-center q-gutter-x-md"
:label="t('ticketNotes.observationType')"
:options="observationTypes"
hide-selected
option-label="description"
option-value="id"
v-model="row.observationTypeFk"
:disable="!!row.id"
/>
<VnInput
:label="t('ticketNotes.description')"
v-model="row.description"
class="col"
/>
<QIcon
name="delete"
size="sm"
class="cursor-pointer"
color="primary"
@click="ticketNotesCrudRef.remove([row])"
> >
<QTooltip> <VnSelect
{{ t('ticketNotes.removeNote') }} :label="t('ticketNotes.observationType')"
</QTooltip> :options="observationTypes"
</QIcon> hide-selected
</div> option-label="description"
<VnRow v-if="observationTypes.length > rows.length"> option-value="id"
<QIcon v-model="row.observationTypeFk"
name="add_circle" :disable="!!row.id"
class="fill-icon-on-hover q-ml-md" />
size="sm" <VnInput
color="primary" :label="t('ticketNotes.description')"
@click="ticketNotesCrudRef.insert()" v-model="row.description"
> class="col"
<QTooltip> />
{{ t('ticketNotes.addNote') }} <QIcon
</QTooltip> name="delete"
</QIcon> size="sm"
</VnRow> class="cursor-pointer"
</QCard> color="primary"
</template> @click="ticketNotesCrudRef.remove([row])"
</CrudModel> >
<QTooltip>
{{ t('ticketNotes.removeNote') }}
</QTooltip>
</QIcon>
</div>
<VnRow v-if="observationTypes.length > rows.length">
<QIcon
name="add_circle"
class="fill-icon-on-hover q-ml-md"
size="sm"
color="primary"
@click="ticketNotesCrudRef.insert()"
>
<QTooltip>
{{ t('ticketNotes.addNote') }}
</QTooltip>
</QIcon>
</VnRow>
</QCard>
</template>
</CrudModel>
</div>
</template> </template>