Compare commits
1 Commits
uom
...
use-contex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5fc3462b24 |
@@ -9,7 +9,7 @@
|
||||
"index.cds"
|
||||
],
|
||||
"devDependencies": {
|
||||
"@cap-js/sqlite": ">=1"
|
||||
"@cap-js/sqlite": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@sap/cds": ">=7",
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"@sap-cloud-sdk/resilience": "^4",
|
||||
"@sap/cds": ">=5",
|
||||
"express": "^4.17.1",
|
||||
"@cap-js/hana": ">=1"
|
||||
"@cap-js/hana": "^1"
|
||||
},
|
||||
"cds": {
|
||||
"requires": {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using { sap } from '@sap/cds/common';
|
||||
|
||||
extend sap.common.Currencies with {
|
||||
// Currencies.code = ISO 4217 alphabetic three-letter code
|
||||
// with the first two letters being equal to ISO 3166 alphabetic country codes
|
||||
// See also:
|
||||
// [1] https://www.iso.org/iso-4217-currency-codes.html
|
||||
// [2] https://www.currency-iso.org/en/home/tables/table-a1.html
|
||||
// [3] https://www.ibm.com/support/knowledgecenter/en/SSZLC2_7.0.0/com.ibm.commerce.payments.developer.doc/refs/rpylerl2mst97.htm
|
||||
numcode : Integer;
|
||||
exponent : Integer; //> e.g. 2 --> 1 Dollar = 10^2 Cent
|
||||
minor : String; //> e.g. 'Cent'
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
code;name
|
||||
g;Grams
|
||||
kg;Kilograms
|
||||
mg;Milligrams
|
||||
lb;Pounds
|
||||
oz;Ounces
|
||||
|
@@ -1,11 +0,0 @@
|
||||
code;locale;name
|
||||
g;de;Gramm
|
||||
kg;de;Kilogramm
|
||||
mg;de;Milligramm
|
||||
lb;de;Pfund
|
||||
oz;de;Unze
|
||||
g;fr;Grammes
|
||||
kg;fr;Kilogrammes
|
||||
mg;fr;Milligrammes
|
||||
lb;fr;Livres
|
||||
oz;fr;Onces
|
||||
|
@@ -1,3 +1,45 @@
|
||||
using from './currencies';
|
||||
using from './regions';
|
||||
using from './uom';
|
||||
using { sap } from '@sap/cds/common';
|
||||
|
||||
extend sap.common.Currencies with {
|
||||
// Currencies.code = ISO 4217 alphabetic three-letter code
|
||||
// with the first two letters being equal to ISO 3166 alphabetic country codes
|
||||
// See also:
|
||||
// [1] https://www.iso.org/iso-4217-currency-codes.html
|
||||
// [2] https://www.currency-iso.org/en/home/tables/table-a1.html
|
||||
// [3] https://www.ibm.com/support/knowledgecenter/en/SSZLC2_7.0.0/com.ibm.commerce.payments.developer.doc/refs/rpylerl2mst97.htm
|
||||
numcode : Integer;
|
||||
exponent : Integer; //> e.g. 2 --> 1 Dollar = 10^2 Cent
|
||||
minor : String; //> e.g. 'Cent'
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The Code Lists below are designed as optional extensions to
|
||||
* the base schema. Switch them on by adding an Association to
|
||||
* one of the code list entities in your models or by:
|
||||
* annotate sap.common.Countries with @cds.persistence.skip:false;
|
||||
*/
|
||||
|
||||
context sap.common.countries {
|
||||
|
||||
extend sap.common.Countries {
|
||||
regions : Composition of many Regions on regions._parent = $self.code;
|
||||
}
|
||||
|
||||
entity Regions : sap.common.CodeList {
|
||||
key code : String(5); // ISO 3166-2 alpha5 codes, e.g. DE-BW
|
||||
children : Composition of many Regions on children._parent = $self.code;
|
||||
cities : Composition of many Cities on cities.region = $self;
|
||||
_parent : String(11);
|
||||
}
|
||||
entity Cities : sap.common.CodeList {
|
||||
key code : String(11);
|
||||
region : Association to Regions;
|
||||
districts : Composition of many Districts on districts.city = $self;
|
||||
}
|
||||
entity Districts : sap.common.CodeList {
|
||||
key code : String(11);
|
||||
city : Association to Cities;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
using { sap.common } from '@sap/cds/common';
|
||||
namespace sap.common.countries;
|
||||
|
||||
extend common.Countries {
|
||||
regions : Composition of many Regions on regions._parent = $self.code;
|
||||
}
|
||||
|
||||
entity Regions : common.CodeList {
|
||||
key code : String(5); // ISO 3166-2 alpha5 codes, e.g. DE-BW
|
||||
children : Composition of many Regions on children._parent = $self.code;
|
||||
cities : Composition of many Cities on cities.region = $self;
|
||||
_parent : String(11);
|
||||
}
|
||||
entity Cities : common.CodeList {
|
||||
key code : String(11);
|
||||
region : Association to Regions;
|
||||
districts : Composition of many Districts on districts.city = $self;
|
||||
}
|
||||
entity Districts : common.CodeList {
|
||||
key code : String(11);
|
||||
city : Association to Cities;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
using { sap.common.CodeList } from '@sap/cds/common';
|
||||
namespace sap.common.uom;
|
||||
|
||||
entity PackagingUnits : CodeList {
|
||||
key code : String(3); // e.g. pc for Piece(s)
|
||||
abbrev : localized String(3); // e.g. st for Stück
|
||||
}
|
||||
|
||||
entity Weights : CodeList {
|
||||
key code : String(3); // e.g. kg for Kilogram(s)
|
||||
}
|
||||
|
||||
entity Lengths : CodeList {
|
||||
key code : String(3); // e.g. m for Meter(s)
|
||||
}
|
||||
|
||||
type PackagingUnit : Association to PackagingUnits;
|
||||
type Length : Association to Lengths;
|
||||
type Weight : Association to Weights;
|
||||
@@ -106,7 +106,7 @@
|
||||
"name": "sap.fe.templates.ObjectPage",
|
||||
"options": {
|
||||
"settings" : {
|
||||
"entitySet" : "Books",
|
||||
"contextPath" : "/Books",
|
||||
"navigation" : {
|
||||
"Authors" : {
|
||||
"detail" : {
|
||||
@@ -123,7 +123,7 @@
|
||||
"name": "sap.fe.templates.ObjectPage",
|
||||
"options": {
|
||||
"settings" : {
|
||||
"entitySet" : "Authors"
|
||||
"contextPath" : "/Authors"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
"name": "sap.fe.templates.ListReport",
|
||||
"options": {
|
||||
"settings": {
|
||||
"entitySet": "Books",
|
||||
"contextPath": "/Books",
|
||||
"initialLoad": true,
|
||||
"navigation": {
|
||||
"Books": {
|
||||
@@ -117,7 +117,7 @@
|
||||
"name": "sap.fe.templates.ObjectPage",
|
||||
"options": {
|
||||
"settings": {
|
||||
"entitySet": "Books"
|
||||
"contextPath": "/Books"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,8 @@ aspect Hierarchy {
|
||||
LimitedDescendantCount : Integer64 = null;
|
||||
DistanceFromRoot : Integer64 = null;
|
||||
DrillState : String = null;
|
||||
Matched : Boolean = null;
|
||||
MatchedDescendantCount : Integer64 = null;
|
||||
LimitedRank : Integer64 = null;
|
||||
}
|
||||
|
||||
@@ -86,6 +88,8 @@ annotate Hierarchy with @Capabilities.FilterRestrictions.NonFilterableProperties
|
||||
'LimitedDescendantCount',
|
||||
'DistanceFromRoot',
|
||||
'DrillState',
|
||||
'Matched',
|
||||
'MatchedDescendantCount',
|
||||
'LimitedRank'
|
||||
];
|
||||
|
||||
@@ -93,6 +97,8 @@ annotate Hierarchy with @Capabilities.SortRestrictions.NonSortableProperties: [
|
||||
'LimitedDescendantCount',
|
||||
'DistanceFromRoot',
|
||||
'DrillState',
|
||||
'Matched',
|
||||
'MatchedDescendantCount',
|
||||
'LimitedRank'
|
||||
];
|
||||
|
||||
@@ -115,6 +121,8 @@ annotate my.Genres with @Hierarchy.RecursiveHierarchy #GenreHierarchy: {
|
||||
LimitedDescendantCount: LimitedDescendantCount,
|
||||
DistanceFromRoot : DistanceFromRoot,
|
||||
DrillState : DrillState,
|
||||
Matched : Matched,
|
||||
MatchedDescendantCount: MatchedDescendantCount,
|
||||
LimitedRank : LimitedRank
|
||||
};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"express": "^4.17.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cap-js/sqlite": ">=1"
|
||||
"@cap-js/sqlite": "^1"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "cds-serve",
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
};
|
||||
</script>
|
||||
|
||||
<script id="sap-ushell-bootstrap" src="https://ui5.sap.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||
<script id="sap-ui-bootstrap" src="https://ui5.sap.com/resources/sap-ui-core.js"
|
||||
<script id="sap-ushell-bootstrap" src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
||||
<script id="sap-ui-bootstrap" src="https://sapui5.hana.ondemand.com/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_horizon"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@capire/orders",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@cap-js/hana": ">=1",
|
||||
"@cap-js/hana": "^1",
|
||||
"@capire/common": "*",
|
||||
"@sap/cds": ">=5",
|
||||
"@sap/xssec": "^4"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"index.cds"
|
||||
],
|
||||
"dependencies": {
|
||||
"@cap-js/hana": ">=1",
|
||||
"@cap-js/hana": "^1",
|
||||
"@sap/cds": ">=5",
|
||||
"@sap/xssec": "^4.2.7",
|
||||
"express": "^4.17.1"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@cap-js/sqlite": "*"
|
||||
"@cap-js/sqlite": "^1"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user