tango-app-api-trax 3.8.21 → 3.8.22-nike
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 +2 -2
- package/src/controllers/download.controller.js +19 -19
- package/src/controllers/gallery.controller.js +91 -27
- package/src/controllers/handlebar-helper.js +1 -0
- package/src/controllers/internalTrax.controller.js +808 -87
- package/src/controllers/mobileTrax.controller.js +262 -211
- package/src/controllers/teaxFlag.controller.js +5 -5
- package/src/controllers/trax.controller.js +6 -2
- package/src/hbs/recurringFlag.hbs +18 -16
- package/src/hbs/template.hbs +34 -23
- package/src/hbs/visit-checklist.hbs +84 -40
- package/src/hbs/weeklyWrap.hbs +218 -0
- package/src/routes/internalTraxApi.router.js +2 -0
- package/src/services/recurringFlagTracker.service.js +33 -33
- package/src/utils/visitChecklistPdf.utils.js +6 -5
|
@@ -608,7 +608,7 @@ export const flagCardsV1 = async ( req, res ) => {
|
|
|
608
608
|
{
|
|
609
609
|
client_id: clientId,
|
|
610
610
|
publish: true,
|
|
611
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ] },
|
|
611
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring' ] },
|
|
612
612
|
},
|
|
613
613
|
{ checkListType: 1 },
|
|
614
614
|
);
|
|
@@ -2743,7 +2743,7 @@ export const checklistDropdownV1 = async ( req, res ) => {
|
|
|
2743
2743
|
$or: [
|
|
2744
2744
|
{ questionFlag: { $gte: 1 } },
|
|
2745
2745
|
{ timeFlag: { $gte: 1 } },
|
|
2746
|
-
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ] } },
|
|
2746
|
+
{ checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring' ] } },
|
|
2747
2747
|
{
|
|
2748
2748
|
runAIQuestionCount: { $gte: 1 },
|
|
2749
2749
|
},
|
|
@@ -2945,7 +2945,7 @@ export const flagComparisonCardsV2 = async ( req, res ) => {
|
|
|
2945
2945
|
{
|
|
2946
2946
|
client_id: requestData.clientId,
|
|
2947
2947
|
publish: true,
|
|
2948
|
-
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ] },
|
|
2948
|
+
checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring' ] },
|
|
2949
2949
|
},
|
|
2950
2950
|
{ checkListType: 1 },
|
|
2951
2951
|
);
|
|
@@ -3047,7 +3047,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3047
3047
|
}
|
|
3048
3048
|
|
|
3049
3049
|
if ( requestData?.filter === 'all' ) {
|
|
3050
|
-
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ] } } ] } );
|
|
3050
|
+
findAndQuery.push( { $or: [ { checkListType: { $in: [ 'custom', 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring' ] } } ] } );
|
|
3051
3051
|
} else if ( requestData?.filter === 'question' ) {
|
|
3052
3052
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3053
3053
|
findAndQuery.push( { questionFlag: { $gte: 1 } } );
|
|
@@ -3055,7 +3055,7 @@ export const flagTablesV2 = async ( req, res ) => {
|
|
|
3055
3055
|
findAndQuery.push( { checkListType: 'custom' } );
|
|
3056
3056
|
findAndQuery.push( { timeFlag: { $gte: 1 } } );
|
|
3057
3057
|
} else if ( requestData?.filter === 'detection' ) {
|
|
3058
|
-
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ] } } );
|
|
3058
|
+
findAndQuery.push( { checkListType: { $in: [ 'customerunattended', 'mobileusagedetection', 'staffleftinthemiddle', 'storeopenandclose', 'uniformdetection', 'cleaning', 'scrum', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount', 'storehygienemonitoring' ] } } );
|
|
3059
3059
|
} else if ( requestData?.filter === 'runAI' ) {
|
|
3060
3060
|
if ( req.body.runAIChecklistName ) {
|
|
3061
3061
|
findAndQuery.push( { checkListName: { $in: req.body.runAIChecklistName } } );
|
|
@@ -1729,6 +1729,7 @@ export const updateConfigure = async ( req, res ) => {
|
|
|
1729
1729
|
owner: inputBody?.checkListDetails?.owner || [],
|
|
1730
1730
|
restrictAttendance: inputBody?.checkListDetails?.restrictAttendance || false,
|
|
1731
1731
|
enableNewDeployedStore: inputBody?.checkListDetails?.enableNewDeployedStore || false,
|
|
1732
|
+
redoValidity: inputBody?.checkListDetails?.redoValidity || 7,
|
|
1732
1733
|
};
|
|
1733
1734
|
|
|
1734
1735
|
if ( inputBody?.checkListDetails?.approver.length ) {
|
|
@@ -3907,6 +3908,8 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
|
|
|
3907
3908
|
}
|
|
3908
3909
|
}
|
|
3909
3910
|
getsubmitDetails[0].questionAnswers = sectionList;
|
|
3911
|
+
getsubmitDetails[0].scheduleEndTime = getCLconfig.scheduleEndTime;
|
|
3912
|
+
getsubmitDetails[0].scheduleEndTime_iso = endTimeIso.format();
|
|
3910
3913
|
if ( modifiedCount ) {
|
|
3911
3914
|
getsubmitDetails[0].checklistStatus = 'inprogress';
|
|
3912
3915
|
getsubmitDetails[0].date_string = dayjs( currentdate ).format( 'YYYY-MM-DD' );
|
|
@@ -4030,6 +4033,7 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
|
|
|
4030
4033
|
}, { userId: 1, store_id: 1 } );
|
|
4031
4034
|
|
|
4032
4035
|
if ( inprogressData.length ) {
|
|
4036
|
+
await processedchecklist.updateMany( { _id: { $in: inprogressData.map( ( ele ) => new ObjectId( ele._id ) ) } }, { scheduleEndTime: getCLconfig.scheduleEndTime, scheduleEndTime_iso: endTimeIso.format() } );
|
|
4033
4037
|
inprogressData.forEach( ( item ) => {
|
|
4034
4038
|
let checkData = assignUserList.find( ( ele ) => ele.userId.toString() == item.userId.toString() && ele.store_id == item.store_id );
|
|
4035
4039
|
if ( !checkData ) {
|
|
@@ -4127,7 +4131,7 @@ async function updateOpenSearch( user, data ) {
|
|
|
4127
4131
|
export const aiChecklist = async ( req, res ) => {
|
|
4128
4132
|
try {
|
|
4129
4133
|
let storeDetails = await storeService.count( { clientId: req.query.clientId, status: 'active' } );
|
|
4130
|
-
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', '
|
|
4134
|
+
let aiList = [ 'mobileusagedetection', 'storeopenandclose', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'eyetest', 'remoteoptometrist', 'storehygienemonitoring', 'cleaning', 'scrum', 'suspiciousactivity', 'suspiciousfootfall', 'drinking', 'bagdetection', 'inventorycount', 'carsattended', 'numberplateinfo', 'vehicle_check_in', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount' ];
|
|
4131
4135
|
let checklistDetails = [];
|
|
4132
4136
|
let publishList = [];
|
|
4133
4137
|
let unpublishList = [];
|
|
@@ -4140,7 +4144,7 @@ export const aiChecklist = async ( req, res ) => {
|
|
|
4140
4144
|
checklistDetails = [ ...publishList, ...unpublishList ];
|
|
4141
4145
|
|
|
4142
4146
|
checklistDetails.forEach( ( item ) => {
|
|
4143
|
-
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert' ].includes( item.checkListType ) ) {
|
|
4147
|
+
if ( ![ 'mobileusagedetection', 'storeopenandclose', 'cleaning', 'scrum', 'uniformdetection', 'staffleftinthemiddle', 'customerunattended', 'outsidebusinesshoursqueuetracking', 'halfshutter', 'tvcompliance', 'cameratampering', 'queuealert', 'staffgrouping', 'boxalert', 'employeeCount' ].includes( item.checkListType ) ) {
|
|
4144
4148
|
item.storeCount = storeDetails;
|
|
4145
4149
|
}
|
|
4146
4150
|
} );
|
|
@@ -67,12 +67,14 @@
|
|
|
67
67
|
<div style="margin-top: 0px;margin-bottom: 0px;font-size: 16px;line-height: 28px;color: #82899a;">
|
|
68
68
|
<span style="font-weight: 400;color: #121A26;line-height: 140%;">
|
|
69
69
|
Hi,<br/>
|
|
70
|
-
{{#if data.
|
|
71
|
-
Recurring flags has been detected across multiple
|
|
70
|
+
{{#if data.isMultiStoreSingleChecklist}}
|
|
71
|
+
Recurring flags has been detected across multiple {{data.subjectLabelPluralLower}} in recent <b>{{data.checklistName}}</b> on recent submissions, exceeding the configured threshold of {{data.threshold}} occurrences.
|
|
72
|
+
{{else if data.isMultiStore}}
|
|
73
|
+
Recurring flags has been detected across multiple {{data.subjectLabelPluralLower}} and across multiple checklists on recent submissions, exceeding the configured threshold of {{data.threshold}} occurrences.
|
|
72
74
|
{{else if data.isMultiChecklist}}
|
|
73
|
-
A Recurring flags has been identified for
|
|
75
|
+
A Recurring flags has been identified for {{data.subjectLabelLower}} <b>{{data.subjectName}}</b> across multiple checklists on recent submissions, exceeding the configured threshold of {{data.threshold}} occurrences.
|
|
74
76
|
{{else}}
|
|
75
|
-
A recurring flag has been identified for
|
|
77
|
+
A recurring flag has been identified for {{data.subjectLabelLower}} <b>{{data.subjectName}}</b>.where a question has been flagged multiple times in recent {{data.checklistName}} submissions, exceeding the configured threshold of {{data.threshold}} occurrences.
|
|
76
78
|
{{/if}}
|
|
77
79
|
</span>
|
|
78
80
|
</div>
|
|
@@ -86,8 +88,10 @@
|
|
|
86
88
|
<div class="highlight">
|
|
87
89
|
<b>Key Highlights:</b>
|
|
88
90
|
<ul style="margin:8px 0 0 0;padding-left:18px;">
|
|
89
|
-
<li>Total
|
|
91
|
+
<li>Total {{data.subjectLabelPlural}} with Recurring Flags: {{data.highlights.totalSubjects}}</li>
|
|
92
|
+
{{#unless data.isMultiStoreSingleChecklist}}
|
|
90
93
|
<li>Total Checklists with Recurring Flags: {{data.highlights.totalChecklists}}</li>
|
|
94
|
+
{{/unless}}
|
|
91
95
|
<li>Total Recurring Flags: {{data.highlights.totalFlags}}</li>
|
|
92
96
|
</ul>
|
|
93
97
|
</div>
|
|
@@ -102,7 +106,7 @@
|
|
|
102
106
|
{{#if data.isMultiStore}}
|
|
103
107
|
Details of the Recurring Flags are as follows:
|
|
104
108
|
{{else if data.isMultiChecklist}}
|
|
105
|
-
Details of the Recurring Flags from
|
|
109
|
+
Details of the Recurring Flags from {{data.subjectLabel}} {{data.subjectName}} are as follows:
|
|
106
110
|
{{else}}
|
|
107
111
|
Details of the Recurring Flags from checklist are as follows:
|
|
108
112
|
{{/if}}
|
|
@@ -119,9 +123,9 @@
|
|
|
119
123
|
<td align="center" bgcolor="#dbe5ea" style="padding:0 10px 0 10px">
|
|
120
124
|
<table align="center" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 680px;">
|
|
121
125
|
<tr bgcolor="#ffffff">
|
|
122
|
-
<td class="flagText" style="padding-left:30px;line-height: 24px;color:#000000">
|
|
126
|
+
<td class="flagText" style="padding-left:30px;line-height: 24px;color:#000000">{{data.subjectLabel}} Name :</td>
|
|
123
127
|
<td></td><td></td>
|
|
124
|
-
<td class="flagText">{{data.
|
|
128
|
+
<td class="flagText">{{data.subjectName}}</td>
|
|
125
129
|
</tr>
|
|
126
130
|
<tr bgcolor="#ffffff">
|
|
127
131
|
<td class="flagText" style="padding-left:30px;line-height: 24px;">Checklist Name :</td>
|
|
@@ -141,7 +145,7 @@
|
|
|
141
145
|
<tr bgcolor="#ffffff">
|
|
142
146
|
<td class="flagText" style="padding-left:30px;line-height: 24px;">No of Flags :</td>
|
|
143
147
|
<td></td><td></td>
|
|
144
|
-
<td class="flagText">{{data.
|
|
148
|
+
<td class="flagText">{{data.totalFlags}} (Question Flags: {{data.flagCount}}, Run AI Flags: {{data.runAICount}})</td>
|
|
145
149
|
</tr>
|
|
146
150
|
</table>
|
|
147
151
|
</td>
|
|
@@ -158,9 +162,8 @@
|
|
|
158
162
|
<table class="rfTable">
|
|
159
163
|
<thead>
|
|
160
164
|
<tr>
|
|
161
|
-
{{#if data.isMultiStore}}<th>
|
|
162
|
-
<th>Checklist Name</th>
|
|
163
|
-
<th>Question</th>
|
|
165
|
+
{{#if data.isMultiStore}}{{#unless data.isUserCoverage}}<th>{{data.subjectLabel}} Name</th>{{/unless}}{{/if}}
|
|
166
|
+
{{#unless data.isMultiStoreSingleChecklist}}<th>Checklist Name</th>{{/unless}}
|
|
164
167
|
<th>Last Submitted By</th>
|
|
165
168
|
<th>Last Submission Date</th>
|
|
166
169
|
<th>Total Recurring Flags</th>
|
|
@@ -169,12 +172,11 @@
|
|
|
169
172
|
<tbody>
|
|
170
173
|
{{#each data.rows}}
|
|
171
174
|
<tr>
|
|
172
|
-
{{#if ../data.isMultiStore}}<td>{{this.
|
|
173
|
-
<td>{{this.checklistName}}</td>
|
|
174
|
-
<td>{{this.questionName}}</td>
|
|
175
|
+
{{#if ../data.isMultiStore}}{{#unless ../data.isUserCoverage}}<td>{{this.subjectName}}</td>{{/unless}}{{/if}}
|
|
176
|
+
{{#unless ../data.isMultiStoreSingleChecklist}}<td>{{this.checklistName}}</td>{{/unless}}
|
|
175
177
|
<td>{{this.lastSubmittedBy}}</td>
|
|
176
178
|
<td>{{this.lastSubmissionDate}}</td>
|
|
177
|
-
<td>{{this.
|
|
179
|
+
<td>{{this.totalFlags}} (Question Flags: {{this.flagCount}}, Run AI Flags: {{this.runAICount}})</td>
|
|
178
180
|
</tr>
|
|
179
181
|
{{/each}}
|
|
180
182
|
</tbody>
|
package/src/hbs/template.hbs
CHANGED
|
@@ -136,6 +136,10 @@
|
|
|
136
136
|
.headertitle.submittedText {
|
|
137
137
|
width:116px !important;
|
|
138
138
|
}
|
|
139
|
+
|
|
140
|
+
.flagged {
|
|
141
|
+
color:red
|
|
142
|
+
}
|
|
139
143
|
</style>
|
|
140
144
|
</head>
|
|
141
145
|
|
|
@@ -197,21 +201,24 @@
|
|
|
197
201
|
{{#each data.questionAnswers}}
|
|
198
202
|
<div class="pdfcontent">
|
|
199
203
|
<div style="padding-bottom:20px;">
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
|
|
204
|
+
<table style="width:100%;border-collapse:collapse;">
|
|
205
|
+
<tr>
|
|
206
|
+
<td class="sectionname" style="white-space:nowrap;padding-right:8px;width:1%;">{{sectionName}}</td>
|
|
207
|
+
<td style="width:99%;"><hr class="horizondal-line" style="margin:0;border:none;border-top:1px solid #98A2B3;"/></td>
|
|
208
|
+
</tr>
|
|
209
|
+
</table>
|
|
203
210
|
</div>
|
|
204
211
|
{{#each questions}}
|
|
205
212
|
<div style="padding-bottom:20px">
|
|
206
213
|
{{#if userAnswer.length}}
|
|
207
214
|
<span class="question">{{qno}}.</span> <span class="question">{{qname}}</span>
|
|
208
215
|
{{#neq questionReferenceImage ''}}
|
|
209
|
-
<div class="Reference"><span>Reference Image</span><br>
|
|
216
|
+
<div class="Reference"><span>Question Reference Image</span><br>
|
|
210
217
|
<img src="{{questionReferenceImage}}" width="200" height="180" />
|
|
211
218
|
</div>
|
|
212
219
|
{{/neq}}
|
|
213
220
|
{{#if multiQuestionReferenceImage.length}}
|
|
214
|
-
<div class="Reference"><span>Reference
|
|
221
|
+
<div class="Reference"><span>Question Reference Image</span><br>
|
|
215
222
|
{{#each multiQuestionReferenceImage}}
|
|
216
223
|
<img src="{{this}}" width="200" height="180" />
|
|
217
224
|
{{/each}}
|
|
@@ -221,7 +228,7 @@
|
|
|
221
228
|
<div class="px-4 answer">
|
|
222
229
|
{{#if (includes ../../../data.validateType ../answerType)}}
|
|
223
230
|
{{#eq sopFlag true }}
|
|
224
|
-
<span id="agreed
|
|
231
|
+
<span id="agreed flagged">{{answer}}</span><br>
|
|
225
232
|
{{/eq}}
|
|
226
233
|
{{#eq sopFlag false }}
|
|
227
234
|
<span id="agreed">{{answer}}</span><br>
|
|
@@ -252,7 +259,7 @@
|
|
|
252
259
|
<a href="{{validationAnswer}}" target="_blank" style="text-decoration: underline;color:#0085D2" id="agreed">{{validationAnswer}}</a><br>
|
|
253
260
|
{{/eq}}
|
|
254
261
|
{{#eq validationType 'Descriptive Answer'}}
|
|
255
|
-
{{validationAnswer}}
|
|
262
|
+
<span class="{{#if this.sopFlag}}flagged{{/if}}">Validation Answer: {{validationAnswer}}</span>
|
|
256
263
|
{{/eq}}
|
|
257
264
|
{{#eq validationType 'Capture Multiple Image with description'}}
|
|
258
265
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
@@ -274,15 +281,15 @@
|
|
|
274
281
|
{{!-- {{#each ../answers}} --}}
|
|
275
282
|
<table style="width:100%">
|
|
276
283
|
<tr>
|
|
277
|
-
{{#
|
|
284
|
+
{{#if multiReferenceImage.length}}
|
|
278
285
|
<td style="width:50%">
|
|
279
|
-
|
|
280
|
-
|
|
286
|
+
<div class="Reference"><span>Reference Image</span><br>
|
|
287
|
+
{{#each multiReferenceImage}}
|
|
281
288
|
<img src="{{this}}" width="200" height="180" />
|
|
282
|
-
|
|
283
|
-
|
|
289
|
+
{{/each}}
|
|
290
|
+
</div>
|
|
284
291
|
</td>
|
|
285
|
-
{{/
|
|
292
|
+
{{/if}}
|
|
286
293
|
<td style="width:50%">
|
|
287
294
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
288
295
|
<img src="{{answer}}" width="200" height="180" />
|
|
@@ -296,15 +303,15 @@
|
|
|
296
303
|
{{!-- {{#each ../answers}} --}}
|
|
297
304
|
<table style="width:100%">
|
|
298
305
|
<tr>
|
|
299
|
-
{{#
|
|
306
|
+
{{#if multiReferenceImage.length}}
|
|
300
307
|
<td style="width:50%">
|
|
301
|
-
{{#each multiReferenceImage}}
|
|
302
308
|
<div class="Reference"><span>Reference Image</span><br>
|
|
309
|
+
{{#each multiReferenceImage}}
|
|
303
310
|
<img src="{{this}}" width="200" height="180" />
|
|
311
|
+
{{/each}}
|
|
304
312
|
</div>
|
|
305
|
-
{{/each}}
|
|
306
313
|
</td>
|
|
307
|
-
{{/
|
|
314
|
+
{{/if}}
|
|
308
315
|
<td style="width:50%">
|
|
309
316
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
310
317
|
<img src="{{answer}}" width="200" height="180" />
|
|
@@ -318,13 +325,15 @@
|
|
|
318
325
|
{{!-- {{#each ../answers}} --}}
|
|
319
326
|
<table style="width:100%">
|
|
320
327
|
<tr>
|
|
321
|
-
{{#
|
|
328
|
+
{{#if multiReferenceImage.length}}
|
|
322
329
|
<td style="width:50%">
|
|
323
330
|
<div class="Reference"><span>Reference Image</span><br>
|
|
324
|
-
|
|
331
|
+
{{#each multiReferenceImage}}
|
|
332
|
+
<img src="{{this}}" width="200" height="180" />
|
|
333
|
+
{{/each}}
|
|
325
334
|
</div>
|
|
326
335
|
</td>
|
|
327
|
-
{{/
|
|
336
|
+
{{/if}}
|
|
328
337
|
{{#eq answerType 'image'}}
|
|
329
338
|
<td style="width:50%">
|
|
330
339
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
@@ -345,13 +354,15 @@
|
|
|
345
354
|
{{!-- {{#each ../answers}} --}}
|
|
346
355
|
<table style="width:100%">
|
|
347
356
|
<tr>
|
|
348
|
-
{{#
|
|
357
|
+
{{#if multiReferenceImage.length}}
|
|
349
358
|
<td style="width:50%">
|
|
350
359
|
<div class="Reference"><span>Reference Image</span><br>
|
|
351
|
-
|
|
360
|
+
{{#each multiReferenceImage}}
|
|
361
|
+
<img src="{{this}}" width="200" height="180" />
|
|
362
|
+
{{/each}}
|
|
352
363
|
</div>
|
|
353
364
|
</td>
|
|
354
|
-
{{/
|
|
365
|
+
{{/if}}
|
|
355
366
|
<td style="width:50%">
|
|
356
367
|
<div class="Reference"><span>Uploaded Image</span><br>
|
|
357
368
|
<img src="{{answer}}" width="200" height="180" />
|
|
@@ -70,6 +70,8 @@
|
|
|
70
70
|
.q-answer-text.flagged{color:#a32d2d}
|
|
71
71
|
.q-answer-media{margin-top:8px}
|
|
72
72
|
.q-answer-media img,.q-answer-media video,.q-answer-item td img{display:block;width:200px;height:180px;object-fit:cover;border-radius:6px;margin-bottom:6px}
|
|
73
|
+
.img-grid{display:flex;flex-wrap:wrap;gap:8px}
|
|
74
|
+
.img-grid img{margin-bottom:0}
|
|
73
75
|
.q-answer-link{font-size:12px;color:#0085D2;text-decoration:underline;word-break:break-all}
|
|
74
76
|
.q-answer-caption{font-size:11px;color:#666;margin-bottom:4px}
|
|
75
77
|
.q-answer-remarks{font-size:11px;color:#666;margin-top:6px;white-space:pre-line}
|
|
@@ -181,16 +183,18 @@
|
|
|
181
183
|
</div>
|
|
182
184
|
{{#if this.questionReferenceImage}}
|
|
183
185
|
<div class="q-answer-media">
|
|
184
|
-
<div class="q-answer-caption">Reference Image</div>
|
|
186
|
+
<div class="q-answer-caption">Question Reference Image</div>
|
|
185
187
|
<img src="{{this.questionReferenceImage}}" alt="Reference Image" />
|
|
186
188
|
</div>
|
|
187
189
|
{{/if}}
|
|
188
190
|
{{#if this.multiQuestionReferenceImage.length}}
|
|
189
191
|
<div class="q-answer-media">
|
|
190
|
-
<div class="q-answer-caption">Reference Images</div>
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
<div class="q-answer-caption">Question Reference Images</div>
|
|
193
|
+
<div class="img-grid">
|
|
194
|
+
{{#each this.multiQuestionReferenceImage}}
|
|
195
|
+
<img src="{{this}}" alt="Reference Image" />
|
|
196
|
+
{{/each}}
|
|
197
|
+
</div>
|
|
194
198
|
</div>
|
|
195
199
|
{{/if}}
|
|
196
200
|
{{!-- <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> --}}
|
|
@@ -198,25 +202,6 @@
|
|
|
198
202
|
<div class="q-answer-list">
|
|
199
203
|
{{#each this.userAnswer}}
|
|
200
204
|
<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}}
|
|
220
205
|
{{#eq this.answerType 'text'}}
|
|
221
206
|
{{#if this.answer}}
|
|
222
207
|
<div class="q-answer-text {{#if this.sopFlag}}flagged{{/if}}">{{this.answer}}</div>
|
|
@@ -230,13 +215,83 @@
|
|
|
230
215
|
</div>
|
|
231
216
|
{{/if}}
|
|
232
217
|
{{/eq}}
|
|
218
|
+
{{#eq this.validationDisplayType 'text'}}
|
|
219
|
+
{{#if this.validationAnswer}}
|
|
220
|
+
<div class="q-answer-text {{#if this.sopFlag}}flagged{{/if}}">validation Answer: {{this.validationAnswer}}</div>
|
|
221
|
+
{{/if}}
|
|
222
|
+
{{/eq}}
|
|
223
|
+
{{#eq this.validationDisplayType 'video'}}
|
|
224
|
+
{{#if this.validationAnswer}}
|
|
225
|
+
<div class="q-answer-caption">Validation Video</div>
|
|
226
|
+
<a class="q-answer-link" href="{{this.validationAnswer}}" target="_blank">{{this.validationAnswer}}</a>
|
|
227
|
+
{{/if}}
|
|
228
|
+
{{/eq}}
|
|
233
229
|
|
|
234
|
-
<table style="width:100%;margin-top:8px"><tr>
|
|
235
|
-
<td style="vertical-align:top">
|
|
230
|
+
<table style="width:100%;margin-top:8px;table-layout:fixed"><tr>
|
|
231
|
+
<td style="width:50%;vertical-align:top;padding-right:8px">
|
|
232
|
+
{{#neq ../answerType 'image/video'}}
|
|
233
|
+
{{#neq ../answerType 'multipleImage'}}
|
|
234
|
+
{{#if this.multiReferenceImage.length}}
|
|
235
|
+
<div class="q-answer-media">
|
|
236
|
+
<div class="q-answer-caption">Reference Images</div>
|
|
237
|
+
{{#each this.multiReferenceImage}}
|
|
238
|
+
<img src="{{this}}" alt="Reference Image" />
|
|
239
|
+
{{/each}}
|
|
240
|
+
</div>
|
|
241
|
+
{{else}}
|
|
242
|
+
{{#if this.referenceImage}}
|
|
243
|
+
<div class="q-answer-media">
|
|
244
|
+
<div class="q-answer-caption">Reference Image</div>
|
|
245
|
+
<img src="{{this.referenceImage}}" alt="Reference Image" />
|
|
246
|
+
</div>
|
|
247
|
+
{{else}}
|
|
248
|
+
{{#eq this.answerType 'image'}}
|
|
249
|
+
{{#if this.answer}}
|
|
250
|
+
<div class="q-answer-media">
|
|
251
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
252
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
253
|
+
</div>
|
|
254
|
+
{{/if}}
|
|
255
|
+
{{/eq}}
|
|
256
|
+
{{/if}}
|
|
257
|
+
{{/if}}
|
|
258
|
+
{{else}}
|
|
259
|
+
{{#eq this.answerType 'image'}}
|
|
260
|
+
{{#if this.answer}}
|
|
261
|
+
<div class="q-answer-media">
|
|
262
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
263
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
264
|
+
</div>
|
|
265
|
+
{{/if}}
|
|
266
|
+
{{/eq}}
|
|
267
|
+
{{/neq}}
|
|
268
|
+
{{else}}
|
|
269
|
+
{{#eq this.answerType 'image'}}
|
|
270
|
+
{{#if this.answer}}
|
|
271
|
+
<div class="q-answer-media">
|
|
272
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
273
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
274
|
+
</div>
|
|
275
|
+
{{/if}}
|
|
276
|
+
{{/eq}}
|
|
277
|
+
{{/neq}}
|
|
278
|
+
</td>
|
|
279
|
+
<td style="width:50%;vertical-align:top;padding-left:8px">
|
|
236
280
|
{{#eq this.answerType 'image'}}
|
|
237
281
|
{{#if this.answer}}
|
|
238
|
-
|
|
239
|
-
|
|
282
|
+
{{#neq ../answerType 'image/video'}}
|
|
283
|
+
{{#neq ../answerType 'multipleImage'}}
|
|
284
|
+
{{#if this.multiReferenceImage.length}}
|
|
285
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
286
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
287
|
+
{{else}}
|
|
288
|
+
{{#if this.referenceImage}}
|
|
289
|
+
<div class="q-answer-caption">Uploaded Image</div>
|
|
290
|
+
<img src="{{this.answer}}" alt="Uploaded Image" />
|
|
291
|
+
{{/if}}
|
|
292
|
+
{{/if}}
|
|
293
|
+
{{/neq}}
|
|
294
|
+
{{/neq}}
|
|
240
295
|
{{/if}}
|
|
241
296
|
{{/eq}}
|
|
242
297
|
{{#if this.validation}}
|
|
@@ -245,18 +300,7 @@
|
|
|
245
300
|
<div class="q-answer-caption">Validation Image</div>
|
|
246
301
|
<img src="{{this.validationAnswer}}" alt="Validation Image" />
|
|
247
302
|
{{/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}}
|
|
303
|
+
{{/eq}}
|
|
260
304
|
{{#eq this.validationDisplayType 'multiImage'}}
|
|
261
305
|
{{#if this.validationImage.length}}
|
|
262
306
|
<div class="q-answer-caption">Validation Image</div>
|