GRIT LIST
This commit is contained in:
parent
44499e14fd
commit
a0c40d99f1
File diff suppressed because one or more lines are too long
@ -280,7 +280,7 @@ class _AppHeaderState extends ConsumerState<AppHeader> {
|
|||||||
role == 'Accounts' ||
|
role == 'Accounts' ||
|
||||||
role == 'agent') ...[
|
role == 'agent') ...[
|
||||||
_buildPopupItem(
|
_buildPopupItem(
|
||||||
label: "Grid List",
|
label: "Payout List",
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_hidePopup();
|
_hidePopup();
|
||||||
setState(() => _activeMenu = 'Reports');
|
setState(() => _activeMenu = 'Reports');
|
||||||
|
|||||||
@ -115,7 +115,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MainLayout(
|
return MainLayout(
|
||||||
title: 'Grid List',
|
title: 'Payout List',
|
||||||
body: SelectionArea(
|
body: SelectionArea(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8),
|
padding: const EdgeInsets.all(8),
|
||||||
@ -123,7 +123,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
|||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text('Grid List', style: _titleStyle),
|
Text('Payout List', style: _titleStyle),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
ThemedSearchField(
|
ThemedSearchField(
|
||||||
hintText: 'Search',
|
hintText: 'Search',
|
||||||
@ -150,7 +150,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.add, size: 18),
|
icon: const Icon(Icons.add, size: 18),
|
||||||
label: const Text('Upload Grid'),
|
label: const Text('Upload Payout'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@ -459,7 +459,7 @@ class UploadGridModalState extends ConsumerState<UploadGridModal> {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Grid Files",
|
"Payout Files",
|
||||||
style: GoogleFonts.poppins(
|
style: GoogleFonts.poppins(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Color(0xFF50A398),
|
color: Color(0xFF50A398),
|
||||||
@ -871,12 +871,12 @@ class GridUploadScreen extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MainLayout(
|
return MainLayout(
|
||||||
title: 'Grid Upload',
|
title: 'Payout Upload',
|
||||||
body: Center(
|
body: Center(
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
onPressed: () => showUploadGridModal(context),
|
onPressed: () => showUploadGridModal(context),
|
||||||
icon: const Icon(Icons.upload_file_outlined),
|
icon: const Icon(Icons.upload_file_outlined),
|
||||||
label: const Text('Open Grid Upload'),
|
label: const Text('Open Payout Upload'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -260,7 +260,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _fetch() async {
|
Future<void> _fetch({bool applyRemoteFilters = false}) async {
|
||||||
setState(() => _isLoading = true);
|
setState(() => _isLoading = true);
|
||||||
try {
|
try {
|
||||||
final appRole = ref.read(userRoleProvider);
|
final appRole = ref.read(userRoleProvider);
|
||||||
@ -331,6 +331,11 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
final res = await _apiService.loadPayoutGrid(
|
final res = await _apiService.loadPayoutGrid(
|
||||||
role: effectiveRole,
|
role: effectiveRole,
|
||||||
fileId: effectiveFileId,
|
fileId: effectiveFileId,
|
||||||
|
insurer: applyRemoteFilters ? _selectedInsurer : null,
|
||||||
|
vehicleType: applyRemoteFilters ? _selectedVehicleType : null,
|
||||||
|
segment: applyRemoteFilters ? _selectedSegment : null,
|
||||||
|
rto: applyRemoteFilters ? _selectedRto : null,
|
||||||
|
search: applyRemoteFilters ? _searchController.text.trim() : null,
|
||||||
loggedId: loggedIdForGrid,
|
loggedId: loggedIdForGrid,
|
||||||
);
|
);
|
||||||
if ((res['status'] ?? '').toString().toLowerCase() != 'success') {
|
if ((res['status'] ?? '').toString().toLowerCase() != 'success') {
|
||||||
@ -692,7 +697,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MainLayout(
|
return MainLayout(
|
||||||
title: 'Grid Details',
|
title: 'Payout Details',
|
||||||
body: SelectionArea(
|
body: SelectionArea(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
@ -758,7 +763,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
const SizedBox(width: 5),
|
const SizedBox(width: 5),
|
||||||
],
|
],
|
||||||
Text(
|
Text(
|
||||||
'Grid Details',
|
'Payout Details',
|
||||||
style: GoogleFonts.poppins(fontSize: 14, fontWeight: FontWeight.w400),
|
style: GoogleFonts.poppins(fontSize: 14, fontWeight: FontWeight.w400),
|
||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
@ -914,7 +919,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
Widget searchBtn() => _filterIconButton(
|
Widget searchBtn() => _filterIconButton(
|
||||||
icon: Icons.search,
|
icon: Icons.search,
|
||||||
message: 'Search',
|
message: 'Search',
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
if (_showPartnerRetentionValues && !_hasAnyFilterSelection) {
|
if (_showPartnerRetentionValues && !_hasAnyFilterSelection) {
|
||||||
ToastHelper.showInfoToast(
|
ToastHelper.showInfoToast(
|
||||||
context,
|
context,
|
||||||
@ -922,14 +927,14 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_applyFilters();
|
await _fetch(applyRemoteFilters: true);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
Widget resetBtn() => _filterIconButton(
|
Widget resetBtn() => _filterIconButton(
|
||||||
icon: Icons.refresh,
|
icon: Icons.refresh,
|
||||||
message: 'Reset',
|
message: 'Reset',
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedInsurer = null;
|
_selectedInsurer = null;
|
||||||
_selectedRto = null;
|
_selectedRto = null;
|
||||||
@ -937,7 +942,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
|||||||
_searchController.clear();
|
_searchController.clear();
|
||||||
_applyDefaultVehicleTypeSelection();
|
_applyDefaultVehicleTypeSelection();
|
||||||
});
|
});
|
||||||
_applyFilters();
|
await _fetch();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -242,12 +242,14 @@ class AgentListState extends ConsumerState<AgentList> {
|
|||||||
context,
|
context,
|
||||||
message.isNotEmpty
|
message.isNotEmpty
|
||||||
? message
|
? message
|
||||||
: 'Import done (Inserted: $inserted, Updated: $updated)',
|
: 'Import done',
|
||||||
|
// 'Import done (Inserted: $inserted, Updated: $updated)',
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (report.isNotEmpty && mounted) {
|
// if (report.isNotEmpty && mounted) {
|
||||||
await _showRetentionImportReportDialog(data, report);
|
// await _showRetentionImportReportDialog(data, report);
|
||||||
}
|
// }
|
||||||
refresh();
|
refresh();
|
||||||
} else {
|
} else {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class DrawerMenuState extends ConsumerState<DrawerMenu> {
|
|||||||
roleId == 'Accounts' ||
|
roleId == 'Accounts' ||
|
||||||
roleId == 'agent') ...[
|
roleId == 'agent') ...[
|
||||||
_buildPopupItem(
|
_buildPopupItem(
|
||||||
label: "Grid List",
|
label: "Payout List",
|
||||||
onTap: () => context.go(
|
onTap: () => context.go(
|
||||||
roleId == 'agent'
|
roleId == 'agent'
|
||||||
? AppRoutes.gridView
|
? AppRoutes.gridView
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class DrawerMenuState extends ConsumerState<DrawerMenu> {
|
|||||||
roleId == 'Accounts' ||
|
roleId == 'Accounts' ||
|
||||||
roleId == 'agent') ...[
|
roleId == 'agent') ...[
|
||||||
_buildPopupItem(
|
_buildPopupItem(
|
||||||
label: "Grid List",
|
label: "Payout List",
|
||||||
onTap: () => context.go(
|
onTap: () => context.go(
|
||||||
roleId == 'agent'
|
roleId == 'agent'
|
||||||
? AppRoutes.gridView
|
? AppRoutes.gridView
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user