Skip to content

Commit

Permalink
Merge pull request #759 from R-Sourabh/#726-Learn-more
Browse files Browse the repository at this point in the history
Improved: Added checks for various cases on the "Learn More" modal(#726)
  • Loading branch information
ymaheshwari1 authored Jan 10, 2025
2 parents dcb96b5 + fc393e7 commit ec37509
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/LearnMoreModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ion-item>
</div>

<div class="empty-state" v-else-if="!Object.keys(askResponse).length">
<div class="empty-state" v-else-if="!askResponse.text">
<ion-item lines="none">
<p>{{ translate("The job details is not generating, please try again later.") }}</p>
</ion-item>
Expand All @@ -37,11 +37,11 @@
</ion-label>
</ion-item>

<ion-list>
<ion-list v-if="jobSection.length">
<ion-item lines="none">
<ion-label>{{ translate("Sources") }}</ion-label>
</ion-item>
<ion-row class="ion-padding" v-for="section in jobSection" :key="section.id">
<ion-row class="ion-padding-start" v-for="section in jobSection" :key="section.id">
<ion-chip outline @click="redirectToDoc(section)">
<ion-label>{{ section.title }}</ion-label>
<ion-icon :icon="openOutline" />
Expand Down Expand Up @@ -138,7 +138,7 @@ export default defineComponent({
this.askResponse = resp.data.answer;
if(this.askResponse) {
const pageIds = this.askResponse?.sources.map((source: any) => source.page);
this.searchQuery(pageIds);
pageIds && pageIds.length ? this.searchQuery(pageIds) : this.isGeneratingAnswer = false
} else {
this.isGeneratingAnswer = false;
}
Expand Down

0 comments on commit ec37509

Please sign in to comment.