add SetFolderIcon for CreateFolder on mobile device, change SetFolderIcon payload

This commit is contained in:
Milos Holba
2021-02-26 17:14:21 +01:00
parent 7a963cf5b3
commit 7dd4e65d77
11 changed files with 87 additions and 65 deletions

View File

@@ -106,7 +106,7 @@ const actions = {
})
.catch(() => Vue.prototype.$isSomethingWrong())
},
createFolder: ({ commit, getters, dispatch }, folderName) => {
createFolder: ({ commit, getters, dispatch }, folder) => {
// Get route
let route = getters.sharedDetail && !getters.sharedDetail.protected
@@ -116,7 +116,8 @@ const actions = {
axios
.post(route, {
parent_id: getters.currentFolder.unique_id,
name: folderName
name: folder.name,
icon: folder.icon
})
.then(response => {
commit('ADD_NEW_FOLDER', response.data)
@@ -151,7 +152,7 @@ const actions = {
.post(route, {
name: data.name,
type: data.type,
folder_icon: data.folder_icon,
icon: data.icon,
_method: 'patch'
})
.then(response => {