This commit is contained in:
Mohamed Nouffer
2022-04-17 11:45:21 +05:30
parent ee3845681d
commit e6cf730ae2
30 changed files with 1260 additions and 534 deletions

View File

@ -22,7 +22,8 @@ class PerfectureService{
static Future<List<dynamic>?> loadSubPerfectures(String sub) async {
List<dynamic> perfs = [];
String url = 'http://localhost:8100/api/insubperf/?perf=' + sub;
String url = 'http://localhost:8100/api/subperfinmain/?perf=' + sub;
//String url = 'http://container.intranet.sumasen.net:8100/api/insubperf/?perf=' + sub;
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
@ -37,5 +38,40 @@ class PerfectureService{
}
static Future<List<dynamic>?> getMainPerfExt(String id) async {
List<dynamic> perfs = [];
String url = 'http://localhost:8100/api/mainperfext/?perf=' + id;
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
perfs = json.decode(utf8.decode(response.bodyBytes));
}
return perfs;
}
static Future<List<dynamic>?> getSubExt(String id) async {
List<dynamic> perfs = [];
String url = 'http://localhost:8100/api/perfext/?sub_perf=' + id;
final response = await http.get(Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
perfs = json.decode(utf8.decode(response.bodyBytes));
}
return perfs;
}
}