Skip to content

Commit

Permalink
Improved: added locale text & changed the component name(hotwax#726)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Nov 27, 2024
1 parent d0e255c commit 3d5326e
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 29 deletions.
7 changes: 4 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@hotwax/app-version-info": "^1.0.0",
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "1.15.4",
"@hotwax/oms-api": "^1.15.0",
"@hotwax/oms-api": "^1.14.0",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
"@ionic/vue-router": "^7.6.0",
Expand Down
8 changes: 4 additions & 4 deletions src/components/JobConfiguration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ import emitter from '@/event-bus';
import { Actions, hasPermission } from '@/authorization'
import CustomFrequencyModal from '@/components/CustomFrequencyModal.vue';
import JobParameterModal from '@/components/JobParameterModal.vue'
import LeareMoreModal from "./LeareMoreModal.vue";
import LearnMoreModal from "./LearnMoreModal.vue";
export default defineComponent({
name: "JobConfiguration",
Expand Down Expand Up @@ -285,11 +285,11 @@ export default defineComponent({
this.router.push({ name: 'DataManagerLogDetails', params: { jobId } })
},
async openLearnMoreModal() {
const openLearnMoreModal = await modalController.create({
component: LeareMoreModal,
const learnMoreModal = await modalController.create({
component: LearnMoreModal,
componentProps: {currentJob: this.currentJob}
})
return openLearnMoreModal.present()
return learnMoreModal.present()
},
getDateTime(time: any) {
return DateTime.fromMillis(time).toISO()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
<ion-icon slot="icon-only" :icon="closeOutline" />
</ion-button>
</ion-buttons>
<ion-title>{{ translate('Learn more.') }}</ion-title>
<ion-title>{{ translate("Learn more") }}</ion-title>
<ion-button slot="end" fill="clear" @click="redirectToJobsDoc()">
<ion-icon color="dark" :icon="openOutline" />
<ion-icon color="medium" :icon="openOutline" />
</ion-button>
</ion-toolbar>
</ion-header>

<ion-content>
<div class="empty-state" v-if="isGenratingAnswer">
<div class="empty-state" v-if="isGeneratingAnswer">
<ion-item lines="none">
<ion-spinner name="crescent" slot="start" />
{{ translate("Genrating answer...") }}
{{ translate("Generating answer...") }}
</ion-item>
</div>

Expand All @@ -37,7 +37,7 @@

<ion-list>
<ion-item lines="none">
<ion-label>Sources</ion-label>
<ion-label>{{ translate("Sources") }}</ion-label>
</ion-item>
<ion-item v-for="section in jobSection" :key="section.id" lines="none">
<ion-chip outline @click="redirectToDoc(section)">
Expand All @@ -49,7 +49,7 @@

<ion-item>
<ion-label>
<p class="overline">Summary</p>
<p class="overline">{{ translate("Summary") }}</p>
{{ askResponse?.text }}
</ion-label>
</ion-item>
Expand All @@ -64,6 +64,7 @@ import { translate } from '@hotwax/dxp-components';
import { defineComponent } from "vue";
import { hasError } from '@/utils'
import { askQuery, searchQuery } from "@/adapter";
import logger from "@/logger";
export default defineComponent({
name: "LearnMoreModal",
Expand All @@ -86,10 +87,10 @@ export default defineComponent({
queryString: '',
askResponse: {} as any,
jobSection: {} as any,
isGenratingAnswer: true
isGeneratingAnswer: true
}
},
props: ['currentJob'],
props: ["currentJob"],
mounted() {
this.askQuery();
},
Expand All @@ -112,13 +113,13 @@ export default defineComponent({
this.jobSection.push(...filteredPage.sections);
}
});
this.isGenratingAnswer = false;
this.isGeneratingAnswer = false;
} else {
throw resp.data;
}
} catch(error: any) {
console.error(error);
this.isGenratingAnswer = false;
logger.error(error);
this.isGeneratingAnswer = false;
}
},
async askQuery() {
Expand All @@ -136,14 +137,14 @@ export default defineComponent({
const pageIds = this.askResponse?.sources.map((source: any) => source.page);
this.searchQuery(pageIds);
} else {
this.isGenratingAnswer = false;
this.isGeneratingAnswer = false;
}
} else {
throw resp.data;
}
} catch(error: any) {
console.error(error);
this.isGenratingAnswer = false;
logger.error(error);
this.isGeneratingAnswer = false;
}
},
async redirectToDoc(section: any) {
Expand All @@ -157,7 +158,6 @@ export default defineComponent({
}
},
setup() {
return {
closeOutline,
openOutline,
Expand Down
6 changes: 4 additions & 2 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"Fulfilled": "Fulfilled",
"Fulfillment": "Fulfillment",
"Fulfillment status": "Fulfillment status",
"Genrating answer...": "Genrating answer...",
"Generating answer...": "Generating answer...",
"Get Paid Transactions": "Get Paid Transactions",
"Go to OMS": "Go to OMS",
"Go to Launchpad": "Go to Launchpad",
Expand Down Expand Up @@ -136,7 +136,7 @@
"Landed inventory cost": "Landed inventory cost",
"Last run": "Last run",
"Last Shopify Order ID": "Last Shopify Order ID",
"Learn more.": "Learn more.",
"Learn more": "Learn more",
"Loading": "Loading",
"Login": "Login",
"Log Id": "Log Id",
Expand Down Expand Up @@ -270,6 +270,7 @@
"Skip job": "Skip job",
"Skip once": "Skip once",
"Skipping will run this job at the next occurrence based on the temporal expression.": "Skipping will run this job at the next occurrence based on the temporal expression.",
"Sources": "Sources",
"Some jobs have slow frequency type, hence, feasible frequency will be set automatically": "Some jobs have slow frequency type, hence, feasible frequency will be set automatically",
"Something went wrong": "Something went wrong",
"Something went wrong while getting complete user permissions.": "Something went wrong while getting complete user permissions.",
Expand All @@ -283,6 +284,7 @@
"store name": "store name",
"Stores": "Stores",
"stores selected": "stores selected",
"Summary": "Summary",
"Sync": "Sync",
"Sync pre-selling related information to Shopify as tags and meta fields.": "Sync pre-selling related information to Shopify as tags and meta fields.",
"Sync products": "Sync products",
Expand Down
8 changes: 4 additions & 4 deletions src/views/Pipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ import { Actions, hasPermission } from '@/authorization'
import Filters from '@/components/Filters.vue';
import FailedJobReasonModal from '@/views/FailedJobReasonModal.vue'
import { translate } from '@hotwax/dxp-components';
import LeareMoreModal from '@/components/LeareMoreModal.vue';
import LearnMoreModal from '@/components/LearnMoreModal.vue';
export default defineComponent({
name: "Pipeline",
Expand Down Expand Up @@ -399,11 +399,11 @@ export default defineComponent({
},
methods : {
async openLearnMoreModal(job: any) {
const openLearnMoreModal = await modalController.create({
component: LeareMoreModal,
const learnMoreModal = await modalController.create({
component: LearnMoreModal,
componentProps: {currentJob: job}
})
return openLearnMoreModal.present()
return learnMoreModal.present()
},
isPinnedJobSelected(jobEnumId: any) {
return (this as any).pipelineFilters.enum.some((jobId: any) => jobId === jobEnumId );
Expand Down

0 comments on commit 3d5326e

Please sign in to comment.