tango-app-api-trax 3.8.18-nike → 3.8.19-nike
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
|
@@ -3001,13 +3001,13 @@ export async function dashboardv1( req, res ) {
|
|
|
3001
3001
|
// eslint-disable-next-line camelcase
|
|
3002
3002
|
// store_id,
|
|
3003
3003
|
userId,
|
|
3004
|
-
|
|
3004
|
+
date_string: date,
|
|
3005
3005
|
timeFlagStatus: true,
|
|
3006
3006
|
...clientId,
|
|
3007
3007
|
...storeMatch,
|
|
3008
3008
|
};
|
|
3009
3009
|
const buildPipeline = ( matchExtraConditions = {} ) => [
|
|
3010
|
-
{ $match: { ...baseMatch, ...matchExtraConditions } },
|
|
3010
|
+
{ $match: { $or: [ { ...baseMatch, ...matchExtraConditions }, { $and: [ { redoStatus: true }, { scheduleStartTime_iso: { $lt: toDate } }, { scheduleEndTime_iso: { $gte: fromDate } }, { userId }, { ...storeMatch } ] } ] } },
|
|
3011
3011
|
{
|
|
3012
3012
|
$facet: {
|
|
3013
3013
|
total: [ { $count: 'total' } ],
|
|
@@ -3221,18 +3221,13 @@ export async function checklistv1( req, res ) {
|
|
|
3221
3221
|
// eslint-disable-next-line camelcase
|
|
3222
3222
|
// { store_id },
|
|
3223
3223
|
{ userId },
|
|
3224
|
-
|
|
3224
|
+
{ $or: [ { date_string: date }, { $and: [ { redoStatus: true }, { scheduleEndTime_iso: { $gte: fromDate } } ] } ] },
|
|
3225
3225
|
{ timeFlagStatus: true },
|
|
3226
3226
|
...matchExtraConditions,
|
|
3227
3227
|
clientId,
|
|
3228
3228
|
storeMatch,
|
|
3229
3229
|
];
|
|
3230
|
-
|
|
3231
|
-
matchConditions.push( { $or: [ { date_string: date }, { $and: [ { redoStatus: true }, { scheduleEndTime_iso: { $gte: fromDate } } ] } ] } );
|
|
3232
|
-
}
|
|
3233
|
-
if ( checklistStatus == 'submit' ) {
|
|
3234
|
-
matchConditions.push( { date_string: date } );
|
|
3235
|
-
}
|
|
3230
|
+
|
|
3236
3231
|
if ( checklistStatus ) {
|
|
3237
3232
|
matchConditions.push( { checklistStatus } );
|
|
3238
3233
|
}
|