Feat: write data on edit
This commit is contained in:
@@ -183,11 +183,11 @@ const travail = {
|
||||
},
|
||||
loadMonths (context) {
|
||||
// import all months from storage
|
||||
|
||||
readFile(context.rootGetters["config/dataFilePath"], (err, data) => {
|
||||
if (err) throw err;
|
||||
const months = Papa.parse(data.toString(), {header: true, dynamicTyping:true})
|
||||
.data.reduce(
|
||||
const months = Papa.parse(data.toString(), {header: true, dynamicTyping:true, skipEmptyLines:true})
|
||||
.data
|
||||
.reduce(
|
||||
(acc, el) => {
|
||||
acc[el.date] = el;
|
||||
return acc
|
||||
|
||||
Reference in New Issue
Block a user