Skip to content

Commit

Permalink
NEW: Generate the List Report UI with an SAP Fiori Elements template.…
Browse files Browse the repository at this point in the history
… No customization implemeneted yet at this point
  • Loading branch information
lajosf committed Jan 29, 2025
1 parent 51334b4 commit 34c72a4
Show file tree
Hide file tree
Showing 18 changed files with 662 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/services.cds
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

using from './spacefarers/annotations';
34 changes: 34 additions & 0 deletions app/spacefarers/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Galactic Spacefarer Adventure
Welcome to the Galactic Spacefarer Adventure project!

## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Wed Jan 29 2025 09:18:54 GMT+0000 (Coordinated Universal Time)|
|**App Generator**<br>@sap/generator-fiori-elements|
|**App Generator Version**<br>1.16.2|
|**Generation Platform**<br>SAP Business Application Studio|
|**Template Used**<br>List Report Page V4|
|**Service Type**<br>Local Cap|
|**Service URL**<br>http://localhost:4004/odata/v4/spacefarer/|
|**Module Name**<br>spacefarers|
|**Application Title**<br>Galactic Spacefarer Adventure|
|**Namespace**<br>com.aldi.challange|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.132.1|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>GalacticSpacefarers|

### Starting the generated app

- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply start your CAP project and navigate to the following location in your browser:

http://localhost:4004/spacefarers/webapp/index.html

#### Pre-requisites:

1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)


149 changes: 149 additions & 0 deletions app/spacefarers/annotations.cds
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
using SpacefarerService as service from '../../srv/spacefarer-service';
annotate service.GalacticSpacefarers with @(
UI.FieldGroup #GeneratedGroup : {
$Type : 'UI.FieldGroupType',
Data : [
{
$Type : 'UI.DataField',
Label : 'name',
Value : name,
},
{
$Type : 'UI.DataField',
Label : 'password',
Value : password,
},
{
$Type : 'UI.DataField',
Label : 'email',
Value : email,
},
{
$Type : 'UI.DataField',
Label : 'stardustCollection',
Value : stardustCollection,
},
{
$Type : 'UI.DataField',
Label : 'wormholeNavigationSkill',
Value : wormholeNavigationSkill,
},
{
$Type : 'UI.DataField',
Label : 'originPlanet',
Value : originPlanet,
},
{
$Type : 'UI.DataField',
Label : 'spacesuitColor',
Value : spacesuitColor,
},
{
$Type : 'UI.DataField',
Label : 'createdAt',
Value : createdAt,
},
{
$Type : 'UI.DataField',
Label : 'modifiedAt',
Value : modifiedAt,
},
],
},
UI.Facets : [
{
$Type : 'UI.ReferenceFacet',
ID : 'GeneratedFacet1',
Label : 'General Information',
Target : '@UI.FieldGroup#GeneratedGroup',
},
],
UI.LineItem : [
{
$Type : 'UI.DataField',
Label : 'name',
Value : name,
},
{
$Type : 'UI.DataField',
Label : 'password',
Value : password,
},
{
$Type : 'UI.DataField',
Label : 'email',
Value : email,
},
{
$Type : 'UI.DataField',
Label : 'stardustCollection',
Value : stardustCollection,
},
{
$Type : 'UI.DataField',
Label : 'wormholeNavigationSkill',
Value : wormholeNavigationSkill,
},
],
);

annotate service.GalacticSpacefarers with {
department @Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'Departments',
Parameters : [
{
$Type : 'Common.ValueListParameterInOut',
LocalDataProperty : department_ID,
ValueListProperty : 'ID',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'name',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'description',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'location',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'budget',
},
],
}
};

annotate service.GalacticSpacefarers with {
position @Common.ValueList : {
$Type : 'Common.ValueListType',
CollectionPath : 'Positions',
Parameters : [
{
$Type : 'Common.ValueListParameterInOut',
LocalDataProperty : position_ID,
ValueListProperty : 'ID',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'name',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'description',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'rank',
},
{
$Type : 'Common.ValueListParameterDisplayOnly',
ValueListProperty : 'salary',
},
],
}
};

19 changes: 19 additions & 0 deletions app/spacefarers/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "spacefarers",
"version": "0.0.1",
"description": "An SAP Fiori application.",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"dependencies": {},
"devDependencies": {
"@ui5/cli": "^3.0.0",
"@sap/ux-ui5-tooling": "1"
},
"scripts": {
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf"
}
}
23 changes: 23 additions & 0 deletions app/spacefarers/ui5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
name: com.aldi.challange.spacefarers
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
ui5:
path:
- /resources
- /test-resources
url: https://sapui5.hana.ondemand.com
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
delay: 300
12 changes: 12 additions & 0 deletions app/spacefarers/webapp/Component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
sap.ui.define(
["sap/fe/core/AppComponent"],

Check failure on line 2 in app/spacefarers/webapp/Component.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
function (Component) {
"use strict";

Check failure on line 4 in app/spacefarers/webapp/Component.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote

return Component.extend("com.aldi.challange.spacefarers.Component", {

Check failure on line 6 in app/spacefarers/webapp/Component.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
metadata: {
manifest: "json"

Check failure on line 8 in app/spacefarers/webapp/Component.js

View workflow job for this annotation

GitHub Actions / test

Strings must use singlequote
}
});
}
);
9 changes: 9 additions & 0 deletions app/spacefarers/webapp/i18n/i18n.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This is the resource bundle for com.aldi.challange.spacefarers

#Texts for manifest.json

#XTIT: Application name
appTitle=Galactic Spacefarer Adventure

#YDES: Application description
appDescription=An SAP Fiori application.
35 changes: 35 additions & 0 deletions app/spacefarers/webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Galactic Spacefarer Adventure</title>
<style>
html, body, body > div, #container, #container-uiarea {
height: 100%;
}
</style>
<script
id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.132.1/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-resourceroots='{
"com.aldi.challange.spacefarers": "./"
}'
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-compatVersion="edge"
data-sap-ui-async="true"
data-sap-ui-frameOptions="trusted"
></script>
</head>
<body class="sapUiBody sapUiSizeCompact" id="content">
<div
data-sap-ui-component
data-name="com.aldi.challange.spacefarers"
data-id="container"
data-settings='{"id" : "com.aldi.challange.spacefarers"}'
data-handle-validation="true"
></div>
</body>
</html>
Loading

0 comments on commit 34c72a4

Please sign in to comment.