Add shared Manifest UI for delivery, quote, and order.

Wire quote/order API clients and routes, then unify list/create/edit behind ManifestList/Form tiles so Lieferungen and Auftrag share one stack.
This commit is contained in:
seb
2026-08-06 20:08:56 +02:00
parent 8d50d083f5
commit 4896b1dc36
26 changed files with 1356 additions and 1103 deletions

View File

@@ -599,6 +599,87 @@ export const delivery = {
},
};
/**
* Sales quotes (manifest type = quote).
* Summary = { id, number, type: 'quote', entityId, date }
* Line = { id, articleId, sku, amount, net, rebate, tax, comment } — no transactedAmount
* LineInput = { sku, amount, net, tax, rebate?, comment? }
*/
export const quote = {
/** GET /api/quote → { quotes: QuoteSummary[] } */
list() {
return http('/api/quote');
},
/** GET /api/quote/:id → { quote: Quote } */
get(id) {
return http(`/api/quote/${id}`);
},
/**
* POST /api/quote
* Body: { number, date, entityId?, lines }
* → 201 { quote: Quote }
*/
create(body) {
return http('/api/quote', { method: 'POST', body });
},
/**
* PATCH /api/quote/:id
* Body: partial { number?, date?, entityId?, lines? }
* → 200 { quote: Quote }
*/
update(id, body) {
return http(`/api/quote/${id}`, { method: 'PATCH', body });
},
/** DELETE /api/quote/:id → 204 */
delete(id) {
return http(`/api/quote/${id}`, { method: 'DELETE' });
},
};
/**
* Sales orders (manifest type = order).
* Summary = { id, number, type: 'order', entityId, date }
* Line shape same as quote (no transactedAmount).
*/
export const order = {
/** GET /api/order → { orders: OrderSummary[] } */
list() {
return http('/api/order');
},
/** GET /api/order/:id → { order: Order } */
get(id) {
return http(`/api/order/${id}`);
},
/**
* POST /api/order
* Body: { number, date, entityId?, lines }
* → 201 { order: Order }
*/
create(body) {
return http('/api/order', { method: 'POST', body });
},
/**
* PATCH /api/order/:id
* Body: partial { number?, date?, entityId?, lines? }
* → 200 { order: Order }
*/
update(id, body) {
return http(`/api/order/${id}`, { method: 'PATCH', body });
},
/** DELETE /api/order/:id → 204 */
delete(id) {
return http(`/api/order/${id}`, { method: 'DELETE' });
},
};
/**
* Company-scoped customer groups.
* Shape: CustomerGroup = { id, name }
@@ -903,7 +984,9 @@ export default {
customergroup,
delivery,
entity,
order,
posterminal,
quote,
supplier,
thumb,
unit,