api cache

This commit is contained in:
JMARyA 2024-09-26 09:50:53 +02:00
parent 82d258f74a
commit 5687efae4f
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 54 additions and 11 deletions

View file

@ -62,7 +62,6 @@ class _ActiveFlowPageState extends State<ActiveFlowPage> {
}
},
icon: const Icon(Icons.stop)),
// todo : continue next flow
if (widget.info.next != null)
IconButton(
onPressed: () {

View file

@ -3,7 +3,6 @@ import 'package:cdb_ui/pages/flow/active_flow_page.dart';
import 'package:cdb_ui/pages/transaction.dart';
import 'package:flutter/material.dart';
class CreateFlowPage extends StatefulWidget {
final API.FlowInfo info;
final Function refresh;
@ -77,13 +76,30 @@ class _CreateFlowPageState extends State<CreateFlowPage> {
}).toList());
}
Widget flowContinuation() {
return Row(
children: [
Card(
child: Text(widget.previousFlow!.kind),
),
const Text(" -> "),
Card(
child: Text(widget.info.name),
)
],
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text("Create new ${widget.info.name} Flow")),
body: Column(
children: [
// todo : flow continuation overview
if (widget.previousFlow != null) ...[
flowContinuation(),
const Divider()
],
buildInputSelection(context),
const Divider(),
Card(
@ -99,4 +115,4 @@ class _CreateFlowPageState extends State<CreateFlowPage> {
),
);
}
}
}

View file

@ -78,7 +78,6 @@ class _EndFlowWithProduceState extends State<EndFlowWithProduce> {
@override
Widget build(BuildContext context) {
// todo : show end screen with produce
return Scaffold(
appBar: AppBar(
title: Text("End ${widget.info.name} Flow"),
@ -87,7 +86,6 @@ class _EndFlowWithProduceState extends State<EndFlowWithProduce> {
children: [
...addProduceButtons(),
const Divider(),
// todo : add produced list
...produces.map((x) {
return TransactionCard(
x.transaction(locations),

View file

@ -50,7 +50,6 @@ class _SupplyPageState extends State<SupplyPage> {
_formKey.currentState!.save();
if (widget.onCreate != null) {
// todo : create shadow transaction
var t = SupplyForm(
itemID: widget.item.id,
variant: variant,