Solucion a comentarios
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
carlosfonseca 2024-02-22 05:57:28 -05:00
parent 980904a382
commit d9a1d62c74
2 changed files with 83 additions and 70 deletions

View File

@ -85,39 +85,45 @@ const toCustomerCreditCreate = () => {
url="ClientCredits" url="ClientCredits"
/> />
<QPage class="column items-center q-pa-md"> <div class="full-width flex justify-center">
<QTable <QCard class="card-width q-pa-lg">
:columns="columns" <QTable
:pagination="{ rowsPerPage: 12 }" :columns="columns"
:rows="rows" :pagination="{ rowsPerPage: 12 }"
class="full-width q-mt-md" :rows="rows"
row-key="id" class="full-width q-mt-md"
v-if="rows?.length" row-key="id"
> v-if="rows?.length"
<template #body-cell="props"> >
<QTd :props="props"> <template #body-cell="props">
<QTr :props="props" class="cursor-pointer"> <QTd :props="props">
<component <QTr :props="props" class="cursor-pointer">
:is="tableColumnComponents[props.col.name].component" <component
@click="tableColumnComponents[props.col.name].event(props)" :is="tableColumnComponents[props.col.name].component"
class="rounded-borders q-pa-sm" @click="
v-bind="tableColumnComponents[props.col.name].props(props)" tableColumnComponents[props.col.name].event(props)
> "
{{ props.value }} class="rounded-borders q-pa-sm"
<WorkerDescriptorProxy v-bind="
:id="props.row.workerFk" tableColumnComponents[props.col.name].props(props)
v-if="props.col.name === 'employee'" "
/> >
</component> {{ props.value }}
</QTr> <WorkerDescriptorProxy
</QTd> :id="props.row.workerFk"
</template> v-if="props.col.name === 'employee'"
</QTable> />
</component>
</QTr>
</QTd>
</template>
</QTable>
<h5 class="flex justify-center color-vn-label" v-else> <h5 class="flex justify-center color-vn-label" v-else>
{{ t('globals.noResults') }} {{ t('globals.noResults') }}
</h5> </h5>
</QPage> </QCard>
</div>
<QPageSticky :offset="[18, 18]"> <QPageSticky :offset="[18, 18]">
<QBtn @click.stop="toCustomerCreditCreate()" color="primary" fab icon="add" /> <QBtn @click.stop="toCustomerCreditCreate()" color="primary" fab icon="add" />

View File

@ -23,45 +23,52 @@ const toCustomerNoteCreate = () => {
</script> </script>
<template> <template>
<QCard class="q-pa-lg"> <div class="full-width flex justify-center">
<VnPaginate <QCard class="card-width q-pa-lg">
data-key="CustomerNotes" <VnPaginate
:url="'clientObservations'" data-key="CustomerNotes"
auto-load :url="'clientObservations'"
:filter="noteFilter" auto-load
> :filter="noteFilter"
<template #body="{ rows }"> >
<div v-if="rows.length"> <template #body="{ rows }">
<QCard <div v-if="rows.length">
v-for="(item, index) in rows" <QCard
:key="index" v-for="(item, index) in rows"
:class="{ :key="index"
'q-pa-md': true, :class="{
'q-rounded': true, 'q-pa-md': true,
'custom-border': true, 'q-rounded': true,
'q-mb-md': index < rows.length - 1, 'custom-border': true,
}" 'q-mb-md': index < rows.length - 1,
> }"
<div class="flex justify-between"> >
<p class="color-vn-label">{{ item.worker.user.nickname }}</p> <div class="flex justify-between">
<p class="color-vn-label"> <p class="color-vn-label">
{{ {{ item.worker.user.nickname }}
date.formatDate(item?.created, 'DD-MM-YYYY HH:mm:ss') </p>
}} <p class="color-vn-label">
</p> {{
</div> date.formatDate(
<h6 class="q-mt-xs q-mb-none">{{ item.text }}</h6> item?.created,
</QCard> 'DD-MM-YYYY HH:mm:ss'
</div> )
}}
</p>
</div>
<h6 class="q-mt-xs q-mb-none">{{ item.text }}</h6>
</QCard>
</div>
<div v-else> <div v-else>
<h5 class="flex justify-center color-vn-label"> <h5 class="flex justify-center color-vn-label">
{{ t('globals.noResults') }} {{ t('globals.noResults') }}
</h5> </h5>
</div> </div>
</template> </template>
</VnPaginate> </VnPaginate>
</QCard> </QCard>
</div>
<QPageSticky :offset="[18, 18]"> <QPageSticky :offset="[18, 18]">
<QBtn @click.stop="toCustomerNoteCreate()" color="primary" fab icon="add" /> <QBtn @click.stop="toCustomerNoteCreate()" color="primary" fab icon="add" />