+
+
Ref.
-
{{ o.reference || '-' }}
+
{{ o.reference || "-" }}
+
+
+ {{ o.type || "—" }}
+
+
+
+
+
+
+
-
{{ o.type || '—' }}
Naziv
-
{{ o.name || '-' }}
+
{{ o.name || "-" }}
Opis
-
{{ o.description || '' }}
+
+ {{ o.description || "" }}
+
@@ -45,7 +130,13 @@ const items = () => Array.isArray(props.contract?.objects) ? props.contract.obje
Ni predmetov.
-
+
diff --git a/resources/js/Pages/Client/Contracts.vue b/resources/js/Pages/Client/Contracts.vue
index 146077f..b86aa27 100644
--- a/resources/js/Pages/Client/Contracts.vue
+++ b/resources/js/Pages/Client/Contracts.vue
@@ -10,12 +10,14 @@ const props = defineProps({
client: Object,
contracts: Object,
filters: Object,
+ segments: Object,
types: Object,
});
const fromDate = ref(props.filters?.from || "");
const toDate = ref(props.filters?.to || "");
const search = ref(props.filters?.search || "");
+const selectedSegment = ref(props.filters?.segment || "");
function applyDateFilter() {
const params = Object.fromEntries(
new URLSearchParams(window.location.search).entries()
@@ -35,6 +37,11 @@ function applyDateFilter() {
} else {
delete params.search;
}
+ if (selectedSegment.value) {
+ params.segment = selectedSegment.value;
+ } else {
+ delete params.segment;
+ }
delete params.page;
router.get(route("client.contracts", { uuid: props.client.uuid }), params, {
preserveState: true,
@@ -46,6 +53,7 @@ function applyDateFilter() {
function clearDateFilter() {
fromDate.value = "";
toDate.value = "";
+ selectedSegment.value = "";
applyDateFilter();
}
@@ -150,7 +158,7 @@ function formatDate(value) {
class="flex flex-col gap-3 md:flex-row md:items-center md:justify-between"
>
-
+
Od
+
+ Segment
+
+
@@ -194,7 +215,7 @@ function formatDate(value) {
:meta="{ current_page: contracts.current_page, per_page: contracts.per_page, total: contracts.total, last_page: contracts.last_page }"
route-name="client.contracts"
:route-params="{ uuid: client.uuid }"
- :query="{ from: fromDate || undefined, to: toDate || undefined }"
+ :query="{ from: fromDate || undefined, to: toDate || undefined, segment: selectedSegment || undefined }"
:search="search"
row-key="uuid"
:only-props="['contracts']"
diff --git a/resources/js/Pages/Settings/Segments/Index.vue b/resources/js/Pages/Settings/Segments/Index.vue
index 8f900e5..3bac5a9 100644
--- a/resources/js/Pages/Settings/Segments/Index.vue
+++ b/resources/js/Pages/Settings/Segments/Index.vue
@@ -1,12 +1,12 @@