Report list fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-05-17 11:36:36 +02:00
parent 679600f003
commit b28402f7a7
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 7 additions and 4 deletions

View File

@ -480,13 +480,15 @@ export default class Report extends Vue {
);
return;
}
const updatedReport = data.updateReportStatus;
report.status = updatedReport.status;
const updatedReport = {
...report,
status: data.updateReportStatus.status,
};
store.writeQuery({
query: REPORT,
variables: { id: this.report.id },
data: { report },
data: { report: updatedReport },
});
},
});

View File

@ -90,7 +90,7 @@ import VueRouter from "vue-router";
import { Paginate } from "@/types/paginate";
const { isNavigationFailure, NavigationFailureType } = VueRouter;
const REPORT_PAGE_LIMIT = 1;
const REPORT_PAGE_LIMIT = 10;
@Component({
components: {
@ -99,6 +99,7 @@ const REPORT_PAGE_LIMIT = 1;
},
apollo: {
reports: {
fetchPolicy: "cache-and-network",
query: REPORTS,
variables() {
return {