tango-app-api-trax 3.8.17 → 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>
|
|
@@ -193,27 +193,30 @@
|
|
|
193
193
|
{{/each}}
|
|
194
194
|
</div>
|
|
195
195
|
{{/if}}
|
|
196
|
-
{{#if this.multiReferenceImage.length}}
|
|
197
|
-
<td style="width:50%;vertical-align:top;padding-right:8px">
|
|
198
|
-
<div class="q-answer-caption">Reference Image</div>
|
|
199
|
-
{{#each this.multiReferenceImage}}
|
|
200
|
-
<img src="{{this}}" alt="Reference Image" />
|
|
201
|
-
{{/each}}
|
|
202
|
-
</td>
|
|
203
|
-
{{/if}}
|
|
204
|
-
{{#unless this.multiReferenceImage.length}}
|
|
205
|
-
{{#if this.referenceImage}}
|
|
206
|
-
<td style="width:50%;vertical-align:top;padding-right:8px">
|
|
207
|
-
<div class="q-answer-caption">Reference Image</div>
|
|
208
|
-
<img src="{{this.referenceImage}}" alt="Reference Image" />
|
|
209
|
-
</td>
|
|
210
|
-
{{/if}}
|
|
211
|
-
{{/unless}}
|
|
212
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> --}}
|
|
213
197
|
{{#if this.userAnswer.length}}
|
|
214
198
|
<div class="q-answer-list">
|
|
215
199
|
{{#each this.userAnswer}}
|
|
216
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}}
|
|
217
220
|
{{#eq this.answerType 'text'}}
|
|
218
221
|
{{#if this.answer}}
|
|
219
222
|
<div class="q-answer-text {{#if this.sopFlag}}flagged{{/if}}">{{this.answer}}</div>
|