some shit..
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import { defineStore } from "pinia";
|
||||
import { useEmployees } from "../employees";
|
||||
import { useUser } from "../user";
|
||||
import axios from '@/axios'
|
||||
import _clone from "lodash/clone";
|
||||
import _difference from "lodash/difference";
|
||||
import _pull from "lodash/pull";
|
||||
@@ -40,8 +42,21 @@ export const settingsEmployeesIndex = defineStore({
|
||||
* Persist columnsSelected to API
|
||||
*/
|
||||
async persist() {
|
||||
console.log("persist")
|
||||
console.log(this.columnsSelected)
|
||||
const user = useUser()
|
||||
|
||||
const result = await axios.post('settings',
|
||||
{
|
||||
settings: [
|
||||
{
|
||||
key: "employees-index-columns-selected",
|
||||
value: JSON.stringify(this.columnsSelected)
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
headers: user.header
|
||||
})
|
||||
console.log(result)
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user