Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix-front into 6994-vnLog_descriptors
This commit is contained in:
commit
6ddc1c77f8
|
@ -25,6 +25,8 @@ RUN apt-get update \
|
|||
libnss3 \
|
||||
libxss1 \
|
||||
libxtst6 \
|
||||
mesa-vulkan-drivers \
|
||||
vulkan-tools \
|
||||
xauth \
|
||||
xvfb \
|
||||
&& apt-get clean \
|
||||
|
|
21147
pnpm-lock.yaml
21147
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -7,6 +7,7 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
|||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -30,7 +31,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('Customer ID')"
|
||||
:label="t('globals.params.clientFk')"
|
||||
v-model="params.clientFk"
|
||||
is-outlined
|
||||
/>
|
||||
|
@ -38,13 +39,17 @@ const states = ref();
|
|||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput v-model="params.fi" :label="t('FI')" is-outlined />
|
||||
<VnInput
|
||||
v-model="params.fi"
|
||||
:label="t('globals.params.fi')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputNumber
|
||||
:label="t('Amount')"
|
||||
:label="t('globals.amount')"
|
||||
v-model="params.amount"
|
||||
is-outlined
|
||||
data-cy="InvoiceOutFilterAmountBtn"
|
||||
|
@ -54,7 +59,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QInput
|
||||
:label="t('Min')"
|
||||
:label="t('invoiceOut.params.min')"
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
|
@ -65,7 +70,7 @@ const states = ref();
|
|||
</QItemSection>
|
||||
<QItemSection>
|
||||
<QInput
|
||||
:label="t('Max')"
|
||||
:label="t('invoiceOut.params.max')"
|
||||
dense
|
||||
lazy-rules
|
||||
outlined
|
||||
|
@ -78,7 +83,7 @@ const states = ref();
|
|||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('Has PDF')"
|
||||
:label="t('invoiceOut.params.hasPdf')"
|
||||
toggle-indeterminate
|
||||
v-model="params.hasPdf"
|
||||
/>
|
||||
|
@ -88,14 +93,31 @@ const states = ref();
|
|||
<QItemSection>
|
||||
<VnInputDate
|
||||
v-model="params.created"
|
||||
:label="t('Created')"
|
||||
:label="t('invoiceOut.params.created')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate v-model="params.dued" :label="t('Dued')" is-outlined />
|
||||
<VnInputDate
|
||||
v-model="params.dued"
|
||||
:label="t('invoiceOut.params.dued')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
outlined
|
||||
rounded
|
||||
:label="t('globals.params.departmentFk')"
|
||||
v-model="params.departmentFk"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
url="Departments"
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
|
|
|
@ -16,6 +16,7 @@ import VnRow from 'src/components/ui/VnRow.vue';
|
|||
import VnRadio from 'src/components/common/VnRadio.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import CustomerDescriptorProxy from '../Customer/Card/CustomerDescriptorProxy.vue';
|
||||
import DepartmentDescriptorProxy from 'src/pages/Worker/Department/Card/DepartmentDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
@ -86,6 +87,20 @@ const columns = computed(() => [
|
|||
component: null,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'departmentFk',
|
||||
label: t('globals.params.departmentFk'),
|
||||
component: 'select',
|
||||
attrs: {
|
||||
url: 'Departments',
|
||||
},
|
||||
create: true,
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(row.departmentName),
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'companyFk',
|
||||
|
@ -229,6 +244,12 @@ watchEffect(selectedRows);
|
|||
<CustomerDescriptorProxy :id="row.clientFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-departmentFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row.departmentName || '-' }}
|
||||
<DepartmentDescriptorProxy :id="row?.departmentFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #more-create-dialog="{ data }">
|
||||
<div class="row q-col-gutter-xs col-span-2">
|
||||
<div class="col-12">
|
||||
|
|
|
@ -221,7 +221,7 @@ en:
|
|||
attenderFk: Atender
|
||||
clientFk: Client id
|
||||
warehouseFk: Warehouse
|
||||
requesterFk: Salesperson
|
||||
requesterFk: Requester
|
||||
from: From
|
||||
to: To
|
||||
mine: For me
|
||||
|
@ -239,7 +239,7 @@ es:
|
|||
attenderFk: Comprador
|
||||
clientFk: Id cliente
|
||||
warehouseFk: Almacén
|
||||
requesterFk: Comercial
|
||||
requesterFk: Solicitante
|
||||
from: Desde
|
||||
to: Hasta
|
||||
mine: Para mi
|
||||
|
|
|
@ -84,7 +84,7 @@ item:
|
|||
attenderFk: Atender
|
||||
clientFk: Client id
|
||||
warehouseFk: Warehouse
|
||||
requesterFk: Salesperson
|
||||
requesterFk: Requester
|
||||
from: From
|
||||
to: To
|
||||
mine: For me
|
||||
|
|
|
@ -93,7 +93,7 @@ item:
|
|||
attenderFk: Comprador
|
||||
clientFk: Id cliente
|
||||
warehouseFk: Almacén
|
||||
requesterFk: Comercial
|
||||
requesterFk: Solicitante
|
||||
from: Desde
|
||||
to: Hasta
|
||||
mine: Para mi
|
||||
|
|
|
@ -11,6 +11,7 @@ import AgencyDescriptorProxy from 'src/pages/Route/Agency/Card/AgencyDescriptorP
|
|||
import VehicleDescriptorProxy from 'src/pages/Route/Vehicle/Card/VehicleDescriptorProxy.vue';
|
||||
import VnSection from 'src/components/common/VnSection.vue';
|
||||
import VnSelectWorker from 'src/components/common/VnSelectWorker.vue';
|
||||
import RouteTickets from './RouteTickets.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
|
@ -26,6 +27,12 @@ const routeFilter = {
|
|||
},
|
||||
],
|
||||
};
|
||||
|
||||
function redirectToTickets(id) {
|
||||
const url = `#/route/${id}/tickets`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'right',
|
||||
|
@ -141,6 +148,12 @@ const columns = computed(() => [
|
|||
align: 'right',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('globals.pageTitles.tickets'),
|
||||
icon: 'vn:ticket',
|
||||
action: (row) => redirectToTickets(row?.id),
|
||||
isPrimary: true,
|
||||
},
|
||||
{
|
||||
title: t('components.smartCard.viewSummary'),
|
||||
icon: 'preview',
|
||||
|
|
|
@ -37,9 +37,9 @@ const columns = computed(() => [
|
|||
align: 'left',
|
||||
},
|
||||
{
|
||||
name: 'city',
|
||||
label: t('City'),
|
||||
field: (row) => row?.city,
|
||||
name: 'client',
|
||||
label: t('Client'),
|
||||
field: (row) => row?.nickname,
|
||||
sortable: false,
|
||||
align: 'left',
|
||||
},
|
||||
|
@ -51,9 +51,9 @@ const columns = computed(() => [
|
|||
align: 'center',
|
||||
},
|
||||
{
|
||||
name: 'client',
|
||||
label: t('Client'),
|
||||
field: (row) => row?.nickname,
|
||||
name: 'city',
|
||||
label: t('City'),
|
||||
field: (row) => row?.city,
|
||||
sortable: false,
|
||||
align: 'left',
|
||||
},
|
||||
|
|
|
@ -73,6 +73,7 @@ const onNodeExpanded = async (nodeKeysArray) => {
|
|||
const response = await axios.get(`Zones/${route.params.id}/getLeaves`, {
|
||||
params,
|
||||
});
|
||||
response.data = JSON.parse(response.data);
|
||||
if (response.data) {
|
||||
node.childs = response.data.map((n) => {
|
||||
if (n.sons > 0) n.childs = [{}];
|
||||
|
@ -126,14 +127,17 @@ watch(
|
|||
async (val) => {
|
||||
if (!val) return;
|
||||
// // Se triggerea cuando se actualiza el store.data, el cual es el resultado del fetch de la searchbar
|
||||
val = JSON.parse(val);
|
||||
if (!nodes.value[0]) nodes.value = [defaultNode];
|
||||
nodes.value[0].childs = [...val];
|
||||
const fetchedNodeKeys = val.flatMap(getNodeIds);
|
||||
state.set('Tree', [...fetchedNodeKeys]);
|
||||
expanded.value = [null, ...fetchedNodeKeys];
|
||||
const fetchs = [];
|
||||
for (let n of state.get('Tree')) {
|
||||
await fetchNodeLeaves(n);
|
||||
fetchs.push(fetchNodeLeaves(n));
|
||||
}
|
||||
await Promise.all(fetchs);
|
||||
previousExpandedNodes.value = new Set(expanded.value);
|
||||
},
|
||||
{ immediate: true },
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('Client balance', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('developer');
|
||||
cy.visit('#/customer/1101/balance');
|
||||
});
|
||||
it('Should create a mandate', () => {
|
||||
cy.get('.q-page-sticky > div > .q-btn').click();
|
||||
cy.selectOption('[data-cy="paymentBank"]', 2);
|
||||
cy.dataCy('paymentAmount_input').type('100');
|
||||
cy.dataCy('paymentAmount_input').clear().type('100');
|
||||
cy.saveCard();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -62,12 +62,7 @@ Cypress.Commands.overwrite('visit', (originalFn, url, options, waitRequest = tru
|
|||
originalFn(url, options);
|
||||
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
|
||||
cy.waitUntil(() => cy.get('main').should('exist'));
|
||||
if (waitRequest)
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find('[data-cy="loading-spinner"]').length) {
|
||||
cy.get('[data-cy="loading-spinner"]').should('not.be.visible');
|
||||
}
|
||||
});
|
||||
if (waitRequest) cy.waitSpinner();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('waitForElement', (element) => {
|
||||
|
@ -99,6 +94,14 @@ Cypress.Commands.add('getValue', (selector) => {
|
|||
});
|
||||
});
|
||||
|
||||
Cypress.Commands.add('waitSpinner', () => {
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.find('[data-cy="loading-spinner"]').length) {
|
||||
cy.get('[data-cy="loading-spinner"]').should('not.be.visible');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Fill Inputs
|
||||
Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
|
||||
cy.waitForElement(selector, timeout);
|
||||
|
@ -116,6 +119,7 @@ Cypress.Commands.add('selectOption', (selector, option, timeout = 2500) => {
|
|||
|
||||
function selectItem(selector, option, ariaControl, hasWrite = true) {
|
||||
if (!hasWrite) cy.wait(100);
|
||||
cy.waitSpinner();
|
||||
|
||||
getItems(ariaControl).then((items) => {
|
||||
const matchingItem = items
|
||||
|
@ -135,6 +139,7 @@ function getItems(ariaControl, startTime = Cypress._.now(), timeout = 2500) {
|
|||
.should('exist')
|
||||
.find('.q-item')
|
||||
.should('exist')
|
||||
.should('be.visible')
|
||||
.then(($items) => {
|
||||
if (!$items?.length || $items.first().text().trim() === '') {
|
||||
if (Cypress._.now() - startTime > timeout) {
|
||||
|
|
Loading…
Reference in New Issue