Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a0f0a9e
setup for task invitation
anisha-e10 Jun 2, 2025
e7179ef
Merge remote-tracking branch 'origin/main' into anisha/invite-task
anisha-e10 Jun 6, 2025
4120230
callback and providers added
anisha-e10 Jun 6, 2025
8d412f7
callback added
anisha-e10 Jun 6, 2025
28c7557
view invited users list
anisha-e10 Jun 6, 2025
cdd29d0
text changes
anisha-e10 Jun 9, 2025
64bd50a
Merge remote-tracking branch 'refs/remotes/origin/main' into anisha/i…
anisha-e10 Jun 11, 2025
cf5e8b4
notifiers added
anisha-e10 Jun 11, 2025
1fd04d2
managed UI
anisha-e10 Jun 11, 2025
d5e331e
managed actions
anisha-e10 Jun 11, 2025
acd609d
invite and invited actions added when user is invited for task
anisha-e10 Jun 11, 2025
38516d0
modified code structure of task assignment and task invitations
anisha-e10 Jun 11, 2025
177129e
assignment and invitations test cases
anisha-e10 Jun 13, 2025
91e0739
notifier test added for task and invitations
anisha-e10 Jun 16, 2025
a544d49
task item test resolved
anisha-e10 Jun 16, 2025
4713403
user builder test added
anisha-e10 Jun 16, 2025
bd70ce5
space detail page test cases solved
anisha-e10 Jun 16, 2025
75da519
lint error
anisha-e10 Jun 16, 2025
bce5fcf
fix invitation item widget test cases mock data
anisha-e10 Jun 16, 2025
6b3910a
solved mock data
anisha-e10 Jun 16, 2025
10d3cb9
invite actions test added
anisha-e10 Jun 16, 2025
437b908
Merge remote-tracking branch 'origin/main' into anisha/invite-task
anisha-e10 Jun 16, 2025
a97f607
Merge remote-tracking branch 'refs/remotes/origin/main' into anisha/i…
anisha-e10 Jun 25, 2025
3422798
Merge remote-tracking branch 'refs/remotes/origin/main' into anisha/i…
anisha-e10 Jul 8, 2025
a7b9f53
Added view and notifier to check the user is invited or provide accep…
anisha-e10 Jul 8, 2025
f431b9d
text changes
anisha-e10 Jul 8, 2025
c0c3104
assign and unassign test cases added
anisha-e10 Jul 9, 2025
b4e338e
test cases added that cover all line of code
anisha-e10 Jul 9, 2025
beabef5
added test for accept and decline view
anisha-e10 Jul 9, 2025
be39519
task assignment widget remaining test added
anisha-e10 Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/lib/common/toolkit/menu_item_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class MenuItemWidget extends StatelessWidget {
final disabledColor = Theme.of(context).disabledColor;
return Card(
child: ListTile(
contentPadding: EdgeInsets.zero,
key: innerKey,
onTap: onTap,
visualDensity: visualDensity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@

class InviteIndividualUsers extends ConsumerWidget {
final String roomId;
final Task? task;
final bool isFullPageMode;

const InviteIndividualUsers({super.key, required this.roomId, this.isFullPageMode = true});
const InviteIndividualUsers({
super.key,
required this.roomId,
this.isFullPageMode = true,
this.task,
});

@override
Widget build(BuildContext context, WidgetRef ref) {
Expand Down Expand Up @@ -72,6 +78,7 @@
roomId: roomId,
userProfile: profile,
includeSharedRooms: isSuggestion,
task: task,

Check warning on line 81 in app/lib/features/invite_members/pages/invite_individual_users.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/invite_members/pages/invite_individual_users.dart#L81

Added line #L81 was not covered by tests
);
},
),
Expand Down
20 changes: 17 additions & 3 deletions app/lib/features/member/widgets/user_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
final bool includeSharedRooms;
final bool includeUserJoinState;
final VoidCallback? onTap;
final Task? task;

const UserBuilder({
super.key,
Expand All @@ -96,6 +97,7 @@
this.onTap,
this.includeSharedRooms = false,
this.includeUserJoinState = true,
this.task,
});

@override
Expand All @@ -121,7 +123,11 @@
if (!includeUserJoinState) return null;
return roomId.map((rId) {
final room = ref.watch(maybeRoomProvider(rId)).valueOrNull;
return room.map((r) => UserStateButton(userId: userId, room: r)) ??
return room.map((r) => UserStateButton(
userId: userId,

Check warning on line 127 in app/lib/features/member/widgets/user_builder.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/member/widgets/user_builder.dart#L126-L127

Added lines #L126 - L127 were not covered by tests
room: r,
task: task,

Check warning on line 129 in app/lib/features/member/widgets/user_builder.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/member/widgets/user_builder.dart#L129

Added line #L129 was not covered by tests
)) ??
const Skeletonizer(child: Text('user'));
});
}
Expand Down Expand Up @@ -207,14 +213,22 @@
class UserStateButton extends ConsumerWidget {
final String userId;
final Room room;
final Task? task;
Comment thread
anisha-e10 marked this conversation as resolved.

const UserStateButton({super.key, required this.room, required this.userId});
const UserStateButton({super.key, required this.room, required this.userId, this.task});

Future<void> _handleInvite(BuildContext context) async {
final lang = L10n.of(context);
EasyLoading.show(status: lang.invitingLoading(userId), dismissOnTap: false);
try {
await room.inviteUser(userId);
if (task != null) {
final invitationsManager = await task?.invitations();

Check warning on line 225 in app/lib/features/member/widgets/user_builder.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/member/widgets/user_builder.dart#L224-L225

Added lines #L224 - L225 were not covered by tests
Comment thread
anisha-e10 marked this conversation as resolved.
Outdated
if (invitationsManager != null) {
await invitationsManager.invite(userId);

Check warning on line 227 in app/lib/features/member/widgets/user_builder.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/member/widgets/user_builder.dart#L227

Added line #L227 was not covered by tests
}
} else {
await room.inviteUser(userId);

Check warning on line 230 in app/lib/features/member/widgets/user_builder.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/member/widgets/user_builder.dart#L230

Added line #L230 was not covered by tests
}
EasyLoading.dismiss();
} catch (e) {
// ignore: use_build_context_synchronously
Expand Down
22 changes: 17 additions & 5 deletions app/lib/features/tasks/pages/task_item_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,7 @@
isScrollControlled: true,
isDismissible: true,
builder:
(context) => Padding(
padding: const EdgeInsets.all(10),
child: Column(
(context) => Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
Expand All @@ -421,7 +419,6 @@
automaticallyImplyLeading: false,
title: Text(L10n.of(context).assignment),
),
const SizedBox(height: 10),
if (task.isAssignedToMe())
MenuItemWidget(
onTap: () {
Expand All @@ -445,9 +442,24 @@
iconData: PhosphorIconsLight.plus,
withMenu: false,
),
MenuItemWidget(
onTap: () {

Check warning on line 446 in app/lib/features/tasks/pages/task_item_detail_page.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/tasks/pages/task_item_detail_page.dart#L445-L446

Added lines #L445 - L446 were not covered by tests
context.pushNamed(
Routes.inviteIndividual.name,
queryParameters: {
'roomId': task.roomIdStr(),
},
extra: task,
);
Navigator.pop(context);
},

Check warning on line 455 in app/lib/features/tasks/pages/task_item_detail_page.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/tasks/pages/task_item_detail_page.dart#L450-L455

Added lines #L450 - L455 were not covered by tests
title: lang.inviteSomeoneElse,
withMenu: false,

Check warning on line 457 in app/lib/features/tasks/pages/task_item_detail_page.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/tasks/pages/task_item_detail_page.dart#L457

Added line #L457 was not covered by tests
iconData: Icons.send,
titleStyles: Theme.of(context).textTheme.bodyMedium,

Check warning on line 459 in app/lib/features/tasks/pages/task_item_detail_page.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/features/tasks/pages/task_item_detail_page.dart#L459

Added line #L459 was not covered by tests
),
],
),
),
);
}

Expand Down
4 changes: 3 additions & 1 deletion app/lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -3013,5 +3013,7 @@
"encryptionBackupDestroyAction": "Destroying",
"@encryptionBackupDestroyAction": {},
"dontForgetToStoreTheKeySecurely": "Don't forget to store your Encryption Backup Key securely",
"@dontForgetToStoreTheKeySecurely": {}
"@dontForgetToStoreTheKeySecurely": {},
"inviteSomeoneElse": "Invite someone else",
"@inviteSomeoneElse": {}
}
6 changes: 5 additions & 1 deletion app/lib/router/shell_routers/home_shell_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,13 @@
final roomId = state.uri.queryParameters['roomId'].expect(
'inviteIndividual route needs roomId as query param',
);
final task = state.extra as Task?;

Check warning on line 603 in app/lib/router/shell_routers/home_shell_router.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/router/shell_routers/home_shell_router.dart#L603

Added line #L603 was not covered by tests
return MaterialPage(
key: state.pageKey,
child: InviteIndividualUsers(roomId: roomId),
child: InviteIndividualUsers(

Check warning on line 606 in app/lib/router/shell_routers/home_shell_router.dart

View check run for this annotation

Codecov / codecov/patch

app/lib/router/shell_routers/home_shell_router.dart#L606

Added line #L606 was not covered by tests
roomId: roomId,
task: task,
),
);
},
),
Expand Down
Loading