FIX_codecommit

This commit is contained in:
sanjeev.p 2026-02-05 11:31:38 +05:30
parent ab55141a17
commit 3735df9411
11 changed files with 529 additions and 38 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,8 +5,8 @@ class Env {
);
static const String apiUrl = String.fromEnvironment(
'API_URL',
defaultValue: 'https://partner.nhanceindia.in/partner_api/api/', /* Live build (enable index.html line 18) */
// defaultValue: 'https://venbait.in/nhance/partner/dev/api/', /* Test build (enable index.html line 19) */
// defaultValue: 'https://partner.nhanceindia.in/partner_api/api/', /* Live build (enable index.html line 18) */
defaultValue: 'https://venbait.in/nhance/partner/dev/api/', /* Test build (enable index.html line 19) */
// defaultValue: 'http://localhost/nhance_partner_be/', /* localhost build (enable index.html line 19) */
);
// static const String baseUrl = String.fromEnvironment(
@ -18,3 +18,36 @@ class Env {
defaultValue: 'nhance-partner-2025-signature-35468846JRhH551HK',
);
}
// class Env {
//
// static const String App_Signature = String.fromEnvironment(
// 'App_Signature',
// defaultValue: 'nhance-partner-2025-signature-35468846JRhH551HK',
// );
//
// static const String env = String.fromEnvironment('ENV', defaultValue: 'dev');
//
// static String get apiUrl {
// switch (env) {
// case 'prod':
// return 'https://partner.nhanceindia.in/partner_api/api/';
// case 'test':
// return 'https://venbait.in/nhance/partner/dev/api/';
// default:
// return 'https://localhost/api/';
// }
// }
//
// static String get baseHref {
// switch (env) {
// case 'prod':
// return '/partner/';
// case 'test':
// return '/nhance/partner/app/';
// default:
// return '/localhost/partner/app/';
// }
// }
//
// }

View File

