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:
@@ -95,6 +95,32 @@ export class ApiClient {
|
||||
delete: (id) => this.#empty('DELETE', `/api/delivery/${enc(id)}`),
|
||||
};
|
||||
|
||||
this.quote = {
|
||||
/** GET /api/quote → { quotes } */
|
||||
list: () => this.#json('GET', '/api/quote'),
|
||||
/** GET /api/quote/{id} → { quote } */
|
||||
get: (id) => this.#json('GET', `/api/quote/${enc(id)}`),
|
||||
/** POST /api/quote → 201 { quote } */
|
||||
create: (body) => this.#json('POST', '/api/quote', { body }),
|
||||
/** PATCH /api/quote/{id} → { quote } */
|
||||
update: (id, body) => this.#json('PATCH', `/api/quote/${enc(id)}`, { body }),
|
||||
/** DELETE /api/quote/{id} → 204 */
|
||||
delete: (id) => this.#empty('DELETE', `/api/quote/${enc(id)}`),
|
||||
};
|
||||
|
||||
this.order = {
|
||||
/** GET /api/order → { orders } */
|
||||
list: () => this.#json('GET', '/api/order'),
|
||||
/** GET /api/order/{id} → { order } */
|
||||
get: (id) => this.#json('GET', `/api/order/${enc(id)}`),
|
||||
/** POST /api/order → 201 { order } */
|
||||
create: (body) => this.#json('POST', '/api/order', { body }),
|
||||
/** PATCH /api/order/{id} → { order } */
|
||||
update: (id, body) => this.#json('PATCH', `/api/order/${enc(id)}`, { body }),
|
||||
/** DELETE /api/order/{id} → 204 */
|
||||
delete: (id) => this.#empty('DELETE', `/api/order/${enc(id)}`),
|
||||
};
|
||||
|
||||
this.customergroup = {
|
||||
/** GET /api/customergroup → { customergroups } */
|
||||
list: () => this.#json('GET', '/api/customergroup'),
|
||||
|
||||
Reference in New Issue
Block a user