7658-devToTest_2428 #508

Merged
alexm merged 392 commits from 7658-devToTest_2428 into test 2024-07-02 10:38:20 +00:00
2 changed files with 222 additions and 211 deletions
Showing only changes of commit 6120c98580 - Show all commits

View File

@ -211,9 +211,10 @@ defineExpose({
</VnFilterPanel> </VnFilterPanel>
</QScrollArea> </QScrollArea>
</QDrawer> </QDrawer>
<!-- class in div to fix warn-->
<div class="q-px-md">
<CrudModel <CrudModel
v-bind="$attrs" v-bind="$attrs"
class="q-px-md"
:limit="20" :limit="20"
ref="CrudModelRef" ref="CrudModelRef"
:search-url="searchUrl" :search-url="searchUrl"
@ -222,11 +223,10 @@ defineExpose({
> >
<template #body="{ rows }"> <template #body="{ rows }">
<QTable <QTable
v-bind="$attrs"
class="vnTable" class="vnTable"
:columns="splittedColumns.columns" :columns="splittedColumns.columns"
:rows="rows" :rows="rows"
row-key="id"
selection="multiple"
v-model:selected="selected" v-model:selected="selected"
:grid="mode != 'table'" :grid="mode != 'table'"
table-header-class="bg-header" table-header-class="bg-header"
@ -268,7 +268,11 @@ defineExpose({
/> />
</template> </template>
<template #header-cell="{ col }"> <template #header-cell="{ col }">
<QTh auto-width style="min-width: 100px" v-if="$props.columnSearch"> <QTh
auto-width
style="min-width: 100px"
v-if="$props.columnSearch"
>
<VnTableFilter <VnTableFilter
:column="col" :column="col"
:show-title="true" :show-title="true"
@ -283,7 +287,10 @@ defineExpose({
</template> </template>
<template #body-cell-tableStatus="{ col, row }"> <template #body-cell-tableStatus="{ col, row }">
<QTd auto-width :class="`text-${col.align ?? 'left'}`"> <QTd auto-width :class="`text-${col.align ?? 'left'}`">
<VnTableChip :columns="splittedColumns.columnChips" :row="row"> <VnTableChip
:columns="splittedColumns.columnChips"
:row="row"
>
<template #afterChip> <template #afterChip>
<slot name="afterChip" :row="row"></slot> <slot name="afterChip" :row="row"></slot>
</template> </template>
@ -321,7 +328,9 @@ defineExpose({
class="q-px-sm" class="q-px-sm"
flat flat
:class=" :class="
btn.isPrimary ? 'text-primary-light' : 'color-vn-text ' btn.isPrimary
? 'text-primary-light'
: 'color-vn-text '
" "
@click="btn.action(row)" @click="btn.action(row)"
/> />
@ -393,7 +402,9 @@ defineExpose({
> >
<template #value> <template #value>
<span <span
@click="stopEventPropagation($event)" @click="
stopEventPropagation($event)
"
> >
<VnTableColumn <VnTableColumn
:column="col" :column="col"
@ -437,6 +448,7 @@ defineExpose({
</QTable> </QTable>
</template> </template>
</CrudModel> </CrudModel>
</div>
<QPageSticky v-if="create" :offset="[20, 20]" style="z-index: 2"> <QPageSticky v-if="create" :offset="[20, 20]" style="z-index: 2">
<QBtn @click="showForm = !showForm" color="primary" fab icon="add" /> <QBtn @click="showForm = !showForm" color="primary" fab icon="add" />
<QTooltip> <QTooltip>
@ -445,7 +457,7 @@ defineExpose({
</QPageSticky> </QPageSticky>
<QDialog v-model="showForm" transition-show="scale" transition-hide="scale"> <QDialog v-model="showForm" transition-show="scale" transition-hide="scale">
<FormModelPopup <FormModelPopup
v-bind="{ ...$attrs, ...create }" v-bind="create"
:model="$attrs['data-key'] + 'Create'" :model="$attrs['data-key'] + 'Create'"
@on-data-saved="(_, res) => create.onDataSaved(res)" @on-data-saved="(_, res) => create.onDataSaved(res)"
> >

View File

@ -382,7 +382,6 @@ function handleLocation(data, location) {
ref="tableRef" ref="tableRef"
data-key="CustomerExtendedList" data-key="CustomerExtendedList"
url="Clients/extendedListFilter" url="Clients/extendedListFilter"
url-create="Clients/createWithUser"
:create="{ :create="{
urlCreate: 'Clients/createWithUser', urlCreate: 'Clients/createWithUser',
title: 'Create client', title: 'Create client',