docs(changeset): feat(error-manager): implement centralized error reporting system

This commit is contained in:
2026-02-07 21:11:48 +02:00
parent 7bf94f306a
commit d7b1eb26f3
18 changed files with 806 additions and 187 deletions

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Button, Checkbox, Divider, Group, Stack, TagsInput, TextInput } from '@mantine/core';
import { useLocalStorage } from '@mantine/hooks';
import { useRef, useState } from 'react';
@@ -22,9 +23,20 @@ export const GridlerGoAPIExampleEventlog = () => {
const [selectRow, setSelectRow] = useState<string | undefined>('');
const [values, setValues] = useState<Array<Record<string, any>>>([]);
const [search, setSearch] = useState<string>('');
const [formProps, setFormProps] = useState<{ onChange?: any; onClose?: any; opened: boolean; request: any; title?: string; values: any; } | null>({
onChange: (_request: string, data: any) => { ref.current?.refresh({ value: data }); },
onClose: () => { setFormProps((cv) => ({ ...cv, opened: false, request: null, values: null })) },
const [formProps, setFormProps] = useState<{
onChange?: any;
onClose?: any;
opened: boolean;
request: any;
title?: string;
values: any;
} | null>({
onChange: (_request: string, data: any) => {
ref.current?.refresh({ value: data });
},
onClose: () => {
setFormProps((cv) => ({ ...cv, opened: false, request: null, values: null }));
},
opened: false,
request: null,
values: null,
@@ -33,7 +45,8 @@ export const GridlerGoAPIExampleEventlog = () => {
const columns: GridlerColumns = [
{
Cell: (row) => {
const process = `${row?.cql2?.length > 0
const process = `${
row?.cql2?.length > 0
? '🔖'
: row?.cql1?.length > 0
? '📕'
@@ -42,7 +55,7 @@ export const GridlerGoAPIExampleEventlog = () => {
: row?.status === 2
? '🔒'
: '⚙️'
} ${String(row?.id_process ?? '0')}`;
} ${String(row?.id_process ?? '0')}`;
return {
data: process,
@@ -139,28 +152,28 @@ export const GridlerGoAPIExampleEventlog = () => {
changeOnActiveClick={true}
descriptionField={'process'}
onRequestForm={(request, data) => {
setFormProps((cv)=> {
return {...cv, opened: true, request: request as any, values: data as any}
})
setFormProps((cv) => {
return { ...cv, opened: true, request: request as any, values: data as any };
});
}}
/>
</Gridler>
<FormerDialog
former={{
request: formProps?.request ?? "insert",
values: formProps?.values,
}}
onClose={formProps?.onClose}
opened={formProps?.opened ?? false}
title={formProps?.title ?? 'Process Form'}
>
<Stack>
<TextInputCtrl label="Process Name" name="process" />
<NumberInputCtrl label="Sequence" name="sequence" />
<InlineWrapper label="Type" promptWidth={200}>
<NativeSelectCtrl data={["trigger","function","view"]} name="type"/>
</InlineWrapper>
</Stack>
<FormerDialog
former={{
request: formProps?.request ?? 'insert',
values: formProps?.values,
}}
onClose={formProps?.onClose}
opened={formProps?.opened ?? false}
title={formProps?.title ?? 'Process Form'}
>
<Stack>
<TextInputCtrl label="Process Name" name="process" />
<NumberInputCtrl label="Sequence" name="sequence" />
<InlineWrapper label="Type" promptWidth={200}>
<NativeSelectCtrl data={['trigger', 'function', 'view']} name="type" />
</InlineWrapper>
</Stack>
</FormerDialog>
<Divider />
<Group>
@@ -222,6 +235,6 @@ export const GridlerGoAPIExampleEventlog = () => {
Goto 2050
</Button>
</Group>
</Stack >
</Stack>
);
};