supplierAutomat
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user