tango-app-api-task 1.0.0-alpha.3 → 1.0.0-alpha.31

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-task",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.31",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -23,7 +23,8 @@
23
23
  "handlebars": "^4.7.8",
24
24
  "mongodb": "^6.10.0",
25
25
  "nodemon": "^3.1.7",
26
- "tango-api-schema": "^2.1.90",
26
+ "npm": "^10.9.2",
27
+ "tango-api-schema": "^2.2.2",
27
28
  "tango-app-api-middleware": "^3.1.43-alpha.10",
28
29
  "winston": "^3.17.0",
29
30
  "winston-daily-rotate-file": "^5.0.0"
@@ -133,21 +133,22 @@ async function insertData( requestData ) {
133
133
  for ( let [ index2, element2 ] of resultchecklist.entries() ) {
134
134
  let getCLconfig = await taskService.findOne( { _id: element2 } );
135
135
  if ( getCLconfig ) {
136
- if ( dayjs( getCLconfig?.scheduleDate ).format( 'YYYY-MM-DD' ) != dayjs( date ).format( 'YYYY-MM-DD' ) ) {
137
- getCLconfig.scheduleEndTime = '11:59 PM';
138
- }
139
- console.log( getCLconfig.scheduleEndTime );
140
-
136
+ // if ( dayjs( getCLconfig?.scheduleDate ).format( 'YYYY-MM-DD' ) != dayjs( date ).format( 'YYYY-MM-DD' ) ) {
137
+ // getCLconfig.scheduleEndTime = '11:59 PM';
138
+ // }
139
+ // console.log( getCLconfig.scheduleEndTime );
140
+ let sTime = dayjs.utc( getCLconfig.publishDate ).format( 'hh:mm A' );
141
141
  let startTimeIso; let endTimeIso;
142
- startTimeIso = dayjs.utc( `${currentdate} 12:00 AM`, 'YYYY-MM-DD hh:mm A' );
143
- endTimeIso = dayjs.utc( `${currentdate} ${getCLconfig.scheduleEndTime}`, 'YYYY-MM-DD hh:mm A' );
142
+ startTimeIso = dayjs.utc( `${currentdate} ${sTime}`, 'YYYY-MM-DD hh:mm A' );
143
+ endTimeIso = dayjs.utc( getCLconfig.scheduleEndTimeISO );
144
144
  console.log( endTimeIso );
145
145
 
146
146
  let insertdata = {};
147
- insertdata.date_iso = startTimeIso.format();
147
+ insertdata.date_iso = new Date( dayjs( currentdate, 'YYYY-MM-DD' ).format( 'YYYY-MM-DD' ) );
148
148
  insertdata.date_string = currentdate;
149
149
  insertdata.sourceCheckList_id = getCLconfig._id;
150
150
  insertdata.checkListName = getCLconfig.checkListName;
151
+ insertdata.checkListDescription = getCLconfig.checkListDescription;
151
152
  insertdata.publish = getCLconfig.publish;
152
153
  insertdata.scheduleStartTime = startTimeIso.format();
153
154
  insertdata.scheduleStartTime_iso = startTimeIso.format();
@@ -209,7 +210,7 @@ async function insertData( requestData ) {
209
210
  checkListId: element2,
210
211
  checkFlag: true,
211
212
  isdeleted: false,
212
- ...( getCLconfig?.reinitiate ) ? { reinitiate: true } : {},
213
+ // ...( getCLconfig?.reinitiate ) ? { reinitiate: true } : {},
213
214
  },
214
215
  } );
215
216
  let allQuestion = await taskAssignService.aggregate( getquestionQuery );
@@ -244,6 +245,7 @@ async function insertData( requestData ) {
244
245
  delete element4.updatedAt;
245
246
  element4.checkListId = updatedchecklist._id;
246
247
  element4.checkListName = getCLconfig.checkListName;
248
+ element4.checkListDescription = getCLconfig.checkListDescription;
247
249
  element4.date_iso = new Date( currentdate );
248
250
  element4.date_string = currentdate;
249
251
  element4.allowedOverTime = false;
@@ -261,6 +263,7 @@ async function insertData( requestData ) {
261
263
  element4.publishDate = getCLconfig.publishDate;
262
264
  element4.locationCount = getCLconfig.locationCount;
263
265
  element4.scheduleRepeatedType = 'daily';
266
+ element4.priorityType = getCLconfig.priorityType;
264
267
  element4.approvalEnable = getCLconfig.approver.length ? true : false;
265
268
  }
266
269
  if ( userIdList.length ) {