-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,365 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# CAP cap-fe-sideeffects | ||
_out | ||
*.db | ||
*.sqlite | ||
connection.properties | ||
default-*.json | ||
.cdsrc-private.json | ||
gen/ | ||
node_modules/ | ||
target/ | ||
|
||
# Web IDE, App Studio | ||
.che/ | ||
.gen/ | ||
|
||
# MTA | ||
*_mta_build_tmp | ||
*.mtar | ||
mta_archives/ | ||
|
||
# Other | ||
.DS_Store | ||
*.orig | ||
*.log | ||
|
||
*.iml | ||
*.flattened-pom.xml | ||
|
||
# IDEs | ||
# .vscode | ||
# .idea | ||
app/customers/webapp/test/** | ||
app/orders/webapp/test/** | ||
.vscode/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Introduction | ||
This repository is an showcase for CAP application using Fiori Elements UI with Side Effects, Custom Actions and Dynamic Expression examples. For more info please visit the following blog. | ||
|
||
|
||
|
||
# Getting Started | ||
|
||
File or Folder | Purpose | ||
---------|---------- | ||
`app/` | This has 2 UI frontends i.e. Customers and Orders | ||
`db/` | Data model is defined in schema.cds | ||
`srv/` | Services are defined in service.cds | ||
`package.json` | project metadata and configuration | ||
`readme.md` | this getting started guide | ||
|
||
|
||
## Next Steps | ||
|
||
- Open a new terminal and run `cds watch` | ||
- (in VS Code simply choose _**Terminal** > Run Task > cds watch_) | ||
|
||
|
||
## Learn More / Resources | ||
|
||
Learn more at https://cap.cloud.sap/docs/get-started/. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
## Application Details | ||
| | | ||
| ------------- | | ||
|**Generation Date and Time**<br>Fri Dec 09 2022 07:02:35 GMT+0000 (Coordinated Universal Time)| | ||
|**App Generator**<br>@sap/generator-fiori-elements| | ||
|**App Generator Version**<br>1.8.3| | ||
|**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/service/admin/ | ||
|**Module Name**<br>customers| | ||
|**Application Title**<br>Customers| | ||
|**Namespace**<br>cap.fe.se| | ||
|**UI5 Theme**<br>sap_horizon| | ||
|**UI5 Version**<br>1.108.0| | ||
|**Enable Code Assist Libraries**<br>False| | ||
|**Enable TypeScript**<br>False| | ||
|**Add Eslint configuration**<br>False| | ||
|**Main Entity**<br>Customers| | ||
|**Navigation Entity**<br>addresses| | ||
|
||
## customers | ||
|
||
Customers | ||
|
||
### 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/customers/webapp/index.html | ||
|
||
- It is also possible to run the application using mock data that reflects the OData Service URL supplied during application generation. In order to run the application with Mock Data, run the following from the generated app root folder: | ||
|
||
``` | ||
npm run start-mock | ||
``` | ||
|
||
#### Pre-requisites: | ||
|
||
1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
using adminservice as service from '../../srv/service'; | ||
|
||
annotate service.Customers with @( | ||
UI.LineItem : [ | ||
{ | ||
$Type : 'UI.DataField', | ||
Value : industry.id, | ||
Label : 'Industry', | ||
}, | ||
{ | ||
$Type : 'UI.DataField', | ||
Label : 'First Name', | ||
Value : firstname, | ||
}, | ||
{ | ||
$Type : 'UI.DataField', | ||
Label : 'Last Name', | ||
Value : lastname, | ||
}, | ||
{ | ||
$Type : 'UI.DataField', | ||
Value : modifiedAt, | ||
}, | ||
] | ||
); | ||
annotate service.Customers with @( | ||
UI.FieldGroup #GeneratedGroup1 : { | ||
$Type : 'UI.FieldGroupType', | ||
Data : [ | ||
{ | ||
$Type : 'UI.DataField', | ||
Value : industry_id, | ||
Label : 'Industry', | ||
}, | ||
{ | ||
$Type : 'UI.DataField', | ||
Label : 'First Name', | ||
Value : firstname, | ||
}, | ||
{ | ||
$Type : 'UI.DataField', | ||
Label : 'Last Name', | ||
Value : lastname, | ||
}, | ||
], | ||
}, | ||
UI.Facets : [ | ||
{ | ||
$Type : 'UI.ReferenceFacet', | ||
ID : 'GeneratedFacet1', | ||
Label : 'General Information', | ||
Target : '@UI.FieldGroup#GeneratedGroup1', | ||
}, | ||
{ | ||
$Type : 'UI.ReferenceFacet', | ||
Label : 'Addresses', | ||
ID : 'Addresses', | ||
Target : 'addresses/@UI.LineItem#Addresses', | ||
}, | ||
] | ||
); | ||
annotate service.Addresses with @( | ||
UI.LineItem #Addresses : [ | ||
{ | ||
$Type : 'UI.DataField', | ||
Value : country, | ||
Label : 'Country', | ||
},{ | ||
$Type : 'UI.DataField', | ||
Value : state, | ||
Label : 'State', | ||
},{ | ||
$Type : 'UI.DataField', | ||
Value : city, | ||
Label : 'City', | ||
},{ | ||
$Type : 'UI.DataField', | ||
Value : address1, | ||
Label : 'Address', | ||
},{ | ||
$Type : 'UI.DataField', | ||
Value : zipcode, | ||
Label : 'Zip Code', | ||
},{ | ||
$Type : 'UI.DataField', | ||
Value : default, | ||
Label : 'Default', | ||
},] | ||
); | ||
annotate service.Customers with @( | ||
UI.HeaderInfo : { | ||
TypeName : 'Customer', | ||
TypeNamePlural : '', | ||
Title : { | ||
$Type : 'UI.DataField', | ||
Value : ID, | ||
}, | ||
} | ||
); | ||
annotate service.Industries with { | ||
id @Common.Text : { | ||
$value : descr, | ||
![@UI.TextArrangement] : #TextLast, | ||
} | ||
}; | ||
annotate service.Industries with { | ||
id @(Common.ValueList : { | ||
$Type : 'Common.ValueListType', | ||
CollectionPath : 'Industries', | ||
Parameters : [ | ||
{ | ||
$Type : 'Common.ValueListParameterInOut', | ||
LocalDataProperty : id, | ||
ValueListProperty : 'id', | ||
}, | ||
], | ||
}, | ||
Common.ValueListWithFixedValues : true | ||
)}; | ||
annotate service.Customers with { | ||
industry @UI.MultiLineText : false | ||
}; | ||
annotate service.Customers with { | ||
industry @(Common.ValueList : { | ||
$Type : 'Common.ValueListType', | ||
CollectionPath : 'Industries', | ||
Parameters : [ | ||
{ | ||
$Type : 'Common.ValueListParameterInOut', | ||
LocalDataProperty : industry_id, | ||
ValueListProperty : 'id', | ||
}, | ||
], | ||
}, | ||
Common.ValueListWithFixedValues : true | ||
)}; | ||
annotate service.Customers with { | ||
industry @Common.Text : { | ||
$value : industry.descr, | ||
![@UI.TextArrangement] : #TextLast, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "customers", | ||
"version": "0.0.1", | ||
"description": "Customers", | ||
"keywords": [ | ||
"ui5", | ||
"openui5", | ||
"sapui5" | ||
], | ||
"main": "webapp/index.html", | ||
"scripts": { | ||
"deploy-config": "npx -p @sap/ux-ui5-tooling fiori add deploy-config cf" | ||
}, | ||
"devDependencies": { } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
specVersion: "2.5" | ||
metadata: | ||
name: cap.fe.se.customers | ||
type: application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sap.ui.define( | ||
["sap/fe/core/AppComponent"], | ||
function (Component) { | ||
"use strict"; | ||
|
||
return Component.extend("cap.fe.se.customers.Component", { | ||
metadata: { | ||
manifest: "json" | ||
} | ||
}); | ||
} | ||
); |
18 changes: 18 additions & 0 deletions
18
cap-fe-se-ca-de/app/customers/webapp/annotations/annotation.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0"> | ||
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml"> | ||
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/> | ||
</edmx:Reference> | ||
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml"> | ||
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/> | ||
</edmx:Reference> | ||
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Communication.xml"> | ||
<edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/> | ||
</edmx:Reference> | ||
<edmx:Reference Uri="/service/admin/$metadata"> | ||
<edmx:Include Namespace="adminservice"/> | ||
</edmx:Reference> | ||
<edmx:DataServices> | ||
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local"> | ||
</Schema> | ||
</edmx:DataServices> | ||
</edmx:Edmx> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# This is the resource bundle for cap.fe.se.customers | ||
|
||
#Texts for manifest.json | ||
|
||
#XTIT: Application name | ||
appTitle=Customers | ||
|
||
#YDES: Application description | ||
appDescription=Customers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<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>Customers</title> | ||
<style> | ||
html, body, body > div, #container, #container-uiarea { | ||
height: 100%; | ||
} | ||
</style> | ||
<script | ||
id="sap-ui-bootstrap" | ||
src="https://sapui5.hana.ondemand.com/1.108.0/resources/sap-ui-core.js" | ||
data-sap-ui-theme="sap_horizon" | ||
data-sap-ui-resourceroots='{ | ||
"cap.fe.se.customers": "./" | ||
}' | ||
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="cap.fe.se.customers" | ||
data-id="container" | ||
data-settings='{"id" : "cap.fe.se.customers"}' | ||
data-handle-validation="true" | ||
></div> | ||
</body> | ||
</html> |
Oops, something went wrong.