Pagiantion
This commit is contained in:
parent
fc08f0a2d4
commit
7f6e79ceb8
File diff suppressed because one or more lines are too long
@ -595,14 +595,15 @@ class ApiService {
|
|||||||
url = Uri.parse(
|
url = Uri.parse(
|
||||||
'${Env.apiUrl}enquiry/enquiryList?manager_id=$id&only_policy_data=true',
|
'${Env.apiUrl}enquiry/enquiryList?manager_id=$id&only_policy_data=true',
|
||||||
);
|
);
|
||||||
} else {
|
} else if (role == 'staff') {
|
||||||
url = Uri.parse(
|
url = Uri.parse(
|
||||||
'${Env.apiUrl}enquiry/enquiryList?staff_id=$id&only_policy_data=true',
|
'${Env.apiUrl}enquiry/enquiryList?staff_id=$id&only_policy_data=true',
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
url = Uri.parse(
|
||||||
|
'${Env.apiUrl}enquiry/enquiryList?agent_id=$id&only_policy_data=true',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// else {
|
|
||||||
// url = Uri.parse('${Env.apiUrl}endorsement/endorsementList?agent_id=$id');
|
|
||||||
// }
|
|
||||||
// final url = Uri.parse(
|
// final url = Uri.parse(
|
||||||
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
// 'https://venbait.in/nhance/partner/dev/api/agent/agentList?manager_id=${managerId}',
|
||||||
// );
|
// );
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class Validators {
|
|||||||
|
|
||||||
static String? number(String? value, String label) {
|
static String? number(String? value, String label) {
|
||||||
if (value == null || value.trim().isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return "$label is required";
|
return "Required";
|
||||||
}
|
}
|
||||||
if (!RegExp(r'^[0-9]+$').hasMatch(value)) {
|
if (!RegExp(r'^[0-9]+$').hasMatch(value)) {
|
||||||
return "$label must contain only numbers";
|
return "$label must contain only numbers";
|
||||||
@ -78,7 +78,7 @@ class Validators {
|
|||||||
|
|
||||||
static String? doubleNumber(String? value, String label) {
|
static String? doubleNumber(String? value, String label) {
|
||||||
if (value == null || value.trim().isEmpty) {
|
if (value == null || value.trim().isEmpty) {
|
||||||
return "$label is required";
|
return "Required";
|
||||||
}
|
}
|
||||||
// allow integers or decimals with optional fraction part
|
// allow integers or decimals with optional fraction part
|
||||||
if (!RegExp(r'^[0-9]+(\.[0-9]+)?$').hasMatch(value.trim())) {
|
if (!RegExp(r'^[0-9]+(\.[0-9]+)?$').hasMatch(value.trim())) {
|
||||||
|
|||||||
@ -74,6 +74,8 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
String? selectedId;
|
String? selectedId;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
|
|
||||||
|
bool isSaving = false;
|
||||||
|
|
||||||
String? selectedVehicleType;
|
String? selectedVehicleType;
|
||||||
// int? selectedVehicleTypeId;
|
// int? selectedVehicleTypeId;
|
||||||
String? selectedInsurer;
|
String? selectedInsurer;
|
||||||
@ -284,6 +286,7 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
if (!_formKey.currentState!.validate()) return;
|
if (!_formKey.currentState!.validate()) return;
|
||||||
setState(() {
|
setState(() {
|
||||||
if (_formKey.currentState!.validate()) {
|
if (_formKey.currentState!.validate()) {
|
||||||
|
isSaving = true;
|
||||||
dataDetails();
|
dataDetails();
|
||||||
final dataSet = dataDetails();
|
final dataSet = dataDetails();
|
||||||
print("dataSetAgent - $dataSet");
|
print("dataSetAgent - $dataSet");
|
||||||
@ -307,6 +310,8 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
createUserData(dataSet);
|
createUserData(dataSet);
|
||||||
} else {
|
} else {
|
||||||
// isDisable = false;
|
// isDisable = false;
|
||||||
|
|
||||||
|
setState(() => isSaving = false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -434,10 +439,13 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
ref.read(enquiryIdProvider.notifier).state = null;
|
ref.read(enquiryIdProvider.notifier).state = null;
|
||||||
context.go(AppRoutes.enquiryLst);
|
context.go(AppRoutes.enquiryLst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setState(() => isSaving = false);
|
||||||
} else {
|
} else {
|
||||||
print("❌ Submission failed. Status: ${response.statusCode}");
|
print("❌ Submission failed. Status: ${response.statusCode}");
|
||||||
print("Body: ${response.body}");
|
print("Body: ${response.body}");
|
||||||
|
|
||||||
|
setState(() => isSaving = false);
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@ -490,17 +498,22 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
handleSave();
|
// handleSave();
|
||||||
},
|
// },
|
||||||
|
onTap: isSaving ? null : handleSave,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 45.0, vertical: 8),
|
padding: EdgeInsets.symmetric(horizontal: 45.0, vertical: 8),
|
||||||
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
color: Color(0xFF425B5B),
|
// color: Color(0xFF425B5B),
|
||||||
|
color: isSaving ? Colors.grey : Color(0xFF425B5B),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
isSaving ? 'Saving...' : 'Save',
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
child: Text('Save', style: TextStyle(color: Colors.white)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -732,7 +745,6 @@ class EnquiryTabState extends ConsumerState<EnquiryTab> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
popupProps: PopupProps.menu(
|
popupProps: PopupProps.menu(
|
||||||
fit: FlexFit.loose,
|
fit: FlexFit.loose,
|
||||||
constraints: BoxConstraints(maxHeight: 250),
|
constraints: BoxConstraints(maxHeight: 250),
|
||||||
|
|||||||
@ -10,9 +10,11 @@ import 'package:shared_preferences/shared_preferences.dart';
|
|||||||
import '../../../../core/routing/routes.dart';
|
import '../../../../core/routing/routes.dart';
|
||||||
import '../../../../core/services/api_service.dart';
|
import '../../../../core/services/api_service.dart';
|
||||||
import '../../../../data/utils/Pagination.dart';
|
import '../../../../data/utils/Pagination.dart';
|
||||||
|
import '../../../data/utils/validators.dart';
|
||||||
import '../../layouts/main_layout.dart';
|
import '../../layouts/main_layout.dart';
|
||||||
import '../../layouts/responsive_layout.dart';
|
import '../../layouts/responsive_layout.dart';
|
||||||
import '../../providers/manager_provider.dart';
|
import '../../providers/manager_provider.dart';
|
||||||
|
import '../../themes/indicators/date_field_theme.dart';
|
||||||
import '../../themes/indicators/export_btn.dart';
|
import '../../themes/indicators/export_btn.dart';
|
||||||
import '../../themes/indicators/search_field_theme.dart';
|
import '../../themes/indicators/search_field_theme.dart';
|
||||||
import '../../widgets/custom_action_popup.dart';
|
import '../../widgets/custom_action_popup.dart';
|
||||||
@ -32,13 +34,19 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
List<Map<String, dynamic>> getStaffData = [];
|
List<Map<String, dynamic>> getStaffData = [];
|
||||||
List<Map<String, dynamic>> originalData = [];
|
List<Map<String, dynamic>> originalData = [];
|
||||||
List<Map<String, dynamic>> filteredData = [];
|
List<Map<String, dynamic>> filteredData = [];
|
||||||
|
Map<String, TextEditingController> controllers = {};
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
|
|
||||||
|
List<String> tabHeader = ['startDate', 'endDate'];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|
||||||
apiService = ApiService();
|
apiService = ApiService();
|
||||||
|
for (String field in tabHeader) {
|
||||||
|
controllers[field] = TextEditingController();
|
||||||
|
}
|
||||||
|
|
||||||
Future.microtask(() {
|
Future.microtask(() {
|
||||||
final id = ref.read(managerIdProvider);
|
final id = ref.read(managerIdProvider);
|
||||||
@ -51,6 +59,9 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void filterDateRange() {}
|
||||||
|
void refrshfilterDateRange() {}
|
||||||
|
|
||||||
Future<void> getStaffList(int managerId, role) async {
|
Future<void> getStaffList(int managerId, role) async {
|
||||||
print('getClaimList called MagId - $managerId - $role');
|
print('getClaimList called MagId - $managerId - $role');
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -91,7 +102,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<dynamic> get _paginatedData {
|
List<dynamic> get _paginatedData1 {
|
||||||
// Sort descending by id first
|
// Sort descending by id first
|
||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
@ -102,6 +113,23 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<dynamic> get _paginatedData {
|
||||||
|
// Sort descending by id first
|
||||||
|
final sortedData = [...filteredData]
|
||||||
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
|
if (sortedData.isEmpty) return [];
|
||||||
|
|
||||||
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> handleEdit(item) async {
|
Future<void> handleEdit(item) async {
|
||||||
// Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
print('EDITStaff - ${item['id']}');
|
print('EDITStaff - ${item['id']}');
|
||||||
@ -153,7 +181,7 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
String _formatDate(String rawDate) {
|
String _formatDate(String rawDate) {
|
||||||
try {
|
try {
|
||||||
final dateTime = DateTime.parse(rawDate);
|
final dateTime = DateTime.parse(rawDate);
|
||||||
return DateFormat('dd/MM/yyyy HH:mm').format(dateTime); // 24-hour format
|
return DateFormat('dd-MM-yyyy HH:mm').format(dateTime); // 24-hour format
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return rawDate; // fallback if parsing fails
|
return rawDate; // fallback if parsing fails
|
||||||
}
|
}
|
||||||
@ -241,9 +269,29 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
// height: 40,
|
// height: 40,
|
||||||
// color: Colors.pink,
|
// color: Colors.pink,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
// buildStartDate(context),
|
||||||
|
// SizedBox(width: 10),
|
||||||
|
// buildEndDate(context),
|
||||||
|
// SizedBox(width: 10),
|
||||||
|
//
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: GestureDetector(
|
||||||
|
// onTap: filterDateRange,
|
||||||
|
// child: Icon(Icons.filter_list_outlined),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
//
|
||||||
|
// Padding(
|
||||||
|
// padding: const EdgeInsets.all(8.0),
|
||||||
|
// child: GestureDetector(
|
||||||
|
// onTap: refrshfilterDateRange,
|
||||||
|
// child: Icon(Icons.refresh),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
ThemedSearchField(
|
ThemedSearchField(
|
||||||
hintText: 'Search',
|
hintText: 'Search',
|
||||||
backgroundColor: Color(0xFFF6F8F8),
|
backgroundColor: Color(0xFFF6F8F8),
|
||||||
@ -256,6 +304,8 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
|
|
||||||
Spacer(),
|
Spacer(),
|
||||||
|
|
||||||
|
SizedBox(width: 10),
|
||||||
|
|
||||||
ExportBtn(
|
ExportBtn(
|
||||||
sheetName: "Enquiry",
|
sheetName: "Enquiry",
|
||||||
fileName: "enquiry_list",
|
fileName: "enquiry_list",
|
||||||
@ -276,7 +326,8 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final prefs = await SharedPreferences.getInstance();
|
final prefs =
|
||||||
|
await SharedPreferences.getInstance();
|
||||||
|
|
||||||
await prefs.remove('enqAgentDataId');
|
await prefs.remove('enqAgentDataId');
|
||||||
context.go(AppRoutes.tabEnquiry);
|
context.go(AppRoutes.tabEnquiry);
|
||||||
@ -709,6 +760,61 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Widget buildStartDate(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('Start Date', style: _textStyle),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
ThemedDateField(
|
||||||
|
hintText: "Select Date",
|
||||||
|
txtwidth: ResponsiveLayout.isMobile(context)
|
||||||
|
? null
|
||||||
|
: MediaQuery.of(context).size.width * 0.16,
|
||||||
|
txtheight: 50,
|
||||||
|
// backgroundColor: const Color(0xFFECECEC),
|
||||||
|
// validator: (value) => Validators.requiredField(value, "date"),
|
||||||
|
controller: controllers['startDate']!,
|
||||||
|
onDateSelected: (date) {
|
||||||
|
print("Picked Date: $date");
|
||||||
|
|
||||||
|
controllers['startDate']?.text = DateFormat(
|
||||||
|
'dd-MM-yyyy',
|
||||||
|
).format(date);
|
||||||
|
// controllers['date']?.text = date as String;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget buildEndDate(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('End Date', style: _textStyle),
|
||||||
|
SizedBox(height: 5),
|
||||||
|
ThemedDateField(
|
||||||
|
hintText: "Select Date",
|
||||||
|
txtwidth: ResponsiveLayout.isMobile(context)
|
||||||
|
? null
|
||||||
|
: MediaQuery.of(context).size.width * 0.16,
|
||||||
|
txtheight: 50,
|
||||||
|
// backgroundColor: const Color(0xFFECECEC),
|
||||||
|
// validator: (value) => Validators.requiredField(value, "date"),
|
||||||
|
controller: controllers['endDate']!,
|
||||||
|
onDateSelected: (date) {
|
||||||
|
print("Picked Date: $date");
|
||||||
|
controllers['endDate']?.text = DateFormat(
|
||||||
|
'dd-MM-yyyy',
|
||||||
|
).format(date);
|
||||||
|
// controllers['date']?.text = date as String;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
static final _dataBold = GoogleFonts.inter(
|
static final _dataBold = GoogleFonts.inter(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
|
|
||||||
@ -741,4 +847,9 @@ class EnquiryListState extends ConsumerState<EnquiryList> {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static const _textStyle = TextStyle(
|
||||||
|
fontSize: 12,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,8 +96,14 @@ class claimListState extends ConsumerState<claimList> {
|
|||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
final startIndex = (currentPage - 1) * itemsPerPage;
|
if (sortedData.isEmpty) return [];
|
||||||
final endIndex = (currentPage * itemsPerPage).clamp(0, sortedData.length);
|
|
||||||
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
@ -133,7 +139,7 @@ class claimListState extends ConsumerState<claimList> {
|
|||||||
String _formatDate(String rawDate) {
|
String _formatDate(String rawDate) {
|
||||||
try {
|
try {
|
||||||
final dateTime = DateTime.parse(rawDate);
|
final dateTime = DateTime.parse(rawDate);
|
||||||
return DateFormat('dd/MM/yyyy').format(dateTime); // date only
|
return DateFormat('dd-MM-yyyy').format(dateTime); // date only
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return rawDate; // fallback if parsing fails
|
return rawDate; // fallback if parsing fails
|
||||||
}
|
}
|
||||||
|
|||||||
@ -94,8 +94,14 @@ class endosementState extends ConsumerState<endosement> {
|
|||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
final startIndex = (currentPage - 1) * itemsPerPage;
|
if (sortedData.isEmpty) return [];
|
||||||
final endIndex = (currentPage * itemsPerPage).clamp(0, sortedData.length);
|
|
||||||
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
@ -130,7 +136,7 @@ class endosementState extends ConsumerState<endosement> {
|
|||||||
String _formatDate(String rawDate) {
|
String _formatDate(String rawDate) {
|
||||||
try {
|
try {
|
||||||
final dateTime = DateTime.parse(rawDate);
|
final dateTime = DateTime.parse(rawDate);
|
||||||
return DateFormat('dd/MM/yyyy HH:mm').format(dateTime); // 24-hour format
|
return DateFormat('dd-MM-yyyy HH:mm').format(dateTime); // 24-hour format
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return rawDate; // fallback if parsing fails
|
return rawDate; // fallback if parsing fails
|
||||||
}
|
}
|
||||||
@ -305,7 +311,7 @@ class endosementState extends ConsumerState<endosement> {
|
|||||||
child: Text('Reg.No.', style: _headerStyle),
|
child: Text('Reg.No.', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 4,
|
||||||
child: Text('Company', style: _headerStyle),
|
child: Text('Company', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
@ -405,7 +411,7 @@ class endosementState extends ConsumerState<endosement> {
|
|||||||
|
|
||||||
Widget _buildDataRow(Map<String, dynamic> item, sno) {
|
Widget _buildDataRow(Map<String, dynamic> item, sno) {
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 6, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
|
||||||
// margin: const EdgeInsets.only(top: 10),
|
// margin: const EdgeInsets.only(top: 10),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
@ -426,7 +432,7 @@ class endosementState extends ConsumerState<endosement> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 4,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['insurer_name'] ?? '-', // fallback
|
item['insurer_name'] ?? '-', // fallback
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
|
|||||||
@ -102,27 +102,27 @@ class ClaimsSubListState extends ConsumerState<ClaimsSubList> {
|
|||||||
|
|
||||||
List<Widget> _buildPopupMenuActions(BuildContext context, dynamic data) {
|
List<Widget> _buildPopupMenuActions(BuildContext context, dynamic data) {
|
||||||
return [
|
return [
|
||||||
GestureDetector(
|
// GestureDetector(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
Navigator.pop(context);
|
// Navigator.pop(context);
|
||||||
print('EDITStaff - ${data['id']}');
|
// print('EDITStaff - ${data['id']}');
|
||||||
// dynamic id = data['id'];
|
// // dynamic id = data['id'];
|
||||||
// context.go('/tabEnquiry/$id');
|
// // context.go('/tabEnquiry/$id');
|
||||||
|
//
|
||||||
// update provider
|
// // update provider
|
||||||
final id = data['id'].toString();
|
// final id = data['id'].toString();
|
||||||
ref.read(enquiryIdProvider.notifier).state = id;
|
// ref.read(enquiryIdProvider.notifier).state = id;
|
||||||
context.go(AppRoutes.tabEnquiry);
|
// context.go(AppRoutes.tabEnquiry);
|
||||||
},
|
// },
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
// children: [
|
||||||
Icon(Icons.edit_sharp, color: Color(0xFF319718), size: 18),
|
// Icon(Icons.edit_sharp, color: Color(0xFF319718), size: 18),
|
||||||
SizedBox(width: 10),
|
// SizedBox(width: 10),
|
||||||
Text('Edit'),
|
// Text('Edit'),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -191,10 +191,10 @@ class EndrosmentSubListState extends ConsumerState<EndrosmentSubList> {
|
|||||||
child: Text('Status', style: _headerStyle),
|
child: Text('Status', style: _headerStyle),
|
||||||
),
|
),
|
||||||
|
|
||||||
Expanded(
|
// Expanded(
|
||||||
flex: 1,
|
// flex: 1,
|
||||||
child: Text('Action', style: _headerStyle),
|
// child: Text('Action', style: _headerStyle),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -319,38 +319,38 @@ class EndrosmentSubListState extends ConsumerState<EndrosmentSubList> {
|
|||||||
child: Text(item['status'] ?? '-', style: _dataBold),
|
child: Text(item['status'] ?? '-', style: _dataBold),
|
||||||
),
|
),
|
||||||
|
|
||||||
Expanded(
|
// Expanded(
|
||||||
flex: 1,
|
// flex: 1,
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
PopupMenuButton<int>(
|
// PopupMenuButton<int>(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
padding: EdgeInsets.zero,
|
// padding: EdgeInsets.zero,
|
||||||
offset: Offset(0, 30),
|
// offset: Offset(0, 30),
|
||||||
icon: Icon(
|
// icon: Icon(
|
||||||
Icons.more_vert,
|
// Icons.more_vert,
|
||||||
color: Color(0xFF475569),
|
// color: Color(0xFF475569),
|
||||||
size: 14,
|
// size: 14,
|
||||||
),
|
// ),
|
||||||
itemBuilder: (context) => [
|
// itemBuilder: (context) => [
|
||||||
CustomPopupMenuEntry(
|
// CustomPopupMenuEntry(
|
||||||
child: Container(
|
// child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
// padding: EdgeInsets.symmetric(
|
||||||
horizontal: 8,
|
// horizontal: 8,
|
||||||
vertical: 8,
|
// vertical: 8,
|
||||||
),
|
// ),
|
||||||
child: Column(
|
// child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: _buildPopupMenuActions(context, item),
|
// children: _buildPopupMenuActions(context, item),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -378,25 +378,25 @@ class EndrosmentSubListState extends ConsumerState<EndrosmentSubList> {
|
|||||||
style: _headerStyle,
|
style: _headerStyle,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
PopupMenuButton<int>(
|
// PopupMenuButton<int>(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
padding: EdgeInsets.zero,
|
// padding: EdgeInsets.zero,
|
||||||
offset: const Offset(0, 30),
|
// offset: const Offset(0, 30),
|
||||||
icon: const Icon(
|
// icon: const Icon(
|
||||||
Icons.more_vert,
|
// Icons.more_vert,
|
||||||
color: Color(0xFF475569),
|
// color: Color(0xFF475569),
|
||||||
size: 16,
|
// size: 16,
|
||||||
),
|
// ),
|
||||||
itemBuilder: (context) => [
|
// itemBuilder: (context) => [
|
||||||
PopupMenuItem<int>(
|
// PopupMenuItem<int>(
|
||||||
value: 1,
|
// value: 1,
|
||||||
child: Column(
|
// child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
children: _buildPopupMenuActions(context, item),
|
// children: _buildPopupMenuActions(context, item),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// Description
|
// Description
|
||||||
|
|||||||
@ -67,11 +67,15 @@ class AgentListState extends ConsumerState<AgentList> {
|
|||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
// Calculate pagination indices
|
if (sortedData.isEmpty) return [];
|
||||||
final startIndex = (currentPage - 1) * itemsPerPage;
|
|
||||||
final endIndex = (currentPage * itemsPerPage).clamp(0, sortedData.length);
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
// Return only the paginated slice
|
|
||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,6 +263,7 @@ class AgentListState extends ConsumerState<AgentList> {
|
|||||||
"agent_code",
|
"agent_code",
|
||||||
"email",
|
"email",
|
||||||
"mobile",
|
"mobile",
|
||||||
|
"address",
|
||||||
"is_active",
|
"is_active",
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -61,8 +61,14 @@ class StaffListState extends ConsumerState<StaffList> {
|
|||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
final startIndex = (currentPage - 1) * itemsPerPage;
|
if (sortedData.isEmpty) return [];
|
||||||
final endIndex = (currentPage * itemsPerPage).clamp(0, sortedData.length);
|
|
||||||
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -505,6 +505,40 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// void _resendCode(String mobileNumber, int? resendToken) async {
|
||||||
|
// await _auth.verifyPhoneNumber(
|
||||||
|
// phoneNumber: '${_countryController.text + mobileNumber}',
|
||||||
|
// timeout: const Duration(seconds: 60),
|
||||||
|
// forceResendingToken: resendToken,
|
||||||
|
// verificationCompleted: (PhoneAuthCredential credential) async {
|
||||||
|
// await _auth.signInWithCredential(credential);
|
||||||
|
// },
|
||||||
|
// verificationFailed: (FirebaseAuthException e) {
|
||||||
|
// if (e.code == 'invalid-phone-number') {
|
||||||
|
// print('The provided phone number is not valid.');
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// codeSent: (String verificationId, int? resendToken) async {
|
||||||
|
// final prefs = await SharedPreferences.getInstance();
|
||||||
|
// await prefs.setString('verificationId', verificationId);
|
||||||
|
// setState(() {
|
||||||
|
// _verificationId = verificationId;
|
||||||
|
// _resendToken = resendToken;
|
||||||
|
// });
|
||||||
|
// ToastHelper.showSuccessToast(
|
||||||
|
// context,
|
||||||
|
// 'Verification code resent to ${mobileNumber}',
|
||||||
|
// );
|
||||||
|
// },
|
||||||
|
// codeAutoRetrievalTimeout: (String verificationId) async {
|
||||||
|
// final prefs = await SharedPreferences.getInstance();
|
||||||
|
// await prefs.setString('verificationId', verificationId);
|
||||||
|
// setState(() {
|
||||||
|
// _verificationId = verificationId;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
// );
|
||||||
|
// }
|
||||||
void _resendCode(String mobileNumber, int? resendToken) async {
|
void _resendCode(String mobileNumber, int? resendToken) async {
|
||||||
await _auth.verifyPhoneNumber(
|
await _auth.verifyPhoneNumber(
|
||||||
phoneNumber: '${_countryController.text + mobileNumber}',
|
phoneNumber: '${_countryController.text + mobileNumber}',
|
||||||
@ -1210,7 +1244,7 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 15),
|
||||||
Container(
|
Container(
|
||||||
alignment: Alignment.center, // center the text
|
alignment: Alignment.center, // center the text
|
||||||
child: RichText(
|
child: RichText(
|
||||||
|
|||||||
@ -124,7 +124,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<dynamic> get _paginatedData {
|
List<dynamic> get _paginatedData2 {
|
||||||
// Sort descending by id first
|
// Sort descending by id first
|
||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
@ -136,6 +136,23 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<dynamic> get _paginatedData {
|
||||||
|
// Sort descending by id first
|
||||||
|
final sortedData = [...filteredData]
|
||||||
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
|
if (sortedData.isEmpty) return [];
|
||||||
|
|
||||||
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
|
}
|
||||||
|
|
||||||
void filterData(String query) {
|
void filterData(String query) {
|
||||||
print("FilterDAta - $query");
|
print("FilterDAta - $query");
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -179,7 +196,9 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
String _formatDate(String rawDate) {
|
String _formatDate(String rawDate) {
|
||||||
try {
|
try {
|
||||||
final dateTime = DateTime.parse(rawDate);
|
final dateTime = DateTime.parse(rawDate);
|
||||||
return DateFormat('dd/MM/yyyy HH:mm').format(dateTime); // 24-hour format
|
return DateFormat(
|
||||||
|
'dd-MM-yyyy HH:mm',
|
||||||
|
).format(dateTime); // 24-hour format
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return rawDate; // fallback if parsing fails
|
return rawDate; // fallback if parsing fails
|
||||||
}
|
}
|
||||||
@ -490,12 +509,18 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
child: Text('Assigned To', style: _headerStyle),
|
child: Text('Assigned To', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Insurer', style: _headerStyle),
|
child: Text('Insurer', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Text('Insured Name', style: _headerStyle),
|
child: Padding(
|
||||||
|
padding: EdgeInsets.only(left: 8.0),
|
||||||
|
child: Text(
|
||||||
|
'Insured Name',
|
||||||
|
style: _headerStyle,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 2,
|
||||||
@ -631,7 +656,7 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
|
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['insurer_name'] ?? '-',
|
item['insurer_name'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -641,11 +666,13 @@ class EnquiryStaffState extends ConsumerState<EnquiryStaff> {
|
|||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 3,
|
||||||
child: Text(
|
child: Center(
|
||||||
item['insured_name'] ?? '-',
|
child: Text(
|
||||||
style: _dataBold,
|
item['insured_name'] ?? '-',
|
||||||
softWrap: true,
|
style: _dataBold,
|
||||||
maxLines: 3,
|
softWrap: true,
|
||||||
|
maxLines: 3,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|||||||
@ -1053,6 +1053,8 @@ class PolicyScreenState extends ConsumerState<PolicyScreen> {
|
|||||||
ThemedFormField(
|
ThemedFormField(
|
||||||
controller: controllers['premium_amount']!,
|
controller: controllers['premium_amount']!,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
|
validator: (value) =>
|
||||||
|
Validators.doubleNumber(value, "Premium Amount"),
|
||||||
txtwidth: ResponsiveLayout.isMobile(context)
|
txtwidth: ResponsiveLayout.isMobile(context)
|
||||||
? null
|
? null
|
||||||
: MediaQuery.of(context).size.width * 0.26,
|
: MediaQuery.of(context).size.width * 0.26,
|
||||||
|
|||||||
@ -109,9 +109,14 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
final sortedData = [...filteredData]
|
final sortedData = [...filteredData]
|
||||||
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
..sort((a, b) => int.parse(b['id']) - int.parse(a['id']));
|
||||||
|
|
||||||
// final sortedData = [...filteredData];
|
if (sortedData.isEmpty) return [];
|
||||||
final startIndex = (currentPage - 1) * itemsPerPage;
|
|
||||||
final endIndex = (currentPage * itemsPerPage).clamp(0, sortedData.length);
|
// Ensure currentPage is valid
|
||||||
|
final maxPage = (sortedData.length / itemsPerPage).ceil();
|
||||||
|
final safePage = currentPage.clamp(1, maxPage);
|
||||||
|
|
||||||
|
final startIndex = (safePage - 1) * itemsPerPage;
|
||||||
|
final endIndex = (startIndex + itemsPerPage).clamp(0, sortedData.length);
|
||||||
|
|
||||||
return sortedData.sublist(startIndex, endIndex);
|
return sortedData.sublist(startIndex, endIndex);
|
||||||
}
|
}
|
||||||
@ -160,7 +165,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
String _formatDate(String rawDate) {
|
String _formatDate(String rawDate) {
|
||||||
try {
|
try {
|
||||||
final dateTime = DateTime.parse(rawDate);
|
final dateTime = DateTime.parse(rawDate);
|
||||||
return DateFormat('dd/MM/yyyy HH:mm').format(dateTime); // 24-hour format
|
return DateFormat('dd-MM-yyyy HH:mm').format(dateTime); // 24-hour format
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return rawDate; // fallback if parsing fails
|
return rawDate; // fallback if parsing fails
|
||||||
}
|
}
|
||||||
@ -428,39 +433,39 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Text('Date', style: _headerStyle),
|
child: Text('Date', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Reg.No', style: _headerStyle),
|
child: Text('Reg.No', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Agents', style: _headerStyle),
|
child: Text('Agents', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Assigned To', style: _headerStyle),
|
child: Text('Assigned To', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Insurer', style: _headerStyle),
|
child: Text('Insurer', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Insured Name', style: _headerStyle),
|
child: Text('Insured Name', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Premium', style: _headerStyle),
|
child: Text('Premium', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Payment Mode', style: _headerStyle),
|
child: Text('Payment Mode', style: _headerStyle),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text('Policy Number', style: _headerStyle),
|
child: Text('Policy Number', style: _headerStyle),
|
||||||
),
|
),
|
||||||
|
|
||||||
@ -560,7 +565,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Text(
|
child: Text(
|
||||||
_formatDate(item['updated_on']) ?? '-',
|
_formatDate(item['updated_on']) ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -569,22 +574,22 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(item['reg_no'] ?? '-', style: _dataBold),
|
child: Text(item['reg_no'] ?? '-', style: _dataBold),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
_formatDate(item['agent_name']) ?? '-',
|
_formatDate(item['agent_name']) ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
|
child: Text(item['assigned_to_name'] ?? '-', style: _dataBold),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['insurer_name'] ?? '-',
|
item['insurer_name'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -593,7 +598,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['insured_name'] ?? '-',
|
item['insured_name'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -602,7 +607,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['premium_amount'] ?? '-',
|
item['premium_amount'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -611,7 +616,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['payment_mode'] ?? '-',
|
item['payment_mode'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
@ -620,7 +625,7 @@ class policylistState extends ConsumerState<policylist> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Text(
|
child: Text(
|
||||||
item['policy_number'] ?? '-',
|
item['policy_number'] ?? '-',
|
||||||
style: _dataBold,
|
style: _dataBold,
|
||||||
|
|||||||
@ -14,7 +14,8 @@
|
|||||||
This is a placeholder for base href that will be replaced by the value of
|
This is a placeholder for base href that will be replaced by the value of
|
||||||
the `--base-href` argument provided to `flutter build`.
|
the `--base-href` argument provided to `flutter build`.
|
||||||
-->
|
-->
|
||||||
<base href="$FLUTTER_BASE_HREF">
|
<!-- <base href="$FLUTTER_BASE_HREF">-->
|
||||||
|
<base href="/nhance/partner/app/">
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user