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