moving front app to subfolder. add webpack config with watch and dev-server mode. moving deploy things in subfolder
This commit is contained in:
committed by
Daniel Hutzel
parent
0e86e1e1fd
commit
dbe4b8a7bd
@@ -49,7 +49,6 @@ module.exports = async function () {
|
||||
({ track_ID: curID }) => newInvoicedTracks.includes(curID)
|
||||
);
|
||||
if (isNewInvoiceHasInvoicedTracks) {
|
||||
await transaction.rollback();
|
||||
req.reject(400, "Invoice contains already owned values");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
const cds = require("@sap/cds");
|
||||
|
||||
const SHIPPED_STATUS = 1;
|
||||
|
||||
module.exports = async function () {
|
||||
const db = await cds.connect.to("db"); // connect to database service
|
||||
|
||||
@@ -13,6 +15,7 @@ module.exports = async function () {
|
||||
"invoice_ID in",
|
||||
SELECT("ID").from(Invoices).where({
|
||||
customer_ID: req.user.attr.ID,
|
||||
status: SHIPPED_STATUS,
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
@@ -4,8 +4,7 @@ module.exports = async function () {
|
||||
const db = await cds.connect.to("db"); // connect to database service
|
||||
|
||||
this.on("CREATE", "*", async (req) => {
|
||||
const selectLastQuery = SELECT.one(req.entity)
|
||||
.orderBy({ ID: "desc" });
|
||||
const selectLastQuery = SELECT.one(req.entity).orderBy({ ID: "desc" });
|
||||
|
||||
const transaction = await db.tx(req);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user