style: remove proposal
gitea/salix-front/pipeline/pr-test This commit looks good
Details
gitea/salix-front/pipeline/pr-test This commit looks good
Details
This commit is contained in:
parent
33d6662f97
commit
443a2747cc
|
@ -14,10 +14,6 @@ const $props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {},
|
default: () => {},
|
||||||
},
|
},
|
||||||
searchBarRef: {
|
|
||||||
type: Object,
|
|
||||||
default: () => {},
|
|
||||||
},
|
|
||||||
dataKey: {
|
dataKey: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
|
@ -65,10 +61,6 @@ const $props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
requiredParams: {
|
|
||||||
type: [Array, Object],
|
|
||||||
default: () => [],
|
|
||||||
},
|
|
||||||
useSearchbar: {
|
useSearchbar: {
|
||||||
type: [Boolean, Function],
|
type: [Boolean, Function],
|
||||||
default: false,
|
default: false,
|
||||||
|
|
|
@ -17,10 +17,6 @@ const props = defineProps({
|
||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
searchBarRef: {
|
|
||||||
type: Object,
|
|
||||||
default: () => ({}),
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const provinces = ref([]);
|
const provinces = ref([]);
|
||||||
|
@ -45,11 +41,6 @@ from.setDate(from.getDate() - 7);
|
||||||
const to = Date.vnNew();
|
const to = Date.vnNew();
|
||||||
to.setHours(23, 59, 0, 0);
|
to.setHours(23, 59, 0, 0);
|
||||||
to.setDate(to.getDate() + 1);
|
to.setDate(to.getDate() + 1);
|
||||||
const userParams = computed(() => {
|
|
||||||
from.value = from.toISOString();
|
|
||||||
to.value = to.toISOString();
|
|
||||||
return { from, to };
|
|
||||||
});
|
|
||||||
function validateDateRange(params) {
|
function validateDateRange(params) {
|
||||||
const hasFrom = 'from' in params;
|
const hasFrom = 'from' in params;
|
||||||
const hasTo = 'to' in params;
|
const hasTo = 'to' in params;
|
||||||
|
@ -79,11 +70,9 @@ function validateDateRange(params) {
|
||||||
<FetchData url="AgencyModes" @on-fetch="(data) => (agencies = data)" auto-load />
|
<FetchData url="AgencyModes" @on-fetch="(data) => (agencies = data)" auto-load />
|
||||||
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
<FetchData url="Warehouses" @on-fetch="(data) => (warehouses = data)" auto-load />
|
||||||
<VnFilterPanel
|
<VnFilterPanel
|
||||||
:searchBarRef="$props.searchBarRef"
|
|
||||||
:data-key="props.dataKey"
|
:data-key="props.dataKey"
|
||||||
:search-button="true"
|
:search-button="true"
|
||||||
:use-searchbar="validateDateRange"
|
:use-searchbar="validateDateRange"
|
||||||
:requiredParams="{ ...userParams }"
|
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
|
|
|
@ -491,10 +491,7 @@ watch(
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #advanced-menu>
|
<template #advanced-menu>
|
||||||
<TicketFilter
|
<TicketFilter data-key="TicketList" />
|
||||||
data-key="TicketList"
|
|
||||||
:searchbarRef="$refs.sectionRef?.$refs.searchbarRef"
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
<template #body>
|
<template #body>
|
||||||
<VnTable
|
<VnTable
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
/// <reference types="cypress" />
|
/// <reference types="cypress" />
|
||||||
describe('TicketFilter', () => {
|
describe('TicketFilter', () => {
|
||||||
const firstRow = 'tbody.q-virtual-scroll__content tr:nth-child(1)';
|
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login('developer');
|
cy.login('developer');
|
||||||
cy.viewport(1920, 1080);
|
cy.viewport(1920, 1080);
|
||||||
|
|
|
@ -48,8 +48,8 @@ describe('TicketList', () => {
|
||||||
expect(query).to.not.have.property('clientFk');
|
expect(query).to.not.have.property('clientFk');
|
||||||
});
|
});
|
||||||
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
cy.intercept('GET', /\/api\/Tickets\/filter/).as('ticketFilter');
|
||||||
cy.get('[data-cy="Customer ID_input"]').clear('1');
|
cy.dataCy('Customer ID_input').clear('1');
|
||||||
cy.get('[data-cy="Customer ID_input"]').type('1101{enter}');
|
cy.dataCy('Customer ID_input').type('1101{enter}');
|
||||||
cy.wait('@ticketFilter').then(({ request }) => {
|
cy.wait('@ticketFilter').then(({ request }) => {
|
||||||
const { query } = request;
|
const { query } = request;
|
||||||
expect(query).to.not.have.property('from');
|
expect(query).to.not.have.property('from');
|
||||||
|
@ -57,11 +57,11 @@ describe('TicketList', () => {
|
||||||
expect(query).to.have.property('clientFk');
|
expect(query).to.have.property('clientFk');
|
||||||
});
|
});
|
||||||
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
cy.get('[data-cy="vnTableCreateBtn"] > .q-btn__content > .q-icon').click();
|
||||||
cy.get('[data-cy="Customer_select"]').should('have.value', 'Bruce Wayne');
|
cy.dataCy('Customer_select').should('have.value', 'Bruce Wayne');
|
||||||
cy.get('[data-cy="Address_select"]').click();
|
cy.dataCy('Address_select').click();
|
||||||
|
|
||||||
cy.selectOptionBeta().click();
|
cy.selectOptionBeta().click();
|
||||||
cy.get('[data-cy="Address_select"]').should('have.value', 'Bruce Wayne');
|
cy.dataCy('Address_select').should('have.value', 'Bruce Wayne');
|
||||||
});
|
});
|
||||||
it('Client list create new client', () => {
|
it('Client list create new client', () => {
|
||||||
cy.dataCy('vnTableCreateBtn').should('exist');
|
cy.dataCy('vnTableCreateBtn').should('exist');
|
||||||
|
|
Loading…
Reference in New Issue