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 == 'agent') ...[
|
||||
_buildPopupItem(
|
||||
label: "Grid List",
|
||||
label: "Payout List",
|
||||
onTap: () {
|
||||
_hidePopup();
|
||||
setState(() => _activeMenu = 'Reports');
|
||||
|
||||
@ -115,7 +115,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MainLayout(
|
||||
title: 'Grid List',
|
||||
title: 'Payout List',
|
||||
body: SelectionArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
@ -123,7 +123,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text('Grid List', style: _titleStyle),
|
||||
Text('Payout List', style: _titleStyle),
|
||||
const Spacer(),
|
||||
ThemedSearchField(
|
||||
hintText: 'Search',
|
||||
@ -150,7 +150,7 @@ class _GridListScreenState extends ConsumerState<GridListScreen> {
|
||||
}
|
||||
},
|
||||
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(
|
||||
children: [
|
||||
Text(
|
||||
"Grid Files",
|
||||
"Payout Files",
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 14,
|
||||
color: Color(0xFF50A398),
|
||||
@ -871,12 +871,12 @@ class GridUploadScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MainLayout(
|
||||
title: 'Grid Upload',
|
||||
title: 'Payout Upload',
|
||||
body: Center(
|
||||
child: ElevatedButton.icon(
|
||||
onPressed: () => showUploadGridModal(context),
|
||||
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);
|
||||
try {
|
||||
final appRole = ref.read(userRoleProvider);
|
||||
@ -331,6 +331,11 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
final res = await _apiService.loadPayoutGrid(
|
||||
role: effectiveRole,
|
||||
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,
|
||||
);
|
||||
if ((res['status'] ?? '').toString().toLowerCase() != 'success') {
|
||||
@ -692,7 +697,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MainLayout(
|
||||
title: 'Grid Details',
|
||||
title: 'Payout Details',
|
||||
body: SelectionArea(
|
||||
child: Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
@ -758,7 +763,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
const SizedBox(width: 5),
|
||||
],
|
||||
Text(
|
||||
'Grid Details',
|
||||
'Payout Details',
|
||||
style: GoogleFonts.poppins(fontSize: 14, fontWeight: FontWeight.w400),
|
||||
),
|
||||
const Spacer(),
|
||||
@ -914,7 +919,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
Widget searchBtn() => _filterIconButton(
|
||||
icon: Icons.search,
|
||||
message: 'Search',
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
if (_showPartnerRetentionValues && !_hasAnyFilterSelection) {
|
||||
ToastHelper.showInfoToast(
|
||||
context,
|
||||
@ -922,14 +927,14 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
);
|
||||
return;
|
||||
}
|
||||
_applyFilters();
|
||||
await _fetch(applyRemoteFilters: true);
|
||||
},
|
||||
);
|
||||
|
||||
Widget resetBtn() => _filterIconButton(
|
||||
icon: Icons.refresh,
|
||||
message: 'Reset',
|
||||
onTap: () {
|
||||
onTap: () async {
|
||||
setState(() {
|
||||
_selectedInsurer = null;
|
||||
_selectedRto = null;
|
||||
@ -937,7 +942,7 @@ class _gridViewScreenState extends ConsumerState<gridViewScreen> {
|
||||
_searchController.clear();
|
||||
_applyDefaultVehicleTypeSelection();
|
||||
});
|
||||
_applyFilters();
|
||||
await _fetch();
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@ -242,12 +242,14 @@ class AgentListState extends ConsumerState<AgentList> {
|
||||
context,
|
||||
message.isNotEmpty
|
||||
? message
|
||||
: 'Import done (Inserted: $inserted, Updated: $updated)',
|
||||
: 'Import done',
|
||||
// 'Import done (Inserted: $inserted, Updated: $updated)',
|
||||
|
||||
);
|
||||
}
|
||||
if (report.isNotEmpty && mounted) {
|
||||
await _showRetentionImportReportDialog(data, report);
|
||||
}
|
||||
// if (report.isNotEmpty && mounted) {
|
||||
// await _showRetentionImportReportDialog(data, report);
|
||||
// }
|
||||
refresh();
|
||||
} else {
|
||||
if (mounted) {
|
||||
|
||||
@ -62,7 +62,7 @@ class DrawerMenuState extends ConsumerState<DrawerMenu> {
|
||||
roleId == 'Accounts' ||
|
||||
roleId == 'agent') ...[
|
||||
_buildPopupItem(
|
||||
label: "Grid List",
|
||||
label: "Payout List",
|
||||
onTap: () => context.go(
|
||||
roleId == 'agent'
|
||||
? AppRoutes.gridView
|
||||
|
||||
@ -66,7 +66,7 @@ class DrawerMenuState extends ConsumerState<DrawerMenu> {
|
||||
roleId == 'Accounts' ||
|
||||
roleId == 'agent') ...[
|
||||
_buildPopupItem(
|
||||
label: "Grid List",
|
||||
label: "Payout List",
|
||||
onTap: () => context.go(
|
||||
roleId == 'agent'
|
||||
? AppRoutes.gridView
|
||||
|
||||
Loading…
Reference in New Issue
Block a user