Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not cache task and request results
  • Loading branch information
nolanpro committed May 29, 2024
commit bfe33210a41fa0661faea37de8bf8202558cd964
3 changes: 3 additions & 0 deletions resources/js/requests/components/RequestsListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ export default {
cancelToken: new CancelToken((c) => {
this.cancelToken = c;
}),
headers: {
'Cache-Control': 'no-cache',
}
},
)
.then((response) => {
Expand Down
5 changes: 4 additions & 1 deletion resources/js/tasks/components/ListMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ const ListMixin = {
advancedFilter +
this.columnsQuery,

{ dataLoadingId: this.dataLoadingId }
{
dataLoadingId: this.dataLoadingId,
headers: { 'Cache-Control': 'no-cache'}
},
)
.then((response) => {
this.data = this.transform(response.data);
Expand Down
8 changes: 0 additions & 8 deletions resources/js/tasks/components/TasksList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -441,22 +441,14 @@ export default {
this.setupColumns();
this.getFilterConfiguration();

window.addEventListener('popstate', this.handlePageShow);

const params = new URL(document.location).searchParams;
const successRouting = params.get("successfulRouting") === "true";
if (successRouting) {
ProcessMaker.alert(this.$t("The request was completed."), "success");
}
this.$emit('onRendered', this);
},
beforeDestroy() {
window.removeEventListener('popstate', this.handlePageShow);
},
methods: {
handlePageShow() {
window.location.reload();
},
markSelectedRow(value) {
this.selectedRow = value;
},
Expand Down