datastake-daf 0.6.273 → 0.6.274
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/components/index.js +40 -265
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/src/@daf/core/components/Dashboard/Globe/Globe.stories.js +5 -30
- package/src/@daf/core/components/Dashboard/Globe/hook.js +7 -63
- package/src/@daf/core/components/Dashboard/Globe/index.jsx +6 -24
- package/src/@daf/core/components/Dashboard/Globe/style.js +23 -7
- package/src/@daf/utils/tooltip.js +2 -2
- package/src/index.js +0 -1
- package/src/@daf/core/components/Dashboard/Globe/README.md +0 -106
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.jsx +0 -259
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobe.stories.js +0 -202
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeDebug.jsx +0 -85
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeExample.jsx +0 -75
- package/src/@daf/core/components/Dashboard/Globe/SimpleGlobeTest.jsx +0 -48
- package/src/@daf/core/components/Dashboard/Globe/storyConfig.js +0 -243
- package/src/@daf/core/components/Dashboard/Globe/storyConfig1.js +0 -354
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
import CustomIcon from "../../Icon/CustomIcon";
|
|
2
|
-
import DAFTable from "../../Table";
|
|
3
|
-
import MoreTags from "../../Table/MoreTags";
|
|
4
|
-
|
|
5
|
-
const isMineSite = true;
|
|
6
|
-
|
|
7
|
-
export const storyConfig = {
|
|
8
|
-
data: [
|
|
9
|
-
{
|
|
10
|
-
gps: {
|
|
11
|
-
latitude: -1.5457261,
|
|
12
|
-
longitude: 28.8756306,
|
|
13
|
-
},
|
|
14
|
-
name: "Rubaya Mining Site",
|
|
15
|
-
datastakeId: "LOC-00000000241",
|
|
16
|
-
description: "A major mining site with multiple operational areas and significant mineral extraction activities. This location has experienced various incidents and events over time.",
|
|
17
|
-
data: [
|
|
18
|
-
{
|
|
19
|
-
_id: "68af116e2cb57a4e3dd2e056",
|
|
20
|
-
createdBy: "4274fdb4-2798-46ea-a0a6-b4af5d92566e",
|
|
21
|
-
form: "event",
|
|
22
|
-
id: "91c3176a-d312-4259-9ddf-9d286ff6df87",
|
|
23
|
-
datastakeId: "EV-000000000150",
|
|
24
|
-
name: "Mining Collapse Incident",
|
|
25
|
-
authorId: "7e17f076-09e7-4668-927c-11c12ccd1346",
|
|
26
|
-
collectId: "d78271301d04f76dfe0f70ce3c9e114ffe4dc4e0",
|
|
27
|
-
country: "CD",
|
|
28
|
-
date: "2025-08-25",
|
|
29
|
-
typeOfEvent: "incident",
|
|
30
|
-
implementers: [],
|
|
31
|
-
associatedSubjects: [],
|
|
32
|
-
testimonialsSource: [],
|
|
33
|
-
pictures: [],
|
|
34
|
-
documents: [],
|
|
35
|
-
channels: ["NAS-00000000105"],
|
|
36
|
-
published: true,
|
|
37
|
-
version: 1,
|
|
38
|
-
identifiedPerpetrators: [],
|
|
39
|
-
identifiedVictims: [],
|
|
40
|
-
assistedVictims: [],
|
|
41
|
-
mitigationMeasures: [],
|
|
42
|
-
createdAt: "2025-08-27T00:00:00.000Z",
|
|
43
|
-
updatedAt: "2025-08-27T14:12:21.395Z",
|
|
44
|
-
__v: 0,
|
|
45
|
-
percentageCompletion: 40,
|
|
46
|
-
eventCategory: "conflict",
|
|
47
|
-
incindentType: null,
|
|
48
|
-
initiative: null,
|
|
49
|
-
meta: null,
|
|
50
|
-
namespace: "incident",
|
|
51
|
-
primarySource: null,
|
|
52
|
-
severity: "moderate",
|
|
53
|
-
sources: ["7e17f076-09e7-4668-927c-11c12ccd1346"],
|
|
54
|
-
type: "minor_incident",
|
|
55
|
-
description: "A minor mining collapse incident that occurred during routine operations. No injuries were reported, but equipment was damaged.",
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
_id: "68af1fb6b52f86d82f57e945",
|
|
59
|
-
createdBy: "b1e3f288-01a2-4cea-95d2-03f65dfede99",
|
|
60
|
-
form: "event",
|
|
61
|
-
id: "5bee0d0f-39da-4bd1-85a4-e66276c82303",
|
|
62
|
-
datastakeId: "EV-000000000153",
|
|
63
|
-
name: "Security Equipment Request",
|
|
64
|
-
authorId: "fc4ca5c6-f46d-424f-a948-d66b031a82c3",
|
|
65
|
-
collectId: "2142bd9f3306c9ec3c823f63bbbbb8fe3ebad7fa",
|
|
66
|
-
country: "CD",
|
|
67
|
-
date: "2025-08-11",
|
|
68
|
-
typeOfEvent: "testimonials",
|
|
69
|
-
implementers: [],
|
|
70
|
-
typeOfTestimonials: "request",
|
|
71
|
-
associatedSubjects: [],
|
|
72
|
-
testimonialsSource: [],
|
|
73
|
-
pictures: [],
|
|
74
|
-
documents: [],
|
|
75
|
-
channels: [],
|
|
76
|
-
published: true,
|
|
77
|
-
version: 1,
|
|
78
|
-
identifiedPerpetrators: [],
|
|
79
|
-
identifiedVictims: [],
|
|
80
|
-
assistedVictims: [],
|
|
81
|
-
mitigationMeasures: [],
|
|
82
|
-
createdAt: "2025-08-27T00:00:00.000Z",
|
|
83
|
-
updatedAt: "2025-08-27T15:10:00.619Z",
|
|
84
|
-
__v: 0,
|
|
85
|
-
percentageCompletion: 50,
|
|
86
|
-
meta: null,
|
|
87
|
-
namespace: "testimonials",
|
|
88
|
-
sources: ["fc4ca5c6-f46d-424f-a948-d66b031a82c3"],
|
|
89
|
-
type: "correctiveActions",
|
|
90
|
-
description: "A request for additional security equipment to improve safety measures at the mining site.",
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
_id: "68af5d45b52f86d82f580fc8",
|
|
94
|
-
createdBy: "fc4ca5c6-f46d-424f-a948-d66b031a82c3",
|
|
95
|
-
form: "event",
|
|
96
|
-
id: "97348b4c-f7cf-4124-9b70-0f6891a40a15",
|
|
97
|
-
datastakeId: "EV-000000000161",
|
|
98
|
-
name: "Major Safety Incident",
|
|
99
|
-
authorId: "fc4ca5c6-f46d-424f-a948-d66b031a82c3",
|
|
100
|
-
collectId: "33b9aea707761a7a735aee81ebd29d5656f049fa",
|
|
101
|
-
country: "CD",
|
|
102
|
-
date: "2025-08-11",
|
|
103
|
-
typeOfEvent: "incident",
|
|
104
|
-
implementers: [],
|
|
105
|
-
associatedSubjects: [],
|
|
106
|
-
testimonialsSource: [],
|
|
107
|
-
pictures: [],
|
|
108
|
-
documents: [],
|
|
109
|
-
channels: [],
|
|
110
|
-
published: false,
|
|
111
|
-
version: 1,
|
|
112
|
-
identifiedPerpetrators: [],
|
|
113
|
-
identifiedVictims: [],
|
|
114
|
-
assistedVictims: [],
|
|
115
|
-
mitigationMeasures: [],
|
|
116
|
-
createdAt: "2025-08-27T00:00:00.000Z",
|
|
117
|
-
updatedAt: "2025-08-27T00:00:00.000Z",
|
|
118
|
-
__v: 0,
|
|
119
|
-
percentageCompletion: 40,
|
|
120
|
-
eventCategory: null,
|
|
121
|
-
initiative: null,
|
|
122
|
-
meta: null,
|
|
123
|
-
namespace: "incident",
|
|
124
|
-
primarySource: null,
|
|
125
|
-
severity: "major",
|
|
126
|
-
sources: ["fc4ca5c6-f46d-424f-a948-d66b031a82c3"],
|
|
127
|
-
type: "major_incident",
|
|
128
|
-
description: "A major safety incident that required immediate attention and investigation. This event is currently under review.",
|
|
129
|
-
},
|
|
130
|
-
],
|
|
131
|
-
type: "Mine site",
|
|
132
|
-
total: 5,
|
|
133
|
-
sources: 2,
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
gps: {
|
|
137
|
-
latitude: -2.3456789,
|
|
138
|
-
longitude: 29.1234567,
|
|
139
|
-
},
|
|
140
|
-
name: "Kivu Processing Plant",
|
|
141
|
-
datastakeId: "LOC-00000000242",
|
|
142
|
-
description: "A mineral processing facility that handles various types of minerals extracted from nearby mining sites.",
|
|
143
|
-
data: [
|
|
144
|
-
{
|
|
145
|
-
_id: "68af116e2cb57a4e3dd2e057",
|
|
146
|
-
createdBy: "4274fdb4-2798-46ea-a0a6-b4af5d92566e",
|
|
147
|
-
form: "event",
|
|
148
|
-
id: "91c3176a-d312-4259-9ddf-9d286ff6df88",
|
|
149
|
-
datastakeId: "EV-000000000151",
|
|
150
|
-
name: "Processing Efficiency Improvement",
|
|
151
|
-
authorId: "7e17f076-09e7-4668-927c-11c12ccd1346",
|
|
152
|
-
collectId: "d78271301d04f76dfe0f70ce3c9e114ffe4dc4e0",
|
|
153
|
-
country: "CD",
|
|
154
|
-
date: "2025-08-20",
|
|
155
|
-
typeOfEvent: "initiative",
|
|
156
|
-
implementers: [],
|
|
157
|
-
associatedSubjects: [],
|
|
158
|
-
testimonialsSource: [],
|
|
159
|
-
pictures: [],
|
|
160
|
-
documents: [],
|
|
161
|
-
channels: ["NAS-00000000106"],
|
|
162
|
-
published: true,
|
|
163
|
-
version: 1,
|
|
164
|
-
identifiedPerpetrators: [],
|
|
165
|
-
identifiedVictims: [],
|
|
166
|
-
assistedVictims: [],
|
|
167
|
-
mitigationMeasures: [],
|
|
168
|
-
createdAt: "2025-08-20T00:00:00.000Z",
|
|
169
|
-
updatedAt: "2025-08-20T14:12:21.395Z",
|
|
170
|
-
__v: 0,
|
|
171
|
-
percentageCompletion: 75,
|
|
172
|
-
eventCategory: "improvement",
|
|
173
|
-
incindentType: null,
|
|
174
|
-
initiative: "efficiency",
|
|
175
|
-
meta: null,
|
|
176
|
-
namespace: "initiative",
|
|
177
|
-
primarySource: null,
|
|
178
|
-
severity: "low",
|
|
179
|
-
sources: ["7e17f076-09e7-4668-927c-11c12ccd1346"],
|
|
180
|
-
type: "improvement_initiative",
|
|
181
|
-
description: "An initiative to improve processing efficiency through new technology implementation.",
|
|
182
|
-
},
|
|
183
|
-
],
|
|
184
|
-
type: "Processing Plant",
|
|
185
|
-
total: 1,
|
|
186
|
-
sources: 1,
|
|
187
|
-
},
|
|
188
|
-
],
|
|
189
|
-
filtersConfig: [
|
|
190
|
-
{
|
|
191
|
-
label: "Event Type",
|
|
192
|
-
placeholder: "Select",
|
|
193
|
-
key: "type",
|
|
194
|
-
type: "select",
|
|
195
|
-
value: "A",
|
|
196
|
-
options: [
|
|
197
|
-
{ label: "All Events", value: "A" },
|
|
198
|
-
{ label: "Incidents", value: "incident" },
|
|
199
|
-
{ label: "Initiatives", value: "initiative" },
|
|
200
|
-
{ label: "Testimonials", value: "testimonials" },
|
|
201
|
-
],
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
label: "Severity",
|
|
205
|
-
placeholder: "Select",
|
|
206
|
-
key: "severity",
|
|
207
|
-
type: "select",
|
|
208
|
-
value: undefined,
|
|
209
|
-
options: [
|
|
210
|
-
{ label: "All", value: "all" },
|
|
211
|
-
{ label: "Low", value: "low" },
|
|
212
|
-
{ label: "Moderate", value: "moderate" },
|
|
213
|
-
{ label: "Major", value: "major" },
|
|
214
|
-
],
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
type: "slider",
|
|
218
|
-
label: "Completion Percentage",
|
|
219
|
-
key: "completion",
|
|
220
|
-
},
|
|
221
|
-
],
|
|
222
|
-
onFilterChange: (v) => {
|
|
223
|
-
console.log(v);
|
|
224
|
-
},
|
|
225
|
-
// tooltipAsText: true,
|
|
226
|
-
primaryLink: true,
|
|
227
|
-
renderSider: () =>
|
|
228
|
-
isMineSite ? (
|
|
229
|
-
<div className="body-list">
|
|
230
|
-
<div className="body-row">
|
|
231
|
-
<span className="label">Event Type</span>
|
|
232
|
-
<span>Mixed</span>
|
|
233
|
-
</div>
|
|
234
|
-
|
|
235
|
-
<div className="body-row">
|
|
236
|
-
<span className="label">Total Events</span>
|
|
237
|
-
<span>4</span>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
<div className="body-row">
|
|
241
|
-
<span className="label">Severity</span>
|
|
242
|
-
<span>Mixed</span>
|
|
243
|
-
</div>
|
|
244
|
-
</div>
|
|
245
|
-
) : (
|
|
246
|
-
<div className="daf-table-wrapper extra-small">
|
|
247
|
-
<DAFTable
|
|
248
|
-
loading={false}
|
|
249
|
-
scroll={{ y: 300 }}
|
|
250
|
-
className="no-padding no-margin"
|
|
251
|
-
data={[
|
|
252
|
-
{ event: "Mining Collapse", type: "Incident", severity: "Moderate", key: 0 },
|
|
253
|
-
{ event: "Security Request", type: "Testimonial", severity: "Low", key: 1 },
|
|
254
|
-
{ event: "Safety Incident", type: "Incident", severity: "Major", key: 2 },
|
|
255
|
-
{ event: "Efficiency Improvement", type: "Initiative", severity: "Low", key: 3 },
|
|
256
|
-
]}
|
|
257
|
-
pagination={false}
|
|
258
|
-
columns={[
|
|
259
|
-
{
|
|
260
|
-
title: "Event",
|
|
261
|
-
dataIndex: "event",
|
|
262
|
-
key: "event",
|
|
263
|
-
ellipsis: true,
|
|
264
|
-
width: 120,
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
title: "Type",
|
|
268
|
-
dataIndex: "type",
|
|
269
|
-
key: "type",
|
|
270
|
-
width: 80,
|
|
271
|
-
render: (_, all) => {
|
|
272
|
-
return (
|
|
273
|
-
<MoreTags values={[{ label: all.type }]} maxTextCont={40} />
|
|
274
|
-
);
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
title: "Severity",
|
|
279
|
-
dataIndex: "severity",
|
|
280
|
-
key: "severity",
|
|
281
|
-
width: 80,
|
|
282
|
-
render: (_, all) => {
|
|
283
|
-
return (
|
|
284
|
-
<MoreTags values={[{ label: all.severity }]} maxTextCont={40} />
|
|
285
|
-
);
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
title: "",
|
|
290
|
-
dataIndex: "action",
|
|
291
|
-
key: "action",
|
|
292
|
-
width: 34,
|
|
293
|
-
render: (_, all) => {
|
|
294
|
-
return <CustomIcon name="LinkNewTab" width={12} height={12} />;
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
]}
|
|
298
|
-
rowKey="key"
|
|
299
|
-
/>
|
|
300
|
-
</div>
|
|
301
|
-
),
|
|
302
|
-
renderTooltip: (data) => {
|
|
303
|
-
const correctiveActionsCount = data?.data?.filter(
|
|
304
|
-
(d) => d.type === "correctiveActions",
|
|
305
|
-
).length;
|
|
306
|
-
|
|
307
|
-
const majorIncidents = data?.data?.filter(
|
|
308
|
-
(d) => d.type === "major_incident",
|
|
309
|
-
).length;
|
|
310
|
-
|
|
311
|
-
const minorIncidents = data?.data?.filter(
|
|
312
|
-
(d) => d.type === "minor_incident",
|
|
313
|
-
).length;
|
|
314
|
-
|
|
315
|
-
const moderateIncidents = data?.data?.filter(
|
|
316
|
-
(d) => d.type === "moderate_incident",
|
|
317
|
-
).length;
|
|
318
|
-
|
|
319
|
-
return [
|
|
320
|
-
{
|
|
321
|
-
label: "Major Incidents",
|
|
322
|
-
color: "#F04438",
|
|
323
|
-
value: majorIncidents || 0,
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
label: "Moderate Incidents",
|
|
327
|
-
color: "#FF7A45",
|
|
328
|
-
value: moderateIncidents || 0,
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
label: "Minor Incidents",
|
|
332
|
-
color: "#FFC069",
|
|
333
|
-
value: minorIncidents || 0,
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
label: "Corrective Actions",
|
|
337
|
-
color: "#12b76a",
|
|
338
|
-
value: correctiveActionsCount || 0,
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
label: "Total Events",
|
|
342
|
-
value: data?.total || 0,
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
label: "Sources",
|
|
346
|
-
value: data?.sources || 0,
|
|
347
|
-
},
|
|
348
|
-
];
|
|
349
|
-
},
|
|
350
|
-
link: true,
|
|
351
|
-
onClickLink: (data) => {
|
|
352
|
-
console.log(data);
|
|
353
|
-
},
|
|
354
|
-
};
|