reports page
This commit is contained in:
@@ -18,12 +18,14 @@ class PayoutRoutes {
|
||||
static const payment = 'payout-payment';
|
||||
static const settings = 'payout-settings';
|
||||
static const reports = 'payout-reports';
|
||||
static const reportPayment = 'payout-report-payment';
|
||||
static const methods = 'payout-methods';
|
||||
static const editWallet = 'payout-edit-wallet';
|
||||
static const walletTopUp = 'payout-wallet-top-up';
|
||||
|
||||
static const paymentTypeQuery = 'paymentType';
|
||||
static const returnToQuery = 'returnTo';
|
||||
static const reportPaymentIdQuery = 'paymentId';
|
||||
|
||||
static const dashboardPath = '/dashboard';
|
||||
static const recipientsPath = '/dashboard/recipients';
|
||||
@@ -32,6 +34,7 @@ class PayoutRoutes {
|
||||
static const paymentPath = '/dashboard/payment';
|
||||
static const settingsPath = '/dashboard/settings';
|
||||
static const reportsPath = '/dashboard/reports';
|
||||
static const reportPaymentPath = '/dashboard/reports/payment';
|
||||
static const methodsPath = '/dashboard/methods';
|
||||
static const editWalletPath = '/dashboard/methods/edit';
|
||||
static const walletTopUpPath = '/dashboard/wallet/top-up';
|
||||
@@ -173,6 +176,20 @@ extension PayoutNavigation on BuildContext {
|
||||
),
|
||||
);
|
||||
|
||||
void goToReportPayment(String paymentId) => goNamed(
|
||||
PayoutRoutes.reportPayment,
|
||||
queryParameters: {
|
||||
PayoutRoutes.reportPaymentIdQuery: paymentId,
|
||||
},
|
||||
);
|
||||
|
||||
void pushToReportPayment(String paymentId) => pushNamed(
|
||||
PayoutRoutes.reportPayment,
|
||||
queryParameters: {
|
||||
PayoutRoutes.reportPaymentIdQuery: paymentId,
|
||||
},
|
||||
);
|
||||
|
||||
void pushToWalletTopUp({PayoutDestination? returnTo}) => pushNamed(
|
||||
PayoutRoutes.walletTopUp,
|
||||
queryParameters: PayoutRoutes.buildQueryParameters(returnTo: returnTo),
|
||||
|
||||
@@ -33,6 +33,7 @@ import 'package:pweb/pages/dashboard/dashboard.dart';
|
||||
import 'package:pweb/pages/invitations/page.dart';
|
||||
import 'package:pweb/pages/payment_methods/page.dart';
|
||||
import 'package:pweb/pages/payout_page/wallet/edit/page.dart';
|
||||
import 'package:pweb/pages/report/details/page.dart';
|
||||
import 'package:pweb/pages/report/page.dart';
|
||||
import 'package:pweb/pages/settings/profile/page.dart';
|
||||
import 'package:pweb/pages/wallet_top_up/page.dart';
|
||||
@@ -292,6 +293,17 @@ RouteBase payoutShellRoute() => ShellRoute(
|
||||
pageBuilder: (_, _) =>
|
||||
const NoTransitionPage(child: OperationHistoryPage()),
|
||||
),
|
||||
GoRoute(
|
||||
name: PayoutRoutes.reportPayment,
|
||||
path: PayoutRoutes.reportPaymentPath,
|
||||
pageBuilder: (_, state) => NoTransitionPage(
|
||||
child: PaymentDetailsPage(
|
||||
paymentId: state.uri.queryParameters[
|
||||
PayoutRoutes.reportPaymentIdQuery] ??
|
||||
'',
|
||||
),
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
name: PayoutRoutes.methods,
|
||||
path: PayoutRoutes.methodsPath,
|
||||
|
||||
Reference in New Issue
Block a user