fixed all eslint errors and warning, compiled as PROD
This commit is contained in:
@@ -18,7 +18,6 @@ import Blabla from './modules/blabla'
|
||||
import Showrooms from './modules/showrooms'
|
||||
import Pages from './modules/pages'
|
||||
|
||||
|
||||
// https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart
|
||||
|
||||
Vue.use(Vuex)
|
||||
@@ -38,16 +37,16 @@ export default createStore(Vuex.Store, {
|
||||
loadMaterialsGQL ({ dispatch }, { ids, gqlfragment, callBack, callBackArgs }) {
|
||||
console.log('loadMaterialsGQL ids', ids)
|
||||
|
||||
let ast = gql`{
|
||||
const ast = gql`{
|
||||
materiaux(ids: [${ids}]) {
|
||||
...MateriauFields
|
||||
}
|
||||
}
|
||||
${ gqlfragment }
|
||||
${gqlfragment}
|
||||
`
|
||||
MGQ.post('', { query: print(ast) })
|
||||
.then(( resp ) => {
|
||||
console.log('loadMaterialsGQL resp', resp )
|
||||
.then((resp) => {
|
||||
console.log('loadMaterialsGQL resp', resp)
|
||||
// dispatch('parseMaterialsGQL', {
|
||||
// items: resp.data.data.materiaux,
|
||||
// callBack: callBack,
|
||||
@@ -79,7 +78,7 @@ export default createStore(Vuex.Store, {
|
||||
// params[`filter[${uuid}][condition][operator]`] = '='
|
||||
// params[`filter[${uuid}][condition][memberOf]`] = 'uuids-groupe'
|
||||
// }
|
||||
// // console.log('search JSONAPI params', params);
|
||||
// // console.log('search JSONAPI params', params)
|
||||
// const q = qs.stringify(params)
|
||||
// return JSONAPI.get('node/materiau?' + q)
|
||||
// .then(({ data }) => {
|
||||
@@ -98,12 +97,12 @@ export default createStore(Vuex.Store, {
|
||||
// // so we loop from uuids to conserve the original order
|
||||
// console.log('mixin parseMaterials', data, uuids, callBack, callBackArgs)
|
||||
// const items = []
|
||||
// // for (var i = 0; i < data.length; i++) {
|
||||
// // for (let i = 0; i < data.length; i++) {
|
||||
// for (let i = 0; i < uuids.length; i++) {
|
||||
// const uuid = uuids[i]
|
||||
// // https://stackoverflow.com/questions/11258077/how-to-find-index-of-an-object-by-key-and-value-in-an-javascript-array
|
||||
// const item_index = data.findIndex(p => p.id === uuid)
|
||||
// // console.log('item_index', item_index);
|
||||
// // console.log('item_index', item_index)
|
||||
// if (item_index === -1) continue
|
||||
//
|
||||
// const item_src = data[item_index]
|
||||
@@ -121,14 +120,14 @@ export default createStore(Vuex.Store, {
|
||||
//
|
||||
// // get images included values
|
||||
// const img_src = relations.images.data
|
||||
// // console.log('img_src', img_src);
|
||||
// // console.log('img_src', img_src)
|
||||
// // this is a temporary deactivation of images
|
||||
// // img_src = [];
|
||||
// item.images = []
|
||||
// for (let j = 0; j < img_src.length; j++) {
|
||||
// if (img_src[j].meta.imageDerivatives) {
|
||||
// let img_styles = {}
|
||||
// for (var k = 0; k < imgStyle.length; k++) {
|
||||
// for (let k = 0; k < imgStyle.length; k++) {
|
||||
// img_styles[imgStyle[k]] = img_src[j].meta.imageDerivatives.links.[imgStyle[k]].href
|
||||
// }
|
||||
// item.images.push({
|
||||
|
Reference in New Issue
Block a user