forked from verdnatura/salix-front
Merge pull request '#7193 modified parking to use the scope' (!879) from 7193-ParkingCreateScope into dev
Reviewed-on: verdnatura/salix-front#879 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
30f88070ff
|
@ -278,6 +278,7 @@ globals:
|
|||
RouteExtendedList: Router
|
||||
wasteRecalc: Waste recaclulate
|
||||
operator: Operator
|
||||
parking: Parking
|
||||
supplier: Supplier
|
||||
created: Created
|
||||
worker: Worker
|
||||
|
@ -663,8 +664,6 @@ parking:
|
|||
sector: Sector
|
||||
row: Row
|
||||
column: Column
|
||||
pageTitles:
|
||||
parking: Parking
|
||||
searchBar:
|
||||
info: You can search by parking code
|
||||
label: Search parking...
|
||||
|
|
|
@ -282,6 +282,7 @@ globals:
|
|||
medical: Mutua
|
||||
wasteRecalc: Recalcular mermas
|
||||
operator: Operario
|
||||
parking: Parking
|
||||
supplier: Proveedor
|
||||
created: Fecha creación
|
||||
worker: Trabajador
|
||||
|
@ -710,8 +711,6 @@ parking:
|
|||
pickingOrder: Orden de recogida
|
||||
row: Fila
|
||||
column: Columna
|
||||
pageTitles:
|
||||
parking: Parking
|
||||
searchBar:
|
||||
info: Puedes buscar por código de parking
|
||||
label: Buscar parking...
|
||||
|
|
|
@ -2,17 +2,11 @@
|
|||
import VnCard from 'components/common/VnCard.vue';
|
||||
import ParkingDescriptor from 'pages/Parking/Card/ParkingDescriptor.vue';
|
||||
import ParkingFilter from 'pages/Parking/ParkingFilter.vue';
|
||||
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder', 'row', 'column'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
};
|
||||
</script>
|
||||
<template>
|
||||
<VnCard
|
||||
data-key="Parking"
|
||||
base-url="Parkings"
|
||||
:filter="filter"
|
||||
:descriptor="ParkingDescriptor"
|
||||
:filter-panel="ParkingFilter"
|
||||
search-data-key="ParkingList"
|
||||
|
|
|
@ -29,6 +29,7 @@ const filter = {
|
|||
:url="`Parkings/${entityId}`"
|
||||
title="code"
|
||||
:filter="filter"
|
||||
:to-module="{ name: 'ParkingList' }"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
<VnLv :label="t('globals.code')" :value="entity.code" />
|
||||
|
|
|
@ -22,7 +22,6 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
|||
|
||||
const filter = {
|
||||
fields: ['id', 'sectorFk', 'code', 'pickingOrder'],
|
||||
include: [{ relation: 'sector', scope: { fields: ['id', 'description'] } }],
|
||||
};
|
||||
|
||||
function exprBuilder(param, value) {
|
||||
|
@ -55,10 +54,9 @@ function exprBuilder(param, value) {
|
|||
<VnPaginate
|
||||
data-key="ParkingList"
|
||||
url="Parkings"
|
||||
:filter="filter"
|
||||
:user-filter="filter"
|
||||
:expr-builder="exprBuilder"
|
||||
:limit="20"
|
||||
auto-load
|
||||
order="code"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/// <reference types="cypress" />
|
||||
describe('ParkingList', () => {
|
||||
const searchbar = '#searchbar input';
|
||||
const firstCard = '.q-card:nth-child(1)';
|
||||
const firstChipId =
|
||||
':nth-child(1) > :nth-child(1) > .justify-between > .flex > .q-chip > .q-chip__content';
|
||||
|
@ -14,6 +15,7 @@ describe('ParkingList', () => {
|
|||
});
|
||||
|
||||
it('should redirect on clicking a parking', () => {
|
||||
cy.get(searchbar).type('{enter}');
|
||||
cy.get(firstChipId)
|
||||
.invoke('text')
|
||||
.then((content) => {
|
||||
|
@ -24,6 +26,7 @@ describe('ParkingList', () => {
|
|||
});
|
||||
|
||||
it('should open the details', () => {
|
||||
cy.get(searchbar).type('{enter}');
|
||||
cy.get(firstDetailBtn).click();
|
||||
cy.get(summaryHeader).contains('Basic data');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue