search field hidden for add procedure as two search field is visible, login with wrong cred will show the appropitate message, and discharge summary is not visible for the patient that does has any.

ipd-changes-for-vida-plus
parent 176bb33795
commit 725b9a12da

@ -171,6 +171,7 @@ class BaseAppClient {
}
if (parsed['IsAuthenticated'] != null && !parsed['IsAuthenticated']) {
if (body['OTP_SendType'] != null) {
if (parsed['ErrorCode'] == '699') {
onSuccess(parsed, statusCode);

@ -62,7 +62,7 @@ class AuthenticationService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: userInfo.toJson());
}, body: userInfo.toJson(), isAllowAny: true);
} catch (error) {
hasError = true;
super.error = error.toString();

@ -46,34 +46,36 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
headerWidget: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context).doctorName + ": ",
value: widget.dischargeSummary.createdByName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).branch + ": ",
value: widget.dischargeSummary.projectName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).clinicName + ": ",
value: widget.dischargeSummary.clinicName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).dischargeDate + ": ",
value: AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).day.toString() +
" " +
AppDateUtils.getMonth(AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).month).toString().substring(0, 3) +
' ' +
AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).year.toString(),
isCopyable: false,
),
],
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomRow(
label: TranslationBase.of(context).doctorName + ": ",
value: widget.dischargeSummary.createdByName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).branch + ": ",
value: widget.dischargeSummary.projectName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).clinicName + ": ",
value: widget.dischargeSummary.clinicName.toString() ?? "".toString(),
isCopyable: false,
),
CustomRow(
label: TranslationBase.of(context).dischargeDate + ": ",
value: AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).day.toString() +
" " +
AppDateUtils.getMonth(AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).month).toString().substring(0, 3) +
' ' +
AppDateUtils.getDateTimeFromServerFormat(widget.dischargeSummary.createdOn!).year.toString(),
isCopyable: false,
),
],
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
@ -89,6 +91,7 @@ class _DischargeSummaryWidgetState extends State<DischargeSummaryWidget> {
),
],
),
bodyWidget: Row(
children: [
Column(

@ -147,6 +147,7 @@ class _AddProcedurePageState extends State<AddProcedurePage> {
EntityListCheckboxSearchWidget(
model: widget.model,
masterList: model.categoriesList[0].entityList!,
shouldDisplaySearchField: false,
removeProcedure: (item) {
EntityList? itemToBeRemoved = entityList.firstWhere((element) => item.procedureId == element.procedureId, orElse: () => EntityList());
if (itemToBeRemoved.procedureId != null) {

@ -20,6 +20,7 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
final bool Function(EntityList) isEntityListSelected;
final List<EntityList> masterList;
Function(String val) selectedType;
final bool shouldDisplaySearchField;
EntityListCheckboxSearchWidget({
Key? key,
@ -30,6 +31,7 @@ class EntityListCheckboxSearchWidget extends StatefulWidget {
required this.addProcedure,
required this.isEntityListSelected,
required this.selectedType,
this.shouldDisplaySearchField = true,
}) : super(key: key);
@override
@ -231,59 +233,62 @@ class _EntityListCheckboxSearchWidgetState extends State<EntityListCheckboxSearc
child: ListView(
padding: EdgeInsets.all(12),
children: [
Padding(
padding: const EdgeInsets.only(bottom: 12.0),
child: AppTextFieldCustom(
suffixWidget: _isSearching
? Padding(
padding: const EdgeInsets.all(12.0),
child: SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD02127)),
Visibility(
visible: widget.shouldDisplaySearchField,
child: Padding(
padding: const EdgeInsets.only(bottom: 12.0),
child: AppTextFieldCustom(
suffixWidget: _isSearching
? Padding(
padding: const EdgeInsets.all(12.0),
child: SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor: AlwaysStoppedAnimation<Color>(Color(0xFFD02127)),
),
),
)
: InkWell(
onTap: () {
if (procedureName.text.length >= 3) {
widget.model.filterSearchResults(
procedureName.text, widget.masterList, items);
WidgetsBinding.instance.addPostFrameCallback((_) {
// if (mounted) {
// setState(() {});
// }
});
}
},
child: Icon(
Icons.search,
size: 25.0,
),
),
),
)
: InkWell(
onTap: () {
if (procedureName.text.length >= 3) {
widget.model.filterSearchResults(
procedureName.text, widget.masterList, items);
WidgetsBinding.instance.addPostFrameCallback((_) {
// if (mounted) {
// setState(() {});
// }
});
hintText: TranslationBase.of(context).searchProcedureHere,
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
hasBorder: true,
controller: procedureName,
onChanged: (value) {
_onSearchChanged(value ?? '');
},
onFieldSubmitted: () {
if (procedureName.text.length >= 3) {
widget.model.filterSearchResults(
procedureName.text, widget.masterList, items);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
setState(() {});
}
},
child: Icon(
Icons.search,
size: 25.0,
),
),
hintText: TranslationBase.of(context).searchProcedureHere,
isTextFieldHasSuffix: false,
maxLines: 1,
minLines: 1,
hasBorder: true,
controller: procedureName,
onChanged: (value) {
_onSearchChanged(value ?? '');
},
onFieldSubmitted: () {
if (procedureName.text.length >= 3) {
widget.model.filterSearchResults(
procedureName.text, widget.masterList, items);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (mounted) {
setState(() {});
});
}
});
}
},
),
},
),
),
),
if (items.isEmpty && procedureName.text.length >= 3)
Center(

Loading…
Cancel
Save