Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Search MVP in one commit #100

Merged
merged 4 commits into from
May 10, 2017
Merged

Search MVP in one commit #100

merged 4 commits into from
May 10, 2017

Conversation

bryan-gilbert
Copy link
Contributor

Created by deleting my fork. Recreate fork. Take a directory with all the code and remove the .git references. Copy over the new fork. Then carefully determine what is in and not in.

Copy link
Contributor

@marklise marklise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address before merging in - no need to re-review.

resolve({data: data, count: c});
}
});
} else {
// console.log('search.error = ' + JSON.stringify(error));
console.log('search.error = ' + JSON.stringify(error));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

// return the paginated results with the total count
resolve({data: sorted, count: cnt});
} else {
console.log('search.error = ' + JSON.stringify(error));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

var name = req.query.collection;
var Dbclass;
var fields;
switch(name) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Declare Dbclass at the top.
Remove the switch statement, turn it into an IF.
Reject if the name != 'documents'

return model.search (searchFields, queryOptions);
}
setSessionContext (req)
.then (function (opts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

for (var key in options.filterByFields) {
if (options.filterByFields.hasOwnProperty(key)) {
filter[key] = options.filterByFields[key];
console.log(filter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console.log

@@ -1,10 +1,20 @@
'use strict';

module.exports = function (app) {
// Root routing
var core = require('../controllers/core.server.controller');
var path = require('path');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mix of spaces and tabs between vars and "="

<a ng-if="infoPanel.data.userCan.read"
class="btn btn-sm btn-default"
href="/api/document/{{ infoPanel.data._id }}/fetch"
target="_self"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

target _blank.

controllerAs: 'instruct',
size: 'lg'
});
modalInstructions.result.then(function (data) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this?

@bryan-gilbert
Copy link
Contributor Author

ready

@marklise marklise merged commit feec124 into bcgov:master May 10, 2017
@bryan-gilbert bryan-gilbert deleted the SearchMVP branch May 12, 2017 23:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants