@inceptionbg/iui 2.0.12 → 2.0.14
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 +112 -53
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/iui.css +1 -1
- package/package.json +1 -1
- package/rollup.config.js +1 -5
- package/src/assets/icons/light/faBookmark.ts +15 -15
- package/src/assets/icons/light/faBookmarkSlash.ts +15 -15
- package/src/assets/images/logo/inception.svg +22 -0
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Button/SplitButton.tsx +91 -0
- package/src/components/Dialog/components/DialogFooter.tsx +5 -1
- package/src/components/Header/Components/ModuleSelect.tsx +15 -10
- package/src/components/Header/Components/UserMenu.tsx +1 -0
- package/src/components/List/List.tsx +5 -3
- package/src/components/List/ListItem.tsx +58 -13
- package/src/components/Menu/Menu.tsx +5 -1
- package/src/components/Pullover/Pullover.tsx +25 -9
- package/src/components/Sidebar/Sidebar.tsx +6 -4
- package/src/components/Table/Table.tsx +2 -5
- package/src/components/Table/components/edit/TableEditRow.tsx +4 -1
- package/src/components/Table/components/filters/TableFilters.tsx +4 -1
- package/src/components/Table/components/items/TableItemActions.tsx +12 -3
- package/src/components/Table/components/print/TablePrint.tsx +4 -1
- package/src/components/Table/components/sort/TableSort.tsx +19 -1
- package/src/components/Table/components/templates/TableTemplates.tsx +56 -45
- package/src/components/Table/contexts/TableContext.tsx +13 -17
- package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +8 -10
- package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +1 -1
- package/src/components/Table/hooks/useTableColumns.ts +28 -0
- package/src/components/Table/hooks/useTablePagination.ts +10 -7
- package/src/components/Table/hooks/useTableSelect.ts +15 -7
- package/src/index.ts +14 -2
- package/src/styles/App.scss +1 -0
- package/src/styles/common/maps/_buttonMaps.scss +42 -0
- package/src/styles/components/_button.scss +11 -50
- package/src/styles/components/_buttonSplit.scss +90 -0
- package/src/styles/components/_header.scss +26 -5
- package/src/styles/components/_list.scss +19 -1
- package/src/styles/components/_page.scss +2 -1
- package/src/styles/components/_sidebar.scss +2 -2
- package/src/styles/components/_table.scss +6 -6
- package/src/styles/variables/_variables.scss +1 -0
- package/src/types/ITable.ts +40 -44
- package/src/utils/i18n/i18nIUICyrilic.ts +22 -13
- package/src/utils/i18n/i18nIUILatin.ts +15 -7
- package/src/utils/i18n/i18nIUIMe.ts +21 -11
- package/src/utils/logoUtils.ts +7 -0
- package/src/utils/tableUtils.ts +5 -5
- package/tsconfig.json +2 -0
- package/src/components/Table/hooks/useDefaultTemplate.ts +0 -20
package/src/types/ITable.ts
CHANGED
|
@@ -4,31 +4,17 @@ import { ITableKeyboardActionsBase } from './IKeyboard';
|
|
|
4
4
|
import { IPopupControl } from './IPopup';
|
|
5
5
|
|
|
6
6
|
export interface ITable<T = unknown> {
|
|
7
|
-
|
|
8
|
-
// setColumns?: (data: ITableColumn[]) => void;
|
|
9
|
-
// withColumnsSearch?: boolean;
|
|
7
|
+
columnData: ITableColumnsData;
|
|
10
8
|
data: ITableDataItem[];
|
|
11
|
-
dataActions?:
|
|
12
|
-
edit?: {
|
|
13
|
-
hasAccess: boolean;
|
|
14
|
-
};
|
|
15
|
-
delete?: {
|
|
16
|
-
onClick: (itemUuid: string) => void;
|
|
17
|
-
hasAccess: boolean;
|
|
18
|
-
};
|
|
19
|
-
actions?: {
|
|
20
|
-
label: string;
|
|
21
|
-
onClick: (item: ITableDataItem) => void;
|
|
22
|
-
hasAccess: boolean;
|
|
23
|
-
}[];
|
|
24
|
-
};
|
|
9
|
+
dataActions?: ITableDataActions;
|
|
25
10
|
rowSelect?: {
|
|
26
11
|
selectedRows: Set<string>;
|
|
27
12
|
setSelectedRows: Dispatch<SetStateAction<Set<string>>>;
|
|
28
|
-
actions:
|
|
13
|
+
actions: ITableSelectedAction[];
|
|
29
14
|
};
|
|
30
15
|
filterData?: ITableFilterData;
|
|
31
16
|
sortData?: ITableSortData;
|
|
17
|
+
templateData?: ITableTemplateData;
|
|
32
18
|
printData?: IPrintData<T>;
|
|
33
19
|
sumRows?: ITableDataItem[];
|
|
34
20
|
editable?: ITableEdit;
|
|
@@ -55,29 +41,6 @@ export interface ITable<T = unknown> {
|
|
|
55
41
|
className?: string;
|
|
56
42
|
rowHeight?: 'xs' | 's' | 'm';
|
|
57
43
|
maxHeight?: string;
|
|
58
|
-
templates?: {
|
|
59
|
-
identifier: string;
|
|
60
|
-
setSearch?: (search: string) => void;
|
|
61
|
-
items: {
|
|
62
|
-
uuid: string;
|
|
63
|
-
name: string;
|
|
64
|
-
// identifier: string;
|
|
65
|
-
// filterValues?: IReportTemplateFilterValue[];
|
|
66
|
-
// columns: string[];
|
|
67
|
-
// organization?: ISimpleObject;
|
|
68
|
-
// subsystem?: IModule;
|
|
69
|
-
// sorts?: string[];
|
|
70
|
-
// isPublic?: boolean;
|
|
71
|
-
// isDefault?: boolean;
|
|
72
|
-
// order?: number;
|
|
73
|
-
// createdAt?: string;
|
|
74
|
-
// createdBy?: ISimpleObject;
|
|
75
|
-
}[];
|
|
76
|
-
// data: IReportTemplateData;
|
|
77
|
-
// setTemplateName?: (templateName: string) => void;
|
|
78
|
-
// onClearFilters: () => void;
|
|
79
|
-
// allowPublicCreate?: boolean;
|
|
80
|
-
};
|
|
81
44
|
}
|
|
82
45
|
|
|
83
46
|
export interface ITableColumn {
|
|
@@ -129,6 +92,20 @@ export interface ITableDataItemCells {
|
|
|
129
92
|
};
|
|
130
93
|
}
|
|
131
94
|
|
|
95
|
+
export interface ITableDataActions {
|
|
96
|
+
edit?: {
|
|
97
|
+
hasAccess: boolean;
|
|
98
|
+
};
|
|
99
|
+
delete?: {
|
|
100
|
+
onClick: (itemUuid: string) => void;
|
|
101
|
+
hasAccess: boolean;
|
|
102
|
+
};
|
|
103
|
+
actions?: {
|
|
104
|
+
label: string;
|
|
105
|
+
onClick: (item: ITableDataItem) => void;
|
|
106
|
+
hasAccess: boolean;
|
|
107
|
+
}[];
|
|
108
|
+
}
|
|
132
109
|
export interface ITableFilterData {
|
|
133
110
|
filters: ITableFilter;
|
|
134
111
|
customFilterIdList?: string[];
|
|
@@ -162,11 +139,12 @@ export interface ITableSort {
|
|
|
162
139
|
}
|
|
163
140
|
|
|
164
141
|
export interface ITableColumnsData {
|
|
142
|
+
defaultColumns: ITableColumn[];
|
|
165
143
|
columns: ITableColumn[];
|
|
166
|
-
setColumns
|
|
167
|
-
withSearch?: boolean;
|
|
144
|
+
setColumns?: (columns: ITableColumn[]) => void;
|
|
145
|
+
// withSearch?: boolean;
|
|
168
146
|
}
|
|
169
|
-
export interface
|
|
147
|
+
export interface ITableSelectedAction {
|
|
170
148
|
label: string;
|
|
171
149
|
onClick: (selected: Set<string>) => void;
|
|
172
150
|
hidden?: boolean;
|
|
@@ -174,6 +152,24 @@ export interface ITableSelectedActions {
|
|
|
174
152
|
clearSelected?: boolean;
|
|
175
153
|
}
|
|
176
154
|
|
|
155
|
+
export interface ITableTemplateData {
|
|
156
|
+
identifier: string;
|
|
157
|
+
popupController: IPopupControl;
|
|
158
|
+
items: IReportTemplate[];
|
|
159
|
+
isLoading?: boolean;
|
|
160
|
+
isFetching?: boolean;
|
|
161
|
+
setSearch?: (search: string) => void;
|
|
162
|
+
initiateCreate: () => void;
|
|
163
|
+
initiateCreateDefault: () => void;
|
|
164
|
+
setItemToDeleteUuids: (itemUuids: string[]) => void;
|
|
165
|
+
|
|
166
|
+
// data: IReportTemplateData;
|
|
167
|
+
// setTemplateName?: (templateName: string) => void;
|
|
168
|
+
// onClearFilters: () => void;
|
|
169
|
+
|
|
170
|
+
allowPublicCreate?: boolean;
|
|
171
|
+
TemplateNode: ReactNode;
|
|
172
|
+
}
|
|
177
173
|
///// EDIT /////
|
|
178
174
|
export interface ITableEdit<T = any> {
|
|
179
175
|
selectedItem: T | null;
|
|
@@ -40,7 +40,7 @@ export const i18nIUICyrilic = {
|
|
|
40
40
|
Columns: 'Колоне',
|
|
41
41
|
DragDropListsInfo:
|
|
42
42
|
'Одаберите колоне за приказивање превлачењем са једне листе на другу',
|
|
43
|
-
TableSelect: 'Акције над изабраним
|
|
43
|
+
TableSelect: 'Акције над изабраним редовима',
|
|
44
44
|
Filter: 'Филтери',
|
|
45
45
|
ApplyFilters: 'Примени филтере',
|
|
46
46
|
HiddenColumns: 'Сакривене колоне',
|
|
@@ -56,18 +56,26 @@ export const i18nIUICyrilic = {
|
|
|
56
56
|
SelectedColumns: 'Одабране колоне',
|
|
57
57
|
Sort: 'Сортирање',
|
|
58
58
|
AddItem: 'Додај ставку',
|
|
59
|
+
// TEMPLATES
|
|
59
60
|
Templates: 'Шаблони',
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
DefaultTemplate: 'Основни шаблони',
|
|
65
|
-
RemoveFiltersAndLook: 'Поништи изглед и филтере',
|
|
66
|
-
CreateTemplateLong: 'Сачувај тренутни изглед као шаблон',
|
|
61
|
+
ApplyTemplate: 'Примени шаблон',
|
|
62
|
+
ResetTemplate: 'Поништи шаблон',
|
|
63
|
+
DeleteTemplate: 'Обриши шаблон',
|
|
64
|
+
CreateTemplateLong: 'Сачувај тренутни изглед као шаблон',
|
|
67
65
|
CreateDefaultTemplate: 'Сачувај тренутни изглед као подразумевани',
|
|
68
|
-
CreateTemplate: '
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
CreateTemplate: 'Креирај шаблон',
|
|
67
|
+
TemplateName: 'Назив шаблона',
|
|
68
|
+
NoTemplatesAvailable: `Нема доступних шаблона.
|
|
69
|
+
Кликните на "Креирај шаблон" да бисте направили шаблон са тренутно изабраним колонама, филтерима и сортирањем.`,
|
|
70
|
+
// SelectTemplate: 'Изабери шаблон',
|
|
71
|
+
// TemplateList: 'Листа шаблона',
|
|
72
|
+
PublicTemplate: 'Јавни шаблон',
|
|
73
|
+
// PublicTemplates: 'Јавни шаблони',
|
|
74
|
+
PrivateTemplate: 'Приватни шаблон',
|
|
75
|
+
// DefaultTemplate: 'Основни шаблони',
|
|
76
|
+
// RemoveFiltersAndLook: 'Поништи изглед и филтере',
|
|
77
|
+
// DeleteTemplateDesc: 'Да ли сте сигурни да желите да изришете шаблон?',
|
|
78
|
+
// DeleteTemplateTitle: 'Брисање шаблона',
|
|
71
79
|
|
|
72
80
|
FastLinks: 'Брзи приступ',
|
|
73
81
|
|
|
@@ -79,13 +87,14 @@ export const i18nIUICyrilic = {
|
|
|
79
87
|
////// TOAST //////
|
|
80
88
|
Pending: 'У току',
|
|
81
89
|
Successfully: 'Успешно',
|
|
82
|
-
DeletedSuccessfully: 'Успешно
|
|
90
|
+
DeletedSuccessfully: 'Успешно обрисано',
|
|
83
91
|
ErrorMessage: 'Дошло је до грешке!',
|
|
84
92
|
TryAgain: 'Покушај поново',
|
|
85
93
|
|
|
86
94
|
////// PAGES //////
|
|
87
95
|
ReturnToHomepage: 'Повратак на почетну страну',
|
|
88
|
-
FooterText:
|
|
96
|
+
FooterText: `Инцептион ЦА је акредитовано сертификационо тело за квалификовану електронску доставу,
|
|
97
|
+
издавање временских жигова, валидацију квалификованог потписа и печата и квалификовано чување докумената.`,
|
|
89
98
|
PageNotFound: 'Страница није пронађена',
|
|
90
99
|
PageNotFoundInfo: `Страница коју тражите није пронађена или је премештена.
|
|
91
100
|
Можете се вратити на почетну страну.`,
|
|
@@ -40,7 +40,7 @@ export const i18nIUILatin = {
|
|
|
40
40
|
Columns: 'Kolone',
|
|
41
41
|
DragDropListsInfo:
|
|
42
42
|
'Odaberite kolone za prikazivanje prevlačenjem sa jedne liste na drugu',
|
|
43
|
-
TableSelect: 'Akcije nad izabranim
|
|
43
|
+
TableSelect: 'Akcije nad izabranim redovima',
|
|
44
44
|
Filter: 'Filteri',
|
|
45
45
|
ApplyFilters: 'Primeni filtere',
|
|
46
46
|
HiddenColumns: 'Sakrivene kolone',
|
|
@@ -60,15 +60,20 @@ export const i18nIUILatin = {
|
|
|
60
60
|
Templates: 'Šabloni',
|
|
61
61
|
ApplyTemplate: 'Primeni šablon',
|
|
62
62
|
ResetTemplate: 'Poništi šablon',
|
|
63
|
+
DeleteTemplate: 'Obriši šablon',
|
|
64
|
+
CreateTemplateLong: 'Sačuvaj trenutni izgled kao šablon',
|
|
65
|
+
CreateDefaultTemplate: 'Sačuvaj trenutni izgled kao podrazumevani',
|
|
66
|
+
CreateTemplate: 'Kreiraj šablon',
|
|
67
|
+
TemplateName: 'Naziv šablona',
|
|
68
|
+
NoTemplatesAvailable: `Nema dostupnih šablona.
|
|
69
|
+
Kliknite na "Kreiraj šablon" da biste napravili šablon sa trenutno izabranim kolonama, filterima i sortiranjem.`,
|
|
63
70
|
// SelectTemplate: 'Izaberi šablon',
|
|
64
71
|
// TemplateList: 'Lista šablona',
|
|
65
|
-
|
|
72
|
+
PublicTemplate: 'Javni šablon',
|
|
66
73
|
// PublicTemplates: 'Javni šabloni',
|
|
74
|
+
PrivateTemplate: 'Privatni šablon',
|
|
67
75
|
// DefaultTemplate: 'Osnovni šabloni',
|
|
68
76
|
// RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
69
|
-
// CreateTemplateLong: 'Sačuvaj trenutni izgled kao šablon',
|
|
70
|
-
// CreateDefaultTemplate: 'Sačuvaj trenutni izgled kao podrazumevani',
|
|
71
|
-
// CreateTemplate: 'Sačuvaj šablon',
|
|
72
77
|
// DeleteTemplateDesc: 'Da li ste sigurni da želite da izbrišete šablon?',
|
|
73
78
|
// DeleteTemplateTitle: 'Brisanje šablona',
|
|
74
79
|
|
|
@@ -80,13 +85,16 @@ export const i18nIUILatin = {
|
|
|
80
85
|
CharNumber: 'Broj karaktera {{number}}',
|
|
81
86
|
|
|
82
87
|
////// TOAST //////
|
|
88
|
+
Pending: 'U toku',
|
|
83
89
|
Successfully: 'Uspešno',
|
|
84
|
-
DeletedSuccessfully: 'Uspešno
|
|
90
|
+
DeletedSuccessfully: 'Uspešno obrisano',
|
|
85
91
|
ErrorMessage: 'Došlo je do greške!',
|
|
92
|
+
TryAgain: 'Pokušaj ponovo',
|
|
86
93
|
|
|
87
94
|
////// PAGES //////
|
|
88
95
|
ReturnToHomepage: 'Povratak na početnu stranu',
|
|
89
|
-
FooterText:
|
|
96
|
+
FooterText: `Inception CA je akreditovano sertifikaciono telo za kvalifikovanu elektronsku dostavu,
|
|
97
|
+
izdavanje vremenskih žigova, validaciju kvalifikovanog potpisa i pečata i kvalifikovano čuvanje dokumenata.`,
|
|
90
98
|
PageNotFound: 'Stranica nije pronadjena',
|
|
91
99
|
PageNotFoundInfo: `Stranica koju tražite nije pronadjena ili je premeštena.
|
|
92
100
|
Možete se vratiti na početnu stranu.`,
|
|
@@ -38,7 +38,7 @@ export const i18nIUIMe = {
|
|
|
38
38
|
allResults: 'Svi',
|
|
39
39
|
Columns: 'Kolone',
|
|
40
40
|
DragDropListsInfo: 'Izaberite kolone za prikaz prevlačenjem sa jedne liste na drugu',
|
|
41
|
-
TableSelect: 'Akcije nad izabranim
|
|
41
|
+
TableSelect: 'Akcije nad izabranim redovima',
|
|
42
42
|
Filter: 'Filteri',
|
|
43
43
|
ApplyFilters: 'Primijeni filtere',
|
|
44
44
|
HiddenColumns: 'Skrivene kolone',
|
|
@@ -54,18 +54,27 @@ export const i18nIUIMe = {
|
|
|
54
54
|
SelectedColumns: 'Odabrane kolone',
|
|
55
55
|
Sort: 'Sortiranje',
|
|
56
56
|
AddItem: 'Dodaj stavku',
|
|
57
|
+
|
|
58
|
+
// TEMPLATES
|
|
57
59
|
Templates: 'Šabloni',
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
PublicTemplates: 'Javni šabloni',
|
|
62
|
-
DefaultTemplate: 'Podrazumijevani šabloni',
|
|
63
|
-
RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
60
|
+
ApplyTemplate: 'Primijeni šablon',
|
|
61
|
+
ResetTemplate: 'Poništi šablon',
|
|
62
|
+
DeleteTemplate: 'Obriši šablon',
|
|
64
63
|
CreateTemplateLong: 'Sačuvaj trenutni izgled kao šablon',
|
|
65
64
|
CreateDefaultTemplate: 'Sačuvaj trenutni izgled kao podrazumijevani',
|
|
66
|
-
CreateTemplate: '
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
CreateTemplate: 'Kreiraj šablon',
|
|
66
|
+
TemplateName: 'Naziv šablona',
|
|
67
|
+
NoTemplatesAvailable: `Nema dostupnih šablona.
|
|
68
|
+
Kliknite na "Kreiraj šablon" da biste napravili šablon sa trenutno izabranim kolonama, filterima i sortiranjem.`,
|
|
69
|
+
// SelectTemplate: 'Izaberi šablon',
|
|
70
|
+
// TemplateList: 'Lista šablona',
|
|
71
|
+
PublicTemplate: 'Javni šablon',
|
|
72
|
+
// PublicTemplates: 'Javni šabloni',
|
|
73
|
+
PrivateTemplate: 'Privatni šablon',
|
|
74
|
+
// DefaultTemplate: 'Osnovni šabloni',
|
|
75
|
+
// RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
76
|
+
// DeleteTemplateDesc: 'Da li ste sigurni da želite da izbrišete šablon?',
|
|
77
|
+
// DeleteTemplateTitle: 'Brisanje šablona',
|
|
69
78
|
|
|
70
79
|
FastLinks: 'Brzi linkovi',
|
|
71
80
|
|
|
@@ -77,13 +86,14 @@ export const i18nIUIMe = {
|
|
|
77
86
|
////// TOAST //////
|
|
78
87
|
Pending: 'U toku',
|
|
79
88
|
Successfully: 'Uspješno',
|
|
80
|
-
DeletedSuccessfully: 'Uspješno
|
|
89
|
+
DeletedSuccessfully: 'Uspješno obrisano',
|
|
81
90
|
ErrorMessage: 'Došlo je do greške!',
|
|
82
91
|
TryAgain: 'Pokušajte ponovo',
|
|
83
92
|
|
|
84
93
|
////// PAGES //////
|
|
85
94
|
ReturnToHomepage: 'Povratak na početnu stranicu',
|
|
86
95
|
FooterText: '',
|
|
96
|
+
|
|
87
97
|
PageNotFound: 'Stranica nije pronađena',
|
|
88
98
|
PageNotFoundInfo: `Stranica koju tražite nije pronađena ili je premještena.
|
|
89
99
|
Možete se vratiti na početnu stranicu.`,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import MTS from '../assets/images/logo/mts.svg';
|
|
2
|
+
import PPL from '../assets/images/logo/paperless.svg';
|
|
3
|
+
import INC from '../assets/images/logo/inception.svg';
|
|
4
|
+
|
|
5
|
+
export type IOrgLogo = 'MTS' | 'PPL' | 'INC';
|
|
6
|
+
|
|
7
|
+
export const orgLogo: Record<IOrgLogo, string> = { MTS, PPL, INC };
|
package/src/utils/tableUtils.ts
CHANGED
|
@@ -86,21 +86,21 @@ export const convertReportTemplateFilterToSearch = (
|
|
|
86
86
|
|
|
87
87
|
export const setTemplateData = ({
|
|
88
88
|
template,
|
|
89
|
-
|
|
89
|
+
columnData,
|
|
90
90
|
setFilters,
|
|
91
91
|
setSort,
|
|
92
92
|
}: {
|
|
93
93
|
template: IReportTemplate;
|
|
94
|
-
|
|
94
|
+
columnData?: ITableColumnsData;
|
|
95
95
|
setFilters?: (filters: IAnyObject) => void;
|
|
96
96
|
setSort?: (sort: string) => void;
|
|
97
97
|
}) => {
|
|
98
98
|
const newFilters =
|
|
99
99
|
template.filterValues && convertReportTemplateFilterToSearch(template.filterValues);
|
|
100
100
|
newFilters && setFilters?.(newFilters);
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
getVisibleColumnsFromList(
|
|
101
|
+
columnData &&
|
|
102
|
+
columnData.setColumns?.(
|
|
103
|
+
getVisibleColumnsFromList(columnData.columns, template.columns)
|
|
104
104
|
);
|
|
105
105
|
template.sorts && setSort && setSort(template.sorts[0]);
|
|
106
106
|
};
|
package/tsconfig.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// import { useEffect, useState } from 'react';
|
|
2
|
-
// import { getDefaultReportTemplate } from '../Components/Templates/repo/TemplateRepo';
|
|
3
|
-
// import { IReportTemplate } from '../../../types/ITable';
|
|
4
|
-
|
|
5
|
-
export const useDefaultTemplate = (identifier?: string) => {
|
|
6
|
-
// const [template, setTemplate] = useState<IReportTemplate | null>(null);
|
|
7
|
-
// const [isLoading, setIsLoading] = useState(true);
|
|
8
|
-
// useEffect(() => {
|
|
9
|
-
// if (identifier) {
|
|
10
|
-
// getDefaultReportTemplate(identifier)
|
|
11
|
-
// .then(setTemplate)
|
|
12
|
-
// .catch(() => {})
|
|
13
|
-
// .finally(() => setIsLoading(false));
|
|
14
|
-
// }
|
|
15
|
-
// }, [identifier]);
|
|
16
|
-
// return {
|
|
17
|
-
// defaultTemplate: template,
|
|
18
|
-
// isLoadingDefaultTemplate: !!identifier && isLoading,
|
|
19
|
-
// };
|
|
20
|
-
};
|