- 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.
63 lines
1.3 KiB
Vue
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>
|