Update navigation
This commit is contained in:
parent
5e2c3cc425
commit
6158db59cc
|
|
@ -702,15 +702,22 @@ class _EntityFilter extends StatelessWidget {
|
||||||
? []
|
? []
|
||||||
: [
|
: [
|
||||||
SizedBox(width: 4),
|
SizedBox(width: 4),
|
||||||
FlatButton(
|
Expanded(
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: FlatButton(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${localization.lookup('$filterEntityType')} › ${filterEntity.listDisplayName}',
|
'${localization.lookup('$filterEntityType')} › ${filterEntity.listDisplayName}',
|
||||||
style: TextStyle(fontSize: 17),
|
style: TextStyle(fontSize: 17),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
textAlign: TextAlign.start,
|
||||||
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
onPressed: () => viewEntitiesByType(
|
onPressed: () => viewEntitiesByType(
|
||||||
context: context, entityType: filterEntityType),
|
context: context, entityType: filterEntityType),
|
||||||
),
|
),
|
||||||
Spacer(),
|
),
|
||||||
|
),
|
||||||
PopupMenuButton<EntityType>(
|
PopupMenuButton<EntityType>(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -725,14 +732,14 @@ class _EntityFilter extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
initialValue: routeEntityType,
|
initialValue: routeEntityType,
|
||||||
onSelected: (EntityType value) =>
|
onSelected: (EntityType value) => viewEntitiesByType(
|
||||||
viewEntitiesByType(context: context, entityType: value),
|
context: context, entityType: value),
|
||||||
itemBuilder: (BuildContext context) => [
|
itemBuilder: (BuildContext context) => [
|
||||||
filterEntityType,
|
filterEntityType,
|
||||||
...filterEntityType.relatedTypes
|
...filterEntityType.relatedTypes
|
||||||
]
|
]
|
||||||
.where(
|
.where((element) =>
|
||||||
(element) => state.company.isModuleEnabled(element))
|
state.company.isModuleEnabled(element))
|
||||||
.map((type) => PopupMenuItem<EntityType>(
|
.map((type) => PopupMenuItem<EntityType>(
|
||||||
value: type,
|
value: type,
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue