Compare commits

..

94 Commits

Author SHA1 Message Date
Jon Elias 909e6674d6 Merge pull request 'Fix[VnPaginate]: Fixed paginate' (!1319) from Fix-OrderCatalogPaginate into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1319
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-01-31 12:31:25 +00:00
Jon Elias 0fe63abba6 fix: fixed pagiante
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 13:01:28 +01:00
PAU ROVIRA ROSALENY 5ae5cec9f9 Merge pull request 'feat: #8410 added new feature to module searchbar' (!1272) from 8410-improveModuleSearchbar into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1272
Reviewed-by: Jorge Penadés <jorgep@verdnatura.es>
2025-01-31 10:02:49 +00:00
PAU ROVIRA ROSALENY a09f430c60 Merge branch 'dev' into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 10:01:28 +00:00
Jon Elias 0fcd969c97 Merge pull request 'Fix[ItemType]: Fixed list and e2e' (!1303) from Fix-ItemTypeE2E into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1303
Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
2025-01-31 09:34:54 +00:00
Jon Elias e710d45011 Merge branch 'dev' into Fix-ItemTypeE2E
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 09:33:06 +00:00
Carlos Satorres ccff995680 Merge pull request '6553-workerBusiness' (!1311) from 6553-workerBusiness into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1311
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-01-31 09:20:10 +00:00
Carlos Satorres d94cd801cc Merge branch 'dev' into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 09:16:02 +00:00
PAU ROVIRA ROSALENY 4eebfd8769 Merge branch 'dev' into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 09:10:21 +00:00
PAU ROVIRA ROSALENY 39d6e818f5 Merge branch '8410-improveModuleSearchbar' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev Build queued... Details
2025-01-31 10:09:51 +01:00
PAU ROVIRA ROSALENY f69ed548f0 fix: refs #8410 removed unused ref 2025-01-31 10:09:48 +01:00
Jon Elias f6439ed356 Merge pull request 'Fix[InvoiceInDescriptor]: Fixed descriptor E2E' (!1316) from Fix-InvoiceInDescriptorE2E into dev
gitea/salix-front/pipeline/head This commit looks good Details
Reviewed-on: #1316
Reviewed-by: Alex Moreno <alexm@verdnatura.es>
2025-01-31 09:07:25 +00:00
Jon Elias fea59a729e Merge branch 'dev' into Fix-InvoiceInDescriptorE2E
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 09:04:54 +00:00
Jon Elias c2a6dd7979 fix: fixed descriptor e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 09:26:14 +01:00
PAU ROVIRA ROSALENY 5b2987c95e Merge branch 'dev' into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 08:18:04 +00:00
Jon Elias 4246275759 refactor: request changes
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 07:56:40 +01:00
Jon Elias f70dd41a37 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into Fix-ItemTypeE2E 2025-01-31 06:40:35 +01:00
PAU ROVIRA ROSALENY e5a449c80c Merge branch '8410-improveModuleSearchbar' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 06:01:20 +01:00
PAU ROVIRA ROSALENY 0de8af81d3 fix: refs #8410 removed unused code 2025-01-31 06:01:17 +01:00
PAU ROVIRA ROSALENY 6cd0df04e6 Merge branch 'dev' into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-31 04:52:20 +00:00
PAU ROVIRA ROSALENY 374118133a fix: refs #8410 removed unused condition
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 14:00:16 +01:00
PAU ROVIRA ROSALENY 860f92cb42 fix: refs #8410 simplified searchModule function
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 13:51:12 +01:00
PAU ROVIRA ROSALENY b2414f861b Merge branch '8410-improveModuleSearchbar' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 13:28:59 +01:00
PAU ROVIRA ROSALENY 42e46a88fb fix: refs #8410 removed ref from searching boolean 2025-01-30 13:28:54 +01:00
Jorge Penadés c0e3a14e8b Merge branch '8410-improveModuleSearchbar' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 13:12:22 +01:00
Jorge Penadés 7759a49f3a Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar 2025-01-30 13:12:00 +01:00
PAU ROVIRA ROSALENY 0d7d60a1e8 Merge branch '8410-improveModuleSearchbar' of https://gitea.verdnatura.es/verdnatura/salix-front into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 13:06:31 +01:00
PAU ROVIRA ROSALENY 3e8b35e2e1 refactor: refs #8410 restructured code 2025-01-30 13:06:28 +01:00
PAU ROVIRA ROSALENY 983b91fbdd Merge branch 'dev' into 8410-improveModuleSearchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-30 11:39:46 +00:00
Carlos Satorres 962ae4ca96 Merge branch 'dev' into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2025-01-30 07:49:58 +00:00
Jon Elias caffb672bc Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into Fix-ItemTypeE2E 2025-01-30 08:44:47 +01:00
Jon Elias a8b28de2a4 fix: fixed list and e2e
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-28 14:39:28 +01:00
Carlos Satorres 4034320ff7 fix: refs #6553 fix qScrollArea 2025-01-28 11:59:04 +01:00
Carlos Satorres c64aad02e1 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-28 11:55:37 +01:00
PAU ROVIRA ROSALENY 6cba927ebc feat: refs #8410 added new feature to module searchbar
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2025-01-23 12:18:31 +01:00
Carlos Satorres 1ee8b68fce fix: refs #6553 fix vnTable 2025-01-23 10:50:10 +01:00
Carlos Satorres b7e71044b0 Merge branch 'dev' of https: refs #6553//gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-23 10:27:57 +01:00
Carlos Satorres c8fe115fec fix: refs #6553 fix PR, fix vnTableCard 2025-01-23 10:25:07 +01:00
Carlos Satorres 7144bb3871 fix: refs #6553 fix pr 2025-01-22 14:13:15 +01:00
Carlos Satorres 46cdd9e62b fix: refs #6553 fix user-filter 2025-01-15 10:36:39 +01:00
Carlos Satorres 3fc7f34899 fix: refs #6553 clean pr 2025-01-15 10:34:08 +01:00
Carlos Satorres 38a180f92b fix: refs #6553 front advanced 2025-01-15 10:32:49 +01:00
Carlos Satorres 72f141315e fix: refs #6553 onBeforeMount 2025-01-15 09:21:16 +01:00
Carlos Satorres 55dda496f3 Merge branch 'dev' of https: refs #6553//gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-15 08:46:46 +01:00
Carlos Satorres 57aa38c84c fix: refs #6553 front 2025-01-13 13:56:31 +01:00
Carlos Satorres f8428a5591 Merge branch '6553-workerBusiness' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-13 12:23:39 +01:00
Carlos Satorres 5a869f0722 fix: refs #6553 fix summary 2025-01-13 12:23:36 +01:00
Carlos Satorres f904c8cfd2 Merge branch 'dev' into 6553-workerBusiness 2025-01-13 07:47:34 +00:00
Carlos Satorres 8aba370063 Merge branch 'dev' into 6553-workerBusiness 2025-01-10 09:57:17 +00:00
Carlos Satorres b479ce83e0 fix: refs #6553 fix BeforeMount filters 2025-01-09 14:06:02 +01:00
Carlos Satorres 3e16357878 fix: refs #6553 fix vnTable css 2025-01-09 12:37:02 +01:00
Carlos Satorres 66db2f0bd7 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-09 09:59:30 +01:00
Carlos Satorres f139be4fcd fix: refs #6553 fix vnTable 2025-01-08 14:03:14 +01:00
Carlos Satorres 3dbace5336 Merge branch 'dev' of https: refs #6553//gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-08 10:17:40 +01:00
Carlos Satorres 63fb45b22d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-07 12:48:15 +01:00
Carlos Satorres 916842ba93 fix: refs #6553 fix front and translations 2025-01-07 10:34:07 +01:00
Carlos Satorres 9ab6ac9718 Merge branch 'dev' of https: refs #6553//gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2025-01-07 06:44:19 +01:00
Carlos Satorres 950bd5f3a7 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-12-23 13:30:32 +01:00
Carlos Satorres 7619a5b4f5 fix: refs #6553 fix summary 2024-12-16 13:02:38 +01:00
Carlos Satorres 96e942af11 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-12-16 11:28:53 +01:00
Carlos Satorres 3a060c9c6a Merge branch 'dev' of https: refs #6553//gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-12-16 07:54:21 +01:00
Carlos Satorres f903432e74 refs #6553 fix reactivateWorker
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-13 13:46:53 +02:00
Carlos Satorres 04d30186c2 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-09-13 13:06:59 +02:00
Carlos Satorres f7fb18cf0a refs #6553 workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-10 15:02:21 +02:00
Carlos Satorres 02129591cf refs #6553 workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-10 08:42:56 +02:00
Carlos Satorres bf4d11545d
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-09 13:22:15 +02:00
Carlos Satorres 70847176ca refs #6553 fix business slot
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-09-06 07:15:25 +02:00
Carlos Satorres 97ce44242c refs #6553 fix business summary
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-03 13:58:14 +02:00
Carlos Satorres c75e4cbf95 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-03 10:51:41 +02:00
Carlos Satorres 60e9accd99 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-09-03 08:11:01 +02:00
Carlos Satorres 00cd6feb12 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-25 10:19:53 +02:00
Carlos Satorres 8f925401d5 refs #6553 fix VnTable
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-25 10:17:52 +02:00
Carlos Satorres 8363f813de Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-06-21 12:42:19 +02:00
Carlos Satorres 68d1d0dbb0 refs #6553 function
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-20 13:58:14 +02:00
Carlos Satorres 0e7abe5fa4 Merge branch '6825-vnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-06-20 13:57:59 +02:00
Carlos Satorres 9c5620f340 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-20 13:35:46 +02:00
Carlos Satorres 41e1d365f3 refs #6553 fix relations
gitea/salix-front/pipeline/pr-dev This commit looks good Details
2024-06-19 08:06:03 +02:00
Carlos Satorres b6836fc59e Merge branch '6825-vnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness 2024-06-19 06:50:20 +02:00
Alex Moreno 81591b4f67 fix: use model
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-14 15:01:12 +02:00
Alex Moreno 83a0ec7eb8 Merge branch '6825-vnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-14 14:55:25 +02:00
Alex Moreno 8d60754682 fix(WorkerBusiness): fix card label
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-14 14:50:01 +02:00
Alex Moreno ba57c2fcd9 Merge branch '6825-vnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-14 11:53:14 +02:00
Carlos Satorres 8490f24438 refs #6553 fix reactivateWorker
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-10 09:23:33 +02:00
Carlos Satorres db3ff0416c refs #6553 fix names
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-05 14:31:08 +02:00
Carlos Satorres d7044cfdcc Merge branch '6825-vnTable' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-05 10:39:35 +02:00
Carlos Satorres f4792d7921 fix: refs #6553 label css
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-05 10:35:14 +02:00
Carlos Satorres 960129f86c Merge branch 'dev' into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-03 13:52:40 +00:00
Carlos Satorres 6e261b7793 refs #6553 fix business summary traductions
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-06-03 14:38:48 +02:00
Carlos Satorres 4b44b9a979 Merge branch '6553-workerBusiness' of https://gitea.verdnatura.es/verdnatura/salix-front into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-05-31 10:32:53 +02:00
Carlos Satorres 8f1ddb08b3 refs #6553 filterBusiness 2024-05-31 10:32:51 +02:00
Carlos Satorres 330b1c1ec2 Merge branch 'dev' into 6553-workerBusiness
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-05-30 11:48:56 +00:00
Carlos Satorres 6205feaca4 refs #6553 fix front ibject
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-05-29 16:37:05 +02:00
Carlos Satorres 0e691436e9 refs #6553 fix front trad
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-05-29 14:20:49 +02:00
Carlos Satorres 81e6870f71 refs #6553 front section trad
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details
2024-05-28 16:59:59 +02:00
14 changed files with 507 additions and 114 deletions

