Skip to content

Commit

Permalink
Improved: variable name of sortOptions and removed unused import (hot…
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Dec 11, 2023
1 parent 61ae3ba commit ff4dc89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/views/Picklist-Detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ion-content>
<ion-list>
<ion-radio-group :value="picklistItemSortBy" @ionChange="updateSortBy($event)">
<ion-item v-for="option in sortBy" :key="option.value">
<ion-item v-for="option in sortOptions" :key="option.value">
<ion-radio slot="start" :value="option.value"/>
<ion-label>{{ $t(option.name) }}</ion-label>
</ion-item>
Expand Down Expand Up @@ -95,7 +95,6 @@ import { translate } from '@/i18n'
import { showToast } from '@/utils';
import Scanner from '@/components/Scanner'
import { useRouter, onBeforeRouteLeave } from 'vue-router';
import emitter from '@/event-bus';
export default defineComponent({
name: 'PicklistDetail',
Expand Down Expand Up @@ -132,7 +131,7 @@ export default defineComponent({
return {
picklistGroup: [],
lastScannedId: '',
sortBy: JSON.parse(process.env.VUE_APP_PICKLISTS_SORT_OPTIONS)
sortOptions: JSON.parse(process.env.VUE_APP_PICKLISTS_SORT_OPTIONS)
}
},
props: ['id'],
Expand Down
4 changes: 2 additions & 2 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<ion-item lines="none">
<ion-label>{{ $t("Sort by") }}</ion-label>
<ion-select interface="popover" :value="picklistItemSortBy" @ionChange="updateSortBy($event)">
<ion-select-option v-for="option in sortBy" :key="option.value" :value="option.value" >{{ option.name }}</ion-select-option>
<ion-select-option v-for="option in sortOptions" :key="option.value" :value="option.value" >{{ option.name }}</ion-select-option>
</ion-select>
</ion-item>
</ion-card>
Expand Down Expand Up @@ -133,7 +133,7 @@ export default defineComponent({
baseURL: process.env.VUE_APP_BASE_URL,
appInfo: (process.env.VUE_APP_VERSION_INFO ? JSON.parse(process.env.VUE_APP_VERSION_INFO) : {}) as any,
appVersion: "",
sortBy: JSON.parse(process.env.VUE_APP_PICKLISTS_SORT_OPTIONS)
sortOptions: JSON.parse(process.env.VUE_APP_PICKLISTS_SORT_OPTIONS)
};
},
computed: {
Expand Down

0 comments on commit ff4dc89

Please sign in to comment.