feat(vnRow): new component vnRow refs #6118
gitea/salix-front/pipeline/head This commit looks good Details

This commit is contained in:
Pablo Natek 2023-10-19 08:45:40 +02:00
parent 081fdcaba5
commit 9dd69dbcb7
6 changed files with 16 additions and 37 deletions

View File

@ -1,11 +0,0 @@
<script setup></script>
<template>
<div class="q-pa-md example-row-equal-width"></div>
</template>
<style lang="scss" scoped>
.formModel {
max-width: 800px;
width: 100%;
}
</style>

View File

@ -41,9 +41,7 @@ async function fetch() {
if ($props.filter) params.filter = JSON.stringify($props.filter); if ($props.filter) params.filter = JSON.stringify($props.filter);
const { data } = await axios.get($props.url, { params }); const { data } = await axios.get($props.url, { params });
console.log(data);
entity.value = data; entity.value = data;
console.log('entity.value: ', entity.value);
emit('onFetch', data); emit('onFetch', data);
} }

View File

@ -1,14 +1,12 @@
<script></script>
<template> <template>
<div id="row"> <div id="row">
<slot></slot> <slot></slot>
</div> </div>
</template> </template>
<style lang="scss"> <style lang="scss" scopped>
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
#row { #row {
flex-direction: column; flex-direction: column;
background-color: blue;
} }
} }
</style> </style>

View File

@ -45,7 +45,6 @@ function setWorkers(data) {
} }
function setClaimStates(data) { function setClaimStates(data) {
console.log(data);
claimStates.value = data; claimStates.value = data;
claimStatesCopy.value = data; claimStatesCopy.value = data;
} }
@ -53,7 +52,6 @@ function setClaimStates(data) {
const workerFilter = { const workerFilter = {
options: workers, options: workers,
filterFn: (options, value) => { filterFn: (options, value) => {
console.log('Filtering workers with value:', value);
const search = value.toLowerCase(); const search = value.toLowerCase();
if (value === '') return workersCopy.value; if (value === '') return workersCopy.value;
@ -73,7 +71,6 @@ const workerFilter = {
const statesFilter = { const statesFilter = {
options: claimStates, options: claimStates,
filterFn: (options, value) => { filterFn: (options, value) => {
console.log('Filtering claim states with value:', value);
const search = value.toLowerCase(); const search = value.toLowerCase();
if (value === '') return claimStatesCopy.value; if (value === '') return claimStatesCopy.value;
@ -141,7 +138,7 @@ const statesFilter = {
</QInput> </QInput>
</div> </div>
</VnRow> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QSelect <QSelect
v-model="data.workerFk" v-model="data.workerFk"
@ -187,8 +184,8 @@ const statesFilter = {
> >
</QSelect> </QSelect>
</div> </div>
</div> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QInput <QInput
v-model.number="data.packages" v-model.number="data.packages"
@ -204,15 +201,15 @@ const statesFilter = {
:rules="validate('claim.rma')" :rules="validate('claim.rma')"
/> />
</div> </div>
</div> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QCheckbox <QCheckbox
v-model="data.hasToPickUp" v-model="data.hasToPickUp"
:label="t('claim.basicData.picked')" :label="t('claim.basicData.picked')"
/> />
</div> </div>
</div> </VnRow>
</template> </template>
</FormModel> </FormModel>
</div> </div>

View File

@ -17,8 +17,6 @@ const $props = defineProps({
default: null, default: null,
}, },
}); });
console.log('Component id:', $props.id);
if ($props.id === undefined) console.log('$props.id: ', $props.id);
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -111,7 +109,6 @@ const setData = (entity) => {
<template #value> <template #value>
<span class="link"> <span class="link">
{{ entity.worker.user.name }} {{ entity.worker.user.name }}
{{ console.log('Worker userFk:', entity.worker.userFk) }}
<WorkerDescriptorProxy :id="entity.worker.userFk" /> <WorkerDescriptorProxy :id="entity.worker.userFk" />
</span> </span>
</template> </template>

View File

@ -6,7 +6,7 @@ import { useI18n } from 'vue-i18n';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import FetchData from 'components/FetchData.vue'; import FetchData from 'components/FetchData.vue';
import FormModel from 'components/FormModel.vue'; import FormModel from 'components/FormModel.vue';
import RowWrapper from 'components/RowWrapper.vue'; import VnRow from 'components/ui/VnRow.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -62,7 +62,7 @@ const filterOptions = {
<div class="column items-center"> <div class="column items-center">
<FormModel :url="`Clients/${route.params.id}`" model="customer"> <FormModel :url="`Clients/${route.params.id}`" model="customer">
<template #form="{ data, validate, filter }"> <template #form="{ data, validate, filter }">
<RowWrapper class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QInput <QInput
v-model="data.socialName" v-model="data.socialName"
@ -84,8 +84,8 @@ const filterOptions = {
:input-debounce="0" :input-debounce="0"
/> />
</div> </div>
</RowWrapper> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QInput <QInput
v-model="data.contact" v-model="data.contact"
@ -103,8 +103,8 @@ const filterOptions = {
clearable clearable
/> />
</div> </div>
</div> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QInput <QInput
v-model="data.phone" v-model="data.phone"
@ -121,8 +121,8 @@ const filterOptions = {
clearable clearable
/> />
</div> </div>
</div> </VnRow>
<div class="row q-gutter-md q-mb-md"> <VnRow class="row q-gutter-md q-mb-md">
<div class="col"> <div class="col">
<QSelect <QSelect
v-model="data.salesPersonFk" v-model="data.salesPersonFk"
@ -163,7 +163,7 @@ const filterOptions = {
:input-debounce="0" :input-debounce="0"
/> />
</div> </div>
</div> </VnRow>
</template> </template>
</FormModel> </FormModel>
</div> </div>