0
0
Fork 0

Resolve conflicts

This commit is contained in:
William Buezas 2024-04-02 12:40:26 -03:00
commit addbe9345b
127 changed files with 1408 additions and 569 deletions

View File

@ -5,14 +5,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2416.01] - 2024-04-18
### Added
## [2414.01] - 2024-04-04 ## [2414.01] - 2024-04-04
### Added ### Added
- (Tickets) => Se añade la opción de clonar ticket. #6951
- (Parking) => Se añade la sección Parking. #5186
### Changed ### Changed
### Fixed ### Fixed
- (General) => Se corrige la redirección cuando hay 1 solo registro y cuando se aplica un filtro diferente al id al hacer una búsqueda general. #6893
## [2400.01] - 2024-01-04 ## [2400.01] - 2024-01-04
### Added ### Added

View File

@ -1,6 +1,6 @@
{ {
"name": "salix-front", "name": "salix-front",
"version": "24.14.0", "version": "24.16.0",
"description": "Salix frontend", "description": "Salix frontend",
"productName": "Salix", "productName": "Salix",
"author": "Verdnatura", "author": "Verdnatura",

View File

@ -29,7 +29,7 @@ module.exports = configure(function (/* ctx */) {
// app boot file (/src/boot) // app boot file (/src/boot)
// --> boot files are part of "main.js" // --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files // https://v2.quasar.dev/quasar-cli/boot-files
boot: ['i18n', 'axios', 'vnDate', 'validations'], boot: ['i18n', 'axios', 'vnDate', 'validations', 'quasar.defaults'],
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#css
css: ['app.scss'], css: ['app.scss'],
@ -117,6 +117,7 @@ module.exports = configure(function (/* ctx */) {
secure: false, secure: false,
}, },
}, },
open: false,
}, },
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework // https://v2.quasar.dev/quasar-cli-vite/quasar-config-js#framework

View File

@ -0,0 +1,5 @@
import { QTable } from 'quasar';
import setDefault from './setDefault';
setDefault(QTable, 'pagination', { rowsPerPage: 0 });
setDefault(QTable, 'hidePagination', true);

View File

@ -0,0 +1,18 @@
export default function (component, key, value) {
const prop = component.props[key];
switch (typeof prop) {
case 'object':
prop.default = value;
break;
case 'function':
component.props[key] = {
type: prop,
default: value,
};
break;
case 'undefined':
throw new Error('unknown prop: ' + key);
default:
throw new Error('unhandled type: ' + typeof prop);
}
}

21
src/boot/qformMixin.js Normal file
View File

@ -0,0 +1,21 @@
import { getCurrentInstance } from 'vue';
const filterAvailableInput = element => element.classList.contains('q-field__native') && !element.disabled
const filterAvailableText = element => element.__vueParentComponent.type.name === 'QInput' && element.__vueParentComponent?.attrs?.class !== 'vn-input-date';
export default {
mounted: function () {
const vm = getCurrentInstance();
if (vm.type.name === 'QForm')
if (!['searchbarForm','filterPanelForm'].includes(this.$el?.id)) {
// AUTOFOCUS
const elementsArray = Array.from(this.$el.elements);
const firstInputElement = elementsArray.filter(filterAvailableInput).find(filterAvailableText);
if (firstInputElement) {
firstInputElement.focus();
}
}
},
};

View File

@ -0,0 +1 @@
export * from './defaults/qTable';

6
src/boot/quasar.js Normal file
View File

@ -0,0 +1,6 @@
import { boot } from 'quasar/wrappers';
import qFormMixin from './qformMixin';
export default boot(({ app }) => {
app.mixin(qFormMixin);
});

View File

@ -60,3 +60,6 @@ async function fetch(fetchFilter = {}) {
} }
} }
</script> </script>
<template>
<template></template>
</template>

View File

@ -202,7 +202,6 @@ const selectItem = ({ id }) => {
<QTable <QTable
:columns="tableColumns" :columns="tableColumns"
:rows="tableRows" :rows="tableRows"
:pagination="{ rowsPerPage: 0 }"
:loading="loading" :loading="loading"
:hide-header="!tableRows || !tableRows.length > 0" :hide-header="!tableRows || !tableRows.length > 0"
:no-data-label="t('Enter a new search')" :no-data-label="t('Enter a new search')"

View File

@ -200,7 +200,6 @@ const selectTravel = ({ id }) => {
<QTable <QTable
:columns="tableColumns" :columns="tableColumns"
:rows="tableRows" :rows="tableRows"
:pagination="{ rowsPerPage: 0 }"
:loading="loading" :loading="loading"
:hide-header="!tableRows || !tableRows.length > 0" :hide-header="!tableRows || !tableRows.length > 0"
:no-data-label="t('Enter a new search')" :no-data-label="t('Enter a new search')"

View File

@ -234,6 +234,6 @@ async function togglePinned(item, event) {
max-width: 256px; max-width: 256px;
} }
.header { .header {
color: #999999; color: var(--vn-label-color);
} }
</style> </style>

View File

@ -2,7 +2,7 @@
import { computed } from 'vue'; import { computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
const { t } = useI18n(); const { t, te } = useI18n();
const props = defineProps({ const props = defineProps({
item: { item: {
@ -11,19 +11,30 @@ const props = defineProps({
}, },
}); });
const item = computed(() => props.item); // eslint-disable-line vue/no-dupe-keys const itemComputed = computed(() => {
const item = JSON.parse(JSON.stringify(props.item));
const [, , section] = item.title.split('.');
if (!te(item.title)) item.title = t(`globals.pageTitles.${section}`);
return item;
});
</script> </script>
<template> <template>
<QItem active-class="text-primary" :to="{ name: item.name }" clickable v-ripple> <QItem
<QItemSection avatar v-if="item.icon"> active-class="text-primary"
<QIcon :name="item.icon" /> :to="{ name: itemComputed.name }"
clickable
v-ripple
>
<QItemSection avatar v-if="itemComputed.icon">
<QIcon :name="itemComputed.icon" />
</QItemSection> </QItemSection>
<QItemSection avatar v-if="!item.icon"> <QItemSection avatar v-if="!itemComputed.icon">
<QIcon name="disabled_by_default" /> <QIcon name="disabled_by_default" />
</QItemSection> </QItemSection>
<QItemSection>{{ t(item.title) }}</QItemSection> <QItemSection>{{ t(itemComputed.title) }}</QItemSection>
<QItemSection side> <QItemSection side>
<slot name="side" :item="item" /> <slot name="side" :item="itemComputed" />
</QItemSection> </QItemSection>
</QItem> </QItem>
</template> </template>

View File

@ -106,7 +106,7 @@ const pinnedModulesRef = ref();
width: max-content; width: max-content;
} }
.q-header { .q-header {
background-color: var(--vn-dark); background-color: var(--vn-section-color);
} }
</style> </style>
<i18n> <i18n>

View File

