datastake-daf 0.6.252 → 0.6.254

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/.env ADDED
@@ -0,0 +1,8 @@
1
+ REACT_APP_API_KEY=
2
+ REACT_APP_AUTH_DOMAIN=
3
+ REACT_APP_PROJECT_ID=
4
+ REACT_APP_STORAGE_BUCKED=
5
+ REACT_APP_SENDER_ID=
6
+ REACT_APP_APP_ID=
7
+ REACT_APP_MEASUREMENT_ID=
8
+ REACT_APP_VAPID_KEY=
@@ -0,0 +1,13 @@
1
+ {
2
+ "cSpell.words": ["cukura"],
3
+ "files.autoSave": "afterDelay",
4
+ "editor.wordWrap": "on",
5
+ "editor.autoClosingBrackets": "always",
6
+ "editor.autoClosingComments": "always",
7
+ "editor.autoClosingQuotes": "always",
8
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
9
+ "editor.formatOnPaste": true,
10
+ "editor.formatOnSave": true,
11
+ "notebook.defaultFormatter": "esbenp.prettier-vscode",
12
+ "javascript.format.semicolons": "insert"
13
+ }
@@ -18408,7 +18408,7 @@ const useMap$1 = ({
18408
18408
  const pos = allData.map(m => Array.isArray(m.area) ? m.area : [Number(m.marker?.lat ?? 0), Number(m.marker?.lng ?? 0)]);
18409
18409
  const bounds = new L__namespace.LatLngBounds(pos);
18410
18410
  mapRef.fitBounds(bounds, {
18411
- padding: [10, 10]
18411
+ padding: [20, 20]
18412
18412
  });
18413
18413
  }
18414
18414
  }
@@ -19699,39 +19699,6 @@ const useGlobe = ({
19699
19699
  }));
19700
19700
  roots.current.push(root);
19701
19701
  }