View File

@ -10,12 +10,13 @@ import routes from 'src/router/modules';
import LeftMenuItem from './LeftMenuItem.vue';
import LeftMenuItemGroup from './LeftMenuItemGroup.vue';
import VnInput from './common/VnInput.vue';
import { useRouter } from 'vue-router';
const { t } = useI18n();
const route = useRoute();
const quasar = useQuasar();
const navigation = useNavigationStore();
const router = useRouter();
const props = defineProps({
source: {
type: String,
@ -174,6 +175,10 @@ function normalize(text) {
.replace(/[\u0300-\u036f]/g, '')
.toLowerCase();
}
const searchModule = () => {
const [item] = filteredItems.value;
if (item) router.push({ name: item.name });
};
</script>
<template>
@ -188,10 +193,11 @@ function normalize(text) {
filled
dense
autofocus
@keyup.enter.stop="searchModule()"
/>
</QItem>
<QSeparator />
<template v-if="filteredPinnedModules.size">
<template v-if="filteredPinnedModules.size && !search">
<LeftMenuItem
v-for="[key, pinnedModule] of filteredPinnedModules"
:key="key"
@ -215,11 +221,11 @@ function normalize(text) {
</LeftMenuItem>
<QSeparator />
</template>
<template v-for="item in filteredItems" :key="item.name">
<template v-for="(item, index) in filteredItems" :key="item.name">
<template
v-if="item.children && !filteredPinnedModules.has(item.name)"
v-if="search ||item.children && !filteredPinnedModules.has(item.name)"
>
<LeftMenuItem :item="item" group="modules">
<LeftMenuItem :item="item" group="modules" :class="search && index === 0 ? 'searched' : ''">
<template #side>
<QBtn
v-if="item.isPinned === true"
@ -336,6 +342,9 @@ function normalize(text) {
.header {
color: var(--vn-label-color);
}
.searched{
background-color: var(--vn-section-hover-color);
}
</style>
<i18n>
es:

View File

@ -1,63 +0,0 @@
import { vi, describe, expect, it, beforeEach, beforeAll, afterEach } from 'vitest';
import { createWrapper } from 'app/test/vitest/helper';
import UserPanel from 'src/components/UserPanel.vue';
import axios from 'axios';
import { useState } from 'src/composables/useState';
vi.mock('axios');
describe('UserPanel', () => {
let wrapper;
let vm;
let state;
beforeEach(() => {
wrapper = createWrapper(UserPanel, {});
state = useState();
state.setUser({
id: 115,
name: 'itmanagement',
nickname: 'itManagementNick',
lang: 'en',
darkMode: false,
companyFk: 442,
warehouseFk: 1,
});
wrapper = wrapper.wrapper;
vm = wrapper.vm;
});
afterEach(() => {
vi.clearAllMocks();
});
it('should fetch warehouses data on mounted', async () => {
const fetchData = wrapper.findComponent({ name: 'FetchData' });
expect(fetchData.props('url')).toBe('Warehouses');
expect(fetchData.props('autoLoad')).toBe(true);
});
it('should toggle dark mode correctly and update preferences', async () => {
await vm.saveDarkMode(true);
expect(axios.patch).toHaveBeenCalledWith('/UserConfigs/115', { darkMode: true });
expect(vm.user.darkMode).toBe(true);
vm.updatePreferences();
expect(vm.darkMode).toBe(true);
});
it('should change user language and update preferences', async () => {
const userLanguage = 'es';
await vm.saveLanguage(userLanguage);
expect(axios.patch).toHaveBeenCalledWith('/VnUsers/115', { lang: userLanguage });
expect(vm.user.lang).toBe(userLanguage);
vm.updatePreferences();
expect(vm.locale).toBe(userLanguage);
});
it('should update user data', async () => {
const key = 'name';
const value = 'itboss';
await vm.saveUserData(key, value);
expect(axios.post).toHaveBeenCalledWith('UserConfigs/setUserConfig', { [key]: value });
});
});

View File

@ -53,6 +53,7 @@ const url = computed(() => {
:fields="['id', 'name', 'nickname', 'code']"
:filter-options="['id', 'name', 'nickname', 'code']"
sort-by="nickname ASC"
data-cy="vnWorkerSelect"
>
<template #prepend v-if="$props.hasAvatar">
<VnAvatar :worker-id="value" color="primary" v-bind="$attrs" />

View File

@ -123,7 +123,7 @@ watch(
() => props.data,
() => {
store.data = props.data;
}
},
);
watch(
@ -132,12 +132,12 @@ watch(
if (!mounted.value) return;
emit('onChange', data);
},
{ immediate: true }
{ immediate: true },
);
watch(
() => [props.url, props.filter],
([url, filter]) => mounted.value && fetch({ url, filter })
([url, filter]) => mounted.value && fetch({ url, filter }),
);
const addFilter = async (filter, params) => {
await arrayData.addFilter({ filter, params });
@ -198,7 +198,7 @@ function endPagination() {
async function onLoad(index, done) {
if (!store.data || !mounted.value) return done();
if (store.data.length === 0 || !props.url) return done(false);
if (store.data.length === 0 || !arrayData.store.url) return done(false);
pagination.value.page = pagination.value.page + 1;

View File

@ -326,6 +326,7 @@ globals:
ticketsMonitor: Tickets monitor
clientsActionsMonitor: Clients and actions
serial: Serial
business: Business
medical: Mutual
pit: IRPF
wasteRecalc: Waste recaclulate
@ -509,6 +510,24 @@ department:
hasToSendMail: Send check-ins by email
departmentRemoved: Department removed
worker:
pageTitles:
workers: Workers
list: List
basicData: Basic data
summary: Summary
notifications: Notifications
workerCreate: New worker
department: Department
pda: PDA
notes: Notas
dms: My documentation
pbx: Private Branch Exchange
log: Log
calendar: Calendar
timeControl: Time control
locker: Locker
balance: Balance
medical: Medical
list:
department: Department
schedule: Schedule
@ -524,15 +543,24 @@ worker:
role: Role
sipExtension: Extension
locker: Locker
fiDueDate: FI due date
fiDueDate: DNI expiration date
sex: Sex
seniority: Seniority
seniority: Antiquity
fi: DNI/NIE/NIF
birth: Birth
isFreelance: Freelance
isSsDiscounted: SS Bonification
hasMachineryAuthorized: Machinery authorized
isDisable: Disable
business: Business
started: Started
ended: Ended
reasonEnd: Reason End
department: Departament
workerBusinessCategory: Worker Business Category
notes: Notes
workCenter: Center
professionalCategory: Professional Category
notificationsManager:
activeNotifications: Active notifications
availableNotifications: Available notifications
@ -591,6 +619,23 @@ worker:
sizeLimit: Size limit
isOnReservationMode: Reservation mode
machine: Machine
business:
tableVisibleColumns:
started: Start Date
ended: End Date
company: Company
reasonEnd: Reason for Termination
department: Department
professionalCategory: Professional Category
calendarType: Work Calendar
workCenter: Work Center
payrollCategories: Contract Category
occupationCode: Contribution Code
rate: Rate
businessType: Contract Type
amount: Salary
basicSalary: Transport Workers Salary
notes: Notes
wagon:
type:
submit: Submit

View File

@ -326,6 +326,7 @@ globals:
ticketsMonitor: Monitor de tickets
clientsActionsMonitor: Clientes y acciones
serial: Facturas por serie
business: Contratos
medical: Mutua
pit: IRPF
wasteRecalc: Recalcular mermas
@ -481,6 +482,26 @@ department:
hasToSendMail: Enviar fichadas por mail
departmentRemoved: Departamento eliminado
worker:
pageTitles:
workers: Trabajadores
list: Listado
basicData: Datos básicos
summary: Resumen
notifications: Notificaciones
workerCreate: Nuevo trabajador
department: Departamentos
pda: PDA
notes: Notas
dms: Mi documentación
pbx: Centralita
log: Historial
calendar: Calendario
timeControl: Control de horario
locker: Taquilla
balance: Balance
business: Contrato
formation: Formación
medical: Mutua
list:
department: Departamento
schedule: Horario
@ -505,6 +526,15 @@ worker:
isSsDiscounted: Bonificación SS
hasMachineryAuthorized: Autorizado para maquinaria
isDisable: Deshabilitado
business: Contrato
started: Antigüedad
ended: Fin
reasonEnd: Motivo finalización
department: Departamento
workerBusinessCategory: Categoria profesional
notes: Notas
workCenter: Centro
professionalCategory: Categoria profesional
notificationsManager:
activeNotifications: Notificaciones activas
availableNotifications: Notificaciones disponibles
@ -551,6 +581,23 @@ worker:
debit: Debe
credit: Haber
concept: Concepto
business:
tableVisibleColumns:
started: Fecha inicio
ended: Fecha fin
company: Empresa
reasonEnd: Motivo finalización
department: Departamento
professionalCategory: Categoria profesional
calendarType: Calendario laboral
workCenter: Centro
payrollCategories: Categoria contrato
occupationCode: Cotización
rate: Tarifa
businessType: Contrato
amount: Salario
basicSalary: Salario transportistas
notes: Notas
operator:
numberOfWagons: Número de vagones
train: tren
@ -563,7 +610,6 @@ worker:
sizeLimit: Tamaño límite
isOnReservationMode: Modo de reserva
machine: Máquina
wagon:
type:
submit: Guardar

View File

@ -5,6 +5,9 @@ import VnTable from 'components/VnTable/VnTable.vue';
import FetchData from 'components/FetchData.vue';
import WorkerDescriptorProxy from '../Worker/Card/WorkerDescriptorProxy.vue';
import VnSection from 'src/components/common/VnSection.vue';
import VnInput from 'src/components/common/VnInput.vue';
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
import VnSelect from 'src/components/common/VnSelect.vue';
const { t } = useI18n();
const tableRef = ref();
@ -60,20 +63,17 @@ const columns = computed(() => [
label: t('code'),
isTitle: true,
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'name',
label: t('globals.name'),
cardVisible: true,
create: true,
},
{
align: 'left',
label: t('worker'),
name: 'workerFk',
create: true,
component: 'select',
attrs: {
url: 'Workers/search',
@ -100,7 +100,6 @@ const columns = computed(() => [
align: 'left',
name: 'categoryFk',
label: t('ItemCategory'),
create: true,
component: 'select',
attrs: {
options: itemCategoriesOptions.value,
@ -112,7 +111,6 @@ const columns = computed(() => [
align: 'left',
name: 'Temperature',
label: t('Temperature'),
create: true,
component: 'select',
attrs: {
options: temperatureOptions.value,
@ -180,6 +178,29 @@ const columns = computed(() => [
<WorkerDescriptorProxy :id="row.workerFk" />
</span>
</template>
<template #more-create-dialog="{ data }">
<VnInput v-model="data.code" :label="t('code')" data-cy="codeInput" />
<VnInput
v-model="data.name"
:label="t('globals.name')"
data-cy="nameInput"
/>
<VnSelectWorker v-model="data.workerFk" />
<VnSelect
:label="t('ItemCategory')"
v-model="data.categoryFk"
:options="itemCategoriesOptions"
hide-selected
data-cy="itemCategorySelect"
/>
<VnSelect
:label="t('Temperature')"
v-model="data.temperatureFk"
:options="temperatureOptions"
hide-selected
data-cy="temperatureSelect"
/>
</template>
</VnTable>
</template>
</VnSection>

View File

@ -22,7 +22,6 @@ const catalogParams = {
};
const arrayData = useArrayData(dataKey, {
url: 'Orders/CatalogFilter',
limit: 50,
userParams: catalogParams,
});
const store = arrayData.store;
@ -66,7 +65,7 @@ function extractValueTags(items) {
.filter((k) => /^value\d+$/.test(k))
.map((v) => x[v])
.filter((v) => v)
.sort()
.sort(),
);
tagValue.value = resultValueTags;
}
@ -76,7 +75,7 @@ watch(
(val) => {
extractTags(val);
},
{ immediate: true }
{ immediate: true },
);
</script>

View File

@ -0,0 +1,234 @@
<script setup>
import { ref, computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { useRoute } from 'vue-router';
import VnTable from 'components/VnTable/VnTable.vue';
import { toDate } from 'src/filters';
import { useQuasar } from 'quasar';
import axios from 'axios';
const { t } = useI18n();
const route = useRoute();
const tableRef = ref();
const entityId = computed(() => route.params.id);
const quasar = useQuasar();
async function reactivateWorker() {
const hasToReactive = tableRef.value.CrudModelRef.formData.find(
(data) => !data.ended
);
if (hasToReactive) {
quasar
.dialog({
message: t('Do you want to reactivate the user?'),
ok: {
push: true,
color: 'primary',
},
cancel: true,
})
.onOk(async () => {
await axios.patch(`Workers/${entityId.value}`, {
isDisable: false,
});
});
}
}
const columns = computed(() => [
{
name: 'started',
label: t('worker.business.tableVisibleColumns.started'),
align: 'left',
format: ({ started }) => toDate(started),
component: 'date',
cardVisible: true,
create: true,
},
{
name: 'ended',
label: t('worker.business.tableVisibleColumns.ended'),
align: 'left',
format: ({ ended }) => toDate(ended),
component: 'date',
cardVisible: true,
create: true,
},
{
label: t('worker.business.tableVisibleColumns.company'),
align: 'left',
name: 'companyCodeFk',
component: 'select',
attrs: {
url: 'Companies',
fields: ['code'],
optionLabel: 'code',
optionValue: 'code',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'reasonEndFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.reasonEnd'),
attrs: {
url: 'BusinessReasonEnds',
fields: ['id', 'reason'],
optionLabel: 'reason',
},
cardVisible: true,
},
{
align: 'left',
name: 'departmentFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.department'),
attrs: {
url: 'Departments',
fields: ['id', 'name'],
optionLabel: 'name',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'workerBusinessProfessionalCategoryFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.professionalCategory'),
attrs: {
url: 'WorkerBusinessProfessionalCategories',
fields: ['id', 'description', 'code'],
optionLabel: 'description',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'calendarTypeFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.calendarType'),
attrs: {
url: 'CalendarTypes',
fields: ['id', 'description'],
optionLabel: 'description',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'workcenterFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.workCenter'),
attrs: {
url: 'WorkCenters',
fields: ['id', 'name'],
optionLabel: 'name',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'workerBusinessCategoryFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.payrollCategories'),
attrs: {
url: 'payrollCategories',
fields: ['id', 'description'],
optionLabel: 'description',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'occupationCodeFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.occupationCode'),
attrs: {
url: 'OccupationCodes',
fields: ['code', 'name'],
optionValue: 'code',
},
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'rate',
label: t('worker.business.tableVisibleColumns.rate'),
component: 'input',
cardVisible: true,
create: true,
},
{
align: 'left',
name: 'workerBusinessTypeFk',
component: 'select',
label: t('worker.business.tableVisibleColumns.businessType'),
attrs: {
url: 'WorkerBusinessTypes',
fields: ['id', 'name'],
},
cardVisible: true,
create: true,
},
{
align: 'left',
label: t('worker.business.tableVisibleColumns.amount'),
name: 'amount',
component: 'input',
cardVisible: true,
create: true,
},
{
align: 'left',
label: t('worker.business.tableVisibleColumns.basicSalary'),
name: 'basicSalary',
component: 'input',
cardVisible: true,
create: true,
},
{
name: 'notes',
label: t('worker.business.tableVisibleColumns.notes'),
align: 'left',
component: 'input',
cardVisible: true,
},
]);
</script>
<template>
<VnTable
ref="tableRef"
data-key="WorkerBusiness"
:url="`Workers/${entityId}/Business`"
save-url="/Businesses/crud"
:create="{
urlCreate: `Workers/${entityId}/Business`,
title: 'Create business',
onDataSaved: () => tableRef.reload(),
formInitialData: {},
}"
order="id DESC"
:columns="columns"
default-mode="card"
auto-load
:disable-option="{ table: true }"
:right-search="false"
card-class="grid-two q-gutter-x-xl q-gutter-y-md q-pr-lg q-py-lg"
:is-editable="true"
:use-model="true"
@save-changes="(data) => reactivateWorker(data)"
/>
</template>
<i18n>
es:
Do you want to reactivate the user?: desea reactivar el usuario?
</i18n>

View File

@ -12,6 +12,7 @@ import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
import { useAdvancedSummary } from 'src/composables/useAdvancedSummary';
import WorkerDescriptorMenu from './WorkerDescriptorMenu.vue';
import axios from 'axios';
const route = useRoute();
const { t } = useI18n();
@ -27,6 +28,76 @@ const entityId = computed(() => $props.id || route.params.id);
const basicDataUrl = ref(null);
const advancedSummary = ref();
const filter = {
include: [
{
relation: 'user',
scope: {
fields: ['name', 'nickname', 'roleFk'],
include: [
{
relation: 'role',
scope: {
fields: ['name'],
},
},
{
relation: 'emailUser',
scope: {
fields: ['email'],
},
},
],
},
},
{
relation: 'department',
scope: {
include: {
relation: 'department',
scope: {
fields: ['name'],
},
},
},
},
{
relation: 'boss',
},
{
relation: 'client',
},
{
relation: 'sip',
},
{
relation: 'business',
scope: {
include: [
{
relation: 'department',
scope: {
fields: ['id', 'name'],
},
},
{
relation: 'reasonEnd',
scope: {
fields: ['id', 'reason'],
},
},
{
relation: 'workerBusinessProfessionalCategory',
scope: {
fields: ['id', 'description'],
},
},
],
},
},
],
};
onBeforeMount(async () => {
advancedSummary.value = await useAdvancedSummary('Workers', entityId.value);
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
@ -37,7 +108,7 @@ onBeforeMount(async () => {
<CardSummary
ref="summary"
:url="`Workers/summary`"
:filter="{ where: { id: entityId } }"
:user-filter="{ where: { id: entityId }, filter }"
data-key="Worker"
>
<template #header="{ entity }">
@ -143,6 +214,29 @@ onBeforeMount(async () => {
</VnLv>
<VnLv :label="t('queue')" :value="worker.sip?.queueMember?.queue" />
</QCard>
<QCard class="vn-one" v-if="advancedSummary">
<VnTitle
:url="`#/worker/${entityId}/business`"
:text="t('worker.summary.business')"
/>
<VnLv
:label="t('worker.summary.started')"
:value="toDate(advancedSummary.currentBusiness?.started)"
/>
<VnLv
:label="t('worker.summary.ended')"
:value="toDate(advancedSummary.currentBusiness?.ended)"
/>
<VnLv
:label="t('worker.summary.reasonEnd')"
:value="advancedSummary.currentBusiness?.reasonEnd?.reason"
/>
<VnLv
:label="t('worker.summary.notes')"
:value="advancedSummary.currentBusiness?.notes"
/>
</QCard>
</template>
</CardSummary>
</template>

View File

@ -8,6 +8,7 @@ const workerCard = {
meta: {
menu: [
'WorkerBasicData',
'WorkerBusiness',
'WorkerNotes',
'WorkerPda',
'WorkerNotificationsManager',
@ -50,6 +51,15 @@ const workerCard = {
},
component: () => import('src/pages/Worker/Card/WorkerBasicData.vue'),
},
{
path: 'business',
name: 'WorkerBusiness',
meta: {
title: 'business',
icon: 'handshake',
},
component: () => import('src/pages/Worker/Card/WorkerBusiness.vue'),
},
{
path: 'notes',
name: 'NotesCard',

View File

@ -1,7 +1,7 @@
describe('InvoiceInDescriptor', () => {
const dialogBtns = '.q-card__actions button';
const firstDescritorOpt = '.q-menu > .q-list > :nth-child(1) > .q-item__section';
const isBookedField = '.q-card:nth-child(3) .vn-label-value:nth-child(5) .q-checkbox';
const book = '.summaryHeader > .no-wrap > .q-btn';
const firstDescritorOpt = '.q-menu > .q-list > :nth-child(5) > .q-item__section';
const checkbox = ':nth-child(5) > .q-checkbox';
it('should booking and unbooking the invoice properly', () => {
cy.viewport(1280, 720);
@ -9,13 +9,13 @@ describe('InvoiceInDescriptor', () => {
cy.visit('/#/invoice-in/1/summary');
cy.waitForElement('.q-page');
cy.openActionsDescriptor();
cy.get(firstDescritorOpt).click();
cy.get(dialogBtns).eq(1).click();
cy.get(isBookedField).should('have.attr', 'aria-checked', 'true');
cy.get(book).click();
cy.dataCy('VnConfirm_confirm').click();
cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'true');
cy.dataCy('descriptor-more-opts').first().click();
cy.get(firstDescritorOpt).click();
cy.get(dialogBtns).eq(1).click();
cy.get(isBookedField).should('have.attr', 'aria-checked', 'false');
cy.dataCy('VnConfirm_confirm').click();
cy.get(checkbox).invoke('attr', 'aria-checked').should('eq', 'false');
});
});

View File

@ -1,5 +1,5 @@
/// <reference types="cypress" />
describe('Item shelving', () => {
describe('ItemBarcodes', () => {
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');

View File

@ -1,5 +1,10 @@
/// <reference types="cypress" />
describe('Item type', () => {
const workerError = 'employeeNick';
const worker = 'buyerNick';
const category = 'Artificial';
const type = 'Flower';
beforeEach(() => {
cy.viewport(1920, 1080);
cy.login('developer');
@ -8,32 +13,24 @@ describe('Item type', () => {
it('should throw an error if the code already exists', () => {
cy.dataCy('vnTableCreateBtn').click();
cy.get(
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
).type('ALS');
cy.get(
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Name_input"]'
).type('Alstroemeria');
cy.dataCy('Worker_select').type('employeeNick');
cy.get('.q-menu .q-item').contains('employeeNick').click();
cy.dataCy('ItemCategory_select').type('Artificial');
cy.get('.q-menu .q-item').contains('Artificial').click();
cy.dataCy('codeInput').type('ALS');
cy.dataCy('nameInput').type('Alstroemeria');
cy.dataCy('vnWorkerSelect').type(workerError);
cy.get('.q-menu .q-item').contains(workerError).click();
cy.dataCy('itemCategorySelect').type(category);
cy.get('.q-menu .q-item').contains(category).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('An item type with the same code already exists');
});
it('should create a new type', () => {
cy.dataCy('vnTableCreateBtn').click();
cy.get(
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Code_input"]'
).type('LIL');
cy.get(
'div.fit > .q-field > .q-field__inner > .q-field__control > .q-field__control-container > [data-cy="Name_input"]'
).type('Lilium');
cy.dataCy('Worker_select').type('buyerNick');
cy.get('.q-menu .q-item').contains('buyerNick').click();
cy.dataCy('ItemCategory_select').type('Flower');
cy.get('.q-menu .q-item').contains('Flower').click();
cy.dataCy('codeInput').type('LIL');
cy.dataCy('nameInput').type('Lilium');
cy.dataCy('vnWorkerSelect').type(worker);
cy.get('.q-menu .q-item').contains(worker).click();
cy.dataCy('itemCategorySelect').type(type);
cy.get('.q-menu .q-item').contains(type).click();
cy.dataCy('FormModelPopup_save').click();
cy.checkNotification('Data created');
});