modified Child vaccintion note
parent
8ddec0ad99
commit
83735ab68d
@ -0,0 +1,76 @@
|
||||
class DeleteBaby {
|
||||
bool isLogin;
|
||||
int babyID;
|
||||
int editedBy;
|
||||
double versionID;
|
||||
int channel;
|
||||
int languageID;
|
||||
String iPAdress;
|
||||
String generalid;
|
||||
int patientOutSA;
|
||||
String sessionID;
|
||||
bool isDentalAllowedBackend;
|
||||
int deviceTypeID;
|
||||
int patientID;
|
||||
String tokenID;
|
||||
int patientTypeID;
|
||||
int patientType;
|
||||
|
||||
DeleteBaby(
|
||||
{this.isLogin,
|
||||
this.babyID,
|
||||
this.editedBy,
|
||||
this.versionID,
|
||||
this.channel,
|
||||
this.languageID,
|
||||
this.iPAdress,
|
||||
this.generalid,
|
||||
this.patientOutSA,
|
||||
this.sessionID,
|
||||
this.isDentalAllowedBackend,
|
||||
this.deviceTypeID,
|
||||
this.patientID,
|
||||
this.tokenID,
|
||||
this.patientTypeID,
|
||||
this.patientType});
|
||||
|
||||
DeleteBaby.fromJson(Map<String, dynamic> json) {
|
||||
isLogin = json['IsLogin'];
|
||||
babyID = json['BabyID'];
|
||||
editedBy = json['EditedBy'];
|
||||
versionID = json['VersionID'];
|
||||
channel = json['Channel'];
|
||||
languageID = json['LanguageID'];
|
||||
iPAdress = json['IPAdress'];
|
||||
generalid = json['generalid'];
|
||||
patientOutSA = json['PatientOutSA'];
|
||||
sessionID = json['SessionID'];
|
||||
isDentalAllowedBackend = json['isDentalAllowedBackend'];
|
||||
deviceTypeID = json['DeviceTypeID'];
|
||||
patientID = json['PatientID'];
|
||||
tokenID = json['TokenID'];
|
||||
patientTypeID = json['PatientTypeID'];
|
||||
patientType = json['PatientType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['IsLogin'] = this.isLogin;
|
||||
data['BabyID'] = this.babyID;
|
||||
data['EditedBy'] = this.editedBy;
|
||||
data['VersionID'] = this.versionID;
|
||||
data['Channel'] = this.channel;
|
||||
data['LanguageID'] = this.languageID;
|
||||
data['IPAdress'] = this.iPAdress;
|
||||
data['generalid'] = this.generalid;
|
||||
data['PatientOutSA'] = this.patientOutSA;
|
||||
data['SessionID'] = this.sessionID;
|
||||
data['isDentalAllowedBackend'] = this.isDentalAllowedBackend;
|
||||
data['DeviceTypeID'] = this.deviceTypeID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['TokenID'] = this.tokenID;
|
||||
data['PatientTypeID'] = this.patientTypeID;
|
||||
data['PatientType'] = this.patientType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
import 'package:diplomaticquarterapp/config/config.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
|
||||
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/create_new_user_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
|
||||
import '../base_service.dart';
|
||||
|
||||
|
||||
|
||||
class DeleteBabyService extends BaseService{
|
||||
|
||||
List<CreateNewBaby> createNewBabyModelList = List();
|
||||
List<List_UserInformationModel> userModelList = List();
|
||||
List<CreateNewUser_New> newUserModelList = List();
|
||||
|
||||
List<DeleteBaby> deleteBabyModelList= List();
|
||||
|
||||
|
||||
Future getDeleteBabyOrder({DeleteBaby deleteChild,int babyID}) async {
|
||||
hasError = false;
|
||||
await getUser();
|
||||
Map<String, dynamic> body = Map.from(deleteChild.toJson());
|
||||
// body['CreatedBy'] = 102;
|
||||
body['EditedBy'] = 102;
|
||||
//body['BabyID'] = babyID;
|
||||
//body['BabyID'] = createNewBabyModelList ;
|
||||
// body['AlertBy'] = 2;
|
||||
// body['EmailAddress'] = user.emailAddress;
|
||||
body['IsLogin'] = true;
|
||||
body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
body['MobileNumber'] = user.mobileNumber;
|
||||
body['NationalID'] = user.nationalityID;
|
||||
body['ZipCode'] = user.zipCode;
|
||||
|
||||
body['isDentalAllowedBackend'] = false;
|
||||
|
||||
await baseAppClient.post(DELETE_CHILD_REQUEST,
|
||||
onSuccess: (dynamic response, int statusCode) {
|
||||
var asd ="";
|
||||
},
|
||||
onFailure: (String error, int statusCode) {
|
||||
hasError = true;
|
||||
super.error = error;
|
||||
}, body: body);
|
||||
}
|
||||
|
||||
// Future getCreateNewBabyOrders({CreateNewBaby newChild,int userID}) async {
|
||||
// hasError = false;
|
||||
// await getUser();
|
||||
// Map<String, dynamic> body = Map.from(newChild.toJson());
|
||||
// body['CreatedBy'] = 102;
|
||||
// body['EditedBy'] = 102;
|
||||
// body['UserID'] = userID;
|
||||
// body['AlertBy'] = 2;
|
||||
// body['EmailAddress'] = user.emailAddress;
|
||||
// body['IsLogin'] = true;
|
||||
// body['LogInTokenID'] = await sharedPref.getString(TOKEN);
|
||||
// body['MobileNumber'] = user.mobileNumber;
|
||||
// body['NationalID'] = user.nationalityID;
|
||||
// body['ZipCode'] = user.zipCode;
|
||||
//
|
||||
// body['isDentalAllowedBackend'] = false;
|
||||
//
|
||||
// await baseAppClient.post(GET_NEWCHILD_REQUEST,
|
||||
// onSuccess: (dynamic response, int statusCode) {
|
||||
// var asd ="";
|
||||
// },
|
||||
// onFailure: (String error, int statusCode) {
|
||||
// hasError = true;
|
||||
// super.error = error;
|
||||
// }, body: body);
|
||||
// }
|
||||
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
||||
class DeleteChild extends StatefulWidget {
|
||||
@override
|
||||
_DeleteChildState createState() => _DeleteChildState();
|
||||
}
|
||||
|
||||
class _DeleteChildState extends State<DeleteChild> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Divider(),
|
||||
Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
//beneficiaryType = Gender.Male;
|
||||
});
|
||||
},
|
||||
child: ListTile(
|
||||
title: Text("Delete the child "),
|
||||
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.0,
|
||||
),
|
||||
Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).cancel.toUpperCase(),
|
||||
color: Colors.red,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 1,
|
||||
height: 30,
|
||||
color: Colors.grey[500],
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// widget.onValueSelected(beneficiaryType);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Center(
|
||||
child: Texts(
|
||||
TranslationBase.of(context).ok,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue