7383-testToMaster #370
|
@ -94,6 +94,7 @@ export default {
|
|||
},
|
||||
created: 'Created',
|
||||
worker: 'Worker',
|
||||
name: 'Name',
|
||||
},
|
||||
errors: {
|
||||
statusUnauthorized: 'Access denied',
|
||||
|
@ -1034,11 +1035,6 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
agency: {
|
||||
pageTitles: {
|
||||
agency: 'Agency',
|
||||
},
|
||||
},
|
||||
supplier: {
|
||||
pageTitles: {
|
||||
suppliers: 'Suppliers',
|
||||
|
@ -1291,4 +1287,12 @@ export default {
|
|||
},
|
||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789',
|
||||
},
|
||||
agency: {
|
||||
pageTitles: {
|
||||
agency: 'Agency',
|
||||
modes: 'Modes',
|
||||
},
|
||||
isOwn: 'Is own',
|
||||
isAnyVolumeAllowed: 'Any volume allowed',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -94,6 +94,7 @@ export default {
|
|||
},
|
||||
created: 'Fecha creación',
|
||||
worker: 'Trabajador',
|
||||
name: 'Nombre',
|
||||
},
|
||||
errors: {
|
||||
statusUnauthorized: 'Acceso denegado',
|
||||
|
@ -1284,4 +1285,12 @@ export default {
|
|||
},
|
||||
iban_tooltip: 'IBAN: ES21 1234 5678 90 0123456789',
|
||||
},
|
||||
agency: {
|
||||
pageTitles: {
|
||||
agency: 'Agencia',
|
||||
modes: 'Modos',
|
||||
},
|
||||
isOwn: 'Propia',
|
||||
isAnyVolumeAllowed: 'Volumen libre',
|
||||
},
|
||||
};
|
||||
|
|
|
@ -5,10 +5,8 @@ import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
|
|||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const router = useRouter();
|
||||
const stateStore = useStateStore();
|
||||
function navigate(id) {
|
||||
|
@ -68,12 +66,6 @@ function exprBuilder(param, value) {
|
|||
@click.stop="navigate(row.id)"
|
||||
outline
|
||||
/>
|
||||
<QBtn
|
||||
:label="t('components.smartCard.openSummary')"
|
||||
@click.stop="viewSummary(row.id, CustomerSummary)"
|
||||
color="primary"
|
||||
style="margin-top: 15px"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
|
|
|
@ -2,23 +2,18 @@
|
|||
import { ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const id = route.params?.id || null;
|
||||
const routeId = route.params?.id || null;
|
||||
const warehouses = ref([]);
|
||||
const sectorFilter = { fields: ['id', 'description'] };
|
||||
|
||||
const filter = {
|
||||
fields: ['sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: sectorFilter }],
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -28,7 +23,7 @@ const filter = {
|
|||
auto-load
|
||||
/>
|
||||
<VnSubToolbar />
|
||||
<FormModel :url="`Agencies/${id}`" model="agency" auto-load>
|
||||
<FormModel :url="`Agencies/${routeId}`" model="agency" auto-load>
|
||||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<VnInput v-model="data.name" :label="t('globals.name')" />
|
||||
|
@ -38,7 +33,7 @@ const filter = {
|
|||
v-model="data.sectorFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('parking.sector')"
|
||||
:label="t('globals.warehouse')"
|
||||
:options="warehouses"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
|
@ -46,11 +41,11 @@ const filter = {
|
|||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox :label="t('isOwn')" v-model="data.isOwn" />
|
||||
<QCheckbox :label="t('agency.isOwn')" v-model="data.isOwn" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('isAnyVolumeAllowed')"
|
||||
:label="t('agency.isAnyVolumeAllowed')"
|
||||
v-model="data.isAnyVolumeAllowed"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
|
@ -12,11 +12,6 @@ const { t } = useI18n();
|
|||
const route = useRoute();
|
||||
const stateStore = useStateStore();
|
||||
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
};
|
||||
|
||||
const arrayData = useArrayData('Agency', {
|
||||
url: `Agencies/${route.params.id}`,
|
||||
});
|
||||
|
|
|
@ -19,10 +19,7 @@ const { params } = useRoute();
|
|||
const entityId = computed(() => props.id || params.id);
|
||||
const { store } = useArrayData('Parking');
|
||||
const card = computed(() => store.data);
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
};
|
||||
console.log('card: ', card);
|
||||
</script>
|
||||
<template>
|
||||
<CardDescriptor
|
||||
|
@ -30,7 +27,7 @@ const filter = {
|
|||
data-key="Agency"
|
||||
:url="`Agencies/${entityId}`"
|
||||
:title="card?.name"
|
||||
:subtitle="card?.id"
|
||||
:subtitle="props.id"
|
||||
>
|
||||
<template #body="{ entity: agency }">
|
||||
<VnLv :label="t('globals.name')" :value="agency.name" />
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import CardList from 'src/components/ui/CardList.vue';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
console.log('route: ', route.path);
|
||||
const routeId = route.params.id;
|
||||
const toAgencyModeCreate = (consigneeId) => {
|
||||
router.push({
|
||||
name: 'AgencyMode',
|
||||
params: {
|
||||
id: route.params.id,
|
||||
consigneeId,
|
||||
},
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<div class="vn-card-list">
|
||||
<VnPaginate
|
||||
data-key="AgencyModes"
|
||||
:url="`AgencyModes`"
|
||||
:filter="{ where: { agencyFk: routeId } }"
|
||||
order="name"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<CardList
|
||||
:id="row.id"
|
||||
:key="row.id"
|
||||
:title="row.name"
|
||||
v-for="row of rows"
|
||||
>
|
||||
<template #list-items>
|
||||
<VnLv
|
||||
:label="t('globals.description')"
|
||||
:value="row?.description"
|
||||
/>
|
||||
<VnLv
|
||||
:label="t('deliveryMethod')"
|
||||
:value="row?.deliveryMethodFk"
|
||||
/>
|
||||
<VnLv label="m3" :value="row?.m3" />
|
||||
<VnLv :label="t('inflation')" :value="row?.inflation" />
|
||||
<VnLv :label="t('globals.code')" :value="row?.code" />
|
||||
</template>
|
||||
<template #actions>
|
||||
<QBtn
|
||||
:label="t('globals.edit')"
|
||||
@click.stop="toAgencyModeCreate(row.id)"
|
||||
color="primary"
|
||||
icon="edit"
|
||||
/>
|
||||
</template>
|
||||
</CardList>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
|
||||
<QPageSticky :offset="[18, 18]">
|
||||
<QBtn @click.stop="toAgencyModeCreate()" color="primary" fab icon="add" />
|
||||
<QTooltip>
|
||||
{{ t('New mode') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</QPage>
|
||||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
</i18n>
|
|
@ -2,8 +2,12 @@
|
|||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import CardSummary from 'components/ui/CardSummary.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
|
@ -28,15 +32,17 @@ const filter = {
|
|||
<template #body="{ entity: agency }">
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
<a
|
||||
class="header header-link"
|
||||
:href="`#/agency/${entityId}/basic-data`"
|
||||
>
|
||||
{{ t('globals.pageTitles.basicData') }}
|
||||
<QIcon name="open_in_new" />
|
||||
</a>
|
||||
<VnTitle
|
||||
:url="`#/agency/${entityId}/basic-data`"
|
||||
:text="t('globals.pageTitles.basicData')"
|
||||
/>
|
||||
</QCardSection>
|
||||
<VnLv :label="t('globals.name')" :value="agency.name" />
|
||||
<QCheckbox :label="t('agency.isOwn')" v-model="agency.isOwn" />
|
||||
<QCheckbox
|
||||
:label="t('agency.isAnyVolumeAllowed')"
|
||||
v-model="agency.isAnyVolumeAllowed"
|
||||
/>
|
||||
</QCard>
|
||||
</template>
|
||||
</CardSummary>
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
<script setup>
|
||||
import { ref, computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
import FormModelPopup from 'src/components/FormModelPopup.vue';
|
||||
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
|
||||
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const route = useRoute();
|
||||
const paginate = ref();
|
||||
const dialog = ref();
|
||||
const routeId = computed(() => route.params.id);
|
||||
|
||||
const initialData = computed(() => {
|
||||
return {
|
||||
agencyFk: routeId.value,
|
||||
workCenterFk: null,
|
||||
};
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div class="centerCard">
|
||||
<FetchData
|
||||
url="workCenters"
|
||||
sort-by="name"
|
||||
@on-fetch="(data) => (warehouses = data)"
|
||||
auto-load
|
||||
/>
|
||||
<VnPaginate
|
||||
ref="paginate"
|
||||
data-key="AgencyWorkCenters"
|
||||
url="AgencyWorkCenters"
|
||||
:filter="{ where: { agencyFk: routeId } }"
|
||||
order="id"
|
||||
auto-load
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
<QCard
|
||||
flat
|
||||
bordered
|
||||
:key="row.id"
|
||||
v-for="row of rows"
|
||||
class="card q-pa-md q-mb-sm"
|
||||
>
|
||||
<QItem>
|
||||
<QItemSection side-left>
|
||||
<VnLv :value="row?.workCenter?.name" icon="delete" />
|
||||
</QItemSection>
|
||||
<QItemSection side>
|
||||
<QBtn icon="delete" color="primary" round flat />
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</QCard>
|
||||
</template>
|
||||
</VnPaginate>
|
||||
</div>
|
||||
<QPageSticky :offset="[18, 18]">
|
||||
<QBtn @click.stop="dialog.show()" color="primary" fab icon="add">
|
||||
<QDialog ref="dialog">
|
||||
<FormModelPopup
|
||||
:title="t('Add work center')"
|
||||
url-create="AgencyWorkCenters"
|
||||
model="AgencyWorkCenter"
|
||||
:form-initial-data="initialData"
|
||||
@on-data-saved="paginate.fetch()"
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
<VnRow class="row q-gutter-md q-mb-md">
|
||||
<VnSelectFilter
|
||||
v-model="data.workCenterFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:label="t('workCenter')"
|
||||
:options="warehouses"
|
||||
use-input
|
||||
input-debounce="0"
|
||||
:is-clearable="false"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
</QDialog>
|
||||
</QBtn>
|
||||
<QTooltip>
|
||||
{{ t('globals.new') }}
|
||||
</QTooltip>
|
||||
</QPageSticky>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
.centerCard {
|
||||
padding: 5%;
|
||||
width: 100%;
|
||||
max-width: 50%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
isOwn: Tiene propietario
|
||||
isAnyVolumeAllowed: Permite cualquier volumen
|
||||
Search agency: Buscar agencia
|
||||
You can search by name: Puedes buscar por nombre
|
||||
en:
|
||||
isOwn: Has owner
|
||||
isAnyVolumeAllowed: Allows any volume
|
||||
</i18n>
|
|
@ -12,7 +12,7 @@ export default {
|
|||
redirect: { name: 'AgencyCard' },
|
||||
menus: {
|
||||
main: [],
|
||||
card: ['AgencyBasicData', 'AgencyLog'],
|
||||
card: ['AgencyBasicData', 'AgencyModes', 'AgencyWorkCenters', 'AgencyLog'],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -39,6 +39,40 @@ export default {
|
|||
},
|
||||
component: () => import('pages/Agency/Card/AgencyBasicData.vue'),
|
||||
},
|
||||
{
|
||||
path: 'workCenter',
|
||||
name: 'AgencyWorkCenterCard',
|
||||
redirect: { name: 'AgencyWorkCenters' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyWorkCenters',
|
||||
meta: {
|
||||
icon: 'apartment',
|
||||
title: 'workCenters',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Agency/Card/AgencyWorkcenter.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'modes',
|
||||
name: 'AgencyModesCard',
|
||||
redirect: { name: 'AgencyModes' },
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
name: 'AgencyModes',
|
||||
meta: {
|
||||
icon: 'format_list_bulleted',
|
||||
title: 'modes',
|
||||
},
|
||||
component: () =>
|
||||
import('src/pages/Agency/Card/AgencyModes.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'AgencyLog',
|
||||
path: 'log',
|
||||
|
|
|
@ -76,7 +76,7 @@ export default {
|
|||
},
|
||||
{
|
||||
path: '/agency',
|
||||
redirect: { name: 'agencyList' },
|
||||
redirect: { name: 'AgencyList' },
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
|
|
Loading…
Reference in New Issue