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