Dashboard

This commit is contained in:
Hillel Coren 2020-07-22 16:59:00 +03:00
parent fe9c815973
commit 2364217e43
28 changed files with 1125 additions and 1120 deletions

View File

@ -684,7 +684,6 @@ abstract class ReportSettingsEntity
abstract class SettingsEntity
implements Built<SettingsEntity, SettingsEntityBuilder> {
factory SettingsEntity({
SettingsEntity companySettings,
SettingsEntity groupSettings,

View File

@ -387,7 +387,6 @@ void handleClientAction(
context: context,
);
break;
}
}

View File

@ -311,7 +311,6 @@ void handleCompanyGatewayAction(BuildContext context,
context: context,
);
break;
}
}

View File

@ -490,7 +490,6 @@ Future handleCreditAction(
context: context,
);
break;
}
}

View File

@ -301,7 +301,6 @@ void handleDesignAction(
context: context,
);
break;
}
}

View File

@ -301,7 +301,6 @@ void handleDocumentAction(
context: context,
);
break;
}
}

View File

@ -298,7 +298,6 @@ void handleGroupAction(
context: context,
);
break;
}
}

View File

@ -375,6 +375,5 @@ void handlePaymentAction(
context: context,
);
break;
}
}

View File

@ -277,7 +277,6 @@ void handleProductAction(
context: context,
);
break;
}
}

View File

@ -332,7 +332,6 @@ void handleProjectAction(
context: context,
);
break;
}
}

View File

@ -490,7 +490,6 @@ Future handleQuoteAction(
context: context,
);
break;
}
}

View File

@ -387,7 +387,6 @@ void handleTaskAction(
context: context,
);
break;
}
}

View File

@ -291,7 +291,6 @@ void handleTaxRateAction(
context: context,
);
break;
}
}

View File

@ -310,7 +310,6 @@ void handleTokenAction(
context: context,
);
break;
}
}

View File

@ -406,7 +406,6 @@ void handleUserAction(
context: context,
);
break;
}
}

View File

@ -342,7 +342,6 @@ void handleVendorAction(
context: context,
);
break;
}
}

View File

@ -1,4 +1,3 @@
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
import 'package:invoiceninja_flutter/utils/platforms.dart';

View File

@ -45,10 +45,11 @@ class ClientListItem extends StatelessWidget {
final textStyle = TextStyle(fontSize: 16);
return DismissibleEntity(
isSelected: isDesktop(context) && client.id ==
(uiState.isEditing
? clientUIState.editing.id
: clientUIState.selectedId),
isSelected: isDesktop(context) &&
client.id ==
(uiState.isEditing
? clientUIState.editing.id
: clientUIState.selectedId),
userCompany: store.state.userCompany,
entity: client,
child: LayoutBuilder(

View File

@ -70,7 +70,8 @@ class _InvoiceSidebar extends StatelessWidget {
final state = store.state;
final upcomingInvoices = memoizedUpcomingInvoices(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(
entityType: EntityType.invoice,
@ -133,7 +134,8 @@ class _PaymentSidebar extends StatelessWidget {
final store = StoreProvider.of<AppState>(context);
final state = store.state;
final recentPayments = memoizedRecentPayments(state.paymentState.map);
final selectedIds = state.dashboardUIState.selectedEntities[EntityType.payment];
final selectedIds =
state.dashboardUIState.selectedEntities[EntityType.payment];
return _DashboardSidebar(
entityType: EntityType.payment,
@ -182,7 +184,8 @@ class _QuoteSidebar extends StatelessWidget {
final state = store.state;
final upcomingQuotes = memoizedUpcomingQuotes(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(
entityType: EntityType.quote,

View File

@ -79,10 +79,11 @@ class ExpenseListItem extends StatelessWidget {
final showCheckbox = onCheckboxChanged != null || isInMultiselect;
return DismissibleEntity(
isSelected: isDesktop(context) && expense.id ==
(uiState.isEditing
? expenseUIState.editing.id
: expenseUIState.selectedId),
isSelected: isDesktop(context) &&
expense.id ==
(uiState.isEditing
? expenseUIState.editing.id
: expenseUIState.selectedId),
userCompany: userCompany,
entity: expense,
child: ListTile(

View File

@ -66,7 +66,10 @@ class PaymentListItem extends StatelessWidget {
builder: (BuildContext context, BoxConstraints constraints) {
return constraints.maxWidth > kTableListWidthCutoff
? InkWell(
onTap: () => selectEntity(entity: payment, context: context),
onTap: () => selectEntity(
entity: payment,
context: context,
forceView: !showCheckbox),
onLongPress: () => selectEntity(
entity: payment, context: context, longPress: true),
child: Padding(
@ -151,7 +154,10 @@ class PaymentListItem extends StatelessWidget {
),
)
: ListTile(
onTap: () => selectEntity(entity: payment, context: context),
onTap: () => selectEntity(
entity: payment,
context: context,
forceView: !showCheckbox),
onLongPress: () => selectEntity(
entity: payment, context: context, longPress: true),
leading: isInMultiselect

View File

@ -48,10 +48,11 @@ class ProductListItem extends StatelessWidget {
final textStyle = TextStyle(fontSize: 16);
return DismissibleEntity(
isSelected: isDesktop(context) && product.id ==
(uiState.isEditing
? productUIState.editing.id
: productUIState.selectedId),
isSelected: isDesktop(context) &&
product.id ==
(uiState.isEditing
? productUIState.editing.id
: productUIState.selectedId),
userCompany: userCompany,
entity: product,
child: LayoutBuilder(

View File

@ -46,10 +46,11 @@ class ProjectListItem extends StatelessWidget {
final subtitle = filterMatch ?? client.displayName;
return DismissibleEntity(
isSelected: isDesktop(context) && project.id ==
(uiState.isEditing
? projectUIState.editing.id
: projectUIState.selectedId),
isSelected: isDesktop(context) &&
project.id ==
(uiState.isEditing
? projectUIState.editing.id
: projectUIState.selectedId),
userCompany: userCompany,
entity: project,
child: ListTile(

View File

@ -63,9 +63,12 @@ class QuoteListItem extends StatelessWidget {
builder: (BuildContext context, BoxConstraints constraints) {
return constraints.maxWidth > kTableListWidthCutoff
? InkWell(
onTap: () => selectEntity(entity: quote, context: context),
onTap: () => selectEntity(
entity: quote,
context: context,
forceView: !showCheckbox),
onLongPress: () => selectEntity(
entity: quote, context: context, longPress: true),
entity: quote, context: context, longPress: true),
child: Padding(
padding: const EdgeInsets.only(
left: 12,
@ -157,9 +160,12 @@ class QuoteListItem extends StatelessWidget {
),
)
: ListTile(
onTap: () => selectEntity(entity: quote, context: context),
onTap: () => selectEntity(
entity: quote,
context: context,
forceView: !showCheckbox),
onLongPress: () => selectEntity(
entity: quote, context: context, longPress: true),
entity: quote, context: context, longPress: true),
leading: isInMultiselect
? IgnorePointer(
ignoring: listUIState.isInMultiselect(),

View File

@ -63,8 +63,11 @@ class TaskListItem extends StatelessWidget {
}
return DismissibleEntity(
isSelected: isDesktop(context) && task.id ==
(uiState.isEditing ? taskUIState.editing.id : taskUIState.selectedId),
isSelected: isDesktop(context) &&
task.id ==
(uiState.isEditing
? taskUIState.editing.id
: taskUIState.selectedId),
userCompany: userCompany,
entity: task,
child: ListTile(

View File

@ -43,10 +43,11 @@ class VendorListItem extends StatelessWidget {
: null;
return DismissibleEntity(
isSelected: isDesktop(context) && vendor.id ==
(uiState.isEditing
? vendorUIState.editing.id
: vendorUIState.selectedId),
isSelected: isDesktop(context) &&
vendor.id ==
(uiState.isEditing
? vendorUIState.editing.id
: vendorUIState.selectedId),
userCompany: userCompany,
entity: vendor,
child: ListTile(

View File

@ -36,8 +36,7 @@ class _WebhookViewState extends State<WebhookView> {
EntityHeader(
entity: webhook,
label: localization.eventType,
value:
localization.lookup(webhook.eventType),
value: localization.lookup(webhook.eventType),
secondLabel: localization.createdOn,
secondValue: formatDate(
convertTimestampToDateString(webhook.createdAt), context),

File diff suppressed because it is too large Load Diff