@hedhog/setting 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/setting/dto/create.dto.d.ts +8 -0
- package/dist/setting/dto/create.dto.d.ts.map +1 -0
- package/dist/setting/dto/create.dto.js +36 -0
- package/dist/setting/dto/create.dto.js.map +1 -0
- package/dist/setting/dto/delete.dto.d.ts.map +1 -0
- package/dist/setting/dto/delete.dto.js.map +1 -0
- package/dist/setting/dto/setting-user.dto.d.ts +4 -0
- package/dist/setting/dto/setting-user.dto.d.ts.map +1 -0
- package/dist/{dto/create.dto.js → setting/dto/setting-user.dto.js} +6 -7
- package/dist/setting/dto/setting-user.dto.js.map +1 -0
- package/dist/setting/dto/setting.dto.d.ts +9 -0
- package/dist/setting/dto/setting.dto.d.ts.map +1 -0
- package/dist/setting/dto/setting.dto.js +34 -0
- package/dist/setting/dto/setting.dto.js.map +1 -0
- package/dist/setting/dto/update.dto.d.ts +6 -0
- package/dist/setting/dto/update.dto.d.ts.map +1 -0
- package/dist/{dto → setting/dto}/update.dto.js +2 -1
- package/dist/setting/dto/update.dto.js.map +1 -0
- package/dist/setting/setting.controller.d.ts +26 -0
- package/dist/setting/setting.controller.d.ts.map +1 -0
- package/dist/setting/setting.controller.js +160 -0
- package/dist/setting/setting.controller.js.map +1 -0
- package/dist/setting/setting.service.d.ts +33 -0
- package/dist/setting/setting.service.d.ts.map +1 -0
- package/dist/setting/setting.service.js +377 -0
- package/dist/setting/setting.service.js.map +1 -0
- package/dist/setting.module.d.ts +3 -0
- package/dist/setting.module.d.ts.map +1 -0
- package/dist/{settings.module.js → setting.module.js} +8 -8
- package/dist/setting.module.js.map +1 -0
- package/frontend/setting/components/create-panel.tsx +83 -0
- package/frontend/setting/components/setting.screen.tsx +105 -0
- package/frontend/setting/components/update-panel.tsx +96 -0
- package/frontend/setting/locales/en/setting.setting.json +11 -0
- package/frontend/setting/locales/pt/setting.setting.json +11 -0
- package/frontend/setting/react-query/handlers.ts +28 -0
- package/frontend/setting/react-query/requests.ts +55 -0
- package/frontend/setting-group/components/create-panel.tsx +62 -0
- package/frontend/setting-group/components/setting-group.screen.tsx +107 -0
- package/frontend/setting-group/components/update-panel.tsx +76 -0
- package/frontend/setting-group/locales/en/setting.setting-group.json +11 -0
- package/frontend/setting-group/locales/pt/setting.setting-group.json +11 -0
- package/frontend/setting-group/react-query/handlers.ts +28 -0
- package/frontend/setting-group/react-query/requests.ts +58 -0
- package/frontend/setting-user/components/create-panel.tsx +71 -0
- package/frontend/setting-user/components/setting-user.screen.tsx +107 -0
- package/frontend/setting-user/components/update-panel.tsx +85 -0
- package/frontend/setting-user/locales/en/setting.setting-user.json +11 -0
- package/frontend/setting-user/locales/pt/setting.setting-user.json +11 -0
- package/frontend/setting-user/react-query/handlers.ts +28 -0
- package/frontend/setting-user/react-query/requests.ts +57 -0
- package/hedhog.yaml +380 -0
- package/package.json +39 -29
- package/README.md +0 -108
- package/dist/dto/create.dto.d.ts +0 -4
- package/dist/dto/create.dto.d.ts.map +0 -1
- package/dist/dto/create.dto.js.map +0 -1
- package/dist/dto/delete.dto.d.ts.map +0 -1
- package/dist/dto/delete.dto.js.map +0 -1
- package/dist/dto/update.dto.d.ts +0 -4
- package/dist/dto/update.dto.d.ts.map +0 -1
- package/dist/dto/update.dto.js.map +0 -1
- package/dist/migrations/index.d.ts +0 -6
- package/dist/migrations/index.d.ts.map +0 -1
- package/dist/migrations/index.js +0 -67
- package/dist/migrations/index.js.map +0 -1
- package/dist/settings.controller.d.ts +0 -14
- package/dist/settings.controller.d.ts.map +0 -1
- package/dist/settings.controller.js +0 -95
- package/dist/settings.controller.js.map +0 -1
- package/dist/settings.module.d.ts +0 -3
- package/dist/settings.module.d.ts.map +0 -1
- package/dist/settings.module.js.map +0 -1
- package/dist/settings.service.d.ts +0 -19
- package/dist/settings.service.d.ts.map +0 -1
- package/dist/settings.service.js +0 -70
- package/dist/settings.service.js.map +0 -1
- package/src/dto/create.dto.ts +0 -7
- package/src/dto/delete.dto.ts +0 -8
- package/src/dto/update.dto.ts +0 -3
- package/src/index.ts +0 -2
- package/src/migrations/index.ts +0 -78
- package/src/settings.controller.ts +0 -65
- package/src/settings.module.ts +0 -18
- package/src/settings.service.ts +0 -75
- package/tsconfig.lib.json +0 -9
- package/tsconfig.production.json +0 -20
- /package/dist/{dto → setting/dto}/delete.dto.d.ts +0 -0
- /package/dist/{dto → setting/dto}/delete.dto.js +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { PageTitle } from "@/components/custom/page-title";
|
|
2
|
+
import DataPanel from "@/components/panels/data-panel";
|
|
3
|
+
import { useSettingUserDelete } from "@/features/blog/setting-user";
|
|
4
|
+
import { useApp } from "@/hooks/use-app";
|
|
5
|
+
import { isPlural } from "@/lib/utils";
|
|
6
|
+
import { SettingUser } from "@/types/models";
|
|
7
|
+
import { IconEdit, IconPlus, IconTrash } from "@tabler/icons-react";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { useTranslation } from "react-i18next";
|
|
10
|
+
import SettingUserCreatePanel from "./components/setting-user-create-panel";
|
|
11
|
+
import SettingUserUpdatePanel from "./components/setting-user-update-panel";
|
|
12
|
+
|
|
13
|
+
export default function Page() {
|
|
14
|
+
const [selectedItems, setSelectedItems] = useState<SettingUser[]>([]);
|
|
15
|
+
const { mutate: deleteSettingUser } = useSettingUserDelete();
|
|
16
|
+
const { openSheet, confirm, closeSheet } = useApp();
|
|
17
|
+
const { t } = useTranslation(["setting-user", "modules", "actions"]);
|
|
18
|
+
|
|
19
|
+
const openCreate = () => {
|
|
20
|
+
const id = openSheet({
|
|
21
|
+
title: t("create", { ns: "actions" }),
|
|
22
|
+
description: t("createText", { ns: "setting-user" }),
|
|
23
|
+
children: () => (
|
|
24
|
+
<SettingUserCreatePanel onCreated={() => closeSheet(id)} />
|
|
25
|
+
),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return id;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const openDelete = (items: SettingUser[]) => {
|
|
32
|
+
return confirm({
|
|
33
|
+
title: `${t("delete", { ns: "actions" })} ${items.length} ${isPlural(items.length) ? t("items", { ns: "actions" }) : t("item", { ns: "actions" })}`,
|
|
34
|
+
description: t("deleteText", { ns: "setting-user" }),
|
|
35
|
+
})
|
|
36
|
+
.then(() =>
|
|
37
|
+
deleteSettingUser(
|
|
38
|
+
items.map((item) => item.id).filter((id) => id !== undefined),
|
|
39
|
+
),
|
|
40
|
+
)
|
|
41
|
+
.catch(() => setSelectedItems(items));
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const openUpdate = (item: SettingUser) => {
|
|
45
|
+
const id = openSheet({
|
|
46
|
+
children: () => (
|
|
47
|
+
<SettingUserUpdatePanel data={item} onUpdated={() => closeSheet(id)} />
|
|
48
|
+
),
|
|
49
|
+
title: t("edit", { ns: "setting-user" }),
|
|
50
|
+
description: t("editText", { ns: "setting-user" }),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return id;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<>
|
|
58
|
+
<PageTitle title={t("settingUser", { ns: "modules" })} />
|
|
59
|
+
<DataPanel
|
|
60
|
+
url="/setting-user"
|
|
61
|
+
layout="table"
|
|
62
|
+
id="setting-user"
|
|
63
|
+
selectable
|
|
64
|
+
columns={[
|
|
65
|
+
{ key: "id", header: "ID", width: 64 },
|
|
66
|
+
{ key: "name", header: t("name", { ns: "setting-user" }) },
|
|
67
|
+
]}
|
|
68
|
+
selected={selectedItems as SettingUser[]}
|
|
69
|
+
multiple
|
|
70
|
+
hasSearch
|
|
71
|
+
sortable
|
|
72
|
+
onItemDoubleClick={(item) => openUpdate(item)}
|
|
73
|
+
menuActions={[
|
|
74
|
+
{
|
|
75
|
+
icon: <IconEdit className="mr-1 w-8 cursor-pointer" />,
|
|
76
|
+
label: t("edit", { ns: "actions" }),
|
|
77
|
+
tooltip: t("editTooltip", { ns: "setting-user" }),
|
|
78
|
+
handler: (items: SettingUser[]) => {
|
|
79
|
+
if (items.length === 1) openUpdate(items[0]);
|
|
80
|
+
},
|
|
81
|
+
show: "once",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
icon: <IconTrash className="mr-1 w-8 cursor-pointer" />,
|
|
85
|
+
label: t("delete", { ns: "actions" }),
|
|
86
|
+
tooltip: t("deleteTooltip", { ns: "setting-user" }),
|
|
87
|
+
variant: "destructive",
|
|
88
|
+
handler: (items: SettingUser[]) => {
|
|
89
|
+
openDelete(items);
|
|
90
|
+
},
|
|
91
|
+
show: "some",
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
icon: <IconPlus className="mr-1 w-8 cursor-pointer" />,
|
|
95
|
+
label: t("create", { ns: "actions" }),
|
|
96
|
+
tooltip: t("createTooltip", { ns: "setting-user" }),
|
|
97
|
+
variant: "default",
|
|
98
|
+
handler: () => {
|
|
99
|
+
openCreate();
|
|
100
|
+
},
|
|
101
|
+
show: "none",
|
|
102
|
+
},
|
|
103
|
+
]}
|
|
104
|
+
/>
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import FormPanel, { FormPanelRef } from "@/components/panels/form-panel";
|
|
2
|
+
import { Overlay } from "@/components/custom/overlay";
|
|
3
|
+
import { TabPanel } from "@/components/panels/tab-panel";
|
|
4
|
+
import { EnumFieldType } from "@/enums/EnumFieldType";
|
|
5
|
+
import {
|
|
6
|
+
useSettingUserGet,
|
|
7
|
+
useSettingUserUpdate,
|
|
8
|
+
} from "@/features/blog/setting-user";
|
|
9
|
+
import useEffectAfterFirstUpdate from "@/hooks/use-effect-after-first-update";
|
|
10
|
+
import { SettingUser } from "@/types/models";
|
|
11
|
+
import { forwardRef, useImperativeHandle, useRef } from "react";
|
|
12
|
+
import { useTranslation } from "react-i18next";
|
|
13
|
+
|
|
14
|
+
export type SettingUserUpdatePanelProps = {
|
|
15
|
+
data: SettingUser;
|
|
16
|
+
onUpdated?: (data: SettingUser) => void;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const SettingUserUpdatePanel = forwardRef(
|
|
20
|
+
({ data, onUpdated }: SettingUserUpdatePanelProps, ref) => {
|
|
21
|
+
const { t } = useTranslation(["actions"]);
|
|
22
|
+
const { data: item, isLoading } = useSettingUserGet(data.id as number);
|
|
23
|
+
const { mutate: settingUserUpdate } = useSettingUserUpdate();
|
|
24
|
+
const formRef = useRef<FormPanelRef>(null);
|
|
25
|
+
|
|
26
|
+
useEffectAfterFirstUpdate(() => {
|
|
27
|
+
if (item && formRef.current) {
|
|
28
|
+
formRef.current.setValuesFromItem(item);
|
|
29
|
+
}
|
|
30
|
+
}, [item]);
|
|
31
|
+
|
|
32
|
+
useImperativeHandle(ref, () => ({}));
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<TabPanel
|
|
36
|
+
activeTabIndex={0}
|
|
37
|
+
tabs={[
|
|
38
|
+
{
|
|
39
|
+
title: t("details", { ns: "actions" }),
|
|
40
|
+
children: (
|
|
41
|
+
<Overlay loading={isLoading}>
|
|
42
|
+
<FormPanel
|
|
43
|
+
ref={formRef}
|
|
44
|
+
fields={[
|
|
45
|
+
{
|
|
46
|
+
name: "user_id",
|
|
47
|
+
label: { text: t("user_id", { ns: "translation" }) },
|
|
48
|
+
type: EnumFieldType.TEXT,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
{
|
|
53
|
+
name: "setting_id",
|
|
54
|
+
label: { text: t("setting_id", { ns: "translation" }) },
|
|
55
|
+
type: EnumFieldType.TEXT,
|
|
56
|
+
required: true,
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
{
|
|
60
|
+
name: "value",
|
|
61
|
+
label: { text: t("value", { ns: "translation" }) },
|
|
62
|
+
type: EnumFieldType.TEXT,
|
|
63
|
+
required: true,
|
|
64
|
+
},
|
|
65
|
+
]}
|
|
66
|
+
button={{ text: t("save", { ns: "actions" }) }}
|
|
67
|
+
onSubmit={(data) => {
|
|
68
|
+
settingUserUpdate({ id: data.id, data });
|
|
69
|
+
if (typeof onUpdated === "function") {
|
|
70
|
+
onUpdated(data);
|
|
71
|
+
}
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
</Overlay>
|
|
75
|
+
),
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
SettingUserUpdatePanel.displayName = "SettingUserUpdatePanel";
|
|
84
|
+
|
|
85
|
+
export default SettingUserUpdatePanel;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"create": "Create setting user",
|
|
3
|
+
"createText": "Fill the setting user informations.",
|
|
4
|
+
"createTooltip": "Create new setting user",
|
|
5
|
+
"delete": "Delete setting user",
|
|
6
|
+
"deleteText": "Are you sure to delete these setting user?",
|
|
7
|
+
"deleteTooltip": "Delete the selected setting user",
|
|
8
|
+
"edit": "Edit setting user",
|
|
9
|
+
"editText": "View and edit setting user information.",
|
|
10
|
+
"editTooltip": "Edit the selected setting user"
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"create": "Criar configuração de usuário",
|
|
3
|
+
"createText": "Preencha as informações da configuração de usuário.",
|
|
4
|
+
"createTooltip": "Criar nova configuração de usuário",
|
|
5
|
+
"delete": "Excluir configuração de usuário",
|
|
6
|
+
"deleteText": "Tem certeza de que deseja excluir estas configurações de usuário?",
|
|
7
|
+
"deleteTooltip": "Excluir a configuração de usuário selecionada",
|
|
8
|
+
"edit": "Editar configuração de usuário",
|
|
9
|
+
"editText": "Visualizar e editar informações da configuração de usuário.",
|
|
10
|
+
"editTooltip": "Editar a configuração de usuário selecionada"
|
|
11
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useDefaultMutation } from "@/hooks/use-default-mutation";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { requests } from "./requests";
|
|
4
|
+
|
|
5
|
+
const scope = "setting-user";
|
|
6
|
+
|
|
7
|
+
export function useSettingUserCreate() {
|
|
8
|
+
const { settingUserCreate } = requests();
|
|
9
|
+
return useDefaultMutation(scope, "create", settingUserCreate);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function useSettingUserDelete() {
|
|
13
|
+
const { settingUserDelete } = requests();
|
|
14
|
+
return useDefaultMutation(scope, "delete", settingUserDelete);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function useSettingUserUpdate() {
|
|
18
|
+
const { settingUserUpdate } = requests();
|
|
19
|
+
return useDefaultMutation(scope, "update", settingUserUpdate);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function useSettingUserGet(id: number) {
|
|
23
|
+
const { settingUserGet } = requests();
|
|
24
|
+
return useQuery({
|
|
25
|
+
queryKey: [scope, "get"],
|
|
26
|
+
queryFn: () => settingUserGet(id),
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { useApp } from "@/hooks/use-app";
|
|
2
|
+
import { Delete, PaginationParams, PaginationResult } from "@/types";
|
|
3
|
+
import { SettingUser } from "@/types/models";
|
|
4
|
+
import { HttpMethod } from "@/types/http-method";
|
|
5
|
+
|
|
6
|
+
export function requests() {
|
|
7
|
+
const { request } = useApp();
|
|
8
|
+
|
|
9
|
+
const settingUserList = async (params: PaginationParams) => {
|
|
10
|
+
return request<PaginationResult<SettingUser>>({
|
|
11
|
+
url: "/setting-user",
|
|
12
|
+
params,
|
|
13
|
+
}).then((res) => res.data);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const settingUserGet = async (id: number) => {
|
|
17
|
+
return request<SettingUser>({
|
|
18
|
+
url: `/setting-user/${id}`,
|
|
19
|
+
}).then((res) => res.data);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const settingUserCreate = async (data: SettingUser) => {
|
|
23
|
+
return request<SettingUser>({
|
|
24
|
+
url: "/setting-user",
|
|
25
|
+
method: HttpMethod.POST,
|
|
26
|
+
data: data,
|
|
27
|
+
}).then((res) => res.data);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const settingUserDelete = async (ids: number[]) => {
|
|
31
|
+
return request<Delete>({
|
|
32
|
+
url: "/setting-user",
|
|
33
|
+
data: { ids },
|
|
34
|
+
method: HttpMethod.DELETE,
|
|
35
|
+
}).then((res) => res.data);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const settingUserUpdate = async (params: {
|
|
39
|
+
id: number;
|
|
40
|
+
data: SettingUser;
|
|
41
|
+
}) => {
|
|
42
|
+
const { id, data } = params;
|
|
43
|
+
return request<SettingUser>({
|
|
44
|
+
url: `/setting-user/${id}`,
|
|
45
|
+
method: HttpMethod.PATCH,
|
|
46
|
+
data: data,
|
|
47
|
+
}).then((res) => res.data);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
settingUserCreate,
|
|
52
|
+
settingUserUpdate,
|
|
53
|
+
settingUserDelete,
|
|
54
|
+
settingUserList,
|
|
55
|
+
settingUserGet,
|
|
56
|
+
};
|
|
57
|
+
}
|
package/hedhog.yaml
ADDED
|
@@ -0,0 +1,380 @@
|
|
|
1
|
+
data:
|
|
2
|
+
setting_group:
|
|
3
|
+
- slug: localization
|
|
4
|
+
icon: world
|
|
5
|
+
name:
|
|
6
|
+
en: Localization
|
|
7
|
+
pt: Localização
|
|
8
|
+
description:
|
|
9
|
+
en: Configure the localization setting.
|
|
10
|
+
pt: Configurar as definições de localização.
|
|
11
|
+
relations:
|
|
12
|
+
setting:
|
|
13
|
+
- slug: language
|
|
14
|
+
type: string
|
|
15
|
+
name:
|
|
16
|
+
en: Default Language
|
|
17
|
+
pt: Idioma Padrão
|
|
18
|
+
description:
|
|
19
|
+
en: The system default language, each user can have their own preferred language
|
|
20
|
+
pt: O idioma padrão do sistema, cada usuário pode ter o seu próprio idioma
|
|
21
|
+
preferido
|
|
22
|
+
value: en
|
|
23
|
+
user_override: true
|
|
24
|
+
- slug: timezone
|
|
25
|
+
type: string
|
|
26
|
+
name:
|
|
27
|
+
en: Timezone
|
|
28
|
+
pt: Fuso Horário
|
|
29
|
+
description:
|
|
30
|
+
en: The timezone to use
|
|
31
|
+
pt: O fuso horário a utilizar
|
|
32
|
+
value: UTC
|
|
33
|
+
user_override: true
|
|
34
|
+
- slug: appearance
|
|
35
|
+
icon: palette
|
|
36
|
+
name:
|
|
37
|
+
en: Appearance
|
|
38
|
+
pt: Aparência
|
|
39
|
+
description:
|
|
40
|
+
en: Configure the appearance setting.
|
|
41
|
+
pt: Configurar as definições de aparência.
|
|
42
|
+
relations:
|
|
43
|
+
setting:
|
|
44
|
+
- slug: theme-primary
|
|
45
|
+
type: string
|
|
46
|
+
name:
|
|
47
|
+
en: Primary Color
|
|
48
|
+
pt: Cor Primária
|
|
49
|
+
description:
|
|
50
|
+
en: The primary color to use
|
|
51
|
+
pt: A cor primária a utilizar
|
|
52
|
+
value: "#000000"
|
|
53
|
+
- slug: theme-primary-foreground
|
|
54
|
+
type: string
|
|
55
|
+
name:
|
|
56
|
+
en: Primary Color Foreground
|
|
57
|
+
pt: Contraste da Cor Primária
|
|
58
|
+
description:
|
|
59
|
+
en: The primary color foreground to use
|
|
60
|
+
pt: O contraste da cor primária a utilizar
|
|
61
|
+
value: "#ffffff"
|
|
62
|
+
- slug: theme-secondary
|
|
63
|
+
type: string
|
|
64
|
+
name:
|
|
65
|
+
en: Secondary Color
|
|
66
|
+
pt: Cor Secundária
|
|
67
|
+
description:
|
|
68
|
+
en: The secondary color to use
|
|
69
|
+
pt: A cor secundária a utilizar
|
|
70
|
+
value: "#FFFFFF"
|
|
71
|
+
- slug: theme-secondary-foreground
|
|
72
|
+
type: string
|
|
73
|
+
name:
|
|
74
|
+
en: Secondary Color Foreground
|
|
75
|
+
pt: Contraste da Cor Secundária
|
|
76
|
+
description:
|
|
77
|
+
en: The secondary color foreground to use
|
|
78
|
+
pt: O contraste da cor secundária a utilizar
|
|
79
|
+
value: "#000000"
|
|
80
|
+
- slug: theme-accent
|
|
81
|
+
type: string
|
|
82
|
+
name:
|
|
83
|
+
en: Accent Color
|
|
84
|
+
pt: Cor de Realce
|
|
85
|
+
description:
|
|
86
|
+
en: The accent color to use
|
|
87
|
+
pt: A cor de realce a utilizar
|
|
88
|
+
value: "#FF0000"
|
|
89
|
+
- slug: theme-accent-foreground
|
|
90
|
+
type: string
|
|
91
|
+
name:
|
|
92
|
+
en: Accent Color Foreground
|
|
93
|
+
pt: Contraste da Cor de Realce
|
|
94
|
+
description:
|
|
95
|
+
en: The accent color foreground to use
|
|
96
|
+
pt: O contraste da cor de realce a utilizar
|
|
97
|
+
value: "#000000"
|
|
98
|
+
- slug: theme-background
|
|
99
|
+
type: string
|
|
100
|
+
name:
|
|
101
|
+
en: Background Color
|
|
102
|
+
pt: Cor de Fundo
|
|
103
|
+
description:
|
|
104
|
+
en: The background color to use
|
|
105
|
+
pt: A cor de fundo a utilizar
|
|
106
|
+
value: "#FFFFFF"
|
|
107
|
+
- slug: theme-background-foreground
|
|
108
|
+
type: string
|
|
109
|
+
name:
|
|
110
|
+
en: Background Color Foreground
|
|
111
|
+
pt: Contraste da Cor de Fundo
|
|
112
|
+
description:
|
|
113
|
+
en: The background color foreground to use
|
|
114
|
+
pt: O contraste da cor de fundo a utilizar
|
|
115
|
+
value: "#000000"
|
|
116
|
+
- slug: theme-muted
|
|
117
|
+
type: string
|
|
118
|
+
name:
|
|
119
|
+
en: Muted Color
|
|
120
|
+
pt: Cor Suave
|
|
121
|
+
description:
|
|
122
|
+
en: The muted color to use
|
|
123
|
+
pt: A cor suave a utilizar
|
|
124
|
+
value: "#F0F0F0"
|
|
125
|
+
- slug: theme-muted-foreground
|
|
126
|
+
type: string
|
|
127
|
+
name:
|
|
128
|
+
en: Muted Color Foreground
|
|
129
|
+
pt: Contraste da Cor Suave
|
|
130
|
+
description:
|
|
131
|
+
en: The muted color foreground to use
|
|
132
|
+
pt: O contraste da cor suave a utilizar
|
|
133
|
+
value: "#000000"
|
|
134
|
+
- slug: theme-radius
|
|
135
|
+
type: string
|
|
136
|
+
name:
|
|
137
|
+
en: Radius
|
|
138
|
+
pt: Raio
|
|
139
|
+
description:
|
|
140
|
+
en: The radius to use
|
|
141
|
+
pt: O raio a utilizar
|
|
142
|
+
value: "0.5"
|
|
143
|
+
- slug: theme-font
|
|
144
|
+
type: string
|
|
145
|
+
name:
|
|
146
|
+
en: Font Family
|
|
147
|
+
pt: Família de Fontes
|
|
148
|
+
description:
|
|
149
|
+
en: The font to use
|
|
150
|
+
pt: A fonte a utilizar
|
|
151
|
+
value: Arial, sans-serif
|
|
152
|
+
- slug: theme-text-size
|
|
153
|
+
type: string
|
|
154
|
+
name:
|
|
155
|
+
en: Text Size
|
|
156
|
+
pt: Tamanho do Texto
|
|
157
|
+
description:
|
|
158
|
+
en: Text size of the application
|
|
159
|
+
pt: Tamanho do texto da aplicação
|
|
160
|
+
value: "1"
|
|
161
|
+
- slug: theme-muted-saturation
|
|
162
|
+
type: string
|
|
163
|
+
name:
|
|
164
|
+
en: Muted Color Saturation
|
|
165
|
+
pt: Saturação da Cor Suave
|
|
166
|
+
description:
|
|
167
|
+
en: Saturação da Cor Suave a utilizar
|
|
168
|
+
pt: Muted Color Saturation to use
|
|
169
|
+
value: "100"
|
|
170
|
+
- slug: theme-muted-lightness
|
|
171
|
+
type: string
|
|
172
|
+
name:
|
|
173
|
+
en: Muted Color Lightness
|
|
174
|
+
pt: Luminância da Cor Suave
|
|
175
|
+
description:
|
|
176
|
+
en: Luminância da Cor Suave a utilizar
|
|
177
|
+
pt: Muted Color Lightness to use
|
|
178
|
+
value: "100"
|
|
179
|
+
- slug: theme-light-dark-enabled
|
|
180
|
+
type: boolean
|
|
181
|
+
name:
|
|
182
|
+
en: Light/Dark Themes Enabled
|
|
183
|
+
pt: Tema Claro/Escuro Habilitado
|
|
184
|
+
description:
|
|
185
|
+
en: Enable or disable toggling of light/dark themes
|
|
186
|
+
pt: Habilite ou desabilite a troca de tema claro/escuro
|
|
187
|
+
value: true
|
|
188
|
+
- slug: theme-light-dark-default
|
|
189
|
+
type: string
|
|
190
|
+
name:
|
|
191
|
+
en: Default Theme
|
|
192
|
+
pt: Tema Padrão
|
|
193
|
+
description:
|
|
194
|
+
en: System default theme
|
|
195
|
+
pt: Tema Padrão do sistema
|
|
196
|
+
value: dark
|
|
197
|
+
route:
|
|
198
|
+
- url: /setting-group
|
|
199
|
+
method: GET
|
|
200
|
+
relations: &a1
|
|
201
|
+
role:
|
|
202
|
+
- where:
|
|
203
|
+
slug: admin
|
|
204
|
+
- url: /setting-group/:id
|
|
205
|
+
method: GET
|
|
206
|
+
relations: *a1
|
|
207
|
+
- url: /setting
|
|
208
|
+
method: GET
|
|
209
|
+
relations: &a2
|
|
210
|
+
role:
|
|
211
|
+
- where:
|
|
212
|
+
slug: admin
|
|
213
|
+
- url: /setting/:id
|
|
214
|
+
method: GET
|
|
215
|
+
relations: *a2
|
|
216
|
+
- url: /setting-user
|
|
217
|
+
method: GET
|
|
218
|
+
relations: &a3
|
|
219
|
+
role:
|
|
220
|
+
- where:
|
|
221
|
+
slug: admin
|
|
222
|
+
- url: /setting-user/:id
|
|
223
|
+
method: GET
|
|
224
|
+
relations: *a3
|
|
225
|
+
menu:
|
|
226
|
+
- name:
|
|
227
|
+
en: SettingGroup
|
|
228
|
+
pt: SettingGroup
|
|
229
|
+
icon: file
|
|
230
|
+
url: /setting-group
|
|
231
|
+
slug: setting-group
|
|
232
|
+
relations: *a1
|
|
233
|
+
- name:
|
|
234
|
+
en: Setting
|
|
235
|
+
pt: Setting
|
|
236
|
+
icon: file
|
|
237
|
+
url: /setting
|
|
238
|
+
slug: setting
|
|
239
|
+
relations: *a2
|
|
240
|
+
- name:
|
|
241
|
+
en: SettingUser
|
|
242
|
+
pt: SettingUser
|
|
243
|
+
icon: file
|
|
244
|
+
url: /setting-user
|
|
245
|
+
slug: setting-user
|
|
246
|
+
relations: *a3
|
|
247
|
+
screen:
|
|
248
|
+
- name:
|
|
249
|
+
en: SettingGroup
|
|
250
|
+
pt: SettingGroup
|
|
251
|
+
slug: setting-group
|
|
252
|
+
description:
|
|
253
|
+
en: Screen to manage setting_group
|
|
254
|
+
pt: Tela para gerenciar setting_group
|
|
255
|
+
icon: file
|
|
256
|
+
- name:
|
|
257
|
+
en: Setting
|
|
258
|
+
pt: Setting
|
|
259
|
+
slug: setting
|
|
260
|
+
description:
|
|
261
|
+
en: Screen to manage setting
|
|
262
|
+
pt: Tela para gerenciar setting
|
|
263
|
+
icon: file
|
|
264
|
+
- name:
|
|
265
|
+
en: SettingUser
|
|
266
|
+
pt: SettingUser
|
|
267
|
+
slug: setting-user
|
|
268
|
+
description:
|
|
269
|
+
en: Screen to manage setting_user
|
|
270
|
+
pt: Tela para gerenciar setting_user
|
|
271
|
+
icon: file
|
|
272
|
+
tables:
|
|
273
|
+
setting_group:
|
|
274
|
+
columns:
|
|
275
|
+
- type: pk
|
|
276
|
+
- name: icon
|
|
277
|
+
length: 31
|
|
278
|
+
- type: slug
|
|
279
|
+
- type: created_at
|
|
280
|
+
- type: updated_at
|
|
281
|
+
ifNotExists: true
|
|
282
|
+
setting_group_locale:
|
|
283
|
+
columns:
|
|
284
|
+
- name: locale_id
|
|
285
|
+
type: fk
|
|
286
|
+
isPrimary: true
|
|
287
|
+
references:
|
|
288
|
+
table: locale
|
|
289
|
+
column: id
|
|
290
|
+
onDelete: CASCADE
|
|
291
|
+
- name: group_id
|
|
292
|
+
type: fk
|
|
293
|
+
isPrimary: true
|
|
294
|
+
references:
|
|
295
|
+
table: setting_group
|
|
296
|
+
column: id
|
|
297
|
+
onDelete: CASCADE
|
|
298
|
+
- name: name
|
|
299
|
+
length: 63
|
|
300
|
+
- name: description
|
|
301
|
+
length: 255
|
|
302
|
+
isNullable: true
|
|
303
|
+
- type: created_at
|
|
304
|
+
- type: updated_at
|
|
305
|
+
ifNotExists: true
|
|
306
|
+
setting:
|
|
307
|
+
columns:
|
|
308
|
+
- type: pk
|
|
309
|
+
- name: group_id
|
|
310
|
+
type: fk
|
|
311
|
+
references:
|
|
312
|
+
table: setting_group
|
|
313
|
+
column: id
|
|
314
|
+
onDelete: CASCADE
|
|
315
|
+
- type: slug
|
|
316
|
+
- name: type
|
|
317
|
+
type: enum
|
|
318
|
+
enum:
|
|
319
|
+
- string
|
|
320
|
+
- array
|
|
321
|
+
- number
|
|
322
|
+
- boolean
|
|
323
|
+
- json
|
|
324
|
+
default: string
|
|
325
|
+
- name: value
|
|
326
|
+
length: 1023
|
|
327
|
+
isNullable: true
|
|
328
|
+
- name: user_override
|
|
329
|
+
type: boolean
|
|
330
|
+
default: false
|
|
331
|
+
- type: created_at
|
|
332
|
+
- type: updated_at
|
|
333
|
+
ifNotExists: true
|
|
334
|
+
setting_locale:
|
|
335
|
+
columns:
|
|
336
|
+
- name: locale_id
|
|
337
|
+
type: fk
|
|
338
|
+
isPrimary: true
|
|
339
|
+
references:
|
|
340
|
+
table: locale
|
|
341
|
+
column: id
|
|
342
|
+
onDelete: CASCADE
|
|
343
|
+
- name: setting_id
|
|
344
|
+
type: fk
|
|
345
|
+
isPrimary: true
|
|
346
|
+
references:
|
|
347
|
+
table: setting
|
|
348
|
+
column: id
|
|
349
|
+
onDelete: CASCADE
|
|
350
|
+
- name: description
|
|
351
|
+
length: 255
|
|
352
|
+
isNullable: true
|
|
353
|
+
- name: name
|
|
354
|
+
length: 63
|
|
355
|
+
isNullable: true
|
|
356
|
+
- type: created_at
|
|
357
|
+
- type: updated_at
|
|
358
|
+
ifNotExists: true
|
|
359
|
+
setting_user:
|
|
360
|
+
columns:
|
|
361
|
+
- name: user_id
|
|
362
|
+
type: fk
|
|
363
|
+
isPrimary: true
|
|
364
|
+
references:
|
|
365
|
+
table: user
|
|
366
|
+
column: id
|
|
367
|
+
onDelete: CASCADE
|
|
368
|
+
- name: setting_id
|
|
369
|
+
type: fk
|
|
370
|
+
isPrimary: true
|
|
371
|
+
references:
|
|
372
|
+
table: setting
|
|
373
|
+
column: id
|
|
374
|
+
onDelete: CASCADE
|
|
375
|
+
- name: value
|
|
376
|
+
length: 1023
|
|
377
|
+
isNullable: true
|
|
378
|
+
- type: created_at
|
|
379
|
+
- type: updated_at
|
|
380
|
+
ifNotExists: true
|