Mercurial > gemma
changeset 4698:a130b5e55ffc
import_overview: save additional information for approval dialogue in the store
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 16 Oct 2019 16:48:20 +0200 |
parents | ce55f15e25e0 |
children | ef2cf9c413e9 |
files | client/src/components/importoverview/ImportOverview.vue client/src/store/imports.js |
diffstat | 2 files changed, 9 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importoverview/ImportOverview.vue Wed Oct 16 16:40:08 2019 +0200 +++ b/client/src/components/importoverview/ImportOverview.vue Wed Oct 16 16:48:20 2019 +0200 @@ -459,12 +459,11 @@ let popupContent = `<table class="table table-sm small mb-0 border-0" style="margin-top: -1px;">`; this.reviewed.forEach(r => { - let imp = this.imports.find(i => i.id === r.id); let approved = STATES.APPROVED === r.status; popupContent += `<tr> - <td>${imp.id}</td> - <td>${imp.kind.toUpperCase()}</td> - <td>${this.$options.filters.dateTime(imp.enqueued)}</td> + <td>${r.id}</td> + <td>${r.kind.toUpperCase()}</td> + <td>${this.$options.filters.dateTime(r.enqueued)}</td> <td class="text-${approved ? "success" : "danger"}"> ${this.$gettext(approved ? "approved" : "declined")} </td>
--- a/client/src/store/imports.js Wed Oct 16 16:40:08 2019 +0200 +++ b/client/src/store/imports.js Wed Oct 16 16:48:20 2019 +0200 @@ -198,7 +198,12 @@ if (index !== -1) { state.reviewed[index].status = newStatus; } else { - state.reviewed.push({ id: stagedResult.id, status: newStatus }); + state.reviewed.push({ + id: stagedResult.id, + status: newStatus, + kind: stagedResult.kind, + enqueued: stagedResult.enqueued + }); } } }