|
|
|
|
@ -10,7 +10,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_s
|
|
|
|
|
import 'package:doctor_app_flutter/utils/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/dr_app_shared_pref.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/helpers.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
@ -23,7 +23,7 @@ import 'package:flutter/services.dart';
|
|
|
|
|
import 'package:hexcolor/hexcolor.dart';
|
|
|
|
|
import 'package:intl/intl.dart';
|
|
|
|
|
|
|
|
|
|
Helpers helpers = Helpers();
|
|
|
|
|
TabUtil helpers = TabUtil();
|
|
|
|
|
|
|
|
|
|
class AddPatientSickLeaveScreen extends StatefulWidget {
|
|
|
|
|
final appointmentNo;
|
|
|
|
|
@ -108,7 +108,7 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
height: 30,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: Helpers.getTextFieldHeight(),
|
|
|
|
|
height: TabUtil.getTextFieldHeight(),
|
|
|
|
|
hintText: TranslationBase.of(context).sickLeave +
|
|
|
|
|
' ' +
|
|
|
|
|
TranslationBase.of(context).days,
|
|
|
|
|
@ -138,9 +138,9 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: Helpers.getTextFieldHeight(),
|
|
|
|
|
height: TabUtil.getTextFieldHeight(),
|
|
|
|
|
onClick: () {
|
|
|
|
|
Helpers.hideKeyboard(context);
|
|
|
|
|
TabUtil.hideKeyboard(context);
|
|
|
|
|
_presentDatePicker();
|
|
|
|
|
},
|
|
|
|
|
hintText:
|
|
|
|
|
@ -170,7 +170,7 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
height: 5,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: Helpers.getTextFieldHeight(),
|
|
|
|
|
height: TabUtil.getTextFieldHeight(),
|
|
|
|
|
hintText: TranslationBase.of(context).clinic,
|
|
|
|
|
enabled: false,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
@ -223,7 +223,7 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: Helpers.getTextFieldHeight(),
|
|
|
|
|
height: TabUtil.getTextFieldHeight(),
|
|
|
|
|
hintText: TranslationBase.of(context).doctor,
|
|
|
|
|
enabled: false,
|
|
|
|
|
maxLines: 1,
|
|
|
|
|
@ -241,7 +241,7 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
AppTextFieldCustom(
|
|
|
|
|
height: Helpers.getTextFieldHeight(),
|
|
|
|
|
height: TabUtil.getTextFieldHeight(),
|
|
|
|
|
hintText: TranslationBase.of(context).remarks,
|
|
|
|
|
maxLines: 30,
|
|
|
|
|
minLines: 5,
|
|
|
|
|
@ -319,7 +319,7 @@ class _AddPatientSickLeaveScreenState extends State<AddPatientSickLeaveScreen> {
|
|
|
|
|
addSickLeave.appointmentNo = widget.patient.appointmentNo.toString();
|
|
|
|
|
await model.addSickLeave(addSickLeave);
|
|
|
|
|
if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
|
TabUtil.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
await widget.previousModel
|
|
|
|
|
.getSickLeaveForPatient(widget.patient, isLocalBusy: true);
|
|
|
|
|
|