added nevigation for project teams
This commit is contained in:
parent
c96aa42e81
commit
307b3ceb96
@ -14,6 +14,7 @@ import 'package:on_field_work/model/employees/employee_model.dart';
|
||||
import 'package:on_field_work/view/service_project/jobs_tab.dart';
|
||||
import 'package:on_field_work/helpers/widgets/my_refresh_indicator.dart';
|
||||
import 'package:on_field_work/helpers/widgets/pill_tab_bar.dart';
|
||||
import 'package:on_field_work/view/employees/employee_profile_screen.dart';
|
||||
|
||||
class ServiceProjectDetailsScreen extends StatefulWidget {
|
||||
final String projectId;
|
||||
@ -385,36 +386,44 @@ class _ServiceProjectDetailsScreenState
|
||||
const Divider(height: 20, thickness: 1),
|
||||
// List of team members inside this role card
|
||||
...teamMembers.map((team) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Avatar(
|
||||
firstName: team.employee.firstName,
|
||||
lastName: team.employee.lastName,
|
||||
size: 32,
|
||||
imageUrl:
|
||||
(team.employee.photo?.isNotEmpty ?? false)
|
||||
? team.employee.photo
|
||||
: null,
|
||||
),
|
||||
MySpacing.width(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
MyText.titleMedium(
|
||||
"${team.employee.firstName} ${team.employee.lastName}",
|
||||
fontWeight: 600,
|
||||
),
|
||||
MyText.bodySmall(
|
||||
"Status: ${team.isActive ? 'Active' : 'Inactive'}",
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
],
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// NAVIGATION TO EMPLOYEE DETAILS SCREEN
|
||||
Get.to(() => EmployeeProfilePage(
|
||||
employeeId: team.employee.id,
|
||||
));
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||
child: Row(
|
||||
children: [
|
||||
Avatar(
|
||||
firstName: team.employee.firstName,
|
||||
lastName: team.employee.lastName,
|
||||
size: 32,
|
||||
imageUrl:
|
||||
(team.employee.photo?.isNotEmpty ?? false)
|
||||
? team.employee.photo
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
MySpacing.width(12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
MyText.titleMedium(
|
||||
"${team.employee.firstName} ${team.employee.lastName}",
|
||||
fontWeight: 600,
|
||||
),
|
||||
MyText.bodySmall(
|
||||
"Status: ${team.isActive ? 'Active' : 'Inactive'}",
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user