Skip to content

Commit

Permalink
Reverted: unwanted spinner on the pages since we have added skeleton …
Browse files Browse the repository at this point in the history
…text (hotwax#720)
  • Loading branch information
amansinghbais committed Nov 26, 2024
1 parent 27ac99e commit b35df66
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 65 deletions.
15 changes: 2 additions & 13 deletions src/views/Brokering.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
</ion-header>

<ion-content>
<div class="empty-state" v-if="jobsLoading">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Fetching jobs") }}
</ion-item>
</div>
<main v-else>
<main>
<section>
<ion-button expand="block" :disabled="!hasPermission(Actions.APP_JOB_UPDATE)" @click="addBatch()">{{ translate('Create new brokering job') }}</ion-button>

Expand Down Expand Up @@ -89,7 +83,6 @@ import {
IonMenuButton,
IonPage,
IonRow,
IonSpinner,
IonTitle,
IonToggle,
IonToolbar,
Expand Down Expand Up @@ -128,7 +121,6 @@ export default defineComponent({
IonMenuButton,
IonPage,
IonRow,
IonSpinner,
IonTitle,
IonToggle,
IonToolbar,
Expand All @@ -146,8 +138,7 @@ export default defineComponent({
isJobDetailAnimationCompleted: false,
isDesktop: isPlatform('desktop'),
enumTypeId: 'BROKER_SYS_JOB',
initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any,
jobsLoading: false
initialLoadJobEnums: JSON.parse(process.env?.VUE_APP_INITIAL_JOB_ENUMS as string) as any
}
},
computed: {
Expand Down Expand Up @@ -219,7 +210,6 @@ export default defineComponent({
},
async fetchJobs(JobDetailDismissRequired = false) {
if(JobDetailDismissRequired) {
this.jobsLoading = true;
this.currentJob = "";
await this.store.dispatch('job/updateCurrentJob', { });
this.currentJobStatus = "";
Expand All @@ -242,7 +232,6 @@ export default defineComponent({
"systemJobEnumId_op": "in"
}
});
this.jobsLoading = false;
},
timeFromNow(time: any) {
const timeDiff = DateTime.fromMillis(time).diff(DateTime.local());
Expand Down
15 changes: 2 additions & 13 deletions src/views/InitialLoad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
</ion-header>

<ion-content>
<div class="empty-state" v-if="jobsLoading">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Fetching jobs") }}
</ion-item>
</div>
<main v-else>
<main>
<section>
<ion-card>
<ion-card-header>
Expand Down Expand Up @@ -80,7 +74,6 @@ import {
IonLabel,
IonMenuButton,
IonPage,
IonSpinner,
IonTitle,
IonToggle,
IonToolbar,
Expand Down Expand Up @@ -110,7 +103,6 @@ export default defineComponent({
IonLabel,
IonMenuButton,
IonPage,
IonSpinner,
IonTitle,
IonToggle,
IonToolbar
Expand All @@ -123,8 +115,7 @@ export default defineComponent({
job: {} as any,
lastShopifyOrderId: '',
isJobDetailAnimationCompleted: false,
isDesktop: isPlatform('desktop'),
jobsLoading: false
isDesktop: isPlatform('desktop')
}
},
mounted() {
Expand Down Expand Up @@ -218,7 +209,6 @@ export default defineComponent({
},
async fetchJobs(JobDetailDismissRequired = false){
if(JobDetailDismissRequired) {
this.jobsLoading = true;
this.currentSelectedJobModal = "";
await this.store.dispatch('job/updateCurrentJob', { });
this.job = {};
Expand All @@ -232,7 +222,6 @@ export default defineComponent({
}
})
this.store.dispatch('webhook/fetchWebhooks')
this.jobsLoading = false;
},
async updateWebhook(checked: boolean, enumId: string) {
const webhook = this.getCachedWebhook[this.webhookEnums[enumId]]
Expand Down
15 changes: 2 additions & 13 deletions src/views/Miscellaneous.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
</ion-header>

<ion-content>
<div class="empty-state" v-if="jobsLoading">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Fetching jobs") }}
</ion-item>
</div>
<main v-else>
<main>
<section>
<!-- Empty state -->
<div v-if="miscellaneousJobs?.length === 0">
Expand Down Expand Up @@ -65,7 +59,6 @@ import {
IonMenuButton,
IonNote,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
isPlatform,
Expand Down Expand Up @@ -93,7 +86,6 @@ export default defineComponent({
IonMenuButton,
IonNote,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
JobConfiguration
Expand All @@ -113,8 +105,7 @@ export default defineComponent({
currentJobStatus: '',
isJobDetailAnimationCompleted: false,
isDesktop: isPlatform('desktop'),
isRetrying: false,
jobsLoading: false
isRetrying: false
}
},
computed: {
Expand Down Expand Up @@ -161,14 +152,12 @@ export default defineComponent({
},
async updateProductStoreConfig(JobDetailDismissRequired = false) {
if(JobDetailDismissRequired) {
this.jobsLoading = true;
this.currentJob = "";
await this.store.dispatch('job/updateCurrentJob', { });
this.currentJobStatus = "";
this.isJobDetailAnimationCompleted = false;
}
this.getMiscellaneousJobs();
this.jobsLoading = false;
},
async loadMoreMiscellaneousJobs (event: any) {
this.getMiscellaneousJobs(
Expand Down
15 changes: 2 additions & 13 deletions src/views/PreOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
</ion-header>

<ion-content>
<div class="empty-state" v-if="jobsLoading">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Fetching jobs") }}
</ion-item>
</div>
<main v-else>
<main>
<section>
<ion-card>
<ion-card-header>
Expand Down Expand Up @@ -191,7 +185,6 @@ import {
IonLabel,
IonMenuButton,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
isPlatform
Expand Down Expand Up @@ -225,7 +218,6 @@ export default defineComponent({
IonLabel,
IonMenuButton,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
JobConfiguration,
Expand All @@ -252,8 +244,7 @@ export default defineComponent({
isJobDetailAnimationCompleted: false,
isDesktop: isPlatform('desktop'),
enumTypeId: 'PRE_ORD_SYS_JOB',
preOrderBackorderCategory: {} as any,
jobsLoading: false
preOrderBackorderCategory: {} as any
}
},
methods: {
Expand Down Expand Up @@ -374,7 +365,6 @@ export default defineComponent({
},
async fetchInitialData(JobDetailDismissRequired = false) {
if(JobDetailDismissRequired) {
this.jobsLoading = true;
this.currentJob = "";
await this.store.dispatch('job/updateCurrentJob', { });
this.currentJobStatus = ""
Expand All @@ -383,7 +373,6 @@ export default defineComponent({
}
await this.fetchJobs();
await this.getPreOrderBackorderCategory();
this.jobsLoading = false;
}
},
mounted () {
Expand Down
15 changes: 2 additions & 13 deletions src/views/Reports.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@
</ion-header>

<ion-content>
<div class="empty-state" v-if="jobsLoading">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Fetching jobs") }}
</ion-item>
</div>
<main v-else>
<main>
<section>
<div v-if="!reportsJobs?.length">
<p class="ion-text-center">{{ translate("There are no reports jobs right now") }}</p>
Expand Down Expand Up @@ -63,7 +57,6 @@ import {
IonMenuButton,
IonNote,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
isPlatform,
Expand Down Expand Up @@ -91,7 +84,6 @@ export default defineComponent({
IonMenuButton,
IonNote,
IonPage,
IonSpinner,
IonTitle,
IonToolbar,
JobConfiguration
Expand All @@ -103,8 +95,7 @@ export default defineComponent({
currentJobStatus: '',
isJobDetailAnimationCompleted: false,
isDesktop: isPlatform('desktop'),
isRetrying: false,
jobsLoading: false
isRetrying: false
}
},
computed: {
Expand Down Expand Up @@ -149,14 +140,12 @@ export default defineComponent({
},
async updateProductStoreConfig(JobDetailDismissRequired = false) {
if(JobDetailDismissRequired) {
this.jobsLoading = true;
this.currentJob = "";
await this.store.dispatch('job/updateCurrentJob', { });
this.currentJobStatus = "";
this.isJobDetailAnimationCompleted = false;
}
await this.getReportsJobs()
this.jobsLoading = false;
},
async loadMoreReportsJobs(event: any) {
this.getReportsJobs(
Expand Down

0 comments on commit b35df66

Please sign in to comment.