Updated Application icon and notifcation pagination items per page, and updated NotificationsBell

This commit is contained in:
Simon Pocrnjič
2026-01-18 19:49:48 +01:00
parent cc4c07717e
commit 068bbdf583
6 changed files with 83 additions and 99 deletions
@@ -265,28 +265,30 @@ const update = () => {
// Transform actions from array of IDs to array of objects
const actionsPayload = form.actions
.map(id => {
const action = props.actions.find(a => a.id === Number(id) || a.id === id);
.map((id) => {
const action = props.actions.find((a) => a.id === Number(id) || a.id === id);
if (!action) {
console.warn('Action not found for id:', id);
console.warn("Action not found for id:", id);
return null;
}
return { id: action.id, name: action.name };
})
.filter(Boolean); // Remove null entries
form.transform((data) => ({
...data,
actions: actionsPayload
})).put(route("settings.decisions.update", { id: form.id }), {
onSuccess: () => {
closeEditDrawer();
},
onError: (errors) => {
// preserve server errors for display
scrollToFirstEventError(form.errors, "edit");
},
});
form
.transform((data) => ({
...data,
actions: actionsPayload,
}))
.put(route("settings.decisions.update", { id: form.id }), {
onSuccess: () => {
closeEditDrawer();
},
onError: (errors) => {
// preserve server errors for display
scrollToFirstEventError(form.errors, "edit");
},
});
};
const store = () => {
@@ -299,27 +301,29 @@ const store = () => {
// Transform actions from array of IDs to array of objects
const actionsPayload = createForm.actions
.map(id => {
const action = props.actions.find(a => a.id === Number(id) || a.id === id);
.map((id) => {
const action = props.actions.find((a) => a.id === Number(id) || a.id === id);
if (!action) {
console.warn('Action not found for id:', id);
console.warn("Action not found for id:", id);
return null;
}
return { id: action.id, name: action.name };
})
.filter(Boolean); // Remove null entries
createForm.transform((data) => ({
...data,
actions: actionsPayload
})).post(route("settings.decisions.store"), {
onSuccess: () => {
closeCreateDrawer();
},
onError: () => {
scrollToFirstEventError(createForm.errors, "create");
},
});
createForm
.transform((data) => ({
...data,
actions: actionsPayload,
}))
.post(route("settings.decisions.store"), {
onSuccess: () => {
closeCreateDrawer();
},
onError: () => {
scrollToFirstEventError(createForm.errors, "create");
},
});
};
function validateEventsClientSide(events) {
@@ -665,7 +669,7 @@ const destroyDecision = () => {
</div>
<div class="flex items-center gap-2 self-end">
<label class="flex items-center gap-2 text-sm">
<Checkbox v-model:checked="ev.active" />
<Checkbox v-model="ev.active" />
Aktivno
</label>
<Button
@@ -703,7 +707,7 @@ const destroyDecision = () => {
</div>
<div class="flex items-end">
<label class="flex items-center gap-2 text-sm mt-6">
<Checkbox v-model:checked="ev.config.deactivate_previous" />
<Checkbox v-model="ev.config.deactivate_previous" />
Deaktiviraj prejšnje
</label>
</div>