removed payment methods page for now
This commit is contained in:
@@ -1 +0,0 @@
|
|||||||
enum RecipientFilter { all, ready, registered, notRegistered }
|
|
||||||
@@ -104,6 +104,11 @@ RouteBase payoutShellRoute() => ShellRoute(
|
|||||||
wallet,
|
wallet,
|
||||||
returnTo: PayoutDestination.dashboard,
|
returnTo: PayoutDestination.dashboard,
|
||||||
),
|
),
|
||||||
|
onWalletTap: (wallet) => _openWalletEdit(
|
||||||
|
context,
|
||||||
|
wallet,
|
||||||
|
returnTo: PayoutDestination.dashboard,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -120,10 +125,8 @@ RouteBase payoutShellRoute() => ShellRoute(
|
|||||||
returnTo: PayoutDestination.recipients,
|
returnTo: PayoutDestination.recipients,
|
||||||
),
|
),
|
||||||
onAddRecipient: () => _openAddRecipient(context),
|
onAddRecipient: () => _openAddRecipient(context),
|
||||||
onEditRecipient: (recipient) => _openAddRecipient(
|
onEditRecipient: (recipient) =>
|
||||||
context,
|
_openAddRecipient(context, recipient: recipient),
|
||||||
recipient: recipient,
|
|
||||||
),
|
|
||||||
onDeleteRecipient: (recipient) async {
|
onDeleteRecipient: (recipient) async {
|
||||||
final confirmed = await showConfirmationDialog(
|
final confirmed = await showConfirmationDialog(
|
||||||
context: context,
|
context: context,
|
||||||
@@ -192,22 +195,13 @@ RouteBase payoutShellRoute() => ShellRoute(
|
|||||||
GoRoute(
|
GoRoute(
|
||||||
name: PayoutRoutes.reports,
|
name: PayoutRoutes.reports,
|
||||||
path: PayoutRoutes.reportsPath,
|
path: PayoutRoutes.reportsPath,
|
||||||
pageBuilder: (_, _) => const NoTransitionPage(
|
pageBuilder: (_, _) =>
|
||||||
child: OperationHistoryPage(),
|
const NoTransitionPage(child: OperationHistoryPage()),
|
||||||
),
|
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: PayoutRoutes.methods,
|
name: PayoutRoutes.methods,
|
||||||
path: PayoutRoutes.methodsPath,
|
path: PayoutRoutes.methodsPath,
|
||||||
pageBuilder: (context, _) => NoTransitionPage(
|
redirect: (_, state) => PayoutRoutes.dashboardPath,
|
||||||
child: PaymentConfigPage(
|
|
||||||
onWalletTap: (wallet) => _openWalletEdit(
|
|
||||||
context,
|
|
||||||
wallet,
|
|
||||||
returnTo: PayoutDestination.methods,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
GoRoute(
|
GoRoute(
|
||||||
name: PayoutRoutes.editWallet,
|
name: PayoutRoutes.editWallet,
|
||||||
|
|||||||
@@ -422,7 +422,7 @@
|
|||||||
"selectPaymentType": "Please select a payment method type",
|
"selectPaymentType": "Please select a payment method type",
|
||||||
|
|
||||||
"paymentTypeCard": "Russian bank card",
|
"paymentTypeCard": "Russian bank card",
|
||||||
"paymentTypeBankAccount": "Russian Bank Account",
|
"paymentTypeBankAccount": "Russian bank account",
|
||||||
"paymentTypeIban": "IBAN",
|
"paymentTypeIban": "IBAN",
|
||||||
"paymentTypeWallet": "Wallet",
|
"paymentTypeWallet": "Wallet",
|
||||||
"paymentTypeCryptoWallet": "Crypto Wallet",
|
"paymentTypeCryptoWallet": "Crypto Wallet",
|
||||||
|
|||||||
@@ -15,10 +15,12 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
|
|||||||
|
|
||||||
class BalanceWidget extends StatelessWidget {
|
class BalanceWidget extends StatelessWidget {
|
||||||
final ValueChanged<Wallet> onTopUp;
|
final ValueChanged<Wallet> onTopUp;
|
||||||
|
final ValueChanged<Wallet> onWalletTap;
|
||||||
|
|
||||||
const BalanceWidget({
|
const BalanceWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onTopUp,
|
required this.onTopUp,
|
||||||
|
required this.onWalletTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -74,6 +76,7 @@ class BalanceWidget extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onTopUp: onTopUp,
|
onTopUp: onTopUp,
|
||||||
|
onWalletTap: onWalletTap,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (wallets.isEmpty && accounts.isEmpty) {
|
if (wallets.isEmpty && accounts.isEmpty) {
|
||||||
|
|||||||
@@ -19,11 +19,13 @@ import 'package:pweb/generated/i18n/app_localizations.dart';
|
|||||||
class WalletCard extends StatelessWidget {
|
class WalletCard extends StatelessWidget {
|
||||||
final Wallet wallet;
|
final Wallet wallet;
|
||||||
final VoidCallback onTopUp;
|
final VoidCallback onTopUp;
|
||||||
|
final VoidCallback onTap;
|
||||||
|
|
||||||
const WalletCard({
|
const WalletCard({
|
||||||
super.key,
|
super.key,
|
||||||
required this.wallet,
|
required this.wallet,
|
||||||
required this.onTopUp,
|
required this.onTopUp,
|
||||||
|
required this.onTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -40,6 +42,9 @@ class WalletCard extends StatelessWidget {
|
|||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(WalletCardConfig.borderRadius),
|
borderRadius: BorderRadius.circular(WalletCardConfig.borderRadius),
|
||||||
),
|
),
|
||||||
|
child: InkWell(
|
||||||
|
borderRadius: BorderRadius.circular(WalletCardConfig.borderRadius),
|
||||||
|
onTap: onTap,
|
||||||
child: SizedBox.expand(
|
child: SizedBox.expand(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: WalletCardConfig.contentPadding,
|
padding: WalletCardConfig.contentPadding,
|
||||||
@@ -70,7 +75,7 @@ class WalletCard extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class BalanceCarousel extends StatefulWidget {
|
|||||||
final int currentIndex;
|
final int currentIndex;
|
||||||
final ValueChanged<int> onIndexChanged;
|
final ValueChanged<int> onIndexChanged;
|
||||||
final ValueChanged<Wallet> onTopUp;
|
final ValueChanged<Wallet> onTopUp;
|
||||||
|
final ValueChanged<Wallet> onWalletTap;
|
||||||
|
|
||||||
const BalanceCarousel({
|
const BalanceCarousel({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -23,6 +24,7 @@ class BalanceCarousel extends StatefulWidget {
|
|||||||
required this.currentIndex,
|
required this.currentIndex,
|
||||||
required this.onIndexChanged,
|
required this.onIndexChanged,
|
||||||
required this.onTopUp,
|
required this.onTopUp,
|
||||||
|
required this.onWalletTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -101,6 +103,7 @@ class _BalanceCarouselState extends State<BalanceCarousel> {
|
|||||||
BalanceItemType.wallet => WalletCard(
|
BalanceItemType.wallet => WalletCard(
|
||||||
wallet: item.wallet!,
|
wallet: item.wallet!,
|
||||||
onTopUp: () => widget.onTopUp(item.wallet!),
|
onTopUp: () => widget.onTopUp(item.wallet!),
|
||||||
|
onTap: () => widget.onWalletTap(item.wallet!),
|
||||||
),
|
),
|
||||||
BalanceItemType.ledger => LedgerAccountCard(account: item.account!),
|
BalanceItemType.ledger => LedgerAccountCard(account: item.account!),
|
||||||
BalanceItemType.addAction => const AddBalanceCard(),
|
BalanceItemType.addAction => const AddBalanceCard(),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
|
|
||||||
abstract class WalletCardConfig {
|
abstract class WalletCardConfig {
|
||||||
static const double cardHeight = 130.0;
|
static const double cardHeight = 145.0;
|
||||||
static const double elevation = 4.0;
|
static const double elevation = 4.0;
|
||||||
static const double borderRadius = 16.0;
|
static const double borderRadius = 16.0;
|
||||||
static const double viewportFraction = 0.9;
|
static const double viewportFraction = 0.9;
|
||||||
|
|||||||
@@ -27,12 +27,14 @@ class DashboardPage extends StatefulWidget {
|
|||||||
final ValueChanged<Recipient> onRecipientSelected;
|
final ValueChanged<Recipient> onRecipientSelected;
|
||||||
final void Function(PaymentType type) onGoToPaymentWithoutRecipient;
|
final void Function(PaymentType type) onGoToPaymentWithoutRecipient;
|
||||||
final ValueChanged<Wallet> onTopUp;
|
final ValueChanged<Wallet> onTopUp;
|
||||||
|
final ValueChanged<Wallet> onWalletTap;
|
||||||
|
|
||||||
const DashboardPage({
|
const DashboardPage({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onRecipientSelected,
|
required this.onRecipientSelected,
|
||||||
required this.onGoToPaymentWithoutRecipient,
|
required this.onGoToPaymentWithoutRecipient,
|
||||||
required this.onTopUp,
|
required this.onTopUp,
|
||||||
|
required this.onWalletTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -88,6 +90,7 @@ class _DashboardPageState extends State<DashboardPage> {
|
|||||||
create: (_) => CarouselIndexController(),
|
create: (_) => CarouselIndexController(),
|
||||||
child: BalanceWidget(
|
child: BalanceWidget(
|
||||||
onTopUp: widget.onTopUp,
|
onTopUp: widget.onTopUp,
|
||||||
|
onWalletTap: widget.onWalletTap,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppSpacing.small),
|
const SizedBox(height: AppSpacing.small),
|
||||||
|
|||||||
@@ -1,25 +1,11 @@
|
|||||||
import 'package:pshared/models/recipient/filter.dart';
|
|
||||||
import 'package:pshared/models/recipient/recipient.dart';
|
import 'package:pshared/models/recipient/recipient.dart';
|
||||||
import 'package:pshared/models/recipient/status.dart';
|
|
||||||
|
|
||||||
|
|
||||||
List<Recipient> filterRecipients({
|
List<Recipient> filterRecipients({
|
||||||
required List<Recipient> recipients,
|
required List<Recipient> recipients,
|
||||||
RecipientFilter filter = RecipientFilter.all,
|
|
||||||
String query = '',
|
String query = '',
|
||||||
}) {
|
}) {
|
||||||
var filtered = recipients.where((r) {
|
final filtered = recipients;
|
||||||
switch (filter) {
|
|
||||||
case RecipientFilter.ready:
|
|
||||||
return r.status == RecipientStatus.ready;
|
|
||||||
case RecipientFilter.registered:
|
|
||||||
return r.status == RecipientStatus.registered;
|
|
||||||
case RecipientFilter.notRegistered:
|
|
||||||
return r.status == RecipientStatus.notRegistered;
|
|
||||||
case RecipientFilter.all:
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}).toList();
|
|
||||||
|
|
||||||
final normalizedQuery = query.trim().toLowerCase();
|
final normalizedQuery = query.trim().toLowerCase();
|
||||||
if (normalizedQuery.isEmpty) return filtered;
|
if (normalizedQuery.isEmpty) return filtered;
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ class PayoutSidebar extends StatelessWidget {
|
|||||||
final String? avatarUrl;
|
final String? avatarUrl;
|
||||||
final List<PayoutDestination>? items;
|
final List<PayoutDestination>? items;
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final accountName = context.select<AccountProvider, String?>(
|
final accountName = context.select<AccountProvider, String?>(
|
||||||
@@ -40,13 +39,15 @@ class PayoutSidebar extends StatelessWidget {
|
|||||||
final resolvedUserName = userName ?? accountName;
|
final resolvedUserName = userName ?? accountName;
|
||||||
final resolvedAvatarUrl = avatarUrl ?? accountAvatar;
|
final resolvedAvatarUrl = avatarUrl ?? accountAvatar;
|
||||||
|
|
||||||
final menuItems = items ??
|
final menuItems =
|
||||||
|
items ??
|
||||||
<PayoutDestination>[
|
<PayoutDestination>[
|
||||||
PayoutDestination.dashboard,
|
PayoutDestination.dashboard,
|
||||||
PayoutDestination.recipients,
|
PayoutDestination.recipients,
|
||||||
PayoutDestination.invitations,
|
PayoutDestination.invitations,
|
||||||
PayoutDestination.methods,
|
// PayoutDestination.methods,
|
||||||
//PayoutDestination.reports,
|
// PayoutDestination.reports,
|
||||||
|
// PayoutDestination.organizationSettings,
|
||||||
//TODO Add when ready
|
//TODO Add when ready
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -56,11 +57,11 @@ class PayoutSidebar extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
UserProfileCard(
|
UserProfileCard(
|
||||||
theme: theme,
|
theme: theme,
|
||||||
avatarUrl: resolvedAvatarUrl,
|
avatarUrl: resolvedAvatarUrl,
|
||||||
userName: resolvedUserName,
|
userName: resolvedUserName,
|
||||||
selected: selected,
|
selected: selected,
|
||||||
onSelected: onSelected
|
onSelected: onSelected,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
SideMenuColumn(
|
SideMenuColumn(
|
||||||
|
|||||||
87
frontend/pweb/macos/Podfile.lock
Normal file
87
frontend/pweb/macos/Podfile.lock
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
PODS:
|
||||||
|
- amplitude_flutter (0.0.1):
|
||||||
|
- AmplitudeSwift (= 1.16.5)
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- AmplitudeCore (1.3.2)
|
||||||
|
- AmplitudeSwift (1.16.5):
|
||||||
|
- AmplitudeCore (< 2.0.0, >= 1.3.1)
|
||||||
|
- AnalyticsConnector (~> 1.3.0)
|
||||||
|
- AnalyticsConnector (1.3.1)
|
||||||
|
- file_selector_macos (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
- flutter_timezone (0.1.0):
|
||||||
|
- FlutterMacOS
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
- PostHog (3.38.0)
|
||||||
|
- posthog_flutter (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- PostHog (< 4.0.0, >= 3.38.0)
|
||||||
|
- share_plus (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
- shared_preferences_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- sqflite_darwin (0.0.4):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- url_launcher_macos (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- amplitude_flutter (from `Flutter/ephemeral/.symlinks/plugins/amplitude_flutter/darwin`)
|
||||||
|
- file_selector_macos (from `Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos`)
|
||||||
|
- flutter_timezone (from `Flutter/ephemeral/.symlinks/plugins/flutter_timezone/macos`)
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
- posthog_flutter (from `Flutter/ephemeral/.symlinks/plugins/posthog_flutter/macos`)
|
||||||
|
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
||||||
|
- shared_preferences_foundation (from `Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin`)
|
||||||
|
- sqflite_darwin (from `Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin`)
|
||||||
|
- url_launcher_macos (from `Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos`)
|
||||||
|
|
||||||
|
SPEC REPOS:
|
||||||
|
trunk:
|
||||||
|
- AmplitudeCore
|
||||||
|
- AmplitudeSwift
|
||||||
|
- AnalyticsConnector
|
||||||
|
- PostHog
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
amplitude_flutter:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/amplitude_flutter/darwin
|
||||||
|
file_selector_macos:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/file_selector_macos/macos
|
||||||
|
flutter_timezone:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/flutter_timezone/macos
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
posthog_flutter:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/posthog_flutter/macos
|
||||||
|
share_plus:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
||||||
|
shared_preferences_foundation:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/shared_preferences_foundation/darwin
|
||||||
|
sqflite_darwin:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/sqflite_darwin/darwin
|
||||||
|
url_launcher_macos:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/url_launcher_macos/macos
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
amplitude_flutter: cefd7394009ea8eae6c431a55aabb016211eb1c9
|
||||||
|
AmplitudeCore: 8a847882ef4b59fcf94a966b73a41a55d50dcae0
|
||||||
|
AmplitudeSwift: f8cc113e5880a9410c1b4108e4d83aa2c2be0c6e
|
||||||
|
AnalyticsConnector: 3def11199b4ddcad7202c778bde982ec5da0ebb3
|
||||||
|
file_selector_macos: 9e9e068e90ebee155097d00e89ae91edb2374db7
|
||||||
|
flutter_timezone: d272288c69082ad571630e0d17140b3d6b93dc0c
|
||||||
|
FlutterMacOS: d0db08ddef1a9af05a5ec4b724367152bb0500b1
|
||||||
|
PostHog: b42fd6ae60326411582e97bea5786ba748cab8a0
|
||||||
|
posthog_flutter: 1818be8dfb769abdc7e2e233205edd8ce156b54c
|
||||||
|
share_plus: 510bf0af1a42cd602274b4629920c9649c52f4cc
|
||||||
|
shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
|
||||||
|
sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
|
||||||
|
url_launcher_macos: f87a979182d112f911de6820aefddaf56ee9fbfd
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 54d867c82ac51cbd61b565781b9fada492027009
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
Reference in New Issue
Block a user