sick leave

merge-requests/385/head
Sultan Khan 5 years ago
parent 344c1ed91e
commit ee2e3fbbd6

@ -15,6 +15,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bgNew_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/rounded_container_widget.dart';
import 'package:doctor_app_flutter/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart'; import 'package:hexcolor/hexcolor.dart';
@ -304,20 +305,23 @@ class AddSickLeavScreen extends StatelessWidget {
openSickLeave(BuildContext context, isExtend, openSickLeave(BuildContext context, isExtend,
{GetAllSickLeaveResponse extendedData}) { {GetAllSickLeaveResponse extendedData}) {
showModalBottomSheet( // showModalBottomSheet(
context: context, // context: context,
builder: (context) { // builder: (context) {
return new Container( // return new Container(
child: SickLeaveScreen( // child:
appointmentNo: isExtend == true Navigator.push(
? extendedData.appointmentNo context,
: patient.appointmentNo, //extendedData.appointmentNo, FadePage(
patientMRN: isExtend == true page: SickLeaveScreen(
? extendedData.patientMRN appointmentNo: isExtend == true
: patient.patientMRN, ? extendedData.appointmentNo
isExtended: isExtend, : patient.appointmentNo, //extendedData.appointmentNo,
extendedData: extendedData, patientMRN: isExtend == true
patient: patient)); ? extendedData.patientMRN
}); : patient.patientMRN,
isExtended: isExtend,
extendedData: extendedData,
patient: patient)));
} }
} }

@ -89,7 +89,10 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
}, },
child: AppScaffold( child: AppScaffold(
baseViewModel: model2, baseViewModel: model2,
isShowAppBar: false, appBarTitle: widget.isExtended == true
? TranslationBase.of(context).extendSickLeave
: TranslationBase.of(context).addSickLeave,
isShowAppBar: true,
body: Center( body: Center(
child: Container( child: Container(
margin: EdgeInsets.only(top: 10), margin: EdgeInsets.only(top: 10),
@ -97,29 +100,40 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
widthFactor: 0.9, widthFactor: 0.9,
child: ListView( child: ListView(
children: [ children: [
Padding( // Padding(
child: AppText( // child: AppText(
widget.isExtended == true // widget.isExtended == true
? TranslationBase.of(context) // ? TranslationBase.of(context)
.extendSickLeave // .extendSickLeave
: TranslationBase.of(context) // : TranslationBase.of(context)
.addSickLeave, // .addSickLeave,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
), // ),
padding: EdgeInsets.all(10)), // padding: EdgeInsets.all(10)),
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0,
color: HexColor("#CCCCCC"))), color: HexColor("#CCCCCC"),
),
color: Colors.white),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Padding(
padding: EdgeInsets.only(
top: 5, left: 10, right: 10),
child: AppText(
TranslationBase.of(context)
.sickLeave +
' ' +
TranslationBase.of(context)
.days)),
AppTextFormField( AppTextFormField(
borderColor: Colors.white, borderColor: Colors.white,
onChanged: (value) { onChanged: (value) {
@ -132,8 +146,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
hintText: widget.extendedData != null hintText: widget.extendedData != null
? widget.extendedData.noOfDays ? widget.extendedData.noOfDays
.toString() .toString()
: TranslationBase.of(context) : '',
.sickLeaveDays,
// validator: (value) { // validator: (value) {
// return TextValidator().validateName(value); // return TextValidator().validateName(value);
// }, // },
@ -146,25 +159,28 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0, color: HexColor("#CCCCCC")),
color: HexColor("#CCCCCC"))), color: Colors.white,
),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
// AppText( Padding(
// TranslationBase.of(context).sickLeaveDate, padding: EdgeInsets.only(
// fontSize: 10, top: 5, left: 10, right: 10),
// ), child: AppText(
TranslationBase.of(context)
.sickLeaveDate,
)),
AppTextFormField( AppTextFormField(
hintText: widget.extendedData != null hintText: widget.extendedData != null
? widget.extendedData.startDate ? widget.extendedData.startDate
: TranslationBase.of(context) : '',
.sickLeaveDate,
borderColor: Colors.white, borderColor: Colors.white,
prefix: IconButton( prefix: IconButton(
icon: Icon(Icons.calendar_today)), icon: Icon(Icons.calendar_today)),
@ -188,11 +204,12 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 10, left: 10, right: 10), top: 10, left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius:
Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0, color: HexColor("#CCCCCC")),
color: HexColor("#CCCCCC"))), color: Colors.white,
),
width: double.infinity, width: double.infinity,
child: Padding( child: Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
@ -205,10 +222,12 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
// AppText( Padding(
// TranslationBase.of(context).clinicName, padding: EdgeInsets.only(top: 5),
// fontSize: 10, child: AppText(
// ), TranslationBase.of(context)
.clinicName,
)),
Row( Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
@ -291,19 +310,23 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0, color: HexColor("#CCCCCC")),
color: HexColor("#CCCCCC"))), color: Colors.white,
),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// AppText( Padding(
// TranslationBase.of(context).doctorName, padding: EdgeInsets.only(
// fontSize: 10, top: 5, left: 10, right: 10),
// ), child: AppText(
TranslationBase.of(context)
.doctorName,
)),
new IgnorePointer( new IgnorePointer(
ignoring: true, ignoring: true,
child: AppTextFormField( child: AppTextFormField(
@ -324,19 +347,22 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
Container( Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(left: 10, right: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all(Radius.circular(6.0)), BorderRadius.all(Radius.circular(6.0)),
border: Border.all( border: Border.all(
width: 1.0, width: 1.0, color: HexColor("#CCCCCC")),
color: HexColor("#CCCCCC"))), color: Colors.white,
),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// AppText( Padding(
// TranslationBase.of(context).remarks, padding: EdgeInsets.only(
// fontSize: 10, top: 5, left: 10, right: 10),
// ), child: AppText(
TranslationBase.of(context).remarks,
)),
TextField( TextField(
maxLines: 3, maxLines: 3,
decoration: InputDecoration( decoration: InputDecoration(
@ -344,8 +370,7 @@ class _SickLeaveScreenState extends State<SickLeaveScreen> {
border: InputBorder.none, border: InputBorder.none,
hintText: widget.extendedData != null hintText: widget.extendedData != null
? widget.extendedData.remarks ? widget.extendedData.remarks
: TranslationBase.of(context) : ''),
.remarks),
onChanged: (value) { onChanged: (value) {
addSickLeave.remarks = value; addSickLeave.remarks = value;
if (widget.extendedData != null) { if (widget.extendedData != null) {

Loading…
Cancel
Save