Merge branch 'develop' into feat/fd-905
This commit is contained in:
commit
5a0e9dc129
|
@ -242,6 +242,7 @@ class _DetailsComponentWidgetState extends State<DetailsComponentWidget> {
|
||||||
if (widget.buttons.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
if (widget.buttons.isNotEmpty) // Adicione este SizedBox com a altura desejada
|
||||||
OverflowBar(
|
OverflowBar(
|
||||||
overflowAlignment: OverflowBarAlignment.center,
|
overflowAlignment: OverflowBarAlignment.center,
|
||||||
|
alignment: MainAxisAlignment.center,
|
||||||
overflowSpacing: 2,
|
overflowSpacing: 2,
|
||||||
spacing: 2,
|
spacing: 2,
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:hub/pages/liberation_history/liberation_history_model.dart';
|
||||||
import 'package:hub/shared/utils/dialog_util.dart';
|
import 'package:hub/shared/utils/dialog_util.dart';
|
||||||
import 'package:hub/shared/utils/limited_text_size.dart';
|
import 'package:hub/shared/utils/limited_text_size.dart';
|
||||||
import 'package:hub/shared/utils/log_util.dart';
|
import 'package:hub/shared/utils/log_util.dart';
|
||||||
|
import 'package:hub/shared/utils/snackbar_util.dart';
|
||||||
import 'package:hub/shared/utils/validator_util.dart';
|
import 'package:hub/shared/utils/validator_util.dart';
|
||||||
|
|
||||||
class LiberationHistoryWidget extends StatefulWidget {
|
class LiberationHistoryWidget extends StatefulWidget {
|
||||||
|
@ -219,7 +220,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.done),
|
icon: const Icon(Icons.done),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
_model.answersRequest
|
await _model.answersRequest
|
||||||
.call(
|
.call(
|
||||||
context: context,
|
context: context,
|
||||||
ref: liberationHistoryItem['NOT_ID'].toString(),
|
ref: liberationHistoryItem['NOT_ID'].toString(),
|
||||||
|
@ -229,17 +230,23 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
)
|
)
|
||||||
.then((value) {
|
.then((value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
showSnackbar(
|
SnackBarUtil.showSnackBar(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Successfully resolved visit', ptText: 'Visita resolvida com sucesso'),
|
enText: 'Successfully resolved visit',
|
||||||
false);
|
ptText: 'Visita resolvida com sucesso',
|
||||||
|
),
|
||||||
|
isError: false,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
showSnackbar(
|
SnackBarUtil.showSnackBar(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Error resolving visit', ptText: 'Erro ao resolver visita'),
|
enText: 'Error resolving visit',
|
||||||
true);
|
ptText: 'Erro ao resolver visita',
|
||||||
|
),
|
||||||
|
isError: true,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}).whenComplete(() {
|
}).whenComplete(() {
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
|
@ -268,7 +275,7 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
),
|
),
|
||||||
icon: const Icon(Icons.close),
|
icon: const Icon(Icons.close),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
return _model.answersRequest
|
await _model.answersRequest
|
||||||
.call(
|
.call(
|
||||||
context: context,
|
context: context,
|
||||||
ref: liberationHistoryItem['NOT_ID'].toString(),
|
ref: liberationHistoryItem['NOT_ID'].toString(),
|
||||||
|
@ -277,21 +284,23 @@ class _LiberationHistoryWidgetState extends State<LiberationHistoryWidget> {
|
||||||
id: liberationHistoryItem['VTE_ID'].toString(),
|
id: liberationHistoryItem['VTE_ID'].toString(),
|
||||||
)
|
)
|
||||||
.then((message) {
|
.then((message) {
|
||||||
if (message.isEmpty) {
|
if (message != null || message != '') {
|
||||||
showSnackbar(
|
showSnackbar(
|
||||||
context,
|
context,
|
||||||
FFLocalizations.of(context).getVariableText(
|
FFLocalizations.of(context).getVariableText(
|
||||||
enText: 'Successfully resolved visit', ptText: 'Visita resolvida com sucesso'),
|
enText: 'Successfully resolved visit',
|
||||||
false);
|
ptText: 'Visita resolvida com sucesso',
|
||||||
|
),
|
||||||
|
false,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
showSnackbar(context, message, true);
|
showSnackbar(context, message, true);
|
||||||
}
|
}
|
||||||
|
}).whenComplete(() {
|
||||||
safeSetState(() {
|
safeSetState(() {
|
||||||
_requestWrap = [];
|
_requestWrap = [];
|
||||||
_requestFuture = _fetchRequests();
|
_requestFuture = _fetchRequests();
|
||||||
});
|
});
|
||||||
|
|
||||||
context.pop();
|
context.pop();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -119,6 +119,7 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState(BuildContext context) {
|
void initState(BuildContext context) {
|
||||||
|
initAsync();
|
||||||
tabBarController = TabController(
|
tabBarController = TabController(
|
||||||
vsync: Navigator.of(context),
|
vsync: Navigator.of(context),
|
||||||
length: 2,
|
length: 2,
|
||||||
|
@ -143,7 +144,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
textControllerObservation = TextEditingController();
|
textControllerObservation = TextEditingController();
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
await initAsync();
|
|
||||||
devUUID = await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage) ?? '';
|
devUUID = await StorageHelper().get(SQLiteStorageKey.devUUID.value, Storage.SQLiteStorage) ?? '';
|
||||||
userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
userUUID = await StorageHelper().get(SQLiteStorageKey.userUUID.value, Storage.SQLiteStorage) ?? '';
|
||||||
cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage) ?? '';
|
cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage) ?? '';
|
||||||
|
@ -411,7 +411,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
// model.safeSetState!();
|
// model.safeSetState!();
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 100,
|
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
@ -489,7 +488,6 @@ class PetsPageModel extends FlutterFlowModel<PetsPageWidget> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
options: FFButtonOptions(
|
options: FFButtonOptions(
|
||||||
width: 100,
|
|
||||||
height: 40,
|
height: 40,
|
||||||
color: FlutterFlowTheme.of(context).primaryBackground,
|
color: FlutterFlowTheme.of(context).primaryBackground,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
|
|
Loading…
Reference in New Issue