Skip to content

Commit

Permalink
fix(UI): filter transfer by concerned depot and update the e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
DedrickEnc committed Aug 21, 2017
1 parent 8498216 commit 19209ad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function StockFindTransferModalController(Instance, StockService, Notify,
function toggleFilter() {
vm.filterEnabled = !vm.filterEnabled;
vm.gridOptions.enableFiltering = vm.filterEnabled;
vm.gridApi.core.notifyDataChange(uiGridConstants.dataChange.OPTIONS);
vm.gridApi.core.notifyDataChange(uiGridConstants.dataChange.COLUMN);
}

/** get transfer document */
Expand Down
3 changes: 2 additions & 1 deletion server/controllers/stock/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,13 @@ function getLots(sqlQuery, parameters, finalClauseParameter) {
JOIN stock_movement m ON m.lot_uuid = l.uuid AND m.flux_id = ${flux.FROM_PURCHASE}
JOIN depot d ON d.uuid = m.depot_uuid
`;
db.convert(params, ['uuid', 'depot_uuid', 'lot_uuid', 'inventory_uuid', 'document_uuid']);
db.convert(params, ['uuid', 'depot_uuid', 'lot_uuid', 'inventory_uuid', 'document_uuid', 'entity_uuid']);
const filters = new FilterParser(params, { autoParseStatements : false });

filters.equals('uuid', 'uuid', 'l');
filters.equals('depot_text', 'text', 'd');
filters.equals('depot_uuid', 'depot_uuid', 'm');
filters.equals('entity_uuid', 'entity_uuid', 'm');
filters.equals('document_uuid', 'document_uuid', 'm');
filters.equals('lot_uuid', 'lot_uuid', 'm');
filters.equals('inventory_uuid', 'uuid', 'i');
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/stock/stock.entry.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function StockExiTests() {

it('Should entry stock from a transfer reception', () => {
// select the movement
page.setTransfer(1);
page.setTransfer(0);

page.setDate(new Date());

Expand Down

0 comments on commit 19209ad

Please sign in to comment.