ledger account describibale support
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -474,6 +474,10 @@
|
||||
"optional": "optional",
|
||||
"ownerRole": "Organization Owner",
|
||||
"ownerRoleDescription": "This role is granted to the organization’s creator, providing full administrative privileges",
|
||||
"cryptoWallet": "Crypto",
|
||||
"cryptoWalletDesc": "TRC-20 USDT",
|
||||
"ledgerWallet": "Internal",
|
||||
"ledgerWalletDesc": "RUB wallet for settlements",
|
||||
"accountVerificationFailed": "Oops! We failed to verify your account. Please, contact support",
|
||||
"verifyAccount": "Account Verification",
|
||||
"verificationFailed": "Verification Failed",
|
||||
|
||||
@@ -475,6 +475,10 @@
|
||||
|
||||
"ownerRole": "Владелец организации",
|
||||
"ownerRoleDescription": "Эта роль предоставляется создателю организации и даёт ему полные административные права",
|
||||
"cryptoWallet": "Крипто",
|
||||
"cryptoWalletDesc": "TRC-20 USDT",
|
||||
"ledgerWallet": "Внутренний",
|
||||
"ledgerWalletDesc": "RUB кошелек для расчетов",
|
||||
"accountVerificationFailed": "Упс! Не удалось подтвердить ваш аккаунт. Пожалуйста, свяжитесь с поддержкой.",
|
||||
"verifyAccount": "Подтвердить аккаунт",
|
||||
"verificationFailed": "Ошибка подтверждения",
|
||||
|
||||
@@ -71,6 +71,14 @@ class SignUpFormState extends State<SignUpForm> {
|
||||
name: locs.ownerRole,
|
||||
description: locs.ownerRoleDescription,
|
||||
),
|
||||
cryptoWallet: newDescribable(
|
||||
name: locs.cryptoWallet,
|
||||
description: locs.cryptoWalletDesc,
|
||||
),
|
||||
ledgerWallet: newDescribable(
|
||||
name: locs.ledgerWallet,
|
||||
description: locs.ledgerWalletDesc,
|
||||
),
|
||||
);
|
||||
onSignUp();
|
||||
return 'ok';
|
||||
|
||||
Reference in New Issue
Block a user