Added Agent Details including Task Details
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import 'package:ac_web/Api/AcApi.dart';
|
||||
import 'package:ac_web/Api/Dtos/AgentDto.dart';
|
||||
import 'package:ac_web/Pages/AgentDetails.dart';
|
||||
import 'package:ac_web/Widgets/AgentStatusIndicator.dart';
|
||||
import 'package:ac_web/Widgets/AgentTypeIcons.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Fetches all agents from the AgentsController and lists them with a colored
|
||||
@@ -69,9 +71,20 @@ class _AgentAvailabilityColumnState extends State<AgentAvailabilityColumn>{
|
||||
leading: AgentStatusIndicator(status: agent.status),
|
||||
title: Text(agent.name),
|
||||
subtitle: Text("${agent.type.displayName} - ${agent.status.displayName}"),
|
||||
trailing: Icon(agent.type.icon),
|
||||
onTap: () => _openAgent(agent),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Opens a new page that shows all details of the given agent.
|
||||
void _openAgent(AgentDto agent) {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (context) => AgentDetails(agent: agent),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user