ledger account describibale support

This commit is contained in:
Stephan D
2026-01-06 17:51:35 +01:00
parent 12700c5595
commit 43edbc109d
34 changed files with 326 additions and 91 deletions

View File

@@ -12,14 +12,18 @@ part 'signup.g.dart';
class SignupRequest {
final AccountData account;
final DescribableDTO organization;
final String organizationTimeZone;
final DescribableDTO ownerRole;
final DescribableDTO cryptoWallet;
final DescribableDTO ledgerWallet;
final String organizationTimeZone;
const SignupRequest({
required this.account,
required this.organization,
required this.organizationTimeZone,
required this.ownerRole,
required this.cryptoWallet,
required this.ledgerWallet,
});
factory SignupRequest.build({
@@ -27,11 +31,15 @@ class SignupRequest {
required Describable organization,
required String organizationTimeZone,
required Describable ownerRole,
required Describable cryptoWallet,
required Describable ledgerWallet,
}) => SignupRequest(
account: account,
organization: organization.toDTO(),
organizationTimeZone: organizationTimeZone,
ownerRole: ownerRole.toDTO(),
cryptoWallet: cryptoWallet.toDTO(),
ledgerWallet: ledgerWallet.toDTO(),
);
factory SignupRequest.fromJson(Map<String, dynamic> json) => _$SignupRequestFromJson(json);

View File

@@ -165,8 +165,10 @@ class AccountProvider extends ChangeNotifier {
Future<void> signup({
required AccountData account,
required Describable organization,
required String timezone,
required Describable ownerRole,
required Describable cryptoWallet,
required Describable ledgerWallet,
required String timezone,
}) async {
_setResource(_resource.copyWith(isLoading: true, error: null));
try {
@@ -176,6 +178,8 @@ class AccountProvider extends ChangeNotifier {
organization: organization,
organizationTimeZone: timezone,
ownerRole: ownerRole,
cryptoWallet: cryptoWallet,
ledgerWallet: ledgerWallet,
),
);
// Signup might not automatically log in the user,