Fixed missing history, due to visibility

This commit is contained in:
Maximilian Giller 2021-04-13 19:21:40 +02:00
parent 8c884779bf
commit e9154924f8
5 changed files with 11 additions and 5 deletions

View file

@ -110,7 +110,6 @@ export default {
}
},
addedTags: function() {
Object.values(this.record.tags).forEach(t => console.log(t.visible));
return Object.values(this.record.tags).filter(
t => !this.onlyVisible || t.visible
);

View file

@ -98,6 +98,9 @@ export const jugglService = {
if (options.finished !== undefined) {
payload.finished = options.finished;
}
if (options.visible !== undefined) {
payload.visible = options.visible;
}
return apiService.post("/getRecords.php", payload).then(r => {
return {

View file

@ -200,12 +200,16 @@ export const juggl = {
return true;
});
},
loadRecords({ commit, state, getters }, { limit, finished }) {
loadRecords({ commit, state, getters }, { limit, finished, visible }) {
if (limit !== undefined) {
commit("setRecordsLimit", limit);
}
var payload = { limit: state.recordsLimit, finished: finished };
var payload = {
limit: state.recordsLimit,
finished: finished,
visible: visible
};
return jugglService.getRecords(payload).then(r => {
var allRecords = Object.values(r.data.records);

View file

@ -60,7 +60,7 @@ export default {
store.dispatch("loadTags");
store.dispatch("loadProjects");
store
.dispatch("loadRecords", { limit: 0, finished: true })
.dispatch("loadRecords", { limit: 0, finished: true, visible: true })
.then(() => {
this.working = false;
})

View file

@ -57,7 +57,7 @@ export default {
store.dispatch("loadProjects");
store.dispatch("loadTags");
store.dispatch("loadRunningRecords");
store.dispatch("loadRecords", { limit: 10, finished: true });
store.dispatch("loadRecords", { limit: 10, finished: true, visible: true });
}
};
</script>