tango-app-api-trax 1.0.0-beta-task.26 → 1.0.0-beta-task.27

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": "1.0.0-beta-task.26",
3
+ "version": "1.0.0-beta-task.27",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,7 +18,14 @@ import utc from 'dayjs/plugin/utc.js';
18
18
  import { logger } from 'tango-app-api-middleware';
19
19
  import mongoose from 'mongoose';
20
20
  import admin from 'firebase-admin';
21
-
21
+ import path from 'path';
22
+ import { fileURLToPath } from 'url';
23
+ const __filename = fileURLToPath( import.meta.url ); // Get the current file path
24
+ const __dirname = path.dirname( __filename );
25
+ const serviceAccountPath = path.join( __dirname, '..', '..', 'fir-51e77-firebase-adminsdk-x3sdp-fd902b74ae.json' );
26
+ admin.initializeApp( {
27
+ credential: admin.credential.cert( serviceAccountPath ),
28
+ } );
22
29
 
23
30
  const ObjectId = mongoose.Types.ObjectId;
24
31
  dayjs.extend( customParseFormat );
@@ -180,7 +180,8 @@ export async function startChecklist( req, res ) {
180
180
  startTime: { $ifNull: [ '$startTime', '' ] },
181
181
  submitTime: { $ifNull: [ '$submitTime', '' ] },
182
182
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
183
- allowedStoreLocation: { $ifNull: [ '$checallowedStoreLocationkListName', false ] },
183
+ // allowedStoreLocation: { $ifNull: [ '$checallowedStoreLocationkListName', false ] },
184
+ allowedStoreLocation: false,
184
185
  questionAnswers: { $ifNull: [ '$questionAnswers', '' ] },
185
186
  redoStatus: { $ifNull: [ '$redoStatus', '' ] },
186
187
  },
@@ -344,7 +345,8 @@ export async function startTask( req, res ) {
344
345
  startTime: { $ifNull: [ '$startTime', '' ] },
345
346
  submitTime: { $ifNull: [ '$submitTime', '' ] },
346
347
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
347
- allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', false ] },
348
+ // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', false ] },
349
+ allowedStoreLocation: false,
348
350
  questionAnswers: { $ifNull: [ '$questionAnswers', '' ] },
349
351
  redoStatus: { $ifNull: [ '$redoStatus', '' ] },
350
352
  },
@@ -1792,7 +1794,8 @@ export async function checklist( req, res ) {
1792
1794
  startTime: { $ifNull: [ '$startTime', '' ] },
1793
1795
  submitTime: { $ifNull: [ '$submitTime', '' ] },
1794
1796
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
1795
- allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1797
+ // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1798
+ allowedStoreLocation: false,
1796
1799
  reinitiateStatus: { $ifNull: [ '$reinitiateStatus', '' ] },
1797
1800
  startTime_string: { $ifNull: [ '$startTime_string', '' ] },
1798
1801
  submitTime_string: { $ifNull: [ '$submitTime_string', '' ] },
@@ -1856,7 +1859,8 @@ export async function checklistv1( req, res ) {
1856
1859
  startTime: { $ifNull: [ '$startTime', '' ] },
1857
1860
  submitTime: { $ifNull: [ '$submitTime', '' ] },
1858
1861
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
1859
- allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1862
+ // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1863
+ allowedStoreLocation: false,
1860
1864
  reinitiateStatus: { $ifNull: [ '$reinitiateStatus', '' ] },
1861
1865
  startTime_string: { $ifNull: [ '$startTime_string', '' ] },
1862
1866
  submitTime_string: { $ifNull: [ '$submitTime_string', '' ] },
@@ -1939,7 +1943,8 @@ export async function questionList( req, res ) {
1939
1943
  startTime: { $ifNull: [ '$startTime', '' ] },
1940
1944
  submitTime: { $ifNull: [ '$submitTime', '' ] },
1941
1945
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
1942
- allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1946
+ // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
1947
+ allowedStoreLocation: false,
1943
1948
  reinitiateStatus: { $ifNull: [ '$reinitiateStatus', '' ] },
1944
1949
  questionAnswers: { $ifNull: [ '$questionAnswers', '' ] },
1945
1950
  getchecklist: { $ifNull: [ '$getchecklist', '' ] },
@@ -2237,7 +2242,8 @@ export async function taskQuestionList( req, res ) {
2237
2242
  startTime: { $ifNull: [ '$startTime', '' ] },
2238
2243
  submitTime: { $ifNull: [ '$submitTime', '' ] },
2239
2244
  allowedOverTime: { $ifNull: [ '$allowedOverTime', '' ] },
2240
- allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
2245
+ // allowedStoreLocation: { $ifNull: [ '$allowedStoreLocation', '' ] },
2246
+ allowedStoreLocation: false,
2241
2247
  reinitiateStatus: { $ifNull: [ '$reinitiateStatus', '' ] },
2242
2248
  questionAnswers: { $ifNull: [ '$questionAnswers', '' ] },
2243
2249
  getchecklist: { $ifNull: [ '$getchecklist', '' ] },
@@ -3594,6 +3594,7 @@ export async function sendAlert( req, res ) {
3594
3594
  userId: 1,
3595
3595
  scheduleEndTime: 1,
3596
3596
  remainder: 1,
3597
+ checklistStatus: 1,
3597
3598
  },
3598
3599
  } );
3599
3600