Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: more jobs' name not showing on mobile view (#85zrw8eup) #438

Merged
merged 4 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/JobConfiguration.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<section>
<ion-item lines="none">
<h1>{{ title ? $t(title) : '' }}</h1>
<h1>{{ currentJob.enumName ? $t(currentJob.enumName) : $t(title) }}</h1>
adityasharma7 marked this conversation as resolved.
Show resolved Hide resolved
<ion-badge slot="end" color="dark" v-if="currentJob?.runTime && currentJob.statusId !== 'SERVICE_DRAFT'">{{ $t("running") }} {{ timeTillJob(currentJob.runTime) }}</ion-badge>
</ion-item>

Expand Down
4 changes: 2 additions & 2 deletions src/components/MoreJobs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ export default defineComponent({
},
methods: {
async viewJobConfiguration(job: any) {
job.jobTitle = this.getEnumName(job.systemJobEnumId)
job.title = this.getEnumName(job.systemJobEnumId)
job.status = job.statusId === 'SERVICE_DRAFT' ? 'SERVICE_DRAFT' : job.frequency;
emitter.emit('viewJobConfiguration', {jobId: job.jobId, jobTitle: job.jobTitle, status: job.status, job});
emitter.emit('viewJobConfiguration', { jobId: job.jobId, title: job.title, status: job.status, job });
},
getDate (runTime: any) {
return DateTime.fromMillis(runTime).toLocaleString(DateTime.DATE_MED);
Expand Down
1 change: 1 addition & 0 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,7 @@ const actions: ActionTree<JobState, RootState> = {
...resp.data.docs[0],
'status': resp.data.docs[0]?.statusId
}
if (currentJob.statusId === 'SERVICE_DRAFT') delete currentJob.runTime;
commit(types.JOB_CURRENT_UPDATED, currentJob);

const enumIds = resp.data.docs.map((item: any) => {
Expand Down
2 changes: 1 addition & 1 deletion src/views/InitialLoad.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.job });
if(!this.isDesktop && this.job) {
this.router.push({name: 'JobDetails', params: { title: this.currentSelectedJobModal, jobId: this.job.jobId, category: "initial-load"}});
this.router.push({ name: 'JobDetails', params: { jobId: this.job.jobId, category: "initial-load" } });
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/Inventory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.currentJob });
if(!this.isDesktop && this.currentJob) {
this.router.push({name: 'JobDetails', params: { title: this.title, jobId: this.currentJob.jobId, category: "inventory"}});
this.router.push({ name: 'JobDetails', params: { jobId: this.currentJob.jobId, category: "inventory" } });
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/views/JobDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ export default defineComponent({
this.store.dispatch('job/updateCurrentJob', { job });
}
} else if(this.jobCategory !== 'pipeline') {
this.title = this.$route.params.title ? this.$route.params.title : this.jobTitles[job?.systemJobEnumId];
this.title = this.jobTitles[job?.systemJobEnumId];
this.title = this.title ? this.title : this.getEnumName(job.systemJobEnumId);
const id = Object.keys(this.jobEnums).find((id: any) => this.jobEnums[id] === job.systemJobEnumId)
this.freqType = id && this.jobFrequencyType[id];
} else {
this.title = this.$route.params.title ? this.$route.params.title : this.getEnumName(job.systemJobEnumId);
this.title = this.getEnumName(job.systemJobEnumId);
const id = Object.keys(this.jobEnums).find((id: any) => this.jobEnums[id] === job.systemJobEnumId)
const jobFreqTypeId = (Object.keys(this.jobFrequencyType).find((enumId: any) => enumId === id)) as any;
this.freqType = (id && jobFreqTypeId) && this.jobFrequencyType[jobFreqTypeId];
Expand Down
2 changes: 1 addition & 1 deletion src/views/Miscellaneous.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.currentJob });
if(!this.isDesktop && job?.jobId) {
this.router.push({name: 'JobDetails', params: { title: this.currentJobTitle, jobId: job?.jobId, category: "miscellaneous"}});
this.router.push({ name: 'JobDetails', params: { jobId: job?.jobId, category: "miscellaneous" } });
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/Orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.currentJob });
if(!this.isDesktop && this.currentJob) {
this.router.push({name: 'JobDetails', params: { title: this.title, jobId: this.currentJob.jobId, category: "orders"}});
this.router.push({ name: 'JobDetails', params: { jobId: this.currentJob.jobId, category: "orders" } });
return;
}
if (this.currentJob && !this.isJobDetailAnimationCompleted) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/Pipeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job });
if(!this.isDesktop && job?.jobId) {
this.router.push({name: 'JobDetails', params: { title: this.title, jobId: job?.jobId, category: "pipeline"}});
this.router.push({ name: 'JobDetails', params: { jobId: job?.jobId, category: "pipeline" } });
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/PreOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.currentJob });
if(!this.isDesktop) {
this.router.push({name: 'JobDetails', params: { title: this.title, jobId: this.currentJob.jobId, category: "preorder"}});
this.router.push({ name: 'JobDetails', params: { jobId: this.currentJob.jobId, category: "pre-order" } });
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default defineComponent({

await this.store.dispatch('job/updateCurrentJob', { job: this.currentJob });
if(!this.isDesktop && this.currentJob) {
this.router.push({name: 'JobDetails', params: { title: this.title, jobId: this.currentJob.jobId, category: "product"}});
this.router.push({ name: 'JobDetails', params: { jobId: this.currentJob.jobId, category: "product" } });
return;
}

Expand Down