Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
program-service
Commits
7fc7df60
Commit
7fc7df60
authored
3 years ago
by
Bharat Kashyap
Browse files
Options
Download
Patches
Plain Diff
fix: SB-26189 issues with FTB questions with image
parent
e04a0d32
SB-23374
dependabot/npm_and_yarn/src/ajv-6.12.6
dependabot/npm_and_yarn/src/async-2.6.4
dependabot/npm_and_yarn/src/axios-0.21.2
dependabot/npm_and_yarn/src/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/jsonwebtoken-9.0.0
dependabot/npm_and_yarn/src/lodash-4.17.21
dependabot/npm_and_yarn/src/moment-2.29.4
dependabot/npm_and_yarn/src/moment-timezone-0.5.37
dependabot/npm_and_yarn/src/node-fetch-2.6.7
dependabot/npm_and_yarn/src/pathval-1.1.1
dependabot/npm_and_yarn/src/qs-and-body-parser-and-express-6.5.3
dependabot/npm_and_yarn/src/redis-3.1.1
dependabot/npm_and_yarn/src/simple-get-2.8.2
dependabot/npm_and_yarn/src/underscore-1.12.1
master
release-4.2.0
release-4.3.0
release-4.4.0
release-4.5.0
release-4.6.0
release-4.7.0
release-4.8.0
release-4.9.0
release-5.1.0
sb-22518
test-issue
vk-local-ps-4.4.0
release-5.1.0_RC1
release-4.9.0_RC1
release-4.8.0_RC3
release-4.8.0_RC2
release-4.8.0_RC1
release-4.7.0_RC6
release-4.7.0_RC5
release-4.7.0_RC4
release-4.7.0_RC3
release-4.7.0_RC2
release-4.7.0_RC1
release-4.6.0_RC6
release-4.6.0_RC5
release-4.6.0_RC4
release-4.6.0_RC3
release-4.6.0_RC2
release-4.6.0_RC1
release-4.5.0_RC1
release-4.4.0_RC5
release-4.4.0_RC4
release-4.4.0_RC3
release-4.4.0_RC2
release-4.4.0_RC1
release-4.3.0_RC5
release-4.3.0_RC4
release-4.3.0_RC3
release-4.3.0_RC2
release-4.3.0_RC1
release-4.2.0_RC9
release-4.2.0_RC8
release-4.2.0_RC7
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/service/print/dataImporter.js
+3
-2
src/service/print/dataImporter.js
src/service/print/getdocxdata.js
+19
-2
src/service/print/getdocxdata.js
with
22 additions
and
4 deletions
+22
-4
src/service/print/dataImporter.js
+
3
−
2
View file @
7fc7df60
...
...
@@ -70,7 +70,7 @@ const getQuestionForSection = async (id) => {
})
.
then
((
r
)
=>
{
if
(
status
===
200
)
{
if
(
r
.
result
.
content
.
itemSets
.
length
>
0
)
{
if
(
r
.
result
.
content
.
itemSets
&&
r
.
result
.
content
.
itemSets
.
length
>
0
)
{
const
itemset
=
r
.
result
.
content
.
itemSets
[
0
];
return
getItemsFromItemset
(
itemset
.
identifier
);
}
else
{
...
...
@@ -84,8 +84,9 @@ const getQuestionForSection = async (id) => {
})
.
catch
((
e
)
=>
{
error
=
true
;
if
(
e
.
name
===
"
PDFDataImportError
"
)
errorMsg
=
e
.
message
;
if
(
e
.
name
===
"
PDFDataImportError
"
);
else
e
.
message
=
"
Uncaught Exception
"
;
let
errorMsg
=
e
.
message
return
{
error
,
errorMsg
,
...
...
This diff is collapsed.
Click to expand it.
src/service/print/getdocxdata.js
+
19
−
2
View file @
7fc7df60
...
...
@@ -307,8 +307,8 @@ function Marks(data) {
}
function
createFTBObject
(
data
)
{
const
arr
=
[];
data
.
text
if
(
data
.
text
)
{
data
.
text
.
map
((
text
)
=>
{
if
(
typeof
text
===
"
object
"
)
{
arr
.
push
(
new
TextRun
(
text
));
...
...
@@ -321,6 +321,23 @@ function createFTBObject(data) {
}
})
.
reduce
((
prev
,
curr
)
=>
prev
.
concat
(
curr
),
[]);
}
else
if
(
data
.
image
)
{
if
(
data
.
image
.
includes
(
"
data:image/
"
))
{
let
image
=
getBufferImg
(
data
.
image
);
return
new
Paragraph
({
children
:
[
new
ImageRun
({
data
:
image
,
transformation
:
{
width
:
data
.
width
,
height
:
data
.
height
,
},
}),
],
});
}
}
return
new
Paragraph
({
alignment
:
AlignmentType
.
LEFT
,
children
:
arr
,
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets