datastake-daf 0.6.261 → 0.6.263
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 +8 -0
- package/.vscode/settings.json +13 -0
- package/dist/components/index.js +325 -155
- package/dist/utils/index.js +34 -34
- package/package.json +1 -1
- package/src/@daf/core/components/EditForm/components/ajaxSelect.js +1 -1
- package/src/@daf/core/components/EditForm/form.jsx +621 -551
- package/src/@daf/core/components/EditForm/storyConfig1.js +155 -249
- package/src/@daf/core/components/EditForm/storyConfig2.js +378 -20
- package/src/helpers/Forms.js +522 -443
|
@@ -9,27 +9,385 @@ export const storyData = {
|
|
|
9
9
|
getApiBaseUrl,
|
|
10
10
|
getAppHeader,
|
|
11
11
|
form: {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
id: "asgmLegitimacy",
|
|
13
|
+
label: "Evaluation",
|
|
14
|
+
description: "",
|
|
15
|
+
icon: "",
|
|
16
|
+
position: 1,
|
|
17
|
+
show: true,
|
|
18
|
+
options: {
|
|
19
|
+
id: "identification",
|
|
20
|
+
position: 1,
|
|
21
|
+
administrativeLevel1: {
|
|
22
|
+
_id: "68cd2969541cc3f81f12586a",
|
|
23
|
+
id: "e54bf020-d1e7-41d3-90b0-6fa6b1a33189",
|
|
24
|
+
dataId: "administrativeLevel1",
|
|
25
|
+
section: "identification",
|
|
26
|
+
type: "ajaxSelect",
|
|
27
|
+
meta: {
|
|
28
|
+
comment: false,
|
|
29
|
+
notApplicable: false,
|
|
30
|
+
notAvailable: false,
|
|
31
|
+
call: 'AdministrativeLevel::getOptions({\n "country": "country",\n "level": "level_1 as "\n })::{\n "label": "name",\n "value": "id",\n "coordinates": "coordinates"\n }',
|
|
32
|
+
disableEdit: {
|
|
33
|
+
create: false,
|
|
34
|
+
edit: false,
|
|
35
|
+
},
|
|
36
|
+
group: "identification",
|
|
37
|
+
noAddNew: true,
|
|
38
|
+
mandatory: true,
|
|
39
|
+
store: {
|
|
40
|
+
location: {
|
|
41
|
+
global: true,
|
|
42
|
+
path: "administrativeLevel1",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
showIf: "country notEmpty true",
|
|
47
|
+
position: 2,
|
|
48
|
+
dataLink: {
|
|
49
|
+
addToLinking: true,
|
|
50
|
+
entity: "AdministrativeLevel",
|
|
51
|
+
method: "createLevel",
|
|
52
|
+
createUserVersion: false,
|
|
53
|
+
createNew: false,
|
|
54
|
+
collection: "administrative_levels",
|
|
55
|
+
formNamespace: "SCL",
|
|
56
|
+
customUrl: "/adm",
|
|
57
|
+
keys: ["country", "level = level_1", "administrativeLevel1"],
|
|
58
|
+
pickKeys: [],
|
|
59
|
+
},
|
|
60
|
+
rules: [
|
|
61
|
+
{
|
|
62
|
+
required: true,
|
|
63
|
+
message: "errors::field is required",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
scope: ["global", "armedGroups"],
|
|
67
|
+
label: {
|
|
68
|
+
"country is BF": "Region",
|
|
69
|
+
"country is CD": "Province",
|
|
70
|
+
"country is AL": "Region",
|
|
71
|
+
"country is CO": "Department",
|
|
72
|
+
"country is ZW": "Province",
|
|
73
|
+
"country is SM": "Municipality",
|
|
74
|
+
"country is CH": "Region",
|
|
75
|
+
"country is HK": "Region",
|
|
76
|
+
"country is CA": "Region",
|
|
77
|
+
"country is SG": "District",
|
|
78
|
+
"country is AD": "Parish",
|
|
79
|
+
"country is TR": "Region",
|
|
80
|
+
"country is IT": "Region",
|
|
81
|
+
"country is US": "State",
|
|
82
|
+
"country is UG": "Region",
|
|
83
|
+
"country is MG": "Region",
|
|
84
|
+
"country is PE": "Department",
|
|
85
|
+
},
|
|
86
|
+
createdAt: "2025-09-19T09:59:08.543Z",
|
|
87
|
+
updatedAt: "2025-09-19T09:59:08.543Z",
|
|
88
|
+
__v: 0,
|
|
27
89
|
},
|
|
90
|
+
|
|
91
|
+
label: "Identification",
|
|
92
|
+
subTitle: "Identification",
|
|
28
93
|
},
|
|
29
|
-
|
|
94
|
+
subTitle: "Identificación",
|
|
30
95
|
},
|
|
31
96
|
data: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
97
|
+
_id: "68cd555b2801a29a0bcd402c",
|
|
98
|
+
form: "armed-groups",
|
|
99
|
+
id: "0b64c03b-87b4-4bb4-89fa-d00d510befd9",
|
|
100
|
+
name: "CODECO",
|
|
101
|
+
namespace: "armed-groups",
|
|
102
|
+
meta: {
|
|
103
|
+
inputs: {
|
|
104
|
+
administrativeLevel1: null,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
108
|
+
country: "CD",
|
|
109
|
+
category: "nonStateArmedGroup",
|
|
110
|
+
subCategory: "militia",
|
|
111
|
+
datastakeId: "STK-00000000433",
|
|
112
|
+
parent: {
|
|
113
|
+
_id: "6863e916b33bef0b4c76934b",
|
|
114
|
+
createdBy: "89c1cd0b-967e-4546-85fc-ac2615bc8f06",
|
|
115
|
+
createdAt: "2025-07-01T13:56:38.309Z",
|
|
116
|
+
updatedAt: "2025-07-01T13:56:38.309Z",
|
|
117
|
+
updatedBy: "89c1cd0b-967e-4546-85fc-ac2615bc8f06",
|
|
118
|
+
id: "5787125e-7900-4a2c-be12-149d943e86f1",
|
|
119
|
+
name: "CODECO",
|
|
120
|
+
authorId: "26814cba-315d-4dfd-8783-55227fdd670b",
|
|
121
|
+
collectId: "18ac7a09e902fd95f0395feee5bbbe75e3ab25e8",
|
|
122
|
+
country: "CD",
|
|
123
|
+
category: "nonStateArmedGroup",
|
|
124
|
+
sources: [],
|
|
125
|
+
subCategory: "militia",
|
|
126
|
+
datastakeId: "STK-00000000433",
|
|
127
|
+
__v: 0,
|
|
128
|
+
},
|
|
129
|
+
associatedSubjects: [
|
|
130
|
+
{
|
|
131
|
+
entity: "Event",
|
|
132
|
+
nature: "",
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
published: true,
|
|
136
|
+
version: 2,
|
|
137
|
+
completion: 45,
|
|
138
|
+
location: {
|
|
139
|
+
_id: "68cb1c0a1ce0f445b36edc74",
|
|
140
|
+
form: "location",
|
|
141
|
+
id: "829c24bf-314b-4a03-ae7e-88ca2966a809",
|
|
142
|
+
parent: {
|
|
143
|
+
_id: "6863e916b33bef0b4c769338",
|
|
144
|
+
createdBy: "89c1cd0b-967e-4546-85fc-ac2615bc8f06",
|
|
145
|
+
createdAt: "2025-07-01T13:56:38.102Z",
|
|
146
|
+
updatedAt: "2025-07-01T13:56:38.102Z",
|
|
147
|
+
updatedBy: "89c1cd0b-967e-4546-85fc-ac2615bc8f06",
|
|
148
|
+
id: "c7f47e37-7136-4f5f-b067-16ba10e14bdd",
|
|
149
|
+
name: "Djugu",
|
|
150
|
+
authorId: "26814cba-315d-4dfd-8783-55227fdd670b",
|
|
151
|
+
collectId: "ff8ecb737daacc4235fa23bde458ebcb86b8b482",
|
|
152
|
+
country: "CD",
|
|
153
|
+
administrativeLevel1: "ituri",
|
|
154
|
+
administrativeLevel2: "djugu",
|
|
155
|
+
category: "village",
|
|
156
|
+
datastakeId: "LOC-00000000229",
|
|
157
|
+
linking: {
|
|
158
|
+
SCL: {
|
|
159
|
+
ituri: {
|
|
160
|
+
_id: {},
|
|
161
|
+
id: "ituri",
|
|
162
|
+
name: "Ituri",
|
|
163
|
+
},
|
|
164
|
+
djugu: {
|
|
165
|
+
_id: {},
|
|
166
|
+
id: "djugu",
|
|
167
|
+
name: "Djugu",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
__v: 0,
|
|
172
|
+
},
|
|
173
|
+
administrativeLevel1: "ituri",
|
|
174
|
+
administrativeLevel2: "djugu",
|
|
175
|
+
name: "Djugu",
|
|
176
|
+
country: "CD",
|
|
177
|
+
category: "village",
|
|
178
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
179
|
+
gps: {
|
|
180
|
+
latitude: 1.9126390615701807,
|
|
181
|
+
longitude: 30.502825332380073,
|
|
182
|
+
},
|
|
183
|
+
published: true,
|
|
184
|
+
version: 1,
|
|
185
|
+
datastakeId: "LOC-00000000229",
|
|
186
|
+
products: [],
|
|
187
|
+
extractionMethod: [],
|
|
188
|
+
mechanisedEquipment: [],
|
|
189
|
+
typeOfMechanisedEquipment: [],
|
|
190
|
+
associatedSubjects: [
|
|
191
|
+
{
|
|
192
|
+
entity: "Event",
|
|
193
|
+
_id: {},
|
|
194
|
+
nature: "",
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
entity: "Stakeholder",
|
|
198
|
+
_id: {},
|
|
199
|
+
nature: "",
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
operator: [],
|
|
203
|
+
otherOperators: [],
|
|
204
|
+
locationBeneficiaries: [],
|
|
205
|
+
trade: [],
|
|
206
|
+
governance: [],
|
|
207
|
+
civilSociety: [],
|
|
208
|
+
international: [],
|
|
209
|
+
pictures: [],
|
|
210
|
+
documents: [],
|
|
211
|
+
channels: [],
|
|
212
|
+
linking: {
|
|
213
|
+
SCL: {
|
|
214
|
+
djugu: {
|
|
215
|
+
_id: {},
|
|
216
|
+
id: "djugu",
|
|
217
|
+
country: "CD",
|
|
218
|
+
administrativeLevel1: "ituri",
|
|
219
|
+
level: "level_2",
|
|
220
|
+
name: "Djugu",
|
|
221
|
+
collectId: "9b35e843f6af816610f480784227b869a0eb8bf8",
|
|
222
|
+
createdAt: "2021-01-07T12:30:07.439Z",
|
|
223
|
+
updatedAt: "2021-01-07T12:30:07.439Z",
|
|
224
|
+
},
|
|
225
|
+
ituri: {
|
|
226
|
+
_id: {},
|
|
227
|
+
id: "ituri",
|
|
228
|
+
country: "CD",
|
|
229
|
+
level: "level_1",
|
|
230
|
+
name: "Ituri",
|
|
231
|
+
collectId: "f145a9231fc4f2bda2ccb24f31db5c6ac92b59c3",
|
|
232
|
+
createdAt: "2021-03-26T07:53:31.000Z",
|
|
233
|
+
updatedAt: "2021-03-26T07:53:31.000Z",
|
|
234
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
235
|
+
collectBy: "7d278388-e5df-482f-979b-580542128c11",
|
|
236
|
+
form: "location",
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
createdAt: "2025-09-17T20:37:30.072Z",
|
|
241
|
+
updatedAt: "2025-09-17T20:38:15.721Z",
|
|
242
|
+
__v: 0,
|
|
243
|
+
administrativeLevel1Name: "Ituri",
|
|
244
|
+
administrativeLevel2Name: "Djugu",
|
|
245
|
+
locationId: "68cb1c0a1ce0f445b36edc74",
|
|
246
|
+
meta: {
|
|
247
|
+
inputs: {
|
|
248
|
+
administrativeLevel1: {},
|
|
249
|
+
administrativeLevel2: {},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
scope: "nashirikiOperatorLocation",
|
|
253
|
+
},
|
|
254
|
+
suppliers: [],
|
|
255
|
+
locationSuppliers: [],
|
|
256
|
+
clients: [],
|
|
257
|
+
shareholders: [],
|
|
258
|
+
directBeneficiaries: [],
|
|
259
|
+
management: [],
|
|
260
|
+
boardMembers: [],
|
|
261
|
+
channels: [],
|
|
262
|
+
linking: {
|
|
263
|
+
SCL: {},
|
|
264
|
+
},
|
|
265
|
+
administrativeLevel1: "ituri",
|
|
266
|
+
areaOfInfluence: {
|
|
267
|
+
_id: "68cc29fe04009469e9d7844d",
|
|
268
|
+
form: "location",
|
|
269
|
+
id: "d8f91684-e1a3-486f-8b27-fc2c1b080453",
|
|
270
|
+
parent: {
|
|
271
|
+
_id: "68cc29fe04009469e9d78453",
|
|
272
|
+
createdAt: "2025-09-18T15:49:18.151Z",
|
|
273
|
+
updatedAt: "2025-09-18T15:49:18.151Z",
|
|
274
|
+
id: "c5a249e5-2c5b-4935-80c3-6dc0d36db79c",
|
|
275
|
+
name: "CODECO",
|
|
276
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
277
|
+
collectId: "5ea157728ca1a7a14c19e0fd18dafe6333e3fd00",
|
|
278
|
+
country: "CD",
|
|
279
|
+
administrativeLevel1: "ituri",
|
|
280
|
+
administrativeLevel2: "djugu",
|
|
281
|
+
category: "village",
|
|
282
|
+
datastakeId: "LOC-00000000248",
|
|
283
|
+
linking: {
|
|
284
|
+
SCL: {
|
|
285
|
+
djugu: {
|
|
286
|
+
_id: {},
|
|
287
|
+
id: "djugu",
|
|
288
|
+
country: "CD",
|
|
289
|
+
administrativeLevel1: "ituri",
|
|
290
|
+
level: "level_2",
|
|
291
|
+
name: "Djugu",
|
|
292
|
+
collectId: "9b35e843f6af816610f480784227b869a0eb8bf8",
|
|
293
|
+
createdAt: "2021-01-07T12:30:07.439Z",
|
|
294
|
+
updatedAt: "2021-01-07T12:30:07.439Z",
|
|
295
|
+
},
|
|
296
|
+
ituri: {
|
|
297
|
+
_id: {},
|
|
298
|
+
id: "ituri",
|
|
299
|
+
country: "CD",
|
|
300
|
+
level: "level_1",
|
|
301
|
+
name: "Ituri",
|
|
302
|
+
collectId: "f145a9231fc4f2bda2ccb24f31db5c6ac92b59c3",
|
|
303
|
+
createdAt: "2021-03-26T07:53:31.000Z",
|
|
304
|
+
updatedAt: "2021-03-26T07:53:31.000Z",
|
|
305
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
306
|
+
collectBy: "7d278388-e5df-482f-979b-580542128c11",
|
|
307
|
+
form: "location",
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
__v: 0,
|
|
312
|
+
},
|
|
313
|
+
administrativeLevel1: "ituri",
|
|
314
|
+
administrativeLevel2: "djugu",
|
|
315
|
+
name: "CODECO",
|
|
316
|
+
country: "CD",
|
|
317
|
+
category: "conflictArea",
|
|
318
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
319
|
+
gps: {
|
|
320
|
+
latitude: 1.9044038862866393,
|
|
321
|
+
longitude: 30.499750707300333,
|
|
322
|
+
},
|
|
323
|
+
published: false,
|
|
324
|
+
version: 1,
|
|
325
|
+
datastakeId: "LOC-00000000248",
|
|
326
|
+
products: [],
|
|
327
|
+
extractionMethod: [],
|
|
328
|
+
mechanisedEquipment: [],
|
|
329
|
+
typeOfMechanisedEquipment: [],
|
|
330
|
+
associatedSubjects: [
|
|
331
|
+
{
|
|
332
|
+
entity: "Stakeholder",
|
|
333
|
+
_id: {},
|
|
334
|
+
nature: "",
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
operator: [],
|
|
338
|
+
otherOperators: [],
|
|
339
|
+
locationBeneficiaries: [],
|
|
340
|
+
trade: [],
|
|
341
|
+
governance: [],
|
|
342
|
+
civilSociety: [],
|
|
343
|
+
international: [],
|
|
344
|
+
pictures: [],
|
|
345
|
+
documents: [],
|
|
346
|
+
channels: [],
|
|
347
|
+
linking: {
|
|
348
|
+
SCL: {
|
|
349
|
+
djugu: {
|
|
350
|
+
_id: {},
|
|
351
|
+
id: "djugu",
|
|
352
|
+
country: "CD",
|
|
353
|
+
administrativeLevel1: "ituri",
|
|
354
|
+
level: "level_2",
|
|
355
|
+
name: "Djugu",
|
|
356
|
+
collectId: "9b35e843f6af816610f480784227b869a0eb8bf8",
|
|
357
|
+
createdAt: "2021-01-07T12:30:07.439Z",
|
|
358
|
+
updatedAt: "2021-01-07T12:30:07.439Z",
|
|
359
|
+
},
|
|
360
|
+
ituri: {
|
|
361
|
+
_id: {},
|
|
362
|
+
id: "ituri",
|
|
363
|
+
country: "CD",
|
|
364
|
+
level: "level_1",
|
|
365
|
+
name: "Ituri",
|
|
366
|
+
collectId: "f145a9231fc4f2bda2ccb24f31db5c6ac92b59c3",
|
|
367
|
+
createdAt: "2021-03-26T07:53:31.000Z",
|
|
368
|
+
updatedAt: "2021-03-26T07:53:31.000Z",
|
|
369
|
+
authorId: "6f9142ba-3b99-4506-b4da-172a6cf8b591",
|
|
370
|
+
collectBy: "7d278388-e5df-482f-979b-580542128c11",
|
|
371
|
+
form: "location",
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
},
|
|
375
|
+
createdAt: "2025-09-18T15:49:18.151Z",
|
|
376
|
+
updatedAt: "2025-09-18T15:49:18.151Z",
|
|
377
|
+
__v: 0,
|
|
378
|
+
administrativeLevel1Name: "Ituri",
|
|
379
|
+
administrativeLevel2Name: "Djugu",
|
|
380
|
+
areaOfInfluence: null,
|
|
381
|
+
meta: {
|
|
382
|
+
inputs: {
|
|
383
|
+
administrativeLevel1: {},
|
|
384
|
+
administrativeLevel2: {},
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
scope: "armedGroups",
|
|
388
|
+
},
|
|
389
|
+
createdAt: "2025-09-17T00:00:00.000Z",
|
|
390
|
+
updatedAt: "2025-09-19T13:28:00.864Z",
|
|
391
|
+
__v: 0,
|
|
392
|
+
},
|
|
393
|
+
};
|