c2-mongoose 2.1.18 → 2.1.19
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/dist/flow/SearchFlow.js
CHANGED
|
@@ -253,11 +253,17 @@ var SearchFlow = /** @class */ (function () {
|
|
|
253
253
|
var values = value;
|
|
254
254
|
if ((0, Utils_1.isNotEmpty)(values[0])) {
|
|
255
255
|
var momentValue = (0, moment_1.default)(values[0]);
|
|
256
|
-
|
|
256
|
+
momentValue.hour(0);
|
|
257
|
+
momentValue.minute(0);
|
|
258
|
+
momentValue.second(0);
|
|
259
|
+
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $gte: momentValue.toDate() });
|
|
257
260
|
}
|
|
258
261
|
if ((0, Utils_1.isNotEmpty)(values[1])) {
|
|
259
262
|
var momentValue = (0, moment_1.default)(values[1]);
|
|
260
|
-
|
|
263
|
+
momentValue.hour(23);
|
|
264
|
+
momentValue.minute(59);
|
|
265
|
+
momentValue.second(59);
|
|
266
|
+
condition[fieldName] = __assign(__assign({}, condition[fieldName]), { $lte: momentValue.toDate() });
|
|
261
267
|
}
|
|
262
268
|
filters.$and.push(condition);
|
|
263
269
|
}
|
package/package.json
CHANGED
package/src/flow/SearchFlow.ts
CHANGED
|
@@ -175,17 +175,23 @@ abstract class SearchFlow {
|
|
|
175
175
|
var values = value as any
|
|
176
176
|
if (isNotEmpty(values[0])) {
|
|
177
177
|
var momentValue = moment(values[0])
|
|
178
|
+
momentValue.hour(0)
|
|
179
|
+
momentValue.minute(0)
|
|
180
|
+
momentValue.second(0)
|
|
178
181
|
condition[fieldName] = {
|
|
179
182
|
...condition[fieldName],
|
|
180
|
-
$gte: momentValue.toDate()
|
|
183
|
+
$gte: momentValue.toDate()
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
if (isNotEmpty(values[1])) {
|
|
185
188
|
var momentValue = moment(values[1])
|
|
189
|
+
momentValue.hour(23)
|
|
190
|
+
momentValue.minute(59)
|
|
191
|
+
momentValue.second(59)
|
|
186
192
|
condition[fieldName] = {
|
|
187
193
|
...condition[fieldName],
|
|
188
|
-
$lte: momentValue.toDate()
|
|
194
|
+
$lte: momentValue.toDate()
|
|
189
195
|
}
|
|
190
196
|
}
|
|
191
197
|
filters.$and.push(condition)
|