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 +3 -2
- package/src/controllers/internalAPI.controller.js +12 -9
- package/src/controllers/task.controller.js +811 -57
- package/src/controllers/taskActionCenter.controllers.js +141 -29
- package/src/controllers/taskDashboard.controllers.js +278 -33
- package/src/routes/task.routes.js +11 -1
- package/src/routes/taskActionCenter.routes.js +4 -2
- package/src/routes/taskDashboard.routes.js +12 -10
- package/src/service/processedChecklist.service.js +8 -0
- package/src/service/processedTaskList.service.js +4 -0
- package/src/service/user.service.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-task",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
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
|
-
"
|
|
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
|
-
|
|
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}
|
|
143
|
-
endTimeIso = dayjs.utc(
|
|
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 =
|
|
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 ) {
|