tango-app-api-trax 3.7.13-qid-halfshutter-1 → 3.7.13-qid-halfshutter-3

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.7.13-qid-halfshutter-1",
3
+ "version": "3.7.13-qid-halfshutter-3",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "mongodb": "^6.8.0",
28
28
  "nodemon": "^3.1.4",
29
29
  "path": "^0.12.7",
30
- "tango-api-schema": "^2.4.5",
30
+ "tango-api-schema": "^2.4.11",
31
31
  "tango-app-api-middleware": "^3.5.2",
32
32
  "url": "^0.11.4",
33
33
  "winston": "^3.13.1",
@@ -17,6 +17,7 @@ import { aggregate, findOne } from '../services/user.service.js';
17
17
  import timeZone from 'dayjs/plugin/timezone.js';
18
18
  import customParseFormat from 'dayjs/plugin/customParseFormat.js';
19
19
  import * as notificationModel from '../services/notification.service.js';
20
+ import * as checklistService from '../services/checklist.service.js';
20
21
 
21
22
  dayjs.extend( customParseFormat );
22
23
  dayjs.extend( timeZone );
@@ -1524,3 +1525,34 @@ export async function exportTemplate( req, res ) {
1524
1525
  return res.sendError( { error: error }, 500 );
1525
1526
  }
1526
1527
  }
