Skip to content

Commit 6aaaf42

Browse files
authored
Merge pull request #477 from OpenPecha/accu
feat : acumulation leaderboard and changes in the group page
2 parents 75beaaf + 2d1acf8 commit 6aaaf42

23 files changed

Lines changed: 2589 additions & 28 deletions

lib/core/config/protected_routes.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ class ProtectedRoutes {
6666
'/author/groups/{groupId}/join',
6767
'/author/groups/{groupId}/follow',
6868

69+
// Group accumulators (group prayer accumulations)
70+
'/group-accumulators/',
71+
6972
// Plans (public endpoints but may need auth for user-specific data)
7073
'/plans/{planId}',
7174
'/plans/{planId}/days/{dayNumber}',

lib/core/config/router/app_router.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:flutter_pecha/features/auth/presentation/screens/login_page.dart
1212
import 'package:flutter_pecha/features/auth/presentation/screens/splash_screen.dart';
1313
import 'package:flutter_pecha/features/calendar/presentation/screens/tibetan_calendar_screen.dart';
1414
import 'package:flutter_pecha/features/group_profile/domain/entities/group_profile.dart';
15+
import 'package:flutter_pecha/features/group_profile/presentation/screens/group_accumulator_screen.dart';
1516
import 'package:flutter_pecha/features/group_profile/presentation/screens/group_profile_screen.dart';
1617
import 'package:flutter_pecha/features/home/domain/entities/series.dart';
1718
import 'package:flutter_pecha/features/home/presentation/screens/main_navigation_screen.dart';
@@ -251,6 +252,21 @@ final appRouterProvider = Provider<GoRouter>((ref) {
251252
return GroupProfileScreen(groupId: groupId);
252253
},
253254
),
255+
GoRoute(
256+
path: "group-accumulator/:accumulatorId",
257+
name: "home-group-accumulator",
258+
parentNavigatorKey: rootNavigatorKey,
259+
builder: (context, state) {
260+
final accumulatorId =
261+
state.pathParameters['accumulatorId'] ?? '';
262+
final extra = state.extra as Map<String, dynamic>?;
263+
final groupTitle = extra?['groupTitle'] as String?;
264+
return GroupAccumulatorScreen(
265+
accumulatorId: accumulatorId,
266+
groupTitle: groupTitle,
267+
);
268+
},
269+
),
254270
GoRoute(
255271
path: "timers",
256272
name: "home-timers",

lib/core/constants/app_assets.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class AppAssets {
122122

123123
// ========== GROUP & SERIES ICONS ==========
124124
static const IconData usersThree = PhosphorIconsRegular.usersThree;
125+
static const IconData usercard = PhosphorIconsRegular.users;
125126
static const IconData bookOpenText = PhosphorIconsRegular.bookOpenText;
126127
static const IconData calendarDots = PhosphorIconsRegular.calendarDots;
127128
static const IconData arrowRight = PhosphorIconsRegular.arrowRight;

lib/core/l10n/app_en.arb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,21 @@
786786
"group_practice_with_us": "Practice with us",
787787
"group_change_practice_title": "Change group practice",
788788
"group_change_practice_message": "You are already practicing this plan with another group. Would you like to change your practice group?",
789+
"group_join_to_contribute": "Join to contribute",
790+
"group_accumulator_join_error": "Unable to join accumulation. Please try again.",
791+
"group_accumulator_participants": "{count} participants",
792+
"@group_accumulator_participants": {
793+
"placeholders": {
794+
"count": {
795+
"type": "int"
796+
}
797+
}
798+
},
799+
"group_accumulator_leaderboard": "Leaderboard",
800+
"group_accumulator_my_contributions": "My Contributions",
801+
"group_accumulator_recited": "Recited",
802+
"group_accumulator_total": "Total",
803+
"group_accumulator_contributions_empty": "Join this accumulation to track your contributions.",
789804
"@group_and_more_links": {
790805
"placeholders": {
791806
"count": {

lib/core/l10n/generated/app_localizations.dart

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,6 +2962,54 @@ abstract class AppLocalizations {
29622962
/// **'You are already practicing this plan with another group. Would you like to change your practice group?'**
29632963
String get group_change_practice_message;
29642964

2965+
/// No description provided for @group_join_to_contribute.
2966+
///
2967+
/// In en, this message translates to:
2968+
/// **'Join to contribute'**
2969+
String get group_join_to_contribute;
2970+
2971+
/// No description provided for @group_accumulator_join_error.
2972+
///
2973+
/// In en, this message translates to:
2974+
/// **'Unable to join accumulation. Please try again.'**
2975+
String get group_accumulator_join_error;
2976+
2977+
/// No description provided for @group_accumulator_participants.
2978+
///
2979+
/// In en, this message translates to:
2980+
/// **'{count} participants'**
2981+
String group_accumulator_participants(int count);
2982+
2983+
/// No description provided for @group_accumulator_leaderboard.
2984+
///
2985+
/// In en, this message translates to:
2986+
/// **'Leaderboard'**
2987+
String get group_accumulator_leaderboard;
2988+
2989+
/// No description provided for @group_accumulator_my_contributions.
2990+
///
2991+
/// In en, this message translates to:
2992+
/// **'My Contributions'**
2993+
String get group_accumulator_my_contributions;
2994+
2995+
/// No description provided for @group_accumulator_recited.
2996+
///
2997+
/// In en, this message translates to:
2998+
/// **'Recited'**
2999+
String get group_accumulator_recited;
3000+
3001+
/// No description provided for @group_accumulator_total.
3002+
///
3003+
/// In en, this message translates to:
3004+
/// **'Total'**
3005+
String get group_accumulator_total;
3006+
3007+
/// No description provided for @group_accumulator_contributions_empty.
3008+
///
3009+
/// In en, this message translates to:
3010+
/// **'Join this accumulation to track your contributions.'**
3011+
String get group_accumulator_contributions_empty;
3012+
29653013
/// No description provided for @share_this_quote.
29663014
///
29673015
/// In en, this message translates to:

lib/core/l10n/generated/app_localizations_bo.dart

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,34 @@ class AppLocalizationsBo extends AppLocalizations {
16361636
String get group_change_practice_message =>
16371637
'You are already practicing this plan with another group. Would you like to change your practice group?';
16381638

1639+
@override
1640+
String get group_join_to_contribute => 'Join to contribute';
1641+
1642+
@override
1643+
String get group_accumulator_join_error =>
1644+
'Unable to join accumulation. Please try again.';
1645+
1646+
@override
1647+
String group_accumulator_participants(int count) {
1648+
return '$count participants';
1649+
}
1650+
1651+
@override
1652+
String get group_accumulator_leaderboard => 'Leaderboard';
1653+
1654+
@override
1655+
String get group_accumulator_my_contributions => 'My Contributions';
1656+
1657+
@override
1658+
String get group_accumulator_recited => 'Recited';
1659+
1660+
@override
1661+
String get group_accumulator_total => 'Total';
1662+
1663+
@override
1664+
String get group_accumulator_contributions_empty =>
1665+
'Join this accumulation to track your contributions.';
1666+
16391667
@override
16401668
String get share_this_quote => 'གསུང་ཚིག་འདི་སྤེལ།';
16411669

lib/core/l10n/generated/app_localizations_en.dart

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,34 @@ class AppLocalizationsEn extends AppLocalizations {
16151615
String get group_change_practice_message =>
16161616
'You are already practicing this plan with another group. Would you like to change your practice group?';
16171617

1618+
@override
1619+
String get group_join_to_contribute => 'Join to contribute';
1620+
1621+
@override
1622+
String get group_accumulator_join_error =>
1623+
'Unable to join accumulation. Please try again.';
1624+
1625+
@override
1626+
String group_accumulator_participants(int count) {
1627+
return '$count participants';
1628+
}
1629+
1630+
@override
1631+
String get group_accumulator_leaderboard => 'Leaderboard';
1632+
1633+
@override
1634+
String get group_accumulator_my_contributions => 'My Contributions';
1635+
1636+
@override
1637+
String get group_accumulator_recited => 'Recited';
1638+
1639+
@override
1640+
String get group_accumulator_total => 'Total';
1641+
1642+
@override
1643+
String get group_accumulator_contributions_empty =>
1644+
'Join this accumulation to track your contributions.';
1645+
16181646
@override
16191647
String get share_this_quote => 'Share this quote';
16201648

lib/core/l10n/generated/app_localizations_hi.dart

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,6 +1628,34 @@ class AppLocalizationsHi extends AppLocalizations {
16281628
String get group_change_practice_message =>
16291629
'You are already practicing this plan with another group. Would you like to change your practice group?';
16301630

1631+
@override
1632+
String get group_join_to_contribute => 'Join to contribute';
1633+
1634+
@override
1635+
String get group_accumulator_join_error =>
1636+
'Unable to join accumulation. Please try again.';
1637+
1638+
@override
1639+
String group_accumulator_participants(int count) {
1640+
return '$count participants';
1641+
}
1642+
1643+
@override
1644+
String get group_accumulator_leaderboard => 'Leaderboard';
1645+
1646+
@override
1647+
String get group_accumulator_my_contributions => 'My Contributions';
1648+
1649+
@override
1650+
String get group_accumulator_recited => 'Recited';
1651+
1652+
@override
1653+
String get group_accumulator_total => 'Total';
1654+
1655+
@override
1656+
String get group_accumulator_contributions_empty =>
1657+
'Join this accumulation to track your contributions.';
1658+
16311659
@override
16321660
String get share_this_quote => 'यह उद्धरण शेयर करें';
16331661

lib/core/l10n/generated/app_localizations_mn.dart

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,34 @@ class AppLocalizationsMn extends AppLocalizations {
16321632
String get group_change_practice_message =>
16331633
'You are already practicing this plan with another group. Would you like to change your practice group?';
16341634

1635+
@override
1636+
String get group_join_to_contribute => 'Join to contribute';
1637+
1638+
@override
1639+
String get group_accumulator_join_error =>
1640+
'Unable to join accumulation. Please try again.';
1641+
1642+
@override
1643+
String group_accumulator_participants(int count) {
1644+
return '$count participants';
1645+
}
1646+
1647+
@override
1648+
String get group_accumulator_leaderboard => 'Leaderboard';
1649+
1650+
@override
1651+
String get group_accumulator_my_contributions => 'My Contributions';
1652+
1653+
@override
1654+
String get group_accumulator_recited => 'Recited';
1655+
1656+
@override
1657+
String get group_accumulator_total => 'Total';
1658+
1659+
@override
1660+
String get group_accumulator_contributions_empty =>
1661+
'Join this accumulation to track your contributions.';
1662+
16351663
@override
16361664
String get share_this_quote => 'Энэ ишлэлийг хуваалцах';
16371665

lib/core/l10n/generated/app_localizations_ne.dart

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1636,6 +1636,34 @@ class AppLocalizationsNe extends AppLocalizations {
16361636
String get group_change_practice_message =>
16371637
'You are already practicing this plan with another group. Would you like to change your practice group?';
16381638

1639+
@override
1640+
String get group_join_to_contribute => 'Join to contribute';
1641+
1642+
@override
1643+
String get group_accumulator_join_error =>
1644+
'Unable to join accumulation. Please try again.';
1645+
1646+
@override
1647+
String group_accumulator_participants(int count) {
1648+
return '$count participants';
1649+
}
1650+
1651+
@override
1652+
String get group_accumulator_leaderboard => 'Leaderboard';
1653+
1654+
@override
1655+
String get group_accumulator_my_contributions => 'My Contributions';
1656+
1657+
@override
1658+
String get group_accumulator_recited => 'Recited';
1659+
1660+
@override
1661+
String get group_accumulator_total => 'Total';
1662+
1663+
@override
1664+
String get group_accumulator_contributions_empty =>
1665+
'Join this accumulation to track your contributions.';
1666+
16391667
@override
16401668
String get share_this_quote => 'यो उद्धरण साझा गर्नुहोस्';
16411669

0 commit comments

Comments
 (0)