mirror of
https://github.com/inventree/inventree-app.git
synced 2026-09-09 03:10:14 +00:00
UI updates (#849)
* Updated dashboard - Display "outstanding" badges - Display "overdue" badges - Pull-to-refresh * Remove dead code * Refactor app colors * Add "pending shipments" icon * Remove custom spinner * Refactor error dialog * Updated redirect after login * Refactor login/account pages - Better UX and confirmation messages * Refactor API error messages * Improve token management - Secure storage - Handle session expiry - Per-profile HTTPS certificate checks * Improved error messages
This commit is contained in:
@@ -2,6 +2,7 @@ import "package:flutter/material.dart";
|
||||
import "package:flutter_speed_dial/flutter_speed_dial.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
import "package:inventree/inventree/model.dart";
|
||||
import "package:inventree/inventree/purchase_order.dart";
|
||||
@@ -53,7 +54,7 @@ class _PurchaseOrderExtraLineListWidgetState
|
||||
if (widget.order.canEdit) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_plus, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_plus, color: COLOR_SUCCESS),
|
||||
label: L10().lineItemAdd,
|
||||
onTap: () {
|
||||
_addLineItem(context);
|
||||
|
||||
@@ -67,7 +67,7 @@ class _POLineDetailWidgetState extends RefreshableState<POLineDetailWidget> {
|
||||
if (!widget.item.isComplete) {
|
||||
buttons.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.transition_right, color: Colors.blue),
|
||||
child: Icon(TablerIcons.transition_right, color: COLOR_ACTION),
|
||||
label: L10().receiveItem,
|
||||
onTap: () async {
|
||||
receiveLineItem(context);
|
||||
|
||||
@@ -95,7 +95,7 @@ class _PurchaseOrderDetailState
|
||||
if (showCameraShortcut && widget.order.canEdit) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.camera, color: Colors.blue),
|
||||
child: Icon(TablerIcons.camera, color: COLOR_ACTION),
|
||||
label: L10().takePicture,
|
||||
onTap: () async {
|
||||
_uploadImage(context);
|
||||
@@ -108,7 +108,7 @@ class _PurchaseOrderDetailState
|
||||
if (widget.order.isPending) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_plus, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_plus, color: COLOR_SUCCESS),
|
||||
label: L10().lineItemAdd,
|
||||
onTap: () async {
|
||||
_addLineItem(context);
|
||||
@@ -118,7 +118,7 @@ class _PurchaseOrderDetailState
|
||||
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.send, color: Colors.blue),
|
||||
child: Icon(TablerIcons.send, color: COLOR_ACTION),
|
||||
label: L10().issueOrder,
|
||||
onTap: () async {
|
||||
_issueOrder(context);
|
||||
@@ -130,7 +130,7 @@ class _PurchaseOrderDetailState
|
||||
if (widget.order.isOpen && !widget.order.isPending) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_check, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_check, color: COLOR_SUCCESS),
|
||||
label: L10().completeOrder,
|
||||
onTap: () async {
|
||||
_completeOrder(context);
|
||||
@@ -142,7 +142,7 @@ class _PurchaseOrderDetailState
|
||||
if (widget.order.isOpen) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_x, color: Colors.red),
|
||||
child: Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
||||
label: L10().cancelOrder,
|
||||
onTap: () async {
|
||||
_cancelOrder(context);
|
||||
@@ -193,7 +193,7 @@ class _PurchaseOrderDetailState
|
||||
L10().issueOrder,
|
||||
L10().issueOrderConfirm,
|
||||
icon: TablerIcons.send,
|
||||
color: Colors.blue,
|
||||
color: COLOR_ACTION,
|
||||
acceptText: L10().issue,
|
||||
onAccept: () async {
|
||||
widget.order.issueOrder().then((dynamic) {
|
||||
@@ -227,7 +227,7 @@ class _PurchaseOrderDetailState
|
||||
L10().cancelOrder,
|
||||
L10().cancelOrderConfirm,
|
||||
icon: TablerIcons.circle_x,
|
||||
color: Colors.red,
|
||||
color: COLOR_DANGER,
|
||||
acceptText: L10().cancel,
|
||||
onAccept: () async {
|
||||
widget.order.cancelOrder().then((dynamic) {
|
||||
|
||||
@@ -127,7 +127,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
L10().issueOrder,
|
||||
L10().issueOrderConfirm,
|
||||
icon: TablerIcons.send,
|
||||
color: Colors.blue,
|
||||
color: COLOR_ACTION,
|
||||
acceptText: L10().issue,
|
||||
onAccept: () async {
|
||||
widget.order.issueOrder().then((dynamic) {
|
||||
@@ -143,7 +143,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
L10().cancelOrder,
|
||||
L10().cancelOrderConfirm,
|
||||
icon: TablerIcons.circle_x,
|
||||
color: Colors.red,
|
||||
color: COLOR_DANGER,
|
||||
acceptText: L10().cancel,
|
||||
onAccept: () async {
|
||||
await widget.order.cancelOrder().then((dynamic) {
|
||||
@@ -160,7 +160,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
if (showCameraShortcut && widget.order.canEdit) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.camera, color: Colors.blue),
|
||||
child: Icon(TablerIcons.camera, color: COLOR_ACTION),
|
||||
label: L10().takePicture,
|
||||
onTap: () async {
|
||||
_uploadImage(context);
|
||||
@@ -172,7 +172,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
if (widget.order.isPending) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.send, color: Colors.blue),
|
||||
child: Icon(TablerIcons.send, color: COLOR_ACTION),
|
||||
label: L10().issueOrder,
|
||||
onTap: () async {
|
||||
_issueOrder(context);
|
||||
@@ -184,7 +184,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
if (widget.order.isOpen) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_x, color: Colors.red),
|
||||
child: Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
||||
label: L10().cancelOrder,
|
||||
onTap: () async {
|
||||
_cancelOrder(context);
|
||||
@@ -198,7 +198,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
InvenTreeSOLineItem().canCreate) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_plus, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_plus, color: COLOR_SUCCESS),
|
||||
label: L10().lineItemAdd,
|
||||
onTap: () async {
|
||||
_addLineItem(context);
|
||||
@@ -208,7 +208,7 @@ class _SalesOrderDetailState extends RefreshableState<SalesOrderDetailWidget> {
|
||||
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_plus, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_plus, color: COLOR_SUCCESS),
|
||||
label: L10().shipmentAdd,
|
||||
onTap: () async {
|
||||
_addShipment(context);
|
||||
|
||||
@@ -2,6 +2,7 @@ import "package:flutter/material.dart";
|
||||
import "package:flutter_speed_dial/flutter_speed_dial.dart";
|
||||
import "package:flutter_tabler_icons/flutter_tabler_icons.dart";
|
||||
|
||||
import "package:inventree/app_colors.dart";
|
||||
import "package:inventree/l10.dart";
|
||||
|
||||
import "package:inventree/inventree/model.dart";
|
||||
@@ -55,7 +56,7 @@ class _SalesOrderExtraLineListWidgetState
|
||||
if (widget.order.canEdit) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.circle_plus, color: Colors.green),
|
||||
child: Icon(TablerIcons.circle_plus, color: COLOR_SUCCESS),
|
||||
label: L10().lineItemAdd,
|
||||
onTap: () {
|
||||
_addLineItem(context);
|
||||
|
||||
@@ -111,7 +111,7 @@ class _SOLineDetailWidgetState extends RefreshableState<SoLineDetailWidget> {
|
||||
if (order != null && order!.isOpen) {
|
||||
buttons.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.transition_right, color: Colors.blue),
|
||||
child: Icon(TablerIcons.transition_right, color: COLOR_ACTION),
|
||||
label: L10().allocateStock,
|
||||
onTap: () async {
|
||||
_allocateStock(context);
|
||||
|
||||
@@ -154,7 +154,7 @@ class _SOShipmentDetailWidgetState
|
||||
if (showCameraShortcut) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.camera, color: Colors.blue),
|
||||
child: Icon(TablerIcons.camera, color: COLOR_ACTION),
|
||||
label: L10().takePicture,
|
||||
onTap: () async {
|
||||
_uploadImage(context);
|
||||
@@ -167,7 +167,7 @@ class _SOShipmentDetailWidgetState
|
||||
if (!widget.shipment.isChecked && !widget.shipment.isShipped) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.check, color: Colors.green),
|
||||
child: Icon(TablerIcons.check, color: COLOR_SUCCESS),
|
||||
label: L10().shipmentCheck,
|
||||
onTap: () async {
|
||||
widget.shipment
|
||||
@@ -185,7 +185,7 @@ class _SOShipmentDetailWidgetState
|
||||
if (widget.shipment.isChecked && !widget.shipment.isShipped) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.x, color: Colors.red),
|
||||
child: Icon(TablerIcons.x, color: COLOR_DANGER),
|
||||
label: L10().shipmentUncheck,
|
||||
onTap: () async {
|
||||
widget.shipment.update(values: {"checked_by": null}).then((_) {
|
||||
@@ -201,7 +201,7 @@ class _SOShipmentDetailWidgetState
|
||||
if (!widget.shipment.isShipped) {
|
||||
actions.add(
|
||||
SpeedDialChild(
|
||||
child: Icon(TablerIcons.truck_delivery, color: Colors.green),
|
||||
child: Icon(TablerIcons.truck_delivery, color: COLOR_SUCCESS),
|
||||
label: L10().shipmentSend,
|
||||
onTap: () async {
|
||||
_sendShipment(context);
|
||||
|
||||
Reference in New Issue
Block a user