fix: Custom job request fix

This commit is contained in:
Marcin Czerniak 2021-06-21 12:08:57 +02:00
parent e2b2cf607f
commit 99a3fade00
5 changed files with 11 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 612 B

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

After

Width:  |  Height:  |  Size: 693 B

View File

@ -2,7 +2,7 @@ class OrdersView {
constructor() {
OrdersView.instance = this;
this.lastRecognizedText = '';
this.addMultipleCanvases(10);
@ -129,16 +129,18 @@ class OrdersView {
}
addOrderByString(str) {
const numberStr = str.substring(str.length - 2, str.length);
const text = str.substring(0, str.length - 2);
const numberStr = str.substring(str.length - 3, str.length);
const text = str.substring(0, str.length - 3);
const number = parseInt(numberStr);
Products.instance.addCustomJobRequest({
product: Product.REGISTRY[text],
amount: number,
x: 11,
y: 7,
});
console.log(text, number);
Products.instance.addCustomJobRequest(
Product.REGISTRY[text],
number,
11,
7,
);
this.closeWindow();
}