fixed all eslint errors and warning, compiled as PROD
This commit is contained in:
@@ -361,20 +361,20 @@ export default {
|
||||
loadMaterial(){
|
||||
console.log('loadMaterial', this.item.id)
|
||||
this.loading = true
|
||||
let ast = gql`{
|
||||
const ast = gql`{
|
||||
materiau(id: ${this.item.id}, lang: "${drupalDecoupled.lang_code}") {
|
||||
...MateriauFields
|
||||
}
|
||||
}
|
||||
${ materiauFields }
|
||||
${materiauFields}
|
||||
`
|
||||
MGQ.post('', { query: print(ast)
|
||||
})
|
||||
.then(({ data:{data:{materiau}}}) => {
|
||||
console.log('loadMaterial material loaded', materiau )
|
||||
console.log('loadMaterial material loaded', materiau)
|
||||
this.material = materiau
|
||||
this.loading = false
|
||||
if(materiau.note && materiau.note.id){
|
||||
if (materiau.note && materiau.note.id) {
|
||||
this.note_id = materiau.note.id
|
||||
this.note = materiau.note.contenu
|
||||
}
|
||||
@@ -394,41 +394,41 @@ export default {
|
||||
this.is_creating_folder = true;
|
||||
this.createFlagColl(this.new_folder_name)
|
||||
.then(data => {
|
||||
console.log("Card onCreateFlagColl then", data);
|
||||
console.log("Card onCreateFlagColl then", data)
|
||||
this.new_folder_name = "";
|
||||
this.is_creating_folder = false;
|
||||
let collid = data.id
|
||||
this.loadingFlag = collid;
|
||||
this.flagUnflag({ action: 'flag', id: this.item.id, collid: collid})
|
||||
.then(data => {
|
||||
console.log("onFlagActionCard then", data);
|
||||
console.log("onFlagActionCard then", data)
|
||||
this.loadingFlag = false;
|
||||
})
|
||||
})
|
||||
},
|
||||
flagIsActive(collid) {
|
||||
// console.log(this.item.uuid);
|
||||
// console.log(this.flagcolls[collid].items_uuids);
|
||||
// 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.indexOf(this.item.id) !== -1;
|
||||
},
|
||||
flagIsLoading(collid) {
|
||||
// console.log(this.item.uuid);
|
||||
// console.log(this.flagcolls[collid].items_uuids);
|
||||
// console.log(this.item.uuid)
|
||||
// console.log(this.flagcolls[collid].items_uuids)
|
||||
return collid === this.loadingFlag;
|
||||
},
|
||||
onFlagActionCard (e) {
|
||||
console.log("Card onFlagActionCard", e);
|
||||
console.log("Card onFlagActionCard", e)
|
||||
if (!this.loadingFlag) {
|
||||
let collid = e.target.getAttribute('collid');
|
||||
let isActive = this.flagIsActive(collid);
|
||||
let action = isActive ? 'unflag' : 'flag';
|
||||
// console.log('collid', collid);
|
||||
// console.log("this.item", this.item);
|
||||
// console.log('collid', collid)
|
||||
// console.log("this.item", this.item)
|
||||
this.loadingFlag = collid;
|
||||
this.flagUnflag({ action: action, id: this.item.id, collid: collid})
|
||||
.then(data => {
|
||||
console.log("onFlagActionCard then", data);
|
||||
console.log("onFlagActionCard then", data)
|
||||
this.loadingFlag = false;
|
||||
})
|
||||
}
|
||||
@@ -448,10 +448,10 @@ export default {
|
||||
return url.replace(/^http:\/\//, '').replace(/^www\./, '')
|
||||
},
|
||||
saveNote(){
|
||||
console.log("saveNote", this.note);
|
||||
if(this.note_nid){
|
||||
console.log("saveNote", this.note)
|
||||
if (this.note_nid) {
|
||||
this.updateNote()
|
||||
}else{
|
||||
} else {
|
||||
this.createNote()
|
||||
}
|
||||
},
|
||||
@@ -511,7 +511,7 @@ export default {
|
||||
onTapCard (e) {
|
||||
console.log('ontapCard', e)
|
||||
let tools = this.$refs['tools'].querySelectorAll('section.tool')
|
||||
// console.log();
|
||||
// console.log()
|
||||
tools.forEach((item, i) => {
|
||||
console.log('item', item)
|
||||
item.classList.remove('tapped')
|
||||
|
Reference in New Issue
Block a user