Skip to content

Commit

Permalink
Separate report routes for easier maintenance and better UX (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite authored Dec 1, 2023
1 parent 939a609 commit 957faa8
Show file tree
Hide file tree
Showing 13 changed files with 186 additions and 277 deletions.
1 change: 0 additions & 1 deletion resources/dist/build/assets/cp-29a31fdf.js

This file was deleted.

1 change: 1 addition & 0 deletions resources/dist/build/assets/cp-fd4a5639.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion resources/dist/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"css": [
"assets/cp-56146771.css"
],
"file": "assets/cp-29a31fdf.js",
"file": "assets/cp-fd4a5639.js",
"isEntry": true,
"src": "resources/js/cp.js"
}
Expand Down
57 changes: 0 additions & 57 deletions resources/js/components/reporting/Listing.vue

This file was deleted.

7 changes: 6 additions & 1 deletion resources/js/components/reporting/Report.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

<div>

<header class="flex items-center mb-6">
<h1 class="flex-1">{{ __('seo-pro::messages.seo_report') }}</h1>
<a :href="cp_url('seo-pro/reports/create')" class="btn-primary" v-if="! loading">{{ __('seo-pro::messages.generate_report') }}</a>
</header>

<div v-if="loading" class="card loading">
<span class="icon icon-circular-graph animation-spin"></span>
{{ __('seo-pro::messages.report_is_being_generated')}}
Expand Down Expand Up @@ -112,7 +117,7 @@ export default {
this.report = null;
Statamic.$request.get(cp_url(`seo-pro/reports/${this.id}`)).then(response => {
if (response.data.status === 'pending') {
if (response.data.status === 'pending' || response.data.status === 'generating') {
setTimeout(() => this.load(), 1000);
return;
}
Expand Down
Loading

0 comments on commit 957faa8

Please sign in to comment.