tango-app-api-task 3.3.1-beta-4 → 3.3.1-beta-5
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
|
@@ -24,6 +24,7 @@ import * as taskProcessedService from '../service/processedTaskList.service.js';
|
|
|
24
24
|
import * as ApproverModel from '../service/approver.service.js';
|
|
25
25
|
import { createTeamsModel, findOneTeams, updateOneTeamModel, findteams } from '../service/teams.service.js';
|
|
26
26
|
import { sendPushNotification } from 'tango-app-api-middleware';
|
|
27
|
+
import * as checklistService from '../service/checklist.service.js';
|
|
27
28
|
async function LamdaServiceCall( url, data ) {
|
|
28
29
|
try {
|
|
29
30
|
const requestOptions = {
|
|
@@ -1564,6 +1565,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
1564
1565
|
|
|
1565
1566
|
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
1566
1567
|
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
1568
|
+
let checklistDetails = await checklistService.findOne( { _id: inputBody?.checkListId }, { coverage: 1 } );
|
|
1567
1569
|
let data = {
|
|
1568
1570
|
checkListName: inputBody.checkListName,
|
|
1569
1571
|
checkListDescription: inputBody.checkListDescription,
|
|
@@ -1581,6 +1583,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
1581
1583
|
publishDate: new Date(),
|
|
1582
1584
|
locationCount: 1,
|
|
1583
1585
|
...( inputBody?.checkListId ) ? { referenceCheckListId: inputBody?.checkListId } : {},
|
|
1586
|
+
coverage: checklistDetails?.coverage || 'store',
|
|
1584
1587
|
};
|
|
1585
1588
|
|
|
1586
1589
|
if ( req.user.userType == 'tango' || ( req.user.userType == 'client' && [ 'user' ].includes( req.user.role ) ) ) {
|