removed all add functionalities
This commit is contained in:
parent
50306ed759
commit
5889717efe
|
|
@ -75,18 +75,18 @@ class _CarePlanMenuScreenState extends State<CarePlanMenuScreen> {
|
|||
// const LineWidget(
|
||||
// text: "Key Contacts",
|
||||
// ),
|
||||
5.verticalSpace,
|
||||
LineWidget(
|
||||
text: "Care Notes",
|
||||
onItemTap: () {
|
||||
Navigator.pushNamed(
|
||||
controller.screenKey.currentContext!,
|
||||
CustomRouteNames.kCareNotesScreenRoute,
|
||||
arguments: CareNotesScreenArgs(
|
||||
serviceUserId: controller.serviceUser()!.id!),
|
||||
);
|
||||
},
|
||||
),
|
||||
// 5.verticalSpace,
|
||||
// LineWidget(
|
||||
// text: "Care Notes",
|
||||
// onItemTap: () {
|
||||
// Navigator.pushNamed(
|
||||
// controller.screenKey.currentContext!,
|
||||
// CustomRouteNames.kCareNotesScreenRoute,
|
||||
// arguments: CareNotesScreenArgs(
|
||||
// serviceUserId: controller.serviceUser()!.id!),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
5.verticalSpace,
|
||||
LineWidget(
|
||||
text: "Risk Assesments",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:ftc_mobile_app/utilities/extensions/custom_extensions.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/custom_app_bar_with_action.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
|
@ -33,11 +32,9 @@ class _ConsentAndCapacityQuestionnaireScreenState
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScaffold(
|
||||
// onBackButton: () => controller.backButtonPressed(context),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
// sideDrawer: const CustomDrawer(),
|
||||
showAppBar: true,
|
||||
appBar: _appBar(context),
|
||||
body: SafeArea(
|
||||
|
|
@ -104,20 +101,9 @@ class _ConsentAndCapacityQuestionnaireScreenState
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: "Consent And Capacity",
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () async {
|
||||
final result = await Navigator.pushNamed(
|
||||
context, CustomRouteNames.kConsentAndCapacityAddNewFormScreenRoute,
|
||||
arguments: ConsentAndCapacityAddNewFormScreenArgs(
|
||||
userData: widget.userData,
|
||||
));
|
||||
if (result is ConsentDetailsModel) {
|
||||
controller.consentDetailsList.insert(0, result);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:ftc_mobile_app/models/clients/HealthIssuesDetailsModel.dart';
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
import 'package:ftc_mobile_app/utilities/enums/body_parts.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/custom_app_bar_with_action.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/human_body_mapper_widget.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/my_circle_image.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
|
@ -111,16 +110,8 @@ class _CurrentHealthIssuesScreenState extends State<CurrentHealthIssuesScreen> {
|
|||
child: IssueDetailPopupWidget(
|
||||
userData: widget.userData,
|
||||
data: controller.issueBodyParts[b]!.data,
|
||||
onActionChange: (status, data) {
|
||||
if (data.status != status) {
|
||||
controller.updateHealthIssueStatus(
|
||||
bodyPoint: b, data: data, status: status);
|
||||
}
|
||||
},
|
||||
onUpdateButtonTap: (data) async {
|
||||
Get.back();
|
||||
onAddOrUpdateButtonTap(context, data);
|
||||
},
|
||||
canChangeStatus: false,
|
||||
canUpdate: false,
|
||||
),
|
||||
),
|
||||
]);
|
||||
|
|
@ -135,11 +126,9 @@ class _CurrentHealthIssuesScreenState extends State<CurrentHealthIssuesScreen> {
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: "Current Health Issues",
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () => onAddOrUpdateButtonTap(context),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,14 +11,18 @@ class IssueDetailPopupWidget extends StatefulWidget {
|
|||
super.key,
|
||||
required this.userData,
|
||||
required this.data,
|
||||
required this.onActionChange,
|
||||
required this.onUpdateButtonTap,
|
||||
this.canChangeStatus = true,
|
||||
this.canUpdate = true,
|
||||
this.onActionChange,
|
||||
this.onUpdateButtonTap,
|
||||
});
|
||||
|
||||
final UserData userData;
|
||||
final HealthIssueDetailsModel data;
|
||||
final Function(bool status, HealthIssueDetailsModel data) onActionChange;
|
||||
final Function(HealthIssueDetailsModel data) onUpdateButtonTap;
|
||||
final bool canChangeStatus;
|
||||
final bool canUpdate;
|
||||
final Function(bool status, HealthIssueDetailsModel data)? onActionChange;
|
||||
final Function(HealthIssueDetailsModel data)? onUpdateButtonTap;
|
||||
|
||||
static const actionActive = "Active";
|
||||
static const actionResolved = "Resolved";
|
||||
|
|
@ -91,98 +95,90 @@ class _IssueDetailPopupWidgetState extends State<IssueDetailPopupWidget> {
|
|||
? Colors.red.withOpacity(0.3)
|
||||
: Colors.green.withOpacity(0.3),
|
||||
),
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: DropdownButtonFormField(
|
||||
onTap: () {
|
||||
FocusScopeNode().unfocus();
|
||||
},
|
||||
value: selectedValue,
|
||||
dropdownColor: Colors.white,
|
||||
borderRadius: 4.toRadius(),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
border: InputBorder.none,
|
||||
suffixIcon: Icon(Icons.arrow_drop_down_sharp,
|
||||
size: 18,
|
||||
color: (selectedValue ==
|
||||
IssueDetailPopupWidget.actionActive)
|
||||
? Colors.red
|
||||
: Colors.green)
|
||||
.paddingOnly(right: 12.r),
|
||||
suffixIconConstraints: BoxConstraints.tightFor(
|
||||
width: 24.r, height: 32.r),
|
||||
// contentPadding: REdgeInsets.only(left: 0),
|
||||
),
|
||||
elevation: 4,
|
||||
icon: FrequentFunctions.noWidget,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 10.sp,
|
||||
color: Colors.black),
|
||||
hint: Text(
|
||||
"Select...",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.sp,
|
||||
color: CustomAppColors.kLightTextColor,
|
||||
child: IgnorePointer(
|
||||
ignoring: widget.canChangeStatus.not,
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: DropdownButtonFormField(
|
||||
onTap: () {
|
||||
FocusScopeNode().unfocus();
|
||||
},
|
||||
value: selectedValue,
|
||||
dropdownColor: Colors.white,
|
||||
borderRadius: 4.toRadius(),
|
||||
decoration: InputDecoration(
|
||||
isDense: true,
|
||||
border: InputBorder.none,
|
||||
suffixIcon: Icon(Icons.arrow_drop_down_sharp,
|
||||
size: 18,
|
||||
color: (selectedValue ==
|
||||
IssueDetailPopupWidget
|
||||
.actionActive)
|
||||
? Colors.red
|
||||
: Colors.green)
|
||||
.paddingOnly(right: 12.r),
|
||||
suffixIconConstraints: BoxConstraints.tightFor(
|
||||
width: 24.r, height: 32.r),
|
||||
),
|
||||
),
|
||||
selectedItemBuilder: (_) {
|
||||
return actionsMap.keys.map(
|
||||
(e) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: e,
|
||||
child: Container(
|
||||
// color: (selectedValue == e)
|
||||
// ? (selectedValue ==
|
||||
// IssueDetailPopupWidget
|
||||
// .actionActive)
|
||||
// ? Colors.red.withOpacity(0.3)
|
||||
// : Colors.green.withOpacity(0.3)
|
||||
// : Colors.white,
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
e,
|
||||
style: TextStyle(
|
||||
color: (selectedValue == e)
|
||||
? (selectedValue ==
|
||||
IssueDetailPopupWidget
|
||||
.actionActive)
|
||||
? Colors.red
|
||||
: Colors.green
|
||||
: Colors.black),
|
||||
elevation: 4,
|
||||
icon: FrequentFunctions.noWidget,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 10.sp,
|
||||
color: Colors.black),
|
||||
hint: Text(
|
||||
"Select...",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 12.sp,
|
||||
color: CustomAppColors.kLightTextColor,
|
||||
),
|
||||
),
|
||||
selectedItemBuilder: (_) {
|
||||
return actionsMap.keys.map(
|
||||
(e) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: e,
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
e,
|
||||
style: TextStyle(
|
||||
color: (selectedValue == e)
|
||||
? (selectedValue ==
|
||||
IssueDetailPopupWidget
|
||||
.actionActive)
|
||||
? Colors.red
|
||||
: Colors.green
|
||||
: Colors.black),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList();
|
||||
},
|
||||
items: actionsMap.keys
|
||||
.map(
|
||||
(e) => DropdownMenuItem<String>(
|
||||
value: e,
|
||||
child: Text(e),
|
||||
),
|
||||
);
|
||||
},
|
||||
).toList();
|
||||
},
|
||||
items: actionsMap.keys
|
||||
.map(
|
||||
(e) => DropdownMenuItem<String>(
|
||||
value: e,
|
||||
child: Text(e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
// padding: EdgeInsets.zero,
|
||||
isExpanded: true,
|
||||
// iconSize: 20.h,
|
||||
// icon: Padding(
|
||||
// padding: REdgeInsets.only(right: 0.0),
|
||||
// child: Icon(Icons.arrow_drop_down_sharp,
|
||||
// size: 18,
|
||||
// color: Colors.black),
|
||||
// ),
|
||||
onChanged: (v) {
|
||||
if (v != null) {
|
||||
setState(() {
|
||||
selectedValue = v;
|
||||
widget.onActionChange(
|
||||
actionsMap[v]!, widget.data);
|
||||
});
|
||||
}
|
||||
},
|
||||
)
|
||||
.toList(),
|
||||
// padding: EdgeInsets.zero,
|
||||
isExpanded: true,
|
||||
onChanged: (v) {
|
||||
if (v != null) {
|
||||
setState(() {
|
||||
selectedValue = v;
|
||||
|
||||
if (widget.onActionChange != null) {
|
||||
widget.onActionChange!
|
||||
.call(actionsMap[v]!, widget.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
|
@ -241,16 +237,21 @@ class _IssueDetailPopupWidgetState extends State<IssueDetailPopupWidget> {
|
|||
),
|
||||
),
|
||||
16.verticalSpace,
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: 120.r,
|
||||
height: 32.r,
|
||||
child: CustomAppButton(
|
||||
onTap: () => widget.onUpdateButtonTap(widget.data),
|
||||
buttonText: "Update",
|
||||
),
|
||||
),
|
||||
),
|
||||
(widget.canUpdate)
|
||||
? Center(
|
||||
child: SizedBox(
|
||||
width: 120.r,
|
||||
height: 32.r,
|
||||
child: CustomAppButton(
|
||||
onTap: (widget.onUpdateButtonTap == null)
|
||||
? () {}
|
||||
: () =>
|
||||
widget.onUpdateButtonTap!.call(widget.data),
|
||||
buttonText: "Update",
|
||||
),
|
||||
),
|
||||
)
|
||||
: FrequentFunctions.noWidget,
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:ftc_mobile_app/ftc_mobile_app.dart';
|
|||
import 'package:ftc_mobile_app/models/clients/documents_list_model.dart';
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/custom_app_bar_with_action.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/edit_icon.dart';
|
||||
import 'package:ftc_mobile_app/view/screens/clientsListing/widgets/search_bar_widget.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
|
@ -53,19 +52,19 @@ class _DocumentsListScreenState extends State<DocumentsListScreen> {
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: "Documents",
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () async {
|
||||
dynamic response = await Navigator.pushNamed(
|
||||
context, CustomRouteNames.kAddNewDocumentScreenRoute,
|
||||
arguments: controller.serviceUser.value);
|
||||
if (response is DocumentModel) {
|
||||
controller.documentsList.insert(0, response);
|
||||
controller.documentsList.refresh();
|
||||
}
|
||||
},
|
||||
// actionText: '+ Add New',
|
||||
// onActionTap: () async {
|
||||
// dynamic response = await Navigator.pushNamed(
|
||||
// context, CustomRouteNames.kAddNewDocumentScreenRoute,
|
||||
// arguments: controller.serviceUser.value);
|
||||
// if (response is DocumentModel) {
|
||||
// controller.documentsList.insert(0, response);
|
||||
// controller.documentsList.refresh();
|
||||
// }
|
||||
// },
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,16 +29,13 @@ class _PBSPlanScreenState extends State<PBSPlanScreen> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScaffold(
|
||||
// onBackButton: () => controller.onBackPress(context),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
// sideDrawer: const CustomDrawer(),
|
||||
showAppBar: true,
|
||||
appBar: _appBar(context),
|
||||
body: Column(
|
||||
children: [
|
||||
// SearchBarWidget(onSearchTextChange: (_) {}),
|
||||
Expanded(child: Obx(() {
|
||||
if (controller.pbsList.isEmpty) {
|
||||
return FrequentFunctions.centerText(text: "No data found");
|
||||
|
|
@ -52,11 +49,11 @@ class _PBSPlanScreenState extends State<PBSPlanScreen> {
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: "PBS Plan",
|
||||
actionText: '+ Add Form',
|
||||
onActionTap: _onAddNewTap,
|
||||
// actionText: '+ Add Form',
|
||||
// onActionTap: _onAddNewTap,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,17 +49,9 @@ class _PhotoGalleryScreenState extends State<PhotoGalleryScreen> {
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: 'Photo Gallery',
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () async {
|
||||
final result = await _gotoAddEditMemoryBoxScreen();
|
||||
|
||||
if (result == true) {
|
||||
controller.getMemoryList();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:ftc_mobile_app/dialogs/app_dialogs.dart';
|
|||
import 'package:ftc_mobile_app/models/clients/recent_incidents_model.dart';
|
||||
import 'package:ftc_mobile_app/models/profileData/user_data.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/custom_app_bar_with_action.dart';
|
||||
import 'package:ftc_mobile_app/view/custom_widgets/edit_icon.dart';
|
||||
import 'package:ftc_mobile_app/view/screens/clientsListing/widgets/search_bar_widget.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../ftc_mobile_app.dart';
|
||||
|
|
@ -31,11 +30,9 @@ class _RecentIncidentsScreenState extends State<RecentIncidentsScreen> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomScaffold(
|
||||
// onBackButton: () => controller.onBackPress(context),
|
||||
backgroundColor: CustomAppColors.kPrimaryColor,
|
||||
screenKey: controller.screenKey,
|
||||
onScreenTap: controller.removeFocus,
|
||||
// sideDrawer: const CustomDrawer(),
|
||||
showAppBar: true,
|
||||
appBar: _appBar(context),
|
||||
body: SafeArea(
|
||||
|
|
@ -88,20 +85,20 @@ class _RecentIncidentsScreenState extends State<RecentIncidentsScreen> {
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: "Recent Incidents",
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () async {
|
||||
dynamic result = await Navigator.pushNamed(
|
||||
context, CustomRouteNames.kAddNewRecentIncidentsScreenRoute,
|
||||
arguments: AddNewRecentIncidentsScreenArgs(
|
||||
userId: controller.serviceUser()!.id!));
|
||||
if (result is RecentIncidentsModel) {
|
||||
controller.recentIncidentsList.insert(0, result);
|
||||
controller.recentIncidentsList = controller.recentIncidentsList;
|
||||
}
|
||||
},
|
||||
// actionText: '+ Add New',
|
||||
// onActionTap: () async {
|
||||
// dynamic result = await Navigator.pushNamed(
|
||||
// context, CustomRouteNames.kAddNewRecentIncidentsScreenRoute,
|
||||
// arguments: AddNewRecentIncidentsScreenArgs(
|
||||
// userId: controller.serviceUser()!.id!));
|
||||
// if (result is RecentIncidentsModel) {
|
||||
// controller.recentIncidentsList.insert(0, result);
|
||||
// controller.recentIncidentsList = controller.recentIncidentsList;
|
||||
// }
|
||||
// },
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,20 +52,9 @@ class _RiskAssessmentsTemplateScreenState
|
|||
}
|
||||
|
||||
AppBar _appBar(BuildContext context) {
|
||||
return CustomAppBarWithAction(
|
||||
return CustomAppBarTitleOnly(
|
||||
context,
|
||||
titleText: 'Risk Assessments Template',
|
||||
actionText: '+ Add New',
|
||||
onActionTap: () async {
|
||||
final result = await Navigator.pushNamed(
|
||||
context, CustomRouteNames.kAddEditRiskAssessmentScreen,
|
||||
arguments: AddEditRiskAssessmentScreenArgs(
|
||||
userData: widget.userData,
|
||||
));
|
||||
if (result == true) {
|
||||
controller.getRiskAssessments();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue