Navigation
This commit is contained in:
parent
ea2772647a
commit
e21f4a4082
|
|
@ -411,7 +411,7 @@ const Map<int, String> kModules = {
|
|||
|
||||
class InvoiceStatusColors {
|
||||
static var colors = {
|
||||
kInvoiceStatusDraft: Colors.transparent,
|
||||
kInvoiceStatusDraft: Colors.black,
|
||||
kInvoiceStatusSent: convertHexStringToColor('#505F73'),
|
||||
//kInvoiceStatusViewed: Colors.orange,
|
||||
//kInvoiceStatusApproved: Colors.green,
|
||||
|
|
@ -425,7 +425,7 @@ class InvoiceStatusColors {
|
|||
|
||||
class CreditStatusColors {
|
||||
static var colors = {
|
||||
kCreditStatusDraft: Colors.transparent,
|
||||
kCreditStatusDraft: Colors.black,
|
||||
kCreditStatusSent: convertHexStringToColor('#505F73'),
|
||||
//kInvoiceStatusViewed: Colors.orange,
|
||||
//kInvoiceStatusApproved: Colors.green,
|
||||
|
|
@ -436,7 +436,7 @@ class CreditStatusColors {
|
|||
|
||||
class QuoteStatusColors {
|
||||
static var colors = {
|
||||
kQuoteStatusDraft: Colors.transparent,
|
||||
kQuoteStatusDraft: Colors.black,
|
||||
kQuoteStatusSent: convertHexStringToColor('#505F73'),
|
||||
kQuoteStatusApproved: convertHexStringToColor('#407535'),
|
||||
kQuoteStatusExpired: convertHexStringToColor('#8D3E3F'),
|
||||
|
|
|
|||
|
|
@ -623,79 +623,73 @@ class SidebarFooterCollapsed extends StatelessWidget {
|
|||
final Store<AppState> store = StoreProvider.of<AppState>(context);
|
||||
final localization = AppLocalization.of(context);
|
||||
|
||||
if (store.state.uiState.filterEntityType != null) {
|
||||
return SizedBox();
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
color: Theme.of(context).cardColor,
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.chevron_right),
|
||||
tooltip: localization.showMenu,
|
||||
onPressed: () {
|
||||
store.dispatch(UserSettingsChanged(sidebar: AppSidebar.menu));
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
/*
|
||||
return PopupMenuButton<String>(
|
||||
icon: isUpdateAvailable
|
||||
? Icon(Icons.warning, color: Theme.of(context).accentColor)
|
||||
: Icon(Icons.info_outline),
|
||||
onSelected: (value) {
|
||||
if (value == localization.updateAvailable) {
|
||||
_showUpdate(context);
|
||||
} else if (value == localization.about) {
|
||||
_showAbout(context);
|
||||
} else if (value == localization.contactUs) {
|
||||
_showContactUs(context);
|
||||
}
|
||||
},
|
||||
itemBuilder: (BuildContext context) => [
|
||||
if (isUpdateAvailable)
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(
|
||||
Icons.warning,
|
||||
color: Theme.of(context).accentColor,
|
||||
),
|
||||
title: Text(localization.updateAvailable),
|
||||
child: store.state.uiState.filterEntityType != null
|
||||
? PopupMenuButton<String>(
|
||||
icon: isUpdateAvailable
|
||||
? Icon(Icons.warning, color: Theme.of(context).accentColor)
|
||||
: Icon(Icons.info_outline),
|
||||
onSelected: (value) {
|
||||
if (value == localization.updateAvailable) {
|
||||
_showUpdate(context);
|
||||
} else if (value == localization.about) {
|
||||
_showAbout(context);
|
||||
} else if (value == localization.contactUs) {
|
||||
_showContactUs(context);
|
||||
}
|
||||
},
|
||||
itemBuilder: (BuildContext context) => [
|
||||
if (isUpdateAvailable)
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(
|
||||
Icons.warning,
|
||||
color: Theme.of(context).accentColor,
|
||||
),
|
||||
title: Text(localization.updateAvailable),
|
||||
),
|
||||
value: localization.updateAvailable,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.mail),
|
||||
title: Text(localization.contactUs),
|
||||
),
|
||||
value: localization.contactUs,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.help_outline),
|
||||
title: Text(localization.documentation),
|
||||
),
|
||||
value: localization.documentation,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.forum),
|
||||
title: Text(localization.supportForum),
|
||||
),
|
||||
value: localization.supportForum,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.info_outline),
|
||||
title: Text(localization.about),
|
||||
),
|
||||
value: localization.about,
|
||||
),
|
||||
],
|
||||
)
|
||||
: IconButton(
|
||||
icon: Icon(Icons.chevron_right),
|
||||
tooltip: localization.showMenu,
|
||||
onPressed: () {
|
||||
store.dispatch(UserSettingsChanged(sidebar: AppSidebar.menu));
|
||||
},
|
||||
),
|
||||
value: localization.updateAvailable,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.mail),
|
||||
title: Text(localization.contactUs),
|
||||
),
|
||||
value: localization.contactUs,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.help_outline),
|
||||
title: Text(localization.documentation),
|
||||
),
|
||||
value: localization.documentation,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.forum),
|
||||
title: Text(localization.supportForum),
|
||||
),
|
||||
value: localization.supportForum,
|
||||
),
|
||||
PopupMenuItem<String>(
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.info_outline),
|
||||
title: Text(localization.about),
|
||||
),
|
||||
value: localization.about,
|
||||
),
|
||||
],
|
||||
);
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,6 +338,7 @@ class AppPaginatedDataTableState extends State<AppPaginatedDataTable> {
|
|||
final MaterialLocalizations localizations =
|
||||
MaterialLocalizations.of(context);
|
||||
// HEADER
|
||||
/*
|
||||
final List<Widget> headerWidgets = <Widget>[];
|
||||
double startPadding = 24.0;
|
||||
if (_selectedRowCount == 0) {
|
||||
|
|
@ -364,6 +365,7 @@ class AppPaginatedDataTableState extends State<AppPaginatedDataTable> {
|
|||
);
|
||||
}).toList());
|
||||
}
|
||||
*/
|
||||
|
||||
// FOOTER
|
||||
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_state.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/utils/formatting.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
|
@ -52,9 +53,6 @@ class CreditListItem extends StatelessWidget {
|
|||
: null;
|
||||
final textColor = Theme.of(context).textTheme.bodyText1.color;
|
||||
|
||||
final statusLabel = localization.lookup(kCreditStatuses[credit.statusId]);
|
||||
final statusColor = CreditStatusColors.colors[credit.statusId];
|
||||
|
||||
Widget _buildMobile() {
|
||||
return ListTile(
|
||||
onTap: isInMultiselect
|
||||
|
|
@ -208,34 +206,7 @@ class CreditListItem extends StatelessWidget {
|
|||
textAlign: TextAlign.end,
|
||||
),
|
||||
SizedBox(width: 25),
|
||||
credit.isSent
|
||||
? 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,
|
||||
),
|
||||
EntityStatusChip(entity: credit),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -231,16 +231,7 @@ class InvoiceListItem extends StatelessWidget {
|
|||
textAlign: TextAlign.end,
|
||||
),
|
||||
SizedBox(width: 25),
|
||||
invoice.isSent
|
||||
? EntityStatusChip(entity: invoice)
|
||||
: SizedBox(
|
||||
child: Text(
|
||||
localization.draft.toUpperCase(),
|
||||
style: TextStyle(fontSize: 14),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
width: 100,
|
||||
),
|
||||
EntityStatusChip(entity: invoice)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -57,9 +57,7 @@ class InvoiceOverview extends StatelessWidget {
|
|||
EntityHeader(
|
||||
entity: invoice,
|
||||
statusColor: color,
|
||||
statusLabel: invoice.statusId == kInvoiceStatusDraft
|
||||
? null
|
||||
: invoice.isPastDue
|
||||
statusLabel: invoice.isPastDue
|
||||
? localization.pastDue
|
||||
: localization.lookup(stauses[invoice.statusId]),
|
||||
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_state.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/utils/formatting.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
|
@ -225,34 +226,7 @@ class QuoteListItem extends StatelessWidget {
|
|||
textAlign: TextAlign.end,
|
||||
),
|
||||
SizedBox(width: 25),
|
||||
quote.isSent
|
||||
? 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,
|
||||
),
|
||||
EntityStatusChip(entity: quote),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue