Compare commits
51 Commits
CAA265-nod
...
openSAP-we
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ea0202f5f | ||
|
|
4649916761 | ||
|
|
b49ace9375 | ||
|
|
d647596fb2 | ||
|
|
0bf6e2fc3b | ||
|
|
7297c7f957 | ||
|
|
d258ac3348 | ||
|
|
5afb637c8f | ||
|
|
a0275c97ef | ||
|
|
8500f12eaf | ||
|
|
3cb08f966a | ||
|
|
3eb82fd99d | ||
|
|
a82e7a9c9f | ||
|
|
06755978b2 | ||
|
|
02469acebb | ||
|
|
e2b47228db | ||
|
|
13480ad99e | ||
|
|
8071faa62d | ||
|
|
9ea294586a | ||
|
|
a56a11ff3e | ||
|
|
b4084b45cb | ||
|
|
26e3c0d753 | ||
|
|
6d0194acc0 | ||
|
|
db75a99808 | ||
|
|
a04755efed | ||
|
|
6a9a1bc4d6 | ||
|
|
a0847e603f | ||
|
|
b1270bc0eb | ||
|
|
ba72d7f478 | ||
|
|
cd808c76dd | ||
|
|
3a77707f49 | ||
|
|
583c97a494 | ||
|
|
eb7431afed | ||
|
|
630bb2b19c | ||
|
|
f9a7aa59de | ||
|
|
c0bce5ae5b | ||
|
|
ad05e2b9db | ||
|
|
b7c2eee961 | ||
|
|
9205e0893a | ||
|
|
7137bf227e | ||
|
|
c2d0fba1d8 | ||
|
|
345d7fa37b | ||
|
|
88c1aa0282 | ||
|
|
c4cd02dbe9 | ||
|
|
b9269ad437 | ||
|
|
2783197f1c | ||
|
|
3238b8b045 | ||
|
|
dcac8fe7d2 | ||
|
|
cc3aca29ef | ||
|
|
baaa5ef7d7 | ||
|
|
e657683322 |
@@ -6,7 +6,7 @@
|
|||||||
"jest": true
|
"jest": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2017
|
"ecmaVersion": 2018
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"SELECT": true,
|
"SELECT": true,
|
||||||
|
|||||||
37
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "bookshop", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
|
||||||
|
"args": [ "--", "cds", "run", "--in-memory" ],
|
||||||
|
"cwd": "${workspaceFolder}/packages/bookshop",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"skipFiles": ["<node_internals>/**"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cds run ...", "request": "launch", "type": "node", "runtimeExecutable": "npx", "runtimeArgs": [ "-n" ],
|
||||||
|
"args": [ "--", "cds", "run", "--with-mocks", "--in-memory?" ],
|
||||||
|
"cwd": "${workspaceFolder}/packages/${input:service}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"skipFiles": ["<node_internals>/**"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"type": "pickString",
|
||||||
|
"id": "service",
|
||||||
|
"description": "Which service do you want to start?",
|
||||||
|
"options": [
|
||||||
|
"bookshop",
|
||||||
|
"bookstore",
|
||||||
|
"media-server",
|
||||||
|
"office-supplies",
|
||||||
|
"reviews-service"
|
||||||
|
],
|
||||||
|
"default": "bookshop"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.gitignore": true,
|
||||||
|
"**/.vscode": true
|
||||||
|
}
|
||||||
|
}
|
||||||
17
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm", "script": "watch", "path": "packages/bookshop/",
|
||||||
|
"options": { "env": { "PORT": "4004" }},
|
||||||
|
"presentation": { "group": "A" }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "npm", "script": "watch", "path": "packages/reviews-service/",
|
||||||
|
"options": { "env": { "PORT": "5005" }},
|
||||||
|
"presentation": { "group": "A" }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
68
README.md
@@ -1,58 +1,42 @@
|
|||||||
# cloud-cap-samples
|
# Welcome to SAP Cloud Application Programming model samples
|
||||||
|
|
||||||
This is a monorepository for sample projects on [SAP Cloud Application Programming Model](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/00823f91779d4d42aa29a498e0535cdf.html?q=cloud%20application%20programming%20model).
|
Find here the samples for the openSAP course [Building Applications with the SAP Cloud Application Programming Model](https://open.sap.com/courses/cp7).
|
||||||
|
|
||||||
## Description
|
## Get Access to SAP Business Application Studio
|
||||||
|
The recommended environment for the course is SAP Business Application Studio. Watch [unit 2 of week 1](https://open.sap.com/courses/cp7/items/51pzQUzbXHr2kdbOmVs6jI) for how to get access.
|
||||||
|
|
||||||
This repository provides a list of samples and reusable packages created based on SAP Cloud Application Programming Model.
|
## Setup
|
||||||
The SAP Cloud Application Programming Model enables you to quickly create business applications by allowing you to focus on your domain logic. It offers a consistent end-to-end programming model that includes languages, libraries and APIs tailored for full-stack development on SAP Cloud Platform.
|
|
||||||
|
|
||||||
The samples provided can be run in a local setup on SQLite Database.
|
In SAP Business Application Studio, open a terminal.
|
||||||
|
Then clone the repo with this specific branch:
|
||||||
|
|
||||||
#### Samples:
|
```sh
|
||||||
* [bookstore](./packages/bookstore) - A variant of the bookshop application, built in a modular fashion on top of products-service and common reuse packages.
|
git clone https://github.com/sap-samples/cloud-cap-samples projects/cloud-cap-samples -b openSAP-week3-unit2
|
||||||
* [products-service](./packages/products-service) - A reuse package providing domain models and services to manage product catalogs.
|
cd projects/cloud-cap-samples
|
||||||
|
```
|
||||||
|
|
||||||
## Requirements
|
In the `cloud-cap-samples` folder run:
|
||||||
* [Node.js](https://nodejs.org/en/) v8 or higher
|
```sh
|
||||||
* [Git](https://git-scm.com)
|
npm install
|
||||||
* [SQLite DB](https://www.sqlite.org/download.html) (Windows only; pre-installed on Mac/Linux)
|
```
|
||||||
|
|
||||||
#### Optional (if you want to import the code into an editor)
|
## Run
|
||||||
* [VS Code](https://code.visualstudio.com)
|
|
||||||
* [Add CDS extension to VS](https://help.sap.com/viewer/65de2977205c403bbc107264b8eccf4b/Cloud/en-US/be944d6d51f343f6b3f53c29c44ff00a.html)
|
|
||||||
|
|
||||||
## Download and Installation
|
Now you're ready to run the samples, for example:
|
||||||
|
```sh
|
||||||
|
cd packages/officesupplies
|
||||||
|
cds watch
|
||||||
|
```
|
||||||
|
|
||||||
#### Clone and build the application
|
After that, watch out for the little popup in the lower right corner of SAP Business Application Studio that asks you to open the application in your browser.
|
||||||
`git clone https://github.com/SAP-samples/cloud-cap-samples.git`
|
|
||||||
|
|
||||||
`cd samples`
|
|
||||||
|
|
||||||
`npm install`
|
|
||||||
|
|
||||||
#### Run the samples
|
|
||||||
|
|
||||||
`npm run <sample name>`
|
|
||||||
|
|
||||||
|
|
||||||
## Limitations
|
## Get Support
|
||||||
|
|
||||||
None
|
Check out the cap docs at https://cap.cloud.sap. <br>
|
||||||
|
In case you find a bug or need support, please [open an issue in here](https://github.com/SAP-samples/cloud-cap-samples/issues/new).
|
||||||
|
|
||||||
## Known Issues
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
## How to obtain support
|
|
||||||
|
|
||||||
In case you find a bug, or you need additional support, please open an issue [here](https://github.wdf.sap.corp/staging-for-SAP-samples-public/cloud-cap-samples/issues) in GitHub.
|
|
||||||
|
|
||||||
## To-Do (upcoming changes)
|
|
||||||
|
|
||||||
None
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under SAP Sample Code License Agreement, except as noted otherwise in the [LICENSE](/LICENSE) file.
|
Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under SAP Sample Code License Agreement, except as noted otherwise in the [LICENSE](/LICENSE) file.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1 @@
|
|||||||
{
|
{"packages":["packages/*"],"version":"1.0.0"}
|
||||||
"packages": [
|
|
||||||
"packages/*",
|
|
||||||
"shared/*"
|
|
||||||
],
|
|
||||||
"version": "0.0.0"
|
|
||||||
}
|
|
||||||
|
|||||||
2064
package-lock.json
generated
Normal file
29
package.json
@@ -1,16 +1,29 @@
|
|||||||
{
|
{
|
||||||
"name": "@sap/capire-samples",
|
"name": "@sap/capire-samples",
|
||||||
"description": "The umbrella project for all samples to easily setup for local development and tests.",
|
"description": "The umbrella project for all samples to easily setup for local development and tests.",
|
||||||
"repository": "https://github.wdf.sap.corp/capire/samples.git",
|
"repository": "https://github.com/SAP-samples/cloud-cap-samples.git",
|
||||||
"author": "daniel.hutzel@sap.com",
|
"author": "daniel.hutzel@sap.com",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"install": "(npx --no-install lerna -v || npm i lerna --no-save) && lerna bootstrap --hoist --ignore tests-env --loglevel warn",
|
"lerna": "npx --no-install lerna -v > /dev/null || npm i lerna --no-save",
|
||||||
"reset": "lerna clean -y && rm -fr node_modules",
|
"install": "(npm -s run lerna) && lerna bootstrap --hoist",
|
||||||
"test": "jest",
|
"cleanup": "lerna clean -y && rm -fr node_modules",
|
||||||
"bookstore": "cds run packages/bookstore --in-memory",
|
"bookshop": "cds watch packages/bookshop",
|
||||||
"products-service": "cds run packages/products-service --in-memory",
|
"bookshop-enhanced": "cds watch packages/bookshop-enhanced",
|
||||||
"reviews-service": "cds run packages/reviews-service --in-memory"
|
"reviews-service": "cds watch packages/reviews-service",
|
||||||
|
"bookstore": "cds watch packages/bookstore",
|
||||||
|
"media-server": "cds watch packages/media-server"
|
||||||
},
|
},
|
||||||
"license": "ISC"
|
"dependencies": {
|
||||||
|
"@sap/cds": "^3",
|
||||||
|
"express": "^4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"sqlite3": "*"
|
||||||
|
},
|
||||||
|
"--add-these-to-devDependencies-for-tests": {
|
||||||
|
"@types/jest": "*",
|
||||||
|
"jest": "*"
|
||||||
|
},
|
||||||
|
"license": "SAP SAMPLE CODE LICENSE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"build": {
|
|
||||||
"target": ".",
|
|
||||||
"tasks": []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "bookstore",
|
|
||||||
"description": "Generated by cds init",
|
|
||||||
"repository": "<Add your repository here>",
|
|
||||||
"license": "ISC",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"engines": {
|
|
||||||
"node": "^8.9"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@sap/cds": "^3.16.3",
|
|
||||||
"@sap/cds-rest": "latest",
|
|
||||||
"express": "^4.17.1"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"build": "cds build/all --clean",
|
|
||||||
"deploy": "cds deploy",
|
|
||||||
"start": "cds run"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
24
packages/officesupplies/.eslintrc
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true,
|
||||||
|
"jest": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2017
|
||||||
|
},
|
||||||
|
"globals": {
|
||||||
|
"SELECT": true,
|
||||||
|
"INSERT": true,
|
||||||
|
"UPDATE": true,
|
||||||
|
"DELETE": true,
|
||||||
|
"CREATE": true,
|
||||||
|
"DROP": true,
|
||||||
|
"cds": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"no-console": "off",
|
||||||
|
"require-atomic-updates": "off"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,15 +1,23 @@
|
|||||||
.che/
|
# CAP officesupplies
|
||||||
.gen/
|
_out
|
||||||
|
*.db
|
||||||
|
connection.properties
|
||||||
|
default-*.json
|
||||||
gen/
|
gen/
|
||||||
mta_archives/
|
|
||||||
node_modules/
|
node_modules/
|
||||||
|
package-lock.json
|
||||||
target/
|
target/
|
||||||
|
|
||||||
.cds_gen.log
|
# Web IDE, App Studio
|
||||||
connection.properties
|
.che/
|
||||||
*.db
|
.gen/
|
||||||
|
|
||||||
|
# MTA
|
||||||
|
*_mta_build_tmp
|
||||||
|
*.mtar
|
||||||
|
mta_archives/
|
||||||
|
|
||||||
|
# Other
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.orig
|
*.orig
|
||||||
_out
|
*.log
|
||||||
default-*.json
|
|
||||||
package-lock.json
|
|
||||||
4
packages/officesupplies/.vscode/cds.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
// used in launch.json to refer to an installed cds via an absolute path
|
||||||
|
|
||||||
|
const cds = require('@sap/cds');
|
||||||
|
cds.exec();
|
||||||
19
packages/officesupplies/.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "cds run",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"program": "${workspaceFolder}/.vscode/cds",
|
||||||
|
"args": [ "run", "--with-mocks", "--in-memory?" ],
|
||||||
|
"skipFiles": [ "<node_internals>/**" ],
|
||||||
|
"internalConsoleOptions": "openOnSessionStart",
|
||||||
|
"console": "internalConsole",
|
||||||
|
"autoAttachChildProcesses": true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
7
packages/officesupplies/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.gitignore": true,
|
||||||
|
"**/.git": true,
|
||||||
|
"**/.vscode": true
|
||||||
|
}
|
||||||
|
}
|
||||||
23
packages/officesupplies/.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||||
|
// for the documentation about the tasks.json format
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "cds watch",
|
||||||
|
"command": ["cds", "watch"],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "shell",
|
||||||
|
"label": "cds run",
|
||||||
|
"command": ["cds", "run", "--with-mocks", "--in-memory?"],
|
||||||
|
"problemMatcher": []
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
25
packages/officesupplies/README.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Getting Started
|
||||||
|
|
||||||
|
Welcome to your new project.
|
||||||
|
|
||||||
|
It contains these folders and files, following our recommended project layout:
|
||||||
|
|
||||||
|
File / Folder | Purpose
|
||||||
|
---------|----------
|
||||||
|
`app/` | content for UI frontends go here
|
||||||
|
`db/` | your domain models and data go here
|
||||||
|
`srv/` | your service models and code go here
|
||||||
|
`package.json` | project metadata and configuration
|
||||||
|
`readme.md` | this getting started guide
|
||||||
|
|
||||||
|
|
||||||
|
## Next Steps...
|
||||||
|
|
||||||
|
- Open a new terminal and run `cds watch`
|
||||||
|
- ( in VSCode simply choose _**Terminal** > Run Task > cds watch_ )
|
||||||
|
- Start adding content, e.g. a [db/schema.cds](db/schema.cds), ...
|
||||||
|
|
||||||
|
|
||||||
|
## Learn more...
|
||||||
|
|
||||||
|
Learn more at https://cap.cloud.sap/docs/get-started/
|
||||||
4
packages/officesupplies/app/products/.npmrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@sap:registry=https://npm.sap.com
|
||||||
|
@ui5:registry=https://registry.npmjs.org
|
||||||
|
save = true
|
||||||
|
save-exact = true
|
||||||
21
packages/officesupplies/app/products/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# products
|
||||||
|
|
||||||
|
This is a my new Fiori elements app
|
||||||
|
|
||||||
|
## Starting the generated app
|
||||||
|
|
||||||
|
- This app has been generated using the SAP UX - App Generator, as part of the SAP UX Tools Suite. In order to launch the generated app, simply run the following from the generated app root folder:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
|
- Is it 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)
|
||||||
BIN
packages/officesupplies/app/products/images/box.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
packages/officesupplies/app/products/images/envelopes.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
packages/officesupplies/app/products/images/eraser.png
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
packages/officesupplies/app/products/images/hanger1.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
packages/officesupplies/app/products/images/hanger2.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
packages/officesupplies/app/products/images/hanger3.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
packages/officesupplies/app/products/images/hanger4.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
packages/officesupplies/app/products/images/magnets.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
packages/officesupplies/app/products/images/mug.png
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
packages/officesupplies/app/products/images/pen.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
33
packages/officesupplies/app/products/package.json
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "products",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
|
"sapux": true,
|
||||||
|
"description": "This is a my new Fiori elements app",
|
||||||
|
"keywords": [
|
||||||
|
"ui5",
|
||||||
|
"openui5",
|
||||||
|
"sapui5"
|
||||||
|
],
|
||||||
|
"main": "webapp/index.html",
|
||||||
|
"scripts": {
|
||||||
|
"start": "npm run start-app-router",
|
||||||
|
"start-app-router": "npm run build && run-script-os",
|
||||||
|
"start-app-router:default": "destinations='[{\"name\":\"odata\",\"url\":\"http://localhost:4004\",\"strictSSL\":false}]' node node_modules/@sap/approuter/approuter.js",
|
||||||
|
"start-app-router:windows": "set destinations=[{\"name\":\"odata\",\"url\":\"http://localhost:4004\",\"strictSSL\":false}] && node node_modules/@sap/approuter/approuter.js",
|
||||||
|
"build": "rimraf dist && ui5 build -a --include-task=generateManifestBundle generateCachebusterInfo"
|
||||||
|
},
|
||||||
|
"remarkConfig": {
|
||||||
|
"plugins": [
|
||||||
|
"remark-preset-lint-consistent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@sap/approuter": "6.5.1",
|
||||||
|
"@ui5/cli": "1.8.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"run-script-os": "1.0.7",
|
||||||
|
"rimraf": "3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
packages/officesupplies/app/products/ui5.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
specVersion: '1.0'
|
||||||
|
metadata:
|
||||||
|
name: products
|
||||||
|
type: application
|
||||||
10
packages/officesupplies/app/products/webapp/Component.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* global hasher */
|
||||||
|
sap.ui.define(['sap/fe/AppComponent'], function(AppComponent) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
return AppComponent.extend('sap.uxfe.demo.products.Component', {
|
||||||
|
metadata: {
|
||||||
|
manifest: 'json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
118
packages/officesupplies/app/products/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||||
|
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
version="2.5"
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee">
|
||||||
|
|
||||||
|
<display-name>OData v4</display-name>
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- UI5 resource servlet used to handle application resources -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<display-name>ResourceServlet</display-name>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<servlet-class>com.sap.ui5.resource.ResourceServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<url-pattern>/resources/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<url-pattern>/test-resources/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- enable CORS -->
|
||||||
|
<context-param>
|
||||||
|
<param-name>com.sap.ui5.resource.ACCEPTED_ORIGINS</param-name>
|
||||||
|
<param-value>*</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<!-- BEGIN: DEV MODE -->
|
||||||
|
<!-- DEV MODE switched off by default and can be switched on during development -->
|
||||||
|
<!-- but has to be switched off for productive use on a Java server! -->
|
||||||
|
<context-param>
|
||||||
|
<param-name>com.sap.ui5.resource.DEV_MODE</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</context-param>
|
||||||
|
<!-- END: DEV MODE -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Cache Control Filter to prevent caching of any resource -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<display-name>CacheControlFilter</display-name>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<filter-class>com.sap.ui5.resource.CacheControlFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.html</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.js</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.css</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.json</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.xml</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.gif</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.png</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.jpg</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.properties</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.tmpl</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- UI5 proxy servlet -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>SimpleProxyServlet</servlet-name>
|
||||||
|
<servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>SimpleProxyServlet</servlet-name>
|
||||||
|
<url-pattern>/proxy/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Welcome file list -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>test.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
|
||||||
|
</web-app>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# This is the resource bundle for products
|
||||||
|
|
||||||
|
#Texts for manifest.json
|
||||||
|
|
||||||
|
#XTIT: Application name
|
||||||
|
appTitle=Products
|
||||||
|
|
||||||
|
#YDES: Application description
|
||||||
|
appDescription=This is a my new Fiori elements app
|
||||||
38
packages/officesupplies/app/products/webapp/index.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>{{appTitle}}</title>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window['sap-ushell-config'] = {
|
||||||
|
defaultRenderer: 'fiori2',
|
||||||
|
applications: {
|
||||||
|
"fe-lrop-v4": {
|
||||||
|
title: 'Products',
|
||||||
|
description: 'This is a my new Fiori elements app',
|
||||||
|
additionalInformation: 'SAPUI5.Component=sap.uxfe.demo.products',
|
||||||
|
applicationType: 'URL',
|
||||||
|
url: './',
|
||||||
|
navigationMode: 'embedded'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="https://sapui5.hana.ondemand.com/1.71.0/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||||
|
<script
|
||||||
|
src="https://sapui5.hana.ondemand.com/1.71.0/resources/sap-ui-core.js"
|
||||||
|
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||||
|
data-sap-ui-compatVersion="edge"
|
||||||
|
data-sap-ui-theme="sap_fiori_3"
|
||||||
|
data-sap-ui-frameOptions="allow"
|
||||||
|
></script>
|
||||||
|
<script>
|
||||||
|
sap.ui.getCore().attachInit(() => sap.ushell.Container.createRenderer().placeAt('content'));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="sapUiBody" id="content"></body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,233 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||||
|
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Capabilities.V1.xml">
|
||||||
|
<edmx:Include Alias="Capabilities" Namespace="Org.OData.Capabilities.V1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
|
||||||
|
<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||||
|
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470968/UI.xml?api=v2">
|
||||||
|
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:DataServices>
|
||||||
|
<Schema Namespace="CatalogService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||||
|
<EntityContainer Name="EntityContainer">
|
||||||
|
<EntitySet Name="Currencies" EntityType="CatalogService.Currencies">
|
||||||
|
<NavigationPropertyBinding Path="texts" Target="Currencies_texts"/>
|
||||||
|
<NavigationPropertyBinding Path="localized" Target="Currencies_texts"/>
|
||||||
|
</EntitySet>
|
||||||
|
<EntitySet Name="Currencies_texts" EntityType="CatalogService.Currencies_texts"/>
|
||||||
|
<EntitySet Name="Products" EntityType="CatalogService.Products">
|
||||||
|
<NavigationPropertyBinding Path="currency" Target="Currencies"/>
|
||||||
|
<NavigationPropertyBinding Path="supplier" Target="Suppliers"/>
|
||||||
|
<NavigationPropertyBinding Path="texts" Target="Products_texts"/>
|
||||||
|
<NavigationPropertyBinding Path="localized" Target="Products_texts"/>
|
||||||
|
</EntitySet>
|
||||||
|
<EntitySet Name="Products_texts" EntityType="CatalogService.Products_texts"/>
|
||||||
|
<EntitySet Name="Suppliers" EntityType="CatalogService.Suppliers">
|
||||||
|
<NavigationPropertyBinding Path="products" Target="Products"/>
|
||||||
|
</EntitySet>
|
||||||
|
</EntityContainer>
|
||||||
|
<EntityType Name="Currencies">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="code"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="name" Type="Edm.String" MaxLength="255"/>
|
||||||
|
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
|
||||||
|
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
|
||||||
|
<Property Name="symbol" Type="Edm.String" MaxLength="2"/>
|
||||||
|
<NavigationProperty Name="texts" Type="Collection(CatalogService.Currencies_texts)">
|
||||||
|
<OnDelete Action="Cascade"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="localized" Type="CatalogService.Currencies_texts">
|
||||||
|
<ReferentialConstraint Property="code" ReferencedProperty="code"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Currencies_texts">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="locale"/>
|
||||||
|
<PropertyRef Name="code"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="locale" Type="Edm.String" MaxLength="5" Nullable="false"/>
|
||||||
|
<Property Name="name" Type="Edm.String" MaxLength="255"/>
|
||||||
|
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
|
||||||
|
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Products">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="identifier" Type="Edm.String"/>
|
||||||
|
<Property Name="title" Type="Edm.String"/>
|
||||||
|
<Property Name="description" Type="Edm.String"/>
|
||||||
|
<Property Name="availability" Type="Edm.Int32"/>
|
||||||
|
<Property Name="storageCapacity" Type="Edm.Int32"/>
|
||||||
|
<Property Name="criticality" Type="Edm.Int32"/>
|
||||||
|
<Property Name="price" Type="Edm.Decimal" Scale="2" Precision="9"/>
|
||||||
|
<NavigationProperty Name="currency" Type="CatalogService.Currencies">
|
||||||
|
<ReferentialConstraint Property="currency_code" ReferencedProperty="code"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="supplier" Type="CatalogService.Suppliers" Partner="products">
|
||||||
|
<ReferentialConstraint Property="supplier_ID" ReferencedProperty="ID"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<Property Name="image_url" Type="Edm.String"/>
|
||||||
|
<NavigationProperty Name="texts" Type="Collection(CatalogService.Products_texts)">
|
||||||
|
<OnDelete Action="Cascade"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="localized" Type="CatalogService.Products_texts">
|
||||||
|
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<Property Name="currency_code" Type="Edm.String" MaxLength="3"/>
|
||||||
|
<Property Name="supplier_ID" Type="Edm.Guid"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Products_texts">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="locale"/>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="locale" Type="Edm.String" MaxLength="5" Nullable="false"/>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="title" Type="Edm.String"/>
|
||||||
|
<Property Name="description" Type="Edm.String"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Suppliers">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="identifier" Type="Edm.String"/>
|
||||||
|
<Property Name="name" Type="Edm.String"/>
|
||||||
|
<Property Name="phone" Type="Edm.String"/>
|
||||||
|
<Property Name="building" Type="Edm.String"/>
|
||||||
|
<Property Name="street" Type="Edm.String"/>
|
||||||
|
<Property Name="postCode" Type="Edm.String"/>
|
||||||
|
<Property Name="city" Type="Edm.String"/>
|
||||||
|
<Property Name="country" Type="Edm.String"/>
|
||||||
|
<NavigationProperty Name="products" Type="Collection(CatalogService.Products)" Partner="supplier"/>
|
||||||
|
</EntityType>
|
||||||
|
<Annotations Target="CatalogService.Currencies">
|
||||||
|
<Annotation Term="UI.Identification">
|
||||||
|
<Collection>
|
||||||
|
<Path>name</Path>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/name">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/descr">
|
||||||
|
<Annotation Term="Common.Label" String="Description"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Code"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/symbol">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Symbol"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/name">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/descr">
|
||||||
|
<Annotation Term="Common.Label" String="Description"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Code"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.EntityContainer/Products">
|
||||||
|
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||||
|
<Record Type="Capabilities.DeleteRestrictionsType">
|
||||||
|
<PropertyValue Property="Deletable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Capabilities.InsertRestrictions">
|
||||||
|
<Record Type="Capabilities.InsertRestrictionsType">
|
||||||
|
<PropertyValue Property="Insertable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||||
|
<Record Type="Capabilities.UpdateRestrictionsType">
|
||||||
|
<PropertyValue Property="Updatable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/ID">
|
||||||
|
<Annotation Term="Common.Label" String="UUID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/identifier">
|
||||||
|
<Annotation Term="Common.Label" String="ID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/title">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/currency">
|
||||||
|
<Annotation Term="Common.Label" String="Currency"/>
|
||||||
|
<Annotation Term="Common.ValueList">
|
||||||
|
<Record Type="Common.ValueListType">
|
||||||
|
<PropertyValue Property="Label" String="Currency"/>
|
||||||
|
<PropertyValue Property="CollectionPath" String="Currencies"/>
|
||||||
|
<PropertyValue Property="Parameters">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="Common.ValueListParameterInOut">
|
||||||
|
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
|
||||||
|
<PropertyValue Property="ValueListProperty" String="code"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="Common.ValueListParameterDisplayOnly">
|
||||||
|
<PropertyValue Property="ValueListProperty" String="name"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Core.Description" String="A currency code as specified in ISO 4217"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/currency_code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency"/>
|
||||||
|
<Annotation Term="Common.ValueList">
|
||||||
|
<Record Type="Common.ValueListType">
|
||||||
|
<PropertyValue Property="Label" String="Currency"/>
|
||||||
|
<PropertyValue Property="CollectionPath" String="Currencies"/>
|
||||||
|
<PropertyValue Property="Parameters">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="Common.ValueListParameterInOut">
|
||||||
|
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
|
||||||
|
<PropertyValue Property="ValueListProperty" String="code"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="Common.ValueListParameterDisplayOnly">
|
||||||
|
<PropertyValue Property="ValueListProperty" String="name"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Core.Description" String="A currency code as specified in ISO 4217"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products_texts/ID">
|
||||||
|
<Annotation Term="Common.Label" String="UUID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products_texts/title">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.EntityContainer/Suppliers">
|
||||||
|
<Annotation Term="Capabilities.DeleteRestrictions">
|
||||||
|
<Record Type="Capabilities.DeleteRestrictionsType">
|
||||||
|
<PropertyValue Property="Deletable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Capabilities.InsertRestrictions">
|
||||||
|
<Record Type="Capabilities.InsertRestrictionsType">
|
||||||
|
<PropertyValue Property="Insertable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Capabilities.UpdateRestrictions">
|
||||||
|
<Record Type="Capabilities.UpdateRestrictionsType">
|
||||||
|
<PropertyValue Property="Updatable" Bool="false"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
</Schema>
|
||||||
|
</edmx:DataServices>
|
||||||
|
</edmx:Edmx>
|
||||||
133
packages/officesupplies/app/products/webapp/manifest.json
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
{
|
||||||
|
"_version": "1.15.0",
|
||||||
|
"sap.app": {
|
||||||
|
"id": "sap.uxfe.demo.products",
|
||||||
|
"type": "application",
|
||||||
|
"i18n": "i18n/i18n.properties",
|
||||||
|
"applicationVersion": {
|
||||||
|
"version": "1.0"
|
||||||
|
},
|
||||||
|
"title": "{{appTitle}}",
|
||||||
|
"description": "{{appDescription}}",
|
||||||
|
"ach": "CA-UI5-FE",
|
||||||
|
"dataSources": {
|
||||||
|
"mainService": {
|
||||||
|
"uri": "/catalog/",
|
||||||
|
"type": "OData",
|
||||||
|
"settings": {
|
||||||
|
"odataVersion": "4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"offline": false,
|
||||||
|
"resources": "resources.json",
|
||||||
|
"sourceTemplate": {
|
||||||
|
"id": "ui5template.fiorielements.v4.lrop",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.ui": {
|
||||||
|
"technology": "UI5",
|
||||||
|
"icons": {
|
||||||
|
"icon": "",
|
||||||
|
"favIcon": "",
|
||||||
|
"phone": "",
|
||||||
|
"phone@2": "",
|
||||||
|
"tablet": "",
|
||||||
|
"tablet@2": ""
|
||||||
|
},
|
||||||
|
"deviceTypes": {
|
||||||
|
"desktop": true,
|
||||||
|
"tablet": true,
|
||||||
|
"phone": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.ui5": {
|
||||||
|
"resources": {
|
||||||
|
"js": [],
|
||||||
|
"css": []
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"minUI5Version": "1.71.0",
|
||||||
|
"libs": {
|
||||||
|
"sap.fe": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models": {
|
||||||
|
"i18n": {
|
||||||
|
"type": "sap.ui.model.resource.ResourceModel",
|
||||||
|
"uri": "i18n/i18n.properties"
|
||||||
|
},
|
||||||
|
"": {
|
||||||
|
"dataSource": "mainService",
|
||||||
|
"settings": {
|
||||||
|
"synchronizationMode": "None",
|
||||||
|
"operationMode": "Server",
|
||||||
|
"autoExpandSelect": true,
|
||||||
|
"earlyRequests": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"routing": {
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"pattern": "",
|
||||||
|
"name": "ProductsList",
|
||||||
|
"target": "ProductsList"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "Products({key})",
|
||||||
|
"name": "ProductsObjectPage",
|
||||||
|
"target": "ProductsObjectPage"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": {
|
||||||
|
"ProductsList": {
|
||||||
|
"type": "Component",
|
||||||
|
"id": "ProductsList",
|
||||||
|
"name": "sap.fe.templates.ListReport",
|
||||||
|
"options": {
|
||||||
|
"settings": {
|
||||||
|
"entitySet": "Products",
|
||||||
|
"variantManagement": "Page",
|
||||||
|
"navigation": {
|
||||||
|
"Products": {
|
||||||
|
"detail": {
|
||||||
|
"route": "ProductsObjectPage"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ProductsObjectPage": {
|
||||||
|
"type": "Component",
|
||||||
|
"id": "ProductsObjectPage",
|
||||||
|
"name": "sap.fe.templates.ObjectPage",
|
||||||
|
"options": {
|
||||||
|
"settings": {
|
||||||
|
"entitySet": "Products"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contentDensities": {
|
||||||
|
"compact": true,
|
||||||
|
"cozy": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.platform.abap": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"uri": ""
|
||||||
|
},
|
||||||
|
"sap.platform.hcp": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"uri": ""
|
||||||
|
},
|
||||||
|
"sap.fiori": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"registrationIds": [],
|
||||||
|
"archeType": "transactional"
|
||||||
|
}
|
||||||
|
}
|
||||||
16
packages/officesupplies/app/products/xs-app.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"welcomeFile": "/index.html",
|
||||||
|
"authenticationMethod": "none",
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"source": "^/catalog/(.*)$",
|
||||||
|
"target": "/catalog/$1",
|
||||||
|
"destination": "odata",
|
||||||
|
"csrfProtection": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "^(.*)",
|
||||||
|
"localDir": "webapp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
packages/officesupplies/app/suppliers/.npmrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
@sap:registry=https://npm.sap.com
|
||||||
|
@ui5:registry=https://registry.npmjs.org
|
||||||
|
save = true
|
||||||
|
save-exact = true
|
||||||
21
packages/officesupplies/app/suppliers/README.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# suppliers
|
||||||
|
|
||||||
|
This is a my new Fiori elements app
|
||||||
|
|
||||||
|
## Starting the generated app
|
||||||
|
|
||||||
|
- This app has been generated using the SAP UX - App Generator, as part of the SAP UX Tools Suite. In order to launch the generated app, simply run the following from the generated app root folder:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
|
- Is it 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)
|
||||||
33
packages/officesupplies/app/suppliers/package.json
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "suppliers",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
|
"sapux": true,
|
||||||
|
"description": "This is a my new Fiori elements app",
|
||||||
|
"keywords": [
|
||||||
|
"ui5",
|
||||||
|
"openui5",
|
||||||
|
"sapui5"
|
||||||
|
],
|
||||||
|
"main": "webapp/index.html",
|
||||||
|
"scripts": {
|
||||||
|
"start": "npm run start-app-router",
|
||||||
|
"start-app-router": "npm run build && run-script-os",
|
||||||
|
"start-app-router:default": "destinations='[{\"name\":\"odata\",\"url\":\"http://localhost:4004\",\"strictSSL\":false}]' node node_modules/@sap/approuter/approuter.js",
|
||||||
|
"start-app-router:windows": "set destinations=[{\"name\":\"odata\",\"url\":\"http://localhost:4004\",\"strictSSL\":false}] && node node_modules/@sap/approuter/approuter.js",
|
||||||
|
"build": "rimraf dist && ui5 build -a --include-task=generateManifestBundle generateCachebusterInfo"
|
||||||
|
},
|
||||||
|
"remarkConfig": {
|
||||||
|
"plugins": [
|
||||||
|
"remark-preset-lint-consistent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@sap/approuter": "6.5.1",
|
||||||
|
"@ui5/cli": "1.8.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"run-script-os": "1.0.7",
|
||||||
|
"rimraf": "3.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
packages/officesupplies/app/suppliers/ui5.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
specVersion: '1.0'
|
||||||
|
metadata:
|
||||||
|
name: suppliers
|
||||||
|
type: application
|
||||||
10
packages/officesupplies/app/suppliers/webapp/Component.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
/* global hasher */
|
||||||
|
sap.ui.define(['sap/fe/AppComponent'], function(AppComponent) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
return AppComponent.extend('supplier.suppliers.Component', {
|
||||||
|
metadata: {
|
||||||
|
manifest: 'json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
118
packages/officesupplies/app/suppliers/webapp/WEB-INF/web.xml
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||||
|
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||||
|
version="2.5"
|
||||||
|
xmlns="http://java.sun.com/xml/ns/javaee">
|
||||||
|
|
||||||
|
<display-name>OData v4</display-name>
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- UI5 resource servlet used to handle application resources -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<display-name>ResourceServlet</display-name>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<servlet-class>com.sap.ui5.resource.ResourceServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<url-pattern>/resources/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>ResourceServlet</servlet-name>
|
||||||
|
<url-pattern>/test-resources/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<!-- enable CORS -->
|
||||||
|
<context-param>
|
||||||
|
<param-name>com.sap.ui5.resource.ACCEPTED_ORIGINS</param-name>
|
||||||
|
<param-value>*</param-value>
|
||||||
|
</context-param>
|
||||||
|
|
||||||
|
<!-- BEGIN: DEV MODE -->
|
||||||
|
<!-- DEV MODE switched off by default and can be switched on during development -->
|
||||||
|
<!-- but has to be switched off for productive use on a Java server! -->
|
||||||
|
<context-param>
|
||||||
|
<param-name>com.sap.ui5.resource.DEV_MODE</param-name>
|
||||||
|
<param-value>true</param-value>
|
||||||
|
</context-param>
|
||||||
|
<!-- END: DEV MODE -->
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Cache Control Filter to prevent caching of any resource -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<display-name>CacheControlFilter</display-name>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<filter-class>com.sap.ui5.resource.CacheControlFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.html</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.js</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.css</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.json</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.xml</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.gif</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.png</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.jpg</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.properties</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CacheControlFilter</filter-name>
|
||||||
|
<url-pattern>*.tmpl</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- UI5 proxy servlet -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>SimpleProxyServlet</servlet-name>
|
||||||
|
<servlet-class>com.sap.ui5.proxy.SimpleProxyServlet</servlet-class>
|
||||||
|
</servlet>
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>SimpleProxyServlet</servlet-name>
|
||||||
|
<url-pattern>/proxy/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
<!-- Welcome file list -->
|
||||||
|
<!-- ============================================================== -->
|
||||||
|
|
||||||
|
<welcome-file-list>
|
||||||
|
<welcome-file>test.html</welcome-file>
|
||||||
|
</welcome-file-list>
|
||||||
|
|
||||||
|
|
||||||
|
</web-app>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# This is the resource bundle for suppliers
|
||||||
|
|
||||||
|
#Texts for manifest.json
|
||||||
|
|
||||||
|
#XTIT: Application name
|
||||||
|
appTitle=suppliers
|
||||||
|
|
||||||
|
#YDES: Application description
|
||||||
|
appDescription=This is a my new Fiori elements app
|
||||||
38
packages/officesupplies/app/suppliers/webapp/index.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>{{appTitle}}</title>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
window['sap-ushell-config'] = {
|
||||||
|
defaultRenderer: 'fiori2',
|
||||||
|
applications: {
|
||||||
|
"fe-lrop-v4": {
|
||||||
|
title: 'suppliers',
|
||||||
|
description: 'This is a my new Fiori elements app',
|
||||||
|
additionalInformation: 'SAPUI5.Component=supplier.suppliers',
|
||||||
|
applicationType: 'URL',
|
||||||
|
url: './',
|
||||||
|
navigationMode: 'embedded'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="https://sapui5.hana.ondemand.com/1.71.0/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||||
|
<script
|
||||||
|
src="https://sapui5.hana.ondemand.com/1.71.0/resources/sap-ui-core.js"
|
||||||
|
data-sap-ui-libs="sap.m, sap.ushell, sap.collaboration, sap.ui.layout"
|
||||||
|
data-sap-ui-compatVersion="edge"
|
||||||
|
data-sap-ui-theme="sap_fiori_3"
|
||||||
|
data-sap-ui-frameOptions="allow"
|
||||||
|
></script>
|
||||||
|
<script>
|
||||||
|
sap.ui.getCore().attachInit(() => sap.ushell.Container.createRenderer().placeAt('content'));
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body class="sapUiBody" id="content"></body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,346 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
|
||||||
|
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2">
|
||||||
|
<edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
|
||||||
|
<edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Measures.V1.xml">
|
||||||
|
<edmx:Include Alias="Measures" Namespace="Org.OData.Measures.V1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:Reference Uri="https://wiki.scn.sap.com/wiki/download/attachments/448470968/UI.xml?api=v2">
|
||||||
|
<edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
|
||||||
|
</edmx:Reference>
|
||||||
|
<edmx:DataServices>
|
||||||
|
<Schema Namespace="CatalogService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
|
||||||
|
<EntityContainer Name="EntityContainer">
|
||||||
|
<EntitySet Name="Currencies" EntityType="CatalogService.Currencies">
|
||||||
|
<NavigationPropertyBinding Path="texts" Target="Currencies_texts"/>
|
||||||
|
<NavigationPropertyBinding Path="localized" Target="Currencies_texts"/>
|
||||||
|
</EntitySet>
|
||||||
|
<EntitySet Name="Currencies_texts" EntityType="CatalogService.Currencies_texts"/>
|
||||||
|
<EntitySet Name="Products" EntityType="CatalogService.Products">
|
||||||
|
<NavigationPropertyBinding Path="currency" Target="Currencies"/>
|
||||||
|
<NavigationPropertyBinding Path="supplier" Target="Suppliers"/>
|
||||||
|
<NavigationPropertyBinding Path="texts" Target="Products_texts"/>
|
||||||
|
<NavigationPropertyBinding Path="localized" Target="Products_texts"/>
|
||||||
|
</EntitySet>
|
||||||
|
<EntitySet Name="Products_texts" EntityType="CatalogService.Products_texts"/>
|
||||||
|
<EntitySet Name="Suppliers" EntityType="CatalogService.Suppliers">
|
||||||
|
<NavigationPropertyBinding Path="products" Target="Products"/>
|
||||||
|
</EntitySet>
|
||||||
|
</EntityContainer>
|
||||||
|
<EntityType Name="Currencies">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="code"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="name" Type="Edm.String" MaxLength="255"/>
|
||||||
|
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
|
||||||
|
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
|
||||||
|
<Property Name="symbol" Type="Edm.String" MaxLength="2"/>
|
||||||
|
<NavigationProperty Name="texts" Type="Collection(CatalogService.Currencies_texts)">
|
||||||
|
<OnDelete Action="Cascade"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="localized" Type="CatalogService.Currencies_texts">
|
||||||
|
<ReferentialConstraint Property="code" ReferencedProperty="code"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Currencies_texts">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="locale"/>
|
||||||
|
<PropertyRef Name="code"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="locale" Type="Edm.String" MaxLength="5" Nullable="false"/>
|
||||||
|
<Property Name="name" Type="Edm.String" MaxLength="255"/>
|
||||||
|
<Property Name="descr" Type="Edm.String" MaxLength="1000"/>
|
||||||
|
<Property Name="code" Type="Edm.String" MaxLength="3" Nullable="false"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Products">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="identifier" Type="Edm.String"/>
|
||||||
|
<Property Name="title" Type="Edm.String"/>
|
||||||
|
<Property Name="description" Type="Edm.String"/>
|
||||||
|
<Property Name="availability" Type="Edm.Int32"/>
|
||||||
|
<Property Name="storageCapacity" Type="Edm.Int32"/>
|
||||||
|
<Property Name="criticality" Type="Edm.Int32"/>
|
||||||
|
<Property Name="price" Type="Edm.Decimal" Scale="2" Precision="9"/>
|
||||||
|
<NavigationProperty Name="currency" Type="CatalogService.Currencies">
|
||||||
|
<ReferentialConstraint Property="currency_code" ReferencedProperty="code"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="supplier" Type="CatalogService.Suppliers" Partner="products">
|
||||||
|
<ReferentialConstraint Property="supplier_ID" ReferencedProperty="ID"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<Property Name="image_url" Type="Edm.String"/>
|
||||||
|
<NavigationProperty Name="texts" Type="Collection(CatalogService.Products_texts)">
|
||||||
|
<OnDelete Action="Cascade"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<NavigationProperty Name="localized" Type="CatalogService.Products_texts">
|
||||||
|
<ReferentialConstraint Property="ID" ReferencedProperty="ID"/>
|
||||||
|
</NavigationProperty>
|
||||||
|
<Property Name="currency_code" Type="Edm.String" MaxLength="3"/>
|
||||||
|
<Property Name="supplier_ID" Type="Edm.Guid"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Products_texts">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="locale"/>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="locale" Type="Edm.String" MaxLength="5" Nullable="false"/>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="title" Type="Edm.String"/>
|
||||||
|
<Property Name="description" Type="Edm.String"/>
|
||||||
|
</EntityType>
|
||||||
|
<EntityType Name="Suppliers">
|
||||||
|
<Key>
|
||||||
|
<PropertyRef Name="ID"/>
|
||||||
|
</Key>
|
||||||
|
<Property Name="ID" Type="Edm.Guid" Nullable="false"/>
|
||||||
|
<Property Name="identifier" Type="Edm.String"/>
|
||||||
|
<Property Name="name" Type="Edm.String"/>
|
||||||
|
<Property Name="phone" Type="Edm.String"/>
|
||||||
|
<Property Name="building" Type="Edm.String"/>
|
||||||
|
<Property Name="street" Type="Edm.String"/>
|
||||||
|
<Property Name="postCode" Type="Edm.String"/>
|
||||||
|
<Property Name="city" Type="Edm.String"/>
|
||||||
|
<Property Name="country" Type="Edm.String"/>
|
||||||
|
<NavigationProperty Name="products" Type="Collection(CatalogService.Products)" Partner="supplier"/>
|
||||||
|
</EntityType>
|
||||||
|
<Annotations Target="CatalogService.Currencies">
|
||||||
|
<Annotation Term="UI.Identification">
|
||||||
|
<Collection>
|
||||||
|
<Path>name</Path>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/name">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/descr">
|
||||||
|
<Annotation Term="Common.Label" String="Description"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Code"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies/symbol">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Symbol"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/name">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/descr">
|
||||||
|
<Annotation Term="Common.Label" String="Description"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Currencies_texts/code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency Code"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products">
|
||||||
|
<Annotation Term="UI.DataPoint" Qualifier="Price">
|
||||||
|
<Record Type="UI.DataPointType">
|
||||||
|
<PropertyValue Property="Title" String="Price"/>
|
||||||
|
<PropertyValue Property="Value" Path="price"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.Facets">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.CollectionFacet">
|
||||||
|
<PropertyValue Property="Label" String="Product Information"/>
|
||||||
|
<PropertyValue Property="Facets">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.ReferenceFacet">
|
||||||
|
<PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#Description"/>
|
||||||
|
<PropertyValue Property="Label" String="Description"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.FieldGroup" Qualifier="Description">
|
||||||
|
<Record Type="UI.FieldGroupType">
|
||||||
|
<PropertyValue Property="Data">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="description"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.FieldGroup" Qualifier="ProductDetail">
|
||||||
|
<Record Type="UI.FieldGroupType">
|
||||||
|
<PropertyValue Property="Data">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="identifier"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="availability"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.FieldGroup" Qualifier="SupplierDetail">
|
||||||
|
<Record Type="UI.FieldGroupType">
|
||||||
|
<PropertyValue Property="Data">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="supplier/identifier"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="supplier/postCode"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="supplier/phone"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.HeaderFacets">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.ReferenceFacet">
|
||||||
|
<PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#ProductDetail"/>
|
||||||
|
<PropertyValue Property="Label" String="Details"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.ReferenceFacet">
|
||||||
|
<PropertyValue Property="Target" AnnotationPath="@UI.FieldGroup#SupplierDetail"/>
|
||||||
|
<PropertyValue Property="Label" String="Supplier"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.ReferenceFacet">
|
||||||
|
<PropertyValue Property="Target" AnnotationPath="@UI.DataPoint#Price"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.HeaderInfo">
|
||||||
|
<Record Type="UI.HeaderInfoType">
|
||||||
|
<PropertyValue Property="Title">
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="title"/>
|
||||||
|
</Record>
|
||||||
|
</PropertyValue>
|
||||||
|
<PropertyValue Property="TypeName" String="Product"/>
|
||||||
|
<PropertyValue Property="TypeNamePlural" String="Products"/>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.LineItem">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="image_url"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="identifier"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="title"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="availability"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="UI.DataField">
|
||||||
|
<PropertyValue Property="Value" Path="price"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="UI.SelectionFields">
|
||||||
|
<Collection>
|
||||||
|
<PropertyPath>identifier</PropertyPath>
|
||||||
|
<PropertyPath>title</PropertyPath>
|
||||||
|
<PropertyPath>availability</PropertyPath>
|
||||||
|
<PropertyPath>price</PropertyPath>
|
||||||
|
</Collection>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/ID">
|
||||||
|
<Annotation Term="Common.Label" String="ProductID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/identifier">
|
||||||
|
<Annotation Term="Common.Label" String="ID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/title">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/description">
|
||||||
|
<Annotation Term="Common.Label" String="Description"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/availability">
|
||||||
|
<Annotation Term="Common.Label" String="In Stock"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/price">
|
||||||
|
<Annotation Term="Common.Label" String="Price"/>
|
||||||
|
<Annotation Term="Measures.ISOCurrency" Path="currency_code"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/currency">
|
||||||
|
<Annotation Term="Common.Label" String="Currency"/>
|
||||||
|
<Annotation Term="Common.ValueList">
|
||||||
|
<Record Type="Common.ValueListType">
|
||||||
|
<PropertyValue Property="Label" String="Currency"/>
|
||||||
|
<PropertyValue Property="CollectionPath" String="Currencies"/>
|
||||||
|
<PropertyValue Property="Parameters">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="Common.ValueListParameterInOut">
|
||||||
|
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
|
||||||
|
<PropertyValue Property="ValueListProperty" String="code"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="Common.ValueListParameterDisplayOnly">
|
||||||
|
<PropertyValue Property="ValueListProperty" String="name"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Core.Description" String="A currency code as specified in ISO 4217"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/image_url">
|
||||||
|
<Annotation Term="Common.Label" String="Image"/>
|
||||||
|
<Annotation Term="UI.IsImageURL" Bool="true"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products/currency_code">
|
||||||
|
<Annotation Term="Common.Label" String="Currency"/>
|
||||||
|
<Annotation Term="Common.ValueList">
|
||||||
|
<Record Type="Common.ValueListType">
|
||||||
|
<PropertyValue Property="Label" String="Currency"/>
|
||||||
|
<PropertyValue Property="CollectionPath" String="Currencies"/>
|
||||||
|
<PropertyValue Property="Parameters">
|
||||||
|
<Collection>
|
||||||
|
<Record Type="Common.ValueListParameterInOut">
|
||||||
|
<PropertyValue Property="LocalDataProperty" PropertyPath="currency_code"/>
|
||||||
|
<PropertyValue Property="ValueListProperty" String="code"/>
|
||||||
|
</Record>
|
||||||
|
<Record Type="Common.ValueListParameterDisplayOnly">
|
||||||
|
<PropertyValue Property="ValueListProperty" String="name"/>
|
||||||
|
</Record>
|
||||||
|
</Collection>
|
||||||
|
</PropertyValue>
|
||||||
|
</Record>
|
||||||
|
</Annotation>
|
||||||
|
<Annotation Term="Core.Description" String="A currency code as specified in ISO 4217"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products_texts/ID">
|
||||||
|
<Annotation Term="Common.Label" String="UUID"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Products_texts/title">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Suppliers/identifier">
|
||||||
|
<Annotation Term="Common.Label" String="Name"/>
|
||||||
|
<Annotation Term="Common.Text" Path="name">
|
||||||
|
<Annotation Term="UI.TextArrangement" EnumMember="UI.TextArrangementType/TextFirst"/>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Suppliers/phone">
|
||||||
|
<Annotation Term="Common.Label" String="Phone"/>
|
||||||
|
</Annotations>
|
||||||
|
<Annotations Target="CatalogService.Suppliers/postCode">
|
||||||
|
<Annotation Term="Common.Label" String="City"/>
|
||||||
|
<Annotation Term="Common.Text" Path="city">
|
||||||
|
<Annotation Term="UI.TextArrangement" EnumMember="UI.TextArrangementType/TextFirst"/>
|
||||||
|
</Annotation>
|
||||||
|
</Annotations>
|
||||||
|
</Schema>
|
||||||
|
</edmx:DataServices>
|
||||||
|
</edmx:Edmx>
|
||||||
155
packages/officesupplies/app/suppliers/webapp/manifest.json
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
{
|
||||||
|
"_version": "1.15.0",
|
||||||
|
"sap.app": {
|
||||||
|
"id": "supplier.suppliers",
|
||||||
|
"type": "application",
|
||||||
|
"i18n": "i18n/i18n.properties",
|
||||||
|
"applicationVersion": {
|
||||||
|
"version": "1.0"
|
||||||
|
},
|
||||||
|
"title": "{{appTitle}}",
|
||||||
|
"description": "{{appDescription}}",
|
||||||
|
"ach": "CA-UI5-FE",
|
||||||
|
"dataSources": {
|
||||||
|
"mainService": {
|
||||||
|
"uri": "/catalog/",
|
||||||
|
"type": "OData",
|
||||||
|
"settings": {
|
||||||
|
"odataVersion": "4.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"offline": false,
|
||||||
|
"resources": "resources.json",
|
||||||
|
"sourceTemplate": {
|
||||||
|
"id": "ui5template.fiorielements.v4.lrop",
|
||||||
|
"version": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.ui": {
|
||||||
|
"technology": "UI5",
|
||||||
|
"icons": {
|
||||||
|
"icon": "",
|
||||||
|
"favIcon": "",
|
||||||
|
"phone": "",
|
||||||
|
"phone@2": "",
|
||||||
|
"tablet": "",
|
||||||
|
"tablet@2": ""
|
||||||
|
},
|
||||||
|
"deviceTypes": {
|
||||||
|
"desktop": true,
|
||||||
|
"tablet": true,
|
||||||
|
"phone": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.ui5": {
|
||||||
|
"resources": {
|
||||||
|
"js": [],
|
||||||
|
"css": []
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"minUI5Version": "1.71.0",
|
||||||
|
"libs": {
|
||||||
|
"sap.fe": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"models": {
|
||||||
|
"i18n": {
|
||||||
|
"type": "sap.ui.model.resource.ResourceModel",
|
||||||
|
"uri": "i18n/i18n.properties"
|
||||||
|
},
|
||||||
|
"": {
|
||||||
|
"dataSource": "mainService",
|
||||||
|
"settings": {
|
||||||
|
"synchronizationMode": "None",
|
||||||
|
"operationMode": "Server",
|
||||||
|
"autoExpandSelect": true,
|
||||||
|
"earlyRequests": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"routing": {
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"pattern": "",
|
||||||
|
"name": "SuppliersList",
|
||||||
|
"target": "SuppliersList"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "Suppliers({key})",
|
||||||
|
"name": "SuppliersObjectPage",
|
||||||
|
"target": "SuppliersObjectPage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "Suppliers({key})/texts({key2})",
|
||||||
|
"name": "Currencies_textsObjectPage",
|
||||||
|
"target": "Currencies_textsObjectPage"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"targets": {
|
||||||
|
"SuppliersList": {
|
||||||
|
"type": "Component",
|
||||||
|
"id": "SuppliersList",
|
||||||
|
"name": "sap.fe.templates.ListReport",
|
||||||
|
"options": {
|
||||||
|
"settings": {
|
||||||
|
"entitySet": "Suppliers",
|
||||||
|
"variantManagement": "Page",
|
||||||
|
"navigation": {
|
||||||
|
"Suppliers": {
|
||||||
|
"detail": {
|
||||||
|
"route": "SuppliersObjectPage"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"SuppliersObjectPage": {
|
||||||
|
"type": "Component",
|
||||||
|
"id": "SuppliersObjectPage",
|
||||||
|
"name": "sap.fe.templates.ObjectPage",
|
||||||
|
"options": {
|
||||||
|
"settings": {
|
||||||
|
"entitySet": "Suppliers",
|
||||||
|
"navigation": {
|
||||||
|
"texts": {
|
||||||
|
"detail": {
|
||||||
|
"route": "Currencies_textsObjectPage"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Currencies_textsObjectPage": {
|
||||||
|
"type": "Component",
|
||||||
|
"id": "Currencies_textsObjectPage",
|
||||||
|
"name": "sap.fe.templates.ObjectPage",
|
||||||
|
"options": {
|
||||||
|
"settings": {
|
||||||
|
"entitySet": "Currencies_texts"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"contentDensities": {
|
||||||
|
"compact": true,
|
||||||
|
"cozy": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sap.platform.abap": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"uri": ""
|
||||||
|
},
|
||||||
|
"sap.platform.hcp": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"uri": ""
|
||||||
|
},
|
||||||
|
"sap.fiori": {
|
||||||
|
"_version": "1.1.0",
|
||||||
|
"registrationIds": [],
|
||||||
|
"archeType": "transactional"
|
||||||
|
}
|
||||||
|
}
|
||||||
16
packages/officesupplies/app/suppliers/xs-app.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"welcomeFile": "/index.html",
|
||||||
|
"authenticationMethod": "none",
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"source": "^/catalog/(.*)$",
|
||||||
|
"target": "/catalog/$1",
|
||||||
|
"destination": "odata",
|
||||||
|
"csrfProtection": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"source": "^(.*)",
|
||||||
|
"localDir": "webapp"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
ID,IDENTIFIER,TITLE,DESCRIPTION,AVAILABILITY,STORAGE_CAPACITY,CRITICALITY,PRICE,CURRENCY_CODE,SUPPLIER_ID,IMAGE_URL
|
||||||
|
844ede5c-071e-34ed-907f-f99cb3a4693d,MC-CM-1003,Tea- / Coffee-Mug,Robust high-quality ceramic mug for every-day use in two unobstrusive colours.,153,200,0,2.65,USD,8b001df1-dab2-39a2-8b1a-89b6b445e237,../images/mug.png
|
||||||
|
64d40922-ea0d-30f9-9b83-eb4448ee4c2e,MC-CH-1000,Coat Hangers,"Set of high-quality hangers with coated surface, trouser bar - anti slip. Super slim design - space saving - The hooks can be rotated through 360 degree rotation, practical for various room situations. Material: ABS (plastic); Colour: turquoise.",10,200,3,2.6,USD,12726eec-165c-3713-a674-3d2fc4f5127f,../images/hanger1.png
|
||||||
|
a6756d40-792e-34c9-8b2e-df3acb0c54b4,MC-CH-1001,Coat Hangers,"Set of high-quality hangers with coated surface, trouser bar - anti slip. Super slim design - space saving - The hooks can be rotated through 360 degree rotation, practical for various room situations. Material: ABS (plastic); Colour: assorted (2 of each pink, grey, blue green, black).",34,200,2,21.73,USD,12726eec-165c-3713-a674-3d2fc4f5127f,../images/hanger2.png
|
||||||
|
37f028f0-1dd5-30ae-9cdd-a7f543e4d61d,MC-CH-1002,Wooden Coat Hangers - Pack of 5,"Pack of 5 quality wooden hangers with trouser bar. Slim design for space saving - The hooks can be rotated through 360 degree rotation, practical for various room situations. Material: ABS (plastic); Colour: assorted (2 of each pink, grey, blue green, black).",5,200,2,6.4,USD,8b001df1-dab2-39a2-8b1a-89b6b445e237,../images/hanger3.png
|
||||||
|
a376e380-00e8-3d90-ba9f-c332c2df0f28,MC-CH-1003,Designer Coat Hooks - Pack of 3,Pack of 3 designer coat hook. Heavy-duty stainless steel hooks in a stylish shape.,6,200,1,6.49,USD,8b001df1-dab2-39a2-8b1a-89b6b445e237,../images/hanger4.png
|
||||||
|
fc16c43d-bb4e-30db-8b7e-98b3fdc7f0b9,MC-CH-1004,Vacuum Wall Hook - Pack of 6,"Big suction cup with diameter of 70mm, can load more than 10kg; bright contemporary colour; Principle of work: Atmospheric pressure, safely and easy to install and tear off, no need to drill a hole or add glue, without any damage to the surface; can be used on a variety of surfaces, including paint, glasses, wood, ceramic tile, gypsum, and any other smooth surface.",17,200,0,5.76,USD,12726eec-165c-3713-a674-3d2fc4f5127f,../images/hanger4.png
|
||||||
|
@@ -0,0 +1,16 @@
|
|||||||
|
ID,IDENTIFIER,NAME,COUNTRY,POSTCODE,CITY,STREET,BUILDING,PHONE
|
||||||
|
12726eec-165c-3713-a674-3d2fc4f5127f,OFFIPOR,OffiPOR,PR,Guaynabo,PR 00968,City View Plaza,301,+1 787-38515864
|
||||||
|
9655e5b6-bd8c-31ee-b94a-0651449721a0,POLIRADO,POLirado,PL,Warszawa,02-675,Ul. Woloska,5,+48 883 77522087
|
||||||
|
f1fd8dd5-3156-3469-b4f1-a03ff5041080,REGULCUST,Regular Custom Ltd,GB,Knutsford,WA16 6DW,King Street,25,+44 1565 47759991
|
||||||
|
bb2fa1e5-5c3a-3d26-b5c1-ed53f3e08622,OFFICEGURU,Office-Guru AG,DE,Siegen,57078,Birlenbacher Str.,19-21,+49 271 7722547
|
||||||
|
b91f077f-2086-3517-8244-d3b50835651b,MEINRESSORT,Mein Ressort GmbH,CH,Regensdorf,8105,Althardstrasse,80,+41 44 84008483
|
||||||
|
8b001df1-dab2-39a2-8b1a-89b6b445e237,OFFICELINE,Office Line Prag,CZ,Praha,140 00,Vyskocilova,1481/4,+420 776 9487923
|
||||||
|
3c7e6cbb-ea0f-35d2-a2ce-c85057a57916,DEPOT4ALL,Depot-4All,DE,Freiberg a. N.,71691,Grundelbachstrasse,10,+49 7141 2463585
|
||||||
|
41b46958-5ad7-30b6-9884-b547c1e26b7e,ITELOFFICE,ITeL-Office,DE,Dresden,01187,Chemnitzer Strasse,48,+49 351 31915489
|
||||||
|
7c5a5e3a-6dfa-35d3-8bf4-0cadbddb761a,FAMOUSUS,FamousUS,US,Houston,TX 77098,2601 Westheimer Road,Suite C250,+1 713-12001085
|
||||||
|
36de419f-0a4c-3a5a-b285-188979ce13ec,CHINACHAIN,ChinaChain,CN,Guangzhou,510613,No. 233 Tien He Road North,6402-6403,+86 20 86454650
|
||||||
|
41b922ad-35d9-352d-80c7-ee63ba1c007c,FAMOUSUS1,FamousUS (LV),US,Las Vegas,NV 89118,W Sunset Rd,3620,+1 702-486454400
|
||||||
|
b4b3188c-fa27-3467-a38a-f36ede8acc18,FAMOUSUS2,FamousUS (SF),US,South San Francisco,CA 94080,Forbes Blvd,401,+1 650-486454500
|
||||||
|
b5f1b294-a102-38e1-88c5-9b4d9ff0dd33,FAMOUSUS3,FamousUS (NY),US,New York,NY 10128,3rd Ave,1588,+1 212-486454600
|
||||||
|
391da904-9acd-334b-885e-4b4da38f3c6e,FAMOUSUS4,FamousUS (ORL),US,Orlando,FL 32806,W Sturtevant St,47,+1 407-486454700
|
||||||
|
1f6aed3b-bac0-39e5-ba5b-c091b0d18f40,FAMOUSUS5,FamousUS (NSH),US,Nashville,TN 37211,Space Park S Dr,486-810,+1 615-486454800
|
||||||
|
5
packages/officesupplies/db/csv/sap.common-Currencies.csv
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
"SYMBOL";"DESCR";"NAME";"CODE"
|
||||||
|
"€";"Euro";"Euro";"EUR"
|
||||||
|
"£";"British Pound";"British Pound";"GBP"
|
||||||
|
"₹";"Indian Rupee";"Indian Rupee";"INR"
|
||||||
|
"$";"US Dollar";"US Dollar";"USD"
|
||||||
|
30
packages/officesupplies/db/schema.cds
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
namespace sap.capire.officesupplies;
|
||||||
|
using { Currency } from '@sap/cds/common';
|
||||||
|
|
||||||
|
entity Products {
|
||||||
|
@Common.Label : 'UUID'
|
||||||
|
key ID : UUID;
|
||||||
|
identifier : String @Common.Label : 'ID';
|
||||||
|
title : localized String @( Common.Label : 'Name' );
|
||||||
|
description : localized String;
|
||||||
|
availability : Integer;
|
||||||
|
storage_capacity: Integer;
|
||||||
|
criticality : Integer;
|
||||||
|
price : Decimal(9,2);
|
||||||
|
currency : Currency;
|
||||||
|
supplier : Association to Suppliers;
|
||||||
|
image_url : String;
|
||||||
|
}
|
||||||
|
|
||||||
|
entity Suppliers {
|
||||||
|
key ID : UUID;
|
||||||
|
identifier: String;
|
||||||
|
name : String;
|
||||||
|
phone : String;
|
||||||
|
building : String;
|
||||||
|
street : String @multiline;
|
||||||
|
postCode : String;
|
||||||
|
city : String;
|
||||||
|
country : String;
|
||||||
|
products : Composition of many Products on products.supplier = $self;
|
||||||
|
}
|
||||||
19
packages/officesupplies/i18n/i18n.properties
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
Cat.ProductID=ProductID
|
||||||
|
Cat.ProductStock=In Stock
|
||||||
|
Cat.ProductPrice=Price
|
||||||
|
Cat.ProductTitle=Title
|
||||||
|
Cat.ProductDescr=Description
|
||||||
|
Cat.ProductImage=Image
|
||||||
|
Cat.SuppliersIdentifier=Name
|
||||||
|
Cat.SuppliersPostCode=City
|
||||||
|
Cat.SuppliersPhone=Phone
|
||||||
|
|
||||||
|
Cat.HeaderFacetDetails=Details
|
||||||
|
Cat.HeaderFacetSupplier=Supplier
|
||||||
|
Cat.HeaderPrice=Price
|
||||||
|
|
||||||
|
Cat.FacetProductInformation=Product Information
|
||||||
|
Cat.FacetSectionDescription=Description
|
||||||
|
|
||||||
|
Cat.TypeName=Product
|
||||||
|
Cat.TypeNamePlural=Products
|
||||||
14
packages/officesupplies/package.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "officesupplies",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "A simple CAP project.",
|
||||||
|
"repository": "<Add your repository here>",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"@sap/cds": "^3",
|
||||||
|
"express": "^4"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "npx cds run"
|
||||||
|
}
|
||||||
|
}
|
||||||
72
packages/officesupplies/srv/cat-service.cds
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
using sap.capire.officesupplies from '../db/schema';
|
||||||
|
|
||||||
|
@path:'/catalog'
|
||||||
|
service CatalogService {
|
||||||
|
entity Products as projection on officesupplies.Products;
|
||||||
|
entity Suppliers as projection on officesupplies.Suppliers;
|
||||||
|
};
|
||||||
|
|
||||||
|
annotate CatalogService.Products with @(
|
||||||
|
UI: {
|
||||||
|
HeaderInfo: {
|
||||||
|
TypeName: '{i18n>Cat.TypeName}',
|
||||||
|
TypeNamePlural: '{i18n>Cat.TypeNamePlural}',
|
||||||
|
Title: { $Type: 'UI.DataField', Value: title }
|
||||||
|
},
|
||||||
|
SelectionFields: [ identifier, title, availability, price],
|
||||||
|
LineItem: [
|
||||||
|
{$Type: 'UI.DataField', Value: image_url},
|
||||||
|
{$Type: 'UI.DataField', Value: identifier},
|
||||||
|
{$Type: 'UI.DataField', Value: title},
|
||||||
|
{$Type: 'UI.DataField', Value: availability},
|
||||||
|
{$Type: 'UI.DataField', Value: price}
|
||||||
|
],
|
||||||
|
HeaderFacets: [
|
||||||
|
{$Type: 'UI.ReferenceFacet', Target: '@UI.FieldGroup#ProductDetail', Label:'{i18n>Cat.HeaderFacetDetails}' },
|
||||||
|
{$Type: 'UI.ReferenceFacet', Target: '@UI.FieldGroup#SupplierDetail', Label:'{i18n>Cat.HeaderFacetSupplier}' },
|
||||||
|
{$Type: 'UI.ReferenceFacet', Target: '@UI.DataPoint#Price'}
|
||||||
|
],
|
||||||
|
Facets: [
|
||||||
|
{
|
||||||
|
$Type: 'UI.CollectionFacet',
|
||||||
|
Label: '{i18n>Cat.FacetProductInformation}',
|
||||||
|
Facets: [
|
||||||
|
{$Type: 'UI.ReferenceFacet', Target: '@UI.FieldGroup#Description', Label: '{i18n>Cat.FacetSectionDescription}'},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
DataPoint#Price: {Value: price, Title: '{i18n>Cat.HeaderPrice}'},
|
||||||
|
FieldGroup#Description: {
|
||||||
|
Data:[
|
||||||
|
{$Type: 'UI.DataField', Value: description}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
FieldGroup#ProductDetail: {
|
||||||
|
Data:[
|
||||||
|
{$Type: 'UI.DataField', Value: identifier},
|
||||||
|
{$Type: 'UI.DataField', Value: availability}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
FieldGroup#SupplierDetail: {
|
||||||
|
Data:[
|
||||||
|
{$Type: 'UI.DataField', Value: supplier.identifier},
|
||||||
|
{$Type: 'UI.DataField', Value: supplier.postCode},
|
||||||
|
{$Type: 'UI.DataField', Value: supplier.phone}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
annotate CatalogService.Products with {
|
||||||
|
ID @( Common: { Label: '{i18n>Cat.ProductID}'} );
|
||||||
|
availability @( Common.Label: '{i18n>Cat.ProductStock}' );
|
||||||
|
price @( Common.Label: '{i18n>Cat.ProductPrice}', Measures.ISOCurrency: currency_code );
|
||||||
|
description @( Common.Label: '{i18n>Cat.ProductDescr}' );
|
||||||
|
image_url @( Common.Label: '{i18n>Cat.ProductImage}', UI.IsImageURL: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
annotate CatalogService.Suppliers with {
|
||||||
|
identifier @( Common : { Label: '{i18n>Cat.SuppliersIdentifier}', Text: name, TextArrangement: #TextFirst } );
|
||||||
|
postCode @( Common : { Label: '{i18n>Cat.SuppliersPostCode}', Text: city, TextArrangement: #TextFirst } );
|
||||||
|
phone @Common.Label: '{i18n>Cat.SuppliersPhone}';
|
||||||
|
}
|
||||||
12
packages/products-service/.gitignore
vendored
@@ -1,12 +0,0 @@
|
|||||||
gen/
|
|
||||||
.gen/
|
|
||||||
node_modules/
|
|
||||||
target/
|
|
||||||
*.db
|
|
||||||
.DS_Store
|
|
||||||
_out
|
|
||||||
.che/
|
|
||||||
.cds_gen.log
|
|
||||||
package-lock.json
|
|
||||||
*.orig
|
|
||||||
mta_archives/
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
namespace sap.capire.products;
|
|
||||||
|
|
||||||
using { Currency, cuid, managed, sap.common.CodeList } from '@sap/cds/common';
|
|
||||||
|
|
||||||
entity Products : cuid, managed {
|
|
||||||
title : localized String(111);
|
|
||||||
descr : localized String(1111);
|
|
||||||
stock : Integer;
|
|
||||||
price : Decimal(9,2);
|
|
||||||
currency : Currency;
|
|
||||||
category : Association to Categories;
|
|
||||||
}
|
|
||||||
|
|
||||||
entity Categories : CodeList {
|
|
||||||
key ID : Integer;
|
|
||||||
parent : Association to Categories;
|
|
||||||
children : Composition of many Categories on children.parent = $self;
|
|
||||||
}
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
using from './db/schema';
|
|
||||||
using from './srv/admin-service';
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "@sap/capire-products",
|
|
||||||
"version": "1.0.0",
|
|
||||||
"description": "A reuse package providing domain models and services to manage product catalogs.",
|
|
||||||
"repository": "https://github.wdf.sap.corp/caps/products-service.git",
|
|
||||||
"license": "ISC",
|
|
||||||
"dependencies": {
|
|
||||||
"@sap/cds": "^3.16.3",
|
|
||||||
"express": "^4.17.1"
|
|
||||||
},
|
|
||||||
"files": [
|
|
||||||
"db",
|
|
||||||
"srv",
|
|
||||||
"index.cds"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
using { sap.capire.products as db } from '../db/schema';
|
|
||||||
namespace sap.capire.products;
|
|
||||||
|
|
||||||
service AdminService @(_requires:'admin') {
|
|
||||||
entity Products as projection on db.Products;
|
|
||||||
entity Categories as projection on db.Categories;
|
|
||||||
}
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
const cds = require ('@sap/cds')
|
|
||||||
|
|
||||||
describe('reading/writing hierarchies', ()=>{
|
|
||||||
|
|
||||||
it ('should prepare to sqlite in-memory', async()=>{
|
|
||||||
await cds.deploy (__dirname+'/../db') .to ('sqlite::memory:')
|
|
||||||
expect (cds.model) .toBeDefined()
|
|
||||||
})
|
|
||||||
|
|
||||||
it ('should insert hierarchy of categories', ()=>{
|
|
||||||
const { Categories } = cds.entities
|
|
||||||
return INSERT.into (Categories) .entries (
|
|
||||||
{ ID:100, name:'Some Sample Categories...', children:[
|
|
||||||
{ ID:101, name:'Cat', children:[
|
|
||||||
{ ID:102, name:'Kitty', children:[
|
|
||||||
{ ID:103, name:'Kitty Cat', children:[
|
|
||||||
{ ID:104, name:'Aristocat' } ]},
|
|
||||||
{ ID:105, name:'Kitty Bat' } ]},
|
|
||||||
{ ID:106, name:'Catwoman', children:[
|
|
||||||
{ ID:107, name:'Catalina' } ]} ]},
|
|
||||||
{ ID:108, name:'Catweazle' }
|
|
||||||
]}
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it ('should read categories with children', async()=>{
|
|
||||||
const { Categories } = cds.entities
|
|
||||||
expect (await
|
|
||||||
|
|
||||||
SELECT.one.from (Categories, c=>{
|
|
||||||
c.ID, c.name.as('parent'), c.children (c=>{
|
|
||||||
c.name.as('child')
|
|
||||||
})
|
|
||||||
}) .where ({name:'Cat'})
|
|
||||||
|
|
||||||
) .toMatchObject (
|
|
||||||
|
|
||||||
{ ID:101, parent:'Cat', children:[
|
|
||||||
{ child:'Kitty' },
|
|
||||||
{ child:'Catwoman' },
|
|
||||||
]}
|
|
||||||
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
it ('should read hierarchy of categories', async()=>{
|
|
||||||
const { Categories } = cds.entities
|
|
||||||
expect (await
|
|
||||||
|
|
||||||
SELECT.one.from (Categories, c=>{
|
|
||||||
c.ID, c.name, c.children (c=>{ c.name },{levels:3})
|
|
||||||
}) .where ({name:'Cat'})
|
|
||||||
|
|
||||||
) .toMatchObject (
|
|
||||||
|
|
||||||
{ ID:101, name:'Cat', children:[
|
|
||||||
{ name:'Kitty', children:[
|
|
||||||
{ name:'Kitty Cat', children:[
|
|
||||||
{ name:'Aristocat' }, ]},
|
|
||||||
{ name:'Kitty Bat' }, ]},
|
|
||||||
{ name:'Catwoman', children:[
|
|
||||||
{ name:'Catalina' } ]},
|
|
||||||
]}
|
|
||||||
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
ID;parent_ID;name
|
|
||||||
0;;Some Sample Categories...
|
|
||||||
1;;Cat
|
|
||||||
2;1;Kitty
|
|
||||||
3;2;Kitty Cat
|
|
||||||
4;3;Aristocat
|
|
||||||
5;2;Kitty Bat
|
|
||||||
6;1;Catwoman
|
|
||||||
7;6;Catalina
|
|
||||||
8;;Catweazle
|
|
||||||
|
@@ -1,157 +0,0 @@
|
|||||||
{
|
|
||||||
"info": {
|
|
||||||
"_postman_id": "0f8d4e79-a1c2-47fe-aeab-0319fb4ce180",
|
|
||||||
"name": "@sap/capire-products",
|
|
||||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
||||||
},
|
|
||||||
"item": [
|
|
||||||
{
|
|
||||||
"name": "Categories",
|
|
||||||
"request": {
|
|
||||||
"method": "POST",
|
|
||||||
"header": [
|
|
||||||
{
|
|
||||||
"key": "Content-Type",
|
|
||||||
"value": "application/json"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": "{ \"ID\":0, \"name\":\"Some Sample Categories...\", \"children\":[\n { \"ID\":1, \"name\":\"Cat\", \"children\":[\n { \"ID\":2, \"name\":\"Kitty\", \"children\":[\n { \"ID\":3, \"name\":\"Kitty Cat\", \"children\":[\n { \"ID\":4, \"name\":\"Aristocat\" }\n ]},\n { \"ID\":5, \"name\":\"Kitty Bat\" }\n ]},\n { \"ID\":6, \"name\":\"Catwoman\", \"children\":[\n { \"ID\":7, \"name\":\"Catalina\" }\n ]}\n ] },\n { \"ID\":8, \"name\":\"Catweazle\" }\n]}\n"
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"raw": "http://localhost:4004/admin/cats",
|
|
||||||
"protocol": "http",
|
|
||||||
"host": [
|
|
||||||
"localhost"
|
|
||||||
],
|
|
||||||
"port": "4004",
|
|
||||||
"path": [
|
|
||||||
"admin",
|
|
||||||
"cats"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"response": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Categories",
|
|
||||||
"request": {
|
|
||||||
"method": "GET",
|
|
||||||
"header": [],
|
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": ""
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"raw": "http://localhost:4004/admin/cats/0?$expand=children($expand=children($expand=children($expand=children)))",
|
|
||||||
"protocol": "http",
|
|
||||||
"host": [
|
|
||||||
"localhost"
|
|
||||||
],
|
|
||||||
"port": "4004",
|
|
||||||
"path": [
|
|
||||||
"admin",
|
|
||||||
"cats",
|
|
||||||
"0"
|
|
||||||
],
|
|
||||||
"query": [
|
|
||||||
{
|
|
||||||
"key": "$expand",
|
|
||||||
"value": "children($expand=children($expand=children($expand=children)))"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"response": [
|
|
||||||
{
|
|
||||||
"name": "Categories",
|
|
||||||
"originalRequest": {
|
|
||||||
"method": "GET",
|
|
||||||
"header": [],
|
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": ""
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"raw": "http://localhost:4004/admin/cats/0?$expand=children($expand=children($expand=children($expand=children)))",
|
|
||||||
"protocol": "http",
|
|
||||||
"host": [
|
|
||||||
"localhost"
|
|
||||||
],
|
|
||||||
"port": "4004",
|
|
||||||
"path": [
|
|
||||||
"admin",
|
|
||||||
"cats",
|
|
||||||
"0"
|
|
||||||
],
|
|
||||||
"query": [
|
|
||||||
{
|
|
||||||
"key": "$expand",
|
|
||||||
"value": "children($expand=children($expand=children($expand=children)))"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"status": "OK",
|
|
||||||
"code": 200,
|
|
||||||
"_postman_previewlanguage": "json",
|
|
||||||
"header": [
|
|
||||||
{
|
|
||||||
"key": "X-Powered-By",
|
|
||||||
"value": "Express"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "OData-Version",
|
|
||||||
"value": "4.0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "content-type",
|
|
||||||
"value": "application/json;odata.metadata=minimal"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "Date",
|
|
||||||
"value": "Tue, 21 May 2019 19:20:24 GMT"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "Connection",
|
|
||||||
"value": "keep-alive"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "Content-Length",
|
|
||||||
"value": "767"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"cookie": [],
|
|
||||||
"body": "{\n \"@odata.context\": \"$metadata#cats(children(children(children(children()))))/$entity\",\n \"@odata.metadataEtag\": \"W/\\\"+AAp4JKNOcr+OusjrdQo55RCfM+UHKpTh8EbhsxyPhM=\\\"\",\n \"name\": \"Some Sample Categories...\",\n \"descr\": null,\n \"ID\": 0,\n \"parent_ID\": null,\n \"children\": [\n {\n \"name\": \"Cat\",\n \"descr\": null,\n \"ID\": 1,\n \"parent_ID\": 0,\n \"children\": [\n {\n \"name\": \"Kitty\",\n \"descr\": null,\n \"ID\": 2,\n \"parent_ID\": 1,\n \"children\": [\n {\n \"name\": \"Kitty Cat\",\n \"descr\": null,\n \"ID\": 3,\n \"parent_ID\": 2,\n \"children\": [\n {\n \"name\": \"Aristocat\",\n \"descr\": null,\n \"ID\": 4,\n \"parent_ID\": 3\n }\n ]\n },\n {\n \"name\": \"Kitty Bat\",\n \"descr\": null,\n \"ID\": 5,\n \"parent_ID\": 2,\n \"children\": []\n }\n ]\n },\n {\n \"name\": \"Catwoman\",\n \"descr\": null,\n \"ID\": 6,\n \"parent_ID\": 1,\n \"children\": [\n {\n \"name\": \"Catalina\",\n \"descr\": null,\n \"ID\": 7,\n \"parent_ID\": 6,\n \"children\": []\n }\n ]\n }\n ]\n },\n {\n \"name\": \"Catweazle\",\n \"descr\": null,\n \"ID\": 8,\n \"parent_ID\": 0,\n \"children\": []\n }\n ]\n}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Categories",
|
|
||||||
"request": {
|
|
||||||
"method": "DELETE",
|
|
||||||
"header": [],
|
|
||||||
"body": {
|
|
||||||
"mode": "raw",
|
|
||||||
"raw": ""
|
|
||||||
},
|
|
||||||
"url": {
|
|
||||||
"raw": "http://localhost:4004/admin/cats/0",
|
|
||||||
"protocol": "http",
|
|
||||||
"host": [
|
|
||||||
"localhost"
|
|
||||||
],
|
|
||||||
"port": "4004",
|
|
||||||
"path": [
|
|
||||||
"admin",
|
|
||||||
"cats",
|
|
||||||
"0"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"response": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "dev-env",
|
|
||||||
"author": "daniel.hutzel@sap.com",
|
|
||||||
"dependencies": {
|
|
||||||
"@sap/cds": "^3.16.3"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"sqlite3": "^4.0.7"
|
|
||||||
},
|
|
||||||
"license": "ISC"
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "tests-env",
|
|
||||||
"author": "daniel.hutzel@sap.com",
|
|
||||||
"devDependencies": {
|
|
||||||
"@types/jest": "*",
|
|
||||||
"jest": "^24.8.0",
|
|
||||||
"supertest": "^4.0.2"
|
|
||||||
},
|
|
||||||
"license": "ISC"
|
|
||||||
}
|
|
||||||