diff --git a/CHANGELOG.md b/CHANGELOG.md
index 555b4f0ba..43bd6da77 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,10 +5,16 @@ 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/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [2418.01]
+
## [2416.01] - 2024-04-18
### Added
+### Fixed
+
+- (General) => Se vuelven a mostrar los parámetros en la url al aplicar un filtro
+
## [2414.01] - 2024-04-04
### Added
@@ -16,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (Tickets) => Se añade la opción de clonar ticket. #6951
- (Parking) => Se añade la sección Parking. #5186
+- (Rutas) => Se añade el campo "servida" a la tabla y se añade también a los filtros. #7130
+
### Changed
### Fixed
diff --git a/package.json b/package.json
index 82f21efe6..8398eb3f3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "salix-front",
- "version": "24.16.0",
+ "version": "24.18.0",
"description": "Salix frontend",
"productName": "Salix",
"author": "Verdnatura",
@@ -32,6 +32,7 @@
"@intlify/unplugin-vue-i18n": "^0.8.1",
"@pinia/testing": "^0.1.2",
"@quasar/app-vite": "^1.7.3",
+ "@quasar/quasar-app-extension-qcalendar": "4.0.0-beta.15",
"@quasar/quasar-app-extension-testing-unit-vitest": "^0.4.0",
"@vue/test-utils": "^2.4.4",
"autoprefixer": "^10.4.14",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f3fe7df55..bdff559cc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -49,6 +49,9 @@ devDependencies:
'@quasar/app-vite':
specifier: ^1.7.3
version: 1.7.3(eslint@8.56.0)(pinia@2.1.7)(quasar@2.14.5)(vue-router@4.2.5)(vue@3.4.19)
+ '@quasar/quasar-app-extension-qcalendar':
+ specifier: 4.0.0-beta.15
+ version: 4.0.0-beta.15
'@quasar/quasar-app-extension-testing-unit-vitest':
specifier: ^0.4.0
version: 0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19)
@@ -912,6 +915,13 @@ packages:
resolution: {integrity: sha512-SlOhwzXyPQHWgQIS2ncyDdYdksCJvUYNtgsDQqzAKEG3r3d/ejOxvThle79HTK3Q6HB+gQWFG21Ux00Osr5XSw==}
dev: false
+ /@quasar/quasar-app-extension-qcalendar@4.0.0-beta.15:
+ resolution: {integrity: sha512-i6hQkcP70LXLfVMPZMKQjSg3681gjZmASV3vq6ULzc0LhtBiPneLdVNNtH2itkWxAmaUj+1heQDI5Pa0F7VKLQ==}
+ engines: {node: '>= 10.0.0', npm: '>= 5.6.0', yarn: '>= 1.6.0'}
+ dependencies:
+ '@quasar/quasar-ui-qcalendar': 4.0.0-beta.19
+ dev: true
+
/@quasar/quasar-app-extension-testing-unit-vitest@0.4.0(@vue/test-utils@2.4.4)(quasar@2.14.5)(vite@5.1.4)(vitest@0.31.4)(vue@3.4.19):
resolution: {integrity: sha512-eyzdUdmZiCueNS+5nedjMmzdbpCetSrtdGIwW6KplW1dTzRbLiNvYUjpBOxQGmJCgEhWy9zuswJ7MZ/bTql24Q==}
engines: {node: '>= 12.22.1', npm: '>= 6.14.12', yarn: '>= 1.17.3'}
@@ -939,6 +949,10 @@ packages:
- vite
dev: true
+ /@quasar/quasar-ui-qcalendar@4.0.0-beta.19:
+ resolution: {integrity: sha512-BT0G2JjgKl1bqNrY5utcYeoy8gK+U9k3Pz1YDi1OB265W/jHU6nFoWMEUdY3JdvMccwkXTL2DLVyl3eqAUyLyg==}
+ dev: true
+
/@quasar/render-ssr-error@1.0.3:
resolution: {integrity: sha512-A8RF99q6/sOSe1Ighnh5syEIbliD3qUYEJd2HyfFyBPSMF+WYGXon5dmzg4nUoK662NgOggInevkDyBDJcZugg==}
engines: {node: '>= 16'}
diff --git a/quasar.config.js b/quasar.config.js
index 5ce46667c..dd7a91002 100644
--- a/quasar.config.js
+++ b/quasar.config.js
@@ -93,13 +93,11 @@ module.exports = configure(function (/* ctx */) {
[
VueI18nPlugin({
runtimeOnly: false,
+ include: [
+ path.resolve(__dirname, './src/i18n/locale/**'),
+ path.resolve(__dirname, './src/pages/**/locale/**'),
+ ],
}),
- {
- // if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
- // compositionOnly: false,
- // you need to set i18n resource including paths !
- include: path.resolve(__dirname, './src/i18n/**'),
- },
],
],
},
diff --git a/quasar.extensions.json b/quasar.extensions.json
index e5c5cbfaa..867769090 100644
--- a/quasar.extensions.json
+++ b/quasar.extensions.json
@@ -1,7 +1,6 @@
{
- "@quasar/testing-unit-vitest": {
- "options": [
- "scripts"
- ]
- }
-}
\ No newline at end of file
+ "@quasar/testing-unit-vitest": {
+ "options": ["scripts"]
+ },
+ "@quasar/qcalendar": {}
+}
diff --git a/src/components/FormModel.vue b/src/components/FormModel.vue
index 8787371bc..a7af0044b 100644
--- a/src/components/FormModel.vue
+++ b/src/components/FormModel.vue
@@ -101,16 +101,16 @@ onMounted(async () => {
});
onBeforeRouteLeave((to, from, next) => {
- if (!hasChanges.value) next();
-
- quasar.dialog({
- component: VnConfirm,
- componentProps: {
- title: t('Unsaved changes will be lost'),
- message: t('Are you sure exit without saving?'),
- promise: () => next(),
- },
- });
+ if (hasChanges.value)
+ quasar.dialog({
+ component: VnConfirm,
+ componentProps: {
+ title: t('Unsaved changes will be lost'),
+ message: t('Are you sure exit without saving?'),
+ promise: () => next(),
+ },
+ });
+ else next();
});
onUnmounted(() => {
diff --git a/src/components/FormModelPopup.vue b/src/components/FormModelPopup.vue
index 2d8886610..718d087fe 100644
--- a/src/components/FormModelPopup.vue
+++ b/src/components/FormModelPopup.vue
@@ -78,6 +78,7 @@ defineExpose({
diff --git a/src/components/common/VnDmsList.vue b/src/components/common/VnDmsList.vue
index 23e00f5d9..f70146c58 100644
--- a/src/components/common/VnDmsList.vue
+++ b/src/components/common/VnDmsList.vue
@@ -5,9 +5,11 @@ import { useRoute } from 'vue-router';
import { useQuasar, QCheckbox, QBtn, QInput } from 'quasar';
import axios from 'axios';
-import FetchData from 'components/FetchData.vue';
+import VnPaginate from 'components/ui/VnPaginate.vue';
import VnDms from 'src/components/common/VnDms.vue';
import VnConfirm from 'components/ui/VnConfirm.vue';
+import VnInputDate from 'components/common/VnInputDate.vue';
+import VnUserLink from '../ui/VnUserLink.vue';
import { downloadFile } from 'src/composables/downloadFile';
const route = useRoute();
@@ -26,6 +28,15 @@ const $props = defineProps({
type: String,
default: null,
},
+ deleteModel: {
+ type: String,
+ default: null,
+ },
+ downloadModel: {
+ type: String,
+ required: false,
+ default: null,
+ },
defaultDmsCode: {
type: String,
required: true,
@@ -74,7 +85,7 @@ const dmsFilter = {
],
},
},
- order: ['dmsFk DESC'],
+ where: { [$props.filter]: route.params.id },
};
const columns = computed(() => [
@@ -94,12 +105,12 @@ const columns = computed(() => [
props: (prop) => ({
readonly: true,
borderless: true,
- 'model-value': prop.row.dmsType.name,
+ 'model-value': prop.row.dmsType?.name,
}),
},
{
align: 'left',
- field: 'order',
+ field: 'hardCopyNumber',
label: t('globals.order'),
name: 'order',
component: 'span',
@@ -117,6 +128,7 @@ const columns = computed(() => [
label: t('globals.description'),
name: 'description',
component: 'span',
+ props: (prop) => ({ value: prop.value?.toUpperCase() }),
},
{
align: 'left',
@@ -136,21 +148,53 @@ const columns = computed(() => [
name: 'file',
component: 'span',
},
+ {
+ align: 'left',
+ field: 'worker',
+ label: t('globals.worker'),
+ name: 'worker',
+ component: VnUserLink,
+ props: (prop) => ({
+ name: prop.row.worker?.user?.name.toLowerCase(),
+ workerId: prop.row.worker?.id,
+ }),
+ },
+ {
+ align: 'left',
+ field: 'created',
+ label: t('globals.created'),
+ name: 'created',
+ component: VnInputDate,
+ props: (prop) => ({
+ disable: true,
+ 'model-value': prop.row.created,
+ }),
+ },
{
field: 'options',
name: 'options',
components: [
{
component: QBtn,
+ name: 'download',
+ isDocuware: true,
props: () => ({
icon: 'cloud_download',
flat: true,
color: 'primary',
}),
- click: (prop) => downloadFile(prop.row.id),
+ click: (prop) =>
+ downloadFile(
+ prop.row.id,
+ $props.downloadModel,
+ null,
+ prop.row.download
+ ),
},
{
component: QBtn,
+ name: 'edit',
+ external: false,
props: () => ({
icon: 'edit',
flat: true,
@@ -160,6 +204,8 @@ const columns = computed(() => [
},
{
component: QBtn,
+ name: 'delete',
+ external: false,
props: () => ({
icon: 'delete',
flat: true,
@@ -167,12 +213,24 @@ const columns = computed(() => [
}),
click: (prop) => deleteDms(prop.row.id),
},
+ {
+ component: QBtn,
+ name: 'open',
+ external: true,
+ props: () => ({
+ icon: 'open_in_new',
+ flat: true,
+ color: 'primary',
+ }),
+ click: (prop) => open(prop.row.url),
+ },
],
},
]);
function setData(data) {
- const newData = data.map((value) => value.dms);
+ const newData = data.map((value) => value.dms || value);
+ newData.sort((a, b) => new Date(b.created) - new Date(a.created));
rows.value = newData;
}
@@ -186,7 +244,7 @@ function deleteDms(dmsFk) {
},
})
.onOk(async () => {
- await axios.post(`${$props.model}/${dmsFk}/removeFile`);
+ await axios.post(`${$props.deleteModel ?? $props.model}/${dmsFk}/removeFile`);
const index = rows.value.findIndex((row) => row.id == dmsFk);
rows.value.splice(index, 1);
});
@@ -206,84 +264,106 @@ function parseDms(data) {
}
return data;
}
+
+async function open(url) {
+ window.open(url).focus();
+}
+
+function shouldRenderButton(button, isExternal = false) {
+ if (button.name == 'download') return true;
+ return button.external === isExternal;
+}
-
-
-
-
-
-
- {{ props.value }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ col.label }}:
- {{ col.value }}
-
-
-
+
+
+
+
+
+ {{ props.value }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ col.label }}:
+ {{ col.value }}
+
+
+
+
+
+
+
+
-
+
{
return $props.isOutlined
? {
@@ -41,6 +41,10 @@ const onEnterPress = () => {
emit('keyup.enter');
};
+const handleValue = (val = null) => {
+ value.value = val;
+};
+
const focus = () => {
vnInputRef.value.focus();
};
@@ -51,20 +55,33 @@ defineExpose({
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue
index 66da9b7bf..2053eceb1 100644
--- a/src/components/common/VnInputDate.vue
+++ b/src/components/common/VnInputDate.vue
@@ -1,7 +1,6 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ui/VnPaginate.vue b/src/components/ui/VnPaginate.vue
index d1b2f5ccb..f516f473d 100644
--- a/src/components/ui/VnPaginate.vue
+++ b/src/components/ui/VnPaginate.vue
@@ -61,7 +61,6 @@ const props = defineProps({
});
const emit = defineEmits(['onFetch', 'onPaginate']);
-defineExpose({ fetch });
const isLoading = ref(false);
const pagination = ref({
sortBy: props.order,
@@ -78,6 +77,7 @@ const arrayData = useArrayData(props.dataKey, {
userParams: props.userParams,
exprBuilder: props.exprBuilder,
});
+const hasMoreData = ref();
const store = arrayData.store;
onMounted(() => {
@@ -91,6 +91,10 @@ watch(
}
);
+const addFilter = async (filter, params) => {
+ await arrayData.addFilter({ filter, params });
+};
+
async function fetch() {
await arrayData.fetch({ append: false });
if (!arrayData.hasMoreData.value) {
@@ -106,11 +110,10 @@ async function paginate() {
isLoading.value = true;
await arrayData.loadMore();
-
if (!arrayData.hasMoreData.value) {
if (store.userParamsChanged) arrayData.hasMoreData.value = true;
store.userParamsChanged = false;
- isLoading.value = false;
+ endPagination();
return;
}
@@ -120,12 +123,14 @@ async function paginate() {
pagination.value.sortBy = sortBy;
pagination.value.descending = descending;
- isLoading.value = false;
+ endPagination();
+}
+function endPagination() {
+ isLoading.value = false;
emit('onFetch', store.data);
emit('onPaginate');
}
-
async function onLoad(index, done) {
if (!store.data) {
return done();
@@ -140,6 +145,8 @@ async function onLoad(index, done) {
if (store.userParamsChanged) isDone = !arrayData.hasMoreData.value;
done(isDone);
}
+
+defineExpose({ fetch, addFilter });
@@ -175,11 +182,12 @@ async function onLoad(index, done) {
+
@@ -188,6 +196,9 @@ async function onLoad(index, done) {
+
+
+
es:
diff --git a/src/pages/Item/Card/ItemBasicData.vue b/src/pages/Item/Card/ItemBasicData.vue
new file mode 100644
index 000000000..334cf049d
--- /dev/null
+++ b/src/pages/Item/Card/ItemBasicData.vue
@@ -0,0 +1 @@
+Item basic data
diff --git a/src/pages/Item/ItemCreate.vue b/src/pages/Item/ItemCreate.vue
new file mode 100644
index 000000000..18e7522cb
--- /dev/null
+++ b/src/pages/Item/ItemCreate.vue
@@ -0,0 +1,170 @@
+
+
+
+ (originsOptions = data)"
+ :filter="{ order: 'name' }"
+ auto-load
+ />
+ (tagsOptions = data)"
+ auto-load
+ />
+ (itemTypesOptions = data)"
+ auto-load
+ />
+ (intrastatsOptions = data)"
+ auto-load
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.code }}
+
+
+ {{ scope.opt?.name }}
+
+
+
+ {{ scope.opt?.category?.name }}
+
+
+
+
+
+
+
+
+
+ {{ scope.opt?.description }}
+
+
+ #{{ scope.opt?.id }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/Item/ItemList.vue b/src/pages/Item/ItemList.vue
index 49a5dbb64..3e399e29f 100644
--- a/src/pages/Item/ItemList.vue
+++ b/src/pages/Item/ItemList.vue
@@ -1 +1,577 @@
-Item list
+
+
+
+ (itemTypesOptions = data)"
+ />
+ (itemCategoriesOptions = data)"
+ />
+ (intrastatOptions = data)"
+ />
+ (originsOptions = data)"
+ />
+ (buyersOptions = data)"
+ />
+
+
+
+
+
+
+
+
+
+ redirectToItemSummary(row.id)"
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.id }}
+
+
+
+
+
+
+
+ {{ row.userName }}
+
+
+
+
+
+
+ {{ row.name }} {{ row.subName }}
+
+
+
+
+
+
+
+
+
+
+ cloneItem(row.id)
+ )
+ "
+ class="q-ml-sm"
+ color="primary"
+ name="vn:clone"
+ size="sm"
+ >
+
+ {{ t('Clone') }}
+
+
+
+
+ {{ t('Preview') }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('New item') }}
+
+
+
+
+
+
+es:
+ New item: Nuevo artículo
+ All it's properties will be copied: Todas sus propiedades serán copiadas
+ Do you want to clone this item?: ¿Desea clonar este artículo?
+ Clone: Clonar
+ Preview: Vista previa
+
diff --git a/src/pages/Order/Card/OrderDescriptor.vue b/src/pages/Order/Card/OrderDescriptor.vue
index 1c770194a..60e86d04e 100644
--- a/src/pages/Order/Card/OrderDescriptor.vue
+++ b/src/pages/Order/Card/OrderDescriptor.vue
@@ -61,7 +61,7 @@ const data = ref(useCardDescription());
const setData = (entity) => {
if (!entity) return;
data.value = useCardDescription(entity.client.name, entity.id);
- state.set('ClaimDescriptor', entity);
+ state.set('OrderDescriptor', entity);
};
const getConfirmationValue = (isConfirmed) => {
diff --git a/src/pages/Route/Card/RouteFilter.vue b/src/pages/Route/Card/RouteFilter.vue
index 4be1981ab..bbd71df49 100644
--- a/src/pages/Route/Card/RouteFilter.vue
+++ b/src/pages/Route/Card/RouteFilter.vue
@@ -197,6 +197,15 @@ const warehouseList = ref([]);
/>
+
+
+
+
+
@@ -212,6 +221,7 @@ en:
workerFk: Worker
from: From
to: To
+ Served: Served
es:
params:
warehouseFk: Almacén
@@ -229,4 +239,5 @@ es:
Worker: Trabajador
From: Desde
To: Hasta
+ Served: Servida
diff --git a/src/pages/Route/Card/RouteForm.vue b/src/pages/Route/Card/RouteForm.vue
index 60693cbf1..7087037b0 100644
--- a/src/pages/Route/Card/RouteForm.vue
+++ b/src/pages/Route/Card/RouteForm.vue
@@ -11,8 +11,8 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInput from 'components/common/VnInput.vue';
import axios from 'axios';
import VnInputTime from 'components/common/VnInputTime.vue';
-import RouteSearchbar from "pages/Route/Card/RouteSearchbar.vue";
-import {useStateStore} from "stores/useStateStore";
+import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
+import { useStateStore } from 'stores/useStateStore';
const { t } = useI18n();
const route = useRoute();
@@ -26,6 +26,7 @@ const defaultInitialData = {
description: '',
vehicleFk: null,
workerFk: null,
+ isOk: false,
};
const workerList = ref([]);
@@ -211,6 +212,7 @@ const onSave = (data, response) => {
size="sm"
v-model="data.isOk"
:label="t('Is served')"
+ clearable
/>
diff --git a/src/pages/Route/Card/RouteSummary.vue b/src/pages/Route/Card/RouteSummary.vue
index 34b0dfebd..220f93f30 100644
--- a/src/pages/Route/Card/RouteSummary.vue
+++ b/src/pages/Route/Card/RouteSummary.vue
@@ -73,9 +73,9 @@ const ticketColumns = ref([
align: 'left',
},
{
- name: 'warehouse',
- label: t('route.summary.warehouse'),
- field: (row) => row?.warehouseName,
+ name: 'state',
+ label: t('route.summary.state'),
+ field: (row) => row?.ticketStateName,
sortable: false,
align: 'left',
},
@@ -187,6 +187,15 @@ const ticketColumns = ref([
:label="t('route.summary.packages')"
:value="getTotalPackages(entity.tickets)"
/>
+