-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding sub total and sorting capabilities #34
Conversation
@@ -20,11 +20,16 @@ export class MongoDeviceDAO implements DeviceDAO { | |||
.toArray(); | |||
} | |||
|
|||
async getFilteredDeviceCount(searchOptions: SearchOptions): Promise<number> { | |||
// console.log(await this.db.collection<Device>('device').countDocuments()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove this
@@ -5,11 +5,16 @@ export function getFilter(jsonFilters: Filter[]): any { | |||
const mongoFilters: any = {}; | |||
|
|||
jsonFilters.forEach((filter) => { | |||
if (filter.field === 'operational') { | |||
} | |||
// '~' is our symbol for 'contains' | |||
// the operational field is a boolean so do not try a partial match on this field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to clean up these docs
jest.resetAllMocks(); | ||
jest.restoreAllMocks(); | ||
|
||
// jest.resetAllMocks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove comments.
@@ -13,6 +13,7 @@ const QUERY_DEVICES = gql` | |||
query { | |||
devices(searchOptions: { batchSize: 10, offset: 10, sortOptions: { direction: DESC, field: "name" }, filter: "" }) { | |||
totalCount | |||
totalFilteredCount |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
@@ -43,8 +45,8 @@ beforeEach(async () => { | |||
afterEach(async () => { | |||
await db.collection('device').deleteMany({}); | |||
|
|||
// jest.resetAllMocks(); | |||
// jest.restoreAllMocks(); | |||
jest.resetAllMocks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u ended up needing these?
No description provided.