forked from verdnatura/salix-front
Merge branch 'dev' into 6763-vnTreeRefact
This commit is contained in:
commit
9caf9edfbb
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "salix-front",
|
"name": "salix-front",
|
||||||
"version": "24.8.0",
|
"version": "24.10.0",
|
||||||
"description": "Salix frontend",
|
"description": "Salix frontend",
|
||||||
"productName": "Salix",
|
"productName": "Salix",
|
||||||
"author": "Verdnatura",
|
"author": "Verdnatura",
|
||||||
|
|
|
@ -50,7 +50,10 @@ const value = computed({
|
||||||
return $props.modelValue;
|
return $props.modelValue;
|
||||||
},
|
},
|
||||||
set(value) {
|
set(value) {
|
||||||
emit('update:modelValue', value);
|
emit(
|
||||||
|
'update:modelValue',
|
||||||
|
postcodesOptions.value.find((p) => p.code === value)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -101,16 +104,11 @@ function handleFetch(data) {
|
||||||
:label="t('Location')"
|
:label="t('Location')"
|
||||||
:placeholder="t('search_by_postalcode')"
|
:placeholder="t('search_by_postalcode')"
|
||||||
@input-value="locationFilter"
|
@input-value="locationFilter"
|
||||||
:default-filter="true"
|
:default-filter="false"
|
||||||
:input-debounce="300"
|
:input-debounce="300"
|
||||||
:class="{ required: $attrs.required }"
|
:class="{ required: $attrs.required }"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
use-input
|
|
||||||
clearable
|
clearable
|
||||||
hide-selected
|
|
||||||
fill-input
|
|
||||||
>
|
>
|
||||||
<template #form>
|
<template #form>
|
||||||
<CreateNewPostcode @on-data-saved="locationFilter()" />
|
<CreateNewPostcode @on-data-saved="locationFilter()" />
|
||||||
|
|
|
@ -116,14 +116,14 @@ async function fetchFilter(val) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function filterHandler(val, update) {
|
async function filterHandler(val, update) {
|
||||||
|
if (!$props.defaultFilter) return update();
|
||||||
|
let newOptions;
|
||||||
|
if ($props.url) {
|
||||||
|
newOptions = await fetchFilter(val);
|
||||||
|
} else newOptions = filter(val, myOptionsOriginal.value);
|
||||||
update(
|
update(
|
||||||
async () => {
|
() => {
|
||||||
if (!$props.defaultFilter) return;
|
myOptions.value = newOptions;
|
||||||
if ($props.url) {
|
|
||||||
myOptions.value = await fetchFilter(val);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
myOptions.value = filter(val, myOptionsOriginal.value);
|
|
||||||
},
|
},
|
||||||
(ref) => {
|
(ref) => {
|
||||||
if (val !== '' && ref.options.length > 0) {
|
if (val !== '' && ref.options.length > 0) {
|
||||||
|
|
|
@ -135,7 +135,7 @@ async function regularizeClaim() {
|
||||||
message: t('globals.dataSaved'),
|
message: t('globals.dataSaved'),
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
});
|
});
|
||||||
await onUpdateGreugeAccept();
|
if (multiplicatorValue.value) await onUpdateGreugeAccept();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onUpdateGreugeAccept() {
|
async function onUpdateGreugeAccept() {
|
||||||
|
|
|
@ -186,6 +186,7 @@ async function upsert() {
|
||||||
url="Suppliers"
|
url="Suppliers"
|
||||||
:fields="['id', 'nickname']"
|
:fields="['id', 'nickname']"
|
||||||
sort-by="nickname"
|
sort-by="nickname"
|
||||||
|
:is-clearable="false"
|
||||||
>
|
>
|
||||||
<template #option="scope">
|
<template #option="scope">
|
||||||
<QItem v-bind="scope.itemProps">
|
<QItem v-bind="scope.itemProps">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('InvoiceInBasicData', () => {
|
describe('InvoiceInBasicData', () => {
|
||||||
const selects = '.q-form .q-select';
|
const selects = ':nth-child(1) > :nth-child(1) > .q-field';
|
||||||
const appendBtns = 'label button';
|
const appendBtns = 'label button';
|
||||||
const dialogAppendBtns = '.q-dialog label button';
|
const dialogAppendBtns = '.q-dialog label button';
|
||||||
const dialogInputs = '.q-dialog input';
|
const dialogInputs = '.q-dialog input';
|
||||||
|
@ -12,9 +12,7 @@ describe('InvoiceInBasicData', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should edit the provideer and supplier ref', () => {
|
it('should edit the provideer and supplier ref', () => {
|
||||||
cy.get(selects).eq(0).click();
|
cy.selectOption(selects, 'Bros');
|
||||||
cy.get(selects).eq(0).type('Bros');
|
|
||||||
cy.get(selects).eq(0).type('{enter}');
|
|
||||||
|
|
||||||
cy.get('[title="Reset"]').click();
|
cy.get('[title="Reset"]').click();
|
||||||
cy.get(appendBtns).eq(0).click();
|
cy.get(appendBtns).eq(0).click();
|
||||||
|
|
|
@ -7,6 +7,7 @@ describe('InvoiceInList', () => {
|
||||||
const summaryHeaders = '.summaryBody .header';
|
const summaryHeaders = '.summaryBody .header';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
cy.viewport(1920, 1080);
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.visit(`/#/invoice-in/list`);
|
cy.visit(`/#/invoice-in/list`);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue