Pushing after Testing on Panel
parent
7e82746ce3
commit
54f6c7c185
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@ -1,29 +1,47 @@
|
||||
PODS:
|
||||
- audio_session (0.0.1):
|
||||
- Flutter
|
||||
- connectivity (0.0.1):
|
||||
- Flutter
|
||||
- Reachability
|
||||
- Flutter (1.0.0)
|
||||
- just_audio (0.0.1):
|
||||
- Flutter
|
||||
- path_provider_ios (0.0.1):
|
||||
- Flutter
|
||||
- Reachability (3.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- audio_session (from `.symlinks/plugins/audio_session/ios`)
|
||||
- connectivity (from `.symlinks/plugins/connectivity/ios`)
|
||||
- Flutter (from `Flutter`)
|
||||
- just_audio (from `.symlinks/plugins/just_audio/ios`)
|
||||
- path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- Reachability
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
audio_session:
|
||||
:path: ".symlinks/plugins/audio_session/ios"
|
||||
connectivity:
|
||||
:path: ".symlinks/plugins/connectivity/ios"
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
just_audio:
|
||||
:path: ".symlinks/plugins/just_audio/ios"
|
||||
path_provider_ios:
|
||||
:path: ".symlinks/plugins/path_provider_ios/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
audio_session: 4f3e461722055d21515cf3261b64c973c062f345
|
||||
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
|
||||
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
|
||||
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
|
||||
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
|
||||
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
|
||||
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
|
||||
|
||||
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
|
||||
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
|
||||
|
||||
COCOAPODS: 1.11.2
|
||||
COCOAPODS: 1.11.3
|
||||
|
||||
@ -1,47 +1,57 @@
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:queuing_system/core/base/base_app_client.dart';
|
||||
import 'package:queuing_system/core/response_model/patient_call.dart';
|
||||
|
||||
const _getCallRequestInfoByClinicInfo = "/GetCallRequestInfoByClinincInfo";
|
||||
const _call_UpdateNotIsQueueRecordByIDAsync = "/Call_UpdateNotIsQueueRecordByIDAsync";
|
||||
const _call_UpdateNotIsQueueRecordByIDAsync = "/Call_UpdateNotIsQueueRecordByID";
|
||||
|
||||
class API {
|
||||
|
||||
static GetCallRequestInfoByClinincInfo(String deviceIp, {@required Function(List<Tickets>, List<Tickets>) onSuccess, @required Function(dynamic) onFailure}) async{
|
||||
static GetCallRequestInfoByClinincInfo(String deviceIp, {@required Function(List<Tickets>) onSuccess, @required Function(dynamic) onFailure}) async {
|
||||
final body = {"IPAdress": deviceIp};
|
||||
BaseAppClient.post(_getCallRequestInfoByClinicInfo, body: body, onSuccess: (response, status){
|
||||
BaseAppClient.post(_getCallRequestInfoByClinicInfo,
|
||||
body: body,
|
||||
onSuccess: (response, status) {
|
||||
if (status == 200) {
|
||||
final calledByNurse = (response["CalledByNurse"] as List).map((j) => Tickets.fromJson(j)).toList();
|
||||
final clinicCurrentPatient = (response["ClinicCurrentPatient"] as List).map((j) => Tickets.fromJson(j)).toList();
|
||||
onSuccess(calledByNurse, clinicCurrentPatient);
|
||||
var calledByNurse = (response["CalledByNurse"] as List).map((j) => Tickets.fromJson(j)).toList();
|
||||
final patients = (response["ClinicCurrentPatient"] as List).map((j) => Tickets.fromJson(j)).toList();
|
||||
calledByNurse.addAll(patients);
|
||||
|
||||
calledByNurse.sort((a, b) => a.callNo.compareTo(b.callNo));
|
||||
|
||||
// final clinicCurrentPatient = (response["ClinicCurrentPatient"] as List).map((j) => Tickets.fromJson(j)).toList();
|
||||
onSuccess(calledByNurse);
|
||||
} else {
|
||||
onFailure(response);
|
||||
}
|
||||
}, onFailure: (error, status) => onFailure(error));
|
||||
}
|
||||
|
||||
// static Call_UpdateNotIsQueueRecordByIDAsync(String deviceIp, {@required List<Tickets> tickets, @required Function(List<Tickets>) onSuccess, @required Function(dynamic) onFailure}) async{
|
||||
// if(tickets.isEmpty) {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// List<Tickets> _ticketsUpdated = [];
|
||||
//
|
||||
// for (var ticket in tickets) {
|
||||
// final body = { "CallID" : ticket.callNo};
|
||||
// await BaseAppClient.post(_call_UpdateNotIsQueueRecordByIDAsync, body: body, onSuccess: (response, status){
|
||||
// if(status == 200){
|
||||
// ticket.call_updated = true;
|
||||
// _ticketsUpdated.add(ticket);
|
||||
// }
|
||||
// }, onFailure: (error, status) => onFailure(error));
|
||||
// }
|
||||
//
|
||||
// if(_ticketsUpdated.isNotEmpty) {
|
||||
// onSuccess(_ticketsUpdated);
|
||||
// }else{
|
||||
// onFailure(false);
|
||||
// }
|
||||
// }
|
||||
},
|
||||
onFailure: (error, status) => onFailure(error));
|
||||
}
|
||||
|
||||
static Call_UpdateNotIsQueueRecordByIDAsync(String deviceIp, {@required List<Tickets> tickets, @required Function(List<Tickets>) onSuccess, @required Function(dynamic) onFailure}) async {
|
||||
if (tickets.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Tickets> _ticketsUpdated = [];
|
||||
|
||||
for (var ticket in tickets) {
|
||||
final body = {"CallID": ticket.callNo};
|
||||
await BaseAppClient.post(_call_UpdateNotIsQueueRecordByIDAsync,
|
||||
body: body,
|
||||
onSuccess: (response, status) {
|
||||
print("response: $response");
|
||||
if (status == 200) {
|
||||
ticket.call_updated = true;
|
||||
_ticketsUpdated.add(ticket);
|
||||
}
|
||||
},
|
||||
onFailure: (error, status) => onFailure(error));
|
||||
}
|
||||
|
||||
if (_ticketsUpdated.isNotEmpty) {
|
||||
onSuccess(_ticketsUpdated);
|
||||
} else {
|
||||
onFailure(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue