Files
pleno-vue/src/components/session/token/SessionUser/Objects/ModuleActionLogs.vue
T
Jeppe Bundgaard de25e9c5f0 Refactor DepartmentLane.vue to use reusable ModuleActionLogsTable component
- Replaced inline logs table in `DepartmentLane.vue` with reusable `ModuleActionLogsTable` for better modularity.
- Enhanced `ModuleActionLogs` to support pagination and dynamic filtering.
- Introduced new `ModuleActionLogsTable.vue` component to centralize log display logic.
2026-01-06 11:29:30 +01:00

63 lines
1.3 KiB
Vue

<script>
import { ObjectsGlobal } from "@/components/session/token/SessionUser/Objects/ObjectsGlobal.vue";
/**
* The Module Action Logs object
*/
export const ModuleActionLogs = {
meta: {
title: "Modul handlingslogs",
icon: "fas fa-history",
description: "Oversigt over modul handlingslogs",
endpoint: "/modules/action-logs",
labels: {
single: "handlingslog",
multiple: "handlingslogs"
}
},
columns: {
id: {
label: "ID",
type: "number",
sortable: true,
},
module: {
label: "Modul",
type: "string",
sortable: true,
},
action: {
label: "Handling",
type: "string",
sortable: true,
},
status_code: {
label: "Statuskode",
type: "number",
sortable: true,
},
data: {
label: "Data",
type: "object",
sortable: false,
},
created_at: {
label: "Oprettet",
type: "datetime",
sortable: true,
}
},
get: {
all: async (filters = {}, pagination = { page: 1, limit: 10, order: 'id:DESC' }) => {
return ObjectsGlobal.get.list(ModuleActionLogs.meta.endpoint, {
filters: filters,
pagination: pagination
});
},
single: async (id) => {
return ObjectsGlobal.get.object(ModuleActionLogs.meta.endpoint, id);
}
}
};
</script>