@dhis2/analytics 23.13.12 → 24.0.1
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/CHANGELOG.md +26 -0
- package/build/cjs/components/AboutAOUnit/AboutAOUnit.js +15 -9
- package/build/cjs/components/AboutAOUnit/utils.js +48 -0
- package/build/cjs/locales/ar/translations.json +4 -1
- package/build/cjs/locales/ar_EG/translations.json +4 -1
- package/build/cjs/locales/ar_IQ/translations.json +4 -1
- package/build/cjs/locales/ckb/translations.json +4 -1
- package/build/cjs/locales/cs/translations.json +4 -1
- package/build/cjs/locales/da/translations.json +4 -1
- package/build/cjs/locales/en/translations.json +4 -1
- package/build/cjs/locales/es/translations.json +4 -1
- package/build/cjs/locales/fr/translations.json +4 -1
- package/build/cjs/locales/id/translations.json +4 -1
- package/build/cjs/locales/km/translations.json +4 -1
- package/build/cjs/locales/lo/translations.json +4 -1
- package/build/cjs/locales/my/translations.json +4 -1
- package/build/cjs/locales/nb/translations.json +4 -1
- package/build/cjs/locales/nl/translations.json +4 -1
- package/build/cjs/locales/or/translations.json +4 -1
- package/build/cjs/locales/prs/translations.json +4 -1
- package/build/cjs/locales/ps/translations.json +4 -1
- package/build/cjs/locales/pt/translations.json +4 -1
- package/build/cjs/locales/pt_BR/translations.json +4 -1
- package/build/cjs/locales/ro/translations.json +4 -1
- package/build/cjs/locales/ru/translations.json +4 -1
- package/build/cjs/locales/sv/translations.json +4 -1
- package/build/cjs/locales/tet/translations.json +4 -1
- package/build/cjs/locales/tg/translations.json +4 -1
- package/build/cjs/locales/uk/translations.json +17 -14
- package/build/cjs/locales/ur/translations.json +4 -1
- package/build/cjs/locales/uz/translations.json +4 -1
- package/build/cjs/locales/uz_Latn/translations.json +4 -1
- package/build/cjs/locales/vi/translations.json +4 -1
- package/build/cjs/locales/zh/translations.json +4 -1
- package/build/cjs/locales/zh_CN/translations.json +4 -1
- package/build/es/components/AboutAOUnit/AboutAOUnit.js +14 -9
- package/build/es/components/AboutAOUnit/utils.js +31 -0
- package/build/es/locales/ar/translations.json +4 -1
- package/build/es/locales/ar_EG/translations.json +4 -1
- package/build/es/locales/ar_IQ/translations.json +4 -1
- package/build/es/locales/ckb/translations.json +4 -1
- package/build/es/locales/cs/translations.json +4 -1
- package/build/es/locales/da/translations.json +4 -1
- package/build/es/locales/en/translations.json +4 -1
- package/build/es/locales/es/translations.json +4 -1
- package/build/es/locales/fr/translations.json +4 -1
- package/build/es/locales/id/translations.json +4 -1
- package/build/es/locales/km/translations.json +4 -1
- package/build/es/locales/lo/translations.json +4 -1
- package/build/es/locales/my/translations.json +4 -1
- package/build/es/locales/nb/translations.json +4 -1
- package/build/es/locales/nl/translations.json +4 -1
- package/build/es/locales/or/translations.json +4 -1
- package/build/es/locales/prs/translations.json +4 -1
- package/build/es/locales/ps/translations.json +4 -1
- package/build/es/locales/pt/translations.json +4 -1
- package/build/es/locales/pt_BR/translations.json +4 -1
- package/build/es/locales/ro/translations.json +4 -1
- package/build/es/locales/ru/translations.json +4 -1
- package/build/es/locales/sv/translations.json +4 -1
- package/build/es/locales/tet/translations.json +4 -1
- package/build/es/locales/tg/translations.json +4 -1
- package/build/es/locales/uk/translations.json +17 -14
- package/build/es/locales/ur/translations.json +4 -1
- package/build/es/locales/uz/translations.json +4 -1
- package/build/es/locales/uz_Latn/translations.json +4 -1
- package/build/es/locales/vi/translations.json +4 -1
- package/build/es/locales/zh/translations.json +4 -1
- package/build/es/locales/zh_CN/translations.json +4 -1
- package/package.json +3 -3
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Нет описания",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Viewed {{count}} times_2": "",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"Unsubscribe": "",
|
|
19
19
|
"Subscribe to get updates about new interpretations.": "",
|
|
20
20
|
"Subscribe": "",
|
|
21
|
+
"About this map": "",
|
|
22
|
+
"About this line list": "",
|
|
23
|
+
"About this visualization": "",
|
|
21
24
|
"This app could not retrieve required data.": "",
|
|
22
25
|
"Network error": "",
|
|
23
26
|
"Data Type": "Тип данных",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Ingen beskrivning",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Немає змалювання",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Viewed {{count}} times_2": "",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"Unsubscribe": "",
|
|
19
19
|
"Subscribe to get updates about new interpretations.": "",
|
|
20
20
|
"Subscribe": "",
|
|
21
|
+
"About this map": "",
|
|
22
|
+
"About this line list": "",
|
|
23
|
+
"About this visualization": "",
|
|
21
24
|
"This app could not retrieve required data.": "",
|
|
22
25
|
"Network error": "",
|
|
23
26
|
"Data Type": "",
|
|
@@ -44,16 +47,16 @@
|
|
|
44
47
|
"Metric type": "",
|
|
45
48
|
"All metrics": "Всі метрики",
|
|
46
49
|
"Move to {{axisName}}": "",
|
|
47
|
-
"Add to {{axisName}}": "",
|
|
50
|
+
"Add to {{axisName}}": "Додати до {{axisName}}",
|
|
48
51
|
"Not available for {{visualizationType}}": "",
|
|
49
52
|
"Remove Assigned Categories": "",
|
|
50
|
-
"Add Assigned Categories": "",
|
|
53
|
+
"Add Assigned Categories": "Додати призначені категорії",
|
|
51
54
|
"Remove": "Прибрати",
|
|
52
|
-
"Filter dimensions": "",
|
|
53
|
-
"Main dimensions": "",
|
|
54
|
-
"Your dimensions": "",
|
|
55
|
+
"Filter dimensions": "Виміри фільтра",
|
|
56
|
+
"Main dimensions": "Основні виміри",
|
|
57
|
+
"Your dimensions": "Ваші виміри",
|
|
55
58
|
"Dimension recommended with selected data": "",
|
|
56
|
-
"All items": "",
|
|
59
|
+
"All items": "Всі елементи",
|
|
57
60
|
"Automatically include all items": "",
|
|
58
61
|
"Select all {{- dimensionTitle}} items. With this option, new items added in the future will be automatically included.": "",
|
|
59
62
|
"Manually select items...": "",
|
|
@@ -275,17 +278,17 @@
|
|
|
275
278
|
"Save translations": "",
|
|
276
279
|
"Could not load translations": "",
|
|
277
280
|
"Retry": "",
|
|
278
|
-
"Series": "",
|
|
281
|
+
"Series": "Серія",
|
|
279
282
|
"Category": "Категорія",
|
|
280
283
|
"Filter": "Фільтр",
|
|
281
284
|
"Columns": "",
|
|
282
285
|
"Rows": "",
|
|
283
286
|
"Points": "",
|
|
284
|
-
"Reporting rate": "",
|
|
285
|
-
"Reporting rate on time": "",
|
|
286
|
-
"Actual reports": "",
|
|
287
|
-
"Actual reports on time": "",
|
|
288
|
-
"Expected reports": "",
|
|
287
|
+
"Reporting rate": "Частота повідомлень",
|
|
288
|
+
"Reporting rate on time": "Частота повідомлень у часі",
|
|
289
|
+
"Actual reports": "Фактичні звіти",
|
|
290
|
+
"Actual reports on time": "Фактичні звіти за часом",
|
|
291
|
+
"Expected reports": "Очікувані звіти",
|
|
289
292
|
"Program": "Програма",
|
|
290
293
|
"Select a program": "",
|
|
291
294
|
"Indicators": "Показники",
|
|
@@ -363,7 +366,7 @@
|
|
|
363
366
|
"Linear Regression": "",
|
|
364
367
|
"Target": "Ціль",
|
|
365
368
|
"Base": "",
|
|
366
|
-
"Axis {{axisId}}": "",
|
|
369
|
+
"Axis {{axisId}}": "Вісь {{axisId}}",
|
|
367
370
|
"{{count}} items_0": "",
|
|
368
371
|
"{{count}} items_1": "",
|
|
369
372
|
"{{count}} items_2": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "کوئی وضاحت نہیں",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Тавсиф йўқ",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "Билдиришномалар",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "Маълумот тури",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Tavsif yoʼq",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "Maʼlumot turi",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Không mô tả",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "Loại dữ liệu",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "与 {{commaSeparatedListOfUsersAndGroups}} 共享",
|
|
7
7
|
"Not shared with any users or groups": "不与任何用户或组共享",
|
|
8
|
-
"About this visualization": "关于此可视化",
|
|
9
8
|
"No description": "无描述",
|
|
10
9
|
"Last updated {{time}}": "最后更新 {{time}}",
|
|
11
10
|
"Created {{time}} by {{author}}": "由 {{author}} 在 {{time}} 创建",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "查看了 {{count}} 次",
|
|
13
13
|
"Notifications": "通知",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "您已订阅并获取有关新解释的更新。",
|
|
15
15
|
"Unsubscribe": "退订",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "订阅以获取有关新解释的更新。",
|
|
17
17
|
"Subscribe": "订阅",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "关于此可视化",
|
|
18
21
|
"This app could not retrieve required data.": "此应用无法检索所需数据。",
|
|
19
22
|
"Network error": "网络错误",
|
|
20
23
|
"Data Type": "数据类型",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "没有描述",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "通知",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "",
|
|
@@ -8,12 +8,13 @@ import PropTypes from 'prop-types';
|
|
|
8
8
|
import React, { useEffect, useMemo, useState } from 'react';
|
|
9
9
|
import { formatList } from '../../modules/list.js';
|
|
10
10
|
import styles from './styles/AboutAOUnit.style.js';
|
|
11
|
+
import { getTranslatedString, AOTypeMap } from './utils.js';
|
|
11
12
|
const READ_ONLY = 'r';
|
|
12
13
|
const READ_AND_WRITE = 'rw';
|
|
13
14
|
|
|
14
15
|
const getQueries = type => ({
|
|
15
16
|
ao: {
|
|
16
|
-
resource: type,
|
|
17
|
+
resource: AOTypeMap[type].apiEndpoint,
|
|
17
18
|
id: _ref => {
|
|
18
19
|
let {
|
|
19
20
|
id
|
|
@@ -36,22 +37,24 @@ const getQueries = type => ({
|
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
const getSubscribeMutation = (type, id) => ({
|
|
39
|
-
resource: "".concat(type, "/").concat(id, "/subscriber"),
|
|
40
|
+
resource: "".concat(AOTypeMap[type].apiEndpoint, "/").concat(id, "/subscriber"),
|
|
40
41
|
type: 'create'
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
const getUnsubscribeMutation = (type, id) => ({
|
|
44
|
-
resource: "".concat(type, "/").concat(id, "/subscriber"),
|
|
45
|
+
resource: "".concat(AOTypeMap[type].apiEndpoint, "/").concat(id, "/subscriber"),
|
|
45
46
|
type: 'delete'
|
|
46
47
|
});
|
|
47
48
|
|
|
48
49
|
const AboutAOUnit = _ref3 => {
|
|
50
|
+
var _data$ao$createdBy;
|
|
51
|
+
|
|
49
52
|
let {
|
|
50
53
|
type,
|
|
51
54
|
id
|
|
52
55
|
} = _ref3;
|
|
53
56
|
const [isExpanded, setIsExpanded] = useState(true);
|
|
54
|
-
const queries = useMemo(() => getQueries(type), []);
|
|
57
|
+
const queries = useMemo(() => getQueries(type), [type]);
|
|
55
58
|
const {
|
|
56
59
|
data,
|
|
57
60
|
loading: dataIsLoading,
|
|
@@ -59,8 +62,8 @@ const AboutAOUnit = _ref3 => {
|
|
|
59
62
|
} = useDataQuery(queries, {
|
|
60
63
|
lazy: true
|
|
61
64
|
});
|
|
62
|
-
const subscribeMutation = useMemo(() => getSubscribeMutation(type, id), []);
|
|
63
|
-
const unsubscribeMutation = useMemo(() => getUnsubscribeMutation(type, id), []);
|
|
65
|
+
const subscribeMutation = useMemo(() => getSubscribeMutation(type, id), [type, id]);
|
|
66
|
+
const unsubscribeMutation = useMemo(() => getUnsubscribeMutation(type, id), [type, id]);
|
|
64
67
|
const [subscribe, {
|
|
65
68
|
loading: subscribeIsLoading
|
|
66
69
|
}] = useDataMutation(subscribeMutation, {
|
|
@@ -89,7 +92,7 @@ const AboutAOUnit = _ref3 => {
|
|
|
89
92
|
id
|
|
90
93
|
});
|
|
91
94
|
}
|
|
92
|
-
}, [
|
|
95
|
+
}, [id, refetch]);
|
|
93
96
|
|
|
94
97
|
const getAccessLevelString = access => {
|
|
95
98
|
const re = new RegExp("(?<accessLevel>".concat(READ_AND_WRITE, "?)"));
|
|
@@ -136,7 +139,7 @@ const AboutAOUnit = _ref3 => {
|
|
|
136
139
|
className: "jsx-".concat(styles.__hash) + " " + "header"
|
|
137
140
|
}, /*#__PURE__*/React.createElement("span", {
|
|
138
141
|
className: "jsx-".concat(styles.__hash) + " " + "title"
|
|
139
|
-
},
|
|
142
|
+
}, getTranslatedString(type, 'unitTitle')), isExpanded ? /*#__PURE__*/React.createElement(IconChevronUp24, {
|
|
140
143
|
color: colors.grey700
|
|
141
144
|
}) : /*#__PURE__*/React.createElement(IconChevronDown24, {
|
|
142
145
|
color: colors.grey700
|
|
@@ -166,9 +169,11 @@ const AboutAOUnit = _ref3 => {
|
|
|
166
169
|
className: "jsx-".concat(styles.__hash) + " " + "detailLine"
|
|
167
170
|
}, /*#__PURE__*/React.createElement(IconUser16, {
|
|
168
171
|
color: colors.grey700
|
|
169
|
-
}), i18n.t('Created {{time}} by {{author}}', {
|
|
172
|
+
}), (_data$ao$createdBy = data.ao.createdBy) !== null && _data$ao$createdBy !== void 0 && _data$ao$createdBy.displayName ? i18n.t('Created {{time}} by {{author}}', {
|
|
170
173
|
time: moment(data.ao.created).fromNow(),
|
|
171
174
|
author: data.ao.createdBy.displayName
|
|
175
|
+
}) : i18n.t('Created {{time}}', {
|
|
176
|
+
time: moment(data.ao.created).fromNow()
|
|
172
177
|
})), /*#__PURE__*/React.createElement("p", {
|
|
173
178
|
className: "jsx-".concat(styles.__hash) + " " + "detailLine"
|
|
174
179
|
}, /*#__PURE__*/React.createElement(IconView16, {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import i18n from '@dhis2/d2-i18n';
|
|
2
|
+
export const AO_TYPE_VISUALIZATION = 'visualization';
|
|
3
|
+
export const AO_TYPE_MAP = 'map';
|
|
4
|
+
export const AO_TYPE_EVENT_VISUALIZATION = 'eventVisualization';
|
|
5
|
+
export const AOTypeMap = {
|
|
6
|
+
[AO_TYPE_VISUALIZATION]: {
|
|
7
|
+
apiEndpoint: 'visualizations'
|
|
8
|
+
},
|
|
9
|
+
[AO_TYPE_MAP]: {
|
|
10
|
+
apiEndpoint: 'maps'
|
|
11
|
+
},
|
|
12
|
+
[AO_TYPE_EVENT_VISUALIZATION]: {
|
|
13
|
+
apiEndpoint: 'eventVisualizations'
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const NO_TYPE = 'NO_TYPE';
|
|
17
|
+
const texts = {
|
|
18
|
+
[AO_TYPE_MAP]: {
|
|
19
|
+
unitTitle: i18n.t('About this map')
|
|
20
|
+
},
|
|
21
|
+
[AO_TYPE_EVENT_VISUALIZATION]: {
|
|
22
|
+
unitTitle: i18n.t('About this line list')
|
|
23
|
+
},
|
|
24
|
+
[AO_TYPE_VISUALIZATION]: {
|
|
25
|
+
unitTitle: i18n.t('About this visualization')
|
|
26
|
+
},
|
|
27
|
+
[NO_TYPE]: {
|
|
28
|
+
unitTitle: i18n.t('About this visualization')
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export const getTranslatedString = (type, key) => (texts[type] || texts[NO_TYPE])[key];
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "لا يوجد وصف",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Viewed {{count}} times_2": "",
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"Unsubscribe": "",
|
|
21
21
|
"Subscribe to get updates about new interpretations.": "",
|
|
22
22
|
"Subscribe": "",
|
|
23
|
+
"About this map": "",
|
|
24
|
+
"About this line list": "",
|
|
25
|
+
"About this visualization": "",
|
|
23
26
|
"This app could not retrieve required data.": "",
|
|
24
27
|
"Network error": "",
|
|
25
28
|
"Data Type": "نوع البيانات",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Viewed {{count}} times_2": "",
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"Unsubscribe": "",
|
|
21
21
|
"Subscribe to get updates about new interpretations.": "",
|
|
22
22
|
"Subscribe": "",
|
|
23
|
+
"About this map": "",
|
|
24
|
+
"About this line list": "",
|
|
25
|
+
"About this visualization": "",
|
|
23
26
|
"This app could not retrieve required data.": "",
|
|
24
27
|
"Network error": "",
|
|
25
28
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "لا يوجد وصف",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Viewed {{count}} times_2": "",
|
|
@@ -20,6 +20,9 @@
|
|
|
20
20
|
"Unsubscribe": "",
|
|
21
21
|
"Subscribe to get updates about new interpretations.": "",
|
|
22
22
|
"Subscribe": "",
|
|
23
|
+
"About this map": "",
|
|
24
|
+
"About this line list": "",
|
|
25
|
+
"About this visualization": "",
|
|
23
26
|
"This app could not retrieve required data.": "",
|
|
24
27
|
"Network error": "",
|
|
25
28
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "",
|
|
13
13
|
"Viewed {{count}} times_1": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "Sdíleno s {{commaSeparatedListOfUsersAndGroups}}",
|
|
7
7
|
"Not shared with any users or groups": "Nesdíleno s žádnými uživateli ani skupinami",
|
|
8
|
-
"About this visualization": "O této vizualizaci",
|
|
9
8
|
"No description": "Bez popisu",
|
|
10
9
|
"Last updated {{time}}": "Poslední aktualizace {{time}}",
|
|
11
10
|
"Created {{time}} by {{author}}": "Vytvořeno {{time}} uživatelem {{author}}",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times_0": "Zobrazeno 1 krát",
|
|
13
13
|
"Viewed {{count}} times_1": "Zobrazeno {{count}}krát",
|
|
14
14
|
"Viewed {{count}} times_2": "Zobrazeno {{count}}krát",
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
"Unsubscribe": "Odhlásit odběr",
|
|
19
19
|
"Subscribe to get updates about new interpretations.": "Přihlaste se k odběru novinek o nových interpretacích.",
|
|
20
20
|
"Subscribe": "Odebírat",
|
|
21
|
+
"About this map": "",
|
|
22
|
+
"About this line list": "",
|
|
23
|
+
"About this visualization": "O této vizualizaci",
|
|
21
24
|
"This app could not retrieve required data.": "Tato aplikace nemohla načíst požadovaná data.",
|
|
22
25
|
"Network error": "Chyba sítě",
|
|
23
26
|
"Data Type": "Typ dat",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "{{userOrGroup}} ({{accessLevel}})",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "Shared with {{commaSeparatedListOfUsersAndGroups}}",
|
|
7
7
|
"Not shared with any users or groups": "Not shared with any users or groups",
|
|
8
|
-
"About this visualization": "About this visualization",
|
|
9
8
|
"No description": "No description",
|
|
10
9
|
"Last updated {{time}}": "Last updated {{time}}",
|
|
11
10
|
"Created {{time}} by {{author}}": "Created {{time}} by {{author}}",
|
|
11
|
+
"Created {{time}}": "Created {{time}}",
|
|
12
12
|
"Viewed {{count}} times": "Viewed 1 time",
|
|
13
13
|
"Viewed {{count}} times_plural": "Viewed {{count}} times",
|
|
14
14
|
"Notifications": "Notifications",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "Unsubscribe",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "Subscribe to get updates about new interpretations.",
|
|
18
18
|
"Subscribe": "Subscribe",
|
|
19
|
+
"About this map": "About this map",
|
|
20
|
+
"About this line list": "About this line list",
|
|
21
|
+
"About this visualization": "About this visualization",
|
|
19
22
|
"This app could not retrieve required data.": "This app could not retrieve required data.",
|
|
20
23
|
"Network error": "Network error",
|
|
21
24
|
"Data Type": "Data Type",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Sin descripción",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "Tipo de datos",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Aucune description",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Viewed {{count}} times_plural": "",
|
|
14
14
|
"Notifications": "Notifications",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"Unsubscribe": "",
|
|
17
17
|
"Subscribe to get updates about new interpretations.": "",
|
|
18
18
|
"Subscribe": "",
|
|
19
|
+
"About this map": "",
|
|
20
|
+
"About this line list": "",
|
|
21
|
+
"About this visualization": "",
|
|
19
22
|
"This app could not retrieve required data.": "",
|
|
20
23
|
"Network error": "",
|
|
21
24
|
"Data Type": "Type de données",
|
|
@@ -5,16 +5,19 @@
|
|
|
5
5
|
"{{userOrGroup}} ({{accessLevel}})": "",
|
|
6
6
|
"Shared with {{commaSeparatedListOfUsersAndGroups}}": "",
|
|
7
7
|
"Not shared with any users or groups": "",
|
|
8
|
-
"About this visualization": "",
|
|
9
8
|
"No description": "Tidak ada deskripsi",
|
|
10
9
|
"Last updated {{time}}": "",
|
|
11
10
|
"Created {{time}} by {{author}}": "",
|
|
11
|
+
"Created {{time}}": "",
|
|
12
12
|
"Viewed {{count}} times": "",
|
|
13
13
|
"Notifications": "",
|
|
14
14
|
"You're subscribed and getting updates about new interpretations.": "",
|
|
15
15
|
"Unsubscribe": "",
|
|
16
16
|
"Subscribe to get updates about new interpretations.": "",
|
|
17
17
|
"Subscribe": "",
|
|
18
|
+
"About this map": "",
|
|
19
|
+
"About this line list": "",
|
|
20
|
+
"About this visualization": "",
|
|
18
21
|
"This app could not retrieve required data.": "",
|
|
19
22
|
"Network error": "",
|
|
20
23
|
"Data Type": "Tipe Data",
|