supplierAutomat

This commit is contained in:
seb
2026-09-21 10:55:17 +02:00
parent 98080f0514
commit 2046f96768
9 changed files with 222 additions and 34 deletions

View File

@@ -382,7 +382,6 @@ export class StorageManager extends ApiClient {
const companyCache = createCache('GET /company', () => this.#loadCompanies());
const categoryTreeCache = createCache('GET /category/tree', () => this.#loadCategoryTree());
const posterminalCache = createCache('GET /posterminal', () => this.#loadPosterminals());
const supplierCache = createCache('GET /supplier', () => this.#loadSuppliers());
const deliveryCache = createCache('GET /delivery', () => this.#loadDeliveries());
const customergroupCache = createCache('GET /customergroup', () =>
this.#loadCustomergroups(),
@@ -424,11 +423,6 @@ export class StorageManager extends ApiClient {
posterminalPromise: { get: () => posterminalCache.promise },
updatePosterminal: { value: posterminalCache.update },
supplierPromise: { get: () => supplierCache.promise },
updateSupplier: { value: supplierCache.update },
/** Settled GET /supplier list, or undefined. */
suppliers: { get: () => supplierCache.value },
deliveryPromise: { get: () => deliveryCache.promise },
updateDelivery: { value: deliveryCache.update },
/** Settled GET /delivery list, or undefined. */
@@ -580,12 +574,6 @@ export class StorageManager extends ApiClient {
return requireArray(data.posterminals, 'posterminals');
}
async #loadSuppliers() {
const data = await this.supplier.list();
requireObject(data, 'GET /api/supplier');
return requireArray(data.suppliers, 'suppliers');
}
async #loadDeliveries() {
const data = await this.delivery.list();
requireObject(data, 'GET /api/delivery');