diff --git a/resources/js/Pages/CallLaters/Index.vue b/resources/js/Pages/CallLaters/Index.vue index 9ca17bb..e6527b0 100644 --- a/resources/js/Pages/CallLaters/Index.vue +++ b/resources/js/Pages/CallLaters/Index.vue @@ -24,6 +24,7 @@ import { } from "@/Components/ui/dropdown-menu"; import AppPopover from "@/Components/app/ui/AppPopover.vue"; +import { fmtDateTime } from "@/Utilities/functions"; const props = defineProps({ callLaters: Object, @@ -99,18 +100,6 @@ function isOverdue(item) { return new Date(item.call_back_at) < new Date(); } -function fmtDateTime(value) { - if (!value) return "-"; - const d = new Date(value); - if (isNaN(d.getTime())) return value; - const day = String(d.getDate()).padStart(2, "0"); - const month = String(d.getMonth() + 1).padStart(2, "0"); - const year = d.getFullYear(); - const hours = String(d.getHours()).padStart(2, "0"); - const minutes = String(d.getMinutes()).padStart(2, "0"); - return `${day}.${month}.${year} ${hours}:${minutes}`; -} - const columns = [ { key: "person", label: "Stranka / Primer", sortable: false }, { key: "contract", label: "Pogodba", sortable: false },