tango-app-api-trax 3.4.1-alpha-11 → 3.4.1-alpha-12
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/package.json
CHANGED
|
@@ -2780,6 +2780,7 @@ export async function questionList( req, res ) {
|
|
|
2780
2780
|
question.answers.forEach( ( answer ) => {
|
|
2781
2781
|
if ( answer.linkedQuestion ) {
|
|
2782
2782
|
let nesedQuestion = [];
|
|
2783
|
+
answer.oldNestedQuestion = JSON.parse( JSON.stringify( answer.nestedQuestion ) );
|
|
2783
2784
|
answer.nestedQuestion.forEach( ( qn, qidx ) => {
|
|
2784
2785
|
let getQn = questionList.get( qn );
|
|
2785
2786
|
if ( getQn ) {
|
|
@@ -2793,6 +2794,7 @@ export async function questionList( req, res ) {
|
|
|
2793
2794
|
getQn = { ...getQn, uniqueNo: randomNo };
|
|
2794
2795
|
nesedQuestion.push( getQn );
|
|
2795
2796
|
if ( answer.linkedQuestion == getQn.qno ) {
|
|
2797
|
+
answer.oldLinkedQuestion = answer.linkedQuestion;
|
|
2796
2798
|
answer.linkedQuestion = randomNo;
|
|
2797
2799
|
}
|
|
2798
2800
|
answer.nestedQuestion[qidx] = randomNo;
|
|
@@ -2802,10 +2804,12 @@ export async function questionList( req, res ) {
|
|
|
2802
2804
|
let nestedLinkqn = [];
|
|
2803
2805
|
ele.answers.forEach( ( ans ) => {
|
|
2804
2806
|
if ( ans.linkedQuestion ) {
|
|
2807
|
+
ans.oldNestedQuestion = JSON.parse( JSON.stringify( ans.nestedQuestion ) );
|
|
2805
2808
|
ans.nestedQuestion.forEach( ( nested, idx ) => {
|
|
2806
2809
|
let findRandom = nesedQuestion.find( ( qn ) => ( uniqueShow ? qn.qno == nested : qn.uniqueNo == nested ) && !nestedLinkqn.includes( qn.uniqueNo ) && !qn.updated );
|
|
2807
2810
|
if ( findRandom ) {
|
|
2808
2811
|
if ( ans.linkedQuestion == findRandom.qno ) {
|
|
2812
|
+
ans.oldLinkedQuestion = ans.linkedQuestion;
|
|
2809
2813
|
ans.linkedQuestion = findRandom.uniqueNo;
|
|
2810
2814
|
}
|
|
2811
2815
|
ans.nestedQuestion[idx] = findRandom.uniqueNo;
|