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