Merge branch 'dev' into 8314-changeStyleOrderVolume
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:
commit
27c0c1dd3c
|
@ -3,12 +3,12 @@ import { useSession } from 'src/composables/useSession';
|
|||
import { Router } from 'src/router';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { useStateQueryStore } from 'src/stores/useStateQueryStore';
|
||||
import { i18n } from 'src/boot/i18n';
|
||||
|
||||
const session = useSession();
|
||||
const { notify } = useNotify();
|
||||
const stateQuery = useStateQueryStore();
|
||||
const baseUrl = '/api/';
|
||||
|
||||
axios.defaults.baseURL = baseUrl;
|
||||
const axiosNoError = axios.create({ baseURL: baseUrl });
|
||||
|
||||
|
@ -16,6 +16,7 @@ const onRequest = (config) => {
|
|||
const token = session.getToken();
|
||||
if (token.length && !config.headers.Authorization) {
|
||||
config.headers.Authorization = token;
|
||||
config.headers['Accept-Language'] = i18n.global.locale.value;
|
||||
}
|
||||
stateQuery.add(config);
|
||||
return config;
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import { boot } from 'quasar/wrappers';
|
||||
import { createI18n } from 'vue-i18n';
|
||||
import messages from 'src/i18n';
|
||||
import { useState } from 'src/composables/useState';
|
||||
const user = useState().getUser();
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: navigator.language || navigator.userLanguage,
|
||||
locale: user.value.lang || navigator.language || navigator.userLanguage,
|
||||
fallbackLocale: 'en',
|
||||
globalInjection: true,
|
||||
messages,
|
||||
|
|
|
@ -17,12 +17,10 @@ const stateQuery = useStateQueryStore();
|
|||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const appName = 'Lilium';
|
||||
const pinnedModulesRef = ref();
|
||||
|
||||
onMounted(() => stateStore.setMounted());
|
||||
|
||||
const pinnedModulesRef = ref();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QHeader color="white" elevated>
|
||||
<QToolbar class="q-py-sm q-px-md">
|
||||
|
@ -65,16 +63,6 @@ const pinnedModulesRef = ref();
|
|||
<QSpace />
|
||||
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
|
||||
<div id="actions-prepend"></div>
|
||||
<QBtn
|
||||
flat
|
||||
v-if="!quasar.platform.is.mobile"
|
||||
@click="pinnedModulesRef.redirect($route.params.id)"
|
||||
icon="more_up"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Go to Salix') }}
|
||||
</QTooltip>
|
||||
</QBtn>
|
||||
<QBtn
|
||||
:class="{ 'q-pa-none': quasar.platform.is.mobile }"
|
||||
id="pinnedModules"
|
||||
|
@ -106,7 +94,6 @@ const pinnedModulesRef = ref();
|
|||
<VnBreadcrumbs v-if="$q.screen.lt.md" class="q-ml-md" />
|
||||
</QHeader>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.searchbar {
|
||||
width: max-content;
|
||||
|
@ -115,9 +102,3 @@ const pinnedModulesRef = ref();
|
|||
background-color: var(--vn-section-color);
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
Go to Salix: Go to Salix
|
||||
es:
|
||||
Go to Salix: Ir a Salix
|
||||
</i18n>
|
||||
|
|
|
@ -87,10 +87,10 @@ async function saveDarkMode(value) {
|
|||
async function saveLanguage(value) {
|
||||
const query = `/VnUsers/${user.value.id}`;
|
||||
try {
|
||||
await axios.patch(query, {
|
||||
lang: value,
|
||||
});
|
||||
await axios.patch(query, { lang: value });
|
||||
|
||||
user.value.lang = value;
|
||||
useState().setUser(user.value);
|
||||
onDataSaved();
|
||||
} catch (error) {
|
||||
onDataError();
|
||||
|
|
|
@ -150,6 +150,7 @@ const tableModes = [
|
|||
disable: $props.disableOption?.card,
|
||||
},
|
||||
];
|
||||
|
||||
onBeforeMount(() => {
|
||||
const urlParams = route.query[$props.searchUrl];
|
||||
hasParams.value = urlParams && Object.keys(urlParams).length !== 0;
|
||||
|
@ -481,7 +482,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
:class="col.headerClass"
|
||||
>
|
||||
<div
|
||||
class="column self-start q-ml-xs ellipsis"
|
||||
class="column ellipsis"
|
||||
:class="`text-${col?.align ?? 'left'}`"
|
||||
:style="$props.columnSearch ? 'height: 75px' : ''"
|
||||
>
|
||||
|
@ -523,7 +524,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
<!-- Columns -->
|
||||
<QTd
|
||||
auto-width
|
||||
class="no-margin q-px-xs"
|
||||
class="no-margin"
|
||||
:class="[getColAlign(col), col.columnClass]"
|
||||
:style="col.style"
|
||||
v-if="col.visible ?? true"
|
||||
|
@ -658,13 +659,7 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
:key="col.name"
|
||||
class="fields"
|
||||
>
|
||||
<VnLv
|
||||
:label="
|
||||
!col.component && col.label
|
||||
? `${col.label}:`
|
||||
: ''
|
||||
"
|
||||
>
|
||||
<VnLv :label="col.label + ':'">
|
||||
<template #value>
|
||||
<span
|
||||
@click="stopEventPropagation($event)"
|
||||
|
@ -805,7 +800,7 @@ es:
|
|||
|
||||
.grid-three {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(400px, max-content));
|
||||
grid-template-columns: repeat(auto-fit, minmax(350px, max-content));
|
||||
max-width: 100%;
|
||||
grid-gap: 20px;
|
||||
margin: 0 auto;
|
||||
|
@ -854,21 +849,6 @@ es:
|
|||
top: 0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
tbody {
|
||||
.q-checkbox {
|
||||
display: flex;
|
||||
margin-bottom: 9px;
|
||||
& .q-checkbox__label {
|
||||
margin-left: 31px;
|
||||
color: var(--vn-text-color);
|
||||
}
|
||||
& .q-checkbox__inner {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: var(--vn-label-color);
|
||||
}
|
||||
}
|
||||
}
|
||||
.sticky {
|
||||
position: sticky;
|
||||
right: 0;
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
import { ref, onMounted, useSlots } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const stateStore = useStateStore();
|
||||
const slots = useSlots();
|
||||
const hasContent = ref(false);
|
||||
const rightPanel = ref(null);
|
||||
|
@ -11,7 +15,6 @@ onMounted(() => {
|
|||
rightPanel.value = document.querySelector('#right-panel');
|
||||
if (!rightPanel.value) return;
|
||||
|
||||
// Check if there's content to display
|
||||
const observer = new MutationObserver(() => {
|
||||
hasContent.value = rightPanel.value.childNodes.length;
|
||||
});
|
||||
|
@ -21,12 +24,9 @@ onMounted(() => {
|
|||
childList: true,
|
||||
attributes: true,
|
||||
});
|
||||
|
||||
if (!slots['right-panel'] && !hasContent.value) stateStore.rightDrawer = false;
|
||||
if ((!slots['right-panel'] && !hasContent.value) || quasar.platform.is.mobile)
|
||||
stateStore.rightDrawer = false;
|
||||
});
|
||||
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
</script>
|
||||
<template>
|
||||
<Teleport to="#actions-append" v-if="stateStore.isHeaderMounted()">
|
||||
|
@ -45,7 +45,7 @@ const stateStore = useStateStore();
|
|||
</QBtn>
|
||||
</div>
|
||||
</Teleport>
|
||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256">
|
||||
<QScrollArea class="fit">
|
||||
<div id="right-panel"></div>
|
||||
<slot v-if="!hasContent" name="right-panel" />
|
||||
|
|
|
@ -106,7 +106,7 @@ const manageDate = (date) => {
|
|||
:class="{ required: isRequired }"
|
||||
:rules="mixinRules"
|
||||
:clearable="false"
|
||||
@click="isPopupOpen = true"
|
||||
@click="isPopupOpen = !isPopupOpen"
|
||||
hide-bottom-space
|
||||
>
|
||||
<template #append>
|
||||
|
@ -125,13 +125,6 @@ const manageDate = (date) => {
|
|||
isPopupOpen = false;
|
||||
"
|
||||
/>
|
||||
<QIcon
|
||||
v-if="showEvent"
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
@click="isPopupOpen = !isPopupOpen"
|
||||
:title="t('Open date')"
|
||||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
|
@ -151,15 +144,6 @@ const manageDate = (date) => {
|
|||
</QInput>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.vn-input-date.q-field--standard.q-field--readonly .q-field__control:before {
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
.vn-input-date.q-field--outlined.q-field--readonly .q-field__control:before {
|
||||
border-style: solid;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Open date: Abrir fecha
|
||||
|
|
|
@ -80,7 +80,7 @@ function dateToTime(newDate) {
|
|||
:class="{ required: isRequired }"
|
||||
style="min-width: 100px"
|
||||
:rules="mixinRules"
|
||||
@click="isPopupOpen = false"
|
||||
@click="isPopupOpen = !isPopupOpen"
|
||||
type="time"
|
||||
hide-bottom-space
|
||||
>
|
||||
|
@ -100,12 +100,6 @@ function dateToTime(newDate) {
|
|||
isPopupOpen = false;
|
||||
"
|
||||
/>
|
||||
<QIcon
|
||||
name="Schedule"
|
||||
class="cursor-pointer"
|
||||
@click="isPopupOpen = !isPopupOpen"
|
||||
:title="t('Open time')"
|
||||
/>
|
||||
</template>
|
||||
<QMenu
|
||||
v-if="$q.screen.gt.xs"
|
||||
|
|
|
@ -379,7 +379,8 @@ function handleKeyDown(event) {
|
|||
</template>
|
||||
<template #option="{ opt, itemProps }">
|
||||
<QItem v-bind="itemProps">
|
||||
<QItemSection v-if="opt[optionValue] == opt[optionLabel]">
|
||||
<QItemSection v-if="typeof opt !== 'object'"> {{ opt }}</QItemSection>
|
||||
<QItemSection v-else-if="opt[optionValue] == opt[optionLabel]">
|
||||
<QItemLabel>{{ opt[optionLabel] }}</QItemLabel>
|
||||
</QItemSection>
|
||||
<QItemSection v-else>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script setup>
|
||||
import { ref, computed, watch, onBeforeMount } from 'vue';
|
||||
import { ref, computed, watch, onBeforeMount, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import { useArrayData } from 'src/composables/useArrayData';
|
||||
import { isDialogOpened } from 'src/filters';
|
||||
import { useStateStore } from 'src/stores/useStateStore';
|
||||
|
||||
const props = defineProps({
|
||||
url: {
|
||||
|
@ -40,6 +40,7 @@ const { store } = arrayData;
|
|||
const entity = computed(() => (Array.isArray(store.data) ? store.data[0] : store.data));
|
||||
const isLoading = ref(false);
|
||||
|
||||
const stateStore = useStateStore();
|
||||
defineExpose({
|
||||
entity,
|
||||
fetch,
|
||||
|
@ -51,6 +52,9 @@ onBeforeMount(async () => {
|
|||
watch(props, async () => await fetch());
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
stateStore.rightDrawerChangeValue(false);
|
||||
});
|
||||
async function fetch() {
|
||||
store.url = props.url;
|
||||
store.filter = props.filter ?? {};
|
||||
|
@ -60,7 +64,6 @@ async function fetch() {
|
|||
isLoading.value = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="summary container">
|
||||
<QCard class="cardSummary">
|
||||
|
@ -81,7 +84,7 @@ async function fetch() {
|
|||
<span v-else></span>
|
||||
</slot>
|
||||
<slot name="header" :entity="entity" dense>
|
||||
<VnLv :label="`${entity.id} -`" :value="entity.name" />
|
||||
{{ entity.id + ' - ' + entity.name }}
|
||||
</slot>
|
||||
<slot name="header-right" :entity="entity">
|
||||
<span></span>
|
||||
|
@ -94,7 +97,6 @@ async function fetch() {
|
|||
</QCard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.summary.container {
|
||||
display: flex;
|
||||
|
|
|
@ -16,7 +16,13 @@ const $props = defineProps({
|
|||
required: false,
|
||||
default: 'value',
|
||||
},
|
||||
columns: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const tags = computed(() => {
|
||||
return Object.keys($props.item)
|
||||
.filter((i) => i.startsWith(`${$props.tag}`))
|
||||
|
@ -28,10 +34,21 @@ const tags = computed(() => {
|
|||
return acc;
|
||||
}, {});
|
||||
});
|
||||
|
||||
const columnStyle = computed(() => {
|
||||
if ($props.columns) {
|
||||
return {
|
||||
'grid-template-columns': `repeat(${$props.columns}, 1fr)`,
|
||||
'max-width': `${$props.columns * 4}rem`,
|
||||
};
|
||||
}
|
||||
return {};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="fetchedTags">
|
||||
<div class="wrap">
|
||||
<div class="wrap" :style="columnStyle">
|
||||
<div
|
||||
v-for="(val, key) in tags"
|
||||
:key="key"
|
||||
|
@ -39,37 +56,43 @@ const tags = computed(() => {
|
|||
:title="`${key}: ${val}`"
|
||||
:class="{ empty: !val }"
|
||||
>
|
||||
{{ val }}
|
||||
<span class="text">{{ val }} </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.fetchedTags {
|
||||
align-items: center;
|
||||
.wrap {
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
display: flex;
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.inline-tag {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 1rem;
|
||||
margin: 0.05rem;
|
||||
color: $color-font-secondary;
|
||||
color: var(--vn-label-color);
|
||||
text-align: center;
|
||||
font-size: smaller;
|
||||
padding: 1px;
|
||||
flex: 1;
|
||||
border: 1px solid $color-spacer;
|
||||
border: 1px solid var(--vn-label-color);
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
min-width: 4rem;
|
||||
max-width: 4rem;
|
||||
}
|
||||
|
||||
.text {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: smaller;
|
||||
}
|
||||
.empty {
|
||||
border: 1px solid #2b2b2b;
|
||||
border: 1px solid var(--vn-empty-tag);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -39,7 +39,7 @@ const val = computed(() => $props.value);
|
|||
<template v-else>
|
||||
<div v-if="label || $slots.label" class="label">
|
||||
<slot name="label">
|
||||
<span>{{ label }}</span>
|
||||
<span style="color: var(--vn-label-color)">{{ label }}</span>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="value">
|
||||
|
|
|
@ -11,6 +11,7 @@ body.body--light {
|
|||
--vn-text-color: var(--font-color);
|
||||
--vn-label-color: #5f5f5f;
|
||||
--vn-accent-color: #e7e3e3;
|
||||
--vn-empty-tag: #acacac;
|
||||
|
||||
background-color: var(--vn-page-color);
|
||||
|
||||
|
@ -26,6 +27,7 @@ body.body--dark {
|
|||
--vn-text-color: white;
|
||||
--vn-label-color: #a8a8a8;
|
||||
--vn-accent-color: #424242;
|
||||
--vn-empty-tag: #2d2d2d;
|
||||
|
||||
background-color: var(--vn-page-color);
|
||||
}
|
||||
|
@ -240,7 +242,7 @@ input::-webkit-inner-spin-button {
|
|||
.q-table {
|
||||
th,
|
||||
td {
|
||||
padding: 1px 10px 1px 10px;
|
||||
padding: 1px 3px 1px 3px;
|
||||
max-width: 130px;
|
||||
div span {
|
||||
overflow: hidden;
|
||||
|
@ -296,3 +298,20 @@ input::-webkit-inner-spin-button {
|
|||
.no-visible {
|
||||
visibility: hidden;
|
||||
}
|
||||
.q-field__inner {
|
||||
.q-field__control {
|
||||
min-height: auto !important;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
padding-bottom: 2px;
|
||||
.q-field__native.row {
|
||||
min-height: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.q-date__header-today {
|
||||
border-radius: 12px;
|
||||
border: 1px solid;
|
||||
box-shadow: 0 4px 6px #00000000;
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ globals:
|
|||
workCenters: Work centers
|
||||
modes: Modes
|
||||
zones: Zones
|
||||
zonesList: Zones
|
||||
zonesList: List
|
||||
deliveryDays: Delivery days
|
||||
upcomingDeliveries: Upcoming deliveries
|
||||
role: Role
|
||||
|
|
|
@ -144,7 +144,7 @@ globals:
|
|||
workCenters: Centros de trabajo
|
||||
modes: Modos
|
||||
zones: Zonas
|
||||
zonesList: Zonas
|
||||
zonesList: Listado
|
||||
deliveryDays: Días de entrega
|
||||
upcomingDeliveries: Próximos repartos
|
||||
role: Role
|
||||
|
|
|
@ -57,6 +57,7 @@ function onFetch(rows, newRows) {
|
|||
const price = row.quantity * sale.price;
|
||||
const discount = (sale.discount * price) / 100;
|
||||
amountClaimed.value = amountClaimed.value + (price - discount);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,9 +208,10 @@ async function saveWhenHasChanges() {
|
|||
selection="multiple"
|
||||
v-model:selected="selected"
|
||||
:grid="$q.screen.lt.md"
|
||||
|
||||
>
|
||||
<template #body-cell-claimed="{ row }">
|
||||
<QTd auto-width align="right" class="text-primary">
|
||||
<QTd auto-width align="right" class="text-primary shrink">
|
||||
<QInput
|
||||
v-model.number="row.quantity"
|
||||
type="number"
|
||||
|
@ -220,7 +222,7 @@ async function saveWhenHasChanges() {
|
|||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-description="{ row, value }">
|
||||
<QTd auto-width align="right" class="text-primary">
|
||||
<QTd auto-width align="right" class="link expand">
|
||||
{{ value }}
|
||||
<ItemDescriptorProxy
|
||||
:id="row.sale.itemFk"
|
||||
|
@ -228,7 +230,7 @@ async function saveWhenHasChanges() {
|
|||
</QTd>
|
||||
</template>
|
||||
<template #body-cell-discount="{ row, value, rowIndex }">
|
||||
<QTd auto-width align="right" class="text-primary">
|
||||
<QTd auto-width align="right" class="text-primary shrink">
|
||||
{{ value }}
|
||||
<VnDiscount
|
||||
:quantity="row.quantity"
|
||||
|
@ -264,7 +266,7 @@ async function saveWhenHasChanges() {
|
|||
</QItemSection>
|
||||
<QItemSection side>
|
||||
<template v-if="column.name === 'claimed'">
|
||||
<QItemLabel class="text-primary">
|
||||
<QItemLabel class="text-primary shrink">
|
||||
<QInput
|
||||
v-model.number="
|
||||
props.row.quantity
|
||||
|
@ -282,7 +284,7 @@ async function saveWhenHasChanges() {
|
|||
<template
|
||||
v-else-if="column.name === 'discount'"
|
||||
>
|
||||
<QItemLabel class="text-primary">
|
||||
<QItemLabel class="text-primary shrink">
|
||||
{{ column.value }}
|
||||
<VnDiscount
|
||||
:quantity="props.row.quantity"
|
||||
|
@ -330,6 +332,7 @@ async function saveWhenHasChanges() {
|
|||
.grid-style-transition {
|
||||
transition: transform 0.28s, background-color 0.28s;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<i18n>
|
||||
|
|
|
@ -345,12 +345,9 @@ function claimUrl(section) {
|
|||
<span v-if="col.name != 'description'">{{
|
||||
t(col.value)
|
||||
}}</span>
|
||||
<QBtn
|
||||
v-if="col.name == 'description'"
|
||||
flat
|
||||
color="blue"
|
||||
>{{ col.value }}</QBtn
|
||||
>
|
||||
<span class="link" v-if="col.name === 'description'">{{
|
||||
t(col.value)
|
||||
}}</span>
|
||||
<ItemDescriptorProxy
|
||||
v-if="col.name == 'description'"
|
||||
:id="props.row.sale.itemFk"
|
||||
|
|
|
@ -105,6 +105,7 @@ const columns = computed(() => [
|
|||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, ClaimSummary),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -135,7 +136,6 @@ const STATE_COLOR = {
|
|||
:columns="columns"
|
||||
redirect="claim"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
>
|
||||
<template #column-clientFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
|
|
|
@ -2,22 +2,21 @@
|
|||
import { ref, computed, markRaw } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { toDate } from 'src/filters';
|
||||
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||
import CustomerFilter from './CustomerFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnLocation from 'src/components/common/VnLocation.vue';
|
||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import CustomerSummary from './Card/CustomerSummary.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import CustomerFilter from './CustomerFilter.vue';
|
||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
const tableRef = ref();
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -405,6 +404,7 @@ function handleLocation(data, location) {
|
|||
ref="tableRef"
|
||||
data-key="CustomerList"
|
||||
url="Clients/filter"
|
||||
order="id DESC"
|
||||
:create="{
|
||||
urlCreate: 'Clients/createWithUser',
|
||||
title: t('globals.pageTitles.customerCreate'),
|
||||
|
@ -414,11 +414,9 @@ function handleLocation(data, location) {
|
|||
isEqualizated: false,
|
||||
},
|
||||
}"
|
||||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="customer"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
redirect="customer"
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnSelectWorker
|
||||
|
@ -431,7 +429,26 @@ function handleLocation(data, location) {
|
|||
:id-value="data.salesPersonFk"
|
||||
emit-value
|
||||
auto-load
|
||||
/>
|
||||
>
|
||||
<template #prepend>
|
||||
<VnAvatar
|
||||
:worker-id="data.salesPersonFk"
|
||||
color="primary"
|
||||
:title="title"
|
||||
/>
|
||||
</template>
|
||||
<template #option="scope">
|
||||
<QItem v-bind="scope.itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
|
||||
<QItemLabel caption
|
||||
>{{ scope.opt?.nickname }},
|
||||
{{ scope.opt?.code }}</QItemLabel
|
||||
>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelectWorker>
|
||||
<VnLocation
|
||||
:acls="[{ model: 'Province', props: '*', accessType: 'WRITE' }]"
|
||||
v-model="data.location"
|
||||
|
@ -452,7 +469,7 @@ function handleLocation(data, location) {
|
|||
</template>
|
||||
<i18n>
|
||||
es:
|
||||
Web user: Usuario Web
|
||||
Web user: Usuario web
|
||||
</i18n>
|
||||
<style lang="scss" scoped>
|
||||
.col-content {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
@ -20,11 +18,6 @@ const props = defineProps({
|
|||
|
||||
const currenciesOptions = ref([]);
|
||||
const companiesOptions = ref([]);
|
||||
|
||||
const stateStore = useStateStore();
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -49,8 +49,10 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
label: t('globals.id'),
|
||||
name: 'id',
|
||||
isTitle: true,
|
||||
cardVisible: true,
|
||||
isId: true,
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -177,9 +179,6 @@ const columns = computed(() => [
|
|||
],
|
||||
},
|
||||
]);
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<VnSearchbar
|
||||
|
@ -207,7 +206,6 @@ onMounted(async () => {
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="entry"
|
||||
auto-load
|
||||
:right-search="false"
|
||||
>
|
||||
<template #column-status="{ row }">
|
||||
|
|
|
@ -116,6 +116,7 @@ function deleteFile(dmsFk) {
|
|||
<template #form="{ data }">
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:required="true"
|
||||
:label="t('supplierFk')"
|
||||
v-model="data.supplierFk"
|
||||
option-value="id"
|
||||
|
@ -244,6 +245,8 @@ function deleteFile(dmsFk) {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:required="true"
|
||||
:is-clearable="false"
|
||||
:label="t('Currency')"
|
||||
v-model="data.currencyFk"
|
||||
:options="currencies"
|
||||
|
@ -253,6 +256,8 @@ function deleteFile(dmsFk) {
|
|||
/>
|
||||
|
||||
<VnSelect
|
||||
:required="true"
|
||||
:is-clearable="false"
|
||||
v-if="companiesRef"
|
||||
:label="t('Company')"
|
||||
v-model="data.companyFk"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { toDate, toCurrency } from 'src/filters/index';
|
||||
|
@ -17,14 +16,10 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const user = useState().getUser();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { t } = useI18n();
|
||||
|
||||
onMounted(async () => (stateStore.rightDrawer = true));
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
const tableRef = ref();
|
||||
const companies = ref([]);
|
||||
const cols = computed(() => [
|
||||
|
@ -38,6 +33,10 @@ const cols = computed(() => [
|
|||
align: 'left',
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
isId: true,
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -51,6 +50,7 @@ const cols = computed(() => [
|
|||
},
|
||||
},
|
||||
columnClass: 'expand',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -81,6 +81,7 @@ const cols = computed(() => [
|
|||
component: 'date',
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.dueDated)),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -92,6 +93,20 @@ const cols = computed(() => [
|
|||
name: 'amount',
|
||||
label: t('InvoiceIn.list.amount'),
|
||||
format: ({ amount }) => toCurrency(amount),
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'companyFk',
|
||||
label: t('globals.company'),
|
||||
columnFilter: {
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Companies',
|
||||
fields: ['id', 'code'],
|
||||
optionLabel: 'code',
|
||||
},
|
||||
},
|
||||
format: (row) => row.code,
|
||||
},
|
||||
{
|
||||
name: 'companyFk',
|
||||
|
@ -114,6 +129,7 @@ const cols = computed(() => [
|
|||
title: t('components.smartCard.openSummary'),
|
||||
icon: 'preview',
|
||||
type: 'submit',
|
||||
isPrimary: true,
|
||||
action: (row) => viewSummary(row.id, InvoiceInSummary),
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onMounted, onUnmounted, ref, computed, watchEffect } from 'vue';
|
||||
import { ref, computed, watchEffect } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
|
@ -10,7 +10,6 @@ import { usePrintService } from 'src/composables/usePrintService';
|
|||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import InvoiceOutSummary from './Card/InvoiceOutSummary.vue';
|
||||
import { toCurrency, toDate } from 'src/filters/index';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { QBtn } from 'quasar';
|
||||
import axios from 'axios';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
@ -21,7 +20,6 @@ import VnInput from 'src/components/common/VnInput.vue';
|
|||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const tableRef = ref();
|
||||
const invoiceOutSerialsOptions = ref([]);
|
||||
|
@ -147,8 +145,6 @@ const columns = computed(() => [
|
|||
],
|
||||
},
|
||||
]);
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
onUnmounted(() => (stateStore.rightDrawer = false));
|
||||
|
||||
function openPdf(id) {
|
||||
openReport(`${MODEL}/${id}/download`);
|
||||
|
@ -214,7 +210,6 @@ watchEffect(selectedRows);
|
|||
order="id DESC"
|
||||
:columns="columns"
|
||||
redirect="invoice-out"
|
||||
auto-load
|
||||
:table="{
|
||||
'row-key': 'id',
|
||||
selection: 'multiple',
|
||||
|
|
|
@ -466,7 +466,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
</span>
|
||||
<span class="subName">{{ row.subName }}</span>
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
<FetchedTags :item="row" />
|
||||
<FetchedTags :item="row" :columns="3" />
|
||||
</template>
|
||||
<template #column-rate2="props">
|
||||
<QTd class="col">
|
||||
|
|
|
@ -11,6 +11,7 @@ import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
|||
import ItemSummary from '../Item/Card/ItemSummary.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import ItemDescriptorProxy from './Card/ItemDescriptorProxy.vue';
|
||||
import ItemTypeDescriptorProxy from './ItemType/Card/ItemTypeDescriptorProxy.vue';
|
||||
import { cloneItem } from 'src/pages/Item/composables/cloneItem';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import ItemListFilter from './ItemListFilter.vue';
|
||||
|
@ -56,7 +57,6 @@ const columns = computed(() => [
|
|||
name: 'image',
|
||||
align: 'left',
|
||||
columnFilter: false,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
label: t('item.list.id'),
|
||||
|
@ -94,7 +94,7 @@ const columns = computed(() => [
|
|||
columnFilter: {
|
||||
name: 'search',
|
||||
},
|
||||
cardVisible: true,
|
||||
columnClass: 'expand',
|
||||
},
|
||||
{
|
||||
label: t('item.list.stems'),
|
||||
|
@ -132,10 +132,13 @@ const columns = computed(() => [
|
|||
fields: ['id', 'name'],
|
||||
},
|
||||
},
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
create: true,
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
label: t('item.list.typeName'),
|
||||
name: 'typeName',
|
||||
align: 'left',
|
||||
},
|
||||
{
|
||||
label: t('item.list.category'),
|
||||
|
@ -220,7 +223,6 @@ const columns = computed(() => [
|
|||
label: t('item.list.weight'),
|
||||
toolTip: t('item.list.weightByPiece'),
|
||||
name: 'weightByPiece',
|
||||
align: 'left',
|
||||
component: 'input',
|
||||
columnField: {
|
||||
component: null,
|
||||
|
@ -296,7 +298,6 @@ const columns = computed(() => [
|
|||
},
|
||||
]);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="ItemList"
|
||||
|
@ -341,6 +342,13 @@ const columns = computed(() => [
|
|||
<ItemDescriptorProxy :id="row.id" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-typeName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.typeName }}
|
||||
{{ row.typeFk }}
|
||||
<ItemTypeDescriptorProxy :id="row.typeFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-userName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.userName }}
|
||||
|
@ -354,15 +362,15 @@ const columns = computed(() => [
|
|||
{{ row?.subName.toUpperCase() }}
|
||||
</div>
|
||||
</div>
|
||||
<FetchedTags :item="row" :max-length="6" />
|
||||
<FetchedTags :item="row" :columns="3" />
|
||||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.subName {
|
||||
text-transform: uppercase;
|
||||
color: var(--vn-label-color);
|
||||
font-size: small;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
|
|
|
@ -6,13 +6,11 @@ import { useI18n } from 'vue-i18n';
|
|||
import CardDescriptor from 'components/ui/CardDescriptor.vue';
|
||||
import VnLv from 'src/components/ui/VnLv.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
summary: {
|
||||
|
@ -24,6 +22,10 @@ const $props = defineProps({
|
|||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
|
||||
const itemTypeFilter = {
|
||||
include: [
|
||||
{ relation: 'worker' },
|
||||
|
@ -33,10 +35,6 @@ const itemTypeFilter = {
|
|||
],
|
||||
};
|
||||
|
||||
const entityId = computed(() => {
|
||||
return $props.id || route.params.id;
|
||||
});
|
||||
|
||||
const data = ref(useCardDescription());
|
||||
const setData = (entity) => (data.value = useCardDescription(entity.code, entity.id));
|
||||
</script>
|
||||
|
@ -48,8 +46,8 @@ const setData = (entity) => (data.value = useCardDescription(entity.code, entity
|
|||
:filter="itemTypeFilter"
|
||||
:title="data.title"
|
||||
:subtitle="data.subtitle"
|
||||
data-key="itemTypeDescriptor"
|
||||
@on-fetch="setData"
|
||||
data-key="entry"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('shared.code')" :value="entity.code" />
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<script setup>
|
||||
import ItemTypeDescriptor from './ItemTypeDescriptor.vue';
|
||||
import ItemTypeSummary from './ItemTypeSummary.vue';
|
||||
|
||||
const $props = defineProps({
|
||||
id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<QPopupProxy>
|
||||
<ItemTypeDescriptor v-if="$props.id" :id="$props.id" :summary="ItemTypeSummary" />
|
||||
</QPopupProxy>
|
||||
</template>
|
|
@ -135,7 +135,7 @@ item:
|
|||
origin: Orig.
|
||||
userName: Buyer
|
||||
weight: Weight
|
||||
weightByPiece: Weight/Piece
|
||||
weightByPiece: Weight/stem
|
||||
stemMultiplier: Multiplier
|
||||
producer: Producer
|
||||
landed: Landed
|
||||
|
|
|
@ -136,7 +136,7 @@ item:
|
|||
size: Medida
|
||||
origin: Orig.
|
||||
weight: Peso
|
||||
weightByPiece: Peso (gramos)/tallo
|
||||
weightByPiece: Peso/tallo
|
||||
userName: Comprador
|
||||
stemMultiplier: Multiplicador
|
||||
producer: Productor
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
<script setup>
|
||||
import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { dashIfEmpty, toCurrency, toDate } from 'src/filters';
|
||||
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
|
||||
import { toDateTimeFormat } from 'src/filters/date';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
import axios from 'axios';
|
||||
import OrderSummary from 'pages/Order/Card/OrderSummary.vue';
|
||||
import OrderSearchbar from './Card/OrderSearchbar.vue';
|
||||
import OrderFilter from './Card/OrderFilter.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import OrderSearchbar from './Card/OrderSearchbar.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import OrderFilter from './Card/OrderFilter.vue';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import { toDateTimeFormat } from 'src/filters/date';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -171,9 +173,9 @@ const getDateColor = (date) => {
|
|||
today.setHours(0, 0, 0, 0);
|
||||
const timeTicket = new Date(date);
|
||||
timeTicket.setHours(0, 0, 0, 0);
|
||||
const comparation = today - timeTicket;
|
||||
if (comparation == 0) return 'bg-warning';
|
||||
if (comparation < 0) return 'bg-success';
|
||||
const difference = today - timeTicket;
|
||||
if (difference == 0) return 'bg-warning';
|
||||
if (difference < 0) return 'bg-success';
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
|
@ -201,8 +203,8 @@ const getDateColor = (date) => {
|
|||
},
|
||||
}"
|
||||
:user-params="{ showEmpty: false }"
|
||||
:right-search="false"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
redirect="order"
|
||||
>
|
||||
<template #column-clientFk="{ row }">
|
||||
|
|
|
@ -26,7 +26,7 @@ const routeFilter = {
|
|||
};
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
align: 'right',
|
||||
isId: true,
|
||||
name: 'id',
|
||||
label: 'Id',
|
||||
|
|
|
@ -43,7 +43,7 @@ const filter = {
|
|||
data-key="ShelvingSummary"
|
||||
>
|
||||
<template #header="{ entity }">
|
||||
<div>{{ entity.code }}</div>
|
||||
<div>{{ entity.id }} - {{ entity.code }}</div>
|
||||
</template>
|
||||
<template #body="{ entity }">
|
||||
<QCard class="vn-one">
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<script setup>
|
||||
import VnPaginate from 'components/ui/VnPaginate.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import CardList from 'components/ui/CardList.vue';
|
||||
import VnLv from 'components/ui/VnLv.vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
@ -12,7 +10,6 @@ import ShelvingSearchbar from 'pages/Shelving/Card/ShelvingSearchbar.vue';
|
|||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
|
||||
const stateStore = useStateStore();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -20,8 +17,6 @@ const filter = {
|
|||
include: [{ relation: 'parking' }],
|
||||
};
|
||||
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
|
||||
function navigate(id) {
|
||||
router.push({ path: `/shelving/${id}` });
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ import axios from 'axios';
|
|||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
const quasar = useQuasar();
|
||||
const { notify } = useNotify();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
const quasar = useQuasar();
|
||||
const route = useRoute();
|
||||
|
||||
const bankEntitiesRef = ref(null);
|
||||
const supplier = ref(null);
|
||||
|
|
|
@ -41,7 +41,7 @@ const getUrl = (section) => `#/supplier/${entityId.value}/${section}`;
|
|||
data-key="SupplierSummary"
|
||||
>
|
||||
<template #header>
|
||||
<span>{{ supplier.name }} - {{ supplier.id }}</span>
|
||||
<span>{{ supplier.id }} - {{ supplier.name }}</span>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
|
|
|
@ -14,7 +14,10 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
label: t('globals.id'),
|
||||
name: 'id',
|
||||
isTitle: true,
|
||||
isId: true,
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -24,6 +27,7 @@ const columns = computed(() => [
|
|||
columnFilter: {
|
||||
name: 'search',
|
||||
},
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -32,6 +36,7 @@ const columns = computed(() => [
|
|||
columnFilter: {
|
||||
inWhere: true,
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -40,6 +45,7 @@ const columns = computed(() => [
|
|||
columnFilter: {
|
||||
name: 'search',
|
||||
},
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -119,7 +125,6 @@ const columns = computed(() => [
|
|||
:right-search="false"
|
||||
order="id ASC"
|
||||
:columns="columns"
|
||||
auto-load
|
||||
/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ const columns = computed(() => [
|
|||
component: null,
|
||||
},
|
||||
columnClass: 'expand',
|
||||
cardVisible: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.salesPerson),
|
||||
},
|
||||
{
|
||||
|
@ -131,12 +132,14 @@ const columns = computed(() => [
|
|||
name: 'nickname',
|
||||
label: t('ticketList.nickname'),
|
||||
columnClass: 'expand',
|
||||
isTitle: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'addressNickname',
|
||||
label: t('ticketList.addressNickname'),
|
||||
columnClass: 'expand',
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
|
|
@ -1,15 +1,44 @@
|
|||
<script setup>
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
import TravelDescriptor from './TravelDescriptor.vue';
|
||||
import filter from './TravelFilter.js';
|
||||
import TravelFilter from '../TravelFilter.vue';
|
||||
|
||||
const filter = {
|
||||
fields: [
|
||||
'id',
|
||||
'ref',
|
||||
'shipped',
|
||||
'landed',
|
||||
'totalEntries',
|
||||
'warehouseInFk',
|
||||
'warehouseOutFk',
|
||||
'cargoSupplierFk',
|
||||
'agencyModeFk',
|
||||
],
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
{
|
||||
relation: 'warehouseOut',
|
||||
scope: {
|
||||
fields: ['name'],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Travel"
|
||||
base-url="Travels"
|
||||
:descriptor="TravelDescriptor"
|
||||
:filter="filter"
|
||||
search-data-key="TravelList"
|
||||
:filter="filter"
|
||||
:descriptor="TravelDescriptor"
|
||||
:filter-panel="TravelFilter"
|
||||
:searchbar-props="{
|
||||
url: 'Travels/filter',
|
||||
searchUrl: 'table',
|
||||
|
|
|
@ -240,7 +240,7 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
data-key="TravelSummary"
|
||||
>
|
||||
<template #header>
|
||||
<span>{{ travel.ref }} - {{ travel.id }}</span>
|
||||
<span>{{ travel.id }} - {{ travel.ref }}</span>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
|
|
|
@ -27,7 +27,7 @@ defineExpose({ states });
|
|||
<VnFilterPanel :data-key="props.dataKey" :search-button="true">
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<strong>{{ t(`travel.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -124,7 +124,7 @@ defineExpose({ states });
|
|||
is-outlined
|
||||
/>
|
||||
<VnInput
|
||||
:label="t('travel.travelList.tableVisibleColumns.daysOnward')"
|
||||
:label="t('travel.daysOnward')"
|
||||
v-model="params.daysOnward"
|
||||
lazy-rules
|
||||
is-outlined
|
||||
|
@ -147,6 +147,7 @@ en:
|
|||
landed: Landed
|
||||
landingHour: Landing Hour
|
||||
totalEntries: Σ
|
||||
daysOnward: Days Onward
|
||||
es:
|
||||
travel:
|
||||
Id: Id
|
||||
|
@ -159,4 +160,5 @@ es:
|
|||
landed: F.Entrega
|
||||
landingHour: Hora de entrega
|
||||
totalEntries: Σ
|
||||
daysOnward: Días en adelante
|
||||
</i18n>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<script setup>
|
||||
import { onMounted, ref, computed } from 'vue';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter, useRoute } from 'vue-router';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import TravelSummary from './Card/TravelSummary.vue';
|
||||
|
@ -11,11 +10,11 @@ import { toDate } from 'src/filters';
|
|||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import TravelFilter from './TravelFilter.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
const route = useRoute();
|
||||
const tableRef = ref();
|
||||
const $props = defineProps({
|
||||
|
@ -26,11 +25,6 @@ const $props = defineProps({
|
|||
});
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
const travelFilterRef = ref();
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
const cloneTravel = (travelData) => {
|
||||
const stringifiedTravelData = JSON.stringify(travelData);
|
||||
redirectToCreateView(stringifiedTravelData);
|
||||
|
@ -52,11 +46,11 @@ const columns = computed(() => [
|
|||
{
|
||||
align: 'left',
|
||||
name: 'id',
|
||||
label: t('globals.id'),
|
||||
isId: true,
|
||||
label: 'Id',
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
isId: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -145,7 +139,6 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.landed)),
|
||||
},
|
||||
|
@ -223,7 +216,6 @@ const columns = computed(() => [
|
|||
:user-params="{ daysOnward: 7 }"
|
||||
order="landed DESC"
|
||||
:columns="columns"
|
||||
auto-load
|
||||
:is-editable="false"
|
||||
>
|
||||
<template #column-status="{ row }">
|
||||
|
@ -282,7 +274,6 @@ const columns = computed(() => [
|
|||
</template>
|
||||
</VnTable>
|
||||
</template>
|
||||
|
||||
<i18n>
|
||||
en:
|
||||
Add entry: Add entry
|
||||
|
@ -296,7 +287,6 @@ es:
|
|||
Clone: Clonar
|
||||
Add entry: Añadir Entrada
|
||||
</i18n>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.is-active {
|
||||
color: #c8e484;
|
||||
|
|
|
@ -98,9 +98,7 @@ async function remove(row) {
|
|||
url="Wagons"
|
||||
:filter="filter"
|
||||
:columns="columns"
|
||||
auto-load
|
||||
order="id DESC"
|
||||
:right-search="false"
|
||||
:column-search="false"
|
||||
:default-mode="'card'"
|
||||
:disable-option="{ table: true }"
|
||||
|
|
|
@ -107,6 +107,7 @@ const columns = computed(() => [
|
|||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
action: (row) => viewSummary(row.id, WorkerSummary),
|
||||
isPrimary: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import axios from 'axios';
|
||||
|
||||
import { toCurrency } from 'src/filters';
|
||||
|
@ -9,7 +9,6 @@ import { toTimeFormat } from 'src/filters/date';
|
|||
import { useVnConfirm } from 'composables/useVnConfirm';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import ZoneSummary from 'src/pages/Zone/Card/ZoneSummary.vue';
|
||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
@ -24,7 +23,6 @@ const router = useRouter();
|
|||
const { notify } = useNotify();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const { openConfirmationModal } = useVnConfirm();
|
||||
const stateStore = useStateStore();
|
||||
const tableRef = ref();
|
||||
const warehouseOptions = ref([]);
|
||||
|
||||
|
@ -131,8 +129,6 @@ const handleClone = (id) => {
|
|||
() => clone(id)
|
||||
);
|
||||
};
|
||||
|
||||
onMounted(() => (stateStore.rightDrawer = true));
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -156,7 +152,6 @@ onMounted(() => (stateStore.rightDrawer = true));
|
|||
:columns="columns"
|
||||
redirect="zone"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<VnSelect
|
||||
|
|
|
@ -25,7 +25,7 @@ export default {
|
|||
path: 'list',
|
||||
name: 'ShelvingList',
|
||||
meta: {
|
||||
title: 'shelvingList',
|
||||
title: 'list',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Shelving/ShelvingList.vue'),
|
||||
|
|
|
@ -25,7 +25,7 @@ export default {
|
|||
path: 'list',
|
||||
name: 'WagonList',
|
||||
meta: {
|
||||
title: 'wagonsList',
|
||||
title: 'list',
|
||||
icon: 'vn:trolley',
|
||||
},
|
||||
component: () => import('src/pages/Wagon/WagonList.vue'),
|
||||
|
|
|
@ -38,7 +38,7 @@ export default {
|
|||
name: 'ZoneList',
|
||||
meta: {
|
||||
title: 'zonesList',
|
||||
icon: 'vn:zone',
|
||||
icon: 'view_list',
|
||||
},
|
||||
component: () => import('src/pages/Zone/ZoneList.vue'),
|
||||
},
|
||||
|
|
|
@ -15,6 +15,10 @@ export const useStateStore = defineStore('stateStore', () => {
|
|||
rightDrawer.value = !rightDrawer.value;
|
||||
}
|
||||
|
||||
function rightDrawerChangeValue(value) {
|
||||
rightDrawer.value = value;
|
||||
}
|
||||
|
||||
function toggleSubToolbar() {
|
||||
subToolbar.value = !subToolbar.value;
|
||||
}
|
||||
|
@ -50,5 +54,6 @@ export const useStateStore = defineStore('stateStore', () => {
|
|||
isRightDrawerShown,
|
||||
isSubToolbarShown,
|
||||
toggleSubToolbar,
|
||||
rightDrawerChangeValue,
|
||||
};
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ describe('TicketList', () => {
|
|||
cy.dataCy('ticketSummary').should('exist');
|
||||
});
|
||||
|
||||
it.only('Client list create new client', () => {
|
||||
it('Client list create new client', () => {
|
||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||
cy.dataCy('vnTableCreateBtn').click();
|
||||
const data = {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('VnBreadcrumbs', () => {
|
||||
const firstCard = '.q-infinite-scroll > :nth-child(1)';
|
||||
const lastBreadcrumb = '.q-breadcrumbs--last > .q-breadcrumbs__el';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
|
@ -13,10 +12,7 @@ describe('VnBreadcrumbs', () => {
|
|||
});
|
||||
|
||||
it('should get the correct breadcrumbs', () => {
|
||||
cy.visit('#/customer/list');
|
||||
cy.get('.q-breadcrumbs__el').should('have.length', 2);
|
||||
|
||||
cy.get(firstCard).click();
|
||||
cy.visit('#/customer/1/summary');
|
||||
cy.get(`${lastBreadcrumb} > .q-icon`).should('have.text', 'launch');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -9,15 +9,15 @@ describe('VnLog', () => {
|
|||
cy.visit(`/#/claim/${1}/log`);
|
||||
cy.openRightMenu();
|
||||
});
|
||||
// Se tiene que cambiar el Accept-Language a 'en', ya hay una tarea para eso #7189.
|
||||
xit('should filter by insert actions', () => {
|
||||
|
||||
it('should filter by insert actions', () => {
|
||||
cy.checkOption(':nth-child(7) > .q-checkbox');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Document');
|
||||
cy.validateContent(chips[1], 'Beginning');
|
||||
});
|
||||
|
||||
xit('should filter by entity', () => {
|
||||
it('should filter by entity', () => {
|
||||
cy.selectOption('.q-drawer--right .q-item > .q-select', 'Claim');
|
||||
cy.get('.q-page').click();
|
||||
cy.validateContent(chips[0], 'Claim');
|
||||
|
|
|
@ -22,6 +22,7 @@ describe('ZoneCreate', () => {
|
|||
...data,
|
||||
});
|
||||
cy.get('input[aria-label="Close"]').type('10:00');
|
||||
cy.get('body').click();
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
cy.get(notification).should('contains.text', 'Agency cannot be blank');
|
||||
});
|
||||
|
@ -32,6 +33,7 @@ describe('ZoneCreate', () => {
|
|||
Agency: { val: 'inhouse pickup', type: 'select' },
|
||||
});
|
||||
cy.get('input[aria-label="Close"]').type('10:00');
|
||||
cy.get('body').click();
|
||||
cy.get('.q-mt-lg > .q-btn--standard').click();
|
||||
cy.get(notification).should('contains.text', 'Data created');
|
||||
});
|
||||
|
|
|
@ -6,9 +6,7 @@ describe('ZoneList', () => {
|
|||
});
|
||||
|
||||
it('should filter by agency', () => {
|
||||
cy.get(
|
||||
':nth-child(1) > .column > .q-field > .q-field__inner > .q-field__control > .q-field__control-container'
|
||||
).type('{downArrow}{enter}');
|
||||
cy.get('input[aria-label="Agency"]').type('{downArrow}{enter}');
|
||||
});
|
||||
|
||||
it('should open the zone summary', () => {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import { Notify } from 'quasar';
|
||||
import { onRequest, onResponseError } from 'src/boot/axios';
|
||||
import { describe, expect, it, vi } from 'vitest';
|
||||
|
||||
|
@ -27,6 +26,7 @@ describe('Axios boot', () => {
|
|||
expect(resultConfig).toEqual(
|
||||
expect.objectContaining({
|
||||
headers: {
|
||||
'Accept-Language': 'en-US',
|
||||
Authorization: 'DEFAULT_TOKEN',
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue