refactored loadMaterials vuex mixins with graphql

This commit is contained in:
2020-12-23 18:05:25 +01:00
parent 665a550748
commit 53dcc8b854
15 changed files with 182 additions and 90 deletions

View File

@@ -105,7 +105,8 @@ export default {
flagIsActive(collid) {
// console.log(this.item.uuid);
// console.log(this.flagcolls[collid].items_uuids);
return this.flagcolls[collid].items_uuids.indexOf(this.item.uuid) !== -1;
// return this.flagcolls[collid].items_uuids.indexOf(this.item.uuid) !== -1;
return this.flagcolls[collid].items.indexOf(this.item.id) !== -1;
},
flagIsLoading(collid) {
// console.log(this.item.uuid);
@@ -121,7 +122,7 @@ export default {
// console.log('collid', collid);
// console.log("this.item", this.item);
this.loadingFlag = collid;
this.flagUnflag({ action: action, uuid: this.item.uuid, collid: collid})
this.flagUnflag({ action: action, id: this.item.id, collid: collid})
.then(data => {
console.log("onFlagActionCard then", data);
this.loadingFlag = false;