Merge pull request 'visual fix for invitations from' (#379) from SEND040 into main
Some checks are pending
ci/woodpecker/push/billing_documents Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline is pending
ci/woodpecker/push/frontend Pipeline is pending
ci/woodpecker/push/fx_ingestor Pipeline is pending
ci/woodpecker/push/bff Pipeline is pending
ci/woodpecker/push/db Pipeline is pending
ci/woodpecker/push/discovery Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_mntx Pipeline is pending
ci/woodpecker/push/gateway_tgsettle Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
Some checks are pending
ci/woodpecker/push/billing_documents Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline is pending
ci/woodpecker/push/frontend Pipeline is pending
ci/woodpecker/push/fx_ingestor Pipeline is pending
ci/woodpecker/push/bff Pipeline is pending
ci/woodpecker/push/db Pipeline is pending
ci/woodpecker/push/discovery Pipeline is pending
ci/woodpecker/push/fx_oracle Pipeline is pending
ci/woodpecker/push/gateway_chain Pipeline is pending
ci/woodpecker/push/gateway_mntx Pipeline is pending
ci/woodpecker/push/gateway_tgsettle Pipeline is pending
ci/woodpecker/push/gateway_tron Pipeline is pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
Reviewed-on: #379 Reviewed-by: tech <tech.sendico@proton.me>
This commit was merged in pull request #379.
This commit is contained in:
@@ -11,10 +11,11 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
final TextEditingController firstNameController;
|
final TextEditingController firstNameController;
|
||||||
final TextEditingController lastNameController;
|
final TextEditingController lastNameController;
|
||||||
final TextEditingController messageController;
|
final TextEditingController messageController;
|
||||||
final bool canCreateRoles;
|
|
||||||
final VoidCallback onCreateRole;
|
|
||||||
final String? selectedRoleRef;
|
final String? selectedRoleRef;
|
||||||
final ValueChanged<String?> onRoleChanged;
|
final ValueChanged<String?> onRoleChanged;
|
||||||
|
static const double _fieldWidth = 250.0;
|
||||||
|
static const double _rowSpacing = 40.0;
|
||||||
|
static const double _rowGap = 12.0;
|
||||||
|
|
||||||
const InvitationFormFields({
|
const InvitationFormFields({
|
||||||
super.key,
|
super.key,
|
||||||
@@ -23,8 +24,6 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
required this.firstNameController,
|
required this.firstNameController,
|
||||||
required this.lastNameController,
|
required this.lastNameController,
|
||||||
required this.messageController,
|
required this.messageController,
|
||||||
required this.canCreateRoles,
|
|
||||||
required this.onCreateRole,
|
|
||||||
required this.selectedRoleRef,
|
required this.selectedRoleRef,
|
||||||
required this.onRoleChanged,
|
required this.onRoleChanged,
|
||||||
});
|
});
|
||||||
@@ -34,12 +33,11 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
final loc = AppLocalizations.of(context)!;
|
final loc = AppLocalizations.of(context)!;
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Wrap(
|
Row(
|
||||||
spacing: 12,
|
spacing: _rowSpacing,
|
||||||
runSpacing: 12,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 320,
|
width: _fieldWidth,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: emailController,
|
controller: emailController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -53,7 +51,33 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 200,
|
width: _fieldWidth,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
DropdownButtonFormField<String>(
|
||||||
|
initialValue: selectedRoleRef,
|
||||||
|
items: roles.map((role) => DropdownMenuItem(
|
||||||
|
value: role.storable.id,
|
||||||
|
child: Text(role.describable.name),
|
||||||
|
)).toList(),
|
||||||
|
onChanged: roles.isEmpty ? null : onRoleChanged,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
labelText: loc.invitationRoleLabel,
|
||||||
|
prefixIcon: const Icon(Icons.security_outlined),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: _rowGap),
|
||||||
|
Row(
|
||||||
|
spacing: _rowSpacing,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: _fieldWidth,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: firstNameController,
|
controller: firstNameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -63,7 +87,7 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 200,
|
width: _fieldWidth,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: lastNameController,
|
controller: lastNameController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
@@ -72,29 +96,9 @@ class InvitationFormFields extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
|
||||||
width: 260,
|
|
||||||
child: DropdownButtonFormField<String>(
|
|
||||||
initialValue: selectedRoleRef,
|
|
||||||
items: roles.map((role) => DropdownMenuItem(
|
|
||||||
value: role.storable.id,
|
|
||||||
child: Text(role.describable.name),
|
|
||||||
)).toList(),
|
|
||||||
onChanged: roles.isEmpty ? null : onRoleChanged,
|
|
||||||
decoration: InputDecoration(
|
|
||||||
labelText: loc.invitationRoleLabel,
|
|
||||||
prefixIcon: const Icon(Icons.security_outlined),
|
|
||||||
suffixIcon: IconButton(
|
|
||||||
onPressed: canCreateRoles ? onCreateRole : null,
|
|
||||||
icon: const Icon(Icons.add_circle_outline),
|
|
||||||
tooltip: loc.invitationAddRoleButton,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: _rowGap),
|
||||||
TextFormField(
|
TextFormField(
|
||||||
controller: messageController,
|
controller: messageController,
|
||||||
minLines: 2,
|
minLines: 2,
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ class InvitationFormView extends StatelessWidget {
|
|||||||
firstNameController: firstNameController,
|
firstNameController: firstNameController,
|
||||||
lastNameController: lastNameController,
|
lastNameController: lastNameController,
|
||||||
messageController: messageController,
|
messageController: messageController,
|
||||||
canCreateRoles: canCreateRoles,
|
|
||||||
onCreateRole: onCreateRole,
|
|
||||||
selectedRoleRef: selectedRoleRef,
|
selectedRoleRef: selectedRoleRef,
|
||||||
onRoleChanged: onRoleChanged,
|
onRoleChanged: onRoleChanged,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user