tango-app-api-trax 3.9.40 → 3.9.41

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-trax",
3
- "version": "3.9.40",
3
+ "version": "3.9.41",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2809,7 +2809,7 @@ export async function countUpdateRunAI( req, res ) {
2809
2809
 
2810
2810
  getDetails.questionAnswers.forEach( ( section ) => {
2811
2811
  section.questions.forEach( ( question ) => {
2812
- if ( question.compliance && [ 'image', 'image/video' ].includes( question.answerType ) ) {
2812
+ if ( question.compliance && [ 'image', 'image/video' ].includes( question.answerType ) && question?.answers?.[0]?.multiReferenceImage?.some( ( img ) => img.runAI ) ) {
2813
2813
  // For 'image/video' each userAnswer carries its own answerType and runAIData only lives on
2814
2814
  // the image entries; a pure 'image' question keeps runAIData directly on every userAnswer.
2815
2815
  const aiAnswers = question.answerType === 'image/video' ?
@@ -3690,7 +3690,7 @@ export async function runAIFlag( req, res ) {
3690
3690
  questionFlag: store?.questionFlag,
3691
3691
  checklistName: store.checkListName?.trim(),
3692
3692
  submittedBy: store.timeFlag ? '--' : store?.userName,
3693
- time: store?.submitTime_string ?? '--',
3693
+ time: store.timeFlag ? '--' : store?.submitTime_string,
3694
3694
  domain: `${JSON.parse( process.env.URL ).domain}/manage/trax/flags?date=${dayjs().format( 'YYYY-MM-DD' )}`,
3695
3695
  status: store.checklistStatus,
3696
3696
  };
@@ -126,7 +126,7 @@
126
126
 
127
127
  <div class="cover-summary">
128
128
  <div class="cover-sum-row"><span class="cover-sum-label">No. of questions</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{numQuestions}}</span></div>
129
- {{#if hasSopFlag}}
129
+ {{#if showFlags}}
130
130
  <div class="cover-sum-row"><span class="cover-sum-label">Question Flag</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{numFlags}}</span></div>
131
131
  {{/if}}
132
132
  {{#if showRunAIFlag}}