|
|
|
|
@ -1,24 +1,24 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/enum/view_state.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/procedure/procedure_template_details_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/procedure_View_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/patient/patiant_info_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/base/base_view.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/screens/patients/patient_search/patient_search_header.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/utils/utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/TextFields.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/buttons/app_buttons_widget.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/text_fields/TextFields.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
import '../../../config/config.dart';
|
|
|
|
|
|
|
|
|
|
class ProcedureCheckOutScreen extends StatefulWidget {
|
|
|
|
|
final List<ProcedureTempleteDetailsModel> items;
|
|
|
|
|
final ProcedureViewModel previousProcedureViewModel;
|
|
|
|
|
final ProcedureViewModel previousProcedureViewModel;
|
|
|
|
|
final PatiantInformtion patient;
|
|
|
|
|
final String addButtonTitle;
|
|
|
|
|
final String toolbarTitle;
|
|
|
|
|
@ -48,8 +48,8 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
backgroundColor: Color(0xffF8F8F8).withOpacity(0.9),
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
|
appBar: PatientSearchHeader(
|
|
|
|
|
title: widget.toolbarTitle ?? 'Add Procedure',
|
|
|
|
|
),
|
|
|
|
|
title: widget.toolbarTitle ?? 'Add Procedure',
|
|
|
|
|
),
|
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
@ -63,10 +63,11 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
itemCount: widget.items.length,
|
|
|
|
|
physics: BouncingScrollPhysics(),
|
|
|
|
|
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
final TextEditingController remarksControllerNew = TextEditingController(text: widget.items[index].remarks);
|
|
|
|
|
final TextEditingController remarksControllerNew =
|
|
|
|
|
TextEditingController(
|
|
|
|
|
text: widget.items[index].remarks);
|
|
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.only(bottom: 15.0),
|
|
|
|
|
@ -78,11 +79,13 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
initiallyExpanded: true,
|
|
|
|
|
title: Row(
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
|
child:
|
|
|
|
|
AppText(Utils.convertToTitleCase(widget.items[index].procedureName), fontWeight: FontWeight.w700,color: AppGlobal.appTextColor,
|
|
|
|
|
)),
|
|
|
|
|
child: AppText(
|
|
|
|
|
Utils.convertToTitleCase(
|
|
|
|
|
widget.items[index].procedureName),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: AppGlobal.appTextColor,
|
|
|
|
|
)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
children: [
|
|
|
|
|
@ -90,7 +93,8 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
@ -98,7 +102,8 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
padding: const EdgeInsets.symmetric(
|
|
|
|
|
horizontal: 11),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).orderType,
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.orderType,
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
color: Color(0xff2B353E),
|
|
|
|
|
),
|
|
|
|
|
@ -110,10 +115,11 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
value: 0,
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
groupValue: widget
|
|
|
|
|
.items[index].selectedType,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 0;
|
|
|
|
|
widget.items[index].selectedType =
|
|
|
|
|
0;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
@ -127,11 +133,12 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
),
|
|
|
|
|
Radio(
|
|
|
|
|
activeColor: Color(0xFFD02127),
|
|
|
|
|
groupValue:
|
|
|
|
|
widget.items[index].selectedType,
|
|
|
|
|
groupValue: widget
|
|
|
|
|
.items[index].selectedType,
|
|
|
|
|
value: 1,
|
|
|
|
|
onChanged: (value) {
|
|
|
|
|
widget.items[index].selectedType = 1;
|
|
|
|
|
widget.items[index].selectedType =
|
|
|
|
|
1;
|
|
|
|
|
setState(() {
|
|
|
|
|
widget.items[index].type =
|
|
|
|
|
value.toString();
|
|
|
|
|
@ -175,7 +182,6 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 90,
|
|
|
|
|
),
|
|
|
|
|
@ -196,7 +202,12 @@ class _ProcedureCheckOutScreenState extends State<ProcedureCheckOutScreen> {
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
await widget.previousProcedureViewModel.addProcedures(widget.previousProcedureViewModel, widget.items, widget.patient, remarksController, isLocalBusy: true);
|
|
|
|
|
await widget.previousProcedureViewModel.addProcedures(
|
|
|
|
|
widget.previousProcedureViewModel,
|
|
|
|
|
widget.items,
|
|
|
|
|
widget.patient,
|
|
|
|
|
remarksController,
|
|
|
|
|
isLocalBusy: true);
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|