Add Fiori UI for Book administration

* Copyied from fiori/app/admin
* Added Supplier + Value Help + Texts
* Fixed bug in replication handler that caused to return wrong data
This commit is contained in:
Uwe Klinger
2021-06-11 08:15:27 +02:00
parent 4a0db3e259
commit 870f8d063d
11 changed files with 653 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ using { API_BUSINESS_PARTNER as S4 } from './external/API_BUSINESS_PARTNER.csn';
@cds.autoexpose // or expose explicitly in Catalog and AdminService
@cds.persistence: {table,skip:false} // add persistency
@readonly
entity sap.capire.bookshop.Suppliers as projection on S4.A_BusinessPartner {
// TODO: Aliases not supported in Java, yet?
key BusinessPartner as ID,

View File

@@ -31,8 +31,10 @@ module.exports = async()=>{ // called by server.js
if (!replicated) await replicate (supplierId, 'initial');
};
if (supplierId) return Promise.all ([ next(), replicateIfNotExists() ])
else return next() //> don't forget to pass down the interceptor stack
if (supplierId)
return (await Promise.all ([ next(), replicateIfNotExists() ]))[0]
else
return next() //> don't forget to pass down the interceptor stack
})
})