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

View File

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