Swap name/client in edit project and auto-focus

This commit is contained in:
Hillel Coren 2021-03-09 21:34:09 +02:00
parent 17cfc3d478
commit ab95c53f85
1 changed files with 9 additions and 8 deletions

View File

@ -148,6 +148,15 @@ class _ProjectEditState extends State<ProjectEdit> {
children: <Widget>[
FormCard(
children: <Widget>[
DecoratedFormField(
controller: _nameController,
validator: (String val) => val.trim().isEmpty
? localization.pleaseEnterAName
: null,
autovalidate: _autoValidate,
autofocus: true,
label: localization.projectName,
),
project.isNew
? EntityDropdown(
key: ValueKey('__client_${project.clientId}__'),
@ -177,14 +186,6 @@ class _ProjectEditState extends State<ProjectEdit> {
label: localization.projectNumber,
autocorrect: false,
),
DecoratedFormField(
controller: _nameController,
validator: (String val) => val.trim().isEmpty
? localization.pleaseEnterAName
: null,
autovalidate: _autoValidate,
label: localization.projectName,
),
UserPicker(
userId: project.assignedUserId,
onChanged: (userId) => viewModel.onChanged(