From 8cbd035220542450333f49ce57b0f58cc60b8d22 Mon Sep 17 00:00:00 2001 From: viktar-dzmitryieu-tao Date: Mon, 16 Dec 2024 18:18:38 +0100 Subject: [PATCH 1/2] fix: booklet download from tasks queue --- src/taskQueue/taskQueueModel.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/taskQueue/taskQueueModel.js b/src/taskQueue/taskQueueModel.js index 20aefbb2..b68f9e53 100644 --- a/src/taskQueue/taskQueueModel.js +++ b/src/taskQueue/taskQueueModel.js @@ -496,10 +496,12 @@ export default function taskQueueModel(config) { throw new TypeError('config.url.download is not configured while download() is being called'); } - return this.getCached(taskId).then(function (taskData) { - let redirectUrl = (taskData || {}).redirectUrl; + return this.getCached(taskId).then(function (taskData = {}) { + const { redirectUrl, category } = taskData; - if (redirectUrl) { + // if the task is an update task, we should not use redirectUrl for download + // it only uses for DOCX file download (export category) + if (redirectUrl && category !== 'update') { return new Promise(function (resolve) { $.fileDownload(redirectUrl, { httpMethod: 'GET', From 17bcfe73797921f0b8a30e45c15254e112dcca34 Mon Sep 17 00:00:00 2001 From: viktar-dzmitryieu-tao Date: Thu, 19 Dec 2024 14:56:41 +0100 Subject: [PATCH 2/2] fix: update package version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6a19a04c..b3947bff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-core-ui", - "version": "3.8.1", + "version": "3.8.2", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 37e13ddd..f01b541b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@oat-sa/tao-core-ui", - "version": "3.8.1", + "version": "3.8.2", "displayName": "TAO Core UI", "description": "UI libraries of TAO", "scripts": {