Improve navigation
This commit is contained in:
parent
e9b130434b
commit
7b99c77480
|
|
@ -205,11 +205,12 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
prefState.moduleLayout == ModuleLayout.table) ||
|
prefState.moduleLayout == ModuleLayout.table) ||
|
||||||
uiState.isEditing ||
|
uiState.isEditing ||
|
||||||
entityType.isSetting ||
|
entityType.isSetting ||
|
||||||
entityList.isEmpty) {
|
(entityList.isEmpty && (entityUIState.selectedId ?? '').isEmpty)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((entityUIState.selectedId ?? '').isEmpty) {
|
if ((entityUIState.selectedId ?? '').isEmpty ||
|
||||||
|
!entityList.contains(entityUIState.selectedId)) {
|
||||||
return true;
|
return true;
|
||||||
} else if (unfilteredHistoryList.isNotEmpty &&
|
} else if (unfilteredHistoryList.isNotEmpty &&
|
||||||
uiState.isViewing &&
|
uiState.isViewing &&
|
||||||
|
|
@ -424,13 +425,17 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
|
|
||||||
// STARTER: state getters - do not remove comment
|
// STARTER: state getters - do not remove comment
|
||||||
TaskStatusState get taskStatusState => userCompanyState.taskStatusState;
|
TaskStatusState get taskStatusState => userCompanyState.taskStatusState;
|
||||||
|
|
||||||
ListUIState get taskStatusListState => uiState.taskStatusUIState.listUIState;
|
ListUIState get taskStatusListState => uiState.taskStatusUIState.listUIState;
|
||||||
|
|
||||||
TaskStatusUIState get taskStatusUIState => uiState.taskStatusUIState;
|
TaskStatusUIState get taskStatusUIState => uiState.taskStatusUIState;
|
||||||
|
|
||||||
ExpenseCategoryState get expenseCategoryState =>
|
ExpenseCategoryState get expenseCategoryState =>
|
||||||
userCompanyState.expenseCategoryState;
|
userCompanyState.expenseCategoryState;
|
||||||
|
|
||||||
ListUIState get expenseCategoryListState =>
|
ListUIState get expenseCategoryListState =>
|
||||||
uiState.expenseCategoryUIState.listUIState;
|
uiState.expenseCategoryUIState.listUIState;
|
||||||
|
|
||||||
ExpenseCategoryUIState get expenseCategoryUIState =>
|
ExpenseCategoryUIState get expenseCategoryUIState =>
|
||||||
uiState.expenseCategoryUIState;
|
uiState.expenseCategoryUIState;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4904,12 +4904,18 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_localizedValues[localeCode].containsKey(lookupKey)) {
|
final value = _localizedValues[localeCode][lookupKey] ??
|
||||||
print('ERROR: localization key not found - |$key|');
|
|
||||||
}
|
|
||||||
|
|
||||||
return _localizedValues[localeCode][lookupKey] ??
|
|
||||||
_localizedValues[localeCode][lookupKey.replaceFirst('_id', '')] ??
|
_localizedValues[localeCode][lookupKey.replaceFirst('_id', '')] ??
|
||||||
key;
|
key;
|
||||||
|
|
||||||
|
if (value.isEmpty) {
|
||||||
|
print('ERROR: localization key not found - $key');
|
||||||
|
|
||||||
|
final englishValue = _localizedValues['en'][lookupKey];
|
||||||
|
|
||||||
|
return englishValue.isEmpty ? key : englishValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue