step 16 : fix dropdown sex in edit screen
This commit is contained in:
@@ -13,9 +13,7 @@ class ScanRepository extends BaseRepository {
|
||||
}) async {
|
||||
// final service = "${Constant.baseUrl}xauth/login";
|
||||
final service = "http://${host}/one-api/scan-ktp/Scanktp/listRiwayatScan";
|
||||
final resp = await post(param: {
|
||||
"userId":userId
|
||||
}, service: service);
|
||||
final resp = await post(param: {"userId": userId}, service: service);
|
||||
|
||||
final result = List<PersonKtp>.empty(growable: true);
|
||||
resp['data'].forEach((e) {
|
||||
@@ -62,4 +60,36 @@ class ScanRepository extends BaseRepository {
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// edit
|
||||
Future<String> prosesEdit({
|
||||
required String host,
|
||||
required String userId,
|
||||
required String Person_ID,
|
||||
required String Person_NIK,
|
||||
required String Person_Name,
|
||||
required String Person_Dob,
|
||||
required String Person_Sex,
|
||||
}) async {
|
||||
final service = "http://${host}/one-api/scan-ktp/Scanktp/proses_edit";
|
||||
final resp = await post(
|
||||
param: {
|
||||
"Person_ID": Person_ID,
|
||||
"Person_NIK": Person_NIK,
|
||||
"Person_Name": Person_Name,
|
||||
"Person_Dob": Person_Dob,
|
||||
"Person_Sex": Person_Sex,
|
||||
"userId": userId,
|
||||
},
|
||||
service: service,
|
||||
);
|
||||
|
||||
if (resp['status'] == "OK") {
|
||||
return "Sukses Update Data";
|
||||
} else {
|
||||
resp['message'];
|
||||
}
|
||||
|
||||
return resp['message'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user