Dashboard
This commit is contained in:
parent
fe9c815973
commit
2364217e43
|
|
@ -684,7 +684,6 @@ abstract class ReportSettingsEntity
|
||||||
|
|
||||||
abstract class SettingsEntity
|
abstract class SettingsEntity
|
||||||
implements Built<SettingsEntity, SettingsEntityBuilder> {
|
implements Built<SettingsEntity, SettingsEntityBuilder> {
|
||||||
|
|
||||||
factory SettingsEntity({
|
factory SettingsEntity({
|
||||||
SettingsEntity companySettings,
|
SettingsEntity companySettings,
|
||||||
SettingsEntity groupSettings,
|
SettingsEntity groupSettings,
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,6 @@ void handleClientAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,6 @@ void handleCompanyGatewayAction(BuildContext context,
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,6 @@ Future handleCreditAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,6 @@ void handleDesignAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,6 @@ void handleDocumentAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -298,7 +298,6 @@ void handleGroupAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -375,6 +375,5 @@ void handlePaymentAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,6 @@ void handleProductAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,6 @@ void handleProjectAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -490,7 +490,6 @@ Future handleQuoteAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -387,7 +387,6 @@ void handleTaskAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,6 @@ void handleTaxRateAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -310,7 +310,6 @@ void handleTokenAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,6 @@ void handleUserAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,6 @@ void handleVendorAction(
|
||||||
context: context,
|
context: context,
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
|
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,8 @@ class ClientListItem extends StatelessWidget {
|
||||||
final textStyle = TextStyle(fontSize: 16);
|
final textStyle = TextStyle(fontSize: 16);
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && client.id ==
|
isSelected: isDesktop(context) &&
|
||||||
|
client.id ==
|
||||||
(uiState.isEditing
|
(uiState.isEditing
|
||||||
? clientUIState.editing.id
|
? clientUIState.editing.id
|
||||||
: clientUIState.selectedId),
|
: clientUIState.selectedId),
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ class _InvoiceSidebar extends StatelessWidget {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final upcomingInvoices = memoizedUpcomingInvoices(state.invoiceState.map);
|
final upcomingInvoices = memoizedUpcomingInvoices(state.invoiceState.map);
|
||||||
final pastDueInvoices = memoizedPastDueInvoices(state.invoiceState.map);
|
final pastDueInvoices = memoizedPastDueInvoices(state.invoiceState.map);
|
||||||
final selectedIds = state.dashboardUIState.selectedEntities[EntityType.invoice];
|
final selectedIds =
|
||||||
|
state.dashboardUIState.selectedEntities[EntityType.invoice];
|
||||||
|
|
||||||
return _DashboardSidebar(
|
return _DashboardSidebar(
|
||||||
entityType: EntityType.invoice,
|
entityType: EntityType.invoice,
|
||||||
|
|
@ -133,7 +134,8 @@ class _PaymentSidebar extends StatelessWidget {
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final recentPayments = memoizedRecentPayments(state.paymentState.map);
|
final recentPayments = memoizedRecentPayments(state.paymentState.map);
|
||||||
final selectedIds = state.dashboardUIState.selectedEntities[EntityType.payment];
|
final selectedIds =
|
||||||
|
state.dashboardUIState.selectedEntities[EntityType.payment];
|
||||||
|
|
||||||
return _DashboardSidebar(
|
return _DashboardSidebar(
|
||||||
entityType: EntityType.payment,
|
entityType: EntityType.payment,
|
||||||
|
|
@ -182,7 +184,8 @@ class _QuoteSidebar extends StatelessWidget {
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final upcomingQuotes = memoizedUpcomingQuotes(state.quoteState.map);
|
final upcomingQuotes = memoizedUpcomingQuotes(state.quoteState.map);
|
||||||
final expriedQuotes = memoizedExpiredQuotes(state.quoteState.map);
|
final expriedQuotes = memoizedExpiredQuotes(state.quoteState.map);
|
||||||
final selectedIds = state.dashboardUIState.selectedEntities[EntityType.quote];
|
final selectedIds =
|
||||||
|
state.dashboardUIState.selectedEntities[EntityType.quote];
|
||||||
|
|
||||||
return _DashboardSidebar(
|
return _DashboardSidebar(
|
||||||
entityType: EntityType.quote,
|
entityType: EntityType.quote,
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,8 @@ class ExpenseListItem extends StatelessWidget {
|
||||||
final showCheckbox = onCheckboxChanged != null || isInMultiselect;
|
final showCheckbox = onCheckboxChanged != null || isInMultiselect;
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && expense.id ==
|
isSelected: isDesktop(context) &&
|
||||||
|
expense.id ==
|
||||||
(uiState.isEditing
|
(uiState.isEditing
|
||||||
? expenseUIState.editing.id
|
? expenseUIState.editing.id
|
||||||
: expenseUIState.selectedId),
|
: expenseUIState.selectedId),
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,10 @@ class PaymentListItem extends StatelessWidget {
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
return constraints.maxWidth > kTableListWidthCutoff
|
return constraints.maxWidth > kTableListWidthCutoff
|
||||||
? InkWell(
|
? InkWell(
|
||||||
onTap: () => selectEntity(entity: payment, context: context),
|
onTap: () => selectEntity(
|
||||||
|
entity: payment,
|
||||||
|
context: context,
|
||||||
|
forceView: !showCheckbox),
|
||||||
onLongPress: () => selectEntity(
|
onLongPress: () => selectEntity(
|
||||||
entity: payment, context: context, longPress: true),
|
entity: payment, context: context, longPress: true),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -151,7 +154,10 @@ class PaymentListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: ListTile(
|
: ListTile(
|
||||||
onTap: () => selectEntity(entity: payment, context: context),
|
onTap: () => selectEntity(
|
||||||
|
entity: payment,
|
||||||
|
context: context,
|
||||||
|
forceView: !showCheckbox),
|
||||||
onLongPress: () => selectEntity(
|
onLongPress: () => selectEntity(
|
||||||
entity: payment, context: context, longPress: true),
|
entity: payment, context: context, longPress: true),
|
||||||
leading: isInMultiselect
|
leading: isInMultiselect
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,8 @@ class ProductListItem extends StatelessWidget {
|
||||||
final textStyle = TextStyle(fontSize: 16);
|
final textStyle = TextStyle(fontSize: 16);
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && product.id ==
|
isSelected: isDesktop(context) &&
|
||||||
|
product.id ==
|
||||||
(uiState.isEditing
|
(uiState.isEditing
|
||||||
? productUIState.editing.id
|
? productUIState.editing.id
|
||||||
: productUIState.selectedId),
|
: productUIState.selectedId),
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,8 @@ class ProjectListItem extends StatelessWidget {
|
||||||
final subtitle = filterMatch ?? client.displayName;
|
final subtitle = filterMatch ?? client.displayName;
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && project.id ==
|
isSelected: isDesktop(context) &&
|
||||||
|
project.id ==
|
||||||
(uiState.isEditing
|
(uiState.isEditing
|
||||||
? projectUIState.editing.id
|
? projectUIState.editing.id
|
||||||
: projectUIState.selectedId),
|
: projectUIState.selectedId),
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,10 @@ class QuoteListItem extends StatelessWidget {
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
return constraints.maxWidth > kTableListWidthCutoff
|
return constraints.maxWidth > kTableListWidthCutoff
|
||||||
? InkWell(
|
? InkWell(
|
||||||
onTap: () => selectEntity(entity: quote, context: context),
|
onTap: () => selectEntity(
|
||||||
|
entity: quote,
|
||||||
|
context: context,
|
||||||
|
forceView: !showCheckbox),
|
||||||
onLongPress: () => selectEntity(
|
onLongPress: () => selectEntity(
|
||||||
entity: quote, context: context, longPress: true),
|
entity: quote, context: context, longPress: true),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -157,7 +160,10 @@ class QuoteListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: ListTile(
|
: ListTile(
|
||||||
onTap: () => selectEntity(entity: quote, context: context),
|
onTap: () => selectEntity(
|
||||||
|
entity: quote,
|
||||||
|
context: context,
|
||||||
|
forceView: !showCheckbox),
|
||||||
onLongPress: () => selectEntity(
|
onLongPress: () => selectEntity(
|
||||||
entity: quote, context: context, longPress: true),
|
entity: quote, context: context, longPress: true),
|
||||||
leading: isInMultiselect
|
leading: isInMultiselect
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,11 @@ class TaskListItem extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && task.id ==
|
isSelected: isDesktop(context) &&
|
||||||
(uiState.isEditing ? taskUIState.editing.id : taskUIState.selectedId),
|
task.id ==
|
||||||
|
(uiState.isEditing
|
||||||
|
? taskUIState.editing.id
|
||||||
|
: taskUIState.selectedId),
|
||||||
userCompany: userCompany,
|
userCompany: userCompany,
|
||||||
entity: task,
|
entity: task,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,8 @@ class VendorListItem extends StatelessWidget {
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return DismissibleEntity(
|
return DismissibleEntity(
|
||||||
isSelected: isDesktop(context) && vendor.id ==
|
isSelected: isDesktop(context) &&
|
||||||
|
vendor.id ==
|
||||||
(uiState.isEditing
|
(uiState.isEditing
|
||||||
? vendorUIState.editing.id
|
? vendorUIState.editing.id
|
||||||
: vendorUIState.selectedId),
|
: vendorUIState.selectedId),
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,7 @@ class _WebhookViewState extends State<WebhookView> {
|
||||||
EntityHeader(
|
EntityHeader(
|
||||||
entity: webhook,
|
entity: webhook,
|
||||||
label: localization.eventType,
|
label: localization.eventType,
|
||||||
value:
|
value: localization.lookup(webhook.eventType),
|
||||||
localization.lookup(webhook.eventType),
|
|
||||||
secondLabel: localization.createdOn,
|
secondLabel: localization.createdOn,
|
||||||
secondValue: formatDate(
|
secondValue: formatDate(
|
||||||
convertTimestampToDateString(webhook.createdAt), context),
|
convertTimestampToDateString(webhook.createdAt), context),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue