Skip to content

Commit

Permalink
added button color
Browse files Browse the repository at this point in the history
  • Loading branch information
naveen-egov committed Oct 6, 2023
1 parent 4679752 commit f3f27a6
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ class MdmsRepository {
}).toList();
newprojectType.cycles = element.cycles?.map((e) {
final newcycle = Cycles()
..id = e.id
..startDate = e.startDate
..endDate = e.endDate
..mandatoryWaitSinceLastCycleInDays =
e.mandatoryWaitSinceLastCycleInDays
..deliveries = e.deliveries?.map((ele) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class _HouseholdOverviewPageState
?.where((element) =>
element
.taskClientReferenceId ==
taskdata.first
taskdata.last
.clientReferenceId)
.toList()
: null;
Expand Down Expand Up @@ -484,8 +484,11 @@ class _HouseholdOverviewPageState
),
);
},
isNotEligible:
!checkEligibilityForAgeAndAdverseEvent(
isNotEligible: projectState
.projectType
?.cycles !=
null
? !checkEligibilityForAgeAndAdverseEvent(
DigitDOBAge(
years: ageInYears,
months: ageInMonths,
Expand All @@ -494,14 +497,15 @@ class _HouseholdOverviewPageState
.projectType,
(taskdata ?? [])
.isNotEmpty
? taskdata?.first
? taskdata?.last
: null,
adverseEventData,
) &&
!checkStatus(
taskdata,
currentCycle,
),
)
: false,
// TODO Need to handle the null check
name: e.name?.givenName ?? ' - ',
years: (e.dateOfBirth == null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,7 @@ class _ComplaintsInboxItem extends StatelessWidget {
complaint: item,
));
},
style: OutlinedButton.styleFrom(
side: BorderSide(
width: 1.0,
color: theme.colorScheme.secondary,
),
),
style: OutlinedButton.styleFrom(),
child: Text(
localizations.translate(i18.searchBeneficiary.iconLabel),
style: TextStyle(
Expand Down
2 changes: 0 additions & 2 deletions apps/health_campaign_field_worker_app/lib/utils/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,6 @@ bool checkStatus(
final isLastCycleRunning =
lastTaskCreatedTime >= currentCycle.startDate! &&
lastTaskCreatedTime <= currentCycle.endDate!;
print('isLastCycleRunning: $isLastCycleRunning');
print(lastTask.status == Status.partiallyDelivered.name);

return isLastCycleRunning
? lastTask.status == Status.partiallyDelivered.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,24 @@ class ActionCard extends StatelessWidget {

@override
Widget build(BuildContext context) {
final theme = Theme.of(context);

return Column(
mainAxisSize: MainAxisSize.min,
children: items
.map(
(e) => DigitOutlineIconButton(
buttonStyle: OutlinedButton.styleFrom(
backgroundColor: Colors.white,
side: BorderSide(
width: 1.0,
color: theme.colorScheme.secondary,
),
minimumSize: Size(
MediaQuery.of(context).size.width / 1.25,
50,
),
),
icon: e.icon,
label: e.label,
onPressed: e.action,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class _ViewBeneficiaryCardState extends LocalizedState<ViewBeneficiaryCard> {
? householdMember.adverseEvents
?.where((element) =>
element.taskClientReferenceId ==
taskdata.first.clientReferenceId)
taskdata.last.clientReferenceId)
.toList()
: null;
final ageInYears = DigitDateUtils.calculateAge(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import '../action_card/action_card.dart';
class MemberCard extends StatelessWidget {
final String name;
final String gender;
final int? years;
final int? months;
final int years;
final int months;
final bool isHead;
final IndividualModel individual;
final bool isDelivered;
Expand All @@ -35,7 +35,7 @@ class MemberCard extends StatelessWidget {
required this.individual,
required this.name,
required this.gender,
this.years,
required this.years,
this.isHead = false,
this.months = 0,
required this.localizations,
Expand Down Expand Up @@ -140,7 +140,7 @@ class MemberCard extends StatelessWidget {
),
Expanded(
child: Text(
" | ${years ?? '-'} ${localizations.translate(i18.memberCard.deliverDetailsYearText)} ${months ?? '-'} ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}",
" | $years ${localizations.translate(i18.memberCard.deliverDetailsYearText)} $months ${localizations.translate(i18.memberCard.deliverDetailsMonthsText)}",
style: theme.textTheme.bodyMedium,
),
),
Expand Down Expand Up @@ -237,6 +237,10 @@ class MemberCard extends StatelessWidget {
),
buttonStyle: OutlinedButton.styleFrom(
backgroundColor: Colors.white,
side: BorderSide(
width: 1.0,
color: theme.colorScheme.secondary,
),
minimumSize: Size(
MediaQuery.of(context).size.width / 1.15,
50,
Expand All @@ -253,6 +257,10 @@ class MemberCard extends StatelessWidget {
),
buttonStyle: OutlinedButton.styleFrom(
backgroundColor: Colors.white,
side: BorderSide(
width: 1.0,
color: theme.colorScheme.secondary,
),
minimumSize: Size(
MediaQuery.of(context).size.width / 1.25,
50,
Expand Down Expand Up @@ -326,6 +334,10 @@ class MemberCard extends StatelessWidget {
),
buttonStyle: OutlinedButton.styleFrom(
backgroundColor: Colors.white,
side: BorderSide(
width: 1.0,
color: theme.colorScheme.secondary,
),
minimumSize: Size(
MediaQuery.of(context).size.width / 1.25,
50,
Expand Down

0 comments on commit f3f27a6

Please sign in to comment.