tango-app-api-store-builder 1.0.0-beta-225 → 1.0.0-beta-226
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
|
@@ -7094,7 +7094,7 @@ export async function updateProductMapping( req, res ) {
|
|
|
7094
7094
|
await planoMappingService.deleteMany( { storeId: store.storeId } );
|
|
7095
7095
|
let mappingInsertData = await planoMappingService.insertMany( mappingData );
|
|
7096
7096
|
mappingInsertData = new Map( mappingInsertData.map( ( ele, index ) => [ index, ele ] ) );
|
|
7097
|
-
let date =
|
|
7097
|
+
let date = dayjs().format();
|
|
7098
7098
|
complianceData.forEach( ( compliance, index ) => {
|
|
7099
7099
|
compliance.planoMappingId = mappingInsertData.get( index );
|
|
7100
7100
|
compliance.createdAt = date;
|
|
@@ -7122,9 +7122,6 @@ export async function calculateCompliance( req, res ) {
|
|
|
7122
7122
|
compliance: 'proper',
|
|
7123
7123
|
},
|
|
7124
7124
|
},
|
|
7125
|
-
{
|
|
7126
|
-
$sort: { createdAt: -1 },
|
|
7127
|
-
},
|
|
7128
7125
|
{
|
|
7129
7126
|
$group: {
|
|
7130
7127
|
_id: '$createdAt',
|
|
@@ -7138,6 +7135,9 @@ export async function calculateCompliance( req, res ) {
|
|
|
7138
7135
|
count: 1,
|
|
7139
7136
|
},
|
|
7140
7137
|
},
|
|
7138
|
+
{
|
|
7139
|
+
$sort: { date: -1 },
|
|
7140
|
+
},
|
|
7141
7141
|
{
|
|
7142
7142
|
$limit: 2,
|
|
7143
7143
|
},
|
|
@@ -7182,7 +7182,7 @@ export async function calculateCompliance( req, res ) {
|
|
|
7182
7182
|
let diff = previousMerchCompliance - result.merchCompliance;
|
|
7183
7183
|
result.previousMerchCompliance = diff;
|
|
7184
7184
|
}
|
|
7185
|
-
result.lastCheck = dayjs
|
|
7185
|
+
result.lastCheck = dayjs( getCompliance?.[0]?.date ).format( 'hh:mm A' );
|
|
7186
7186
|
}
|
|
7187
7187
|
}
|
|
7188
7188
|
return res.sendSuccess( result );
|