0
0
Fork 0
This commit is contained in:
William Buezas 2024-01-22 12:12:14 -03:00
commit 29dac7c372
4 changed files with 22 additions and 33 deletions

View File

@ -91,7 +91,7 @@ const toCustomerConsigneeEdit = (consigneeId) => {
}" }"
@click="toCustomerConsigneeEdit(item.id)" @click="toCustomerConsigneeEdit(item.id)"
> >
<div class="consignees-card-icon"> <div class="q-ml-xs q-mr-md flex items-center">
<QIcon name="star" size="md" color="primary" /> <QIcon name="star" size="md" color="primary" />
</div> </div>
<div> <div>
@ -166,11 +166,6 @@ const toCustomerConsigneeEdit = (consigneeId) => {
background-color: var(--vn-light-gray); background-color: var(--vn-light-gray);
} }
} }
.consignees-card-icon {
margin: 0 15px 0 5px;
display: flex;
align-items: center;
}
</style> </style>
<i18n> <i18n>

View File

@ -117,9 +117,9 @@ const toCustomerCreditCreate = () => {
<QTr :props="props" class="cursor-pointer"> <QTr :props="props" class="cursor-pointer">
<component <component
:is="tableColumnComponents[props.col.name].component" :is="tableColumnComponents[props.col.name].component"
class="col-content"
v-bind="tableColumnComponents[props.col.name].props(props)"
@click="tableColumnComponents[props.col.name].event(props)" @click="tableColumnComponents[props.col.name].event(props)"
class="rounded-borders q-pa-sm"
v-bind="tableColumnComponents[props.col.name].props(props)"
> >
{{ props.value }} {{ props.value }}
<WorkerDescriptorProxy :id="workerId" /> <WorkerDescriptorProxy :id="workerId" />
@ -138,13 +138,6 @@ const toCustomerCreditCreate = () => {
</QPageSticky> </QPageSticky>
</template> </template>
<style lang="scss" scoped>
.col-content {
border-radius: 4px;
padding: 6px;
}
</style>
<i18n> <i18n>
es: es:
Since: Desde Since: Desde

View File

@ -36,7 +36,9 @@ const toCustomerNoteCreate = () => {
v-for="(item, index) in rows" v-for="(item, index) in rows"
:key="index" :key="index"
:class="{ :class="{
'consignees-card': true, 'q-pa-md': true,
'q-rounded': true,
'custom-border': true,
'q-mb-md': index < rows.length - 1, 'q-mb-md': index < rows.length - 1,
}" }"
> >
@ -82,7 +84,7 @@ const toCustomerNoteCreate = () => {
</template> </template>
<style lang="scss"> <style lang="scss">
.consignees-card { .custom-border {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-light-gray);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;

View File

@ -1,7 +1,7 @@
<script setup> <script setup>
import { onBeforeMount, reactive, ref } from 'vue'; import { onBeforeMount, reactive, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import axios from 'axios'; import axios from 'axios';
@ -16,20 +16,9 @@ import CustomsNewCustomsAgent from 'src/pages/Customer/components/CustomerNewCus
const { t } = useI18n(); const { t } = useI18n();
const route = useRoute(); const route = useRoute();
const router = useRouter();
const formInitialData = reactive({ const formInitialData = reactive({ isDefaultAddress: false });
isDefaultAddress: false,
nickname: null,
street: null,
postalCode: null,
city: null,
provinceFk: null,
agencyModeFk: null,
phone: null,
mobile: null,
incotermsFk: null,
customsAgentFk: null,
});
const townsFetchDataRef = ref(null); const townsFetchDataRef = ref(null);
const postcodeFetchDataRef = ref(null); const postcodeFetchDataRef = ref(null);
@ -63,19 +52,28 @@ const getCustomsAgents = async () => {
const refreshData = () => { const refreshData = () => {
getCustomsAgents(); getCustomsAgents();
}; };
const toCustomerConsignees = () => {
router.push({
name: 'CustomerConsignees',
params: {
id: route.params.id,
},
});
};
</script> </script>
<template> <template>
<FetchData <FetchData
ref="postcodeFetchDataRef"
@on-fetch="(data) => (postcodesOptions = data)" @on-fetch="(data) => (postcodesOptions = data)"
auto-load auto-load
ref="postcodeFetchDataRef"
url="Postcodes/location" url="Postcodes/location"
/> />
<FetchData <FetchData
ref="townsFetchDataRef"
@on-fetch="(data) => (citiesLocationOptions = data)" @on-fetch="(data) => (citiesLocationOptions = data)"
auto-load auto-load
ref="townsFetchDataRef"
url="Towns/location" url="Towns/location"
/> />
<FetchData <FetchData
@ -94,6 +92,7 @@ const refreshData = () => {
:form-initial-data="formInitialData" :form-initial-data="formInitialData"
:observe-form-changes="false" :observe-form-changes="false"
:url-create="urlCreate" :url-create="urlCreate"
@on-data-saved="toCustomerConsignees()"
model="client" model="client"
> >
<template #form="{ data, validate }"> <template #form="{ data, validate }">