fixed bug where the linear progress never went away because the loading boolean was never being reset when no contracts were loaded, also added to the note in the contracts that the names of custom types have to match
This commit is contained in:
parent
b5f6139bc0
commit
1487c78466
2 changed files with 13 additions and 11 deletions
|
|
@ -40,16 +40,18 @@ export default function Contracts() {
|
|||
.then(resp => {
|
||||
let contracts: Contract[] = [];
|
||||
let contractPermissions: Map<string, pond.Permission[]> = new Map();
|
||||
resp.data.contracts.forEach(contract => {
|
||||
let c = Contract.create(contract);
|
||||
contracts.push(c);
|
||||
let p = pond.EvaluatePermissionsResponse.fromObject(
|
||||
resp.data.contractPermissions[c.key()]
|
||||
);
|
||||
contractPermissions.set(c.key(), p.permissions);
|
||||
});
|
||||
setContracts(contracts);
|
||||
setContractPermissions(contractPermissions);
|
||||
if (resp.data.contracts){
|
||||
resp.data.contracts.forEach(contract => {
|
||||
let c = Contract.create(contract);
|
||||
contracts.push(c);
|
||||
let p = pond.EvaluatePermissionsResponse.fromObject(
|
||||
resp.data.contractPermissions[c.key()]
|
||||
);
|
||||
contractPermissions.set(c.key(), p.permissions);
|
||||
});
|
||||
setContracts(contracts);
|
||||
setContractPermissions(contractPermissions);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
.catch(err => {});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue