diff --git a/src/components/common/VnCard.vue b/src/components/common/VnCard.vue
index b211a3c7f..27e301426 100644
--- a/src/components/common/VnCard.vue
+++ b/src/components/common/VnCard.vue
@@ -17,13 +17,7 @@ const props = defineProps({
descriptor: { type: Object, required: true },
filterPanel: { type: Object, default: undefined },
searchDataKey: { type: String, default: undefined },
- searchUrl: { type: String, default: undefined },
- searchbarLabel: { type: String, default: '' },
- searchbarInfo: { type: String, default: '' },
- searchCustomRouteRedirect: { type: String, default: undefined },
- searchRedirect: { type: Boolean, default: true },
- searchMakeFetch: { type: Boolean, default: true },
- searchUrlQuery: { type: String, default: undefined },
+ searchbarProps: { type: Object, default: undefined },
});
const stateStore = useStateStore();
@@ -66,15 +60,7 @@ if (props.baseUrl) {
-
+
diff --git a/src/pages/Account/Alias/Card/AliasCard.vue b/src/pages/Account/Alias/Card/AliasCard.vue
index f5103cf03..d997af4a9 100644
--- a/src/pages/Account/Alias/Card/AliasCard.vue
+++ b/src/pages/Account/Alias/Card/AliasCard.vue
@@ -25,9 +25,11 @@ const searchBarDataKeys = {
base-url="MailAliases"
:descriptor="AliasDescriptor"
:search-data-key="searchBarDataKeys[routeName]"
- :search-custom-route-redirect="customRouteRedirectName"
- :search-redirect="!!customRouteRedirectName"
- :searchbar-label="t('mailAlias.search')"
- :searchbar-info="t('mailAlias.searchInfo')"
+ :searchbarProps="{
+ redirect: !!customRouteRedirectName,
+ customRouteRedirectName,
+ info: t('mailAlias.searchInfo'),
+ label: t('mailAlias.search'),
+ }"
/>
diff --git a/src/pages/Account/Card/AccountCard.vue b/src/pages/Account/Card/AccountCard.vue
index e4db3ee2b..c64515aab 100644
--- a/src/pages/Account/Card/AccountCard.vue
+++ b/src/pages/Account/Card/AccountCard.vue
@@ -26,9 +26,11 @@ const searchBarDataKeys = {
data-key="Account"
:descriptor="AccountDescriptor"
:search-data-key="searchBarDataKeys[routeName]"
- :search-custom-route-redirect="customRouteRedirectName"
- :search-redirect="!!customRouteRedirectName"
- :searchbar-label="t('account.search')"
- :searchbar-info="t('account.searchInfo')"
+ :searchbarProps="{
+ redirect: !!customRouteRedirectName,
+ customRouteRedirectName,
+ label: t('account.search'),
+ info: t('account.searchInfo'),
+ }"
/>
diff --git a/src/pages/Account/Role/Card/RoleCard.vue b/src/pages/Account/Role/Card/RoleCard.vue
index 8a65d37d7..72134b53d 100644
--- a/src/pages/Account/Role/Card/RoleCard.vue
+++ b/src/pages/Account/Role/Card/RoleCard.vue
@@ -23,9 +23,11 @@ const searchBarDataKeys = {
data-key="Role"
:descriptor="RoleDescriptor"
:search-data-key="searchBarDataKeys[routeName]"
- :search-custom-route-redirect="customRouteRedirectName"
- :search-redirect="!!customRouteRedirectName"
- :searchbar-label="t('role.searchRoles')"
- :searchbar-info="t('role.searchInfo')"
+ :searchbarProps="{
+ redirect: !!customRouteRedirectName,
+ customRouteRedirectName,
+ label: t('role.searchRoles'),
+ info: t('role.searchInfo'),
+ }"
/>
diff --git a/src/pages/Claim/Card/ClaimCard.vue b/src/pages/Claim/Card/ClaimCard.vue
index 19d63e3b2..64cf35f81 100644
--- a/src/pages/Claim/Card/ClaimCard.vue
+++ b/src/pages/Claim/Card/ClaimCard.vue
@@ -11,9 +11,11 @@ import filter from './ClaimFilter.js';
:descriptor="ClaimDescriptor"
:filter-panel="ClaimFilter"
search-data-key="ClaimList"
- search-url="Claims/filter"
- searchbar-label="Search claim"
- searchbar-info="You can search by claim id or customer name"
:filter="filter"
+ :searchbarProps="{
+ url: 'Claims/filter',
+ label: 'Search claim',
+ info: 'You can search by claim id or customer name',
+ }"
/>
diff --git a/src/pages/Customer/Card/CustomerCard.vue b/src/pages/Customer/Card/CustomerCard.vue
index 17f123e7b..c77e429ef 100644
--- a/src/pages/Customer/Card/CustomerCard.vue
+++ b/src/pages/Customer/Card/CustomerCard.vue
@@ -10,8 +10,10 @@ import CustomerFilter from '../CustomerFilter.vue';
:descriptor="CustomerDescriptor"
:filter-panel="CustomerFilter"
search-data-key="CustomerList"
- search-url="Clients/extendedListFilter"
- searchbar-label="Search customer"
- searchbar-info="You can search by customer id or name"
+ :searchbarProps="{
+ url: 'Clients/extendedListFilter',
+ label: 'Search customer',
+ info: 'You can search by customer id or name',
+ }"
/>
diff --git a/src/pages/Entry/Card/EntryCard.vue b/src/pages/Entry/Card/EntryCard.vue
index 9fadd2d06..a1fd83d05 100644
--- a/src/pages/Entry/Card/EntryCard.vue
+++ b/src/pages/Entry/Card/EntryCard.vue
@@ -10,8 +10,10 @@ import EntryFilter from '../EntryFilter.vue';
:descriptor="EntryDescriptor"
:filter-panel="EntryFilter"
search-data-key="EntryList"
- search-url="Entries/filter"
- searchbar-label="Search entries"
- searchbar-info="You can search by entry reference"
+ :searchbarProps="{
+ url: 'Entries/filter',
+ label: 'Search entries',
+ info: 'You can search by entry reference',
+ }"
/>
diff --git a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
index e187a2df2..26f34d0d3 100644
--- a/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
+++ b/src/pages/InvoiceOut/Card/InvoiceOutCard.vue
@@ -10,8 +10,10 @@ import InvoiceOutFilter from '../InvoiceOutFilter.vue';
:descriptor="InvoiceOutDescriptor"
:filter-panel="InvoiceOutFilter"
search-data-key="InvoiceOutList"
- search-url="InvoiceOuts/filter"
- searchbar-label="Search invoice"
- searchbar-info="You can search by invoice reference"
+ :searchbarProps="{
+ url: 'InvoiceOuts/filter',
+ label: 'Search invoice',
+ info: 'You can search by invoice reference',
+ }"
/>
diff --git a/src/pages/Item/Card/ItemCard.vue b/src/pages/Item/Card/ItemCard.vue
index 66d46f576..d125e9bbd 100644
--- a/src/pages/Item/Card/ItemCard.vue
+++ b/src/pages/Item/Card/ItemCard.vue
@@ -10,8 +10,10 @@ import ItemListFilter from '../ItemListFilter.vue';
:descriptor="ItemDescriptor"
:filter-panel="ItemListFilter"
search-data-key="ItemList"
- search-url="Items/filter"
- searchbar-label="searchbar.label"
- searchbar-info="searchbar.info"
+ :searchbarProps="{
+ url: 'Items/filter',
+ label: 'searchbar.labelr',
+ info: 'searchbar.info',
+ }"
/>
diff --git a/src/pages/Parking/Card/ParkingCard.vue b/src/pages/Parking/Card/ParkingCard.vue
index 620f4bb2d..5c29e5665 100644
--- a/src/pages/Parking/Card/ParkingCard.vue
+++ b/src/pages/Parking/Card/ParkingCard.vue
@@ -16,8 +16,10 @@ const filter = {
:descriptor="ParkingDescriptor"
:filter-panel="ParkingFilter"
search-data-key="ParkingList"
- search-url="Parkings"
- searchbar-label="parking.searchBar.label"
- searchbar-info="parking.searchBar.info"
+ :searchbarProps="{
+ url: 'Parkings',
+ label: 'parking.searchBar.label',
+ info: 'parking.searchBar.info',
+ }"
/>
diff --git a/src/pages/Route/Agency/Card/AgencyCard.vue b/src/pages/Route/Agency/Card/AgencyCard.vue
index e1eebabf7..65a095e48 100644
--- a/src/pages/Route/Agency/Card/AgencyCard.vue
+++ b/src/pages/Route/Agency/Card/AgencyCard.vue
@@ -8,8 +8,10 @@ import VnCard from 'components/common/VnCard.vue';
base-url="Agencies"
:descriptor="AgencyDescriptor"
search-data-key="AgencyList"
- search-url="Agencies"
- searchbar-label="agency.searchBar.label"
- searchbar-info="agency.searchBar.info"
+ :searchbarProps="{
+ url: 'Agencies',
+ label: 'agency.searchBar.label',
+ info: 'agency.searchBar.info',
+ }"
/>
diff --git a/src/pages/Route/Roadmap/RoadmapCard.vue b/src/pages/Route/Roadmap/RoadmapCard.vue
index 4e8f8dd50..6bd6816ff 100644
--- a/src/pages/Route/Roadmap/RoadmapCard.vue
+++ b/src/pages/Route/Roadmap/RoadmapCard.vue
@@ -10,8 +10,10 @@ import RoadmapFilter from 'pages/Route/Roadmap/RoadmapFilter.vue';
:descriptor="RoadmapDescriptor"
:filter-panel="RoadmapFilter"
search-data-key="RoadmapList"
- search-url="Roadmaps"
- searchbar-label="Search roadmap"
- searchbar-info="You can search by roadmap id or customer name"
+ :searchbarProps="{
+ url: 'Roadmaps',
+ label: 'Search roadmap',
+ info: 'You can search by roadmap id or customer name',
+ }"
/>
diff --git a/src/pages/Supplier/Card/SupplierCard.vue b/src/pages/Supplier/Card/SupplierCard.vue
index ed4ce7eb2..594026d18 100644
--- a/src/pages/Supplier/Card/SupplierCard.vue
+++ b/src/pages/Supplier/Card/SupplierCard.vue
@@ -10,8 +10,10 @@ import SupplierListFilter from '../SupplierListFilter.vue';
:descriptor="SupplierDescriptor"
:filter-panel="SupplierListFilter"
search-data-key="SupplierList"
- search-url="Suppliers/filter"
- searchbar-label="Search suppliers"
- search-url-query="table"
+ :searchbar-props="{
+ url: 'Suppliers/filter',
+ searchUrl: 'table',
+ label: 'Search suppliers',
+ }"
/>
diff --git a/src/pages/Ticket/Card/TicketCard.vue b/src/pages/Ticket/Card/TicketCard.vue
index 8c9745c02..b9510576a 100644
--- a/src/pages/Ticket/Card/TicketCard.vue
+++ b/src/pages/Ticket/Card/TicketCard.vue
@@ -11,6 +11,7 @@ const { t } = useI18n();
const route = useRoute();
const routeName = computed(() => route.name);
+const customRouteRedirectName = computed(() => routeName.value);
route.name);
:filter-panel="TicketFilter"
:descriptor="TicketDescriptor"
search-data-key="TicketList"
- :search-custom-route-redirect="routeName"
- :searchbar-label="t('card.search')"
- :searchbar-info="t('card.searchInfo')"
+ :searchbarProps="{
+ customRouteRedirectName,
+ label: t('card.search'),
+ info: t('card.searchInfo'),
+ }"
/>
diff --git a/src/pages/Travel/Card/TravelCard.vue b/src/pages/Travel/Card/TravelCard.vue
index a3c1430e9..99271459e 100644
--- a/src/pages/Travel/Card/TravelCard.vue
+++ b/src/pages/Travel/Card/TravelCard.vue
@@ -35,10 +35,12 @@ const filter = {
data-key="Travel"
base-url="Travels"
search-data-key="TravelList"
- searchbar-label="Search travel"
- searchbar-info="You can search by travel id or name"
- search-url="Travels"
:filter="filter"
:descriptor="TravelDescriptor"
+ :searchbarProps="{
+ url: 'Travels',
+ label: 'Search travel',
+ info: 'You can search by travel id or name',
+ }"
/>
diff --git a/src/pages/Worker/Card/WorkerCard.vue b/src/pages/Worker/Card/WorkerCard.vue
index fb9ab9666..f5157424d 100644
--- a/src/pages/Worker/Card/WorkerCard.vue
+++ b/src/pages/Worker/Card/WorkerCard.vue
@@ -10,8 +10,10 @@ import WorkerFilter from '../WorkerFilter.vue';
:descriptor="WorkerDescriptor"
:filter-panel="WorkerFilter"
search-data-key="WorkerList"
- search-url="Workers/filter"
- searchbar-label="Search worker"
- searchbar-info="You can search by worker id or name"
+ :searchbarProps="{
+ url: 'Workers/filter',
+ label: 'Search worker',
+ info: 'You can search by worker id or name',
+ }"
/>
diff --git a/src/pages/Zone/Card/ZoneCard.vue b/src/pages/Zone/Card/ZoneCard.vue
index 59049a5b3..eeece3bd8 100644
--- a/src/pages/Zone/Card/ZoneCard.vue
+++ b/src/pages/Zone/Card/ZoneCard.vue
@@ -28,11 +28,12 @@ const searchBarDataKeys = {
data-key="Zone"
:descriptor="ZoneDescriptor"
:search-data-key="searchBarDataKeys[routeName]"
- :search-custom-route-redirect="customRouteRedirectName"
- :search-redirect="!!customRouteRedirectName"
- :search-make-fetch="searchbarMakeFetch"
- :searchbar-label="t('list.searchZone')"
- :searchbar-info="t('list.searchInfo')"
+ :filter-panel="ZoneFilterPanel"
+ :searchbarProps="{
+ url: 'Zones',
+ label: t('list.searchZone'),
+ info: t('list.searchInfo'),
+ }"
>