forked from verdnatura/salix-front
parent
368b8404fa
commit
ce6a94bab8
|
@ -106,6 +106,7 @@ watch(
|
|||
|
||||
const isLoading = ref(false);
|
||||
async function search(evt) {
|
||||
try {
|
||||
if (evt && $props.disableSubmitEvent) return;
|
||||
|
||||
store.filter.where = {};
|
||||
|
@ -118,9 +119,10 @@ async function search(evt) {
|
|||
userParams.value = newParams;
|
||||
|
||||
if (!$props.showAll && !Object.values(filter).length) store.data = [];
|
||||
|
||||
isLoading.value = false;
|
||||
emit('search');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
async function reload() {
|
||||
|
@ -135,6 +137,7 @@ async function reload() {
|
|||
}
|
||||
|
||||
async function clearFilters() {
|
||||
try {
|
||||
isLoading.value = true;
|
||||
store.userParamsChanged = true;
|
||||
arrayData.reset(['skip', 'filter.skip', 'page']);
|
||||
|
@ -154,10 +157,11 @@ async function clearFilters() {
|
|||
if (!$props.showAll) {
|
||||
store.data = [];
|
||||
}
|
||||
|
||||
isLoading.value = false;
|
||||
emit('clear');
|
||||
emit('update:modelValue', userParams.value);
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
const tagsList = computed(() => {
|
||||
|
|
|
@ -101,10 +101,6 @@ onMounted(() => {
|
|||
|
||||
async function search() {
|
||||
const staticParams = Object.entries(store.userParams);
|
||||
console.log('staticParams: ', staticParams);
|
||||
// .filter(
|
||||
// ([key, value]) => value && (props.staticParams || []).includes(key)
|
||||
// );
|
||||
arrayData.reset(['skip', 'page']);
|
||||
|
||||
if (props.makeFetch)
|
||||
|
|
|
@ -19,7 +19,7 @@ const props = defineProps({
|
|||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
:unremovable-params="['from', 'to']"
|
||||
:un-removable-params="['from', 'to']"
|
||||
:hidden-tags="['from', 'to']"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import VnCard from 'components/common/VnCard.vue';
|
||||
|
@ -17,18 +16,10 @@ const customRouteRedirectName = computed(() => {
|
|||
const route = config[routeName.value];
|
||||
if (route) return null;
|
||||
return 'OrderList';
|
||||
//Jon, asi es como lo dejamos
|
||||
// if (routeName.value === 'OrderCatalog') return null;
|
||||
// return 'OrderList';
|
||||
});
|
||||
const customFilterPanel = computed(() => {
|
||||
const filterPanel = config[routeName.value] ?? OrderFilter;
|
||||
return filterPanel;
|
||||
//Jon, asi es como lo dejamos
|
||||
// if (routeName.value === 'OrderCatalog') return null;
|
||||
// return 'OrderList';
|
||||
// if (routeName.value === 'OrderCatalog') return OrderCatalogFilter;
|
||||
// return OrderFilter;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -5,8 +5,14 @@ describe('WorkerList', () => {
|
|||
cy.visit('/#/worker/list');
|
||||
});
|
||||
|
||||
it('should open the worker summary', () => {
|
||||
cy.get('.bg-header > :nth-child(2) > .full-width > :nth-child(1) >').type(
|
||||
it('should opern the worker summary', () => {
|
||||
cy.get(
|
||||
':nth-child(1) > .text-right > .q-btn > .q-btn__content > .q-icon'
|
||||
).click();
|
||||
});
|
||||
|
||||
it('should go to the worker summary', () => {
|
||||
cy.get('#searchbar > .q-field > .q-field__inner > .q-field__control').type(
|
||||
'jessica jones{enter}'
|
||||
);
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ describe('WorkerLocker', () => {
|
|||
const workerId = 1109;
|
||||
const lockerCode = '2F';
|
||||
const input = '.q-card input';
|
||||
const firstOpt = '[role="listbox"] .q-item:nth-child(1)';
|
||||
beforeEach(() => {
|
||||
cy.viewport(1280, 720);
|
||||
cy.login('productionBoss');
|
||||
|
@ -11,9 +10,7 @@ describe('WorkerLocker', () => {
|
|||
|
||||
it('should allocates a locker', () => {
|
||||
cy.get(input).click();
|
||||
cy.get(input).type(lockerCode);
|
||||
cy.get(firstOpt).click();
|
||||
cy.saveCard();
|
||||
cy.get(input).invoke('val').should('eq', lockerCode);
|
||||
cy.get(input).type(`${lockerCode}{enter}`);
|
||||
cy.get(input).should('have.value', lockerCode);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue