|
|
@@ -62,25 +62,25 @@ export const actions = {
|
|
|
return axios.get(`/api/product/kind/${id}/parentsWithBothers`)
|
|
|
.then(response => {
|
|
|
commit('kind/GET_KINDPARENTSWITHBOTHERS_SUCCESS', response.data)
|
|
|
- if (response.data) {
|
|
|
- if (!response.data[response.data.length - 1].leaf) {
|
|
|
- // commit('kind/REQUEST_CHILDREN')
|
|
|
- // return axios.get(`/api/product/kind/${id}/children`)
|
|
|
- // .then(response => {
|
|
|
- // commit('kind/GET_CHILDREN_SUCCESS', response.data)
|
|
|
- // }, err => {
|
|
|
- // commit('kind/GET_CHILDREN_FAILURE', err)
|
|
|
- // })
|
|
|
- } else {
|
|
|
- commit('kind/REQUEST_KINDPROPERTY')
|
|
|
- return axios.get(`/api/product/kind/${id}/properties/values`)
|
|
|
- .then(response => {
|
|
|
- commit('kind/GET_KINDPROPERTY_SUCCESS', response.data)
|
|
|
- }, err => {
|
|
|
- commit('kind/GET_KINDPROPERTY_FAILURE', err)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ // if (response.data) {
|
|
|
+ // if (!response.data[response.data.length - 1].leaf) {
|
|
|
+ // // commit('kind/REQUEST_CHILDREN')
|
|
|
+ // // return axios.get(`/api/product/kind/${id}/children`)
|
|
|
+ // // .then(response => {
|
|
|
+ // // commit('kind/GET_CHILDREN_SUCCESS', response.data)
|
|
|
+ // // }, err => {
|
|
|
+ // // commit('kind/GET_CHILDREN_FAILURE', err)
|
|
|
+ // // })
|
|
|
+ // } else {
|
|
|
+ // // commit('kind/REQUEST_KINDPROPERTY')
|
|
|
+ // // return axios.get(`/api/product/kind/${id}/properties/values`)
|
|
|
+ // // .then(response => {
|
|
|
+ // // commit('kind/GET_KINDPROPERTY_SUCCESS', response.data)
|
|
|
+ // // }, err => {
|
|
|
+ // // commit('kind/GET_KINDPROPERTY_FAILURE', err)
|
|
|
+ // // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}, err => {
|
|
|
commit('kind/GET_KINDPARENTSWITHBOTHERS_FAILURE', err)
|
|
|
})
|