@ -7,12 +7,16 @@ import axios from 'axios';
import { useState } from 'src/composables/useState'; import { useState } from 'src/composables/useState';
import { useSession } from 'src/composables/useSession'; import { useSession } from 'src/composables/useSession';
import { localeEquivalence } from 'src/i18n/index'; import { localeEquivalence } from 'src/i18n/index';
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
import VnRow from 'components/ui/VnRow.vue';
import FetchData from 'components/FetchData.vue';
const state = useState(); const state = useState();
const session = useSession(); const session = useSession();
const router = useRouter(); const router = useRouter();
const { t, locale } = useI18n(); const { t, locale } = useI18n();
import { useClipboard } from 'src/composables/useClipboard'; import { useClipboard } from 'src/composables/useClipboard';
import { ref } from 'vue';
const { copyText } = useClipboard(); const { copyText } = useClipboard();
const userLocale = computed({ const userLocale = computed({
get() { get() {
@ -45,6 +49,9 @@ const darkMode = computed({
const user = state.getUser(); const user = state.getUser();
const token = session.getTokenMultimedia(); const token = session.getTokenMultimedia();
const warehousesData = ref();
const companiesData = ref();
const accountBankData = ref();
onMounted(async () => { onMounted(async () => {
updatePreferences(); updatePreferences();
@ -87,10 +94,28 @@ function copyUserToken() {
</script> </script>
<template> <template>
<QMenu anchor="bottom left"> <FetchData
url="Warehouses"
order="name"
@on-fetch="(data) => (warehousesData = data)"
auto-load
/>
<FetchData
url="Companies"
order="name"
@on-fetch="(data) => (companiesData = data)"
auto-load
/>
<FetchData
url="Accountings"
order="name"
@on-fetch="(data) => (accountBankData = data)"
auto-load
/>
<QMenu anchor="bottom left" class="bg-vn-section-color">
<div class="row no-wrap q-pa-md"> <div class="row no-wrap q-pa-md">
<div class="column panel"> <div class="col column">
<div class="text-h6 q-mb-md"> <div class="text-h6 q-ma-sm q-mb-none">
{{ t('components.userPanel.settings') }} {{ t('components.userPanel.settings') }}
</div> </div>
<QToggle <QToggle
@ -114,7 +139,7 @@ function copyUserToken() {
<QSeparator vertical inset class="q-mx-lg" /> <QSeparator vertical inset class="q-mx-lg" />
<div class="column items-center panel"> <div class="col column items-center q-mb-sm">
<QAvatar size="80px"> <QAvatar size="80px">
<QImg <QImg
:src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`" :src="`/api/Images/user/160x160/${user.id}/download?access_token=${token}`"
@ -131,7 +156,6 @@ function copyUserToken() {
> >
@{{ user.name }} @{{ user.name }}
</div> </div>
<QBtn <QBtn
id="logout" id="logout"
color="orange" color="orange"
@ -141,17 +165,63 @@ function copyUserToken() {
icon="logout" icon="logout"
@click="logout()" @click="logout()"
v-close-popup v-close-popup
dense
/> />
</div> </div>
</div> </div>
<QSeparator inset class="q-mx-lg" />
<div class="col q-gutter-xs q-pa-md">
<VnRow>
<VnSelectFilter
:label="t('components.userPanel.localWarehouse')"
v-model="user.localWarehouseFk"
:options="warehousesData"
option-label="name"
option-value="id"
/>
<VnSelectFilter
:label="t('components.userPanel.localBank')"
hide-selected
v-model="user.localBankFk"
:options="accountBankData"
option-label="bank"
option-value="id"
></VnSelectFilter>
</VnRow>
<VnRow>
<VnSelectFilter
:label="t('components.userPanel.localCompany')"
hide-selected
v-model="user.companyFk"
:options="companiesData"
option-label="code"
option-value="id"
/>
<VnSelectFilter
:label="t('components.userPanel.userWarehouse')"
hide-selected
v-model="user.warehouseFk"
:options="warehousesData"
option-label="name"
option-value="id"
/>
</VnRow>
<VnRow>
<VnSelectFilter
:label="t('components.userPanel.userCompany')"
hide-selected
v-model="user.companyFk"
:options="companiesData"
option-label="code"
option-value="id"
style="flex: 0"
/>
</VnRow>
</div>
</QMenu> </QMenu>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.panel {
width: 150px;
}
.copyText { .copyText {
&:hover { &:hover {
cursor: alias; cursor: alias;

View File

@ -5,16 +5,16 @@ import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useCamelCase } from 'src/composables/useCamelCase'; import { useCamelCase } from 'src/composables/useCamelCase';
const router = useRouter(); const { currentRoute } = useRouter();
const quasar = useQuasar(); const { screen } = useQuasar();
const { t } = useI18n(); const { t, te } = useI18n();
let matched = ref([]); let matched = ref([]);
let breadcrumbs = ref([]); let breadcrumbs = ref([]);
let root = ref(null); let root = ref(null);
watchEffect(() => { watchEffect(() => {
matched.value = router.currentRoute.value.matched.filter( matched.value = currentRoute.value.matched.filter(
(matched) => Object.keys(matched.meta).length (matched) => Object.keys(matched.meta).length
); );
breadcrumbs.value.length = 0; breadcrumbs.value.length = 0;
@ -34,13 +34,17 @@ function getBreadcrumb(param) {
icon: param.meta.icon, icon: param.meta.icon,
path: param.path, path: param.path,
root: root.value, root: root.value,
locale: t(`globals.pageTitles.${param.meta.title}`),
}; };
if (quasar.screen.gt.sm) { if (screen.gt.sm) {
breadcrumb.name = param.name; breadcrumb.name = param.name;
breadcrumb.title = useCamelCase(param.meta.title); breadcrumb.title = useCamelCase(param.meta.title);
} }
const moduleLocale = `${breadcrumb.root}.pageTitles.${breadcrumb.title}`;
if (te(moduleLocale)) breadcrumb.locale = t(moduleLocale);
return breadcrumb; return breadcrumb;
} }
</script> </script>
@ -50,7 +54,7 @@ function getBreadcrumb(param) {
v-for="(breadcrumb, index) of breadcrumbs" v-for="(breadcrumb, index) of breadcrumbs"
:key="index" :key="index"
:icon="breadcrumb.icon" :icon="breadcrumb.icon"
:label="t(`${breadcrumb.root}.pageTitles.${breadcrumb.title}`)" :label="breadcrumb.locale"
:to="breadcrumb.path" :to="breadcrumb.path"
/> />
</QBreadcrumbs> </QBreadcrumbs>
@ -71,7 +75,7 @@ function getBreadcrumb(param) {
} }
&--last, &--last,
&__separator { &__separator {
color: var(--vn-label); color: var(--vn-label-color);
} }
} }
@media (max-width: $breakpoint-md) { @media (max-width: $breakpoint-md) {

View File

@ -198,9 +198,11 @@ function addDefaultData(data) {
en: en:
contentTypesInfo: Allowed file types {allowedContentTypes} contentTypesInfo: Allowed file types {allowedContentTypes}
EntryDmsDescription: Reference {reference} EntryDmsDescription: Reference {reference}
SupplierDmsDescription: Reference {reference}
es: es:
Generate identifier for original file: Generar identificador para archivo original Generate identifier for original file: Generar identificador para archivo original
contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes} contentTypesInfo: Tipos de archivo permitidos {allowedContentTypes}
EntryDmsDescription: Referencia {reference} EntryDmsDescription: Referencia {reference}
SupplierDmsDescription: Referencia {reference}
</i18n> </i18n>

View File

@ -218,7 +218,6 @@ function parseDms(data) {
/> />
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
hide-bottom hide-bottom
@ -304,7 +303,7 @@ function parseDms(data) {
row-gap: 20px; row-gap: 20px;
} }
.labelColor { .labelColor {
color: var(--vn-label); color: var(--vn-label-color);
} }
</style> </style>
<i18n> <i18n>

View File

@ -403,7 +403,7 @@ setLogTree();
auto-load auto-load
/> />
<div <div
class="column items-center logs origin-log" class="column items-center logs origin-log q-mt-md"
v-for="(originLog, originLogIndex) in logTree" v-for="(originLog, originLogIndex) in logTree"
:key="originLogIndex" :key="originLogIndex"
> >
@ -819,7 +819,7 @@ setLogTree();
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.q-card { .q-card {
background-color: var(--vn-gray); background-color: var(--vn-section-color);
} }
.q-item { .q-item {
min-height: 0px; min-height: 0px;
@ -836,7 +836,7 @@ setLogTree();
max-width: 400px; max-width: 400px;
& > .header { & > .header {
color: $dark; color: var(--vn-section-color);
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -916,7 +916,7 @@ setLogTree();
font-style: italic; font-style: italic;
} }
.model-id { .model-id {
color: var(--vn-label); color: var(--vn-label-color);
font-size: 0.9rem; font-size: 0.9rem;
} }
.q-btn { .q-btn {
@ -942,7 +942,7 @@ setLogTree();
} }
.change-info { .change-info {
overflow: hidden; overflow: hidden;
background-color: var(--vn-dark); background-color: var(--vn-section-color);
& > .date { & > .date {
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -981,7 +981,7 @@ setLogTree();
position: relative; position: relative;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
background-color: var(--vn-gray); background-color: var(--vn-section-color);
white-space: nowrap; white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
& > .q-icon { & > .q-icon {

View File

@ -82,7 +82,7 @@ const toggleForm = () => {
border-radius: 50px; border-radius: 50px;
&.--add-icon { &.--add-icon {
color: var(--vn-text); color: var(--vn-text-color);
background-color: $primary; background-color: $primary;
} }
} }

View File

@ -51,8 +51,8 @@ const $props = defineProps({
default: null, default: null,
}, },
limit: { limit: {
type: Number, type: [Number, String],
default: 30, default: '30',
}, },
}); });
@ -151,7 +151,7 @@ watch(modelValue, (newValue) => {
@on-fetch="(data) => setOptions(data)" @on-fetch="(data) => setOptions(data)"
:where="where || { [optionValue]: value }" :where="where || { [optionValue]: value }"
:limit="limit" :limit="limit"
:order-by="orderBy" :sort-by="sortBy"
:fields="fields" :fields="fields"
/> />
<QSelect <QSelect

View File

@ -0,0 +1,25 @@
<script setup>
const $props = defineProps({
url: { type: String, default: null },
text: { type: String, default: null },
icon: { type: String, default: 'open_in_new' },
});
</script>
<template>
<div class="titleBox">
<div class="header-link">
<a :href="$props.url" :class="$props.url ? 'link' : 'color-vn-text'">
{{ $props.text }}
<QIcon v-if="url" :name="$props.icon" />
</a>
</div>
</div>
</template>
<style scoped lang="scss">
a {
font-size: large;
}
.titleBox {
padding-bottom: 2%;
}
</style>

View File

@ -1,5 +1,5 @@
<script setup> <script setup>
import { onMounted, useSlots, watch, computed, ref } from 'vue'; import { onBeforeMount, useSlots, watch, computed, ref } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue'; import SkeletonDescriptor from 'components/ui/SkeletonDescriptor.vue';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
@ -41,29 +41,28 @@ const state = useState();
const slots = useSlots(); const slots = useSlots();
const { t } = useI18n(); const { t } = useI18n();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const entity = computed(() => useArrayData($props.dataKey).store.data); const arrayData = useArrayData($props.dataKey || $props.module, {
url: $props.url,
filter: $props.filter,
skip: 0,
});
const { store } = arrayData;
const entity = computed(() => store.data);
const isLoading = ref(false); const isLoading = ref(false);
defineExpose({ defineExpose({
getData, getData,
}); });
onMounted(async () => { onBeforeMount(async () => {
await getData(); await getData();
watch( watch(
() => $props.url, () => $props.url,
async (newUrl, lastUrl) => { async () => await getData()
if (newUrl == lastUrl) return;
await getData();
}
); );
}); });
async function getData() { async function getData() {
const arrayData = useArrayData($props.dataKey, { store.url = $props.url;
url: $props.url,
filter: $props.filter,
skip: 0,
});
isLoading.value = true; isLoading.value = true;
try { try {
const { data } = await arrayData.fetch({ append: false, updateRouter: false }); const { data } = await arrayData.fetch({ append: false, updateRouter: false });
@ -175,7 +174,7 @@ const emit = defineEmits(['onFetch']);
<style lang="scss"> <style lang="scss">
.body { .body {
background-color: var(--vn-gray); background-color: var(--vn-section-color);
.text-h5 { .text-h5 {
padding-top: 5px; padding-top: 5px;
padding-bottom: 5px; padding-bottom: 5px;
@ -191,7 +190,7 @@ const emit = defineEmits(['onFetch']);
display: flex; display: flex;
padding: 2px 16px; padding: 2px 16px;
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
font-size: 12px; font-size: 12px;
&:not(:has(a))::after { &:not(:has(a))::after {
@ -199,7 +198,7 @@ const emit = defineEmits(['onFetch']);
} }
} }
.value { .value {
color: var(--vn-text); color: var(--vn-text-color);
font-size: 14px; font-size: 14px;
margin-left: 12px; margin-left: 12px;
overflow: hidden; overflow: hidden;
@ -224,13 +223,13 @@ const emit = defineEmits(['onFetch']);
} }
} }
.subtitle { .subtitle {
color: var(--vn-text); color: var(--vn-text-color);
font-size: 16px; font-size: 16px;
margin-bottom: 15px; margin-bottom: 15px;
} }
.list-box { .list-box {
.q-item__label { .q-item__label {
color: var(--vn-label); color: var(--vn-label-color);
} }
} }
.descriptor { .descriptor {

View File

@ -61,7 +61,7 @@ const toggleCardCheck = (item) => {
} }
.q-chip-color { .q-chip-color {
color: var(--vn-label); color: var(--vn-label-color) !important;
} }
.card-list-body { .card-list-body {
@ -75,7 +75,7 @@ const toggleCardCheck = (item) => {
width: 50%; width: 50%;
.label { .label {
width: 35%; width: 35%;
color: var(--vn-label); color: var(--vn-label-color);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@ -117,7 +117,7 @@ const toggleCardCheck = (item) => {
transition: background-color 0.2s; transition: background-color 0.2s;
} }
.card:hover { .card:hover {
background-color: var(--vn-gray); background-color: var(--vn-section-color);
} }
.list-items { .list-items {
width: 75%; width: 75%;

View File

@ -1,11 +1,10 @@
<script setup> <script setup>
import { onMounted, ref, watch } from 'vue'; import { ref, computed, watch, onBeforeMount } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import axios from 'axios';
import SkeletonSummary from 'components/ui/SkeletonSummary.vue'; import SkeletonSummary from 'components/ui/SkeletonSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import { useArrayData } from 'src/composables/useArrayData';
const entity = ref();
const props = defineProps({ const props = defineProps({
url: { url: {
type: String, type: String,
@ -19,43 +18,48 @@ const props = defineProps({
type: Number, type: Number,
default: null, default: null,
}, },
dataKey: {
type: String,
default: '',
},
}); });
const emit = defineEmits(['onFetch']); const emit = defineEmits(['onFetch']);
const route = useRoute(); const route = useRoute();
const isSummary = ref(); const isSummary = ref();
const arrayData = useArrayData(props.dataKey || route.meta.moduleName, {
url: props.url,
filter: props.filter,
skip: 0,
});
const { store } = arrayData;
const entity = computed(() => store.data);
const isLoading = ref(false);
defineExpose({ defineExpose({
entity, entity,
fetch, fetch,
}); });
onMounted(() => { onBeforeMount(async () => {
isSummary.value = String(route.path).endsWith('/summary'); isSummary.value = String(route.path).endsWith('/summary');
fetch(); await fetch();
watch(props, async () => await fetch());
}); });
async function fetch() { async function fetch() {
const params = {}; store.url = props.url;
isLoading.value = true;
if (props.filter) params.filter = JSON.stringify(props.filter); const { data } = await arrayData.fetch({ append: false, updateRouter: false });
const { data } = await axios.get(props.url, { params });
entity.value = data;
emit('onFetch', data); emit('onFetch', data);
isLoading.value = false;
} }
watch(props, async () => {
entity.value = null;
fetch();
});
</script> </script>
<template> <template>
<div class="summary container"> <div class="summary container">
<QCard class="cardSummary"> <QCard class="cardSummary">
<SkeletonSummary v-if="!entity" /> <SkeletonSummary v-if="!entity || isLoading" />
<template v-if="entity"> <template v-if="entity && !isLoading">
<div class="summaryHeader bg-primary q-pa-sm text-weight-bolder"> <div class="summaryHeader bg-primary q-pa-sm text-weight-bolder">
<slot name="header-left"> <slot name="header-left">
<router-link <router-link
@ -107,7 +111,7 @@ watch(props, async () => {
justify-content: space-evenly; justify-content: space-evenly;
gap: 10px; gap: 10px;
padding: 10px; padding: 10px;
background-color: var(--vn-gray); background-color: var(--vn-section-color);
> .q-card.vn-one { > .q-card.vn-one {
flex: 1; flex: 1;
@ -124,7 +128,7 @@ watch(props, async () => {
> .q-card { > .q-card {
width: 100%; width: 100%;
background-color: var(--vn-gray); background-color: var(--vn-section-color);
padding: 7px; padding: 7px;
font-size: 16px; font-size: 16px;
min-width: 275px; min-width: 275px;
@ -134,7 +138,7 @@ watch(props, async () => {
flex-direction: row; flex-direction: row;
margin-top: 2px; margin-top: 2px;
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
width: 8em; width: 8em;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -144,7 +148,7 @@ watch(props, async () => {
flex-shrink: 0; flex-shrink: 0;
} }
.value { .value {
color: var(--vn-text); color: var(--vn-text-color);
overflow: hidden; overflow: hidden;
} }
} }
@ -163,12 +167,12 @@ watch(props, async () => {
margin-bottom: 9px; margin-bottom: 9px;
& .q-checkbox__label { & .q-checkbox__label {
margin-left: 31px; margin-left: 31px;
color: var(--vn-text); color: var(--vn-text-color);
} }
& .q-checkbox__inner { & .q-checkbox__inner {
position: absolute; position: absolute;
left: 0; left: 0;
color: var(--vn-label); color: var(--vn-label-color);
} }
} }
} }

View File

@ -164,7 +164,7 @@ function formatValue(value) {
</script> </script>
<template> <template>
<QForm @submit="search"> <QForm @submit="search" id="filterPanelForm">
<QList dense> <QList dense>
<QItem class="q-mt-xs"> <QItem class="q-mt-xs">
<QItemSection top> <QItemSection top>

View File

@ -1,11 +1,9 @@
<script setup> <script setup>
import { onMounted, ref } from 'vue'; import { onMounted, ref } from 'vue';
import { useRouter, useRoute } from 'vue-router'; import { useRouter } from 'vue-router';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import VnInput from 'src/components/common/VnInput.vue';
import { useArrayData } from 'composables/useArrayData'; import { useArrayData } from 'composables/useArrayData';
import VnInput from 'src/components/common/VnInput.vue';
const quasar = useQuasar(); const quasar = useQuasar();
@ -68,9 +66,8 @@ const props = defineProps({
}); });
const router = useRouter(); const router = useRouter();
const route = useRoute();
const arrayData = useArrayData(props.dataKey, { ...props }); const arrayData = useArrayData(props.dataKey, { ...props });
const store = arrayData.store; const { store } = arrayData;
const searchText = ref(''); const searchText = ref('');
onMounted(() => { onMounted(() => {
@ -92,23 +89,31 @@ async function search() {
}); });
if (!props.redirect) return; if (!props.redirect) return;
if (props.customRouteRedirectName) { if (props.customRouteRedirectName)
router.push({ return router.push({
name: props.customRouteRedirectName, name: props.customRouteRedirectName,
params: { id: searchText.value }, params: { id: searchText.value },
}); });
return;
}
const { matched: matches } = route; const { matched: matches } = router.currentRoute.value;
const { path } = matches[matches.length - 1]; const { path } = matches.at(-1);
const newRoute = path.replace(':id', searchText.value); const [, moduleName] = path.split('/');
await router.push(newRoute);
if (!store.data.length || store.data.length > 1)
return router.push({ path: `/${moduleName}/list` });
const targetId = store.data[0].id;
let targetUrl;
if (path.endsWith('/list')) targetUrl = path.replace('/list', `/${targetId}/summary`);
else if (path.includes(':id')) targetUrl = path.replace(':id', targetId);
await router.push({ path: targetUrl });
} }
</script> </script>
<template> <template>
<QForm @submit="search"> <QForm @submit="search" id="searchbarForm">
<VnInput <VnInput
id="searchbar" id="searchbar"
v-model="searchText" v-model="searchText"
@ -163,7 +168,12 @@ async function search() {
} }
#searchbar { #searchbar {
.q-field--standout.q-field--highlighted .q-field__control { .q-field--standout.q-field--highlighted .q-field__control {
background-color: var(--vn-text); background-color: white;
color: black;
.q-field__native,
.q-icon {
color: black !important;
}
} }
} }
</style> </style>

View File

@ -14,7 +14,7 @@ onUnmounted(() => {
</script> </script>
<template> <template>
<QToolbar class="bg-vn-dark justify-end sticky"> <QToolbar class="justify-end sticky">
<slot name="st-data"> <slot name="st-data">
<div id="st-data"></div> <div id="st-data"></div>
</slot> </slot>

View File

@ -4,7 +4,7 @@ import { useQuasar } from 'quasar';
export function usePrintService() { export function usePrintService() {
const quasar = useQuasar(); const quasar = useQuasar();
const { getToken } = useSession(); const { getTokenMultimedia } = useSession();
function sendEmail(path, params) { function sendEmail(path, params) {
return axios.post(path, params).then(() => return axios.post(path, params).then(() =>
@ -19,7 +19,7 @@ export function usePrintService() {
function openReport(path, params) { function openReport(path, params) {
params = Object.assign( params = Object.assign(
{ {
access_token: getToken(), access_token: getTokenMultimedia(),
}, },
params params
); );

View File

@ -2,29 +2,33 @@
@import './icons.scss'; @import './icons.scss';
body.body--light { body.body--light {
--fount-color: black; --font-color: black;
--vn-sectionColor: #ffffff; --vn-section-color: #e0e0e0;
--vn-pageColor: #e0e0e0; --vn-page-color: #ffffff;
background-color: var(--vn-pageColor); --vn-text-color: var(--font-color);
--vn-label-color: #5f5f5f;
--vn-accent-color: #e7e3e3;
background-color: var(--vn-page-color);
.q-header .q-toolbar { .q-header .q-toolbar {
color: var(--fount-color); color: var(--font-color);
}
.q-card,
.q-table,
.q-table__bottom,
.q-drawer {
background-color: var(--vn-section-color);
} }
--vn-text: var(--fount-color);
--vn-gray: var(--vn-sectionColor);
--vn-label: #5f5f5f;
--vn-dark: var(--vn-sectionColor);
--vn-light-gray: #e7e3e3;
} }
body.body--dark { body.body--dark {
--vn-pageColor: #222; --vn-section-color: #403c3c;
--vn-SectionColor: #3c3b3b; --vn-text-color: white;
background-color: var(--vn-pageColor); --vn-label-color: #a8a8a8;
--vn-text: white; --vn-accent-color: #424242;
--vn-gray: var(--vn-SectionColor);
--vn-label: #a8a8a8; background-color: #222;
--vn-dark: var(--vn-SectionColor);
--vn-light-gray: #424242;
} }
a { a {
@ -39,6 +43,9 @@ a {
.tx-color-link { .tx-color-link {
color: $color-link !important; color: $color-link !important;
} }
.tx-color-font {
color: $color-link !important;
}
.header-link { .header-link {
color: $color-link !important; color: $color-link !important;
@ -59,19 +66,19 @@ a {
// Removes chrome autofill background // Removes chrome autofill background
input:-webkit-autofill, input:-webkit-autofill,
select:-webkit-autofill { select:-webkit-autofill {
color: var(--vn-text); color: var(--vn-text-color);
font-family: $typography-font-family; font-family: $typography-font-family;
-webkit-text-fill-color: var(--vn-text); -webkit-text-fill-color: var(--vn-text-color);
-webkit-background-clip: text !important; -webkit-background-clip: text !important;
background-clip: text !important; background-clip: text !important;
} }
.bg-vn-dark { .bg-vn-section-color {
background-color: var(--vn-dark); background-color: var(--vn-section-color);
} }
.color-vn-text { .color-vn-text {
color: var(--vn-text); color: var(--vn-text-color);
} }
.color-vn-white { .color-vn-white {
@ -84,8 +91,8 @@ select:-webkit-autofill {
} }
.vn-card { .vn-card {
background-color: var(--vn-gray); background-color: var(--vn-section-color);
color: var(--vn-text); color: var(--vn-text-color);
border-radius: 8px; border-radius: 8px;
} }
@ -95,11 +102,11 @@ select:-webkit-autofill {
} }
.bg-vn-primary-row { .bg-vn-primary-row {
background-color: var(--vn-dark); background-color: var(--vn-section-color);
} }
.bg-vn-secondary-row { .bg-vn-secondary-row {
background-color: var(--vn-light-gray); background-color: var(--vn-accent-color);
} }
.fill-icon { .fill-icon {
@ -108,7 +115,7 @@ select:-webkit-autofill {
.vn-table-separation-row { .vn-table-separation-row {
height: 16px !important; height: 16px !important;
background-color: var(--vn-gray) !important; background-color: var(--vn-section-color) !important;
} }
/* Estilo para el asterisco en campos requeridos */ /* Estilo para el asterisco en campos requeridos */
@ -116,6 +123,10 @@ select:-webkit-autofill {
content: ' *'; content: ' *';
} }
.q-chip {
color: black;
}
input[type='number'] { input[type='number'] {
-moz-appearance: textfield; -moz-appearance: textfield;
} }

View File

@ -14,10 +14,10 @@
// Tip: to add new colors https://quasar.dev/style/color-palette/#adding-your-own-colors // Tip: to add new colors https://quasar.dev/style/color-palette/#adding-your-own-colors
$primary: #ec8916; $primary: #ec8916;
$secondary: $primary; $secondary: $primary;
$positive: #21ba45; $positive: #c8e484;
$negative: #c10015; $negative: #fb5252;
$info: #31ccec; $info: #84d0e2;
$warning: #f2c037; $warning: #f4b974;
// Pendiente de cuadrar con la base de datos // Pendiente de cuadrar con la base de datos
$success: $positive; $success: $positive;
$alert: $negative; $alert: $negative;

View File

@ -85,6 +85,13 @@ export default {
selectFile: 'Select a file', selectFile: 'Select a file',
copyClipboard: 'Copy on clipboard', copyClipboard: 'Copy on clipboard',
salesPerson: 'SalesPerson', salesPerson: 'SalesPerson',
code: 'Code',
pageTitles: {
summary: 'Summary',
basicData: 'Basic data',
log: 'Logs',
parkingList: 'Parkings list',
},
}, },
errors: { errors: {
statusUnauthorized: 'Access denied', statusUnauthorized: 'Access denied',
@ -492,6 +499,7 @@ export default {
request: 'Request', request: 'Request',
weight: 'Weight', weight: 'Weight',
goTo: 'Go to', goTo: 'Go to',
summaryAmount: 'Summary',
}, },
}, },
claim: { claim: {
@ -686,6 +694,19 @@ export default {
recyclable: 'Recyclable', recyclable: 'Recyclable',
}, },
}, },
parking: {
pickingOrder: 'Picking order',
sector: 'Sector',
row: 'Row',
column: 'Column',
pageTitles: {
parking: 'Parking',
},
searchBar: {
info: 'You can search by parking code',
label: 'Search parking...',
},
},
invoiceIn: { invoiceIn: {
pageTitles: { pageTitles: {
invoiceIns: 'Invoices In', invoiceIns: 'Invoices In',
@ -839,6 +860,7 @@ export default {
pda: 'PDA', pda: 'PDA',
notifications: 'Notifications', notifications: 'Notifications',
pbx: 'Private Branch Exchange', pbx: 'Private Branch Exchange',
log: 'Log',
}, },
list: { list: {
name: 'Name', name: 'Name',
@ -1015,6 +1037,7 @@ export default {
addresses: 'Addresses', addresses: 'Addresses',
consumption: 'Consumption', consumption: 'Consumption',
agencyTerm: 'Agency agreement', agencyTerm: 'Agency agreement',
dms: 'File management',
}, },
list: { list: {
payMethod: 'Pay method', payMethod: 'Pay method',
@ -1205,6 +1228,11 @@ export default {
copyToken: 'Token copied to clipboard', copyToken: 'Token copied to clipboard',
settings: 'Settings', settings: 'Settings',
logOut: 'Log Out', logOut: 'Log Out',
localWarehouse: 'Local warehouse',
localBank: 'Local bank',
localCompany: 'Local company',
userWarehouse: 'User warehouse',
userCompany: 'User company',
}, },
smartCard: { smartCard: {
downloadFile: 'Download file', downloadFile: 'Download file',

View File

@ -85,6 +85,13 @@ export default {
selectFile: 'Seleccione un fichero', selectFile: 'Seleccione un fichero',
copyClipboard: 'Copiar en portapapeles', copyClipboard: 'Copiar en portapapeles',
salesPerson: 'Comercial', salesPerson: 'Comercial',
code: 'Código',
pageTitles: {
summary: 'Resumen',
basicData: 'Datos básicos',
log: 'Historial',
parkingList: 'Listado de parkings',
},
}, },
errors: { errors: {
statusUnauthorized: 'Acceso denegado', statusUnauthorized: 'Acceso denegado',
@ -491,6 +498,7 @@ export default {
request: 'Petición de compra', request: 'Petición de compra',
weight: 'Peso', weight: 'Peso',
goTo: 'Ir a', goTo: 'Ir a',
summaryAmount: 'Resumen',
}, },
}, },
claim: { claim: {
@ -744,6 +752,18 @@ export default {
recyclable: 'Reciclable', recyclable: 'Reciclable',
}, },
}, },
parking: {
pickingOrder: 'Orden de recogida',
row: 'Fila',
column: 'Columna',
pageTitles: {
parking: 'Parking',
},
searchBar: {
info: 'Puedes buscar por código de parking',
label: 'Buscar parking...',
},
},
invoiceIn: { invoiceIn: {
pageTitles: { pageTitles: {
invoiceIns: 'Fact. recibidas', invoiceIns: 'Fact. recibidas',
@ -839,6 +859,7 @@ export default {
pda: 'PDA', pda: 'PDA',
notifications: 'Notificaciones', notifications: 'Notificaciones',
pbx: 'Centralita', pbx: 'Centralita',
log: 'Historial',
}, },
list: { list: {
name: 'Nombre', name: 'Nombre',
@ -1015,6 +1036,7 @@ export default {
addresses: 'Direcciones', addresses: 'Direcciones',
consumption: 'Consumo', consumption: 'Consumo',
agencyTerm: 'Acuerdo agencia', agencyTerm: 'Acuerdo agencia',
dms: 'Gestión documental',
}, },
list: { list: {
payMethod: 'Método de pago', payMethod: 'Método de pago',
@ -1205,6 +1227,11 @@ export default {
copyToken: 'Token copiado al portapapeles', copyToken: 'Token copiado al portapapeles',
settings: 'Configuración', settings: 'Configuración',
logOut: 'Cerrar sesión', logOut: 'Cerrar sesión',
localWarehouse: 'Almacén local',
localBank: 'Banco local',
localCompany: 'Empresa local',
userWarehouse: 'Almacén del usuario',
userCompany: 'Empresa del usuario',
}, },
smartCard: { smartCard: {
downloadFile: 'Descargar archivo', downloadFile: 'Descargar archivo',

View File

@ -11,5 +11,3 @@ const quasar = useQuasar();
<QFooter v-if="quasar.platform.is.mobile"></QFooter> <QFooter v-if="quasar.platform.is.mobile"></QFooter>
</QLayout> </QLayout>
</template> </template>
<style lang="scss" scoped></style>

View File

@ -40,7 +40,7 @@ const langs = ['en', 'es'];
<template> <template>
<QLayout view="hHh LpR fFf"> <QLayout view="hHh LpR fFf">
<QHeader reveal class="bg-vn-dark"> <QHeader reveal class="bg-vn-section-color">
<QToolbar class="justify-end"> <QToolbar class="justify-end">
<QBtn <QBtn
id="switchLanguage" id="switchLanguage"

View File

@ -291,8 +291,6 @@ async function importToNewRefundTicket() {
selection="multiple" selection="multiple"
v-model:selected="selectedRows" v-model:selected="selectedRows"
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
:hide-bottom="true"
> >
<template #body-cell-ticket="{ value }"> <template #body-cell-ticket="{ value }">
<QTd align="center"> <QTd align="center">

View File

@ -107,7 +107,11 @@ onMounted(async () => {
<template #body="{ entity }"> <template #body="{ entity }">
<VnLv v-if="entity.claimState" :label="t('claim.card.state')"> <VnLv v-if="entity.claimState" :label="t('claim.card.state')">
<template #value> <template #value>
<QBadge :color="stateColor(entity.claimState.code)" dense> <QBadge
:color="stateColor(entity.claimState.code)"
text-color="black"
dense
>
{{ entity.claimState.description }} {{ entity.claimState.description }}
</QBadge> </QBadge>
</template> </template>

View File

@ -150,10 +150,8 @@ const columns = computed(() => [
<QTable <QTable
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
:pagination="{ rowsPerPage: 0 }"
row-key="$index" row-key="$index"
selection="multiple" selection="multiple"
hide-pagination
v-model:selected="selected" v-model:selected="selected"
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
table-header-class="text-left" table-header-class="text-left"

View File

@ -161,7 +161,7 @@ function showImportDialog() {
<div class="row q-gutter-md"> <div class="row q-gutter-md">
<div> <div>
{{ t('Amount') }} {{ t('Amount') }}
<QChip :dense="$q.screen.lt.sm"> <QChip :dense="$q.screen.lt.sm" text-color="white">
{{ toCurrency(amount) }} {{ toCurrency(amount) }}
</QChip> </QChip>
</div> </div>
@ -201,11 +201,9 @@ function showImportDialog() {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
:dense="$q.screen.lt.md" :dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: 0 }"
row-key="id" row-key="id"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"
hide-pagination
:grid="$q.screen.lt.md" :grid="$q.screen.lt.md"
> >
<template #body-cell-claimed="{ row, value }"> <template #body-cell-claimed="{ row, value }">

View File

@ -121,7 +121,6 @@ function cancel() {
class="my-sticky-header-table" class="my-sticky-header-table"
:columns="columns" :columns="columns"
:rows="claimableSales" :rows="claimableSales"
:pagination="{ rowsPerPage: 10 }"
row-key="saleFk" row-key="saleFk"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"

View File

@ -11,6 +11,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue'; import ClaimNotes from 'src/pages/Claim/Card/ClaimNotes.vue';
import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue';
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue'; import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -180,10 +181,10 @@ function openDialog(dmsId) {
</template> </template>
<template #body="{ entity: { claim, salesClaimed, developments } }"> <template #body="{ entity: { claim, salesClaimed, developments } }">
<QCard class="vn-one"> <QCard class="vn-one">
<a class="header header-link" :href="`#/claim/${entityId}/basic-data`"> <VnTitle
{{ t('claim.pageTitles.basicData') }} :url="`#/claim/${entityId}/basic-data`"
<QIcon name="open_in_new" /> :text="t('claim.pageTitles.basicData')"
</a> />
<VnLv <VnLv
:label="t('claim.summary.created')" :label="t('claim.summary.created')"
:value="toDate(claim.created)" :value="toDate(claim.created)"
@ -226,10 +227,10 @@ function openDialog(dmsId) {
/> />
</QCard> </QCard>
<QCard class="vn-three"> <QCard class="vn-three">
<a class="header header-link" :href="`#/claim/${entityId}/notes`"> <VnTitle
{{ t('claim.summary.notes') }} :url="`#/claim/${entityId}/notes`"
<QIcon name="open_in_new" /> :text="t('claim.summary.notes')"
</a> />
<ClaimNotes <ClaimNotes
:id="entityId" :id="entityId"
:add-note="false" :add-note="false"
@ -238,10 +239,10 @@ function openDialog(dmsId) {
/> />
</QCard> </QCard>
<QCard class="vn-two" v-if="salesClaimed.length > 0"> <QCard class="vn-two" v-if="salesClaimed.length > 0">
<a class="header header-link" :href="`#/claim/${entityId}/lines`"> <VnTitle
{{ t('claim.summary.details') }} :url="`#/claim/${entityId}/lines`"
<QIcon name="open_in_new" /> :text="t('claim.summary.details')"
</a> />
<QTable <QTable
:columns="detailsColumns" :columns="detailsColumns"
:rows="salesClaimed" :rows="salesClaimed"
@ -280,11 +281,10 @@ function openDialog(dmsId) {
</QTable> </QTable>
</QCard> </QCard>
<QCard class="vn-two" v-if="developments.length > 0"> <QCard class="vn-two" v-if="developments.length > 0">
<a class="header header-link" :href="claimUrl + 'development'"> <VnTitle
{{ t('claim.summary.development') }} :url="claimUrl + 'development'"
<QIcon name="open_in_new" /> :text="t('claim.summary.development')"
</a> />
<QTable <QTable
:columns="developmentColumns" :columns="developmentColumns"
:rows="developments" :rows="developments"
@ -303,10 +303,10 @@ function openDialog(dmsId) {
</QTable> </QTable>
</QCard> </QCard>
<QCard class="vn-max" v-if="claimDms.length > 0"> <QCard class="vn-max" v-if="claimDms.length > 0">
<a class="header header-link" :href="`#/claim/${entityId}/photos`"> <VnTitle
{{ t('claim.summary.photos') }} :url="`#/claim/${entityId}/photos`"
<QIcon name="open_in_new" /> :text="t('claim.summary.photos')"
</a> />
<div class="container"> <div class="container">
<div <div
class="multimedia-container" class="multimedia-container"
@ -346,10 +346,7 @@ function openDialog(dmsId) {
</QCard> </QCard>
<QCard class="vn-max"> <QCard class="vn-max">
<a class="header header-link" :href="claimUrl + 'action'"> <VnTitle :url="claimUrl + 'action'" :text="t('claim.summary.actions')" />
{{ t('claim.summary.actions') }}
<QIcon name="open_in_new" class="link" />
</a>
<div id="slider-container" class="q-px-xl q-py-md"> <div id="slider-container" class="q-px-xl q-py-md">
<QSlider <QSlider
v-model="claim.responsibility" v-model="claim.responsibility"

View File

@ -108,7 +108,11 @@ function navigate(event, id) {
/> />
<VnLv :label="t('claim.list.state')"> <VnLv :label="t('claim.list.state')">
<template #value> <template #value>
<QBadge :color="stateColor(row.stateCode)" dense> <QBadge
text-color="black"
:color="stateColor(row.stateCode)"
dense
>
{{ row.stateDescription }} {{ row.stateDescription }}
</QBadge> </QBadge>
</template> </template>
@ -118,7 +122,6 @@ function navigate(event, id) {
<QBtn <QBtn
:label="t('globals.description')" :label="t('globals.description')"
@click.stop @click.stop
class="bg-vn-dark"
outline outline
style="margin-top: 15px" style="margin-top: 15px"
> >

View File

@ -198,7 +198,6 @@ const updateCompanyId = (id) => {
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
row-key="id" row-key="id"

View File

@ -150,14 +150,14 @@ const toCustomerConsigneeEdit = (consigneeId) => {
<style lang="scss" scoped> <style lang="scss" scoped>
.consignees-card { .consignees-card {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-accent-color);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background-color: var(--vn-light-gray); background-color: var(--vn-accent-color);
} }
} }
</style> </style>

View File

@ -97,13 +97,7 @@ const toCustomerCreditCreate = () => {
<template> <template>
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable :columns="columns" :rows="rows" class="full-width q-mt-md" row-key="id">
:columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows"
class="full-width q-mt-md"
row-key="id"
>
<template #body-cell="props"> <template #body-cell="props">
<QTd :props="props"> <QTd :props="props">
<QTr :props="props" class="cursor-pointer"> <QTr :props="props" class="cursor-pointer">

View File

@ -140,7 +140,6 @@ const toCustomerGreugeCreate = () => {
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
row-key="id" row-key="id"
@ -180,13 +179,13 @@ const toCustomerGreugeCreate = () => {
<style lang="scss"> <style lang="scss">
.consignees-card { .consignees-card {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-accent-color);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
} }
.label-color { .label-color {
color: var(--vn-label); color: var(--vn-label-color);
} }
</style> </style>

View File

@ -85,12 +85,12 @@ const toCustomerNoteCreate = () => {
<style lang="scss"> <style lang="scss">
.custom-border { .custom-border {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-accent-color);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
} }
.label-color { .label-color {
color: var(--vn-label); color: var(--vn-label-color);
} }
</style> </style>

View File

@ -97,7 +97,6 @@ const toCustomerRecoverieCreate = () => {
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
row-key="id" row-key="id"
@ -137,13 +136,13 @@ const toCustomerRecoverieCreate = () => {
<style lang="scss"> <style lang="scss">
.consignees-card { .consignees-card {
border: 2px solid var(--vn-light-gray); border: 2px solid var(--vn-accent-color);
border-radius: 10px; border-radius: 10px;
padding: 10px; padding: 10px;
} }
.label-color { .label-color {
color: var(--vn-label); color: var(--vn-label-color);
} }
</style> </style>

View File

@ -7,6 +7,7 @@ import CardSummary from 'components/ui/CardSummary.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue'; import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -62,10 +63,10 @@ const creditWarning = computed(() => {
<CardSummary ref="summary" :url="`Clients/${entityId}/summary`"> <CardSummary ref="summary" :url="`Clients/${entityId}/summary`">
<template #body="{ entity }"> <template #body="{ entity }">
<QCard class="vn-one"> <QCard class="vn-one">
<a class="header header-link" :href="`#/customer/${entityId}/basic-data`"> <VnTitle
{{ t('customer.summary.basicData') }} :url="`#/customer/${entityId}/basic-data`"
<QIcon name="open_in_new" /> :text="t('customer.summary.basicData')"
</a> />
<VnLv :label="t('customer.summary.customerId')" :value="entity.id" /> <VnLv :label="t('customer.summary.customerId')" :value="entity.id" />
<VnLv :label="t('customer.summary.name')" :value="entity.name" /> <VnLv :label="t('customer.summary.name')" :value="entity.name" />
<VnLv :label="t('customer.summary.contact')" :value="entity.contact" /> <VnLv :label="t('customer.summary.contact')" :value="entity.contact" />
@ -96,13 +97,10 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<a <VnTitle
class="header header-link" :url="`#/customer/${entityId}/fiscal-data`"
:href="`#/customer/${entityId}/fiscal-data`" :text="t('customer.summary.fiscalAddress')"
> />
{{ t('customer.summary.fiscalAddress') }}
<QIcon name="open_in_new" />
</a>
<VnLv <VnLv
:label="t('customer.summary.socialName')" :label="t('customer.summary.socialName')"
:value="entity.socialName" :value="entity.socialName"
@ -124,14 +122,10 @@ const creditWarning = computed(() => {
<VnLv :label="t('customer.summary.street')" :value="entity.street" /> <VnLv :label="t('customer.summary.street')" :value="entity.street" />
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<a <VnTitle
class="header header-link" :url="`#/customer/${entityId}/fiscal-data`"
:href="`#/customer/${entityId}/fiscal-data`" :text="t('customer.summary.fiscalData')"
link />
>
{{ t('customer.summary.fiscalData') }}
<QIcon name="open_in_new" />
</a>
<QCheckbox <QCheckbox
:label="t('customer.summary.isEqualizated')" :label="t('customer.summary.isEqualizated')"
v-model="entity.isEqualizated" v-model="entity.isEqualizated"
@ -169,14 +163,10 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<a <VnTitle
class="header header-link" :url="`#/customer/${entityId}/billing-data`"
:href="`#/customer/${entityId}/billing-data`" :text="t('customer.summary.billingData')"
link />
>
{{ t('customer.summary.billingData') }}
<QIcon name="open_in_new" />
</a>
<VnLv <VnLv
:label="t('customer.summary.payMethod')" :label="t('customer.summary.payMethod')"
:value="entity.payMethod.name" :value="entity.payMethod.name"
@ -202,14 +192,10 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one" v-if="entity.defaultAddress"> <QCard class="vn-one" v-if="entity.defaultAddress">
<a <VnTitle
class="header header-link" :url="`#/customer/${entityId}/consignees`"
:href="`#/customer/${entityId}/consignees`" :text="t('customer.summary.consignee')"
link />
>
{{ t('customer.summary.consignee') }}
<QIcon name="open_in_new" />
</a>
<VnLv <VnLv
:label="t('customer.summary.addressName')" :label="t('customer.summary.addressName')"
:value="entity.defaultAddress.nickname" :value="entity.defaultAddress.nickname"
@ -224,10 +210,10 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one" v-if="entity.account"> <QCard class="vn-one" v-if="entity.account">
<a class="header header-link" :href="`#/customer/${entityId}/web-access`"> <VnTitle
{{ t('customer.summary.webAccess') }} :url="`#/customer/${entityId}/web-access`"
<QIcon name="open_in_new" /> :text="t('customer.summary.webAccess')"
</a> />
<VnLv <VnLv
:label="t('customer.summary.username')" :label="t('customer.summary.username')"
:value="entity.account.name" :value="entity.account.name"
@ -239,9 +225,7 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one" v-if="entity.account"> <QCard class="vn-one" v-if="entity.account">
<div class="header header-link"> <VnTitle :text="t('customer.summary.businessData')" />
{{ t('customer.summary.businessData') }}
</div>
<VnLv <VnLv
:label="t('customer.summary.totalGreuge')" :label="t('customer.summary.totalGreuge')"
:value="toCurrency(entity.totalGreuge)" :value="toCurrency(entity.totalGreuge)"
@ -266,14 +250,11 @@ const creditWarning = computed(() => {
/> />
</QCard> </QCard>
<QCard class="vn-one" v-if="entity.account"> <QCard class="vn-one" v-if="entity.account">
<a <VnTitle
class="header header-link" :url="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`"
:href="`https://grafana.verdnatura.es/d/40buzE4Vk/comportamiento-pagos-clientes?orgId=1&var-clientFk=${entityId}`" :text="t('customer.summary.financialData')"
link icon="vn:grafana"
> />
{{ t('customer.summary.financialData') }}
<QIcon name="vn:grafana" />
</a>
<VnLv <VnLv
:label="t('customer.summary.risk')" :label="t('customer.summary.risk')"
:value="toCurrency(entity?.debt?.debt)" :value="toCurrency(entity?.debt?.debt)"

View File

@ -84,7 +84,6 @@ const redirectToCreateView = () => {
<QBtn <QBtn
:label="t('components.smartCard.openCard')" :label="t('components.smartCard.openCard')"
@click.stop="navigate(row.id)" @click.stop="navigate(row.id)"
class="bg-vn-dark"
outline outline
/> />
<QBtn <QBtn

View File

@ -30,16 +30,16 @@ const { t } = useI18n();
border: 1px solid black; border: 1px solid black;
} }
.title_balance { .title_balance {
color: var(--vn-text); color: var(--vn-text-color);
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
.key_balance { .key_balance {
color: var(--vn-label); color: var(--vn-label-color);
margin-bottom: 0; margin-bottom: 0;
} }
.value_balance { .value_balance {
color: var(--vn-text); color: var(--vn-text-color);
margin-bottom: 0; margin-bottom: 0;
} }
</style> </style>

View File

@ -207,7 +207,7 @@ const refreshData = () => {
</QScrollArea> </QScrollArea>
</QDrawer> </QDrawer>
<VnSubToolbar class="bg-vn-dark"> <VnSubToolbar>
<template #st-data> <template #st-data>
<CustomerBalanceDueTotal :amount="balanceDueTotal" /> <CustomerBalanceDueTotal :amount="balanceDueTotal" />
<div class="flex items-center q-ml-lg"> <div class="flex items-center q-ml-lg">
@ -224,10 +224,8 @@ const refreshData = () => {
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
hide-bottom
row-key="clientFk" row-key="clientFk"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"

View File

@ -510,7 +510,6 @@ const selectSalesPersonId = (id) => (selectedSalesPersonId.value = id);
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 12 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
row-key="id" row-key="id"

View File

@ -108,10 +108,8 @@ const selectCustomerId = (id) => {
<QPage class="column items-center q-pa-md"> <QPage class="column items-center q-pa-md">
<QTable <QTable
:columns="columns" :columns="columns"
:pagination="{ rowsPerPage: 0 }"
:rows="rows" :rows="rows"
class="full-width q-mt-md" class="full-width q-mt-md"
hide-bottom
row-key="id" row-key="id"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"

View File

@ -151,10 +151,8 @@ function stateColor(row) {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
row-key="id" row-key="id"
:pagination="{ rowsPerPage: 0 }"
:grid="grid || $q.screen.lt.sm" :grid="grid || $q.screen.lt.sm"
class="q-mt-xs custom-table" class="q-mt-xs custom-table"
hide-pagination
> >
<template #body-cell-actions="{ row }"> <template #body-cell-actions="{ row }">
<QTd auto-width class="text-center"> <QTd auto-width class="text-center">
@ -196,7 +194,7 @@ function stateColor(row) {
</template> </template>
<template #body-cell-state="{ row }"> <template #body-cell-state="{ row }">
<QTd auto-width class="text-center"> <QTd auto-width class="text-center">
<QBadge :color="stateColor(row)"> <QBadge text-color="black" :color="stateColor(row)">
{{ {{
row.isConfirmed row.isConfirmed
? t('Confirmed') ? t('Confirmed')
@ -227,6 +225,7 @@ function stateColor(row) {
v-if="col.name == 'state'" v-if="col.name == 'state'"
> >
<QBadge <QBadge
text-color="black"
:color=" :color="
stateColor(row) stateColor(row)
" "

View File

@ -21,7 +21,7 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
:width="256" :width="256"
:breakpoint="1000" :breakpoint="1000"
> >
<QScrollArea class="fit text-grey-8"> <QScrollArea class="fit">
<LeftMenu /> <LeftMenu />
</QScrollArea> </QScrollArea>
</QDrawer> </QDrawer>
@ -67,6 +67,10 @@ const pinnedModules = computed(() => navigation.getPinnedModules());
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.left-menu {
color: var(--vn-font-color);
}
.flex-container { .flex-container {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -5,6 +5,7 @@ import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue'; import CardSummary from 'components/ui/CardSummary.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
const route = useRoute(); const route = useRoute();
const { t } = useI18n(); const { t } = useI18n();
@ -36,13 +37,10 @@ onMounted(async () => {
</template> </template>
<template #body="{ entity: department }"> <template #body="{ entity: department }">
<QCard class="column"> <QCard class="column">
<a <VnTitle
class="header header-link" :url="`#/department/department/${entityId}/basic-data`"
:href="`#/department/department/${entityId}/basic-data`" :text="t('Basic data')"
> />
{{ t('Basic data') }}
<QIcon name="open_in_new" />
</a>
<div class="full-width row wrap justify-between content-between"> <div class="full-width row wrap justify-between content-between">
<div class="column" style="min-width: 50%"> <div class="column" style="min-width: 50%">
<VnLv <VnLv

View File

@ -471,6 +471,9 @@ const lockIconType = (groupingMode, mode) => {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.separation-row {
background-color: var(--vn-section-color) !important;
}
.grid-style-transition { .grid-style-transition {
transition: transform 0.28s, background-color 0.28s; transition: transform 0.28s, background-color 0.28s;
} }

View File

@ -238,12 +238,7 @@ const redirectToBuysView = () => {
</div> </div>
</VnRow> </VnRow>
<VnRow> <VnRow>
<QTable <QTable :columns="columns" :rows="importData.buys">
:columns="columns"
:rows="importData.buys"
:pagination="{ rowsPerPage: 0 }"
hide-pagination
>
<template #body-cell-item="{ row, col }"> <template #body-cell-item="{ row, col }">
<QTd auto-width> <QTd auto-width>
<VnSelectDialog <VnSelectDialog

View File

@ -5,9 +5,8 @@ import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue'; import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import VnRow from 'components/ui/VnRow.vue';
import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue'; import TravelDescriptorProxy from 'src/pages/Travel/Card/TravelDescriptorProxy.vue';
import FetchedTags from 'components/ui/FetchedTags.vue'; import VnTitle from 'src/components/common/VnTitle.vue';
import { toDate, toCurrency } from 'src/filters'; import { toDate, toCurrency } from 'src/filters';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
@ -354,6 +353,12 @@ const fetchEntryBuys = async () => {
</CardSummary> </CardSummary>
</template> </template>
<style lang="scss" scoped>
.separation-row {
background-color: var(--vn-section-color) !important;
}
</style>
<i18n> <i18n>
es: es:
Travel data: Datos envío Travel data: Datos envío

View File

@ -636,7 +636,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
auto-load auto-load
@on-fetch="(data) => (intrastatOptions = data)" @on-fetch="(data) => (intrastatOptions = data)"
/> />
<QToolbar class="bg-vn-dark justify-end"> <QToolbar class="justify-end">
<div id="st-data"> <div id="st-data">
<TableVisibleColumns <TableVisibleColumns
:all-columns="allColumnNames" :all-columns="allColumnNames"
@ -659,7 +659,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
:columns="columns" :columns="columns"
selection="multiple" selection="multiple"
row-key="id" row-key="id"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md" class="full-width q-mt-md"
:visible-columns="visibleColumns" :visible-columns="visibleColumns"
v-model:selected="rowsSelected" v-model:selected="rowsSelected"

View File

@ -412,7 +412,7 @@ const removeTag = (index, params, search) => {
width: 60px; width: 60px;
height: 60px; height: 60px;
font-size: 1.4rem; font-size: 1.4rem;
background-color: var(--vn-light-gray); background-color: var(--vn-accent-color);
&.active { &.active {
background-color: $primary; background-color: $primary;

View File

@ -111,7 +111,6 @@ const onSave = (data) => data.deletes && router.push(`/invoice-in/${invoiceId}/s
:rows="rows" :rows="rows"
row-key="$index" row-key="$index"
selection="single" selection="single"
hide-pagination
:grid="$q.screen.lt.sm" :grid="$q.screen.lt.sm"
:pagination="{ rowsPerPage: 0 }" :pagination="{ rowsPerPage: 0 }"
> >

View File

@ -99,7 +99,6 @@ async function insert() {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
row-key="$index" row-key="$index"
hide-pagination
:grid="$q.screen.lt.sm" :grid="$q.screen.lt.sm"
> >
<template #body-cell-duedate="{ row }"> <template #body-cell-duedate="{ row }">

View File

@ -134,7 +134,6 @@ function getTotal(type) {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
row-key="$index" row-key="$index"
hide-pagination
:grid="$q.screen.lt.sm" :grid="$q.screen.lt.sm"
> >
<template #body-cell="{ row, col }"> <template #body-cell="{ row, col }">

View File

@ -6,6 +6,7 @@ import { toCurrency, toDate } from 'src/filters';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import CardSummary from 'components/ui/CardSummary.vue'; import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'src/components/ui/VnLv.vue'; import VnLv from 'src/components/ui/VnLv.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
onMounted(async () => { onMounted(async () => {
salixUrl.value = await getUrl(''); salixUrl.value = await getUrl('');
@ -198,7 +199,7 @@ function getLink(param) {
<template> <template>
<CardSummary <CardSummary
ref="summary" data-key="InvoiceInSummary"
:url="`InvoiceIns/${entityId}/summary`" :url="`InvoiceIns/${entityId}/summary`"
@on-fetch="(data) => setData(data)" @on-fetch="(data) => setData(data)"
> >
@ -209,10 +210,10 @@ function getLink(param) {
<!--Basic Data--> <!--Basic Data-->
<QCard class="vn-one"> <QCard class="vn-one">
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
<a class="header header-link" :href="getLink('basic-data')"> <VnTitle
{{ t('invoiceIn.pageTitles.basicData') }} :url="getLink('basic-data')"
<QIcon name="open_in_new" /> :text="t('invoiceIn.pageTitles.basicData')"
</a> />
</QCardSection> </QCardSection>
<VnLv <VnLv
:label="t('invoiceIn.summary.supplier')" :label="t('invoiceIn.summary.supplier')"
@ -233,10 +234,10 @@ function getLink(param) {
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
<a class="header header-link" :href="getLink('basic-data')"> <VnTitle
{{ t('invoiceIn.pageTitles.basicData') }} :url="getLink('basic-data')"
<QIcon name="open_in_new" /> :text="t('invoiceIn.pageTitles.basicData')"
</a> />
</QCardSection> </QCardSection>
<VnLv <VnLv
:ellipsis-value="false" :ellipsis-value="false"
@ -258,10 +259,10 @@ function getLink(param) {
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
<a class="header header-link" :href="getLink('basic-data')"> <VnTitle
{{ t('invoiceIn.pageTitles.basicData') }} :url="getLink('basic-data')"
<QIcon name="open_in_new" /> :text="t('invoiceIn.pageTitles.basicData')"
</a> />
</QCardSection> </QCardSection>
<VnLv <VnLv
:label="t('invoiceIn.summary.sage')" :label="t('invoiceIn.summary.sage')"
@ -283,10 +284,10 @@ function getLink(param) {
</QCard> </QCard>
<QCard class="vn-one"> <QCard class="vn-one">
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
<a class="header header-link" :href="getLink('basic-data')"> <VnTitle
{{ t('invoiceIn.pageTitles.basicData') }} :url="getLink('basic-data')"
<QIcon name="open_in_new" /> :text="t('invoiceIn.pageTitles.basicData')"
</a> />
</QCardSection> </QCardSection>
<QCardSection class="q-pa-none"> <QCardSection class="q-pa-none">
<div class="bordered q-px-sm q-mx-auto"> <div class="bordered q-px-sm q-mx-auto">
@ -319,10 +320,7 @@ function getLink(param) {
</QCard> </QCard>
<!--Vat--> <!--Vat-->
<QCard v-if="invoiceIn.invoiceInTax.length"> <QCard v-if="invoiceIn.invoiceInTax.length">
<a class="header header-link" :href="getLink('vat')"> <VnTitle :url="getLink('vat')" :text="t('invoiceIn.card.vat')" />
{{ t('invoiceIn.card.vat') }}
<QIcon name="open_in_new" />
</a>
<QTable <QTable
:columns="vatColumns" :columns="vatColumns"
:rows="invoiceIn.invoiceInTax" :rows="invoiceIn.invoiceInTax"
@ -352,16 +350,12 @@ function getLink(param) {
</QCard> </QCard>
<!--Due Day--> <!--Due Day-->
<QCard v-if="invoiceIn.invoiceInDueDay.length"> <QCard v-if="invoiceIn.invoiceInDueDay.length">
<a class="header header-link" :href="getLink('due-day')"> <VnTitle :url="getLink('due-day')" :text="t('invoiceIn.card.dueDay')" />
{{ t('invoiceIn.card.dueDay') }}
<QIcon name="open_in_new" />
</a>
<QTable <QTable
class="full-width" class="full-width"
:columns="dueDayColumns" :columns="dueDayColumns"
:rows="invoiceIn.invoiceInDueDay" :rows="invoiceIn.invoiceInDueDay"
flat flat
hide-pagination
> >
<template #header="props"> <template #header="props">
<QTr :props="props" class="bg"> <QTr :props="props" class="bg">
@ -382,15 +376,14 @@ function getLink(param) {
</QCard> </QCard>
<!--Intrastat--> <!--Intrastat-->
<QCard v-if="invoiceIn.invoiceInIntrastat.length"> <QCard v-if="invoiceIn.invoiceInIntrastat.length">
<a class="header header-link" :href="getLink('intrastat')"> <VnTitle
{{ t('invoiceIn.card.intrastat') }} :url="getLink('intrastat')"
<QIcon name="open_in_new" /> :text="t('invoiceIn.card.intrastat')"
</a> />
<QTable <QTable
:columns="intrastatColumns" :columns="intrastatColumns"
:rows="invoiceIn.invoiceInIntrastat" :rows="invoiceIn.invoiceInIntrastat"
flat flat
hide-pagination
> >
<template #header="props"> <template #header="props">
<QTr :props="props" class="bg"> <QTr :props="props" class="bg">
@ -415,10 +408,10 @@ function getLink(param) {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.bg { .bg {
background-color: var(--vn-light-gray); background-color: var(--vn-accent-color);
} }
.bordered { .bordered {
border: 1px solid var(--vn-text); border: 1px solid var(--vn-text-color);
max-width: 18em; max-width: 18em;
} }
</style> </style>

View File

@ -185,9 +185,7 @@ async function addExpense() {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
row-key="$index" row-key="$index"
hide-pagination
:grid="$q.screen.lt.sm" :grid="$q.screen.lt.sm"
:pagination="{ rowsPerPage: 0 }"
> >
<template #body-cell-expense="{ row, col }"> <template #body-cell-expense="{ row, col }">
<QTd auto-width> <QTd auto-width>

View File

@ -112,7 +112,6 @@ function navigate(id) {
<QBtn <QBtn
:label="t('components.smartCard.openCard')" :label="t('components.smartCard.openCard')"
@click.stop="navigate(row.id)" @click.stop="navigate(row.id)"
class="bg-vn-dark"
outline outline
type="reset" type="reset"
/> />

View File

@ -9,6 +9,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
import { getUrl } from 'src/composables/getUrl'; import { getUrl } from 'src/composables/getUrl';
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue'; import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'src/pages/Customer/Card/CustomerDescriptorProxy.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
onMounted(async () => { onMounted(async () => {
fetch(); fetch();
@ -111,10 +112,7 @@ const ticketsColumns = ref([
</template> </template>
<template #body="{ entity: { invoiceOut } }"> <template #body="{ entity: { invoiceOut } }">
<QCard class="vn-one"> <QCard class="vn-one">
<a class="header header-link"> <VnTitle :text="t('invoiceOut.pageTitles.basicData')" />
{{ t('invoiceOut.pageTitles.basicData') }}
<QIcon name="open_in_new" />
</a>
<VnLv <VnLv
:label="t('invoiceOut.summary.issued')" :label="t('invoiceOut.summary.issued')"
:value="toDate(invoiceOut.issued)" :value="toDate(invoiceOut.issued)"
@ -137,10 +135,7 @@ const ticketsColumns = ref([
/> />
</QCard> </QCard>
<QCard class="vn-three"> <QCard class="vn-three">
<a class="header header-link"> <VnTitle :text="t('invoiceOut.summary.taxBreakdown')" />
{{ t('invoiceOut.summary.taxBreakdown') }}
<QIcon name="open_in_new" />
</a>
<QTable :columns="taxColumns" :rows="invoiceOut.taxesBreakdown" flat> <QTable :columns="taxColumns" :rows="invoiceOut.taxesBreakdown" flat>
<template #header="props"> <template #header="props">
<QTr :props="props"> <QTr :props="props">
@ -152,10 +147,7 @@ const ticketsColumns = ref([
</QTable> </QTable>
</QCard> </QCard>
<QCard class="vn-three"> <QCard class="vn-three">
<a class="header header-link"> <VnTitle :text="t('invoiceOut.summary.tickets')" />
{{ t('invoiceOut.summary.tickets') }}
<QIcon name="open_in_new" />
</a>
<QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat> <QTable v-if="tickets" :columns="ticketsColumns" :rows="tickets" flat>
<template #body-cell-item="{ value }"> <template #body-cell-item="{ value }">
<QTd> <QTd>

View File

@ -133,9 +133,7 @@ onUnmounted(() => {
v-if="rows.length > 0" v-if="rows.length > 0"
:rows="rows" :rows="rows"
:columns="columns" :columns="columns"
hide-bottom
row-key="id" row-key="id"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md" class="full-width q-mt-md"
> >
<template #body-cell="props"> <template #body-cell="props">
@ -165,7 +163,7 @@ onUnmounted(() => {
display: flex; display: flex;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
background-color: var(--vn-dark); background-color: var(--vn-section-color);
padding: 16px; padding: 16px;
.card-section { .card-section {
@ -176,7 +174,7 @@ onUnmounted(() => {
.text { .text {
font-size: 14px; font-size: 14px;
color: var(--vn-text); color: var(--vn-text-color);
} }
} }

View File

@ -22,7 +22,7 @@ const { t } = useI18n();
const router = useRouter(); const router = useRouter();
const stateStore = useStateStore(); const stateStore = useStateStore();
const session = useSession(); const session = useSession();
const token = session.getToken(); const tokenMultimedia = session.getTokenMultimedia();
const { viewSummary } = useSummaryDialog(); const { viewSummary } = useSummaryDialog();
const manualInvoiceDialogRef = ref(null); const manualInvoiceDialogRef = ref(null);
@ -66,7 +66,7 @@ const openPdf = () => {
if (selectedCards.value.size === 1) { if (selectedCards.value.size === 1) {
const [invoiceOut] = selectedCardsArray; const [invoiceOut] = selectedCardsArray;
const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${token}`; const url = `api/InvoiceOuts/${invoiceOut.id}/download?access_token=${tokenMultimedia}`;
window.open(url, '_blank'); window.open(url, '_blank');
} else { } else {
const invoiceOutIdsArray = selectedCardsArray.map( const invoiceOutIdsArray = selectedCardsArray.map(
@ -75,7 +75,7 @@ const openPdf = () => {
const invoiceOutIds = invoiceOutIdsArray.join(','); const invoiceOutIds = invoiceOutIdsArray.join(',');
const params = new URLSearchParams({ const params = new URLSearchParams({
access_token: token, access_token: tokenMultimedia,
ids: invoiceOutIds, ids: invoiceOutIds,
}); });
@ -130,7 +130,7 @@ const openCreateInvoiceModal = () => {
url="InvoiceOuts/filter" url="InvoiceOuts/filter"
> >
<template #body="{ rows }"> <template #body="{ rows }">
<VnSubToolbar class="bg-vn-dark justify-end"> <VnSubToolbar class="justify-end">
<template #st-actions> <template #st-actions>
<QBtn <QBtn
@click="openPdf()" @click="openPdf()"

View File

@ -166,9 +166,7 @@ const downloadCSV = async () => {
<QTable <QTable
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
hide-bottom
row-key="clientId" row-key="clientId"
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md" class="full-width q-mt-md"
> >
<template #body-cell-clientId="{ row }"> <template #body-cell-clientId="{ row }">

View File

@ -57,10 +57,13 @@ onMounted(async () => {
:href="button.url" :href="button.url"
> >
<div class="row items-center no-wrap q-gutter-md"> <div class="row items-center no-wrap q-gutter-md">
<div class="circle q-pa-sm" style="background-color: var(--vn-gray)"> <div
class="circle q-pa-sm"
style="background-color: var(--vn-section-color)"
>
<QImg :src="button.icon" class="q-pa-md" /> <QImg :src="button.icon" class="q-pa-md" />
</div> </div>
<div class="text-h5" style="color: var(--vn-gray)"> <div class="text-h5" style="color: var(--vn-section-color)">
{{ t(button.text) }} {{ t(button.text) }}
</div> </div>
</div> </div>

View File

@ -420,7 +420,7 @@ const getCategoryClass = (category, params) => {
.category-icon { .category-icon {
border-radius: 50%; border-radius: 50%;
background-color: var(--vn-light-gray); background-color: var(--vn-accent-color);
font-size: 2.6rem; font-size: 2.6rem;
padding: 8px; padding: 8px;
cursor: pointer; cursor: pointer;

View File

@ -88,11 +88,11 @@ const dialog = ref(null);
font-size: 11px; font-size: 11px;
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
} }
.value { .value {
color: var(--vn-text); color: var(--vn-text-color);
} }
} }
} }
@ -125,7 +125,7 @@ const dialog = ref(null);
gap: 4px; gap: 4px;
.subName { .subName {
color: var(--vn-label); color: var(--vn-label-color);
text-transform: uppercase; text-transform: uppercase;
} }
@ -163,7 +163,7 @@ const dialog = ref(null);
position: absolute; position: absolute;
bottom: 12px; bottom: 12px;
right: 12px; right: 12px;
background: linear-gradient($dark, $primary); background: linear-gradient(var(--vn-section-color), $primary);
border-radius: 50%; border-radius: 50%;
width: 40px; width: 40px;
height: 40px; height: 40px;

View File

@ -162,7 +162,6 @@ const detailsColumns = ref([
:columns="detailsColumns" :columns="detailsColumns"
:rows="entity?.rows" :rows="entity?.rows"
flat flat
hide-pagination
> >
<template #header="props"> <template #header="props">
<QTr :props="props"> <QTr :props="props">
@ -248,7 +247,7 @@ const detailsColumns = ref([
.subName { .subName {
text-transform: uppercase; text-transform: uppercase;
color: var(--vn-label); color: var(--vn-label-color);
} }
} }
} }

View File

@ -104,7 +104,7 @@ function extractTags(items) {
.no-result { .no-result {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
color: var(--vn-label); color: var(--vn-label-color);
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -213,7 +213,7 @@ async function confirmOrder() {
gap: 2%; gap: 2%;
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@ -246,13 +246,13 @@ async function confirmOrder() {
} }
.subname { .subname {
color: var(--vn-label); color: var(--vn-label-color);
} }
.no-result { .no-result {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
color: var(--vn-label); color: var(--vn-label-color);
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -104,7 +104,7 @@ function navigate(id) {
/> />
<VnLv :label="t('order.field.landed')"> <VnLv :label="t('order.field.landed')">
<template #value> <template #value>
<QBadge color="positive" dense> <QBadge text-color="black" color="positive" dense>
{{ toDate(row?.landed) }} {{ toDate(row?.landed) }}
</QBadge> </QBadge>
</template> </template>

View File

@ -106,7 +106,7 @@ const loadVolumes = async (rows) => {
gap: 2%; gap: 2%;
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@ -132,7 +132,7 @@ const loadVolumes = async (rows) => {
.no-result { .no-result {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
color: var(--vn-label); color: var(--vn-label-color);
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -0,0 +1,56 @@
<script setup>
import { ref } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import VnRow from 'components/ui/VnRow.vue';
import FetchData from 'src/components/FetchData.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 parkingId = route.params?.id || null;
const sectors = ref([]);
const sectorFilter = { fields: ['id', 'description'] };
const filter = {
fields: ['sectorFk', 'code', 'pickingOrder', 'row', 'column'],
include: [{ relation: 'sector', scope: sectorFilter }],
};
</script>
<template>
<FetchData
url="Sectors"
:filter="sectorFilter"
sort-by="description"
@on-fetch="(data) => (sectors = data)"
auto-load
/>
<VnSubToolbar />
<FormModel :url="`Parkings/${parkingId}`" model="parking" :filter="filter" auto-load>
<template #form="{ data }">
<VnRow>
<VnInput v-model="data.code" :label="t('globals.code')" />
<VnInput v-model="data.pickingOrder" :label="t('parking.pickingOrder')" />
</VnRow>
<VnRow>
<VnInput v-model="data.row" :label="t('parking.row')" />
<VnInput v-model="data.column" :label="t('parking.column')" />
</VnRow>
<VnRow>
<VnSelectFilter
v-model="data.sectorFk"
option-value="id"
option-label="description"
:label="t('parking.sector')"
:options="sectors"
use-input
input-debounce="0"
:is-clearable="false"
/>
</VnRow>
</template>
</FormModel>
</template>

View File

@ -0,0 +1,57 @@
<script setup>
import { onMounted, watch } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useStateStore } from 'stores/useStateStore';
import { useArrayData } from 'src/composables/useArrayData';
import LeftMenu from 'components/LeftMenu.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import ParkingDescriptor from 'pages/Parking/Card/ParkingDescriptor.vue';
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('Parking', {
url: `Parkings/${route.params.id}`,
filter,
});
const { store } = arrayData;
onMounted(async () => await arrayData.fetch({ append: false }));
watch(
() => route.params.id,
async (newId) => {
if (newId) {
store.url = `Parkings/${newId}`;
store.filter = filter;
await arrayData.fetch({ append: false });
}
}
);
</script>
<template>
<Teleport to="#searchbar" v-if="stateStore.isHeaderMounted()">
<VnSearchbar
:info="t('parking.searchBar.info')"
:label="t('parking.searchBar.label')"
data-key="Parking"
/>
</Teleport>
<QDrawer v-model="stateStore.leftDrawer" show-if-above :width="256">
<QScrollArea class="fit">
<ParkingDescriptor />
<QSeparator />
<LeftMenu source="card" />
</QScrollArea>
</QDrawer>
<QPageContainer>
<QPage>
<RouterView></RouterView>
</QPage>
</QPageContainer>
</template>

View File

@ -0,0 +1,42 @@
<script setup>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import { useArrayData } from 'src/composables/useArrayData';
import CardDescriptor from 'components/ui/CardDescriptor.vue';
import VnLv from 'components/ui/VnLv.vue';
const props = defineProps({
id: {
type: Number,
required: false,
default: null,
},
});
const { t } = useI18n();
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'] } }],
};
</script>
<template>
<CardDescriptor
module="Parking"
data-key="Parking"
:url="`Parkings/${entityId}`"
:title="card?.code"
:subtitle="card?.id"
:filter="filter"
>
<template #body="{ entity: parking }">
<VnLv :label="t('globals.code')" :value="parking.code" />
<VnLv :label="t('parking.pickingOrder')" :value="parking.pickingOrder" />
<VnLv :label="t('parking.sector')" :value="parking.sector?.description" />
</template>
</CardDescriptor>
</template>

View File

@ -0,0 +1,6 @@
<script setup>
import VnLog from 'src/components/common/VnLog.vue';
</script>
<template>
<VnLog model="Parking" url="/ParkingLogs" />
</template>

View File

@ -0,0 +1,54 @@
<script setup>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import { useI18n } from 'vue-i18n';
import CardSummary from 'components/ui/CardSummary.vue';
import VnLv from 'components/ui/VnLv.vue';
const $props = defineProps({
id: {
type: Number,
default: 0,
},
});
const { params } = useRoute();
const { t } = useI18n();
const entityId = computed(() => $props.id || params.id);
const filter = {
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
};
</script>
<template>
<div class="q-pa-md">
<CardSummary :url="`Parkings/${entityId}`" :filter="filter">
<template #header="{ entity: parking }">{{ parking.code }}</template>
<template #body="{ entity: parking }">
<QCard class="vn-one">
<QCardSection class="q-pa-none">
<a
class="header header-link"
:href="`#/parking/${entityId}/basic-data`"
>
{{ t('globals.pageTitles.basicData') }}
<QIcon name="open_in_new" />
</a>
</QCardSection>
<VnLv :label="t('globals.code')" :value="parking.code" />
<VnLv
:label="t('parking.pickingOrder')"
:value="parking.pickingOrder"
/>
<VnLv
:label="t('parking.sector')"
:value="parking.sector?.description"
/>
<VnLv :label="t('parking.row')" :value="parking.row" />
<VnLv :label="t('parking.column')" :value="parking.column" />
</QCard>
</template>
</CardSummary>
</div>
</template>

View File

@ -0,0 +1,77 @@
<script setup>
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import VnFilterPanel from 'components/ui/VnFilterPanel.vue';
import VnInput from 'components/common/VnInput.vue';
import FetchData from 'src/components/FetchData.vue';
import VnSelectFilter from 'src/components/common/VnSelectFilter.vue';
const { t } = useI18n();
defineProps({
dataKey: {
type: String,
required: true,
},
});
const sectors = ref([]);
const emit = defineEmits(['search']);
</script>
<template>
<FetchData
url="Sectors"
:filter="{ fields: ['id', 'description'] }"
sort-by="description"
@on-fetch="(data) => (sectors = data)"
auto-load
/>
<VnFilterPanel :data-key="dataKey" :search-button="true" @search="emit('search')">
<template #tags="{ tag, formatFn }">
<div class="q-gutter-x-xs">
<strong>{{ t(`params.${tag.label}`) }}: </strong>
<span>{{ formatFn(tag.value) }}</span>
</div>
</template>
<template #body="{ params }">
<QItem>
<QItemSection>
<VnInput
:label="t('params.code')"
v-model="params.code"
is-outlined
/>
</QItemSection>
</QItem>
<QItem>
<QItemSection>
<VnSelectFilter
v-model="params.sectorFk"
option-value="id"
option-label="description"
:label="t('params.sectorFk')"
dense
outlined
rounded
:options="sectors"
use-input
input-debounce="0"
/>
</QItemSection>
</QItem>
</template>
</VnFilterPanel>
</template>
<i18n>
en:
params:
code: Code
sectorFk: Sector
search: General Search
es:
params:
code: Código
search: Búsqueda general
</i18n>

View File

@ -0,0 +1,112 @@
<script setup>
import { onMounted, onUnmounted } from 'vue';
import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { useStateStore } from 'stores/useStateStore';
import { useSummaryDialog } from 'src/composables/useSummaryDialog';
import VnPaginate from 'components/ui/VnPaginate.vue';
import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import CardList from 'components/ui/CardList.vue';
import VnLv from 'components/ui/VnLv.vue';
import ParkingFilter from './ParkingFilter.vue';
import ParkingSummary from './Card/ParkingSummary.vue';
const stateStore = useStateStore();
const { push } = useRouter();
const { t } = useI18n();
const { viewSummary } = useSummaryDialog();
onMounted(() => (stateStore.rightDrawer = true));
onUnmounted(() => (stateStore.rightDrawer = false));
const filter = {
fields: ['id', 'sectorFk', 'code', 'pickingOrder'],
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
};
function exprBuilder(param, value) {
switch (param) {
case 'code':
return { [param]: { like: `%${value}%` } };
case 'sectorFk':
return { [param]: value };
case 'search':
return { or: [{ code: { like: `%${value}%` } }, { id: value }] };
}
}
</script>
<template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<VnSearchbar
data-key="ParkingList"
:label="t('Search parking')"
:info="t('You can search by parking code')"
/>
</Teleport>
<Teleport to="#actions-append">
<div class="row q-gutter-x-sm">
<QBtn
flat
@click="stateStore.toggleRightDrawer()"
round
dense
icon="menu"
>
<QTooltip bottom anchor="bottom right">
{{ t('globals.collapseMenu') }}
</QTooltip>
</QBtn>
</div>
</Teleport>
</template>
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
<QScrollArea class="fit text-grey-8">
<ParkingFilter data-key="ParkingList" />
</QScrollArea>
</QDrawer>
<QPage class="column items-center q-pa-md">
<div class="vn-card-list">
<VnPaginate
data-key="ParkingList"
url="Parkings"
:filter="filter"
:expr-builder="exprBuilder"
:limit="20"
auto-load
order="code"
>
<template #body="{ rows }">
<CardList
v-for="row of rows"
:key="row.id"
:id="row.id"
:title="row.code"
@click="push({ path: `/parking/${row.id}` })"
>
<template #list-items>
<VnLv label="Sector" :value="row.sector?.description" />
<VnLv
:label="t('parking.pickingOrder')"
:value="row.pickingOrder"
/>
</template>
<template #actions>
<QBtn
:label="t('components.smartCard.openSummary')"
@click.stop="viewSummary(row.id, ParkingSummary)"
color="primary"
/>
</template>
</CardList>
</template>
</VnPaginate>
</div>
</QPage>
</template>
<i18n>
es:
Search parking: Buscar parking
You can search by parking code: Puede buscar por el código del parking
</i18n>

View File

@ -205,10 +205,8 @@ const ticketColumns = ref([
<QTable <QTable
:columns="ticketColumns" :columns="ticketColumns"
:rows="entity?.tickets" :rows="entity?.tickets"
:rows-per-page-options="[0]"
row-key="id" row-key="id"
flat flat
hide-pagination
> >
<template #body-cell-city="{ value, row }"> <template #body-cell-city="{ value, row }">
<QTd auto-width> <QTd auto-width>

View File

@ -123,8 +123,6 @@ function downloadPdfs() {
:columns="columns" :columns="columns"
:rows="rows" :rows="rows"
:dense="$q.screen.lt.md" :dense="$q.screen.lt.md"
:pagination="{ rowsPerPage: null }"
hide-pagination
row-key="cmrFk" row-key="cmrFk"
selection="multiple" selection="multiple"
v-model:selected="selected" v-model:selected="selected"
@ -141,6 +139,7 @@ function downloadPdfs() {
<template #body-cell-hasCmrDms="{ value }"> <template #body-cell-hasCmrDms="{ value }">
<QTd align="center"> <QTd align="center">
<QBadge <QBadge
text-color="black"
:id="value ? 'true' : 'false'" :id="value ? 'true' : 'false'"
:label=" :label="
value value

View File

@ -204,7 +204,7 @@ function navigateToRouteSummary(event, row) {
<QPage class="column items-center"> <QPage class="column items-center">
<div class="route-list"> <div class="route-list">
<div class="q-pa-md"> <div class="q-pa-md">
<QCard class="vn-one q-py-sm q-px-lg"> <QCard class="vn-one q-py-sm q-px-lg flex justify-between">
<VnLv class="flex"> <VnLv class="flex">
<template #label> <template #label>
<span class="text-h6">{{ t('Total') }}</span> <span class="text-h6">{{ t('Total') }}</span>
@ -213,6 +213,16 @@ function navigateToRouteSummary(event, row) {
<span class="text-h6 q-ml-md">{{ toCurrency(total) }}</span> <span class="text-h6 q-ml-md">{{ toCurrency(total) }}</span>
</template> </template>
</VnLv> </VnLv>
<QBtn
icon="vn:invoice-in-create"
color="primary"
:disable="!selectedRows?.length"
@click="openDmsUploadDialog"
>
<QTooltip>
{{ t('Create invoiceIn') }}
</QTooltip>
</QBtn>
</QCard> </QCard>
</div> </div>
<VnPaginate <VnPaginate
@ -289,18 +299,6 @@ function navigateToRouteSummary(event, row) {
</template> </template>
</VnPaginate> </VnPaginate>
</div> </div>
<QPageSticky :offset="[20, 20]" v-if="selectedRows?.length">
<QBtn
fab
icon="vn:invoice-in-create"
color="primary"
@click="openDmsUploadDialog"
>
<QTooltip>
{{ t('Create invoiceIn') }}
</QTooltip>
</QBtn>
</QPageSticky>
</QPage> </QPage>
<QDialog v-model="dmsDialog.show"> <QDialog v-model="dmsDialog.show">
<VnDms <VnDms

View File

@ -224,7 +224,7 @@ const openTicketsDialog = (id) => {
<FetchData url="AgencyModes" @on-fetch="(data) => (agencyList = data)" auto-load /> <FetchData url="AgencyModes" @on-fetch="(data) => (agencyList = data)" auto-load />
<FetchData url="Vehicles" @on-fetch="(data) => (vehicleList = data)" auto-load /> <FetchData url="Vehicles" @on-fetch="(data) => (vehicleList = data)" auto-load />
<QPage class="column items-center"> <QPage class="column items-center">
<VnSubToolbar class="bg-vn-dark justify-end"> <VnSubToolbar class="justify-end">
<template #st-actions> <template #st-actions>
<QBtn <QBtn
icon="vn:clone" icon="vn:clone"

View File

@ -13,9 +13,9 @@ import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
import VnConfirm from 'components/ui/VnConfirm.vue'; import VnConfirm from 'components/ui/VnConfirm.vue';
import axios from 'axios'; import axios from 'axios';
import VnInputDate from 'components/common/VnInputDate.vue'; import VnInputDate from 'components/common/VnInputDate.vue';
import {useSummaryDialog} from "composables/useSummaryDialog"; import { useSummaryDialog } from 'composables/useSummaryDialog';
import RoadmapSummary from "pages/Route/Roadmap/RoadmapSummary.vue"; import RoadmapSummary from 'pages/Route/Roadmap/RoadmapSummary.vue';
import {useRouter} from "vue-router"; import { useRouter } from 'vue-router';
const stateStore = useStateStore(); const stateStore = useStateStore();
const { t } = useI18n(); const { t } = useI18n();
@ -128,7 +128,7 @@ function confirmRemove() {
} }
function navigateToRoadmapSummary(event, row) { function navigateToRoadmapSummary(event, row) {
router.push({ name: 'RoadmapSummary', params: { id: row.id } }) router.push({ name: 'RoadmapSummary', params: { id: row.id } });
} }
</script> </script>
@ -182,7 +182,7 @@ function navigateToRoadmapSummary(event, row) {
</QCard> </QCard>
</QDialog> </QDialog>
<QPage class="column items-center"> <QPage class="column items-center">
<VnSubToolbar class="bg-vn-dark justify-end"> <VnSubToolbar class="justify-end">
<template #st-actions> <template #st-actions>
<QBtn <QBtn
icon="vn:clone" icon="vn:clone"
@ -244,7 +244,12 @@ function navigateToRoadmapSummary(event, row) {
name="preview" name="preview"
size="xs" size="xs"
color="primary" color="primary"
@click.stop="viewSummary(props?.row?.id, RoadmapSummary)" @click.stop="
viewSummary(
props?.row?.id,
RoadmapSummary
)
"
class="cursor-pointer" class="cursor-pointer"
> >
<QTooltip>{{ t('Preview') }}</QTooltip> <QTooltip>{{ t('Preview') }}</QTooltip>

View File

@ -15,8 +15,8 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
import FetchData from 'components/FetchData.vue'; import FetchData from 'components/FetchData.vue';
import { openBuscaman } from 'src/utils/buscaman'; import { openBuscaman } from 'src/utils/buscaman';
import SendSmsDialog from 'components/common/SendSmsDialog.vue'; import SendSmsDialog from 'components/common/SendSmsDialog.vue';
import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue"; import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
import {useStateStore} from "stores/useStateStore"; import { useStateStore } from 'stores/useStateStore';
const { t } = useI18n(); const { t } = useI18n();
const quasar = useQuasar(); const quasar = useQuasar();
@ -257,7 +257,7 @@ const openSmsDialog = async () => {
</QCard> </QCard>
</QDialog> </QDialog>
<QPage class="column items-center"> <QPage class="column items-center">
<QToolbar class="bg-vn-dark justify-end"> <QToolbar class="justify-end">
<div id="st-actions" class="q-pa-sm"> <div id="st-actions" class="q-pa-sm">
<QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes"> <QBtn icon="vn:wand" color="primary" class="q-mr-sm" @click="sortRoutes">
<QTooltip>{{ t('Sort routes') }}</QTooltip> <QTooltip>{{ t('Sort routes') }}</QTooltip>

View File

@ -17,15 +17,14 @@ const quasar = useQuasar();
const { t } = useI18n(); const { t } = useI18n();
function confirmRemove() { function confirmRemove() {
quasar quasar.dialog({
.dialog({ component: VnConfirm,
component: VnConfirm, componentProps: {
componentProps: { title: t('Confirm deletion'),
title: t('Confirm deletion'), message: t('Are you sure you want to delete this shelving?'),
message: t('Are you sure you want to delete this shelving?'), promise: remove,
promise: remove },
}, });
})
} }
async function remove() { async function remove() {

View File

@ -151,7 +151,6 @@ onMounted(async () => {
:rows="rows" :rows="rows"
row-key="id" row-key="id"
hide-header hide-header
:pagination="{ rowsPerPage: 0 }"
class="full-width q-mt-md" class="full-width q-mt-md"
:no-data-label="t('No results')" :no-data-label="t('No results')"
> >
@ -195,7 +194,7 @@ onMounted(async () => {
<style scoped lang="scss"> <style scoped lang="scss">
.label { .label {
color: var(--vn-label); color: var(--vn-label-color);
} }
</style> </style>

View File

@ -117,7 +117,7 @@ onMounted(() => {
<style lang="scss" scoped> <style lang="scss" scoped>
.border { .border {
border-radius: 0px !important; border-radius: 0px !important;
border: 1px solid var(--vn-text) !important; border: 1px solid var(--vn-text-color) !important;
} }
</style> </style>

View File

@ -0,0 +1,11 @@
<script setup>
import VnDmsList from 'src/components/common/VnDmsList.vue';
</script>
<template>
<VnDmsList
model="SupplierDms"
update-model="SupplierDms"
default-dms-code="supplier"
filter="supplierFk"
/>
</template>

View File

@ -8,6 +8,7 @@ import { getUrl } from 'src/composables/getUrl';
import { useRole } from 'src/composables/useRole'; import { useRole } from 'src/composables/useRole';
import { dashIfEmpty } from 'src/filters'; import { dashIfEmpty } from 'src/filters';
import VnUserLink from 'src/components/ui/VnUserLink.vue'; import VnUserLink from 'src/components/ui/VnUserLink.vue';
import VnTitle from 'src/components/common/VnTitle.vue';
onUpdated(() => summaryRef.value.fetch()); onUpdated(() => summaryRef.value.fetch());

View File

@ -98,7 +98,10 @@ const setData = (entity) =>
</VnLv> </VnLv>
<VnLv v-if="entity.ticketState" :label="t('ticket.card.state')"> <VnLv v-if="entity.ticketState" :label="t('ticket.card.state')">
<template #value> <template #value>
<QBadge :color="entity.ticketState.state.classColor"> <QBadge
text-color="black"
:color="entity.ticketState.state.classColor"
>
{{ entity.ticketState.state.name }} {{ entity.ticketState.state.name }}
</QBadge> </QBadge>
</template> </template>

View File

@ -3,7 +3,7 @@ import axios from 'axios';
import { ref } from 'vue'; import { ref } from 'vue';
import { useQuasar } from 'quasar'; import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import { useRouter, useRoute } from 'vue-router'; import { useRouter } from 'vue-router';
import { usePrintService } from 'composables/usePrintService'; import { usePrintService } from 'composables/usePrintService';
import SendEmailDialog from 'components/common/SendEmailDialog.vue'; import SendEmailDialog from 'components/common/SendEmailDialog.vue';
import VnConfirm from 'components/ui/VnConfirm.vue'; import VnConfirm from 'components/ui/VnConfirm.vue';
@ -17,13 +17,49 @@ const props = defineProps({
}, },
}); });
const router = useRouter(); const { push, currentRoute } = useRouter();
const route = useRoute(); const { dialog, notify } = useQuasar();
const quasar = useQuasar();
const { t } = useI18n(); const { t } = useI18n();
const { openReport, sendEmail } = usePrintService(); const { openReport, sendEmail } = usePrintService();
const ticket = ref(props.ticket); const ticket = ref(props.ticket);
const ticketId = currentRoute.value.params.id;
const actions = {
clone: async () => {
const opts = { message: t('Ticket cloned'), type: 'positive' };
let clonedTicketId;
try {
const { data } = await axios.post(`Tickets/${ticketId}/clone`, {
shipped: ticket.value.shipped,
});
clonedTicketId = data;
} catch (e) {
opts.message = t('It was not able to clone the ticket');
opts.type = 'negative';
} finally {
notify(opts);
if (clonedTicketId)
push({ name: 'TicketSummary', params: { id: clonedTicketId } });
}
},
remove: async () => {
try {
await axios.post(`Tickets/${ticketId}/setDeleted`);
notify({ message: t('Ticket deleted'), type: 'positive' });
notify({
message: t('You can undo this action within the first hour'),
icon: 'info',
});
push({ name: 'TicketList' });
} catch (e) {
notify({ message: e.message, type: 'negative' });
}
},
};
function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') { function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') {
const path = `Tickets/${ticket.value.id}/delivery-note-${documentType}`; const path = `Tickets/${ticket.value.id}/delivery-note-${documentType}`;
@ -35,7 +71,7 @@ function openDeliveryNote(type = 'deliveryNote', documentType = 'pdf') {
function sendDeliveryNoteConfirmation(type = 'deliveryNote', documentType = 'pdf') { function sendDeliveryNoteConfirmation(type = 'deliveryNote', documentType = 'pdf') {
const customer = ticket.value.client; const customer = ticket.value.client;
quasar.dialog({ dialog({
component: SendEmailDialog, component: SendEmailDialog,
componentProps: { componentProps: {
data: { data: {
@ -67,7 +103,7 @@ function showSmsDialog(template, customData) {
const address = ticket.value.address; const address = ticket.value.address;
const client = ticket.value.client; const client = ticket.value.client;
const phone = const phone =
route.params.phone || currentRoute.value.params.phone ||
address.mobile || address.mobile ||
address.phone || address.phone ||
client.mobile || client.mobile ||
@ -82,7 +118,7 @@ function showSmsDialog(template, customData) {
Object.assign(data, customData); Object.assign(data, customData);
} }
quasar.dialog({ dialog({
component: VnSmsDialog, component: VnSmsDialog,
componentProps: { componentProps: {
phone: phone, phone: phone,
@ -95,42 +131,26 @@ function showSmsDialog(template, customData) {
} }
async function showSmsDialogWithChanges() { async function showSmsDialogWithChanges() {
const query = `TicketLogs/${route.params.id}/getChanges`; const query = `TicketLogs/${ticketId}/getChanges`;
const response = await axios.get(query); const response = await axios.get(query);
showSmsDialog('orderChanges', { changes: response.data }); showSmsDialog('orderChanges', { changes: response.data });
} }
async function sendSms(body) { async function sendSms(body) {
await axios.post(`Tickets/${route.params.id}/sendSms`, body); await axios.post(`Tickets/${ticketId}/sendSms`, body);
quasar.notify({ notify({
message: 'Notification sent', message: 'Notification sent',
type: 'positive', type: 'positive',
}); });
} }
function confirmDelete() { function openConfirmDialog(callback) {
quasar dialog({
.dialog({ component: VnConfirm,
component: VnConfirm, componentProps: {
componentProps: { promise: actions[callback],
promise: remove, },
},
})
.onOk(async () => await router.push({ name: 'TicketList' }));
}
async function remove() {
const id = route.params.id;
await axios.post(`Tickets/${id}/setDeleted`);
quasar.notify({
message: t('Ticket deleted'),
type: 'positive',
});
quasar.notify({
message: t('You can undo this action within the first hour'),
icon: 'info',
}); });
} }
</script> </script>
@ -227,9 +247,15 @@ async function remove() {
</QList> </QList>
</QMenu> </QMenu>
</QItem> </QItem>
<QItem @click="openConfirmDialog('clone')" v-ripple clickable>
<QItemSection avatar>
<QIcon name="content_copy" />
</QItemSection>
<QItemSection>{{ t('To clone ticket') }}</QItemSection>
</QItem>
<template v-if="!ticket.isDeleted"> <template v-if="!ticket.isDeleted">
<QSeparator /> <QSeparator />
<QItem @click="confirmDelete()" v-ripple clickable> <QItem @click="openConfirmDialog('remove')" v-ripple clickable>
<QItemSection avatar> <QItemSection avatar>
<QIcon name="delete" /> <QIcon name="delete" />
</QItemSection> </QItemSection>
@ -253,4 +279,7 @@ es:
Order changes: Cambios del pedido Order changes: Cambios del pedido
Ticket deleted: Ticket eliminado Ticket deleted: Ticket eliminado
You can undo this action within the first hour: Puedes deshacer esta acción dentro de la primera hora You can undo this action within the first hour: Puedes deshacer esta acción dentro de la primera hora
To clone ticket: Clonar ticket
Ticket cloned: Ticked clonado
It was not able to clone the ticket: No se pudo clonar el ticket
</i18n> </i18n>

Some files were not shown because too many files have changed in this diff Show More