tango-app-api-trax 3.8.11 → 3.8.13
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
|
@@ -4796,6 +4796,9 @@ export async function downloadChecklist( req, res ) {
|
|
|
4796
4796
|
if ( [ 'Capture Image', 'Capture Video' ].includes( answer.validationType ) && answer?.validationAnswer?.trim() ) {
|
|
4797
4797
|
answer.validationAnswer = JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.validationAnswer;
|
|
4798
4798
|
}
|
|
4799
|
+
if ( [ 'Capture Multiple Image with description' ].includes( answer.validationType ) && answer?.validationImage?.length ) {
|
|
4800
|
+
answer.validationImage = answer?.validationImage?.map( ( ele ) => JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.ele );
|
|
4801
|
+
}
|
|
4799
4802
|
if ( answer?.answer?.trim() && [ 'image', 'descriptiveImage', 'multipleImage', 'image/video', 'video' ].includes( question.answerType ) ) {
|
|
4800
4803
|
answer.answer = JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.answer;
|
|
4801
4804
|
}
|
|
@@ -1668,6 +1668,10 @@ export const updateConfigure = async ( req, res ) => {
|
|
|
1668
1668
|
return res.sendError( 'no data found', 204 );
|
|
1669
1669
|
}
|
|
1670
1670
|
|
|
1671
|
+
if ( inputBody.submitType == 'publish' && checklistDetails.checkListType == 'custom' && !checklistDetails.questionCount ) {
|
|
1672
|
+
return res.sendError( 'Question is required', 400 );
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1671
1675
|
let currentDate = dayjs.utc().format();
|
|
1672
1676
|
let updatedscheduleEndTimeISO = dayjs.utc( inputBody?.checkListDetails?.scheduleEndTime, 'hh:mm A' ).format( 'HH:mm:ss' );
|
|
1673
1677
|
let newUpdatedDate = dayjs.utc( updatedscheduleEndTimeISO, 'HH:mm:ss' ).format();
|
|
@@ -1958,6 +1962,9 @@ export const updateConfigurev1 = async ( req, res ) => {
|
|
|
1958
1962
|
if ( !checklistDetails ) {
|
|
1959
1963
|
return res.sendError( 'no data found', 204 );
|
|
1960
1964
|
}
|
|
1965
|
+
if ( inputBody.submitType == 'publish' && checklistDetails.checkListType == 'custom' && !checklistDetails.questionCount ) {
|
|
1966
|
+
return res.sendError( 'Question is required', 400 );
|
|
1967
|
+
}
|
|
1961
1968
|
let currentDate;
|
|
1962
1969
|
if ( inputBody.timeZone ) {
|
|
1963
1970
|
currentDate = dayjs().tz( inputBody.timeZone ).format();
|
|
@@ -2318,6 +2325,10 @@ export const updatePublish = async ( req, res ) => {
|
|
|
2318
2325
|
return res.sendError( 'no data found', 204 );
|
|
2319
2326
|
}
|
|
2320
2327
|
|
|
2328
|
+
if ( req?.body?.publish && getCheckDetails.checkListType == 'custom' && !getCheckDetails.questionCount ) {
|
|
2329
|
+
return res.sendError( 'Question is required', 400 );
|
|
2330
|
+
}
|
|
2331
|
+
|
|
2321
2332
|
if ( getCheckDetails?.publishDate && getCheckDetails.checkListType == 'custom' ) {
|
|
2322
2333
|
let date = dayjs();
|
|
2323
2334
|
let diff = date.diff( dayjs.utc( getCheckDetails?.publishDate ), 'minutes' );
|
package/src/hbs/template.hbs
CHANGED
|
@@ -223,6 +223,11 @@
|
|
|
223
223
|
{{#eq validationType 'Descriptive Answer'}}
|
|
224
224
|
{{validationAnswer}}
|
|
225
225
|
{{/eq}}
|
|
226
|
+
{{#eq validationType 'Capture Multiple Image with description'}}
|
|
227
|
+
{{#each validationImage}}
|
|
228
|
+
<img src="{{this}}" alt="test" width="200" height="180">
|
|
229
|
+
{{/each}}
|
|
230
|
+
{{/eq}}
|
|
226
231
|
{{/eq}}
|
|
227
232
|
{{/if}}
|
|
228
233
|
{{#eq ../answerType 'video'}}
|