From fbc2967ba157a28d2f13076297d454a6f7c765ee Mon Sep 17 00:00:00 2001
From: carlossa <carlossa@verdnatura.es>
Date: Mon, 24 Feb 2025 14:40:46 +0100
Subject: [PATCH 1/5] fix: workerBasicData

---
 src/pages/Worker/Card/WorkerBasicData.vue | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/pages/Worker/Card/WorkerBasicData.vue b/src/pages/Worker/Card/WorkerBasicData.vue
index fcf0f0369..cf43412af 100644
--- a/src/pages/Worker/Card/WorkerBasicData.vue
+++ b/src/pages/Worker/Card/WorkerBasicData.vue
@@ -17,6 +17,12 @@ const maritalStatus = [
     { code: 'M', name: t('Married') },
     { code: 'S', name: t('Single') },
 ];
+async function setAdvancedSummary(data) {
+    const advanced = (await useAdvancedSummary('Workers', data.id)) ?? {};
+    Object.assign(form.value.formData, advanced);
+    await nextTick();
+    if (form.value) form.value.hasChanges = false;
+}
 </script>
 <template>
     <FetchData
@@ -36,13 +42,7 @@ const maritalStatus = [
         :url-update="`Workers/${$route.params.id}`"
         auto-load
         model="Worker"
-        @on-fetch="
-            async (data) => {
-                Object.assign(data, (await useAdvancedSummary('Workers', data.id)) ?? {});
-                await $nextTick();
-                if (form) form.hasChanges = false;
-            }
-        "
+        @on-fetch="setAdvancedSummary"
     >
         <template #form="{ data }">
             <VnRow>

From 7f1be98b742358db329772eabf29908d7b180992 Mon Sep 17 00:00:00 2001
From: Jon <jon@verdnatura.es>
Date: Mon, 24 Feb 2025 16:20:28 +0100
Subject: [PATCH 2/5] fix: fixed account descriptor menu and created e2e

---
 src/i18n/locale/en.yml                        |  1 +
 src/i18n/locale/es.yml                        |  1 +
 .../Account/Card/AccountDescriptorMenu.vue    |  5 ++--
 .../account/accountDescriptorMenu.spec.js     | 24 +++++++++++++++++++
 4 files changed, 29 insertions(+), 2 deletions(-)
 create mode 100644 test/cypress/integration/account/accountDescriptorMenu.spec.js

diff --git a/src/i18n/locale/en.yml b/src/i18n/locale/en.yml
index 9a60e9da1..9e46c54e3 100644
--- a/src/i18n/locale/en.yml
+++ b/src/i18n/locale/en.yml
@@ -153,6 +153,7 @@ globals:
     maxTemperature: Max
     minTemperature: Min
     changePass: Change password
+    setPass: Set password
     deleteConfirmTitle: Delete selected elements
     changeState: Change state
     raid: 'Raid {daysInForward} days'
diff --git a/src/i18n/locale/es.yml b/src/i18n/locale/es.yml
index 846c442ea..6e43e0882 100644
--- a/src/i18n/locale/es.yml
+++ b/src/i18n/locale/es.yml
@@ -157,6 +157,7 @@ globals:
     maxTemperature: Máx
     minTemperature: Mín
     changePass: Cambiar contraseña
+    setPass: Establecer contraseña
     deleteConfirmTitle: Eliminar los elementos seleccionados
     changeState: Cambiar estado
     raid: 'Redada {daysInForward} días'
diff --git a/src/pages/Account/Card/AccountDescriptorMenu.vue b/src/pages/Account/Card/AccountDescriptorMenu.vue
index 30584c61f..95ad7ed63 100644
--- a/src/pages/Account/Card/AccountDescriptorMenu.vue
+++ b/src/pages/Account/Card/AccountDescriptorMenu.vue
@@ -25,12 +25,13 @@ const $props = defineProps({
 const { t } = useI18n();
 const { hasAccount } = toRefs($props);
 const { openConfirmationModal } = useVnConfirm();
+const arrayData = useArrayData('Account');
 const route = useRoute();
 const router = useRouter();
 const state = useState();
 const user = state.getUser();
 const { notify } = useQuasar();
-const account = computed(() => useArrayData('Account').store.data[0]);
+const account = computed(() => arrayData.store.data);
 account.value.hasAccount = hasAccount.value;
 const entityId = computed(() => +route.params.id);
 const hasitManagementAccess = ref();
@@ -39,7 +40,7 @@ const isHimself = computed(() => user.value.id === account.value.id);
 const url = computed(() =>
     isHimself.value
         ? 'Accounts/change-password'
-        : `Accounts/${entityId.value}/setPassword`
+        : `Accounts/${entityId.value}/setPassword`,
 );
 
 async function updateStatusAccount(active) {
diff --git a/test/cypress/integration/account/accountDescriptorMenu.spec.js b/test/cypress/integration/account/accountDescriptorMenu.spec.js
new file mode 100644
index 000000000..67a7d8ef6
--- /dev/null
+++ b/test/cypress/integration/account/accountDescriptorMenu.spec.js
@@ -0,0 +1,24 @@
+describe('ClaimNotes', () => {
+    const descriptorOptions = '[data-cy="descriptor-more-opts-menu"] > .q-list';
+    const url = '/#/account/1/summary';
+
+    it('should see all the account options', () => {
+        cy.login('itManagement');
+        cy.visit(url);
+        cy.dataCy('descriptor-more-opts').click();
+        cy.get(descriptorOptions)
+            .find('.q-item')
+            .its('length')
+            .then((count) => {
+                cy.log('Número de opciones:', count);
+                expect(count).to.equal(5);
+            });
+    });
+
+    it('should not see any option', () => {
+        cy.login('salesPerson');
+        cy.visit(url);
+        cy.dataCy('descriptor-more-opts').click();
+        cy.get(descriptorOptions).should('not.be.visible');
+    });
+});

From e4e57127a0c3f1d77bec87ffc5c02f5fa38db7b3 Mon Sep 17 00:00:00 2001
From: Javier Segarra <jsegarra@verdnatura.es>
Date: Tue, 25 Feb 2025 13:49:54 +0100
Subject: [PATCH 3/5] fix: add datakey

---
 src/pages/Worker/Card/WorkerDescriptorProxy.vue | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/pages/Worker/Card/WorkerDescriptorProxy.vue b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
index a142570f9..5f71abbea 100644
--- a/src/pages/Worker/Card/WorkerDescriptorProxy.vue
+++ b/src/pages/Worker/Card/WorkerDescriptorProxy.vue
@@ -12,6 +12,11 @@ const $props = defineProps({
 
 <template>
     <QPopupProxy>
-        <WorkerDescriptor v-if="$props.id" :id="$props.id" :summary="WorkerSummary" />
+        <WorkerDescriptor
+            v-if="$props.id"
+            :id="$props.id"
+            :summary="WorkerSummary"
+            data-key="WorkerDescriptorProxy"
+        />
     </QPopupProxy>
 </template>

From df62ccee8bb7985d7da8496b6e06eebeaa25f6b4 Mon Sep 17 00:00:00 2001
From: Javier Segarra <jsegarra@verdnatura.es>
Date: Tue, 25 Feb 2025 13:50:07 +0100
Subject: [PATCH 4/5] feat: detect when is descriptor proxy

---
 src/components/ui/CardDescriptor.vue | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/components/ui/CardDescriptor.vue b/src/components/ui/CardDescriptor.vue
index e6e7e6fa0..8ed1fa0fa 100644
--- a/src/components/ui/CardDescriptor.vue
+++ b/src/components/ui/CardDescriptor.vue
@@ -76,6 +76,15 @@ onBeforeMount(async () => {
     );
 });
 
+const routeName = computed(() => {
+    const DESCRIPTOR_PROXY = 'DescriptorProxy';
+
+    let name = $props.dataKey;
+    if ($props.dataKey.includes(DESCRIPTOR_PROXY)) {
+        name = name.split(DESCRIPTOR_PROXY)[0];
+    }
+    return `${name}Summary`;
+});
 async function getData() {
     store.url = $props.url;
     store.filter = $props.filter ?? {};
@@ -154,9 +163,7 @@ const toModule = computed(() =>
                         {{ t('components.smartCard.openSummary') }}
                     </QTooltip>
                 </QBtn>
-                <RouterLink
-                    :to="{ name: `${dataKey}Summary`, params: { id: entity.id } }"
-                >
+                <RouterLink :to="{ name: routeName, params: { id: entity.id } }">
                     <QBtn
                         class="link"
                         color="white"

From c1e4b78253288b25de9a2760afd8d68b292fff92 Mon Sep 17 00:00:00 2001
From: Jon <jon@verdnatura.es>
Date: Tue, 25 Feb 2025 14:09:18 +0100
Subject: [PATCH 5/5] fix: fixed negative bases style

---
 src/pages/InvoiceOut/InvoiceOutNegativeBases.vue | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
index 135eb9aca..605a9e2cf 100644
--- a/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
+++ b/src/pages/InvoiceOut/InvoiceOutNegativeBases.vue
@@ -97,16 +97,19 @@ const columns = computed(() => [
         align: 'left',
         name: 'isActive',
         label: t('invoiceOut.negativeBases.active'),
+        component: 'checkbox',
     },
     {
         align: 'left',
         name: 'hasToInvoice',
         label: t('invoiceOut.negativeBases.hasToInvoice'),
+        component: 'checkbox',
     },
     {
         align: 'left',
-        name: 'hasVerifiedData',
+        name: 'isTaxDataChecked',
         label: t('invoiceOut.negativeBases.verifiedData'),
+        component: 'checkbox',
     },
     {
         align: 'left',
@@ -142,7 +145,7 @@ const downloadCSV = async () => {
     await invoiceOutGlobalStore.getNegativeBasesCsv(
         userParams.from,
         userParams.to,
-        filterParams
+        filterParams,
     );
 };
 </script>