@hedhog/admin 0.51.24 → 0.51.26
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/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/auth.service.js +2 -2
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/dashboard/dashboard-core/dashboard-core.controller.d.ts +11 -11
- package/dist/dashboard/dashboard-core/dashboard-core.service.d.ts +11 -11
- package/dist/dashboard/dashboard-user/dashboard-user.controller.d.ts +3 -3
- package/dist/dashboard/dashboard-user/dashboard-user.service.d.ts +3 -3
- package/dist/menu/menu.controller.d.ts +3 -3
- package/dist/menu/menu.service.d.ts +3 -3
- package/frontend/dashboard/components/create-panel.tsx.ejs +63 -63
- package/frontend/dashboard/components/dashboard.screen.tsx.ejs +116 -116
- package/frontend/dashboard/components/update-panel.tsx.ejs +80 -80
- package/frontend/dashboard/locales/en/dashboard.dashboard.json +11 -11
- package/frontend/dashboard/locales/pt/dashboard.dashboard.json +11 -11
- package/frontend/dashboard/react-query/handlers.ts.ejs +28 -28
- package/frontend/dashboard/react-query/requests.ts.ejs +56 -56
- package/frontend/dashboard-component/components/create-panel.tsx.ejs +130 -130
- package/frontend/dashboard-component/components/update-panel.tsx.ejs +164 -164
- package/frontend/dashboard-component/locales/en/dashboard.dashboard-component.json +11 -11
- package/frontend/dashboard-component/locales/pt/dashboard.dashboard-component.json +11 -11
- package/frontend/dashboard-component/react-query/handlers.ts.ejs +28 -28
- package/frontend/dashboard-component/react-query/requests.ts.ejs +61 -61
- package/frontend/dashboard-item/components/create-panel.tsx.ejs +108 -108
- package/frontend/dashboard-item/components/update-panel.tsx.ejs +141 -141
- package/frontend/dashboard-item/locales/en/dashboard.dashboard-item.json +11 -11
- package/frontend/dashboard-item/locales/pt/dashboard.dashboard-item.json +11 -11
- package/frontend/dashboard-item/react-query/handlers.ts.ejs +28 -28
- package/frontend/dashboard-item/react-query/requests.ts.ejs +58 -58
- package/frontend/dashboard-user/components/create-panel.tsx.ejs +108 -108
- package/frontend/dashboard-user/components/update-panel.tsx.ejs +137 -137
- package/frontend/dashboard-user/locales/en/dashboard.dashboard-user.json +11 -11
- package/frontend/dashboard-user/locales/pt/dashboard.dashboard-user.json +11 -11
- package/frontend/dashboard-user/react-query/handlers.ts.ejs +28 -28
- package/frontend/dashboard-user/react-query/requests.ts.ejs +58 -58
- package/hedhog.yaml +2 -2
- package/package.json +1 -1
- package/src/auth/auth.service.ts +3 -1
- package/src/dashboard/dashboard-component/dashboard-component.controller.ts +55 -55
- package/src/dashboard/dashboard-component/dto/create.dto.ts +36 -36
- package/src/dashboard/dashboard-component/dto/update.dto.ts +4 -4
- package/src/dashboard/dashboard-item/dto/update.dto.ts +4 -4
- package/src/dashboard/dashboard-user/dto/update.dto.ts +4 -4
- package/src/dashboard/index.ts +1 -1
@@ -1,108 +1,108 @@
|
|
1
|
-
import FormPanel, { FormPanelRef } from '@/components/panels/form-panel'
|
2
|
-
import { EnumFieldType } from '@/enums/EnumFieldType'
|
3
|
-
import { useDashboardUserCreate } from '@/features/admin/dashboard-user'
|
4
|
-
import { DashboardUser } from '@/types/models'
|
5
|
-
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
6
|
-
import { useTranslation } from 'react-i18next'
|
7
|
-
|
8
|
-
export type DashboardUserCreatePanelRef = {
|
9
|
-
submit: () => void
|
10
|
-
}
|
11
|
-
|
12
|
-
export type DashboardUserCreatePanelProps = {
|
13
|
-
onCreated?: (data: DashboardUser) => void
|
14
|
-
}
|
15
|
-
|
16
|
-
const DashboardUserCreatePanel = forwardRef(
|
17
|
-
({ onCreated }: DashboardUserCreatePanelProps, ref) => {
|
18
|
-
const formRef = useRef<FormPanelRef>(null)
|
19
|
-
const { t } = useTranslation(['actions', 'fields', 'translations'])
|
20
|
-
const { mutateAsync: createDashboardUser } = useDashboardUserCreate()
|
21
|
-
|
22
|
-
useImperativeHandle(
|
23
|
-
ref,
|
24
|
-
() => ({
|
25
|
-
submit: () => {
|
26
|
-
formRef.current?.submit()
|
27
|
-
},
|
28
|
-
}),
|
29
|
-
[formRef]
|
30
|
-
)
|
31
|
-
|
32
|
-
return (
|
33
|
-
<FormPanel
|
34
|
-
ref={formRef}
|
35
|
-
fields={[
|
36
|
-
{
|
37
|
-
name: 'item_id',
|
38
|
-
label: { text: t('dashboard-user.item_id', { ns: 'fields' }) },
|
39
|
-
type: EnumFieldType.COMBOBOX,
|
40
|
-
required: true,
|
41
|
-
url: '/dashboard-item',
|
42
|
-
displayName: 'item',
|
43
|
-
valueName: 'id',
|
44
|
-
},
|
45
|
-
|
46
|
-
{
|
47
|
-
name: 'user_id',
|
48
|
-
label: { text: t('dashboard-user.user_id', { ns: 'fields' }) },
|
49
|
-
type: EnumFieldType.COMBOBOX,
|
50
|
-
required: true,
|
51
|
-
url: '/user',
|
52
|
-
displayName: 'user',
|
53
|
-
valueName: 'id',
|
54
|
-
},
|
55
|
-
|
56
|
-
{
|
57
|
-
name: 'width',
|
58
|
-
label: { text: t('dashboard-user.width', { ns: 'fields' }) },
|
59
|
-
type: EnumFieldType.NUMBER,
|
60
|
-
required: true,
|
61
|
-
},
|
62
|
-
|
63
|
-
{
|
64
|
-
name: 'height',
|
65
|
-
label: { text: t('dashboard-user.height', { ns: 'fields' }) },
|
66
|
-
type: EnumFieldType.NUMBER,
|
67
|
-
required: true,
|
68
|
-
},
|
69
|
-
|
70
|
-
{
|
71
|
-
name: 'x_axis',
|
72
|
-
label: { text: t('dashboard-user.x_axis', { ns: 'fields' }) },
|
73
|
-
type: EnumFieldType.NUMBER,
|
74
|
-
required: true,
|
75
|
-
},
|
76
|
-
|
77
|
-
{
|
78
|
-
name: 'y_axis',
|
79
|
-
label: { text: t('dashboard-user.y_axis', { ns: 'fields' }) },
|
80
|
-
type: EnumFieldType.NUMBER,
|
81
|
-
required: true,
|
82
|
-
},
|
83
|
-
]}
|
84
|
-
button={{ text: t('create', { ns: 'actions' }) }}
|
85
|
-
onSubmit={async (data) => {
|
86
|
-
const createdData = await createDashboardUser({
|
87
|
-
data: {
|
88
|
-
...data,
|
89
|
-
item_id: Number(data.item_id),
|
90
|
-
user_id: Number(data.user_id),
|
91
|
-
width: Number(data.width),
|
92
|
-
height: Number(data.height),
|
93
|
-
x_axis: Number(data.x_axis),
|
94
|
-
y_axis: Number(data.y_axis),
|
95
|
-
},
|
96
|
-
})
|
97
|
-
if (typeof onCreated === 'function') {
|
98
|
-
onCreated(createdData as any)
|
99
|
-
}
|
100
|
-
}}
|
101
|
-
/>
|
102
|
-
)
|
103
|
-
}
|
104
|
-
)
|
105
|
-
|
106
|
-
DashboardUserCreatePanel.displayName = 'DashboardUserCreatePanel'
|
107
|
-
|
108
|
-
export default DashboardUserCreatePanel
|
1
|
+
import FormPanel, { FormPanelRef } from '@/components/panels/form-panel'
|
2
|
+
import { EnumFieldType } from '@/enums/EnumFieldType'
|
3
|
+
import { useDashboardUserCreate } from '@/features/admin/dashboard-user'
|
4
|
+
import { DashboardUser } from '@/types/models'
|
5
|
+
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
6
|
+
import { useTranslation } from 'react-i18next'
|
7
|
+
|
8
|
+
export type DashboardUserCreatePanelRef = {
|
9
|
+
submit: () => void
|
10
|
+
}
|
11
|
+
|
12
|
+
export type DashboardUserCreatePanelProps = {
|
13
|
+
onCreated?: (data: DashboardUser) => void
|
14
|
+
}
|
15
|
+
|
16
|
+
const DashboardUserCreatePanel = forwardRef(
|
17
|
+
({ onCreated }: DashboardUserCreatePanelProps, ref) => {
|
18
|
+
const formRef = useRef<FormPanelRef>(null)
|
19
|
+
const { t } = useTranslation(['actions', 'fields', 'translations'])
|
20
|
+
const { mutateAsync: createDashboardUser } = useDashboardUserCreate()
|
21
|
+
|
22
|
+
useImperativeHandle(
|
23
|
+
ref,
|
24
|
+
() => ({
|
25
|
+
submit: () => {
|
26
|
+
formRef.current?.submit()
|
27
|
+
},
|
28
|
+
}),
|
29
|
+
[formRef]
|
30
|
+
)
|
31
|
+
|
32
|
+
return (
|
33
|
+
<FormPanel
|
34
|
+
ref={formRef}
|
35
|
+
fields={[
|
36
|
+
{
|
37
|
+
name: 'item_id',
|
38
|
+
label: { text: t('dashboard-user.item_id', { ns: 'fields' }) },
|
39
|
+
type: EnumFieldType.COMBOBOX,
|
40
|
+
required: true,
|
41
|
+
url: '/dashboard-item',
|
42
|
+
displayName: 'item',
|
43
|
+
valueName: 'id',
|
44
|
+
},
|
45
|
+
|
46
|
+
{
|
47
|
+
name: 'user_id',
|
48
|
+
label: { text: t('dashboard-user.user_id', { ns: 'fields' }) },
|
49
|
+
type: EnumFieldType.COMBOBOX,
|
50
|
+
required: true,
|
51
|
+
url: '/user',
|
52
|
+
displayName: 'user',
|
53
|
+
valueName: 'id',
|
54
|
+
},
|
55
|
+
|
56
|
+
{
|
57
|
+
name: 'width',
|
58
|
+
label: { text: t('dashboard-user.width', { ns: 'fields' }) },
|
59
|
+
type: EnumFieldType.NUMBER,
|
60
|
+
required: true,
|
61
|
+
},
|
62
|
+
|
63
|
+
{
|
64
|
+
name: 'height',
|
65
|
+
label: { text: t('dashboard-user.height', { ns: 'fields' }) },
|
66
|
+
type: EnumFieldType.NUMBER,
|
67
|
+
required: true,
|
68
|
+
},
|
69
|
+
|
70
|
+
{
|
71
|
+
name: 'x_axis',
|
72
|
+
label: { text: t('dashboard-user.x_axis', { ns: 'fields' }) },
|
73
|
+
type: EnumFieldType.NUMBER,
|
74
|
+
required: true,
|
75
|
+
},
|
76
|
+
|
77
|
+
{
|
78
|
+
name: 'y_axis',
|
79
|
+
label: { text: t('dashboard-user.y_axis', { ns: 'fields' }) },
|
80
|
+
type: EnumFieldType.NUMBER,
|
81
|
+
required: true,
|
82
|
+
},
|
83
|
+
]}
|
84
|
+
button={{ text: t('create', { ns: 'actions' }) }}
|
85
|
+
onSubmit={async (data) => {
|
86
|
+
const createdData = await createDashboardUser({
|
87
|
+
data: {
|
88
|
+
...data,
|
89
|
+
item_id: Number(data.item_id),
|
90
|
+
user_id: Number(data.user_id),
|
91
|
+
width: Number(data.width),
|
92
|
+
height: Number(data.height),
|
93
|
+
x_axis: Number(data.x_axis),
|
94
|
+
y_axis: Number(data.y_axis),
|
95
|
+
},
|
96
|
+
})
|
97
|
+
if (typeof onCreated === 'function') {
|
98
|
+
onCreated(createdData as any)
|
99
|
+
}
|
100
|
+
}}
|
101
|
+
/>
|
102
|
+
)
|
103
|
+
}
|
104
|
+
)
|
105
|
+
|
106
|
+
DashboardUserCreatePanel.displayName = 'DashboardUserCreatePanel'
|
107
|
+
|
108
|
+
export default DashboardUserCreatePanel
|
@@ -1,138 +1,138 @@
|
|
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 {
|
5
|
-
useDashboardUserGet,
|
6
|
-
useDashboardUserUpdate,
|
7
|
-
} from '@/features/admin/dashboard-user'
|
8
|
-
import useEffectAfterFirstUpdate from '@/hooks/use-effect-after-first-update'
|
9
|
-
import { DashboardUser } from '@/types/models'
|
10
|
-
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
11
|
-
import { useTranslation } from 'react-i18next'
|
12
|
-
import { EnumFieldType } from '@/enums/EnumFieldType'
|
13
|
-
|
14
|
-
export type DashboardUserUpdatePanelProps = {
|
15
|
-
data: DashboardUser
|
16
|
-
onUpdated?: (data: DashboardUser) => void
|
17
|
-
}
|
18
|
-
|
19
|
-
const DashboardUserUpdatePanel = forwardRef(
|
20
|
-
({ data, onUpdated }: DashboardUserUpdatePanelProps, ref) => {
|
21
|
-
const { t } = useTranslation(['actions', 'fields', 'translations'])
|
22
|
-
const { data: item, isLoading } = useDashboardUserGet(
|
23
|
-
(data as any).id as number
|
24
|
-
)
|
25
|
-
|
26
|
-
const { mutate: dashboardUserUpdate } = useDashboardUserUpdate()
|
27
|
-
const formRef = useRef<FormPanelRef>(null)
|
28
|
-
|
29
|
-
useEffectAfterFirstUpdate(() => {
|
30
|
-
if (item && formRef.current) {
|
31
|
-
formRef.current.setValuesFromItem(item)
|
32
|
-
}
|
33
|
-
}, [item])
|
34
|
-
|
35
|
-
useImperativeHandle(ref, () => ({}))
|
36
|
-
|
37
|
-
return (
|
38
|
-
<TabPanel
|
39
|
-
activeTabIndex={0}
|
40
|
-
tabs={[
|
41
|
-
{
|
42
|
-
title: t('details', { ns: 'actions' }),
|
43
|
-
children: (
|
44
|
-
<Overlay loading={isLoading}>
|
45
|
-
<FormPanel
|
46
|
-
ref={formRef}
|
47
|
-
fields={[
|
48
|
-
{
|
49
|
-
name: 'item_id',
|
50
|
-
label: {
|
51
|
-
text: t('dashboard-user.item_id', { ns: 'fields' }),
|
52
|
-
},
|
53
|
-
type: EnumFieldType.COMBOBOX,
|
54
|
-
required: true,
|
55
|
-
url: '/dashboard-item',
|
56
|
-
displayName: 'item',
|
57
|
-
valueName: 'id',
|
58
|
-
},
|
59
|
-
|
60
|
-
{
|
61
|
-
name: 'user_id',
|
62
|
-
label: {
|
63
|
-
text: t('dashboard-user.user_id', { ns: 'fields' }),
|
64
|
-
},
|
65
|
-
type: EnumFieldType.COMBOBOX,
|
66
|
-
required: true,
|
67
|
-
url: '/user',
|
68
|
-
displayName: 'user',
|
69
|
-
valueName: 'id',
|
70
|
-
},
|
71
|
-
|
72
|
-
{
|
73
|
-
name: 'width',
|
74
|
-
label: {
|
75
|
-
text: t('dashboard-user.width', { ns: 'fields' }),
|
76
|
-
},
|
77
|
-
type: EnumFieldType.NUMBER,
|
78
|
-
required: true,
|
79
|
-
},
|
80
|
-
|
81
|
-
{
|
82
|
-
name: 'height',
|
83
|
-
label: {
|
84
|
-
text: t('dashboard-user.height', { ns: 'fields' }),
|
85
|
-
},
|
86
|
-
type: EnumFieldType.NUMBER,
|
87
|
-
required: true,
|
88
|
-
},
|
89
|
-
|
90
|
-
{
|
91
|
-
name: 'x_axis',
|
92
|
-
label: {
|
93
|
-
text: t('dashboard-user.x_axis', { ns: 'fields' }),
|
94
|
-
},
|
95
|
-
type: EnumFieldType.NUMBER,
|
96
|
-
required: true,
|
97
|
-
},
|
98
|
-
|
99
|
-
{
|
100
|
-
name: 'y_axis',
|
101
|
-
label: {
|
102
|
-
text: t('dashboard-user.y_axis', { ns: 'fields' }),
|
103
|
-
},
|
104
|
-
type: EnumFieldType.NUMBER,
|
105
|
-
required: true,
|
106
|
-
},
|
107
|
-
]}
|
108
|
-
button={{ text: t('save', { ns: 'actions' }) }}
|
109
|
-
onSubmit={(data) => {
|
110
|
-
dashboardUserUpdate({
|
111
|
-
id: data.id,
|
112
|
-
data: {
|
113
|
-
...data,
|
114
|
-
item_id: Number(data.item_id),
|
115
|
-
user_id: Number(data.user_id),
|
116
|
-
width: Number(data.width),
|
117
|
-
height: Number(data.height),
|
118
|
-
x_axis: Number(data.x_axis),
|
119
|
-
y_axis: Number(data.y_axis),
|
120
|
-
},
|
121
|
-
})
|
122
|
-
if (typeof onUpdated === 'function') {
|
123
|
-
onUpdated(data)
|
124
|
-
}
|
125
|
-
}}
|
126
|
-
/>
|
127
|
-
</Overlay>
|
128
|
-
),
|
129
|
-
},
|
130
|
-
]}
|
131
|
-
/>
|
132
|
-
)
|
133
|
-
}
|
134
|
-
)
|
135
|
-
|
136
|
-
DashboardUserUpdatePanel.displayName = 'DashboardUserUpdatePanel'
|
137
|
-
|
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 {
|
5
|
+
useDashboardUserGet,
|
6
|
+
useDashboardUserUpdate,
|
7
|
+
} from '@/features/admin/dashboard-user'
|
8
|
+
import useEffectAfterFirstUpdate from '@/hooks/use-effect-after-first-update'
|
9
|
+
import { DashboardUser } from '@/types/models'
|
10
|
+
import { forwardRef, useImperativeHandle, useRef } from 'react'
|
11
|
+
import { useTranslation } from 'react-i18next'
|
12
|
+
import { EnumFieldType } from '@/enums/EnumFieldType'
|
13
|
+
|
14
|
+
export type DashboardUserUpdatePanelProps = {
|
15
|
+
data: DashboardUser
|
16
|
+
onUpdated?: (data: DashboardUser) => void
|
17
|
+
}
|
18
|
+
|
19
|
+
const DashboardUserUpdatePanel = forwardRef(
|
20
|
+
({ data, onUpdated }: DashboardUserUpdatePanelProps, ref) => {
|
21
|
+
const { t } = useTranslation(['actions', 'fields', 'translations'])
|
22
|
+
const { data: item, isLoading } = useDashboardUserGet(
|
23
|
+
(data as any).id as number
|
24
|
+
)
|
25
|
+
|
26
|
+
const { mutate: dashboardUserUpdate } = useDashboardUserUpdate()
|
27
|
+
const formRef = useRef<FormPanelRef>(null)
|
28
|
+
|
29
|
+
useEffectAfterFirstUpdate(() => {
|
30
|
+
if (item && formRef.current) {
|
31
|
+
formRef.current.setValuesFromItem(item)
|
32
|
+
}
|
33
|
+
}, [item])
|
34
|
+
|
35
|
+
useImperativeHandle(ref, () => ({}))
|
36
|
+
|
37
|
+
return (
|
38
|
+
<TabPanel
|
39
|
+
activeTabIndex={0}
|
40
|
+
tabs={[
|
41
|
+
{
|
42
|
+
title: t('details', { ns: 'actions' }),
|
43
|
+
children: (
|
44
|
+
<Overlay loading={isLoading}>
|
45
|
+
<FormPanel
|
46
|
+
ref={formRef}
|
47
|
+
fields={[
|
48
|
+
{
|
49
|
+
name: 'item_id',
|
50
|
+
label: {
|
51
|
+
text: t('dashboard-user.item_id', { ns: 'fields' }),
|
52
|
+
},
|
53
|
+
type: EnumFieldType.COMBOBOX,
|
54
|
+
required: true,
|
55
|
+
url: '/dashboard-item',
|
56
|
+
displayName: 'item',
|
57
|
+
valueName: 'id',
|
58
|
+
},
|
59
|
+
|
60
|
+
{
|
61
|
+
name: 'user_id',
|
62
|
+
label: {
|
63
|
+
text: t('dashboard-user.user_id', { ns: 'fields' }),
|
64
|
+
},
|
65
|
+
type: EnumFieldType.COMBOBOX,
|
66
|
+
required: true,
|
67
|
+
url: '/user',
|
68
|
+
displayName: 'user',
|
69
|
+
valueName: 'id',
|
70
|
+
},
|
71
|
+
|
72
|
+
{
|
73
|
+
name: 'width',
|
74
|
+
label: {
|
75
|
+
text: t('dashboard-user.width', { ns: 'fields' }),
|
76
|
+
},
|
77
|
+
type: EnumFieldType.NUMBER,
|
78
|
+
required: true,
|
79
|
+
},
|
80
|
+
|
81
|
+
{
|
82
|
+
name: 'height',
|
83
|
+
label: {
|
84
|
+
text: t('dashboard-user.height', { ns: 'fields' }),
|
85
|
+
},
|
86
|
+
type: EnumFieldType.NUMBER,
|
87
|
+
required: true,
|
88
|
+
},
|
89
|
+
|
90
|
+
{
|
91
|
+
name: 'x_axis',
|
92
|
+
label: {
|
93
|
+
text: t('dashboard-user.x_axis', { ns: 'fields' }),
|
94
|
+
},
|
95
|
+
type: EnumFieldType.NUMBER,
|
96
|
+
required: true,
|
97
|
+
},
|
98
|
+
|
99
|
+
{
|
100
|
+
name: 'y_axis',
|
101
|
+
label: {
|
102
|
+
text: t('dashboard-user.y_axis', { ns: 'fields' }),
|
103
|
+
},
|
104
|
+
type: EnumFieldType.NUMBER,
|
105
|
+
required: true,
|
106
|
+
},
|
107
|
+
]}
|
108
|
+
button={{ text: t('save', { ns: 'actions' }) }}
|
109
|
+
onSubmit={(data) => {
|
110
|
+
dashboardUserUpdate({
|
111
|
+
id: data.id,
|
112
|
+
data: {
|
113
|
+
...data,
|
114
|
+
item_id: Number(data.item_id),
|
115
|
+
user_id: Number(data.user_id),
|
116
|
+
width: Number(data.width),
|
117
|
+
height: Number(data.height),
|
118
|
+
x_axis: Number(data.x_axis),
|
119
|
+
y_axis: Number(data.y_axis),
|
120
|
+
},
|
121
|
+
})
|
122
|
+
if (typeof onUpdated === 'function') {
|
123
|
+
onUpdated(data)
|
124
|
+
}
|
125
|
+
}}
|
126
|
+
/>
|
127
|
+
</Overlay>
|
128
|
+
),
|
129
|
+
},
|
130
|
+
]}
|
131
|
+
/>
|
132
|
+
)
|
133
|
+
}
|
134
|
+
)
|
135
|
+
|
136
|
+
DashboardUserUpdatePanel.displayName = 'DashboardUserUpdatePanel'
|
137
|
+
|
138
138
|
export default DashboardUserUpdatePanel;
|
@@ -1,11 +1,11 @@
|
|
1
|
-
{
|
2
|
-
"create": "Create dashboard user",
|
3
|
-
"createText": "Fill the dashboard user informations.",
|
4
|
-
"createTooltip": "Create new dashboard user",
|
5
|
-
"delete": "Delete dashboard user",
|
6
|
-
"deleteText": "Are you sure to delete these dashboard user?",
|
7
|
-
"deleteTooltip": "Delete the selected dashboard user",
|
8
|
-
"edit": "Edit dashboard user",
|
9
|
-
"editText": "View and edit dashboard user information.",
|
10
|
-
"editTooltip": "Edit the selected dashboard user"
|
11
|
-
}
|
1
|
+
{
|
2
|
+
"create": "Create dashboard user",
|
3
|
+
"createText": "Fill the dashboard user informations.",
|
4
|
+
"createTooltip": "Create new dashboard user",
|
5
|
+
"delete": "Delete dashboard user",
|
6
|
+
"deleteText": "Are you sure to delete these dashboard user?",
|
7
|
+
"deleteTooltip": "Delete the selected dashboard user",
|
8
|
+
"edit": "Edit dashboard user",
|
9
|
+
"editText": "View and edit dashboard user information.",
|
10
|
+
"editTooltip": "Edit the selected dashboard user"
|
11
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
{
|
2
|
-
"create": "Criar dashboard user",
|
3
|
-
"createText": "Preencha as informações do dashboard user.",
|
4
|
-
"createTooltip": "Criar novo dashboard user",
|
5
|
-
"delete": "Deletar dashboard user",
|
6
|
-
"deleteText": "Você tem certeza que deseja deletar esses dashboard user?",
|
7
|
-
"deleteTooltip": "Deletar o dashboard user selecionado",
|
8
|
-
"edit": "Editar dashboard user",
|
9
|
-
"editText": "Visualizar e editar informações do dashboard user.",
|
10
|
-
"editTooltip": "Editar o dashboard user selecionado"
|
11
|
-
}
|
1
|
+
{
|
2
|
+
"create": "Criar dashboard user",
|
3
|
+
"createText": "Preencha as informações do dashboard user.",
|
4
|
+
"createTooltip": "Criar novo dashboard user",
|
5
|
+
"delete": "Deletar dashboard user",
|
6
|
+
"deleteText": "Você tem certeza que deseja deletar esses dashboard user?",
|
7
|
+
"deleteTooltip": "Deletar o dashboard user selecionado",
|
8
|
+
"edit": "Editar dashboard user",
|
9
|
+
"editText": "Visualizar e editar informações do dashboard user.",
|
10
|
+
"editTooltip": "Editar o dashboard user selecionado"
|
11
|
+
}
|
@@ -1,28 +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 = "dashboard-user";
|
6
|
-
|
7
|
-
export function useDashboardUserCreate() {
|
8
|
-
const { dashboardUserCreate } = requests();
|
9
|
-
return useDefaultMutation(scope, "create", dashboardUserCreate);
|
10
|
-
}
|
11
|
-
|
12
|
-
export function useDashboardUserDelete() {
|
13
|
-
const { dashboardUserDelete } = requests();
|
14
|
-
return useDefaultMutation(scope, "delete", dashboardUserDelete);
|
15
|
-
}
|
16
|
-
|
17
|
-
export function useDashboardUserUpdate() {
|
18
|
-
const { dashboardUserUpdate } = requests();
|
19
|
-
return useDefaultMutation(scope, "update", dashboardUserUpdate);
|
20
|
-
}
|
21
|
-
|
22
|
-
export function useDashboardUserGet(id: number) {
|
23
|
-
const { dashboardUserGet } = requests();
|
24
|
-
return useQuery({
|
25
|
-
queryKey: [scope, "get"],
|
26
|
-
queryFn: () => dashboardUserGet(id),
|
27
|
-
});
|
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 = "dashboard-user";
|
6
|
+
|
7
|
+
export function useDashboardUserCreate() {
|
8
|
+
const { dashboardUserCreate } = requests();
|
9
|
+
return useDefaultMutation(scope, "create", dashboardUserCreate);
|
10
|
+
}
|
11
|
+
|
12
|
+
export function useDashboardUserDelete() {
|
13
|
+
const { dashboardUserDelete } = requests();
|
14
|
+
return useDefaultMutation(scope, "delete", dashboardUserDelete);
|
15
|
+
}
|
16
|
+
|
17
|
+
export function useDashboardUserUpdate() {
|
18
|
+
const { dashboardUserUpdate } = requests();
|
19
|
+
return useDefaultMutation(scope, "update", dashboardUserUpdate);
|
20
|
+
}
|
21
|
+
|
22
|
+
export function useDashboardUserGet(id: number) {
|
23
|
+
const { dashboardUserGet } = requests();
|
24
|
+
return useQuery({
|
25
|
+
queryKey: [scope, "get"],
|
26
|
+
queryFn: () => dashboardUserGet(id),
|
27
|
+
});
|
28
|
+
}
|