1528
+
1529
+ export async function getchecklistDetails( req, res ) {
1530
+ try {
1531
+ let reqestData = req.body;
1532
+ if ( reqestData.clientId && reqestData.clientId!='' ) {
1533
+ let query;
1534
+ if ( reqestData.checklistType && reqestData.checklistType != '' ) {
1535
+ query = { checkListType: reqestData.checklistType, client_id: reqestData.clientId };
1536
+ let getData = await checklistService.find( query );
1537
+ if ( getData && getData.length > 0 ) {
1538
+ return res.sendSuccess( getData );
1539
+ } else {
1540
+ return res.sendError( 'No Content', 204 );
1541
+ }
1542
+ } else if ( reqestData._id && reqestData._id != '' ) {
1543
+ query = { _id: new mongoose.Types.ObjectId( reqestData._id ), client_id: reqestData.clientId };
1544
+ let getData = await checklistService.find( query );
1545
+ if ( getData && getData.length > 0 ) {
1546
+ return res.sendSuccess( getData );
1547
+ } else {
1548
+ return res.sendError( 'No Content', 204 );
1549
+ }
1550
+ }
1551
+ } else {
1552
+ return res.sendError( 'Invalid client id', 400 );
1553
+ }
1554
+ } catch ( error ) {
1555
+ logger.error( { error: error, function: 'getchecklistDetails' } );
1556
+ return res.sendError( { error: error }, 500 );
1557
+ }
1558
+ }
@@ -289,6 +289,7 @@ export async function PCLconfigCreation( req, res ) {
289
289
  insertdata.allowedMultiSubmit = getCLconfig.allowedMultiSubmit;
290
290
  insertdata.rawImageUpload = getCLconfig.rawImageUpload || false;
291
291
  insertdata.rawVideoUpload = getCLconfig.rawVideoUpload || false;
292
+ insertdata.videoUploadTimeLimit = getCLconfig.videoUploadTimeLimit || 0;
292
293
  let collectSections = [];
293
294
  let sectionQuery = [];
294
295
  sectionQuery.push( {
@@ -574,6 +575,7 @@ export async function PCLconfigCreation( req, res ) {
574
575
  // }
575
576
  element4.rawImageUpload = getCLconfig?.rawImageUpload || false;
576
577
  element4.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
578
+ element4.videoUploadTimeLimit = getCLconfig?.videoUploadTimeLimit || 0;
577
579
  }
578
580
  if ( userIdList.length ) {
579
581
  allQuestion = allQuestion.filter( ( item ) => typeof item._id == 'undefined' );
@@ -865,6 +867,7 @@ async function insertData( requestData ) {
865
867
  insertdata.allowedMultiSubmit = getCLconfig.allowedMultiSubmit;
866
868
  insertdata.rawImageUpload = getCLconfig.rawImageUpload || false;
867
869
  insertdata.rawVideoUpload = getCLconfig.rawVideoUpload || false;
870
+ insertdata.videoUploadTimeLimit = getCLconfig.videoUploadTimeLimit || 0;
868
871
  let collectSections = [];
869
872
  let sectionQuery = [];
870
873
  sectionQuery.push( {
@@ -1147,6 +1150,7 @@ async function insertData( requestData ) {
1147
1150
  // }
1148
1151
  element4.rawImageUpload = getCLconfig?.rawImageUpload || false;
1149
1152
  element4.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
1153
+ element4.videoUploadTimeLimit = getCLconfig?.videoUploadTimeLimit || 0;
1150
1154
  }
1151
1155
  if ( userIdList.length ) {
1152
1156
  allQuestion = allQuestion.filter( ( item ) => typeof item._id == 'undefined' );
@@ -3035,6 +3035,7 @@ export async function questionListBackup( req, res ) {
3035
3035
  redoStatus: { $ifNull: [ '$redoStatus', false ] },
3036
3036
  rawImageUpload: { $ifNull: [ '$rawImageUpload', false ] },
3037
3037
  rawVideoUpload: { $ifNull: [ '$rawVideoUpload', false ] },
3038
+ videoUploadTimeLimit: { $ifNull: [ '$videoUploadTimeLimit', 0 ] },
3038
3039
  taskType: { $ifNull: [ '$planoType', '' ] },
3039
3040
  streamId: { $ifNull: [ '$streamId', '' ] },
3040
3041
  },
@@ -3213,6 +3214,7 @@ export async function questionList( req, res ) {
3213
3214
  redoStatus: { $ifNull: [ '$redoStatus', false ] },
3214
3215
  rawImageUpload: { $ifNull: [ '$rawImageUpload', false ] },
3215
3216
  rawVideoUpload: { $ifNull: [ '$rawVideoUpload', false ] },
3217
+ videoUploadTimeLimit: { $ifNull: [ '$videoUploadTimeLimit', 0 ] },
3216
3218
  taskType: { $ifNull: [ '$planoType', '' ] },
3217
3219
  streamId: { $ifNull: [ '$streamId', '' ] },
3218
3220
  },
@@ -4217,6 +4219,7 @@ export async function questionListV1( req, res ) {
4217
4219
  redoStatus: { $ifNull: [ '$redoStatus', false ] },
4218
4220
  rawImageUpload: { $ifNull: [ '$rawImageUpload', false ] },
4219
4221
  rawVideoUpload: { $ifNull: [ '$rawVideoUpload', false ] },
4222
+ videoUploadTimeLimit: { $ifNull: [ '$videoUploadTimeLimit', 0 ] },
4220
4223
  taskType: { $ifNull: [ '$planoType', '' ] },
4221
4224
  streamId: { $ifNull: [ '$streamId', '' ] },
4222
4225
  },
@@ -3163,6 +3163,7 @@ export async function insertSingleProcessData( checklistId, processId = 0, oldDa
3163
3163
  insertdata.coverage = getCLconfig?.coverage;
3164
3164
  insertdata.rawImageUpload = getCLconfig?.rawImageUpload || false;
3165
3165
  insertdata.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
3166
+ insertdata.videoUploadTimeLimit = getCLconfig?.videoUploadTimeLimit || 0;
3166
3167
 
3167
3168
  let collectSections = [];
3168
3169
  let sectionQuery = [];
@@ -3883,6 +3884,7 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
3883
3884
  element4.coverage = getCLconfig?.coverage;
3884
3885
  element4.rawImageUpload = getCLconfig?.rawImageUpload || false;
3885
3886
  element4.rawVideoUpload = getCLconfig?.rawVideoUpload || false;
3887
+ element4.videoUploadTimeLimit = getCLconfig?.videoUploadTimeLimit || 0;
3886
3888
  assignUserList.push( { ...element4 } );
3887
3889
  }
3888
3890
  } ) );
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { getchecklist, viewchecklist, getMobileUseagelist, storeOpencloselist, getcustomerunattendedlist,
4
4
  storesList, checklistDropdown, redoChecklist, redomultiChecklist, approveChecklist,
5
- approvalstatus, allapprovalstatus, getLogs, headerStoresV2, headerClustersV2, headerLocationsV2, teamsList, userList, checkNotificationCount, vehicleCheckInUpdate, taskvalidateUserData, getallchecklist, exportTemplate } from '../controllers/gallery.controller.js';
5
+ approvalstatus, allapprovalstatus, getLogs, headerStoresV2, headerClustersV2, headerLocationsV2, teamsList, userList, checkNotificationCount, vehicleCheckInUpdate, taskvalidateUserData, getallchecklist, exportTemplate, getchecklistDetails } from '../controllers/gallery.controller.js';
6
6
  import express from 'express';
7
7
  export const galleryRouter = express.Router();
8
8
  import { validate, isAllowedSessionHandler, isAllowedClient, getAssinedStore } from 'tango-app-api-middleware';
@@ -39,4 +39,5 @@ galleryRouter
39
39
  .post( '/checkNotificationCount', isAllowedSessionHandler, getAssinedStore, checkNotificationCount )
40
40
  .post( '/vehicleCheckInUpdate', isAllowedSessionHandler, vehicleCheckInUpdate )
41
41
  .post( '/exportTemplate', isAllowedSessionHandler, exportTemplate )
42
- .post( '/getallchecklist', isAllowedSessionHandler, getallchecklist );
42
+ .post( '/getallchecklist', isAllowedSessionHandler, getallchecklist )
43
+ .post( '/getchecklistDetails', isAllowedSessionHandler, getchecklistDetails );