BUG_FIX
This commit is contained in:
parent
108dba5dae
commit
eb9590b808
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@ 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://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) */
|
||||
);
|
||||
|
||||
@ -241,6 +241,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
// getStaffList(managerId, userId, roleId);
|
||||
|
||||
// print("D61 => r : $roleId | mId: $id | uId: $userId");
|
||||
_resetSearchField();
|
||||
if (userId != null && managerId != null) {
|
||||
print('filterDateRange 1s');
|
||||
print('manager - $managerId - userID -$userId - roledId -$roleId');
|
||||
@ -256,12 +257,14 @@ class policylistState extends ConsumerState<policylist> {
|
||||
SelectedPartnerId = null;
|
||||
selectedPartnerAgentCode = '';
|
||||
selectedStaffAgentCode = '';
|
||||
_searchStaffController.clear();
|
||||
controllers['startDate']!.clear();
|
||||
controllers['endDate']!.clear();
|
||||
SelectedStatus = (roleId == 'Accounts') ? 'Not Verified' : 'All'; // ✅
|
||||
SelectedInsurer = '';
|
||||
controllers['startDate']?.text = '';
|
||||
controllers['endDate']?.text = '';
|
||||
filteredData = List.from(getStaffData);
|
||||
// Reset the FormField validation
|
||||
_formKey.currentState?.reset();
|
||||
});
|
||||
@ -309,6 +312,17 @@ class policylistState extends ConsumerState<policylist> {
|
||||
|
||||
final TextEditingController _searchStaffController = TextEditingController();
|
||||
|
||||
void _resetSearchField() {
|
||||
if (_searchStaffController.text.isEmpty) {
|
||||
return;
|
||||
}
|
||||
setState(() {
|
||||
_searchStaffController.clear();
|
||||
filteredData = List.from(getStaffData);
|
||||
currentPage = 1;
|
||||
});
|
||||
}
|
||||
|
||||
String _formatDate(String rawDate) {
|
||||
try {
|
||||
final dateTime = DateTime.parse(rawDate);
|
||||
@ -478,7 +492,10 @@ class policylistState extends ConsumerState<policylist> {
|
||||
id: userId,
|
||||
onFilterStaff: (val) {
|
||||
print('Selected Filterd STAFF Id - $val');
|
||||
SelectedStaffId = val;
|
||||
setState(() {
|
||||
SelectedStaffId = val;
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onStaffAgentCodeChanged: (code) {
|
||||
setState(() {
|
||||
@ -490,6 +507,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
setState(() {
|
||||
SelectedPartnerId = id;
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onPartnerAgentCodeChanged: (code) {
|
||||
setState(() {
|
||||
@ -505,11 +523,13 @@ class policylistState extends ConsumerState<policylist> {
|
||||
setState(() {
|
||||
SelectedStatus = val; // update parent
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onInsurerChanged: (val) {
|
||||
setState(() {
|
||||
SelectedInsurer = val; // update parent
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
formKey: _formKey,
|
||||
isMobile: ResponsiveLayout.isMobile(context),
|
||||
@ -539,7 +559,10 @@ class policylistState extends ConsumerState<policylist> {
|
||||
id: userId,
|
||||
onFilterStaff: (val) {
|
||||
print('Selected Filterd STAFF Id - $val');
|
||||
SelectedStaffId = val;
|
||||
setState(() {
|
||||
SelectedStaffId = val;
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onStaffAgentCodeChanged: (code) {
|
||||
setState(() {
|
||||
@ -551,6 +574,7 @@ class policylistState extends ConsumerState<policylist> {
|
||||
setState(() {
|
||||
SelectedPartnerId = id;
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onPartnerAgentCodeChanged: (code) {
|
||||
setState(() {
|
||||
@ -566,11 +590,13 @@ class policylistState extends ConsumerState<policylist> {
|
||||
setState(() {
|
||||
SelectedStatus = val; // update parent
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
onInsurerChanged: (val) {
|
||||
setState(() {
|
||||
SelectedInsurer = val; // update parent
|
||||
});
|
||||
_resetSearchField();
|
||||
},
|
||||
formKey: _formKey,
|
||||
isMobile: ResponsiveLayout.isMobile(context),
|
||||
|
||||
@ -484,6 +484,7 @@ class _CompactDateRangeDialogState extends State<_CompactDateRangeDialog> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.close, size: 22),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user