feat: Update image URL for liberation history item
This commit is contained in:
parent
2eb0f768f5
commit
6b6bb28c8b
File diff suppressed because one or more lines are too long
|
@ -1854,35 +1854,47 @@ class GetAccessCall {
|
|||
}
|
||||
|
||||
class GetLiberationsCall {
|
||||
Future<ApiCallResponse> call({
|
||||
Stream<ApiCallResponse> call({
|
||||
String? devUUID = '',
|
||||
String? userUUID = '',
|
||||
String? cliID = '',
|
||||
String? atividade = '',
|
||||
}) async {
|
||||
}) {
|
||||
final baseUrl = PhpGroup.getBaseUrl();
|
||||
final StreamController<ApiCallResponse> controller = StreamController();
|
||||
|
||||
return ApiManager.instance.makeApiCall(
|
||||
callName: 'getLiberations',
|
||||
apiUrl: '$baseUrl/processRequest.php',
|
||||
callType: ApiCallType.POST,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
params: {
|
||||
'devUUID': devUUID,
|
||||
'userUUID': userUUID,
|
||||
'cliID': cliID,
|
||||
'atividade': atividade,
|
||||
},
|
||||
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
|
||||
returnBody: true,
|
||||
encodeBodyUtf8: false,
|
||||
decodeUtf8: false,
|
||||
cache: false,
|
||||
isStreamingApi: false,
|
||||
alwaysAllowBody: false,
|
||||
);
|
||||
Future.microtask(() async {
|
||||
try {
|
||||
final response = await ApiManager.instance.makeApiCall(
|
||||
callName: 'getLiberations',
|
||||
apiUrl: '$baseUrl/processRequest.php',
|
||||
callType: ApiCallType.POST,
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
params: {
|
||||
'devUUID': devUUID,
|
||||
'userUUID': userUUID,
|
||||
'cliID': cliID,
|
||||
'atividade': atividade,
|
||||
},
|
||||
bodyType: BodyType.X_WWW_FORM_URL_ENCODED,
|
||||
returnBody: true,
|
||||
encodeBodyUtf8: false,
|
||||
decodeUtf8: false,
|
||||
cache: false,
|
||||
isStreamingApi: false,
|
||||
alwaysAllowBody: false,
|
||||
);
|
||||
controller.add(response);
|
||||
await controller.close();
|
||||
} catch (e) {
|
||||
controller.addError(e);
|
||||
await controller.close();
|
||||
}
|
||||
});
|
||||
|
||||
return controller.stream;
|
||||
}
|
||||
|
||||
bool? error(dynamic response) => castToType<bool>(getJsonField(
|
||||
|
|
|
@ -422,8 +422,8 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'en': 'Search here',
|
||||
},
|
||||
'dkzewokx': {
|
||||
'pt': 'Date:',
|
||||
'en': 'Shipping:',
|
||||
'pt': 'Data:',
|
||||
'en': 'Date:',
|
||||
},
|
||||
'2s9avwbq': {
|
||||
'pt': 'Motivo:',
|
||||
|
@ -488,6 +488,10 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
|
|||
'pt': 'Tipo de Pessoa',
|
||||
'en': 'Type of Person',
|
||||
},
|
||||
'zok7lu4w': {
|
||||
'pt': 'Visitante',
|
||||
'en': 'Visitor',
|
||||
},
|
||||
'oonqk812': {
|
||||
'pt': 'Morador',
|
||||
'en': 'Resident',
|
||||
|
|
|
@ -16,11 +16,11 @@ class LiberationHistoryModel extends FlutterFlowModel<LiberationHistoryWidget> {
|
|||
|
||||
/// Query cache managers for this widget.
|
||||
|
||||
final _getLiberationsManager = FutureRequestManager<ApiCallResponse>();
|
||||
Future<ApiCallResponse> getLiberations({
|
||||
final _getLiberationsManager = StreamRequestManager<ApiCallResponse>();
|
||||
Stream<ApiCallResponse> getLiberations({
|
||||
String? uniqueQueryKey,
|
||||
bool? overrideCache,
|
||||
required Future<ApiCallResponse> Function() requestFn,
|
||||
required Stream<ApiCallResponse> Function() requestFn,
|
||||
}) =>
|
||||
_getLiberationsManager.performRequest(
|
||||
uniqueQueryKey: uniqueQueryKey,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue