perf: minor comments
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
parent
31abd8b4c5
commit
b3391ab522
|
@ -346,10 +346,9 @@ defineExpose({
|
||||||
</QScrollArea>
|
</QScrollArea>
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<!-- class in div to fix warn-->
|
<!-- class in div to fix warn-->
|
||||||
<div class="q-px-md">
|
|
||||||
<CrudModel
|
<CrudModel
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:class="$attrs['class'] ?? 'q-px-md'"
|
:class="$attrs['class']"
|
||||||
:limit="$attrs['limit'] ?? 20"
|
:limit="$attrs['limit'] ?? 20"
|
||||||
ref="CrudModelRef"
|
ref="CrudModelRef"
|
||||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||||
|
@ -361,11 +360,7 @@ defineExpose({
|
||||||
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
||||||
:auto-load="hasParams || $attrs['auto-load']"
|
:auto-load="hasParams || $attrs['auto-load']"
|
||||||
>
|
>
|
||||||
<template
|
<template v-for="(_, slotName) in $slots" #[slotName]="slotData" :key="slotName">
|
||||||
v-for="(_, slotName) in $slots"
|
|
||||||
#[slotName]="slotData"
|
|
||||||
:key="slotName"
|
|
||||||
>
|
|
||||||
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
<slot :name="slotName" v-bind="slotData ?? {}" :key="slotName" />
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
@ -421,13 +416,8 @@ defineExpose({
|
||||||
:class="`text-${col?.align ?? 'left'}`"
|
:class="`text-${col?.align ?? 'left'}`"
|
||||||
:style="$props.columnSearch ? 'height: 75px' : ''"
|
:style="$props.columnSearch ? 'height: 75px' : ''"
|
||||||
>
|
>
|
||||||
<div
|
<div class="row items-center no-wrap" style="height: 30px">
|
||||||
class="row items-center no-wrap"
|
<QTooltip v-if="col.toolTip">{{ col.toolTip }}</QTooltip>
|
||||||
style="height: 30px"
|
|
||||||
>
|
|
||||||
<QTooltip v-if="col.toolTip">{{
|
|
||||||
col.toolTip
|
|
||||||
}}</QTooltip>
|
|
||||||
<VnTableOrder
|
<VnTableOrder
|
||||||
v-model="orders[col.orderBy ?? col.name]"
|
v-model="orders[col.orderBy ?? col.name]"
|
||||||
:name="col.orderBy ?? col.name"
|
:name="col.orderBy ?? col.name"
|
||||||
|
@ -453,10 +443,7 @@ defineExpose({
|
||||||
</template>
|
</template>
|
||||||
<template #body-cell-tableStatus="{ col, row }">
|
<template #body-cell-tableStatus="{ col, row }">
|
||||||
<QTd auto-width :class="getColAlign(col)">
|
<QTd auto-width :class="getColAlign(col)">
|
||||||
<VnTableChip
|
<VnTableChip :columns="splittedColumns.columnChips" :row="row">
|
||||||
:columns="splittedColumns.columnChips"
|
|
||||||
:row="row"
|
|
||||||
>
|
|
||||||
<template #afterChip>
|
<template #afterChip>
|
||||||
<slot name="afterChip" :row="row"></slot>
|
<slot name="afterChip" :row="row"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -472,8 +459,7 @@ defineExpose({
|
||||||
v-if="col.visible ?? true"
|
v-if="col.visible ?? true"
|
||||||
@click.ctrl="
|
@click.ctrl="
|
||||||
($event) =>
|
($event) =>
|
||||||
rowCtrlClickFunction &&
|
rowCtrlClickFunction && rowCtrlClickFunction($event, row)
|
||||||
rowCtrlClickFunction($event, row)
|
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
|
@ -507,14 +493,10 @@ defineExpose({
|
||||||
class="q-px-sm"
|
class="q-px-sm"
|
||||||
flat
|
flat
|
||||||
:class="
|
:class="
|
||||||
btn.isPrimary
|
btn.isPrimary ? 'text-primary-light' : 'color-vn-text '
|
||||||
? 'text-primary-light'
|
|
||||||
: 'color-vn-text '
|
|
||||||
"
|
"
|
||||||
:style="`visibility: ${
|
:style="`visibility: ${
|
||||||
(btn.show && btn.show(row)) ?? true
|
(btn.show && btn.show(row)) ?? true ? 'visible' : 'hidden'
|
||||||
? 'visible'
|
|
||||||
: 'hidden'
|
|
||||||
}`"
|
}`"
|
||||||
@click="btn.action(row)"
|
@click="btn.action(row)"
|
||||||
/>
|
/>
|
||||||
|
@ -588,9 +570,7 @@ defineExpose({
|
||||||
>
|
>
|
||||||
<template #value>
|
<template #value>
|
||||||
<span
|
<span
|
||||||
@click="
|
@click="stopEventPropagation($event)"
|
||||||
stopEventPropagation($event)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<slot
|
<slot
|
||||||
:name="`column-${col.name}`"
|
:name="`column-${col.name}`"
|
||||||
|
@ -641,7 +621,6 @@ 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" shortcut="+" />
|
<QBtn @click="showForm = !showForm" color="primary" fab icon="add" shortcut="+" />
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
|
|
@ -86,13 +86,13 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
|
|
||||||
Object.assign(filter, store.userFilter, exprFilter);
|
Object.assign(filter, store.userFilter, exprFilter);
|
||||||
let where;
|
let where;
|
||||||
// ARRAY DATA FALLA AL JUNTAR WHERE'S
|
//FIXME: ARRAY DATA FALLA AL JUNTAR WHERE'S
|
||||||
console.log(
|
// console.log(
|
||||||
'userParams?.filter?.where: ',
|
// 'userParams?.filter?.where: ',
|
||||||
userParams?.filter?.where,
|
// userParams?.filter?.where,
|
||||||
filter?.where,
|
// filter?.where,
|
||||||
store.filter?.where
|
// store.filter?.where
|
||||||
);
|
// );
|
||||||
if ((userParams?.filter?.where, filter?.where || store.filter?.where))
|
if ((userParams?.filter?.where, filter?.where || store.filter?.where))
|
||||||
where = Object.assign(
|
where = Object.assign(
|
||||||
userParams?.filter?.where ?? {},
|
userParams?.filter?.where ?? {},
|
||||||
|
@ -101,9 +101,9 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
|
||||||
);
|
);
|
||||||
Object.assign(filter, store.filter);
|
Object.assign(filter, store.filter);
|
||||||
filter.where = where;
|
filter.where = where;
|
||||||
console.log('where: ', where);
|
// console.log('where: ', where);
|
||||||
const params = { filter };
|
const params = { filter };
|
||||||
console.log('params: ', params);
|
// console.log('params: ', params);
|
||||||
|
|
||||||
delete userParams?.filter;
|
delete userParams?.filter;
|
||||||
Object.assign(params, userParams);
|
Object.assign(params, userParams);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, onBeforeMount, onMounted } from 'vue';
|
import { ref, computed, onBeforeMount } from 'vue';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { toDate } from 'src/filters/index';
|
import { toDate } from 'src/filters/index';
|
||||||
|
@ -90,9 +90,6 @@ const columns = computed(() => [
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
campaignList.value = (await axios('Campaigns/latest')).data;
|
campaignList.value = (await axios('Campaigns/latest')).data;
|
||||||
});
|
});
|
||||||
// onMounted(() => {
|
|
||||||
// showActionBtns.value = handleQueryParams();
|
|
||||||
// });
|
|
||||||
|
|
||||||
function getQueryParams() {
|
function getQueryParams() {
|
||||||
return JSON.parse(route.query.consumption ?? '{}');
|
return JSON.parse(route.query.consumption ?? '{}');
|
||||||
|
|
|
@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
|
||||||
|
|
||||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||||
import ModalCloseContract from 'src/pages/Customer/components/ModalCloseContract.vue';
|
import ModalCloseContract from 'src/pages/Customer/components/ModalCloseContract.vue';
|
||||||
|
@ -73,28 +72,6 @@ const updateData = () => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- <VnTable
|
|
||||||
ref="tableRef"
|
|
||||||
data-key="Greuges"
|
|
||||||
url="Greuges"
|
|
||||||
search-url="greuges"
|
|
||||||
:filter="filter"
|
|
||||||
:order="['shipped DESC', 'amount']"
|
|
||||||
:columns="columns"
|
|
||||||
:right-search="false"
|
|
||||||
:is-editable="false"
|
|
||||||
:use-model="true"
|
|
||||||
:column-search="false"
|
|
||||||
@on-fetch="(data) => setRows(data)"
|
|
||||||
:disable-option="{ card: true }"
|
|
||||||
:create="{
|
|
||||||
urlCreate: `Greuges`,
|
|
||||||
title: t('New greuge'),
|
|
||||||
onDataSaved: () => tableRef.reload(),
|
|
||||||
formInitialData: { shipped: new Date(), clientFk: route.params.id },
|
|
||||||
}"
|
|
||||||
auto-load
|
|
||||||
></VnTable> -->
|
|
||||||
<div class="full-width flex justify-center">
|
<div class="full-width flex justify-center">
|
||||||
<QCard class="card-width q-pa-lg">
|
<QCard class="card-width q-pa-lg">
|
||||||
<VnPaginate
|
<VnPaginate
|
||||||
|
|
|
@ -1,22 +1,17 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
|
|
||||||
import { toCurrency, toDateHourMin } from 'src/filters';
|
import { toCurrency, toDateHourMin } from 'src/filters';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
|
||||||
import FormModel from 'components/FormModel.vue';
|
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
|
||||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
// const rows = ref([]);
|
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
include: [
|
include: [
|
||||||
|
@ -70,15 +65,6 @@ const columns = computed(() => [
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// watch(
|
|
||||||
// () => route.params.id,
|
|
||||||
// (newValue) => {
|
|
||||||
// if (!newValue) return;
|
|
||||||
// filter.where.clientFk = newValue;
|
|
||||||
// clientInformasRef.value?.fetch();
|
|
||||||
// }
|
|
||||||
// );
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
|
@ -61,7 +61,7 @@ const creditWarning = computed(() => {
|
||||||
return tooMuchInsurance || noCreditInsurance ? 'negative' : '';
|
return tooMuchInsurance || noCreditInsurance ? 'negative' : '';
|
||||||
});
|
});
|
||||||
const sumRisk = ({ clientRisks }) => {
|
const sumRisk = ({ clientRisks }) => {
|
||||||
let total = clientRisks.reduce((acc, risk) => acc + risk.amount, 0);
|
let total = clientRisks.reduce((acc, { amount }) => acc + amount, 0);
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
};
|
};
|
||||||
|
@ -153,8 +153,6 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:label="t('customer.summary.isActive')"
|
:label="t('customer.summary.isActive')"
|
||||||
:value="entity.isActive"
|
:value="entity.isActive"
|
||||||
/>
|
/>
|
||||||
<!-- </VnRow>
|
|
||||||
<VnRow> -->
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.verifiedData')"
|
:label="t('customer.summary.verifiedData')"
|
||||||
:value="entity.isTaxDataChecked"
|
:value="entity.isTaxDataChecked"
|
||||||
|
@ -163,8 +161,6 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
:label="t('customer.summary.hasToInvoice')"
|
:label="t('customer.summary.hasToInvoice')"
|
||||||
:value="entity.hasToInvoice"
|
:value="entity.hasToInvoice"
|
||||||
/>
|
/>
|
||||||
<!-- </VnRow>
|
|
||||||
<VnRow> -->
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('customer.summary.notifyByEmail')"
|
:label="t('customer.summary.notifyByEmail')"
|
||||||
:value="entity.isToBeMailed"
|
:value="entity.isToBeMailed"
|
||||||
|
@ -231,7 +227,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.account">
|
<QCard class="vn-one" v-if="entity.account">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="`https://grafana.verdnatura.es/d/adjlxzv5yjt34d/analisis-de-clientes-7c-crm?orgId=1&var-clientFk=${entityId}`"
|
:url="`${grafanaUrl}/d/adjlxzv5yjt34d/analisis-de-clientes-7c-crm?orgId=1&var-clientFk=${entityId}`"
|
||||||
:text="t('customer.summary.businessData')"
|
:text="t('customer.summary.businessData')"
|
||||||
icon="vn:grafana"
|
icon="vn:grafana"
|
||||||
/>
|
/>
|
||||||
|
@ -258,7 +254,7 @@ const sumRisk = ({ clientRisks }) => {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one" v-if="entity.account">
|
<QCard class="vn-one" v-if="entity.account">
|
||||||
<VnTitle
|
<VnTitle
|
||||||
:url="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
:url="`${grafanaUrl}/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
|
||||||
:text="t('customer.summary.payMethodFk')"
|
:text="t('customer.summary.payMethodFk')"
|
||||||
icon="vn:grafana"
|
icon="vn:grafana"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -48,7 +48,6 @@ const toCustomerCreditContracts = () => {
|
||||||
clearable
|
clearable
|
||||||
type="number"
|
type="number"
|
||||||
v-model.number="data.credit"
|
v-model.number="data.credit"
|
||||||
autofocus
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
|
Loading…
Reference in New Issue