# HG changeset patch # User Thomas Junk # Date 1551277200 -3600 # Node ID 7600bb49e158769b6834ac25befb564d4b61cbf0 # Parent 598b0c2624757a9adfdbb26977a7dbd31b8848d0 wip diff -r 598b0c262475 -r 7600bb49e158 client/src/store/imports.js --- a/client/src/store/imports.js Wed Feb 27 14:27:10 2019 +0100 +++ b/client/src/store/imports.js Wed Feb 27 15:20:00 2019 +0100 @@ -30,7 +30,9 @@ stretches: [], imports: [], staging: [], - importToReview: null + importToReview: null, + stagingVisible: true, + logsVisible: true }; }; @@ -67,6 +69,18 @@ init, namespaced: true, state: init(), + getters: { + processedReviews: state => { + return state.staging + .filter(x => x.status !== STATES.NEEDSAPPROVAL) + .map(r => { + return { + id: r.id, + state: r.status + }; + }); + } + }, mutations: { setStretches: (state, stretches) => { state.stretches = stretches; @@ -74,6 +88,12 @@ setImports: (state, imports) => { state.imports = imports; }, + setStagingVisibility: (state, visibility) => { + state.stagingVisible = visibility; + }, + setLogsVisibility: (state, visibility) => { + state.logsVisible = visibility; + }, setStaging: (state, staging) => { const enriched = staging.map(x => { return { ...x, status: STATES.NEEDSAPPROVAL }; @@ -166,7 +186,7 @@ }); }); }, - confirmReview({ commit }, reviewResults) { + confirmReview({ state }, reviewResults) { return new Promise((resolve, reject) => { HTTP.patch("/imports", reviewResults, { headers: {