89 lines
2.2 KiB
TypeScript
89 lines
2.2 KiB
TypeScript
import { GridColDef } from "@mui/x-data-grid";
|
|
|
|
export const AuditColumns: GridColDef[] = [
|
|
{ field: "actionType", headerName: "Action Type", width: 130 },
|
|
{
|
|
field: "timeStampOfTheAction",
|
|
headerName: "Timestamp of the action",
|
|
width: 130,
|
|
},
|
|
{ field: "adminUsername", headerName: "Admin username", width: 130 },
|
|
{ field: "adminId", headerName: "Admin ID", width: 130 },
|
|
{ field: "affectedUserId", headerName: "Affected user ID", width: 130 },
|
|
{ field: "adminIPAddress", headerName: "Admin IP address", width: 130 },
|
|
{ field: "reasonNote", headerName: "Reason/Note", width: 130 },
|
|
];
|
|
|
|
export const AuditData = [
|
|
{
|
|
id: "1",
|
|
actionType: "Create",
|
|
timeStampOfTheAction: "2023-03-01T12:00:00",
|
|
adminUsername: "admin1",
|
|
adminId: "12345",
|
|
affectedUserId: "67890",
|
|
adminIPAddress: "192.168.1.1",
|
|
reasonNote: "New user created",
|
|
},
|
|
{
|
|
id: "2",
|
|
actionType: "Update",
|
|
timeStampOfTheAction: "2023-03-02T12:00:00",
|
|
adminUsername: "admin2",
|
|
adminId: "54321",
|
|
affectedUserId: "09876",
|
|
adminIPAddress: "192.168.2.2",
|
|
reasonNote: "User details updated",
|
|
},
|
|
{
|
|
id: "3",
|
|
actionType: "Delete",
|
|
timeStampOfTheAction: "2023-03-03T12:00:00",
|
|
adminUsername: "admin3",
|
|
adminId: "98765",
|
|
affectedUserId: "45678",
|
|
adminIPAddress: "192.168.3.3",
|
|
reasonNote: "User deleted",
|
|
},
|
|
{
|
|
id: "4",
|
|
actionType: "Create",
|
|
timeStampOfTheAction: "2023-03-04T12:00:00",
|
|
adminUsername: "admin4",
|
|
adminId: "98765",
|
|
affectedUserId: "45678",
|
|
adminIPAddress: "192.168.3.3",
|
|
reasonNote: "New user created",
|
|
},
|
|
{
|
|
id: "5",
|
|
actionType: "Update",
|
|
timeStampOfTheAction: "2023-03-05T12:00:00",
|
|
adminUsername: "admin2",
|
|
adminId: "98765",
|
|
affectedUserId: "45678",
|
|
adminIPAddress: "192.168.3.3",
|
|
reasonNote: "User details updated",
|
|
},
|
|
];
|
|
|
|
export const AuditSearchLabels = [
|
|
{ label: "Action Type", field: "actionType", type: "text" },
|
|
{ label: "Date / Time", field: "dateTime", type: "date" },
|
|
{
|
|
label: "affectedUserId",
|
|
field: "Affected user ID",
|
|
type: "text",
|
|
},
|
|
{
|
|
label: "Admin ID",
|
|
field: "adminId",
|
|
type: "text",
|
|
},
|
|
{
|
|
label: "Admin username",
|
|
field: "adminUsername",
|
|
type: "text",
|
|
},
|
|
];
|