modified th api's for bin, contract and task to have as passed in as a prop and not get it ffrom the global state directly in the api
This commit is contained in:
parent
4bcac4e346
commit
e2f5eb0557
31 changed files with 155 additions and 507 deletions
|
|
@ -408,7 +408,7 @@ export default function BinSettings(props: Props) {
|
|||
if (form.inventory) form.inventory.inventoryControl = inventoryControl;
|
||||
|
||||
binAPI
|
||||
.addBin(form)
|
||||
.addBin(form, as)
|
||||
.then(resp => {
|
||||
openSnack("Successfully created bin");
|
||||
if (!coords) {
|
||||
|
|
@ -451,7 +451,7 @@ export default function BinSettings(props: Props) {
|
|||
form.autoGrainNode = autoTopNode;
|
||||
if (form.inventory) form.inventory.inventoryControl = inventoryControl;
|
||||
binAPI
|
||||
.updateBin(bin.key(), form)
|
||||
.updateBin(bin.key(), form, as)
|
||||
.then(response => {
|
||||
openSnack("Updated " + bin.name());
|
||||
close(true);
|
||||
|
|
@ -491,7 +491,7 @@ export default function BinSettings(props: Props) {
|
|||
const removeBin = () => {
|
||||
if (bin && bin.key()) {
|
||||
binAPI
|
||||
.removeBin(bin.key())
|
||||
.removeBin(bin.key(), as)
|
||||
.then(response => {
|
||||
openSnack(bin.name() + " was removed");
|
||||
navigate("/bins");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue