Skip to content

Commit 4b1c395

Browse files
committed
PaaS frontend alignments
1 parent 5c6f8b6 commit 4b1c395

3 files changed

Lines changed: 33 additions & 12 deletions

File tree

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@
4444
"@babel/preset-react": "^7.24.7",
4545
"@babel/preset-typescript": "^7.24.7",
4646
"@tsconfig/node20": "^20.1.4",
47+
"bwip-js": "^4.7.0",
4748
"concurrently": "^9.1.0",
4849
"follow-redirects": "^1.15.11",
4950
"jest": "^30.0.5",
5051
"nock": "^14.0.10",
5152
"stdout-stderr": "^0.1.13",
52-
"typescript": "^5.9.2",
53-
"bwip-js": "^4.7.0"
53+
"typescript": "^5.9.2"
5454
},
5555
"scripts": {
5656
"test": "jest --passWithNoTests ./test",

src/commerce-backend-ui-1/web-src/src/component/FeedForm.js

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,25 +174,45 @@ class FeedForm extends React.Component {
174174
async fetchData(isNew) {
175175
// trick to remove feed by uuid if feedlist not loads because of corrupted data
176176
// this.deleteFeedByUuid("01018dcf-2d90-44a0-8f0c-d0a90e85aee5");
177+
178+
const config = await this.getApplicationConfig();
179+
let stores, listObject, feed; // Declare variables outside the blocks
180+
177181
if (isNew === true) {
178182
console.log('fetch data for "New feed"');
179183

180-
const [stores, listObject] = await Promise.all([
181-
this.getStores(),
182-
this.getSubTypesForObject("ProductView")
183-
])
184+
if (config.ims !== true){
185+
[stores, listObject] = await Promise.all([
186+
this.getStores(),
187+
this.getSubTypesForObject("ProductInterface")
188+
])
189+
} else {
190+
[stores, listObject] = await Promise.all([
191+
this.getStores(),
192+
this.getSubTypesForObject("ProductView")
193+
])
194+
}
184195
this.setState({
185196
autocompleteList: listObject
186197
});
187198
return [stores, listObject];
188199
}
189200

190201
console.log('fetch data for "Existing feed"');
191-
const [stores, listObject, feed] = await Promise.all([
192-
this.getStores(),
193-
this.getSubTypesForObject("ProductView"),
194-
this.getFeedByUuid(this.props.feedUuid)
195-
])
202+
203+
if (config.ims !== true){
204+
[stores, listObject, feed] = await Promise.all([
205+
this.getStores(),
206+
this.getSubTypesForObject("ProductInterface"),
207+
this.getFeedByUuid(this.props.feedUuid)
208+
])
209+
} else {
210+
[stores, listObject, feed] = await Promise.all([
211+
this.getStores(),
212+
this.getSubTypesForObject("ProductView"),
213+
this.getFeedByUuid(this.props.feedUuid)
214+
])
215+
}
196216
this.setState({
197217
autocompleteList: listObject
198218
});

0 commit comments

Comments
 (0)