Skip to content

Commit

Permalink
Add Hook Manual Inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmr authored and cconard96 committed Dec 27, 2022
1 parent 31a3272 commit 3f63573
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions js/camerainput.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class CameraInput {
this.possibleHooks = [
this.hookGlobalSearch,
this.hookPhysicalInventoryPlugin,
this.hookManualInventoryPlugin,
this.hookAssetAuditPlugin,
this.hookAssetForm,
this.hookSearch
Expand Down Expand Up @@ -142,6 +143,14 @@ class CameraInput {
}
}

hookManualInventoryPlugin(class_obj) {
if (window.location.href.indexOf('/manualinventory/front') > -1) {
const maninv_search = $('.ic-table').first();
class_obj.injectCameraInputButton(maninv_search.find('input[name="serial_number"]'), undefined, true);
class_obj.injectCameraInputButton(maninv_search.find('input[name="otherserial"]'), undefined, true);
}
}

hookAssetAuditPlugin(class_obj) {
if (window.location.href.indexOf('/assetaudit/front') > -1) {
const assetaudit_search = $('main form').first();
Expand Down

0 comments on commit 3f63573

Please sign in to comment.