diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 5c0ad3f4..1c7199fa 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -35,69 +35,72 @@ class AddSickLeavScreen extends StatelessWidget { child: Column(children: [ PatientProfileHeaderNewDesign( patient, routeArgs['patientType'], routeArgs['arrivalType']), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.all(10), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - AppText( - TranslationBase.of(context).patient, - fontWeight: FontWeight.bold, - ), - AppText( - TranslationBase.of(context).sickLeave, - fontSize: 24, - fontWeight: FontWeight.bold, - ), - ], - )), - Container( - width: SizeConfig.screenWidth, - margin: EdgeInsets.only( - left: 20, right: 20, top: 10, bottom: 10), - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: HexColor('#EAEAEA')), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - child: Container( + patient.patientStatusType == 43 + ? Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: EdgeInsets.all(10), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + AppText( + TranslationBase.of(context).patient, + fontWeight: FontWeight.bold, + ), + AppText( + TranslationBase.of(context).sickLeave, + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ], + )), + Container( + width: SizeConfig.screenWidth, + margin: EdgeInsets.only( + left: 20, right: 20, top: 10, bottom: 10), + padding: EdgeInsets.all(20), decoration: BoxDecoration( - color: Colors.grey, - borderRadius: BorderRadius.circular(10)), - padding: EdgeInsets.all(3), - child: IconButton( - icon: Icon( - Icons.add, - size: 35, - color: Colors.white, + borderRadius: BorderRadius.circular(10), + color: HexColor('#EAEAEA')), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: Container( + decoration: BoxDecoration( + color: Colors.grey, + borderRadius: BorderRadius.circular(10)), + padding: EdgeInsets.all(3), + child: IconButton( + icon: Icon( + Icons.add, + size: 35, + color: Colors.white, + ), + onPressed: () { + openSickLeave( + context, + false, + ); + }), + )), + Padding( + child: AppText( + TranslationBase.of(context) + .noSickLeaveApplied, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 16, + textAlign: TextAlign.center, + color: HexColor('#7E7E7E')), + padding: EdgeInsets.all(10), ), - onPressed: () { - openSickLeave( - context, - false, - ); - }), - )), - Padding( - child: AppText( - TranslationBase.of(context).noSickLeaveApplied, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 16, - textAlign: TextAlign.center, - color: HexColor('#7E7E7E')), - padding: EdgeInsets.all(10), - ), - ], - )), - ], - ), + ], + )), + ], + ) + : SizedBox(), model.getAllSIckLeave.length > 0 ? Column( children: model.getAllSIckLeave