@ -2218,7 +2218,7 @@ class ApiService {
// '${Env.apiUrl}audit/history?table_name=partner_policy&pk=${id ?? ''}',
// );
final url = Uri.parse(
'${Env.apiUrl}audit/history?table_name==${table ?? ''}&pk=${id ?? ''}',
'${Env.apiUrl}audit/history?table_name=${table ?? ''}&pk=${id ?? ''}',
);
final headers = {

View File

@ -288,7 +288,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
filteredData = getStaffData.where((item) {
// final isActiveStatus = item['is_active'] == "1" ? "active" : "inactive";
return (_formatDate(item['created_on']) ?? '-').toLowerCase().contains(
return (_formatDate(item['enquiry_created_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
(_formatDate(item['updated_on']) ?? '-').toLowerCase().contains(
@ -555,7 +555,8 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
// headers: [],
displayHeaders: [
"S.No.",
"Received Date & Time",
// "Received Date & Time",
"Received Date",
"Vehicle.No.",
"Insurer",
"Updated Date",
@ -564,7 +565,8 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
],
keys: [
"sno", // handled internally as i + 1
"created_on",
// "created_on",
"enquiry_created_on",
"reg_no",
"insurer_name",
"updated_on",
@ -660,6 +662,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
Expanded(
flex: 3,
child: Text('Received Date', style: _headerStyle),
// child: Text('Enquiry Created Date', style: _headerStyle),
),
Expanded(
@ -774,7 +777,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
Expanded(
flex: 3,
child: Text(
_formatDate(item['created_on']) ?? '-',
_formatDate(item['enquiry_created_on']) ?? '-',
style: _dataBold,
),
),
@ -1035,9 +1038,10 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Received Date & Time", style: _cardheaderStyle),
Text('Received Date', style: _cardheaderStyle),
// Text("Received Date & Time", style: _cardheaderStyle),
Text(
_formatDate(item['created_on']) ?? '-',
_formatDate(item['enquiry_created_on']) ?? '-',
style: _cardBodyStyle,
),
],

View File

@ -32,6 +32,7 @@ import '../../providers/userRoleProvider.dart';
import '../../themes/indicators/customizd_file_upload.dart';
import '../../themes/indicators/export_btn.dart';
import '../../themes/indicators/input_field_decoration.dart';
import '../../themes/indicators/date_field_theme.dart';
import '../../themes/indicators/search_field_theme.dart';
import '../../themes/indicators/text_field_theme.dart';
import '../../themes/indicators/text_field_theme_inline_editor.dart'
@ -81,6 +82,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
'address',
'regNo',
'remarks',
'enquiry_created_on', // 👈 Add this line
];
Map<int, bool> isEditingRow = {};
@ -133,7 +135,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
// "id_proof_file_name": "id_proof.pdf",
// "previous_policy_file_name": "previous_policy.pdf",
"remarks": controllers["remarks"]?.text,
"enquiry_created_on" : controllers["enquiry_created_on"]?.text,
"assigned_to": selectedStaff,
"insurer_id": selectedInsurer,
"broker_id": selectedBroker,
@ -525,6 +527,12 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
(_formatDate(item['created_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
(_formatDate(item['enquiry_created_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
// (_formatDate(item['created_on']) ?? '-').toLowerCase().contains(
// query.toLowerCase(),
// ) ||
(_formatDate(item['updated_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
@ -623,6 +631,13 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
managerId = item['manager_id'];
controllers["regNo"]?.text = item['reg_no'];
controllers["remarks"]?.text = item['remarks'];
// Handle the date formatting for the controller
if (item['enquiry_created_on'] != null) {
DateTime dt = DateTime.parse(item['enquiry_created_on'].toString());
controllers['enquiry_created_on']!.text = DateFormat('dd-MM-yyyy').format(dt);
} else {
controllers['enquiry_created_on']!.text = '';
}
setState(() {});
@ -789,7 +804,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
hintText: "Search Staff ...",
hintText: " IO Search Staff ...",
hintStyle: GoogleFonts.inter(fontSize: 12, color: Colors.black),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white), // 👈 Normal border
@ -1262,6 +1277,60 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
);
}
// Widget buildEnquiryCreatedOn(BuildContext context) {
// return Container(
// width: 150, // Set a specific width for the table cell
// child: ThemedDateField(
// controller: controllers['enquiry_created_on'],
// hintText: "Select Date",
// borderColor: Colors.black,
// // Pass the date back to your item or state
// onDateSelected: (DateTime pickedDate) {
// setState(() {
// // Format it back to your backend requirement if needed
// String formatted = DateFormat('dd-MM-yyyy').format(pickedDate);
// controllers['enquiry_created_on']!.text = formatted;
// });
// },
// ),
// );
// }
// Widget buildEnquiryCreatedOn(BuildContext context) {
// return SizedBox(
// width: 140, // Adjust width to fit the column
// height: 35, // Standardized height for your inline edit row
// child: ThemedDateField(
// controller: controllers['enquiry_created_on'],
// hintText: "Select Date",
// borderColor: Colors.black,
// onDateSelected: (DateTime pickedDate) {
// setState(() {
// // Store only the date part in the controller
// String formatted = DateFormat('dd-MM-yyyy').format(pickedDate);
// controllers['enquiry_created_on']!.text = formatted;
// });
// },
// ),
// );
// }
Widget buildEnquiryCreatedOn(BuildContext context) {
return SizedBox(
height: 35,
width: 140, // Give it a fixed width so it doesn't disappear in the table
child: ThemedDateField(
controller: controllers['enquiry_created_on'],
hintText: "Select Date",
borderColor: Colors.black,
onDateSelected: (DateTime pickedDate) {
setState(() {
String formatted = DateFormat('dd-MM-yyyy').format(pickedDate);
controllers['enquiry_created_on']!.text = formatted;
});
},
),
);
}
Widget buildVehicleNumber(BuildContext context) {
return ThemedFormInlineField(
controller: controllers['regNo']!,
@ -2187,7 +2256,10 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
data: filteredData,
txt: !ResponsiveLayout.isMobile(context) ? true : false,
displayHeaders: [
"Received Date & Time",
// "Received Date & Time",
"Received Date",
// "Created Date & Time",
// "Enquiry Created Date",
"Partner",
"Assigned To",
"Insurer",
@ -2200,7 +2272,8 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
"Status",
],
keys: [
"created_on",
// "created_on",
"enquiry_created_on",
"agent_name",
"assigned_to_name",
"insurer_name",
@ -2248,7 +2321,7 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
// Create a new empty row data
final newRow = {
'id': newId.toString(), // Keep as String for consistency
'created_on': '',
'enquiry_created_on': '',
'agent_name': '',
'agent_id': '',
'assigned_to_name': '',
@ -2514,16 +2587,23 @@ class EnquiryHandlerState extends ConsumerState<EnquiryListHandler> {
// DataCell(Text('$sno', style: _dataBold)),
// Created On
// DataCell(
// Row(
// children: [
// // Text(item['created_on'], style: _dataBold),
// Text(
// formatDateTimeForTable(item['created_on'], newLine: true),
// style: _dataBold,
// ),
// ],
// ),
// ),
// Enquiry Created On
DataCell(
Row(
children: [
// Text(item['created_on'], style: _dataBold),
Text(
formatDateTimeForTable(item['created_on'], newLine: true),
style: _dataBold,
),
],
),
editing
? buildEnquiryCreatedOn(context)
: Text(item['enquiry_created_on'] ?? '-', style: _dataBold),
),
// Agent Name

View File

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:intl/intl.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../../../../core/services/api_service.dart';
@ -16,6 +17,7 @@ import '../../../themes/indicators/input_field_decoration.dart';
import '../../../themes/indicators/text_field_theme.dart';
import '../../../themes/indicators/text_field_theme_inline_editor.dart'
hide UpperCaseTextFormatter;
import '../../../themes/indicators/date_field_theme.dart';
class SubRowWidget extends ConsumerStatefulWidget {
final String selectId;
@ -421,6 +423,7 @@ class _SubRowWidgetState extends ConsumerState<SubRowWidget> {
spacing: 12,
runSpacing: 12,
children: [
buildEnquiryCreatedOn(context),
buildSelectStaffMem(context),
buildAgentName(context, fromHeader: false),
buildInsurer(context),
@ -474,6 +477,88 @@ class _SubRowWidgetState extends ConsumerState<SubRowWidget> {
);
}
Widget buildEnquiryCreatedOn(BuildContext context) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Received Date', style: _subLabelTimeStyle),
SizedBox(height: 5),
SizedBox(
width: MediaQuery.of(context).size.width * 0.10,
child: Stack(
alignment: Alignment.centerRight,
children: [
// 🔹 Your existing field
ThemedFormField(
controller: controllers['enquiry_created_on']!,
hintText: 'Select Date',
borderColor: Color(0XFF6366F1),
textColr: Color(0XFF6366F1),
enableBorderWidth: 0.5,
bordedRad: 5,
errFieldHgt: 10,
errFieldFont: 0,
isdense: true,
readOnly: true,
validator: (value) {
if (fieldErrors['enquiry_created_on'] != null &&
fieldErrors['enquiry_created_on']!.isNotEmpty) {
return fieldErrors['enquiry_created_on'];
}
return Validators.requiredField(
value, "enquiry created on");
},
),
// 🔥 Independent calendar button
Positioned(
right: 4,
child: InkWell(
onTap: () async {
await _pickDate(context);
},
child: Padding(
padding: const EdgeInsets.all(6.0),
child: Icon(
Icons.calendar_month,
color: Color(0XFF6366F1),
size: 18,
),
),
),
),
],
),
),
],
);
}
Future<void> _pickDate(BuildContext context) async {
DateTime? picked = await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(1900),
lastDate: DateTime(2100),
);
if (picked != null) {
setState(() {
String formatted =
DateFormat('dd-MM-yyyy').format(picked);
controllers['enquiry_created_on']!.text = formatted;
// clear error after select
fieldErrors['enquiry_created_on'] = '';
});
}
}
Widget buildAgentName(BuildContext context, {fromHeader = true}) {
Map<String, dynamic>? selectedAgntName = filteredAgentData.firstWhere(
(item) => item['id'].toString() == widget.selectedAgent,

View File

@ -119,6 +119,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
'address',
'regNo',
'remarks',
'enquiry_created_on',
];
String formRebuildKey = UniqueKey().toString();
@ -194,6 +195,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// "id_proof_file_name": "id_proof.pdf",
// "previous_policy_file_name": "previous_policy.pdf",
"remarks": controllers["remarks"]?.text,
"enquiry_created_on": controllers["enquiry_created_on"]?.text,
"assigned_to": selectedStaff,
"insurer_id": selectedInsurer,
"broker_id": selectedBroker,
@ -908,7 +910,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
_s(map['enquiry_status']),
_s(map['insurance_plan_type']),
_s(map['status']),
_s(_formatDate(map['created_on'])),
_s(_formatDate(map['enquiry_created_on'])),
// _s(_formatDate(map['created_on'])),
_s(_formatDate(map['updated_on'])),
];
@ -990,8 +993,11 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
item['enquiry_status']?.toLowerCase() == 'assigned' &&
item['quotation_id'] != null) ||
safeString(
_formatDate(item['created_on']),
_formatDate(item['enquiry_created_on']),
).toLowerCase().contains(q) ||
// safeString(
// _formatDate(item['created_on']),
// ).toLowerCase().contains(q) ||
safeString(
_formatDate(item['updated_on']),
).toLowerCase().contains(q);
@ -1166,9 +1172,12 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
(item['broker_name'] ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
(_formatDate(item['created_on']) ?? '-').toLowerCase().contains(
(_formatDate(item['enquiry_created_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
// (_formatDate(item['created_on']) ?? '-').toLowerCase().contains(
// query.toLowerCase(),
// ) ||
(_formatDate(item['updated_on']) ?? '-').toLowerCase().contains(
query.toLowerCase(),
) ||
@ -1291,6 +1300,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
managerId = item['manager_id'];
controllers["regNo"]?.text = item['reg_no'];
controllers["remarks"]?.text = item['remarks'];
controllers["enquiry_created_on"]?.text = item['enquiry_created_on'];
selectedInsurer = item['insurer_id'];
selectedStaff = item['assigned_to'];
@ -1420,6 +1430,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
// "id_proof_file_name": "id_proof.pdf",
// "previous_policy_file_name": "previous_policy.pdf",
"remarks": controllers["remarks"]?.text,
"enquiry_created_on" : controllers["enquiry_created_on"]?.text,
"manager_id": managerId,
"created_by": userId,
};
@ -2088,7 +2099,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
data: filteredData,
txt: !ResponsiveLayout.isMobile(context) ? true : false,
displayHeaders: [
"Received Date & Time",
// "Received Date & Time",
// "Created Date & Time",
"Received Date",
"Assigned To",
"Partner Code",
"Partner Name",
@ -2103,7 +2116,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
"Status",
],
keys: [
"created_on",
// "created_on",
"enquiry_created_on",
"assigned_to_name",
"agent_code",
"agent_name",
@ -2492,6 +2506,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
List<DataColumn> _buildDataColumns() {
return [
DataColumn(label: Text('Received Date', style: _headerStyle)),
// DataColumn(label: Text('Enquiry Created Date', style: _headerStyle)),
DataColumn(label: Text('Assigned To', style: _headerStyle)),
DataColumn(label: Text('Partner', style: _headerStyle)),
@ -2516,6 +2531,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
child: Row(
children: [
_buildHeaderCell('Received Date', 110),
// _buildHeaderCell('Enquiry Created Date', 110),
_buildHeaderCell('Assigned To', 110),
_buildHeaderCell('Partner', 100),
@ -3235,12 +3251,12 @@ class EnquiryStaffState extends ConsumerState<EnquiryListStaffInline> {
return DataRow(
cells: [
// Received Date
// Enquiry Created Date
DataCell(
SizedBox(
width: 70,
child: Text(
formatDateTimeForTable(item['created_on'], newLine: true),
item['enquiry_created_on'],
style: _dataBoldthm1,
),
),

View File

@ -866,7 +866,8 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
data: filteredData,
txt: !ResponsiveLayout.isMobile(context) ? true : false,
displayHeaders: [
"Received Date & Time",
// "Received Date & Time",
"Received Date",
"Partner",
"Assigned To",
"Insurer",
@ -876,7 +877,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
"Status",
],
keys: [
"created_on",
"enquiry_created_on",
"agent_name",
"assigned_to_name",
"insurer_name",
@ -944,6 +945,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
children: [
const Expanded(
flex: 2,
// child: Text('Enquiry Created Date', style: _headerStyle),
child: Text('Received Date', style: _headerStyle),
),
const Expanded(
@ -1043,7 +1045,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
Expanded(
flex: 2,
child: Text(
_formatDate(item['created_on']) ?? '-',
_formatDate(item['enquiry_created_on']) ?? '-',
style: _dataBold,
softWrap: true,
maxLines: 3,

View File

@ -927,6 +927,15 @@ class _policyValidationState extends ConsumerState<policyValidation> {
return; // 🛑 STOP: Does not proceed to API call
}
// Show the dialog and wait for the result
final bool confirmed = await _confirmChange(context);
// Logic: If 'Cancel' was pressed (false), stop execution here
if (!confirmed) {
debugPrint("User cancelled submission");
return;
}
final payload = {"id": policyId, ...dataDetails(), "updated_by": userId};
if (!mounted) return;
@ -1043,6 +1052,257 @@ class _policyValidationState extends ConsumerState<policyValidation> {
) ?? false;
}
// Future<bool> _confirmChange(BuildContext context) async {
// return await showDialog<bool>(
// context: context,
// barrierDismissible: false,
// builder: (context) => AlertDialog(
// contentPadding: EdgeInsets.zero, // Allows inner containers to touch edges
// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
// content: Column(
// mainAxisSize: MainAxisSize.min,
// children: [
// // --- Top Section: Content with Green Sidebar ---
// Container(
// // decoration: const BoxDecoration(
// // color: Colors.white,
// // borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
// // border: Border(
// // left: BorderSide(color: Color(0xFF00C853), width: 6), // Green accent
// // ),
// // ),
// padding: const EdgeInsets.all(24),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Row(
// children: [
// // Icon Container
// Container(
// padding: const EdgeInsets.all(6),
// decoration: BoxDecoration(
// color: const Color(0xFFE8F5E9),
// borderRadius: BorderRadius.circular(8),
// ),
// child: const Icon(Icons.check_circle_outline,
// color: Color(0xFF00C853), size: 28),
// ),
// const SizedBox(width: 12),
// Text(
// "Action Required",
// style: GoogleFonts.poppins(
// fontWeight: FontWeight.bold,
// fontSize: 18,
// color: Colors.black87,
// ),
// ),
// ],
// ),
// const SizedBox(height: 20),
// _bulletItem("Please review your changes before submitting."),
// const SizedBox(height: 12),
// _bulletItem("Changes cannot be made after submission."),
// ],
// ),
// ),
//
// // --- Bottom Section: Buttons with Gray Background ---
// Container(
// padding: const EdgeInsets.all(16),
// decoration: const BoxDecoration(
// color: Color(0xFFE5EAE9), // Light gray background for footer
// borderRadius: BorderRadius.vertical(bottom: Radius.circular(16)),
// ),
// child: Row(
// children: [
// Expanded(
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// backgroundColor: const Color(0xFFF5F5F5),
// foregroundColor: Colors.grey[700],
// elevation: 0,
// padding: const EdgeInsets.symmetric(vertical: 14),
// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
// ),
// onPressed: () => Navigator.pop(context, false),
// child: const Text("Cancel", style: TextStyle(fontWeight: FontWeight.bold)),
// ),
// ),
// const SizedBox(width: 12),
// Expanded(
// child: ElevatedButton(
// style: ElevatedButton.styleFrom(
// backgroundColor: const Color(0xFF13B156),
// foregroundColor: Colors.white,
// elevation: 0,
// padding: const EdgeInsets.symmetric(vertical: 14),
// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
// ),
// onPressed: () => Navigator.pop(context, true),
// child: const Text("PROCEED", style: TextStyle(fontWeight: FontWeight.bold)),
// ),
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// ) ?? false;
// }
//
// // Helper widget for bullets
// Widget _bulletItem(String text) {
// return Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// const Padding(
// padding: EdgeInsets.only(top: 8),
// child: Icon(Icons.circle, size: 6, color: Colors.black),
// ),
// const SizedBox(width: 12),
// Expanded(
// child: Text(
// text,
// style: GoogleFonts.poppins(fontSize: 14, color: Colors.black87),
// ),
// ),
// ],
// );
// }
Future<bool> _confirmChange(BuildContext context) async {
return await showDialog<bool>(
context: context,
barrierDismissible: false,
builder: (context) => AlertDialog(
// --- These two lines ensure the background is exactly white ---
backgroundColor: Colors.white,
surfaceTintColor: Colors.transparent,
// --------------------------------------------------------------
contentPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
// --- Top Section: Content with Green Sidebar ---
Container(
decoration: const BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
// border: Border(
// left: BorderSide(color: Color(0xFF00C853), width: 6), // Green accent
// ),
),
padding: const EdgeInsets.all(24),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
// Icon Container
Container(
padding: const EdgeInsets.all(6),
decoration: BoxDecoration(
color: const Color(0xFFE8F5E9),
borderRadius: BorderRadius.circular(8),
),
child: const Icon(
Icons.warning_amber_rounded,
color: Color(0xFF00C853),
size: 28,
),
),
const SizedBox(width: 12),
Text(
"Action Required",
style: GoogleFonts.poppins(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.black87,
),
),
],
),
const SizedBox(height: 20),
_bulletItem("Please review your changes before submitting."),
const SizedBox(height: 12),
_bulletItem("Changes cannot be made after submission."),
],
),
),
// --- Bottom Section: Buttons with Gray Background ---
Container(
padding: const EdgeInsets.all(16),
decoration: const BoxDecoration(
color: Colors.white, // Gray footer background
borderRadius: BorderRadius.vertical(bottom: Radius.circular(16)),
),
child: Row(
children: [
Expanded(
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFFF5F5F5),
foregroundColor: Colors.grey[700],
elevation: 0,
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
onPressed: () => Navigator.pop(context, false),
child: const Text("Cancel",
style: TextStyle(fontWeight: FontWeight.bold)),
),
),
const SizedBox(width: 12),
Expanded(
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: const Color(0xFF13B156),
foregroundColor: Colors.white,
elevation: 0,
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
),
onPressed: () => Navigator.pop(context, true),
child: const Text("PROCEED",
style: TextStyle(fontWeight: FontWeight.bold)),
),
),
],
),
),
],
),
),
) ?? false;
}
// Helper widget for the bullet points
Widget _bulletItem(String text) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Padding(
padding: EdgeInsets.only(top: 6),
child: Icon(Icons.circle, size: 6, color: Colors.black54),
),
const SizedBox(width: 10),
Expanded(
child: Text(
text,
style: const TextStyle(color: Colors.black54, fontSize: 14),
),
),
],
);
}
Widget _dialogBrokerRow(String label, String value) {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,

View File

@ -133,3 +133,14 @@ flutter:
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
# scripts:
# dev: flutter build web --dart-define=ENV=dev
# test: flutter build web --dart-define=ENV=test
# prod: flutter build web --dart-define=ENV=prod
#
# venba@venba-Inspiron-3558:~/Desktop/FlutterProjects/nhance_partner$ flutter clean && flutter pub get
# Error detected in pubspec.yaml:
# Unexpected child "scripts" found under "flutter".
# Please correct the pubspec.yaml file at /home/venba/Desktop/FlutterProjects/nhance_partner/pubspec.yaml

View File

@ -15,9 +15,9 @@
the `--base-href` argument provided to `flutter build`.
-->
<!-- <base href="$FLUTTER_BASE_HREF"> -->
<base href="/partner/"> <!-- Live build: also check env.dart (line 8) -->
<!--<base href="/nhance/partner/app/"> &lt;!&ndash; Testing build: also check env.dart (line 9) &ndash;&gt;-->
<!-- <base href="/partner/"> &lt;!&ndash; Live build: also check env.dart (line 8) &ndash;&gt;-->
<base href="/nhance/partner/app/"> <!-- Testing build: also check env.dart (line 9) -->
<!-- <base href="{Env.baseHref}">-->
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">