mpin issue fix and claims history fix
This commit is contained in:
parent
0e9b2ebf6d
commit
edb8423099
@ -19,12 +19,12 @@ if (project.hasProperty('google-services.json')) {
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '55'
|
||||
flutterVersionCode = '57'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '2.0.17'
|
||||
flutterVersionName = '2.0.19'
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
|
||||
@ -102,16 +102,21 @@ Future<String?> tokenRedirectLogic(
|
||||
print('hasToken : $hasToken');
|
||||
final location = state.matchedLocation;
|
||||
|
||||
// ✅ If user is already logged in, never allow returning to OTP/login screens.
|
||||
print('Location: $location');
|
||||
print('hasToken: $hasToken');
|
||||
|
||||
// Already logged in → prevent guest pages
|
||||
if (hasToken && guestRoutes.contains(location)) {
|
||||
return '/home';
|
||||
}
|
||||
|
||||
// ✅ If not logged in and trying to access a protected route, force login.
|
||||
// Not logged in → allow guest pages directly
|
||||
if (!hasToken && guestRoutes.contains(location)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Protected route without token
|
||||
if (!hasToken && !guestRoutes.contains(location)) {
|
||||
print('!!!!hasToken : $hasToken');
|
||||
await SessionManager().clear();
|
||||
// Show toast once
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
ToastHelper.showErrorToast(
|
||||
context, 'Session expired. Please login again.');
|
||||
|
||||
@ -210,7 +210,8 @@ import '../service/popup_helper.dart';
|
||||
flex: 12,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
context.pop(); // context.go('/claims');
|
||||
// context.pop(); //
|
||||
context.go('/claims');
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
|
||||
@ -457,7 +457,7 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup>
|
||||
],
|
||||
),
|
||||
|
||||
SizedBox(height: Responsive.isDesktop(context) ? 10 : 6),
|
||||
SizedBox(height: 10),
|
||||
|
||||
// BODY: for mobile we will show either the Claim content or full IR Docs content (switch)
|
||||
// for desktop we show Row with left content and optional right panel
|
||||
@ -512,15 +512,24 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup>
|
||||
// Main left content extracted to keep code tidy
|
||||
// -------------------------
|
||||
Widget _buildMainLeftContent({Key? key}) {
|
||||
return SingleChildScrollView(
|
||||
return Align(
|
||||
alignment: Alignment.topLeft,
|
||||
child: SingleChildScrollView(
|
||||
key: key,
|
||||
padding: EdgeInsets.zero,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// Claim Details card (unchanged)
|
||||
if(!widget.isRetailPolicy)
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
|
||||
margin: EdgeInsets.only(
|
||||
left: 16,
|
||||
right: 16,
|
||||
top: 0,
|
||||
bottom: 6,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@ -715,7 +724,7 @@ class _ClaimHistoryPopupState extends State<ClaimHistoryPopup>
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
));
|
||||
}
|
||||
|
||||
Widget buildIRDocsContent({
|
||||
|
||||
@ -150,6 +150,9 @@ class _pinSettingPageState extends State<pinSettingPage> {
|
||||
// Navigator.pushReplacementNamed(context, 'empDetails');
|
||||
}
|
||||
} else {
|
||||
setState(() {
|
||||
_isPinSaved = false; // ✅ unlock again
|
||||
});
|
||||
ToastHelper.showErrorToast(
|
||||
context, 'Biometric authentication failed');
|
||||
}
|
||||
|
||||
@ -17,8 +17,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
#version: 1.0.32+32
|
||||
version: 1.0.30+35
|
||||
#version: 2.0.17+55
|
||||
version: 1.0.31+37
|
||||
#version: 2.0.19+57
|
||||
|
||||
environment:
|
||||
sdk: '>=3.3.3 <4.0.0'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user