UI_CHANGE_TICKET_CONVO

This commit is contained in:
venbaittech 2025-08-21 18:33:15 +05:30
parent 925e6e7624
commit 027e8942d3
2 changed files with 57 additions and 84 deletions

View File

@ -329,9 +329,7 @@ class _claimtracklistformState extends State<claimtracklist> {
flex: 11,
child: Row(
mainAxisAlignment:
Responsive.isDesktop(context)
? MainAxisAlignment.center
: MainAxisAlignment.start,
MainAxisAlignment.start,
children: [
Text(
policyType ?? '',
@ -366,47 +364,47 @@ class _claimtracklistformState extends State<claimtracklist> {
),
),
SizedBox(height: 15),
// Container(
// decoration: BoxDecoration(
// color: Color(
// 0xFFFFFCE5), // Set background color for the container
// borderRadius: BorderRadius.circular(
// 10), // Set border radius for the container
// ),
// padding: Responsive.isDesktop(context)
// ? EdgeInsets.only(
// top: 20,
// bottom: 20,
// left: 10,
// right: 10)
// : EdgeInsets.only(
// top: 10,
// bottom: 10,
// left: 10,
// right: 10),
// child: Column(
// children: [
// Row(
// children: [
// buildExpandedColumn(context,
// 'Subject', policySubject),
// ],
// ),
//
// SizedBox(
// height: 15,
// ),
// Row(
// children: [
// buildExpandedColumn(context,
// 'Message', policyMessage),
// ],
// ),
// // Add more rows as needed
// ],
// ),
// ),
// SizedBox(height: 15),
Container(
decoration: BoxDecoration(
color: Color(
0xFFFFFCE5), // Set background color for the container
borderRadius: BorderRadius.circular(
10), // Set border radius for the container
),
padding: Responsive.isDesktop(context)
? EdgeInsets.only(
top: 20,
bottom: 20,
left: 10,
right: 10)
: EdgeInsets.only(
top: 10,
bottom: 10,
left: 10,
right: 10),
child: Column(
children: [
Row(
children: [
buildExpandedColumn(context,
'Subject', policySubject),
],
),
SizedBox(
height: 15,
),
Row(
children: [
buildExpandedColumn(context,
'Message', policyMessage),
],
),
// Add more rows as needed
],
),
),
SizedBox(height: 15),
Container(
decoration: BoxDecoration(
// color: Color(
@ -770,7 +768,7 @@ class _claimtracklistformState extends State<claimtracklist> {
buildExpandedColumn(context, 'Policy No', policyName),
// buildExpandedColumn(context, 'Ticket Type', policyType),
buildExpandedColumn(context, 'Status', policyStatus),
buildExpandedColumn(context, 'Message', policyMessage),
// buildExpandedColumn(context, 'Message', policyMessage),
],
),
if (departmentID == '4') // Conditional check for policy_type
@ -837,14 +835,6 @@ class _claimtracklistformState extends State<claimtracklist> {
// buildExpandedColumn(context, 'Ticket Type', policyType),
],
),
if (policyType != "Sales") SizedBox(height: 20),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
buildExpandedColumn(context, 'Subject', policySubject),
buildExpandedColumn(context, 'Message', policyMessage),
],
),
if (departmentID == '4')
Column(
children: [

View File

@ -58,9 +58,9 @@ class _helpState extends State<help> {
List<dynamic> trackClaimsClosedList = [];
final Map<String, Color> statusColors = {
'Open': Colors.green,
'Answered': Colors.blue,
'Awaiting Reply': Colors.orange,
'Inprogress': Colors.yellow,
'In Progress': Colors.blue,
// 'Awaiting Reply': Colors.orange,
'Resolved': Colors.yellow,
'Closed': Colors.red,
};
@ -77,26 +77,13 @@ class _helpState extends State<help> {
_loadToken();
print('initState');
getTicketList();
// handleTicketRefrsh();
}
void handleTicketRefrsh() {
print('handleTicketRefrsh');
final args =
ModalRoute.of(context)?.settings.arguments as Map<String, dynamic>?;
if (args != null && args.containsKey('ticketTabSelected')) {
print('ARGSDATA');
setState(() {
tickets = args['ticketTabSelected']; // e.g. 0 from TicketForm
closedTrackActive = 1;
allClaimsActive = 1;
tickets = 0;
ticketsActive = 0;
isActive = false;
getTicketList();
});
Color getStatusColor(String? policyStatus) {
if (policyStatus != null && statusColors.containsKey(policyStatus)) {
return statusColors[policyStatus]!;
} else {
return Color(0xFF000000); // Default color for policyStatus text
}
}
@ -279,14 +266,6 @@ class _helpState extends State<help> {
}
}
Color getStatusColor(String? policyStatus) {
if (policyStatus != null && statusColors.containsKey(policyStatus)) {
return statusColors[policyStatus]!;
} else {
return Color(0xFF000000); // Default color for policyStatus text
}
}
void _openDialPad(String phoneNumber) async {
final url = 'tel:$phoneNumber';
if (await canLaunch(url)) {
@ -1497,6 +1476,7 @@ class _helpState extends State<help> {
var item = data[index];
// String claimsName = item['user_name'];
String claimsticket = item['thz_id'] ?? '';
String claimsSubject = item['subject'] ?? '';
String claimsDate = item['created_at'] ?? '';
String claimStatus = item['status'] ?? '';
@ -1593,7 +1573,8 @@ class _helpState extends State<help> {
CrossAxisAlignment.start,
children: [
Text(
claimsDepartmentName ?? '',
'$claimsDepartmentName($claimsticket)' ??
'',
textAlign: TextAlign.left,
style: GoogleFonts.poppins(
fontSize:
@ -1648,7 +1629,8 @@ class _helpState extends State<help> {
Container(
width: 100,
decoration: BoxDecoration(
color: statusColor,
// color: statusColor,
color: getStatusColor(claimStatus),
borderRadius: BorderRadius.circular(
50), // Border radius set to 50
),
@ -1663,6 +1645,7 @@ class _helpState extends State<help> {
? 12
: 10,
fontWeight: FontWeight.w400,
color: Colors
.white, // Text color against the background
),