Merge branch 'pharmacy-bugs' into 'development'

Pharmacy bugs

See merge request Cloud_Solution/diplomatic-quarter!334
merge-requests/335/merge
Mohammad Aljammal 4 years ago
commit ed5079e3a0

@ -81,85 +81,81 @@ class _HomePageState extends State<HomePage> {
child: Row(
children: <Widget>[
Expanded(
child: Visibility(
visible: model.user.outSA == 1 ? false : true,
child: Container(
height: 125,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: Container(
height: 125,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage("assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
),
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(Radius.circular(5))),
child: Container(
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0,
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).driveThru,
fontWeight: FontWeight.w700,
color: Colors.white,
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Column(
children: <Widget>[
Texts(
TranslationBase.of(context).driveThru,
fontWeight: FontWeight.w700,
color: Colors.white,
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
),
ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
),
minWidth: MediaQuery.of(context).size.width * 0.15,
height: 25.0,
child: RaisedButton(
color: Colors.red[800],
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru();
},
minWidth: MediaQuery.of(context).size.width * 0.15,
height: 25.0,
child: RaisedButton(
color: Colors.red[800],
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru();
},
child: Center(
child: Center(
child: Center(
child: Center(
child: Center(
child: Texts(
TranslationBase.of(context).bookNow,
fontWeight: FontWeight.w700,
color: Colors.white,
),
child: Texts(
TranslationBase.of(context).bookNow,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
),
),
),
],
),
),
],
),
],
),
],
),
),
],
),
],
),
),
),
@ -462,121 +458,159 @@ class _HomePageState extends State<HomePage> {
if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67))
if (model.user.outSA == 0)
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
if (projectViewModel.havePrivilege(64))
DashboardItem(
onTap: () {
Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
);
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/home_health_care_icon.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
Container(
margin: EdgeInsets.only(left: 15, right: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
if (projectViewModel.havePrivilege(64))
DashboardItem(
onTap: (model.user != null && model.user.outSA == 1)
? () {}
: () {
Navigator.push(
context,
FadePage(
page: HomeHealthCarePage(),
),
Texts(
TranslationBase.of(context).homeHealthCare,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
if (projectViewModel.havePrivilege(65))
DashboardItem(
onTap: () => getPharmacyToken(model),
child: Center(
child: Padding(
);
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/pharmacy_logo.png',
width: 40,
height: 40,
),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
: Column(
children: <Widget>[
Image.asset(
'assets/images/home_health_care_icon.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).homeHealthCare,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
),
height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png',
opacity: 0.5,
),
if (projectViewModel.havePrivilege(65))
DashboardItem(
onTap: () =>
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
],
),
),
: Column(
children: <Widget>[
// if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1)
// Image.asset(
// 'assets/images/lock_icon.png',
// width: 50,
// height: 50,
// ),
Image.asset(
'assets/images/pharmacy_logo.png',
width: 40,
height: 40,
),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
),
height: MediaQuery.of(context).size.width * 0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
if (projectViewModel.havePrivilege(67))
DashboardItem(
onTap: () {
Navigator.push(
context,
FadePage(
page: CMCPage(),
),
);
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
children: <Widget>[
Image.asset(
'assets/images/comprehensive_medical_checkup_logo.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
height: MediaQuery.of(context).size.width * 0.4,
imageName: 'al-habib_onlne_pharmacy_bg.png',
),
if (projectViewModel.havePrivilege(67))
DashboardItem(
onTap: (model.user != null && model.user.outSA == 1)
? () {}
: () {
Navigator.push(
context,
FadePage(
page: CMCPage(),
),
Texts(
TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
),
),
height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"),
imageName: 'emergency_service_image.png',
);
},
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: (model.user != null && model.user.outSA == 1)
? Container(
width: double.infinity,
height: double.infinity,
color: Colors.grey.withOpacity(0.7),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
: Column(
children: <Widget>[
Image.asset(
'assets/images/comprehensive_medical_checkup_logo.png',
width: 50,
height: 50,
),
SizedBox(
height: 10,
),
Texts(
TranslationBase.of(context).cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
)),
),
],
),
height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"),
imageName: 'emergency_service_image.png',
),
],
),
),
SizedBox(
height: 8,
),

Loading…
Cancel
Save