Field job changed permissions and other things

This commit is contained in:
Simon Pocrnjič
2025-10-31 13:21:54 +01:00
parent 0d9c8c8b30
commit 5f879c9436
6 changed files with 160 additions and 46 deletions
+1
View File
@@ -186,6 +186,7 @@ const rawMenuGroups = [
},
{
label: "Terensko delo",
requires: { permission: "field-job" },
items: [
{
key: "fieldjobs",
+2 -2
View File
@@ -130,9 +130,9 @@ const redirectIfNoContracts = () => {
}
};
onMounted(() => {
/*onMounted(() => {
redirectIfNoContracts();
});
});*/
watch(
() => (Array.isArray(props.contracts) ? props.contracts.length : null),
@@ -38,6 +38,7 @@ const columns = [
{ key: "id", label: "#", sortable: true, class: "w-16" },
{ key: "name", label: "Ime", sortable: true },
{ key: "color_tag", label: "Barva", sortable: false },
{ key: "segment", label: "Segment", sortable: false },
{ key: "decisions", label: "Odločitve", sortable: false, class: "w-32" },
];
@@ -195,6 +196,11 @@ const destroyAction = () => {
<template #cell-decisions="{ row }">
{{ row.decisions?.length ?? 0 }}
</template>
<template #cell-segment="{ row }">
<span>
{{ row.segment?.name || "" }}
</span>
</template>
<template #actions="{ row }">
<button class="px-2" @click="openEditDrawer(row)">
<EditIcon size="md" css="text-gray-500" />