|
247 | 247 | }, |
248 | 248 | setResponse(val, index, mp_progress=100) { |
249 | 249 | const itemUrl = this.context[index]['@id']; |
| 250 | + //console.log(val, index, mp_progress, itemUrl); |
250 | 251 | let exportVal = val; |
251 | 252 | let usedList = []; |
252 | 253 | let isAboutUrl = itemUrl; |
253 | 254 | // eslint-disable-next-line no-prototype-builtins |
254 | | - if (_.isObject(val) && !val.hasOwnProperty('unitCode')) { // to find sub-activities; condition might need to be changed |
| 255 | + if (_.isObject(val) && !val.hasOwnProperty('unitCode') && !(val instanceof Blob)) { // to find sub-activities; condition might need to be changed |
255 | 256 | const sectionItemKey = Object.keys(val)[0]; |
256 | 257 | const sectionItemValue = Object.values(val)[0]; |
257 | 258 | exportVal = sectionItemValue; |
|
269 | 270 | const respActivityUuid = uuidv4(); |
270 | 271 | const responseUuid = uuidv4(); |
271 | 272 | const responseActivity = { |
272 | | - '@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic', |
| 273 | + '@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema', |
273 | 274 | '@type': 'reproschema:ResponseActivity', |
274 | 275 | '@id': `uuid:${respActivityUuid}`, |
275 | 276 | used: usedList, |
|
284 | 285 | generated: `uuid:${responseUuid}`, |
285 | 286 | }; |
286 | 287 | const respData = { |
287 | | - '@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0-rc2/contexts/generic', |
| 288 | + '@context': 'https://raw.githubusercontent.com/ReproNim/reproschema/1.0.0/contexts/reproschema', |
288 | 289 | '@type': 'reproschema:Response', |
289 | 290 | '@id': `uuid:${responseUuid}`, |
290 | 291 | wasAttributedTo: { |
|
462 | 463 | }, |
463 | 464 | formatData(data) { |
464 | 465 | const currentIndex = parseInt(this.$store.state.activityIndex); |
465 | | - console.log(464, 'data response: ', data.response[currentIndex]); |
| 466 | + // console.log(464, 'data response: ', data.response[currentIndex]); |
466 | 467 | const TOKEN = this.$store.getters.getAuthToken; |
467 | 468 | const expiryMinutes = this.$store.state.expiryMinutes; |
468 | 469 | const jszip = new JSZip(); |
|
0 commit comments