|
|
|
@ -1,8 +1,12 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
@ -10,14 +14,24 @@ import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
class ContactLensPage extends StatelessWidget {
|
|
|
|
|
final ListHISGetContactLensPerscription listHISGetContactLensPerscription;
|
|
|
|
|
final int appointmentNo;
|
|
|
|
|
final String projectName;
|
|
|
|
|
final int projectID;
|
|
|
|
|
|
|
|
|
|
const ContactLensPage({Key key, this.listHISGetContactLensPerscription})
|
|
|
|
|
const ContactLensPage(
|
|
|
|
|
{Key key,
|
|
|
|
|
this.listHISGetContactLensPerscription,
|
|
|
|
|
this.appointmentNo,
|
|
|
|
|
this.projectName,
|
|
|
|
|
this.projectID})
|
|
|
|
|
: super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
return BaseView<EyeViewModel>(
|
|
|
|
|
builder: (_,model,w)=>
|
|
|
|
|
AppScaffold(
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15),
|
|
|
|
@ -39,16 +53,20 @@ class ContactLensPage extends StatelessWidget {
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
|
|
|
|
|
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
|
|
|
|
|
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
|
|
|
|
|
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
|
|
|
|
|
getRow(TranslationBase.of(context).brand,
|
|
|
|
|
'${listHISGetContactLensPerscription.brand}'),
|
|
|
|
|
getRow('B.C',
|
|
|
|
|
'${listHISGetContactLensPerscription.baseCurve}'),
|
|
|
|
|
getRow(TranslationBase.of(context).power,
|
|
|
|
|
'${listHISGetContactLensPerscription.power}'),
|
|
|
|
|
getRow(TranslationBase.of(context).diameter,
|
|
|
|
|
'${listHISGetContactLensPerscription.diameter}'),
|
|
|
|
|
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
|
|
|
|
|
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
|
|
|
|
|
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
|
|
|
|
|
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}'),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getRow(
|
|
|
|
|
'Blend', '${listHISGetContactLensPerscription.blend}'),
|
|
|
|
|
getRow(TranslationBase.of(context).reminder,
|
|
|
|
|
'${listHISGetContactLensPerscription.remarks}'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -71,27 +89,43 @@ class ContactLensPage extends StatelessWidget {
|
|
|
|
|
bold: true,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
|
|
|
|
|
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
|
|
|
|
|
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
|
|
|
|
|
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
|
|
|
|
|
getRow(TranslationBase.of(context).brand,
|
|
|
|
|
'${listHISGetContactLensPerscription.brand}'),
|
|
|
|
|
getRow('B.C',
|
|
|
|
|
'${listHISGetContactLensPerscription.baseCurve}'),
|
|
|
|
|
getRow(TranslationBase.of(context).power,
|
|
|
|
|
'${listHISGetContactLensPerscription.power}'),
|
|
|
|
|
getRow(TranslationBase.of(context).diameter,
|
|
|
|
|
'${listHISGetContactLensPerscription.diameter}'),
|
|
|
|
|
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
|
|
|
|
|
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
|
|
|
|
|
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
|
|
|
|
|
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}'),
|
|
|
|
|
getRow(
|
|
|
|
|
'Blend', '${listHISGetContactLensPerscription.blend}'),
|
|
|
|
|
getRow(TranslationBase.of(context).reminder,
|
|
|
|
|
'${listHISGetContactLensPerscription.remarks}'),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 17,
|
|
|
|
|
),
|
|
|
|
|
if(projectViewModel.havePrivilege(15))
|
|
|
|
|
if (projectViewModel.havePrivilege(15))
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase.of(context).sendEmail,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
color: Colors.red[700],
|
|
|
|
|
onTap: (){
|
|
|
|
|
showConfirmMessage(context, () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await model.sendContactLensPrescriptionEmail(
|
|
|
|
|
appointmentNo: appointmentNo,
|
|
|
|
|
projectName: projectName,
|
|
|
|
|
projectID: projectID);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
}, model.user.emailAddress);
|
|
|
|
|
},
|
|
|
|
|
icon: Icon(
|
|
|
|
|
Icons.email,
|
|
|
|
|
color: Colors.white,
|
|
|
|
@ -102,6 +136,7 @@ class ContactLensPage extends StatelessWidget {
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -130,4 +165,18 @@ class ContactLensPage extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void showConfirmMessage(
|
|
|
|
|
BuildContext context, GestureTapCallback onTap, String email) {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
child: ConfirmSendEmailDialog(
|
|
|
|
|
email: email,
|
|
|
|
|
onTapSendEmail: () {
|
|
|
|
|
onTap();
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|