Merge branch 'child_vaccines' into 'master'
Child vaccines See merge request Cloud_Solution/diplomatic-quarter!134merge-requests/224/merge
commit
3c54ed00f9
@ -0,0 +1,9 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||
|
||||
\f0\fs24 \cf0 keyPassword=HmGsa123\
|
||||
storePassword=HmGsa123}
|
@ -0,0 +1,4 @@
|
||||
storePassword=HmGsa123
|
||||
keyPassword=HmGsa123
|
||||
keyAlias=DQKey
|
||||
storeFile=DQKey.jks
|
@ -0,0 +1,108 @@
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
|
||||
import 'package:diplomaticquarterapp/core/model/childvaccines/delete_baby_model.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ChildDetailsWidget extends StatelessWidget {
|
||||
final ChildVaccinesViewModel model;
|
||||
final List_BabyInformationModel babyInfo;
|
||||
DeleteBaby deleteBaby = DeleteBaby();
|
||||
|
||||
ChildDetailsWidget({this.model, this.babyInfo});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(left: 5, right: 5, bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.rectangle,
|
||||
border: Border.all(color: Colors.white, width: 0.5),
|
||||
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||||
color: Colors.white,
|
||||
),
|
||||
padding: EdgeInsets.all(12),
|
||||
width: 200,
|
||||
//double.infinity,
|
||||
child: Column(
|
||||
children: [
|
||||
Row(children: [
|
||||
Texts(TranslationBase.of(context).childName),
|
||||
]),
|
||||
Row(children: [
|
||||
Texts(babyInfo.babyName.trim()),
|
||||
]),
|
||||
Row(children: [
|
||||
IconButton(
|
||||
icon: Image.asset(babyInfo.gender == 1
|
||||
? 'assets/images/new-design/male.png'
|
||||
: 'assets/images/new-design/female.png'),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
},
|
||||
),
|
||||
Texts(babyInfo.genderDescription),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.remove_red_eye,
|
||||
color: Colors.red,
|
||||
),
|
||||
tooltip: '',
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
FadePage(
|
||||
page: VaccinationTablePage(babyInfo: babyInfo,),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
]),
|
||||
Row(children: [
|
||||
Texts(TranslationBase.of(context).childDob),
|
||||
]),
|
||||
Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: new Image.asset(
|
||||
'assets/images/new-design/calender-secondary.png'),
|
||||
tooltip: '',
|
||||
),
|
||||
Texts(
|
||||
DateUtil.yearMonthDay(babyInfo.dOB),
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(children: [
|
||||
IconButton(
|
||||
icon: new Image.asset('assets/images/new-design/garbage.png'),
|
||||
tooltip: '',
|
||||
onPressed: () async {
|
||||
await model.deleteBabyOrders(newChild: deleteBaby);
|
||||
deleteBaby.babyID = babyInfo.babyID;
|
||||
|
||||
await model.deleteBabyOrders(newChild: deleteBaby);
|
||||
if (model.isDeleted) {
|
||||
AppToast.showSuccessToast(message: TranslationBase.of(context).deletedChild);
|
||||
Navigator.pop(context, model.isDeleted);
|
||||
} else {
|
||||
//TODO handling error
|
||||
}
|
||||
},
|
||||
),
|
||||
Texts(TranslationBase.of(context).delete),
|
||||
]),
|
||||
SizedBox(
|
||||
height: 12,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue