feat: refs #6891 route & drop searchbar
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2024-05-07 10:15:47 +02:00
parent e9f5c0cc8d
commit 777ee0895e
6 changed files with 23 additions and 30 deletions

View File

@ -1,7 +1,17 @@
<script setup> <script setup>
import VnCard from 'components/common/VnCard.vue'; import VnCard from 'components/common/VnCard.vue';
import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue'; import RouteDescriptor from 'pages/Route/Card/RouteDescriptor.vue';
import RouteFilter from './RouteFilter.vue';
</script> </script>
<template> <template>
<VnCard data-key="Route" base-url="Routes" :descriptor="RouteDescriptor" /> <VnCard
data-key="Route"
base-url="Routes"
:descriptor="RouteDescriptor"
:filter-panel="RouteFilter"
searchbar-data-key="RouteList"
searchbar-label="searchLabel"
searchbar-info="searchInfo"
custom-route-redirect-name="RouteList"
/>
</template> </template>

View File

@ -1,21 +0,0 @@
<script setup>
import VnSearchbar from 'components/ui/VnSearchbar.vue';
import {useI18n} from "vue-i18n";
const { t } = useI18n();
</script>
<template>
<VnSearchbar
data-key="RouteList"
:label="t('Search route')"
:info="t('You can search by route reference')"
custom-route-redirect-name="RouteList"
/>
</template>
<style scoped lang="scss"></style>
<i18n>
es:
Search route: Buscar rutas
You can search by route reference: Puedes buscar por referencia de la ruta
</i18n>

View File

@ -10,7 +10,6 @@ import { dashIfEmpty, toCurrency, toDate, toHour } from 'src/filters';
import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue'; import WorkerDescriptorProxy from 'pages/Worker/Card/WorkerDescriptorProxy.vue';
import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue'; import CustomerDescriptorProxy from 'pages/Customer/Card/CustomerDescriptorProxy.vue';
import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue'; import TicketDescriptorProxy from 'pages/Ticket/Card/TicketDescriptorProxy.vue';
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue';
import { openBuscaman } from 'src/utils/buscaman'; import { openBuscaman } from 'src/utils/buscaman';
const $props = defineProps({ const $props = defineProps({
@ -118,11 +117,6 @@ const ticketColumns = ref([
</script> </script>
<template> <template>
<template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar">
<RouteSearchbar />
</Teleport>
</template>
<div class="q-pa-md full-width"> <div class="q-pa-md full-width">
<CardSummary <CardSummary
ref="summary" ref="summary"

View File

@ -11,7 +11,7 @@ import VnInputDate from 'components/common/VnInputDate.vue';
import VnInput from 'components/common/VnInput.vue'; import VnInput from 'components/common/VnInput.vue';
import VnInputTime from 'components/common/VnInputTime.vue'; import VnInputTime from 'components/common/VnInputTime.vue';
import axios from 'axios'; import axios from 'axios';
import RouteSearchbar from 'pages/Route/Card/RouteSearchbar.vue'; import VnSearchbar from 'src/components/ui/VnSearchbar.vue';
import RouteFilter from 'pages/Route/Card/RouteFilter.vue'; import RouteFilter from 'pages/Route/Card/RouteFilter.vue';
import RouteSummary from 'pages/Route/Card/RouteSummary.vue'; import RouteSummary from 'pages/Route/Card/RouteSummary.vue';
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue'; import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
@ -179,7 +179,12 @@ const openTicketsDialog = (id) => {
<template> <template>
<template v-if="stateStore.isHeaderMounted()"> <template v-if="stateStore.isHeaderMounted()">
<Teleport to="#searchbar"> <Teleport to="#searchbar">
<RouteSearchbar /> <VnSearchbar
data-key="RouteList"
:label="t('Search route')"
:info="t('You can search by route reference')"
custom-route-redirect-name="RouteList"
/>
</Teleport> </Teleport>
<Teleport to="#actions-append"> <Teleport to="#actions-append">
<div class="row q-gutter-x-sm"> <div class="row q-gutter-x-sm">

View File

@ -0,0 +1,2 @@
searchLabel: Search route
searchInfo: You can search by route reference

View File

@ -0,0 +1,3 @@
route:
searchLabel: Buscar rutas
searchInfo: Puedes buscar por referencia de la ruta