kell_creations/kell_creations_apps/packages/feature_orders/test
Mike Kell 197cc66169 feat(stage-11c): custom order tracking and fulfillment
Adds the workshop-side counterpart to Stage 11B's intake form: a tracking workspace filtered by fulfillment stage, an auditable timeline of stage changes, and inventory deduction on completion. Closes audit finding P2.2; Stage 11 is complete.

Domain: FulfillmentEvent (append-only transition record with operator notes and a malformed-line-tolerant wire format), MaterialUsage, MaterialConsumptionPort + MaterialDeductionResult. Order gains fulfillmentHistory, materialUsage, derived stage accessors, and withFulfillmentEvent(). All existing fields, defaults, and copyWith semantics preserved.

Data: advanceFulfillmentStatus() records an event with an optional note and injectable clock; recordMaterialUsage() added. WooCommerce round-trips both through _kc_ meta keys, skipping malformed lines and never blanking remote values.

Application/presentation: AdvanceFulfillment, CompleteCustomOrder, CustomOrderTrackingController, CustomOrderTrackingPage, FulfillmentTimeline, showAdvanceStageDialog. Illegal transitions surface the domain rejection reason verbatim.

Architecture: inventory deduction crosses the feature boundary through an outbound port, not a package dependency. feature_orders still has no dependency on feature_inventory; each app supplies InventoryMaterialConsumptionAdapter. Completion advances first and deducts second, so a rejected transition can never decrement stock, and a deduction failure warns rather than failing the commission.

Tests: 329 new (293 feature_orders, 22 kell_mobile, 14 kell_web). 1085/1085 feature_orders, 109/109 kell_mobile, 81/81 kell_web. dart analyze --fatal-infos clean.
2026-09-25 16:54:51 -04:00
..
widgets feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
checkout_controller_test.dart feat(stage-10c): Square Mobile POS / Checkout 2026-07-25 17:37:36 -04:00
complete_custom_order_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
custom_order_form_controller_test.dart feat(stage-11b): custom order intake UI 2026-09-25 15:45:04 -04:00
custom_order_spec_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
custom_order_tracking_controller_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
deposit_info_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
fake_orders_repository_custom_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
fake_orders_repository_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
fake_orders_repository_tracking_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
fake_payment_service_test.dart feat(stage-10c): Square Mobile POS / Checkout 2026-07-25 17:37:36 -04:00
feature_orders_test.dart feat/orders-domain: expand orders domain with write operations and 90 tests 2026-07-10 19:04:39 -04:00
fulfillment_event_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
fulfillment_status_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
material_consumption_port_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
material_usage_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
order_tracking_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00
order_type_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
orders_controller_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
payment_method_test.dart feat(stage-10c): Square Mobile POS / Checkout 2026-07-25 17:37:36 -04:00
payment_result_test.dart feat(stage-10c): Square Mobile POS / Checkout 2026-07-25 17:37:36 -04:00
woo_commerce_custom_order_test.dart feat(stage-11a): custom order domain and data 2026-08-29 15:19:29 -04:00
woo_commerce_order_mapper_test.dart feat(orders): Stage 9A - WooCommerce Orders API integration 2026-07-11 09:45:36 -04:00
woo_commerce_orders_repository_test.dart feat(orders): Stage 9A - WooCommerce Orders API integration 2026-07-11 09:45:36 -04:00
woo_commerce_tracking_meta_test.dart feat(stage-11c): custom order tracking and fulfillment 2026-09-25 16:54:51 -04:00