diff --git a/resources/js/Pages/Imports/Index.vue b/resources/js/Pages/Imports/Index.vue
index b0b3eae..3d9f642 100644
--- a/resources/js/Pages/Imports/Index.vue
+++ b/resources/js/Pages/Imports/Index.vue
@@ -3,6 +3,16 @@ import AppLayout from "@/Layouts/AppLayout.vue";
import { Link, router } from "@inertiajs/vue3";
import { ref } from "vue";
import ConfirmationModal from "@/Components/ConfirmationModal.vue";
+import DataTableServer from "@/Components/DataTable/DataTableServer.vue";
+import Dropdown from "@/Components/Dropdown.vue";
+import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
+import {
+ faEllipsisVertical,
+ faEye,
+ faPlay,
+ faTrash,
+ faCircleCheck,
+} from "@fortawesome/free-solid-svg-icons";
const props = defineProps({
imports: Object,
@@ -11,6 +21,7 @@ const props = defineProps({
const deletingId = ref(null);
const confirming = ref(false);
const errorMsg = ref(null);
+const search = ref(new URLSearchParams(window.location.search).get("search") || "");
function canDelete(status) {
return !["completed", "processing"].includes(status);
@@ -47,6 +58,28 @@ function statusBadge(status) {
};
return map[status] || "bg-gray-100 text-gray-800";
}
+
+const columns = [
+ { key: "created_at", label: "Datum" },
+ { key: "original_name", label: "Datoteka" },
+ { key: "status", label: "Status" },
+ { key: "client", label: "Naročnik" },
+ { key: "template", label: "Predloga" },
+ { key: "actions", label: "Akcije", class: "w-px" },
+];
+
+function formatDateTimeNoSeconds(value) {
+ if (!value) return "-";
+ const d = new Date(value);
+ if (isNaN(d)) return String(value);
+ return d.toLocaleString("sl-SI", {
+ year: "numeric",
+ month: "2-digit",
+ day: "2-digit",
+ hour: "2-digit",
+ minute: "2-digit",
+ });
+}
@@ -54,89 +87,116 @@ function statusBadge(status) {
Uvozi
- Novi uvoz
-
-
-
-
-
- | Datum |
- Datoteka |
- Status |
- Naročnik |
- Predloga |
- Akcije |
-
-
-
-
- |
- {{ new Date(imp.created_at).toLocaleString() }}
- |
- {{ imp.original_name }} |
-
- {{ imp.status }}
- |
- {{ imp.client?.person?.full_name ?? "—" }} |
- {{ imp.template?.name ?? "—" }} |
-
- Poglej
- Nadaljuj
-
- Zaključen
- |
-
-
-
+
+
+ Novi uvoz
+
+
+
+ {{ formatDateTimeNoSeconds(row.created_at) }}
+
-
-
- Prikaz {{ imports.meta.from }}–{{ imports.meta.to }} od
- {{ imports.meta.total }}
-
-
- Nazaj
- Naprej
-
-
+
+
+
+ {{ row.status }}
+
+
+
+
+
+ {{ row.client?.person?.full_name ?? "—" }}
+
+
+
+
+ {{ row.template?.name ?? "—" }}
+
+
+
+
+
+
+
+
+
+
+
+
+
Poglej
+
+
+
+
Nadaljuj
+
+
+
+
+ Zaključen
+
+
+
+
+
+
- Segmenti
+
@@ -82,7 +82,7 @@ function formatCurrencyEUR(value) {
- {{ s.description || "—" }}
+ {{ s.description || "" }}
Vsota stanj
@@ -90,13 +90,6 @@ function formatCurrencyEUR(value) {
{{ formatCurrencyEUR(s.total_balance) }}
-
- Odpri
-
Ni aktivnih segmentov.
diff --git a/resources/js/Pages/Segments/Show.vue b/resources/js/Pages/Segments/Show.vue
index 18aad8e..fe52ea7 100644
--- a/resources/js/Pages/Segments/Show.vue
+++ b/resources/js/Pages/Segments/Show.vue
@@ -1,35 +1,27 @@
-
-
-
+ Dodaj akcijo
+
+
+
(sort = v)"
+ @update:page="(v) => (page = v)"
+ @update:pageSize="(v) => (pageSize = v)"
+ >
+
+
+
+ {{ row.color_tag || "—" }}
+
+
+
+ {{ row.decisions?.length ?? 0 }}
+
+
+
+
+
+
+
-
-
- #
- Name
- Color tag
- Decisions
-
- Edit
-
-
-
-
- {{ act.id }}
- {{ act.name }}
-
-
-
- {{ act.color_tag }}
-
-
- {{ act.decisions.length }}
-
-
-
-
-
-
-
+
+
+ Spremeni akcijo
+
+
+
diff --git a/resources/js/Pages/Settings/Partials/DecisionTable.vue b/resources/js/Pages/Settings/Partials/DecisionTable.vue
index 47e25bc..5fcda6e 100644
--- a/resources/js/Pages/Settings/Partials/DecisionTable.vue
+++ b/resources/js/Pages/Settings/Partials/DecisionTable.vue
@@ -1,20 +1,22 @@
-
-
-
-
-
-
-
+ Dodaj odločitev
+
+
+
+
+
+
+ Dodaj odločitev
+
+
+
(sort = v)"
+ @update:page="(v) => (page = v)"
+ @update:pageSize="(v) => (pageSize = v)"
+ >
+
+
+
+ {{ row.color_tag || "—" }}
+
+
+
+ {{ row.actions?.length ?? 0 }}
+
+
+
+ {{
+ row.auto_mail ? "Enabled" : "Disabled"
+ }}
+
+ Template:
+ {{ emailTemplates.find((t) => t.id === row.email_template_id)?.name || "—" }}
+
+
+
+
+
+
+
+
+
+
+
+ Spremeni odločitev
+
+
+
-
-
+
+
+
+
-
-
- Dodaj odločitev
-
-
-
-
-
-
-
+
+
+
+
+ Ta predloga zahteva pogodbo.
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
- Ta predloga zahteva pogodbo.
-
-
-
-
-
-
- {{ createForm.color_tag }}
-
-
+
+
+ Shranjuje.
+
-
-
-
-
+
+ Dodaj
+
+
+
+
+
-
-
- Shranjuje.
-
-
-
- Dodaj
-
-
-
-
-
-
-
-
- Delete decision
-
-
- Are you sure you want to delete decision "{{ toDelete?.name }}"? This cannot be undone.
-
-
-
- Delete
-
-
-
\ No newline at end of file
+
+ Delete decision
+
+ Are you sure you want to delete decision "{{ toDelete?.name }}"? This cannot be
+ undone.
+
+
+
+ Delete
+
+
+
diff --git a/routes/breadcrumbs.php b/routes/breadcrumbs.php
index 39cd9da..e65a63d 100644
--- a/routes/breadcrumbs.php
+++ b/routes/breadcrumbs.php
@@ -6,6 +6,7 @@
// this import. This is nice for IDE syntax and refactoring.
use App\Models\Client;
use App\Models\ClientCase;
+use App\Models\Segment;
use Diglactic\Breadcrumbs\Breadcrumbs;
// This import is also not required, and you could replace `BreadcrumbTrail $trail`
// with `$trail`. This is nice for IDE type checking and completion.
@@ -88,3 +89,15 @@
$trail->parent('settings');
$trail->push('Plačila', route('settings.payment.edit'));
});
+
+// Dashboard > Segments
+Breadcrumbs::for('segments.index', function (BreadcrumbTrail $trail) {
+ $trail->parent('dashboard');
+ $trail->push('Segmenti', route('segments.index'));
+});
+
+// Dashboard > Segments > [Segment]
+Breadcrumbs::for('segments.show', function (BreadcrumbTrail $trail, Segment $segment) {
+ $trail->parent('segments.index');
+ $trail->push($segment->name, route('segments.show', $segment));
+});