Navigation
This commit is contained in:
parent
ea2772647a
commit
e21f4a4082
|
|
@ -411,7 +411,7 @@ const Map<int, String> kModules = {
|
||||||
|
|
||||||
class InvoiceStatusColors {
|
class InvoiceStatusColors {
|
||||||
static var colors = {
|
static var colors = {
|
||||||
kInvoiceStatusDraft: Colors.transparent,
|
kInvoiceStatusDraft: Colors.black,
|
||||||
kInvoiceStatusSent: convertHexStringToColor('#505F73'),
|
kInvoiceStatusSent: convertHexStringToColor('#505F73'),
|
||||||
//kInvoiceStatusViewed: Colors.orange,
|
//kInvoiceStatusViewed: Colors.orange,
|
||||||
//kInvoiceStatusApproved: Colors.green,
|
//kInvoiceStatusApproved: Colors.green,
|
||||||
|
|
@ -425,7 +425,7 @@ class InvoiceStatusColors {
|
||||||
|
|
||||||
class CreditStatusColors {
|
class CreditStatusColors {
|
||||||
static var colors = {
|
static var colors = {
|
||||||
kCreditStatusDraft: Colors.transparent,
|
kCreditStatusDraft: Colors.black,
|
||||||
kCreditStatusSent: convertHexStringToColor('#505F73'),
|
kCreditStatusSent: convertHexStringToColor('#505F73'),
|
||||||
//kInvoiceStatusViewed: Colors.orange,
|
//kInvoiceStatusViewed: Colors.orange,
|
||||||
//kInvoiceStatusApproved: Colors.green,
|
//kInvoiceStatusApproved: Colors.green,
|
||||||
|
|
@ -436,7 +436,7 @@ class CreditStatusColors {
|
||||||
|
|
||||||
class QuoteStatusColors {
|
class QuoteStatusColors {
|
||||||
static var colors = {
|
static var colors = {
|
||||||
kQuoteStatusDraft: Colors.transparent,
|
kQuoteStatusDraft: Colors.black,
|
||||||
kQuoteStatusSent: convertHexStringToColor('#505F73'),
|
kQuoteStatusSent: convertHexStringToColor('#505F73'),
|
||||||
kQuoteStatusApproved: convertHexStringToColor('#407535'),
|
kQuoteStatusApproved: convertHexStringToColor('#407535'),
|
||||||
kQuoteStatusExpired: convertHexStringToColor('#8D3E3F'),
|
kQuoteStatusExpired: convertHexStringToColor('#8D3E3F'),
|
||||||
|
|
|
||||||
|
|
@ -623,24 +623,11 @@ class SidebarFooterCollapsed extends StatelessWidget {
|
||||||
final Store<AppState> store = StoreProvider.of<AppState>(context);
|
final Store<AppState> store = StoreProvider.of<AppState>(context);
|
||||||
final localization = AppLocalization.of(context);
|
final localization = AppLocalization.of(context);
|
||||||
|
|
||||||
if (store.state.uiState.filterEntityType != null) {
|
|
||||||
return SizedBox();
|
|
||||||
}
|
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
child: IconButton(
|
child: store.state.uiState.filterEntityType != null
|
||||||
icon: Icon(Icons.chevron_right),
|
? PopupMenuButton<String>(
|
||||||
tooltip: localization.showMenu,
|
|
||||||
onPressed: () {
|
|
||||||
store.dispatch(UserSettingsChanged(sidebar: AppSidebar.menu));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
/*
|
|
||||||
return PopupMenuButton<String>(
|
|
||||||
icon: isUpdateAvailable
|
icon: isUpdateAvailable
|
||||||
? Icon(Icons.warning, color: Theme.of(context).accentColor)
|
? Icon(Icons.warning, color: Theme.of(context).accentColor)
|
||||||
: Icon(Icons.info_outline),
|
: Icon(Icons.info_outline),
|
||||||
|
|
@ -694,8 +681,15 @@ class SidebarFooterCollapsed extends StatelessWidget {
|
||||||
value: localization.about,
|
value: localization.about,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
)
|
||||||
|
: IconButton(
|
||||||
|
icon: Icon(Icons.chevron_right),
|
||||||
|
tooltip: localization.showMenu,
|
||||||
|
onPressed: () {
|
||||||
|
store.dispatch(UserSettingsChanged(sidebar: AppSidebar.menu));
|
||||||
|
},
|
||||||
|
),
|
||||||
);
|
);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -338,6 +338,7 @@ class AppPaginatedDataTableState extends State<AppPaginatedDataTable> {
|
||||||
final MaterialLocalizations localizations =
|
final MaterialLocalizations localizations =
|
||||||
MaterialLocalizations.of(context);
|
MaterialLocalizations.of(context);
|
||||||
// HEADER
|
// HEADER
|
||||||
|
/*
|
||||||
final List<Widget> headerWidgets = <Widget>[];
|
final List<Widget> headerWidgets = <Widget>[];
|
||||||
double startPadding = 24.0;
|
double startPadding = 24.0;
|
||||||
if (_selectedRowCount == 0) {
|
if (_selectedRowCount == 0) {
|
||||||
|
|
@ -364,6 +365,7 @@ class AppPaginatedDataTableState extends State<AppPaginatedDataTable> {
|
||||||
);
|
);
|
||||||
}).toList());
|
}).toList());
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// FOOTER
|
// FOOTER
|
||||||
final TextStyle footerTextStyle = themeData.textTheme.caption;
|
final TextStyle footerTextStyle = themeData.textTheme.caption;
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'package:invoiceninja_flutter/constants.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart';
|
import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/app/entities/entity_status_chip.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
@ -52,9 +53,6 @@ class CreditListItem extends StatelessWidget {
|
||||||
: null;
|
: null;
|
||||||
final textColor = Theme.of(context).textTheme.bodyText1.color;
|
final textColor = Theme.of(context).textTheme.bodyText1.color;
|
||||||
|
|
||||||
final statusLabel = localization.lookup(kCreditStatuses[credit.statusId]);
|
|
||||||
final statusColor = CreditStatusColors.colors[credit.statusId];
|
|
||||||
|
|
||||||
Widget _buildMobile() {
|
Widget _buildMobile() {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
onTap: isInMultiselect
|
onTap: isInMultiselect
|
||||||
|
|
@ -208,34 +206,7 @@ class CreditListItem extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
SizedBox(width: 25),
|
SizedBox(width: 25),
|
||||||
credit.isSent
|
EntityStatusChip(entity: credit),
|
||||||
? DecoratedBox(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: statusColor,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
||||||
),
|
|
||||||
child: ConstrainedBox(
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 100,
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
|
||||||
child: Text(
|
|
||||||
statusLabel.toUpperCase(),
|
|
||||||
style: TextStyle(fontSize: 14),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: SizedBox(
|
|
||||||
child: Text(
|
|
||||||
localization.draft.toUpperCase(),
|
|
||||||
style: TextStyle(fontSize: 14),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
width: 100,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -231,16 +231,7 @@ class InvoiceListItem extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
SizedBox(width: 25),
|
SizedBox(width: 25),
|
||||||
invoice.isSent
|
EntityStatusChip(entity: invoice)
|
||||||
? EntityStatusChip(entity: invoice)
|
|
||||||
: SizedBox(
|
|
||||||
child: Text(
|
|
||||||
localization.draft.toUpperCase(),
|
|
||||||
style: TextStyle(fontSize: 14),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
width: 100,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,7 @@ class InvoiceOverview extends StatelessWidget {
|
||||||
EntityHeader(
|
EntityHeader(
|
||||||
entity: invoice,
|
entity: invoice,
|
||||||
statusColor: color,
|
statusColor: color,
|
||||||
statusLabel: invoice.statusId == kInvoiceStatusDraft
|
statusLabel: invoice.isPastDue
|
||||||
? null
|
|
||||||
: invoice.isPastDue
|
|
||||||
? localization.pastDue
|
? localization.pastDue
|
||||||
: localization.lookup(stauses[invoice.statusId]),
|
: localization.lookup(stauses[invoice.statusId]),
|
||||||
label: localization.totalAmount,
|
label: localization.totalAmount,
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import 'package:invoiceninja_flutter/constants.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart';
|
import 'package:invoiceninja_flutter/ui/app/actions_menu_button.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/app/entities/entity_status_chip.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
@ -225,34 +226,7 @@ class QuoteListItem extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
SizedBox(width: 25),
|
SizedBox(width: 25),
|
||||||
quote.isSent
|
EntityStatusChip(entity: quote),
|
||||||
? DecoratedBox(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: statusColor,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
||||||
),
|
|
||||||
child: ConstrainedBox(
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minWidth: 100,
|
|
||||||
),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
|
||||||
child: Text(
|
|
||||||
statusLabel.toUpperCase(),
|
|
||||||
style: TextStyle(fontSize: 14),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: SizedBox(
|
|
||||||
child: Text(
|
|
||||||
localization.draft.toUpperCase(),
|
|
||||||
style: TextStyle(fontSize: 14),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
),
|
|
||||||
width: 100,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue