Report list fixes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
679600f003
commit
b28402f7a7
@ -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 },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user