From adda43b5c06dbf6e838e3bffbf331f09b8212402 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Thu, 9 Jan 2025 14:58:51 +0530 Subject: [PATCH 1/2] Improved: Added checks for various cases on the "Learn More" modal(#726) - If a summary is not present for a job, an empty state will appear on the modal. - If sources are not present for any reason, the summary may still be visible on the modal. --- src/components/LearnMoreModal.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/LearnMoreModal.vue b/src/components/LearnMoreModal.vue index 877389e5..86be8c59 100644 --- a/src/components/LearnMoreModal.vue +++ b/src/components/LearnMoreModal.vue @@ -23,7 +23,7 @@ -
+

{{ translate("The job details is not generating, please try again later.") }}

@@ -37,11 +37,11 @@ - + {{ translate("Sources") }} - + {{ section.title }} @@ -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; } From fc393e784867daf5eeb34f8120f40eb26eccfa8d Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Thu, 9 Jan 2025 19:10:32 +0530 Subject: [PATCH 2/2] Improved: Refactor empty state condition to remove redundant parentheses(#726) --- src/components/LearnMoreModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LearnMoreModal.vue b/src/components/LearnMoreModal.vue index 86be8c59..836d3d8b 100644 --- a/src/components/LearnMoreModal.vue +++ b/src/components/LearnMoreModal.vue @@ -23,7 +23,7 @@
-
+

{{ translate("The job details is not generating, please try again later.") }}