19702
- } else if (type === "project") {
19703
- // Handle project markers
19704
- const el = document.createElement('div');
19705
- el.className = 'mapboxgl-marker project-marker';
19706
- el.style.width = '30px';
19707
- el.style.height = '30px';
19708
- el.style.backgroundColor = '#52c41a'; // Green color for projects
19709
- el.style.borderRadius = '50%';
19710
- el.style.border = '3px solid white';
19711
- el.style.cursor = 'pointer';
19712
- el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
19713
- el.style.display = 'flex';
19714
- el.style.alignItems = 'center';
19715
- el.style.justifyContent = 'center';
19716
- el.style.color = 'white';
19717
- el.style.fontWeight = 'bold';
19718
- el.style.fontSize = '12px';
19719
-
19720
- // Add project icon (you can customize this)
19721
- el.innerHTML = '📋';
19722
- const div = document.createElement("div");
19723
- const root = client.createRoot(div);
19724
- root.render( /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
19725
- children: renderTooltipJsx({
19726
- title: d.name,
19727
- items: renderTooltip(d),
19728
- link,
19729
- total: d.sources,
19730
- onClickLink: () => onClickLink(d)
19731
- })
19732
- }));
19733
- roots.current.push(root);
19734
- marker = new mapboxgl.Marker(el).setLngLat([d.marker.lng, d.marker.lat]).setPopup(new mapboxgl.Popup().setDOMContent(div)).addTo(mapRef);
19735
19702
  } else {
19736
19703
  // Default marker for other types
19737
19704
  const el = document.createElement('div');
@@ -21125,7 +21092,7 @@ function SdgList({
21125
21092
  }) {
21126
21093
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
21127
21094
  children: [/*#__PURE__*/jsxRuntime.jsx(Label, {
21128
- children: "SDGs:"
21095
+ children: "SDGs"
21129
21096
  }), /*#__PURE__*/jsxRuntime.jsx(SDGIcons, {
21130
21097
  sdgList: sdgList,
21131
21098
  t: t
@@ -21208,7 +21175,8 @@ function ProjectWidget(_ref) {
21208
21175
  }), !hideSDGList && /*#__PURE__*/jsxRuntime.jsx("div", {
21209
21176
  style: {
21210
21177
  borderTop: "1px solid var(--base-gray-30)",
21211
- paddingTop: "10px"
21178
+ paddingTop: "10px",
21179
+ minHeight: "61px"
21212
21180
  },
21213
21181
  children: /*#__PURE__*/jsxRuntime.jsx(SdgList, {
21214
21182
  sdgList: sdgList,
@@ -3835,7 +3835,7 @@ function showHideForm(form, formsValue) {
3835
3835
 
3836
3836
  /* eslint-disable no-constant-condition */
3837
3837
  const getNkey = namespace => {
3838
- if (['location', 'scl', 'village', 'event', 'incidents', 'corrective-actions', 'testimonials', 'initiatives', 'victims', 'pictures', 'documents', 'lir', 'sp', 'im', 'sci', 'bpe', 'gm', 'project-readiness'].includes(namespace)) {
3838
+ if (['location', 'scl', 'village', 'event', 'incidents', 'corrective-actions', 'testimonials', 'initiatives', 'victims', 'pictures', 'documents', 'lir', 'sp', 'im', 'sci', 'bpe', 'gm'].includes(namespace)) {
3839
3839
  return 'scoping';
3840
3840
  }
3841
3841
  return namespace;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datastake-daf",
3
- "version": "0.6.252",
3
+ "version": "0.6.254",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.2.5",
6
6
  "@antv/g2": "^5.1.1",
@@ -64,11 +64,3 @@ export const LocationGlobe = {
64
64
  type: "location",
65
65
  },
66
66
  };
67
-
68
- export const ProjectGlobe = {
69
- name: "Project Globe",
70
- args: {
71
- ...configs.ProjectConfig,
72
- type: "project",
73
- },
74
- };
@@ -264,48 +264,6 @@ export const useGlobe = ({
264
264
 
265
265
  roots.current.push(root);
266
266
  }
267
- } else if (type === "project") {
268
- // Handle project markers
269
- const el = document.createElement('div');
270
- el.className = 'mapboxgl-marker project-marker';
271
- el.style.width = '30px';
272
- el.style.height = '30px';
273
- el.style.backgroundColor = '#52c41a'; // Green color for projects
274
- el.style.borderRadius = '50%';
275
- el.style.border = '3px solid white';
276
- el.style.cursor = 'pointer';
277
- el.style.boxShadow = '0px 3.45px 3.45px 0px #00000029';
278
- el.style.display = 'flex';
279
- el.style.alignItems = 'center';
280
- el.style.justifyContent = 'center';
281
- el.style.color = 'white';
282
- el.style.fontWeight = 'bold';
283
- el.style.fontSize = '12px';
284
-
285
- // Add project icon (you can customize this)
286
- el.innerHTML = '📋';
287
-
288
- const div = document.createElement("div");
289
- const root = createRoot(div);
290
-
291
- root.render(
292
- <>
293
- {renderTooltipJsx({
294
- title: d.name,
295
- items: renderTooltip(d),
296
- link,
297
- total: d.sources,
298
- onClickLink: () => onClickLink(d),
299
- })}
300
- </>,
301
- );
302
-
303
- roots.current.push(root);
304
-
305
- marker = new mapboxgl.Marker(el)
306
- .setLngLat([d.marker.lng, d.marker.lat])
307
- .setPopup(new mapboxgl.Popup().setDOMContent(div))
308
- .addTo(mapRef);
309
267
  } else {
310
268
  // Default marker for other types
311
269
  const el = document.createElement('div');
@@ -306,7 +306,7 @@ export const useMap = ({
306
306
  : [Number(m.marker?.lat ?? 0), Number(m.marker?.lng ?? 0)],
307
307
  );
308
308
  const bounds = new L.LatLngBounds(pos);
309
- mapRef.fitBounds(bounds, { padding: [10, 10] });
309
+ mapRef.fitBounds(bounds, { padding: [20, 20] });
310
310
  }
311
311
  }
312
312
  }, [allData, mapRef]);
@@ -3,6 +3,5 @@ import { storyConfig as DefaultMapConfig } from "./storyConfig2.js";
3
3
  import { storyConfig as TerritoryMapConfig } from "./storyConfig3.js";
4
4
  import { storyConfig as StakeholderMapConfig } from "./storyConfig4.js";
5
5
  import { storyConfig as ChainMapConfig } from "./storyConfig5.js";
6
- import { storyConfig as ProjectConfig } from "./storyConfig6.js";
7
6
 
8
- export { DefaultMapConfig, TerritoryMapConfig, StakeholderMapConfig, EventConfig, ChainMapConfig, ProjectConfig };
7
+ export { DefaultMapConfig, TerritoryMapConfig, StakeholderMapConfig, EventConfig, ChainMapConfig };
@@ -1,10 +1,10 @@
1
1
  import { Label } from "../style";
2
2
  import SDGIcons from "../../../../UI/SDGIcon/index.jsx";
3
3
  export default function SdgList({ sdgList = [], t }) {
4
- return (
5
- <>
6
- <Label>SDGs:</Label>
7
- <SDGIcons sdgList={sdgList} t={t} />
8
- </>
9
- );
4
+ return (
5
+ <>
6
+ <Label>SDGs</Label>
7
+ <SDGIcons sdgList={sdgList} t={t} />
8
+ </>
9
+ );
10
10
  }
@@ -83,6 +83,7 @@ export default function ProjectWidget({
83
83
  style={{
84
84
  borderTop: "1px solid var(--base-gray-30)",
85
85
  paddingTop: "10px",
86
+ minHeight: "61px",
86
87
  }}
87
88
  >
88
89
  <SdgList sdgList={sdgList} t={t} />
@@ -1,3 +1,3 @@
1
- import { getApiBaseUrl, getAppHeader, storyData } from "./storyConfig2";
1
+ import { getApiBaseUrl, getAppHeader, storyData } from "./storyConfig3";
2
2
 
3
3
  export { getApiBaseUrl, getAppHeader, storyData };
@@ -1,256 +1,251 @@
1
1
  export const getApiBaseUrl = () => "http://192.168.4.65:4020";
2
2
 
3
3
  export const getAppHeader = () => ({
4
- Application: "sbg",
5
- Language: "en",
4
+ Application: "sbg",
5
+ Language: "en",
6
6
  });
7
7
 
8
8
  export const storyData = {
9
- getApiBaseUrl,
10
- getAppHeader,
11
- form: {
12
- id: "financialManagement",
13
- description: "",
14
- icon: "",
15
- position: 0,
16
- show: true,
17
- options: {
18
- "id": "identification",
19
- "position": 1,
20
-
21
- "sectoralScope": {
22
- "_id": "68caccdb5a424c6d3b2492be",
23
- "id": "675385c3-69ea-49ee-920e-b0de30af48ba",
24
- "dataId": "sectoralScope",
25
- "section": "identification",
26
- "type": "select",
27
- "meta": {
28
- "comment": false,
29
- "notApplicable": false,
30
- "notAvailable": false,
31
- "mandatory": true,
32
- "store": {
33
- "stakeholder": {
34
- "global": true,
35
- "path": "category"
36
- }
37
- }
38
- },
39
- "position": 3,
40
- "rules": [
41
- {
42
- "required": true,
43
- "message": "errors::field is required"
44
- }
45
- ],
46
- "scope": [
47
- "modalStraatos",
48
- "straatosProject",
49
- "projectDetails",
50
- "project"
51
- ],
52
- "label": "Sectoral Scope",
53
- "options": [
54
- {
55
- "label": "Agriculture, Forestry and Other Land Use (AFOLU)",
56
- "value": "agricultureForestryAndOtherLandUse"
57
- },
58
- {
59
- "label": "Energy (renewable/non-renewable)",
60
- "value": "energy",
61
- "disabled": true
62
- },
63
- {
64
- "label": "Energy distribution",
65
- "value": "energyDistribution",
66
- "disabled": true
67
- },
68
- {
69
- "label": "Energy demand",
70
- "value": "energyDemand",
71
- "disabled": true
72
- },
73
- {
74
- "label": "Manufacturing industries",
75
- "value": "manufacturingIndustries",
76
- "disabled": true
77
- },
78
- {
79
- "label": "Chemical industry",
80
- "value": "chemicalIndustry",
81
- "disabled": true
82
- },
83
- {
84
- "label": "Construction",
85
- "value": "construction",
86
- "disabled": true
87
- },
88
- {
89
- "label": "Transport",
90
- "value": "transport",
91
- "disabled": true
92
- },
93
- {
94
- "label": "Mining/mineral production",
95
- "value": "miningMineralProduction",
96
- "disabled": true
97
- },
98
- {
99
- "label": "Metal production",
100
- "value": "metalProduction",
101
- "disabled": true
102
- },
103
- {
104
- "label": "Fugitive emissions from fuels (solid, oil, and gas)",
105
- "value": "fugitiveEmissionsFromFuels",
106
- "disabled": true
107
- },
108
- {
109
- "label": "Fugitive emissions from industrial gases (halocarbons and sulphur hexafluoride)",
110
- "value": "fugitiveEmissionsFromIndustrialGases",
111
- "disabled": true
112
- },
113
- {
114
- "label": "Solvent use",
115
- "value": "solventUse",
116
- "disabled": true
117
- },
118
- {
119
- "label": "Waste handling and disposal",
120
- "value": "wasteHandlingAndDisposal",
121
- "disabled": true
122
- },
123
- {
124
- "label": "Livestock and manure management",
125
- "value": "livestockAndManureManagement",
126
- "disabled": true
127
- },
128
- {
129
- "label": "Carbon capture and storage",
130
- "value": "carbonCaptureAndStorage",
131
- "disabled": true
132
- }
133
- ],
134
- "createdAt": "2025-09-17T14:59:42.118Z",
135
- "updatedAt": "2025-09-17T14:59:42.118Z",
136
- "__v": 0
137
- },
138
-
139
- "label": "Identification",
140
- "subTitle": "Identification"
141
- },
142
- },
143
- data: {
144
- location: [
145
- {
146
- _id: "689f1086cd1642955475a45e",
147
- form: "location",
148
- id: "f276986a-5b41-45bf-b02b-61e79c42cf50",
149
- parent: {
150
- _id: "689f1086cd1642955475a462",
151
- createdAt: "2025-08-15T10:48:38.719Z",
152
- updatedAt: "2025-08-15T10:48:38.719Z",
153
- id: "e006842b-b9bb-431f-b9b9-184e82e324b4",
154
- name: "test 999444444",
155
- authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
156
- collectId: "93ed3cfd5abf671367ca3116d8bdcb429ca55d16",
157
- country: "AX",
158
- category: "plot",
159
- datastakeId: "LOC-00000000295",
160
- __v: 0,
161
- },
162
- perimeter: [
163
- [58.313817167753996, 18.413085937500004],
164
- [59.2700913303328, 17.270507812500004],
165
- [59.18015006492145, 16.479492187500004],
166
- ],
167
- name: "test 999444444",
168
- country: "AX",
169
- category: "plot",
170
- authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
171
- published: false,
172
- version: 1,
173
- datastakeId: "LOC-00000000295",
174
- pictures: [],
175
- documents: [],
176
- associatedSubjects: [
177
- {
178
- entity: "PlantingCycle",
179
- _id: {},
180
- nature: "location",
181
- },
182
- {
183
- entity: "PlantingCycle",
184
- _id: {},
185
- nature: "location",
186
- },
187
- {
188
- entity: "PlantingCycle",
189
- _id: {},
190
- nature: "location",
191
- },
192
- ],
193
- createdAt: "2025-08-15",
194
- updatedAt: "2025-08-15",
195
- __v: 0,
196
- label: "test 999444444",
197
- value: "689f1086cd1642955475a45e",
198
- },
199
- {
200
- _id: "689f1135cd1642955475a594",
201
- form: "location",
202
- id: "d60984d5-e79a-474f-8c6d-b9d4256f0357",
203
- parent: {
204
- _id: "689f1135cd1642955475a59b",
205
- createdAt: "2025-08-15T10:51:33.758Z",
206
- updatedAt: "2025-08-15T10:51:33.758Z",
207
- id: "818f4b75-2212-47e4-b07e-52a7e6454568",
208
- name: "edd",
209
- authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
210
- collectId: "79af2232d97ef4ae6b435b1d22997a978b5e2f47",
211
- country: "AX",
212
- administrativeLevel1: null,
213
- administrativeLevel2: null,
214
- category: "plot",
215
- datastakeId: "LOC-00000000296",
216
- __v: 0,
217
- },
218
- perimeter: [
219
- [59.98229931379975, 17.228966156671063],
220
- [59.98229931379975, 17.565517949147456],
221
- [59.77480258556264, 17.53667065264947],
222
- ],
223
- administrativeLevel1: null,
224
- administrativeLevel2: null,
225
- name: "edd",
226
- country: "AX",
227
- category: "plot",
228
- authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
229
- gps: null,
230
- published: false,
231
- version: 1,
232
- datastakeId: "LOC-00000000296",
233
- pictures: [],
234
- documents: [],
235
- associatedSubjects: [
236
- {
237
- entity: "Event",
238
- _id: {},
239
- nature: "location",
240
- },
241
- {
242
- entity: "PlantingCycle",
243
- _id: {},
244
- nature: "location",
245
- },
246
- ],
247
- projectId: "PRJ-00000000107",
248
- createdAt: "2025-08-15T10:51:33.758Z",
249
- updatedAt: "2025-08-15T10:51:33.758Z",
250
- __v: 0,
251
- label: "edd",
252
- value: "689f1135cd1642955475a594",
253
- },
254
- ],
255
- },
9
+ getApiBaseUrl,
10
+ getAppHeader,
11
+ form: {
12
+ id: "financialManagement",
13
+ description: "",
14
+ icon: "",
15
+ position: 0,
16
+ show: true,
17
+ options: {
18
+ id: "identification",
19
+ position: 1,
20
+
21
+ sectoralScope: {
22
+ _id: "68caccdb5a424c6d3b2492be",
23
+ id: "675385c3-69ea-49ee-920e-b0de30af48ba",
24
+ dataId: "sectoralScope",
25
+ section: "identification",
26
+ type: "select",
27
+ meta: {
28
+ comment: false,
29
+ notApplicable: false,
30
+ notAvailable: false,
31
+ mandatory: true,
32
+ store: {
33
+ stakeholder: {
34
+ global: true,
35
+ path: "category",
36
+ },
37
+ },
38
+ },
39
+ position: 3,
40
+ rules: [
41
+ {
42
+ required: true,
43
+ message: "errors::field is required",
44
+ },
45
+ ],
46
+ scope: ["modalStraatos", "straatosProject", "projectDetails", "project"],
47
+ label: "Sectoral Scope",
48
+ options: [
49
+ {
50
+ label: "Agriculture, Forestry and Other Land Use (AFOLU)",
51
+ value: "agricultureForestryAndOtherLandUse",
52
+ },
53
+ {
54
+ label: "Energy (renewable/non-renewable)",
55
+ value: "energy",
56
+ disabled: true,
57
+ },
58
+ {
59
+ label: "Energy distribution",
60
+ value: "energyDistribution",
61
+ disabled: true,
62
+ },
63
+ {
64
+ label: "Energy demand",
65
+ value: "energyDemand",
66
+ disabled: true,
67
+ },
68
+ {
69
+ label: "Manufacturing industries",
70
+ value: "manufacturingIndustries",
71
+ disabled: true,
72
+ },
73
+ {
74
+ label: "Chemical industry",
75
+ value: "chemicalIndustry",
76
+ disabled: true,
77
+ },
78
+ {
79
+ label: "Construction",
80
+ value: "construction",
81
+ disabled: true,
82
+ },
83
+ {
84
+ label: "Transport",
85
+ value: "transport",
86
+ disabled: true,
87
+ },
88
+ {
89
+ label: "Mining/mineral production",
90
+ value: "miningMineralProduction",
91
+ disabled: true,
92
+ },
93
+ {
94
+ label: "Metal production",
95
+ value: "metalProduction",
96
+ disabled: true,
97
+ },
98
+ {
99
+ label: "Fugitive emissions from fuels (solid, oil, and gas)",
100
+ value: "fugitiveEmissionsFromFuels",
101
+ disabled: true,
102
+ },
103
+ {
104
+ label: "Fugitive emissions from industrial gases (halocarbons and sulphur hexafluoride)",
105
+ value: "fugitiveEmissionsFromIndustrialGases",
106
+ disabled: true,
107
+ },
108
+ {
109
+ label: "Solvent use",
110
+ value: "solventUse",
111
+ disabled: true,
112
+ },
113
+ {
114
+ label: "Waste handling and disposal",
115
+ value: "wasteHandlingAndDisposal",
116
+ disabled: true,
117
+ },
118
+ {
119
+ label: "Livestock and manure management",
120
+ value: "livestockAndManureManagement",
121
+ disabled: true,
122
+ },
123
+ {
124
+ label: "Carbon capture and storage",
125
+ value: "carbonCaptureAndStorage",
126
+ disabled: true,
127
+ },
128
+ ],
129
+ createdAt: "2025-09-17T14:59:42.118Z",
130
+ updatedAt: "2025-09-17T14:59:42.118Z",
131
+ __v: 0,
132
+ },
133
+
134
+ label: "Identification",
135
+ subTitle: "Identification",
136
+ },
137
+ },
138
+ data: {
139
+ location: [
140
+ {
141
+ _id: "689f1086cd1642955475a45e",
142
+ form: "location",
143
+ id: "f276986a-5b41-45bf-b02b-61e79c42cf50",
144
+ parent: {
145
+ _id: "689f1086cd1642955475a462",
146
+ createdAt: "2025-08-15T10:48:38.719Z",
147
+ updatedAt: "2025-08-15T10:48:38.719Z",
148
+ id: "e006842b-b9bb-431f-b9b9-184e82e324b4",
149
+ name: "test 999444444",
150
+ authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
151
+ collectId: "93ed3cfd5abf671367ca3116d8bdcb429ca55d16",
152
+ country: "AX",
153
+ category: "plot",
154
+ datastakeId: "LOC-00000000295",
155
+ __v: 0,
156
+ },
157
+ perimeter: [
158
+ [58.313817167753996, 18.413085937500004],
159
+ [59.2700913303328, 17.270507812500004],
160
+ [59.18015006492145, 16.479492187500004],
161
+ ],
162
+ name: "test 999444444",
163
+ country: "AX",
164
+ category: "plot",
165
+ authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
166
+ published: false,
167
+ version: 1,
168
+ datastakeId: "LOC-00000000295",
169
+ pictures: [],
170
+ documents: [],
171
+ associatedSubjects: [
172
+ {
173
+ entity: "PlantingCycle",
174
+ _id: {},
175
+ nature: "location",
176
+ },
177
+ {
178
+ entity: "PlantingCycle",
179
+ _id: {},
180
+ nature: "location",
181
+ },
182
+ {
183
+ entity: "PlantingCycle",
184
+ _id: {},
185
+ nature: "location",
186
+ },
187
+ ],
188
+ createdAt: "2025-08-15",
189
+ updatedAt: "2025-08-15",
190
+ __v: 0,
191
+ label: "test 999444444",
192
+ value: "689f1086cd1642955475a45e",
193
+ },
194
+ {
195
+ _id: "689f1135cd1642955475a594",
196
+ form: "location",
197
+ id: "d60984d5-e79a-474f-8c6d-b9d4256f0357",
198
+ parent: {
199
+ _id: "689f1135cd1642955475a59b",
200
+ createdAt: "2025-08-15T10:51:33.758Z",
201
+ updatedAt: "2025-08-15T10:51:33.758Z",
202
+ id: "818f4b75-2212-47e4-b07e-52a7e6454568",
203
+ name: "edd",
204
+ authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
205
+ collectId: "79af2232d97ef4ae6b435b1d22997a978b5e2f47",
206
+ country: "AX",
207
+ administrativeLevel1: null,
208
+ administrativeLevel2: null,
209
+ category: "plot",
210
+ datastakeId: "LOC-00000000296",
211
+ __v: 0,
212
+ },
213
+ perimeter: [
214
+ [59.98229931379975, 17.228966156671063],
215
+ [59.98229931379975, 17.565517949147456],
216
+ [59.77480258556264, 17.53667065264947],
217
+ ],
218
+ administrativeLevel1: null,
219
+ administrativeLevel2: null,
220
+ name: "edd",
221
+ country: "AX",
222
+ category: "plot",
223
+ authorId: "df5378ae-704a-4a46-93b2-336cc5341456",
224
+ gps: null,
225
+ published: false,
226
+ version: 1,
227
+ datastakeId: "LOC-00000000296",
228
+ pictures: [],
229
+ documents: [],
230
+ associatedSubjects: [
231
+ {
232
+ entity: "Event",
233
+ _id: {},
234
+ nature: "location",
235
+ },
236
+ {
237
+ entity: "PlantingCycle",
238
+ _id: {},
239
+ nature: "location",
240
+ },
241
+ ],
242
+ projectId: "PRJ-00000000107",
243
+ createdAt: "2025-08-15T10:51:33.758Z",
244
+ updatedAt: "2025-08-15T10:51:33.758Z",
245
+ __v: 0,
246
+ label: "edd",
247
+ value: "689f1135cd1642955475a594",
248
+ },
249
+ ],
250
+ },
256
251
  };
@@ -144,7 +144,7 @@ export const filterInputs = (form, data, repeatValues) => {
144
144
  }
145
145
 
146
146
  export const getNkey = (namespace) => {
147
- if (['location', 'scl', 'village', 'event', 'incidents', 'corrective-actions', 'testimonials', 'initiatives', 'victims', 'pictures', 'documents', 'lir', 'sp', 'im', 'sci', 'bpe', 'gm', 'project-readiness'].includes(namespace)) {
147
+ if (['location', 'scl', 'village', 'event', 'incidents', 'corrective-actions', 'testimonials', 'initiatives', 'victims', 'pictures', 'documents', 'lir', 'sp', 'im', 'sci', 'bpe', 'gm'].includes(namespace)) {
148
148
  return 'scoping';
149
149
  }
150
150
 
@@ -1,366 +0,0 @@
1
- import { findCoordinatesByCountry } from "../Globe/globeHelpers";
2
-
3
- // Transform project data to match Globe component expectations
4
- const transformProjectsToGlobeData = (projects) => {
5
- return projects.map(project => {
6
- // Get coordinates from country code
7
- const coordinates = findCoordinatesByCountry(project.country);
8
-
9
- return {
10
- ...project,
11
- marker: {
12
- lat: coordinates[0],
13
- lng: coordinates[1]
14
- },
15
- name: project.name || project.title,
16
- description: project.projectDescription || "No description available",
17
- total: 1, // Each project is a single marker
18
- sources: 1,
19
- type: "project",
20
- // Add project-specific data for tooltip
21
- projectData: {
22
- datastakeId: project.datastakeId,
23
- sectoralScope: project.sectoralScope,
24
- percentageCompletion: project.percentageCompletion,
25
- country: project.country,
26
- author: project.author?.name,
27
- createdAt: project.createdAt,
28
- mainImage: project.mainImage?.[0]?.url
29
- }
30
- };
31
- });
32
- };
33
-
34
- // Sample project data from the user
35
- const sampleProjects = [
36
- {
37
- "_id": "687a4d9a4cfa60f30db94c52",
38
- "createdAt": "2025-07-18T00:00:00.000Z",
39
- "updatedAt": "2025-07-18T00:00:00.000Z",
40
- "form": "straatosProject",
41
- "id": "3129457d-b787-4955-ba25-04d67fecfaaa",
42
- "name": "ABC Mangrove Senegal",
43
- "country": "SN",
44
- "datastakeId": "PRJ-00000000103",
45
- "title": "ABC Mangrove Senegal",
46
- "sectoralScope": "agricultureForestryAndOtherLandUse",
47
- "sdgs": [],
48
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
49
- "percentageCompletion": 11.76470588235294,
50
- "projectDescription": "ABC Mangrove Senegal is an environmental and community-focused initiative dedicated to the restoration, preservation, and sustainable management of mangrove ecosystems in Senegal.",
51
- "mainImage": [
52
- {
53
- "url": "https://cdn.straatos.io/dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09601/auth-bg_cropped-1754901830065.png",
54
- "path": "dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09601/auth-bg_cropped-1754901830065.png",
55
- "name": "auth-bg_cropped-1754901830065.png",
56
- "size": 1693409,
57
- "type": "image/png"
58
- }
59
- ],
60
- "author": {
61
- "name": "Geri SHPK",
62
- "country": "AL",
63
- "category": "civilSociety",
64
- "subCategory": "internationalNGO"
65
- }
66
- },
67
- {
68
- "_id": "687a57e24cfa60f30db954ca",
69
- "createdAt": "2025-07-18T00:00:00.000Z",
70
- "updatedAt": "2025-07-18T00:00:00.000Z",
71
- "form": "project",
72
- "id": "10e09c02-1986-4eb5-9069-355bffdfb93d",
73
- "name": "Testing",
74
- "country": "SN",
75
- "datastakeId": "PRJ-00000000104",
76
- "title": "Testing",
77
- "sectoralScope": "agricultureForestryAndOtherLandUse",
78
- "sdgs": [],
79
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
80
- "percentageCompletion": 28.57142857142857,
81
- "author": {
82
- "name": "Geri SHPK",
83
- "country": "AL",
84
- "category": "civilSociety",
85
- "subCategory": "internationalNGO"
86
- }
87
- },
88
- {
89
- "_id": "687e619d4cfa60f30db967ea",
90
- "createdAt": "2025-07-21T15:49:49.431Z",
91
- "updatedAt": "2025-07-21T15:49:49.431Z",
92
- "form": "straatosProject",
93
- "id": "51440c46-2d42-452d-8ea1-614002589d4c",
94
- "name": "Pietra's Project",
95
- "country": "BR",
96
- "datastakeId": "PRJ-00000000105",
97
- "title": "Pietra's Project",
98
- "sectoralScope": "agricultureForestryAndOtherLandUse",
99
- "sdgs": [],
100
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
101
- "author": {
102
- "name": "Geri SHPK",
103
- "country": "AL",
104
- "category": "civilSociety",
105
- "subCategory": "internationalNGO"
106
- }
107
- },
108
- {
109
- "_id": "6883918729bcd5751e8dd579",
110
- "createdAt": "2025-07-25T14:15:35.305Z",
111
- "updatedAt": "2025-07-25T14:15:35.305Z",
112
- "form": "straatosProject",
113
- "id": "275acff8-c478-40a5-a23d-94968dca01d1",
114
- "name": "efwefwe",
115
- "country": "AX",
116
- "datastakeId": "PRJ-00000000106",
117
- "title": "efwefwe",
118
- "sectoralScope": "agricultureForestryAndOtherLandUse",
119
- "sdgs": [],
120
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
121
- "percentageCompletion": 100,
122
- "author": {
123
- "name": "Geri SHPK",
124
- "country": "AL",
125
- "category": "civilSociety",
126
- "subCategory": "internationalNGO"
127
- }
128
- },
129
- {
130
- "_id": "6883b50e29bcd5751e8dda3e",
131
- "createdAt": "2025-07-25T00:00:00.000Z",
132
- "updatedAt": "2025-07-25T00:00:00.000Z",
133
- "form": "project",
134
- "id": "3bac13f1-4ebc-4428-9230-af1dc6ab1ab9",
135
- "name": "Geri Test",
136
- "country": "AS",
137
- "datastakeId": "PRJ-00000000107",
138
- "title": "Geri Test",
139
- "sectoralScope": "agricultureForestryAndOtherLandUse",
140
- "sdgs": [],
141
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
142
- "percentageCompletion": 33.33333333333333,
143
- "projectDescription": "ABC Mangrove Senegal is an environmental and community-focused initiative dedicated to the restoration, preservation, and sustainable management of mangrove ecosystems in Senegal.",
144
- "mainImage": [
145
- {
146
- "url": "https://cdn.straatos.io/dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09600/screenshot-from-2024-11-11-09-29-22-1758200879648.png",
147
- "path": "dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09600/screenshot-from-2024-11-11-09-29-22-1758200879648.png",
148
- "name": "screenshot-from-2024-11-11-09-29-22-1758200879648.png",
149
- "size": 414991,
150
- "type": "image/png"
151
- }
152
- ],
153
- "author": {
154
- "name": "Geri SHPK",
155
- "country": "AL",
156
- "category": "civilSociety",
157
- "subCategory": "internationalNGO"
158
- }
159
- },
160
- {
161
- "_id": "688c66c62fb165d7a389fbf7",
162
- "createdAt": "2025-08-01T07:03:34.501Z",
163
- "updatedAt": "2025-08-01T07:03:34.501Z",
164
- "form": "straatosProject",
165
- "id": "39fd860e-412c-456f-9b70-a67d4dc82433",
166
- "name": "test 777",
167
- "country": "AL",
168
- "datastakeId": "PRJ-00000000109",
169
- "title": "test 777",
170
- "sectoralScope": "agricultureForestryAndOtherLandUse",
171
- "sdgs": [],
172
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
173
- "author": {
174
- "name": "Geri SHPK",
175
- "country": "AL",
176
- "category": "civilSociety",
177
- "subCategory": "internationalNGO"
178
- }
179
- },
180
- {
181
- "_id": "68927b8d3c4650496ed9003f",
182
- "createdAt": "2025-08-05T00:00:00.000Z",
183
- "updatedAt": "2025-08-05T00:00:00.000Z",
184
- "form": "straatosProject",
185
- "id": "468204d2-28d6-4097-a362-ad12d642bf4f",
186
- "name": "Current",
187
- "country": "AL",
188
- "datastakeId": "PRJ-00000000111",
189
- "title": "Current",
190
- "mainImage": [
191
- {
192
- "url": "https://cdn.straatos.io/dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09600/screenshot-from-2024-11-28-12-41-52-1754465225229.png",
193
- "path": "dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09600/screenshot-from-2024-11-28-12-41-52-1754465225229.png",
194
- "name": "screenshot-from-2024-11-28-12-41-52-1754465225229.png",
195
- "size": 92090,
196
- "type": "image/png"
197
- }
198
- ],
199
- "sectoralScope": "energy",
200
- "sdgs": [],
201
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
202
- "percentageCompletion": 17.647058823529413,
203
- "projectDescription": "testing testing testing",
204
- "author": {
205
- "name": "Geri SHPK",
206
- "country": "AL",
207
- "category": "civilSociety",
208
- "subCategory": "internationalNGO"
209
- }
210
- },
211
- {
212
- "_id": "68985abea7d389ab99d611e4",
213
- "createdAt": "2025-08-10T00:00:00.000Z",
214
- "updatedAt": "2025-08-10T00:00:00.000Z",
215
- "form": "project",
216
- "id": "c949c1a4-f83d-45fa-820f-0ee56bc023ba",
217
- "name": "project 1",
218
- "country": "AL",
219
- "datastakeId": "PRJ-00000000112",
220
- "title": "project 1",
221
- "mainImage": [
222
- {
223
- "url": "https://cdn.straatos.io/dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09601/abcmangrove_allcot-10-1756470770827.jpg",
224
- "path": "dev/company-df5378ae-704a-4a46-93b2-336cc5341456/user-e8d71443-339f-4b45-bbf5-22f0e5f09601/abcmangrove_allcot-10-1756470770827.jpg",
225
- "name": "abcmangrove_allcot-10-1756470770827.jpg",
226
- "size": 146120,
227
- "type": "image/jpeg"
228
- }
229
- ],
230
- "sectoralScope": "agricultureForestryAndOtherLandUse",
231
- "sdgs": [],
232
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
233
- "percentageCompletion": 25,
234
- "author": {
235
- "name": "Geri SHPK",
236
- "country": "AL",
237
- "category": "civilSociety",
238
- "subCategory": "internationalNGO"
239
- }
240
- },
241
- {
242
- "_id": "68c3e1817ce6a6d7d8c16250",
243
- "createdAt": "2025-09-12T00:00:00.000Z",
244
- "updatedAt": "2025-09-12T00:00:00.000Z",
245
- "form": "project",
246
- "id": "b7a6ce62-dda3-4ffd-8f5a-e9721e15fe9f",
247
- "name": "test fran",
248
- "country": "CL",
249
- "datastakeId": "PRJ-00000000113",
250
- "title": "test fran",
251
- "sectoralScope": "agricultureForestryAndOtherLandUse",
252
- "sdgs": [],
253
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
254
- "percentageCompletion": 25,
255
- "author": {
256
- "name": "Geri SHPK",
257
- "country": "AL",
258
- "category": "civilSociety",
259
- "subCategory": "internationalNGO"
260
- }
261
- },
262
- {
263
- "_id": "68cab88001892530c66c3079",
264
- "createdAt": "2025-09-17T13:32:48.646Z",
265
- "updatedAt": "2025-09-17T13:32:48.646Z",
266
- "form": "project",
267
- "id": "a64070b0-74bc-4694-8e29-8006f9de70f7",
268
- "name": "Pietra's Project",
269
- "country": "AL",
270
- "datastakeId": "PRJ-00000000114",
271
- "title": "Pietra's Project",
272
- "sectoralScope": "fugitiveEmissionsFromIndustrialGases",
273
- "sdgs": [],
274
- "authorId": "df5378ae-704a-4a46-93b2-336cc5341456",
275
- "percentageCompletion": 25,
276
- "author": {
277
- "name": "Geri SHPK",
278
- "country": "AL",
279
- "category": "civilSociety",
280
- "subCategory": "internationalNGO"
281
- }
282
- }
283
- ];
284
-
285
- export const storyConfig = {
286
- data: transformProjectsToGlobeData(sampleProjects),
287
- type: "project",
288
- primaryLink: true,
289
- showSider: true,
290
- siderTitle: "Project Details",
291
- renderTooltip: (project) => {
292
- return [
293
- { label: "Project ID", value: project.projectData?.datastakeId || "N/A" },
294
- { label: "Sector", value: project.projectData?.sectoralScope || "N/A" },
295
- { label: "Completion", value: `${Math.round(project.projectData?.percentageCompletion || 0)}%` },
296
- { label: "Country", value: project.projectData?.country || "N/A" },
297
- { label: "Author", value: project.projectData?.author || "N/A" },
298
- { label: "Created", value: project.projectData?.createdAt ? new Date(project.projectData.createdAt).toLocaleDateString() : "N/A" }
299
- ];
300
- },
301
- renderSider: (activeMarker) => {
302
- const project = activeMarker.data;
303
- const projectData = project.projectData;
304
-
305
- return (
306
- <div className="project-sider">
307
- {projectData?.mainImage && (
308
- <div className="project-image mb-3">
309
- <img
310
- src={projectData.mainImage}
311
- alt={project.name}
312
- style={{ width: '100%', height: '200px', objectFit: 'cover', borderRadius: '8px' }}
313
- />
314
- </div>
315
- )}
316
-
317
- <div className="project-details">
318
- <div className="detail-row mb-2">
319
- <span className="label">Project ID:</span>
320
- <span className="value">{projectData?.datastakeId || "N/A"}</span>
321
- </div>
322
-
323
- <div className="detail-row mb-2">
324
- <span className="label">Sectoral Scope:</span>
325
- <span className="value">{projectData?.sectoralScope || "N/A"}</span>
326
- </div>
327
-
328
- <div className="detail-row mb-2">
329
- <span className="label">Completion:</span>
330
- <span className="value">{Math.round(projectData?.percentageCompletion || 0)}%</span>
331
- </div>
332
-
333
- <div className="detail-row mb-2">
334
- <span className="label">Country:</span>
335
- <span className="value">{projectData?.country || "N/A"}</span>
336
- </div>
337
-
338
- <div className="detail-row mb-2">
339
- <span className="label">Author:</span>
340
- <span className="value">{projectData?.author || "N/A"}</span>
341
- </div>
342
-
343
- <div className="detail-row mb-2">
344
- <span className="label">Created:</span>
345
- <span className="value">
346
- {projectData?.createdAt ? new Date(projectData.createdAt).toLocaleDateString() : "N/A"}
347
- </span>
348
- </div>
349
-
350
- {project.description && (
351
- <div className="detail-row mt-3">
352
- <span className="label">Description:</span>
353
- <p className="value mt-1" style={{ fontSize: '14px', lineHeight: '1.4' }}>
354
- {project.description}
355
- </p>
356
- </div>
357
- )}
358
- </div>
359
- </div>
360
- );
361
- },
362
- onClickLink: (project) => {
363
- console.log('Project clicked:', project);
364
- // You can add navigation logic here
365
- }
366
- };