WD: Displayed Allergy status along side its name.

flutter_3.16.0_zoom^2
taha.alam 10 months ago
parent c4328e9cbc
commit fbd0143d50

@ -1225,6 +1225,7 @@ const Map<String, Map<String, String>> localizedValues = {
"ar": "هل أنت متأكد من أنك تريد حذف التشخيص"
},
"activate": {"en": "Activate", "ar":"فعل"},
"stable": {"en": "Stable", "ar":"مستقر"},
"resolved": {"en": "Resolved", "ar":"تم الحل"},
"diagnosisAlreadyDeleted": {"en": "Diagnosis Already Deleted", "ar":"تم حذف التشخيص بالفعل"},
"diagnosisAlreadyResolved": {"en": "Diagnosis Already Resolved", "ar":"تم حل التشخيص بالفعل"},

@ -5,6 +5,7 @@ import 'package:doctor_app_flutter/core/model/SOAP/selected_items/my_selected_al
import 'package:doctor_app_flutter/screens/base/base_view.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/allergies/reactions_selection.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/subjective/chief_complaint/widgets/add_soap_item.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update_vida_plus/widgets/SoapDetailItem.dart';
import 'package:doctor_app_flutter/utils/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/utils/translations_delegate_base_utils.dart';
import 'package:doctor_app_flutter/utils/utils.dart';
@ -102,12 +103,24 @@ class _UpdateAllergiesWidgetState extends State<UpdateAllergiesWidgetVidaPlus> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
Row(
children: [
Expanded(
child: AppText(
selectedAllergy.allergyName!,
fontSize: 12,
fontWeight: FontWeight.w800,
letterSpacing: -0.48,
),
),
SizedBox(
width: 8,
),
Status(
status: (selectedAllergy.isActivePatientsAllergy == true ) ? TranslationBase.of(context).active : TranslationBase.of(context).resolved,
)
],
),
selectedAllergy.patientsAllergyReactionsDTOs!
.isNotEmpty &&
selectedAllergy.isActivePatientsAllergy!

@ -204,16 +204,23 @@ class Status extends StatelessWidget {
borderRadius: BorderRadius.circular(3),
),
// color: Color(0xFF359846),
color: (status.toLowerCase() == 'active' ||
status.toLowerCase() == 'stable')
color: (status.toLowerCase() ==
TranslationBase.of(context).active.toLowerCase() ||
status.toLowerCase() ==
TranslationBase.of(context).stable.toLowerCase())
? Color(0xFFD8E8DB)
: (status.toLowerCase() ==
TranslationBase.of(context).resolved.toLowerCase())
? Colors.lightBlue
: Color(0x98d02127),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
child: AppText(
status,
color: (status.toLowerCase() == 'active' ||
status.toLowerCase() == 'stable')
color: (status.toLowerCase() ==
TranslationBase.of(context).active.toLowerCase() ||
status.toLowerCase() ==
TranslationBase.of(context).stable.toLowerCase())
? Color(0xFF359846)
: Colors.white,
fontSize: 8,

@ -1185,6 +1185,7 @@ class TranslationBase {
localizedValues['onlyOfftimeHoliday']![locale.languageCode]!;
String get active => localizedValues['active']![locale.languageCode]!;
String get stable => localizedValues['stable']![locale.languageCode]!;
String get hold => localizedValues['hold']![locale.languageCode]!;

Loading…
Cancel
Save