diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 3c4cac26..1297a673 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -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/card_with_bgNew_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:hexcolor/hexcolor.dart'; @@ -304,20 +305,23 @@ class AddSickLeavScreen extends StatelessWidget { openSickLeave(BuildContext context, isExtend, {GetAllSickLeaveResponse extendedData}) { - showModalBottomSheet( - context: context, - builder: (context) { - return new Container( - child: SickLeaveScreen( - appointmentNo: isExtend == true - ? extendedData.appointmentNo - : patient.appointmentNo, //extendedData.appointmentNo, - patientMRN: isExtend == true - ? extendedData.patientMRN - : patient.patientMRN, - isExtended: isExtend, - extendedData: extendedData, - patient: patient)); - }); + // showModalBottomSheet( + // context: context, + // builder: (context) { + // return new Container( + // child: + Navigator.push( + context, + FadePage( + page: SickLeaveScreen( + appointmentNo: isExtend == true + ? extendedData.appointmentNo + : patient.appointmentNo, //extendedData.appointmentNo, + patientMRN: isExtend == true + ? extendedData.patientMRN + : patient.patientMRN, + isExtended: isExtend, + extendedData: extendedData, + patient: patient))); } } diff --git a/lib/screens/sick-leave/sick_leave.dart b/lib/screens/sick-leave/sick_leave.dart index f8433fb0..8188c302 100644 --- a/lib/screens/sick-leave/sick_leave.dart +++ b/lib/screens/sick-leave/sick_leave.dart @@ -89,7 +89,10 @@ class _SickLeaveScreenState extends State { }, child: AppScaffold( baseViewModel: model2, - isShowAppBar: false, + appBarTitle: widget.isExtended == true + ? TranslationBase.of(context).extendSickLeave + : TranslationBase.of(context).addSickLeave, + isShowAppBar: true, body: Center( child: Container( margin: EdgeInsets.only(top: 10), @@ -97,29 +100,40 @@ class _SickLeaveScreenState extends State { widthFactor: 0.9, child: ListView( children: [ - Padding( - child: AppText( - widget.isExtended == true - ? TranslationBase.of(context) - .extendSickLeave - : TranslationBase.of(context) - .addSickLeave, - fontWeight: FontWeight.bold, - ), - padding: EdgeInsets.all(10)), + // Padding( + // child: AppText( + // widget.isExtended == true + // ? TranslationBase.of(context) + // .extendSickLeave + // : TranslationBase.of(context) + // .addSickLeave, + // fontWeight: FontWeight.bold, + // ), + // padding: EdgeInsets.all(10)), Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + width: 1.0, + color: HexColor("#CCCCCC"), + ), + color: Colors.white), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + Padding( + padding: EdgeInsets.only( + top: 5, left: 10, right: 10), + child: AppText( + TranslationBase.of(context) + .sickLeave + + ' ' + + TranslationBase.of(context) + .days)), AppTextFormField( borderColor: Colors.white, onChanged: (value) { @@ -132,8 +146,7 @@ class _SickLeaveScreenState extends State { hintText: widget.extendedData != null ? widget.extendedData.noOfDays .toString() - : TranslationBase.of(context) - .sickLeaveDays, + : '', // validator: (value) { // return TextValidator().validateName(value); // }, @@ -146,25 +159,28 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC")), + color: Colors.white, + ), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // AppText( - // TranslationBase.of(context).sickLeaveDate, - // fontSize: 10, - // ), + Padding( + padding: EdgeInsets.only( + top: 5, left: 10, right: 10), + child: AppText( + TranslationBase.of(context) + .sickLeaveDate, + )), AppTextFormField( hintText: widget.extendedData != null ? widget.extendedData.startDate - : TranslationBase.of(context) - .sickLeaveDate, + : '', borderColor: Colors.white, prefix: IconButton( icon: Icon(Icons.calendar_today)), @@ -188,11 +204,12 @@ class _SickLeaveScreenState extends State { margin: EdgeInsets.only( top: 10, left: 10, right: 10), decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC")), + color: Colors.white, + ), width: double.infinity, child: Padding( padding: EdgeInsets.only( @@ -205,10 +222,12 @@ class _SickLeaveScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ - // AppText( - // TranslationBase.of(context).clinicName, - // fontSize: 10, - // ), + Padding( + padding: EdgeInsets.only(top: 5), + child: AppText( + TranslationBase.of(context) + .clinicName, + )), Row( mainAxisSize: MainAxisSize.max, children: [ @@ -291,19 +310,23 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC")), + color: Colors.white, + ), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // AppText( - // TranslationBase.of(context).doctorName, - // fontSize: 10, - // ), + Padding( + padding: EdgeInsets.only( + top: 5, left: 10, right: 10), + child: AppText( + TranslationBase.of(context) + .doctorName, + )), new IgnorePointer( ignoring: true, child: AppTextFormField( @@ -324,19 +347,22 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, - color: HexColor("#CCCCCC"))), + borderRadius: + BorderRadius.all(Radius.circular(6.0)), + border: Border.all( + width: 1.0, color: HexColor("#CCCCCC")), + color: Colors.white, + ), padding: EdgeInsets.all(5), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - // AppText( - // TranslationBase.of(context).remarks, - // fontSize: 10, - // ), + Padding( + padding: EdgeInsets.only( + top: 5, left: 10, right: 10), + child: AppText( + TranslationBase.of(context).remarks, + )), TextField( maxLines: 3, decoration: InputDecoration( @@ -344,8 +370,7 @@ class _SickLeaveScreenState extends State { border: InputBorder.none, hintText: widget.extendedData != null ? widget.extendedData.remarks - : TranslationBase.of(context) - .remarks), + : ''), onChanged: (value) { addSickLeave.remarks = value; if (widget.extendedData != null) {