Skip to content

Commit

Permalink
Removed inventory barcode scan from Stock Lots
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcameron committed May 11, 2022
1 parent bd8a9b8 commit 007ab78
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 29 deletions.
1 change: 1 addition & 0 deletions client/src/i18n/en/barcode.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"BARCODE": "Barcode",
"SCAN": "Scan",
"SCAN_BARCODE" : "Scan Barcode",
"SCAN_LOT_BARCODE" : "Scan Lot Barcode",
"SCAN_DOCUMENT" : "Scan Document Barcode",
"AWAITING_INPUT" : "Waiting for Input",
"AWAITING_HTTP" : "Barcode Read! Looking up Record...",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/barcode.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"BARCODE": "Code-barre",
"SCAN": "Scanner",
"SCAN_BARCODE" : "Scanner le code-barre",
"SCAN_LOT_BARCODE" : "Scanner le code-barre du lot",
"SCAN_DOCUMENT" : "Scanner le code-barres du document",
"AWAITING_INPUT" : "En Attente d'Entrée",
"AWAITING_HTTP" : "Code-barres lu! Recherche l'enregistrement....",
Expand Down
7 changes: 1 addition & 6 deletions client/src/modules/stock/lots/registry.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,9 @@
</a>
</li>
<li role="separator" class="divider"></li>
<li role="menuitem" bh-require-enterprise-setting="barcodes">
<a href ng-click="StockLotsCtrl.openBarcodeScanner()" data-action="scan-barcode">
<span class="fa fa-barcode"></span> <span translate>BARCODE.SCAN</span>
</a>
</li>
<li role="menuitem" bh-require-enterprise-setting="barcodes">
<a href ng-click="StockLotsCtrl.openLotBarcodeScanner()" data-action="scan-barcode">
<span class="fa fa-barcode"></span> <span translate>BARCODE.SCAN_BARCODE</span>
<span class="fa fa-barcode"></span> <span translate>BARCODE.SCAN_LOT_BARCODE</span>
</a>
</li>
</ul>
Expand Down
24 changes: 1 addition & 23 deletions client/src/modules/stock/lots/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ function StockLotsController(
// grouping box
vm.groupingBox = LotsRegistry.groupingBox;

// barcode scanner
vm.openBarcodeScanner = openBarcodeScanner;

// barcode scanner
// lot barcode scanner
vm.openLotBarcodeScanner = openLotBarcodeScanner;

// show lot barcode
Expand Down Expand Up @@ -282,25 +279,6 @@ function StockLotsController(
vm.gridApi.core.notifyDataChange(uiGridConstants.dataChange.COLUMN);
};

/**
* @function openBarcodeScanner
*
* @description
* Opens the barcode scanner component and receives the record from the
* modal.
*/
function openBarcodeScanner() {
Barcode.modal({ shouldSearch : false })
.then(record => {
stockLotFilters.replaceFilters([
{ key : 'inventory_uuid', value : record.uuid, displayValue : record.reference },
]);

load(stockLotFilters.formatHTTP(true));
vm.latestViewFilters = stockLotFilters.formatView();
});
}

function openLotBarcodeScanner() {
Barcode.modal({ shouldSearch : false })
.then(record => {
Expand Down

0 comments on commit 007ab78

Please sign in to comment.