Skip to content

Commit 3b92879

Browse files
FrancescoMolinaroatarix83
authored andcommitted
Merged in task/ux-plus-2023_02_x/UXP-147 (pull request #9)
Task/ux plus 2023 02 x/UXP-147 Approved-by: Giuseppe Digilio
2 parents 89d0517 + 6d41a61 commit 3b92879

47 files changed

Lines changed: 78813 additions & 27317 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ export class DsDynamicOneboxComponent extends DsDynamicVocabularyComponent imple
323323
this.previousValue = result;
324324
this.cdr.detectChanges();
325325
}
326-
if (hasValue(this.currentValue.otherInformation)) {
326+
if (hasValue(this.currentValue?.otherInformation)) {
327327
const infoKeys = Object.keys(this.currentValue.otherInformation);
328328
this.setMultipleValuesForOtherInfo(infoKeys, this.currentValue);
329329
}
Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,368 @@
1+
import { SubmissionObject } from '../../core/submission/models/submission-object.model';
2+
3+
export const mockUploadResp = [{
4+
'id': 11,
5+
'errors': [
6+
{
7+
'message': 'error.validation.required',
8+
'paths': [
9+
'/sections/publication/dc.title',
10+
'/sections/publication/dc.date.issued',
11+
'/sections/publication/dc.type'
12+
]
13+
},
14+
{
15+
'message': 'error.validation.license.required',
16+
'paths': [
17+
'/sections/license'
18+
]
19+
}
20+
],
21+
'lastModified': '2024-05-22T14:25:13.853+00:00',
22+
'sections': {
23+
'unpaywall': {
24+
'id': 1,
25+
'doi': 'testDoi',
26+
'itemId': 'a300ad52-bae8-4ee5-8500-5f19fcc4b06f',
27+
'status': 'NOT_FOUND',
28+
'timestampCreated': '2024-05-21T15:42:42.284+00:00',
29+
'timestampLastModified': '2024-05-22T13:17:16.479+00:00'
30+
},
31+
'license': {
32+
'url': null,
33+
'acceptanceDate': null,
34+
'granted': false
35+
},
36+
'publication_references': {},
37+
'upload': {
38+
'files': [
39+
{
40+
'uuid': '66bbee9e-a3bb-48e8-9a1f-4b410a982117',
41+
'metadata': {
42+
'dc.source': [
43+
{
44+
'value': 'Lorem',
45+
'language': null,
46+
'authority': null,
47+
'confidence': -1,
48+
'place': 0
49+
}
50+
],
51+
'dc.title': [
52+
{
53+
'value': 'Lorem',
54+
'language': null,
55+
'authority': null,
56+
'confidence': -1,
57+
'place': 0
58+
}
59+
]
60+
},
61+
'accessConditions': [],
62+
'format': {
63+
'id': 1,
64+
'shortDescription': 'Unknown',
65+
'description': 'Unknown data format',
66+
'mimetype': 'application/octet-stream',
67+
'supportLevel': 'UNKNOWN',
68+
'internal': false,
69+
'extensions': [],
70+
'type': 'bitstreamformat'
71+
},
72+
'sizeBytes': 2815,
73+
'checkSum': {
74+
'checkSumAlgorithm': 'MD5',
75+
'value': 'f768a167928aa34aa5bd5cdaf83182b7'
76+
},
77+
'url': 'http://localhost:8080/server/api/core/bitstreams/66bbee9e-a3bb-48e8-9a1f-4b410a982117/content'
78+
}
79+
]
80+
},
81+
'publication': {
82+
'dc.identifier.doi': [
83+
{
84+
'value': 'testDoi',
85+
'language': null,
86+
'authority': null,
87+
'confidence': -1,
88+
'place': 0
89+
}
90+
]
91+
},
92+
'publication_indexing': {},
93+
'detect-duplicate': {},
94+
'collection': 'edf8bcdc-82fd-42be-aaa1-084df50679d2',
95+
'publication_bibliographic_details': {}
96+
},
97+
'type': 'workspaceitem',
98+
'_links': {
99+
'supervisionOrders': {
100+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11/supervisionOrders'
101+
},
102+
'collection': {
103+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11/collection'
104+
},
105+
'item': {
106+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11/item'
107+
},
108+
'submissionDefinition': {
109+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11/submissionDefinition'
110+
},
111+
'submitter': {
112+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11/submitter'
113+
},
114+
'self': {
115+
'href': 'http://localhost:8080/server/api/submission/workspaceitems/11'
116+
}
117+
},
118+
'_embedded': {
119+
'submitter': {
120+
'id': '09797784-2424-458f-898c-4f85b536744c',
121+
'uuid': '09797784-2424-458f-898c-4f85b536744c',
122+
'name': 'admin',
123+
'handle': null,
124+
'metadata': {
125+
'dspace.agreements.cookies': [
126+
{
127+
'value': '{"authentication":true,"preferences":true,"acknowledgement":true,"plumX":true,"altmetric":true,"dimensions":true}',
128+
'language': null,
129+
'authority': null,
130+
'confidence': -1,
131+
'place': 0
132+
}
133+
],
134+
'dspace.agreements.end-user': [
135+
{
136+
'value': 'true',
137+
'language': null,
138+
'authority': null,
139+
'confidence': -1,
140+
'place': 0
141+
}
142+
],
143+
'eperson.firstname': [
144+
{
145+
'value': 'admin',
146+
'language': null,
147+
'authority': null,
148+
'confidence': -1,
149+
'place': 0
150+
}
151+
],
152+
'eperson.language': [
153+
{
154+
'value': 'en',
155+
'language': null,
156+
'authority': null,
157+
'confidence': -1,
158+
'place': 0
159+
}
160+
],
161+
'eperson.lastname': [
162+
{
163+
'value': 'admin',
164+
'language': null,
165+
'authority': null,
166+
'confidence': -1,
167+
'place': 0
168+
}
169+
]
170+
},
171+
'netid': null,
172+
'lastActive': '2024-05-22T13:58:39.848+00:00',
173+
'canLogIn': true,
174+
'email': 'admin',
175+
'requireCertificate': false,
176+
'selfRegistered': false,
177+
'machineTokenGenerated': false,
178+
'type': 'eperson',
179+
'_links': {
180+
'groups': {
181+
'href': 'http://localhost:8080/server/api/eperson/epersons/09797784-2424-458f-898c-4f85b536744c/groups'
182+
},
183+
'self': {
184+
'href': 'http://localhost:8080/server/api/eperson/epersons/09797784-2424-458f-898c-4f85b536744c'
185+
}
186+
}
187+
},
188+
'item': {
189+
'id': 'a300ad52-bae8-4ee5-8500-5f19fcc4b06f',
190+
'uuid': 'a300ad52-bae8-4ee5-8500-5f19fcc4b06f',
191+
'name': null,
192+
'handle': null,
193+
'metadata': {
194+
'dc.identifier.doi': [
195+
{
196+
'value': 'testDoi',
197+
'language': null,
198+
'authority': null,
199+
'confidence': -1,
200+
'place': 0
201+
}
202+
],
203+
'dspace.entity.type': [
204+
{
205+
'value': 'Publication',
206+
'language': null,
207+
'authority': null,
208+
'confidence': -1,
209+
'place': 0
210+
}
211+
]
212+
},
213+
'inArchive': false,
214+
'discoverable': true,
215+
'withdrawn': false,
216+
'lastModified': '2024-05-22T14:25:13.853+00:00',
217+
'entityType': 'Publication',
218+
'type': 'item',
219+
'_links': {
220+
'accessStatus': {
221+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/accessStatus'
222+
},
223+
'bundles': {
224+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/bundles'
225+
},
226+
'identifiers': {
227+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/identifiers'
228+
},
229+
'mappedCollections': {
230+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/mappedCollections'
231+
},
232+
'owningCollection': {
233+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/owningCollection'
234+
},
235+
'relationships': {
236+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/relationships'
237+
},
238+
'version': {
239+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/version'
240+
},
241+
'templateItemOf': {
242+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/templateItemOf'
243+
},
244+
'metrics': {
245+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/metrics'
246+
},
247+
'thumbnail': {
248+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f/thumbnail'
249+
},
250+
'self': {
251+
'href': 'http://localhost:8080/server/api/core/items/a300ad52-bae8-4ee5-8500-5f19fcc4b06f'
252+
}
253+
}
254+
},
255+
'submissionDefinition': {
256+
'id': 'publication',
257+
'name': 'publication',
258+
'type': 'submissiondefinition',
259+
'isDefault': true,
260+
'_links': {
261+
'collections': {
262+
'href': 'http://localhost:8080/server/api/config/submissiondefinitions/publication/collections'
263+
},
264+
'sections': {
265+
'href': 'http://localhost:8080/server/api/config/submissiondefinitions/publication/sections'
266+
},
267+
'self': {
268+
'href': 'http://localhost:8080/server/api/config/submissiondefinitions/publication'
269+
}
270+
}
271+
},
272+
'collection': {
273+
'id': 'edf8bcdc-82fd-42be-aaa1-084df50679d2',
274+
'uuid': 'edf8bcdc-82fd-42be-aaa1-084df50679d2',
275+
'name': 'Publication',
276+
'handle': '20.500.14171/7',
277+
'metadata': {
278+
'cris.submission.definition': [
279+
{
280+
'value': 'publication',
281+
'language': null,
282+
'authority': null,
283+
'confidence': -1,
284+
'place': 0
285+
}
286+
],
287+
'dc.identifier.uri': [
288+
{
289+
'value': 'http://localhost:4000/handle/20.500.14171/7',
290+
'language': null,
291+
'authority': null,
292+
'confidence': -1,
293+
'place': 0
294+
}
295+
],
296+
'dc.title': [
297+
{
298+
'value': 'Publication',
299+
'language': null,
300+
'authority': null,
301+
'confidence': -1,
302+
'place': 0
303+
}
304+
],
305+
'dspace.entity.type': [
306+
{
307+
'value': 'Publication',
308+
'language': null,
309+
'authority': null,
310+
'confidence': -1,
311+
'place': 0
312+
}
313+
]
314+
},
315+
'archivedItemsCount': -1,
316+
'type': 'collection',
317+
'_links': {
318+
'harvester': {
319+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/harvester'
320+
},
321+
'itemtemplate': {
322+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/itemtemplate'
323+
},
324+
'license': {
325+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/license'
326+
},
327+
'logo': {
328+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/logo'
329+
},
330+
'mappedItems': {
331+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/mappedItems'
332+
},
333+
'parentCommunity': {
334+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/parentCommunity'
335+
},
336+
'adminGroup': {
337+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/adminGroup'
338+
},
339+
'submittersGroup': {
340+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/submittersGroup'
341+
},
342+
'itemReadGroup': {
343+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/itemReadGroup'
344+
},
345+
'bitstreamReadGroup': {
346+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/bitstreamReadGroup'
347+
},
348+
'self': {
349+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2'
350+
},
351+
'workflowGroups': [
352+
{
353+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/workflowGroups/reviewer',
354+
'name': 'reviewer'
355+
},
356+
{
357+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/workflowGroups/editor',
358+
'name': 'editor'
359+
},
360+
{
361+
'href': 'http://localhost:8080/server/api/core/collections/edf8bcdc-82fd-42be-aaa1-084df50679d2/workflowGroups/finaleditor',
362+
'name': 'finaleditor'
363+
}
364+
]
365+
}
366+
}
367+
}
368+
}] as any as SubmissionObject[];

0 commit comments

Comments
 (0)