Skip to content

Commit 74762e3

Browse files
authored
Merge pull request #354 from ymaheshwari1/#351
Fixed: issue of product identifier options desc not visible and incomplete options are visible on the settings page(#351)
2 parents fc40b8f + a0abdf6 commit 74762e3

File tree

4 files changed

+42
-7
lines changed

4 files changed

+42
-7
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@casl/ability": "^6.0.0",
2020
"@hotwax/app-version-info": "^1.0.0",
2121
"@hotwax/apps-theme": "^1.2.6",
22-
"@hotwax/dxp-components": "^1.15.4",
22+
"@hotwax/dxp-components": "1.20.0",
2323
"@hotwax/oms-api": "1.14.0",
2424
"@ionic/core": "8.4.2",
2525
"@ionic/vue": "8.4.2",

src/main.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import permissionActions from '@/authorization/Actions';
3535
import { setUserTimeZone, getAvailableTimeZones, setUserLocale} from '@/adapter'
3636
import localeMessages from './i18n/locales';
3737
import { getConfig, getProductIdentificationPref, initialise, setProductIdentificationPref } from '@/adapter'
38+
import { UtilService } from './services/UtilService';
3839

3940
const app = createApp(App)
4041
.use(IonicVue, {
@@ -63,7 +64,8 @@ const app = createApp(App)
6364
getAvailableTimeZones,
6465
getProductIdentificationPref,
6566
setProductIdentificationPref,
66-
hasPermission
67+
hasPermission,
68+
fetchGoodIdentificationTypes: UtilService.fetchGoodIdentificationTypes
6769
});
6870

6971
// Filters are removed in Vue 3 and global filter introduced https://v3.vuejs.org/guide/migration/filters.html#global-filters

src/services/UtilService.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { api } from '@/adapter';
22
import store from '@/store';
3+
import { hasError } from '@hotwax/oms-api';
34

45
const getServiceStatusDesc = async (payload: any): Promise<any> => {
56
return api({
@@ -77,6 +78,37 @@ const fetchFacilities = async (payload: any): Promise<any> => {
7778
})
7879
}
7980

81+
// TODO: remove this util service when the oms-api version is updated to 1.16.0
82+
const fetchGoodIdentificationTypes = async(parentTypeId = "HC_GOOD_ID_TYPE"): Promise<any> => {
83+
const payload = {
84+
"inputFields": {
85+
"parentTypeId": parentTypeId,
86+
},
87+
"fieldList": ["goodIdentificationTypeId", "description"],
88+
"viewSize": 50,
89+
"entityName": "GoodIdentificationType",
90+
"noConditionFind": "Y"
91+
}
92+
try {
93+
const resp = await api({
94+
url: "performFind",
95+
method: "get",
96+
params: payload
97+
}) as any
98+
99+
if (!hasError(resp)) {
100+
return Promise.resolve(resp.data.docs)
101+
} else {
102+
throw resp.data;
103+
}
104+
} catch (err) {
105+
return Promise.reject({
106+
code: 'error',
107+
message: 'Something went wrong',
108+
serverResponse: err
109+
})
110+
}
111+
}
80112

81113
export const UtilService = {
82114
getServiceStatusDesc,
@@ -85,5 +117,6 @@ export const UtilService = {
85117
updateReserveInvConfig,
86118
updatePreOrdPhyInvHoldConfig,
87119
createPreOrdPhyInvHoldConfig,
88-
fetchFacilities
120+
fetchFacilities,
121+
fetchGoodIdentificationTypes
89122
}

0 commit comments

Comments
 (0)