-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into script-tasks
- Loading branch information
Showing
31 changed files
with
9,049 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/javascript-node/.devcontainer/base.Dockerfile | ||
|
||
# [Choice] Node.js version: 18, 16, 14 | ||
ARG VARIANT="18-buster" | ||
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} | ||
|
||
# Install extra tools for CAP development & deployment. | ||
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
&& apt-get -y install --no-install-recommends curl git jq | ||
|
||
# Install SAP CAP SDK globally | ||
RUN su node -c "npm install -g @sap/cds-dk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "CAP Incident Management Reference App Dev Container", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { "VARIANT": "18" } | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"mechatroner.rainbow-csv", | ||
"dbaeumer.vscode-eslint", | ||
"sapse.vscode-cds", | ||
"sapse.vsc-extension-odata-csdl-modeler", | ||
"sapse.vscode-wing-cds-editor-vsc", | ||
"saposs.xml-toolkit", | ||
"humao.rest-client" | ||
] | ||
} | ||
}, | ||
"forwardPorts": [ 4004 ], | ||
"remoteUser": "node" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ID,firstName,lastName,email,phone | ||
8fc8231b-f6d7-43d1-a7e1-725c8e988d18,Daniel,Watts,[email protected],+44-555-123 | ||
feb04eac-f84f-4232-bd4f-80a178f24a17,Stormy,Weathers,[email protected], | ||
2b87f6ca-28a2-41d6-8c69-ccf16aa6389d,Sunny,Sunshine,[email protected],+01-555-789 | ||
1004155,Daniel,Watts,[email protected],+44-555-123 | ||
1004161,Stormy,Weathers,[email protected], | ||
1004100,Sunny,Sunshine,[email protected],+01-555-789 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ID,customer_ID,title,urgency_code,status_code | ||
3b23bb4b-4ac7-4a24-ac02-aa10cabd842c,8fc8231b-f6d7-43d1-a7e1-725c8e988d18,Inverter not functional,H,C | ||
3a4ede72-244a-4f5f-8efa-b17e032d01ee,feb04eac-f84f-4232-bd4f-80a178f24a17,No current on a sunny day,H,N | ||
3ccf474c-3881-44b7-99fb-59a2a4668418,feb04eac-f84f-4232-bd4f-80a178f24a17,Strange noise when switching off Inverter,M,N | ||
3583f982-d7df-4aad-ab26-301d4a157cd7,2b87f6ca-28a2-41d6-8c69-ccf16aa6389d,Solar panel broken,H,I | ||
3b23bb4b-4ac7-4a24-ac02-aa10cabd842c,1004155,Inverter not functional,H,C | ||
3a4ede72-244a-4f5f-8efa-b17e032d01ee,1004161,No current on a sunny day,H,N | ||
3ccf474c-3881-44b7-99fb-59a2a4668418,1004161,Strange noise when switching off Inverter,M,N | ||
3583f982-d7df-4aad-ab26-301d4a157cd7,1004100,Solar panel broken,H,I |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using ProcessorService as service from '../../srv/processor-service'; | ||
using from './annotations.cds'; | ||
annotate service.Incidents with @( | ||
/*adding email to the object page enables users to view the | ||
changes recieved via Messaging/Eventing*/ | ||
UI.FieldGroup #GeneratedGroup1 : { | ||
Data : [..., | ||
{ | ||
$Type : 'UI.DataField', | ||
Value : customer.email, | ||
Label : '{i18n>email}' | ||
} | ||
] | ||
}); | ||
|
||
annotate service.Customers with { | ||
email @readonly | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
using from './incidents/annotations'; | ||
using from './incidents/field'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
{ | ||
"name": "@capire/messaging", | ||
"version": "1.0.0", | ||
"dependencies": { | ||
"@sap-cloud-sdk/connectivity": "^3.6.0", | ||
"@sap-cloud-sdk/http-client": "^3.6.0", | ||
"@sap-cloud-sdk/resilience": "^3.6.0", | ||
"@sap-cloud-sdk/util": "^3.6.0", | ||
"@sap/cds": ">=7", | ||
"@sap/cds-hana": "^2", | ||
"@sap/xssec": "^3", | ||
"express": "^4", | ||
"passport": "^0", | ||
"@sap/xb-msg-amqp-v100": "^0" | ||
}, | ||
"devDependencies": { | ||
"@cap-js/sqlite": "^1.0.1", | ||
"@sap/cds-dk": "^7", | ||
"@sap/ux-specification": "^1.108.4", | ||
"axios": "^1.4.0", | ||
"chai": "^4.3.7", | ||
"chai-as-promised": "^7.1.1", | ||
"chai-subset": "^1.6.0", | ||
"jest": "^29.5.0", | ||
"rimraf": "^3.0.2" | ||
}, | ||
"scripts": { | ||
"watch": "cds watch", | ||
"start": "cds-serve", | ||
"test": "npx jest --silent" | ||
}, | ||
"private": true, | ||
"sapux": [ | ||
"app/incidents" | ||
], | ||
"cds": { | ||
"requires": { | ||
"incidents-app": { | ||
"model": "@capire/incidents" | ||
}, | ||
"[production]": { | ||
"db": { | ||
"kind": "hana-cloud" | ||
}, | ||
"auth": { | ||
"kind": "xsuaa" | ||
}, | ||
"approuter": { | ||
"kind": "cloudfoundry" | ||
} | ||
}, | ||
"[development]": { | ||
"auth": { | ||
"kind": "mocked", | ||
"users": { | ||
"alice": { | ||
"roles": [ | ||
"support" | ||
] | ||
}, | ||
"bob": { | ||
"roles": [ | ||
"support" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"db": { | ||
"kind": "sql" | ||
}, | ||
"API_BUSINESS_PARTNER": { | ||
"kind": "odata-v2", | ||
"model": "srv/external/API_BUSINESS_PARTNER", | ||
"[production]": { | ||
"credentials": { | ||
"destination": "incidents-api-access", | ||
"path": "/sap/opu/odata/sap/API_BUSINESS_PARTNER" | ||
} | ||
} | ||
}, | ||
"messaging": { | ||
"kind": "local-messaging", | ||
"[production]": { | ||
"kind": "enterprise-messaging-shared", | ||
"format": "cloudevents" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### Change Email Address | ||
|
||
PATCH http://localhost:4004/odata/v4/api-business-partner/A_BusinessPartner('1004155') | ||
Content-Type: application/json | ||
|
||
{ | ||
"to_BusinessPartnerAddress": [ | ||
{ | ||
"BusinessPartner": "1004155", | ||
"AddressID": "123", | ||
"to_EmailAddress": [{ | ||
"AddressID": "123", | ||
"Person": "Williams", | ||
"OrdinalNumber": "123", | ||
"EmailAddress": "[email protected]" | ||
|
||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.