tango-app-api-report 3.0.8-dev → 3.0.9-dev
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
|
@@ -144,16 +144,18 @@ export async function clientReportList( req, res ) {
|
|
|
144
144
|
},
|
|
145
145
|
},
|
|
146
146
|
];
|
|
147
|
-
|
|
148
147
|
if ( inputData.sortColumnName ) {
|
|
149
148
|
const sortBy = inputData.sortBy || -1;
|
|
150
149
|
const sortColumnName =inputData.sortColumnName == 'clientId'? 'tangoId': inputData.sortColumnName;
|
|
151
|
-
query.push(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
150
|
+
query.push(
|
|
151
|
+
{
|
|
152
|
+
$sort: { fileDate: -1 },
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
$sort: { [sortColumnName]: sortBy },
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
);
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
|