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; return;
} }
const updatedReport = data.updateReportStatus; const updatedReport = {
report.status = updatedReport.status; ...report,
status: data.updateReportStatus.status,
};
store.writeQuery({ store.writeQuery({
query: REPORT, query: REPORT,
variables: { id: this.report.id }, 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"; import { Paginate } from "@/types/paginate";
const { isNavigationFailure, NavigationFailureType } = VueRouter; const { isNavigationFailure, NavigationFailureType } = VueRouter;
const REPORT_PAGE_LIMIT = 1; const REPORT_PAGE_LIMIT = 10;
@Component({ @Component({
components: { components: {
@ -99,6 +99,7 @@ const REPORT_PAGE_LIMIT = 1;
}, },
apollo: { apollo: {
reports: { reports: {
fetchPolicy: "cache-and-network",
query: REPORTS, query: REPORTS,
variables() { variables() {
return { return {