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:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user