@inceptionbg/iui 2.0.13 → 2.0.15
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 +85 -50
- 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/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/Dialog/components/DialogFooter.tsx +18 -16
- package/src/components/Header/Components/ModuleSelect.tsx +15 -10
- package/src/components/Header/Components/UserMenu.tsx +1 -0
- package/src/components/List/List.tsx +4 -2
- package/src/components/List/ListItem.tsx +58 -13
- package/src/components/Menu/Menu.tsx +5 -1
- package/src/components/Pullover/Pullover.tsx +36 -22
- package/src/components/Sidebar/Sidebar.tsx +6 -4
- package/src/components/Table/Table.tsx +1 -4
- 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/templates/TableTemplates.tsx +49 -55
- 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 +12 -2
- package/src/styles/components/_header.scss +26 -5
- package/src/styles/components/_list.scss +18 -1
- package/src/styles/components/_page.scss +2 -1
- package/src/styles/components/_sidebar.scss +2 -2
- package/src/types/ITable.ts +40 -31
- package/src/utils/i18n/i18nIUICyrilic.ts +21 -12
- package/src/utils/i18n/i18nIUILatin.ts +8 -2
- package/src/utils/i18n/i18nIUIMe.ts +20 -10
- package/src/utils/logoUtils.ts +7 -0
- package/src/utils/tableUtils.ts +5 -5
- package/src/components/Table/components/templates/components/CreateTemplateDialog.tsx +0 -41
- package/src/components/Table/hooks/useDefaultTemplate.ts +0 -20
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
@use '../variables/bp';
|
|
2
2
|
|
|
3
3
|
.iui-header {
|
|
4
|
-
|
|
5
|
-
background: var(--
|
|
4
|
+
box-shadow: var(--container-shadow);
|
|
5
|
+
background: var(--primary);
|
|
6
|
+
color: var(--text-inverse);
|
|
6
7
|
height: var(--header-height);
|
|
7
8
|
width: 100dvw;
|
|
8
9
|
display: flex;
|
|
@@ -10,13 +11,21 @@
|
|
|
10
11
|
justify-content: space-between;
|
|
11
12
|
padding: 0 24px 0 8px;
|
|
12
13
|
box-sizing: border-box;
|
|
14
|
+
z-index: 2;
|
|
13
15
|
.header-button {
|
|
14
16
|
height: 40px;
|
|
15
17
|
width: 40px;
|
|
16
18
|
padding: 8px;
|
|
17
19
|
border-radius: 50px;
|
|
18
|
-
|
|
20
|
+
circle {
|
|
21
|
+
fill: var(--white);
|
|
22
|
+
}
|
|
23
|
+
&:hover,
|
|
24
|
+
&.active {
|
|
19
25
|
background-color: var(--neutral-hover);
|
|
26
|
+
circle {
|
|
27
|
+
fill: var(--primary);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
30
|
}
|
|
22
31
|
}
|
|
@@ -31,12 +40,17 @@
|
|
|
31
40
|
user-select: none;
|
|
32
41
|
&:hover {
|
|
33
42
|
background-color: var(--neutral-hover);
|
|
43
|
+
color: var(--primary);
|
|
34
44
|
}
|
|
35
45
|
}
|
|
36
46
|
.modules-menu {
|
|
37
47
|
display: grid;
|
|
38
48
|
grid-template-columns: repeat(2, 1fr);
|
|
39
49
|
padding: 8px !important;
|
|
50
|
+
top: var(--header-height) !important;
|
|
51
|
+
left: 0 !important;
|
|
52
|
+
border-top-left-radius: 0px !important;
|
|
53
|
+
border-top-right-radius: 0px !important;
|
|
40
54
|
@media #{bp.$mobile} {
|
|
41
55
|
grid-template-columns: 1fr;
|
|
42
56
|
}
|
|
@@ -81,7 +95,7 @@
|
|
|
81
95
|
user-select: none;
|
|
82
96
|
-webkit-user-drag: none;
|
|
83
97
|
.user-icon {
|
|
84
|
-
color: var(--
|
|
98
|
+
color: var(--white);
|
|
85
99
|
height: 36px;
|
|
86
100
|
width: 36px;
|
|
87
101
|
}
|
|
@@ -96,7 +110,7 @@
|
|
|
96
110
|
}
|
|
97
111
|
.org-name {
|
|
98
112
|
font-size: 12px;
|
|
99
|
-
color: var(--neutral-
|
|
113
|
+
color: var(--neutral-200);
|
|
100
114
|
}
|
|
101
115
|
p {
|
|
102
116
|
line-height: 1.5;
|
|
@@ -113,6 +127,13 @@
|
|
|
113
127
|
border-radius: 50px;
|
|
114
128
|
}
|
|
115
129
|
}
|
|
130
|
+
.header-user-menu {
|
|
131
|
+
top: var(--header-height) !important;
|
|
132
|
+
right: 0 !important;
|
|
133
|
+
left: auto !important;
|
|
134
|
+
border-top-left-radius: 0px !important;
|
|
135
|
+
border-top-right-radius: 0px !important;
|
|
136
|
+
}
|
|
116
137
|
|
|
117
138
|
@media #{bp.$mobile} {
|
|
118
139
|
.user-info {
|
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: 8px;
|
|
6
6
|
.iui-list-item {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
7
10
|
border: var(--border);
|
|
8
11
|
border-radius: 8px;
|
|
9
12
|
padding: 12px 16px;
|
|
13
|
+
transition:
|
|
14
|
+
color 0.15s,
|
|
15
|
+
background-color 0.15s;
|
|
10
16
|
p {
|
|
11
17
|
font-size: 14px;
|
|
12
18
|
line-height: 20px;
|
|
@@ -20,6 +26,11 @@
|
|
|
20
26
|
margin-top: 4px;
|
|
21
27
|
white-space: pre-line;
|
|
22
28
|
}
|
|
29
|
+
.iui-list-item-actions {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
}
|
|
23
34
|
&.disabled {
|
|
24
35
|
cursor: default;
|
|
25
36
|
opacity: 0.5;
|
|
@@ -29,12 +40,18 @@
|
|
|
29
40
|
&:hover {
|
|
30
41
|
background-color: var(--neutral-hover);
|
|
31
42
|
}
|
|
43
|
+
&:has(.iui-icon-btn:hover) {
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
}
|
|
32
46
|
&.active {
|
|
33
|
-
background-color: var(--primary);
|
|
47
|
+
background-color: var(--primary) !important;
|
|
34
48
|
color: var(--text-inverse);
|
|
35
49
|
.iui-list-item-desc {
|
|
36
50
|
color: var(--neutral-300);
|
|
37
51
|
}
|
|
52
|
+
.iui-list-item-actions .iui-icon-btn:not(:hover) {
|
|
53
|
+
background-color: var(--background);
|
|
54
|
+
}
|
|
38
55
|
}
|
|
39
56
|
}
|
|
40
57
|
}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
padding: 0 1.5rem;
|
|
48
48
|
min-height: 55px;
|
|
49
49
|
max-height: 55px;
|
|
50
|
-
|
|
50
|
+
box-shadow: var(--container-shadow);
|
|
51
51
|
|
|
52
52
|
@media #{bp.$mobileTablet} {
|
|
53
53
|
.breadcrumbs {
|
|
@@ -60,4 +60,5 @@
|
|
|
60
60
|
text-align: center;
|
|
61
61
|
padding: 16px;
|
|
62
62
|
font-size: 12px;
|
|
63
|
+
white-space: pre-line;
|
|
63
64
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: column;
|
|
9
|
-
|
|
9
|
+
box-shadow: var(--container-shadow);
|
|
10
10
|
height: calc(100dvh - var(--header-height));
|
|
11
11
|
width: var(--sidebar-width);
|
|
12
12
|
transition: width var(--animation);
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
.item-only {
|
|
191
191
|
padding-left: 15px;
|
|
192
192
|
.sidebar-item-label {
|
|
193
|
-
padding-left:
|
|
193
|
+
padding-left: 8px;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
.sidebar-footer p {
|
package/src/types/ITable.ts
CHANGED
|
@@ -4,41 +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;
|
|
32
|
-
templateData?:
|
|
33
|
-
identifier: string;
|
|
34
|
-
setSearch?: (search: string) => void;
|
|
35
|
-
items: IReportTemplate[];
|
|
36
|
-
isLoading?: boolean;
|
|
37
|
-
// data: IReportTemplateData;
|
|
38
|
-
// setTemplateName?: (templateName: string) => void;
|
|
39
|
-
// onClearFilters: () => void;
|
|
40
|
-
allowPublicCreate?: boolean;
|
|
41
|
-
};
|
|
17
|
+
templateData?: ITableTemplateData;
|
|
42
18
|
printData?: IPrintData<T>;
|
|
43
19
|
sumRows?: ITableDataItem[];
|
|
44
20
|
editable?: ITableEdit;
|
|
@@ -116,6 +92,20 @@ export interface ITableDataItemCells {
|
|
|
116
92
|
};
|
|
117
93
|
}
|
|
118
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
|
+
}
|
|
119
109
|
export interface ITableFilterData {
|
|
120
110
|
filters: ITableFilter;
|
|
121
111
|
customFilterIdList?: string[];
|
|
@@ -149,11 +139,12 @@ export interface ITableSort {
|
|
|
149
139
|
}
|
|
150
140
|
|
|
151
141
|
export interface ITableColumnsData {
|
|
142
|
+
defaultColumns: ITableColumn[];
|
|
152
143
|
columns: ITableColumn[];
|
|
153
|
-
setColumns
|
|
154
|
-
withSearch?: boolean;
|
|
144
|
+
setColumns?: (columns: ITableColumn[]) => void;
|
|
145
|
+
// withSearch?: boolean;
|
|
155
146
|
}
|
|
156
|
-
export interface
|
|
147
|
+
export interface ITableSelectedAction {
|
|
157
148
|
label: string;
|
|
158
149
|
onClick: (selected: Set<string>) => void;
|
|
159
150
|
hidden?: boolean;
|
|
@@ -161,6 +152,24 @@ export interface ITableSelectedActions {
|
|
|
161
152
|
clearSelected?: boolean;
|
|
162
153
|
}
|
|
163
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
|
+
}
|
|
164
173
|
///// EDIT /////
|
|
165
174
|
export interface ITableEdit<T = any> {
|
|
166
175
|
selectedItem: T | null;
|
|
@@ -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
|
Можете се вратити на почетну страну.`,
|
|
@@ -65,10 +65,13 @@ export const i18nIUILatin = {
|
|
|
65
65
|
CreateDefaultTemplate: 'Sačuvaj trenutni izgled kao podrazumevani',
|
|
66
66
|
CreateTemplate: 'Kreiraj šablon',
|
|
67
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.`,
|
|
68
70
|
// SelectTemplate: 'Izaberi šablon',
|
|
69
71
|
// TemplateList: 'Lista šablona',
|
|
70
72
|
PublicTemplate: 'Javni šablon',
|
|
71
73
|
// PublicTemplates: 'Javni šabloni',
|
|
74
|
+
PrivateTemplate: 'Privatni šablon',
|
|
72
75
|
// DefaultTemplate: 'Osnovni šabloni',
|
|
73
76
|
// RemoveFiltersAndLook: 'Poništi izgled i filtere',
|
|
74
77
|
// DeleteTemplateDesc: 'Da li ste sigurni da želite da izbrišete šablon?',
|
|
@@ -82,13 +85,16 @@ export const i18nIUILatin = {
|
|
|
82
85
|
CharNumber: 'Broj karaktera {{number}}',
|
|
83
86
|
|
|
84
87
|
////// TOAST //////
|
|
88
|
+
Pending: 'U toku',
|
|
85
89
|
Successfully: 'Uspešno',
|
|
86
|
-
DeletedSuccessfully: 'Uspešno
|
|
90
|
+
DeletedSuccessfully: 'Uspešno obrisano',
|
|
87
91
|
ErrorMessage: 'Došlo je do greške!',
|
|
92
|
+
TryAgain: 'Pokušaj ponovo',
|
|
88
93
|
|
|
89
94
|
////// PAGES //////
|
|
90
95
|
ReturnToHomepage: 'Povratak na početnu stranu',
|
|
91
|
-
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.`,
|
|
92
98
|
PageNotFound: 'Stranica nije pronadjena',
|
|
93
99
|
PageNotFoundInfo: `Stranica koju tražite nije pronadjena ili je premeštena.
|
|
94
100
|
Možete se vratiti na početnu stranu.`,
|
|
@@ -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
|
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { useState, type FC } from 'react';
|
|
2
|
-
import { IPopupControl } from '../../../../../types/IPopup';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { Dialog } from '../../../../Dialog/Dialog';
|
|
5
|
-
import { TextInput } from '../../../../Inputs/TextInput';
|
|
6
|
-
import { Checkbox } from '../../../../Inputs/Checkbox';
|
|
7
|
-
import { IReportTemplate } from '../../../../../types/ITable';
|
|
8
|
-
import { useTableContext } from '../../../contexts/TableContext';
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
control: IPopupControl['control'];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export const CreateTemplateDialog: FC<Props> = ({ control }) => {
|
|
15
|
-
const { t } = useTranslation();
|
|
16
|
-
const { templateData } = useTableContext();
|
|
17
|
-
|
|
18
|
-
const [formData, setFormData] = useState<Partial<IReportTemplate>>({});
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<Dialog
|
|
22
|
-
title={t('CreateTemplateLong')}
|
|
23
|
-
control={control}
|
|
24
|
-
onFormSubmit={() => console.log('Template saved!')}
|
|
25
|
-
footer={{ confirmButton: { label: t('CreateTemplate'), type: 'submit' } }}
|
|
26
|
-
>
|
|
27
|
-
<TextInput
|
|
28
|
-
label={t('TemplateName')}
|
|
29
|
-
value={formData.name}
|
|
30
|
-
setValue={name => setFormData({ ...formData, name })}
|
|
31
|
-
/>
|
|
32
|
-
{templateData?.allowPublicCreate && (
|
|
33
|
-
<Checkbox
|
|
34
|
-
label={t('PublicTemplate')}
|
|
35
|
-
value={formData.isPublic}
|
|
36
|
-
setValue={isPublic => setFormData({ ...formData, isPublic })}
|
|
37
|
-
/>
|
|
38
|
-
)}
|
|
39
|
-
</Dialog>
|
|
40
|
-
);
|
|
41
|
-
};
|
|
@@ -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
|
-
};
|