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

@@ -1,3 +1,5 @@
import supplierAutomat from '../../automats/supplierAutomat';
/** Groups that are not sales customers (filter client-side). */
export const EXCLUDED_CUSTOMER_GROUP_NAMES = new Set(['Lieferanten', 'POS']);
@@ -424,7 +426,10 @@ export const DELIVERY_LINE_COLUMNS = [
*/
export async function loadParties(kind, ctx) {
if (kind === 'delivery') {
const list = ctx.suppliers ?? (await ctx.supplierPromise);
if (supplierAutomat.state.status === 'ready') {
return sortSuppliers(supplierAutomat.state.suppliers);
}
const list = await supplierAutomat.actions.load();
return sortSuppliers(list);
}
const [entities, groups] = await Promise.all([