Skip to content

Commit 849cb59

Browse files
committed
feat: update Media edit_url to Film/Show webapps and add Film/Show tiles to launchpad
1 parent 1c3262d commit 849cb59

2 files changed

Lines changed: 35 additions & 4 deletions

File tree

cap/app/launchpadPage.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626
applicationType: 'URL',
2727
url: './media/webapp/',
2828
navigationMode: 'embedded'
29+
},
30+
'star-wars-film-Display': {
31+
additionalInformation: 'SAPUI5.Component=star.wars.film',
32+
applicationType: 'URL',
33+
url: './film/webapp/',
34+
navigationMode: 'embedded'
35+
},
36+
'star-wars-show-Display': {
37+
additionalInformation: 'SAPUI5.Component=star.wars.show',
38+
applicationType: 'URL',
39+
url: './show/webapp/',
40+
navigationMode: 'embedded'
2941
}
3042
}
3143
}
@@ -59,6 +71,26 @@
5971
icon: 'sap-icon://media-play',
6072
targetURL: '#star-wars-media-Display'
6173
}
74+
},
75+
{
76+
id: 'tile-film',
77+
tileType: 'sap.ushell.ui.tile.StaticTile',
78+
properties: {
79+
title: 'Star Wars Films',
80+
subtitle: 'Film Details',
81+
icon: 'sap-icon://cinema',
82+
targetURL: '#star-wars-film-Display'
83+
}
84+
},
85+
{
86+
id: 'tile-show',
87+
tileType: 'sap.ushell.ui.tile.StaticTile',
88+
properties: {
89+
title: 'Star Wars Shows',
90+
subtitle: 'Show Details',
91+
icon: 'sap-icon://tv-show',
92+
targetURL: '#star-wars-show-Display'
93+
}
6294
}
6395
]
6496
}

cap/srv/show-service.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ const cds = require('@sap/cds')
55
module.exports = cds.service.impl(function () {
66

77
// Populate the virtual edit_url field after every Media READ.
8-
// Directs the user to the Fiori Preview for the appropriate service.
9-
// Note: /$fiori-preview/ is a CAP dev tool endpoint — not available in production.
8+
// Directs the user to the real Film/Show webapps using deep-link URLs.
109
this.after('READ', 'Media', results => {
1110
for (const m of [].concat(results)) {
1211
m.edit_url = m.media_type === 'FILM'
13-
? '/$fiori-preview/StarWarsFilm/Film#preview-app'
14-
: '/$fiori-preview/StarWarsShow/Show#preview-app'
12+
? `/film/webapp/index.html#/Film(${m.ID})`
13+
: `/show/webapp/index.html#/Show(${m.ID})`
1514
}
1615
})
1716

0 commit comments

Comments
 (0)