tango-app-api-trax 3.8.16 → 3.8.18
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
|
@@ -2340,8 +2340,16 @@ export async function submitTask( req, res ) {
|
|
|
2340
2340
|
insertOpenSearchData( openSearch.traxActivityLog, inserttraxlogs );
|
|
2341
2341
|
if ( submittype === 'submit' ) {
|
|
2342
2342
|
const excludedChecklists = [ 'Store Hygiene Check' ];
|
|
2343
|
-
if ( checklist.checkListName.includes( 'Store Hygiene' ) ) {
|
|
2344
|
-
|
|
2343
|
+
if ( checklist.checkListName.includes( 'Store Hygiene' ) && checklist?.streamId ) {
|
|
2344
|
+
let sqsData = {
|
|
2345
|
+
'storeId': checklist.store_id,
|
|
2346
|
+
'streamID': checklist.streamId,
|
|
2347
|
+
'detectionTime': checklist?.questionAnswers?.[0]?.questions?.[0]?.answers?.[0]?.detectionTime,
|
|
2348
|
+
'date': checklist.date_string,
|
|
2349
|
+
'storeResponseTime': currentDateTime.format( 'HH:mm:ss - MMM DD, YYYY' ),
|
|
2350
|
+
'message_mode': 'retriggered',
|
|
2351
|
+
};
|
|
2352
|
+
sendMessageToQueue( `${JSON.parse( process.env.SQS ).url}${JSON.parse( process.env.SQS ).storeHygiene}`, JSON.stringify( sqsData ) );
|
|
2345
2353
|
}
|
|
2346
2354
|
if ( !excludedChecklists.includes( checklist.checkListName ) ) {
|
|
2347
2355
|
const query1 = [
|
package/src/hbs/template.hbs
CHANGED
|
@@ -229,15 +229,19 @@
|
|
|
229
229
|
{{#eq validation true}}
|
|
230
230
|
<table style="width:100%">
|
|
231
231
|
<tr>
|
|
232
|
-
{{#
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
<
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
232
|
+
{{#neq ../answerType 'image/video'}}
|
|
233
|
+
{{#neq ../answerType 'multipleImage'}}
|
|
234
|
+
{{#if multiReferenceImage.length}}
|
|
235
|
+
<td style="width:50%;vertical-align:top">
|
|
236
|
+
<div class="Reference"><span>Reference Image</span><br>
|
|
237
|
+
{{#each multiReferenceImage}}
|
|
238
|
+
<img src="{{this}}" width="200" height="180" />
|
|
239
|
+
{{/each}}
|
|
240
|
+
</div>
|
|
241
|
+
</td>
|
|
242
|
+
{{/if}}
|
|
243
|
+
{{/neq}}
|
|
244
|
+
{{/neq}}
|
|
241
245
|
<td style="width:50%;vertical-align:top">
|
|
242
246
|
{{#eq validationType 'Capture Image'}}
|
|
243
247
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
<div class="cover-summary">
|
|
112
112
|
<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>
|
|
113
113
|
<div class="cover-sum-row"><span class="cover-sum-label">No. of flags</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{numFlags}}</span></div>
|
|
114
|
-
<div class="cover-sum-row"><span class="cover-sum-label">AI Breached</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{aiBreached}}</span></div>
|
|
114
|
+
{{!-- <div class="cover-sum-row"><span class="cover-sum-label">AI Breached</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{aiBreached}}</span></div> --}}
|
|
115
115
|
<div class="cover-sum-row"><span class="cover-sum-label">Submitted By</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{submittedBy}}</span></div>
|
|
116
116
|
<div class="cover-sum-row"><span class="cover-sum-label">Country</span><span class="cover-sum-colon">:</span><span class="cover-sum-val">{{country}}</span></div>
|
|
117
117
|
</div>
|
|
@@ -196,8 +196,27 @@
|
|
|
196
196
|
{{!-- <span class="q-ans {{#if this.isYes}}ans-yes{{else}}{{#if this.isNo}}ans-no{{/if}}{{/if}}">{{#if this.isYes}}✓ Yes{{else}}{{#if this.isNo}}✗ No{{else}}{{this.answerDisplay}}{{/if}}{{/if}}</span> --}}
|
|
197
197
|
{{#if this.userAnswer.length}}
|
|
198
198
|
<div class="q-answer-list">
|
|
199
|
-
{{!-- text/video answers render per userAnswer above the table --}}
|
|
200
199
|
{{#each this.userAnswer}}
|
|
200
|
+
<div class="q-answer-item">
|
|
201
|
+
{{#neq ../answerType 'image/video'}}
|
|
202
|
+
{{#neq ../answerType 'multipleImage'}}
|
|
203
|
+
{{#if this.multiReferenceImage.length}}
|
|
204
|
+
<div class="q-answer-media">
|
|
205
|
+
<div class="q-answer-caption">Reference Images</div>
|
|
206
|
+
{{#each this.multiReferenceImage}}
|
|
207
|
+
<img src="{{this}}" alt="Reference Image" />
|
|
208
|
+
{{/each}}
|
|
209
|
+
</div>
|
|
210
|
+
{{else}}
|
|
211
|
+
{{#if this.referenceImage}}
|
|
212
|
+
<div class="q-answer-media">
|
|
213
|
+
<div class="q-answer-caption">Reference Image</div>
|
|
214
|
+
<img src="{{this.referenceImage}}" alt="Reference Image" />
|
|
215
|
+
</div>
|
|
216
|
+
{{/if}}
|
|
217
|
+
{{/if}}
|
|
218
|
+
{{/neq}}
|
|
219
|
+
{{/neq}}
|
|
201
220
|
{{#eq this.answerType 'text'}}
|
|
202
221
|
{{#if this.answer}}
|
|
203
222
|
<div class="q-answer-text {{#if this.sopFlag}}flagged{{/if}}">{{this.answer}}</div>
|
|
@@ -211,64 +230,46 @@
|
|
|
211
230
|
</div>
|
|
212
231
|
{{/if}}
|
|
213
232
|
{{/eq}}
|
|
214
|
-
{{/each}}
|
|
215
233
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
{{#each this.userAnswer.[0].multiReferenceImage}}
|
|
223
|
-
<img src="{{this}}" alt="Reference Image" />
|
|
224
|
-
{{/each}}
|
|
225
|
-
</td>
|
|
226
|
-
{{else}}
|
|
227
|
-
{{#if this.userAnswer.[0].referenceImage}}
|
|
228
|
-
<td style="width:50%;vertical-align:top;padding-right:8px">
|
|
229
|
-
<div class="q-answer-caption">Reference Image</div>
|
|
230
|
-
<img src="{{this.userAnswer.[0].referenceImage}}" alt="Reference Image" />
|
|
231
|
-
</td>
|
|
232
|
-
{{/if}}
|
|
233
|
-
{{/if}}
|
|
234
|
-
<td style="vertical-align:top">
|
|
235
|
-
{{#each this.userAnswer}}
|
|
236
|
-
{{#eq this.answerType 'image'}}
|
|
237
|
-
{{#if this.answer}}
|
|
238
|
-
<div class="q-answer-caption">Uploaded Image</div>
|
|
239
|
-
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
240
|
-
{{/if}}
|
|
241
|
-
{{/eq}}
|
|
242
|
-
{{#if this.validation}}
|
|
243
|
-
{{#eq this.validationDisplayType 'image'}}
|
|
244
|
-
{{#if this.validationAnswer}}
|
|
245
|
-
<div class="q-answer-caption">Validation Image</div>
|
|
246
|
-
<img src="{{this.validationAnswer}}" alt="Validation Image" />
|
|
247
|
-
{{/if}}
|
|
248
|
-
{{/eq}}
|
|
249
|
-
{{#eq this.validationDisplayType 'video'}}
|
|
250
|
-
{{#if this.validationAnswer}}
|
|
251
|
-
<div class="q-answer-caption">Validation Video</div>
|
|
252
|
-
<a class="q-answer-link" href="{{this.validationAnswer}}" target="_blank">{{this.validationAnswer}}</a>
|
|
234
|
+
<table style="width:100%;margin-top:8px"><tr>
|
|
235
|
+
<td style="vertical-align:top">
|
|
236
|
+
{{#eq this.answerType 'image'}}
|
|
237
|
+
{{#if this.answer}}
|
|
238
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
239
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
253
240
|
{{/if}}
|
|
254
241
|
{{/eq}}
|
|
255
|
-
{{#
|
|
256
|
-
{{#
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{{
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
242
|
+
{{#if this.validation}}
|
|
243
|
+
{{#eq this.validationDisplayType 'image'}}
|
|
244
|
+
{{#if this.validationAnswer}}
|
|
245
|
+
<div class="q-answer-caption">Validation Image</div>
|
|
246
|
+
<img src="{{this.validationAnswer}}" alt="Validation Image" />
|
|
247
|
+
{{/if}}
|
|
248
|
+
{{/eq}}
|
|
249
|
+
{{#eq this.validationDisplayType 'video'}}
|
|
250
|
+
{{#if this.validationAnswer}}
|
|
251
|
+
<div class="q-answer-caption">Validation Video</div>
|
|
252
|
+
<a class="q-answer-link" href="{{this.validationAnswer}}" target="_blank">{{this.validationAnswer}}</a>
|
|
253
|
+
{{/if}}
|
|
254
|
+
{{/eq}}
|
|
255
|
+
{{#eq this.validationDisplayType 'text'}}
|
|
256
|
+
{{#if this.validationAnswer}}
|
|
257
|
+
<div class="q-answer-text">{{this.validationAnswer}}</div>
|
|
258
|
+
{{/if}}
|
|
259
|
+
{{/eq}}
|
|
260
|
+
{{#eq this.validationDisplayType 'multiImage'}}
|
|
261
|
+
{{#if this.validationImage.length}}
|
|
262
|
+
<div class="q-answer-caption">Validation Image</div>
|
|
263
|
+
{{#each this.validationImage}}
|
|
264
|
+
<img src="{{this}}" alt="Validation Image" />
|
|
265
|
+
{{/each}}
|
|
266
|
+
{{/if}}
|
|
267
|
+
{{/eq}}
|
|
268
|
+
{{/if}}
|
|
269
|
+
</td>
|
|
270
|
+
</tr></table>
|
|
271
|
+
</div>
|
|
272
|
+
{{/each}}
|
|
272
273
|
</div>
|
|
273
274
|
{{/if}}
|
|
274
275
|
{{#if this.remarks}}
|