|
|
|
@ -465,21 +465,30 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
if (projectViewModel.havePrivilege(64))
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? () {
|
|
|
|
|
onTap: (model.user != null && model.user.outSA == 1)
|
|
|
|
|
? () {}
|
|
|
|
|
: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: HomeHealthCarePage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: () {},
|
|
|
|
|
},
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? Column(
|
|
|
|
|
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',
|
|
|
|
@ -497,15 +506,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
size: 40,
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
@ -514,14 +514,22 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
),
|
|
|
|
|
if (projectViewModel.havePrivilege(65))
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: () => (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? getPharmacyToken(model)
|
|
|
|
|
: () {},
|
|
|
|
|
onTap: () =>
|
|
|
|
|
(model.user != null && model.user.outSA == 1) ? () {} : getPharmacyToken(model),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? Column(
|
|
|
|
|
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(
|
|
|
|
@ -545,15 +553,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
size: 40,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -562,21 +561,30 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
),
|
|
|
|
|
if (projectViewModel.havePrivilege(67))
|
|
|
|
|
DashboardItem(
|
|
|
|
|
onTap: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? () {
|
|
|
|
|
onTap: (model.user != null && model.user.outSA == 1)
|
|
|
|
|
? () {}
|
|
|
|
|
: () {
|
|
|
|
|
Navigator.push(
|
|
|
|
|
context,
|
|
|
|
|
FadePage(
|
|
|
|
|
page: CMCPage(),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
: () {},
|
|
|
|
|
},
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(15.0),
|
|
|
|
|
child: (projectViewModel.user != null && model.isLogin && model.user.outSA == 0)
|
|
|
|
|
? Column(
|
|
|
|
|
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',
|
|
|
|
@ -594,17 +602,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.55,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
height: double.infinity,
|
|
|
|
|
color: Colors.grey.withOpacity(0.7),
|
|
|
|
|
child: Icon(
|
|
|
|
|
Icons.lock_outline,
|
|
|
|
|
size: 40,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
height: MediaQuery.of(context).size.width * 0.4,
|
|
|
|
|
color: HexColor("#747C80"),
|
|
|
|
|