CHANGE_
This commit is contained in:
parent
17280b1bb8
commit
653dd27018
Binary file not shown.
4649
lib/addons.dart
4649
lib/addons.dart
File diff suppressed because it is too large
Load Diff
@ -15,7 +15,7 @@ class CustomAppBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
|
||||
class _CustomAppBarState extends State<CustomAppBar> {
|
||||
bool showBackToHR = true;
|
||||
bool hideInactiveStatus = true;
|
||||
// bool hideInactiveStatus = true;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@ -32,7 +32,7 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
showBackToHR = (hrtoken != null && hrtoken.isNotEmpty) &&
|
||||
(token != null && token.isNotEmpty);
|
||||
|
||||
hideInactiveStatus = token != null && token.isNotEmpty;
|
||||
// hideInactiveStatus = token != null && token.isNotEmpty;
|
||||
});
|
||||
}
|
||||
|
||||
@ -113,14 +113,14 @@ class _CustomAppBarState extends State<CustomAppBar> {
|
||||
Container(), // Set an empty container as we have the logo separately
|
||||
title: Text(''),
|
||||
navBarItems: [
|
||||
if (Responsive.isDesktop(context))
|
||||
if (hideInactiveStatus)
|
||||
NavBarItem(
|
||||
text: "Inactive Policy",
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, 'oldPolicy');
|
||||
},
|
||||
),
|
||||
// if (Responsive.isDesktop(context))
|
||||
// if (hideInactiveStatus)
|
||||
// NavBarItem(
|
||||
// text: "Inactive Policy",
|
||||
// onTap: () {
|
||||
// Navigator.pushNamed(context, 'oldPolicy');
|
||||
// },
|
||||
// ),
|
||||
if (showBackToHR)
|
||||
NavBarItem(
|
||||
text: "Back To HR",
|
||||
|
||||
23
lib/customAppBar/customFooter.dart
Normal file
23
lib/customAppBar/customFooter.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CustomFooter extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
color: Color(0xFFFFFBDE), // Background color of the footer
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'Copyright@ 2024 Nhance - Jubiliant',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey[600], // Text color
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -17,6 +17,8 @@ import 'dart:async';
|
||||
import 'package:nhancepolicy/responsive.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
import 'customAppBar/customFooter.dart';
|
||||
|
||||
class empDetails extends StatefulWidget {
|
||||
const empDetails({Key? key}) : super(key: key);
|
||||
|
||||
@ -682,6 +684,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
children: [
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 75,
|
||||
@ -753,6 +756,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
SizedBox(height: 16),
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
@ -798,6 +802,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
children: [
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 75,
|
||||
@ -870,6 +875,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
if (gpaPolicies != null && gpaPolicies.length > 0)
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(30)
|
||||
@ -1224,6 +1230,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
if (gmcPolicies != null && gmcPolicies.length > 0)
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 75,
|
||||
@ -1266,13 +1273,14 @@ class _empDetailsState extends State<empDetails> {
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isLoading)
|
||||
Container(
|
||||
color: Color(0xFFFFFCE5), // Semi-transparent background
|
||||
color: Color(0x98FFFCE5), // Semi-transparent background
|
||||
child: Center(
|
||||
child: // Your GIF loader widget
|
||||
Image.asset(
|
||||
@ -1281,6 +1289,13 @@ class _empDetailsState extends State<empDetails> {
|
||||
'assets/nhance-loader.gif'), // Adjust path to your GIF loader
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
width: double.infinity, // Make the footer full width
|
||||
child: CustomFooter(),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
}
|
||||
@ -1348,6 +1363,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
child: SingleChildScrollView(
|
||||
child: Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(30)
|
||||
@ -1602,6 +1618,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
child: SingleChildScrollView(
|
||||
child: Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(30)
|
||||
@ -2216,6 +2233,7 @@ class _empDetailsState extends State<empDetails> {
|
||||
|
||||
Widget card = Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(30)
|
||||
|
||||
3193
lib/empReview.dart
3193
lib/empReview.dart
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -11,6 +11,7 @@ import 'package:nhancepolicy/service/api_service.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'customAppBar/customAppBar.dart';
|
||||
import 'customAppBar/customFooter.dart';
|
||||
import 'customAppBar/toastHelper.dart';
|
||||
import 'package:universal_html/html.dart' as html;
|
||||
import 'package:intl/intl.dart';
|
||||
@ -24,10 +25,10 @@ class hrDashboard extends StatefulWidget {
|
||||
|
||||
class _hrDashboardState extends State<hrDashboard> {
|
||||
late ApiService apiService;
|
||||
bool isLoading = true;
|
||||
bool isLoading = false;
|
||||
late String _token;
|
||||
dynamic getPolicyNo;
|
||||
bool _isLoading = false;
|
||||
// bool _isLoading = false;
|
||||
dynamic getPolicyNameDetails;
|
||||
dynamic clintID;
|
||||
dynamic policy_name;
|
||||
@ -41,17 +42,18 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
Color(0xFFDBFFDE),
|
||||
Color(0xFFE4DFFF),
|
||||
];
|
||||
ScrollController _scrollController = ScrollController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
apiService = ApiService(context); // Initialize ApiService here
|
||||
_loadToken();
|
||||
Future.delayed(Duration(seconds: 3), () {
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
});
|
||||
// Future.delayed(Duration(seconds: 3), () {
|
||||
// setState(() {
|
||||
// isLoading = false;
|
||||
// });
|
||||
// });
|
||||
}
|
||||
|
||||
@override
|
||||
@ -134,9 +136,10 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
}
|
||||
|
||||
Future<void> getCashDepositDetails(String clintID) async {
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
isLoading = true;
|
||||
// setState(() {
|
||||
// _isLoading = true;
|
||||
// });
|
||||
try {
|
||||
if (clintID == null || empRefId == null) {
|
||||
return;
|
||||
@ -144,6 +147,7 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
final response =
|
||||
await apiService.getCashDepositDetailsToApi(clintID!, empRefId!);
|
||||
if (response['status'] == 'success') {
|
||||
isLoading = false;
|
||||
setState(() {
|
||||
getCardArrays = List<Map<String, dynamic>>.from(response['data']);
|
||||
print(getCardArrays);
|
||||
@ -223,12 +227,13 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
SingleChildScrollView(
|
||||
child: Container(
|
||||
padding:
|
||||
EdgeInsets.only(top: 30, bottom: 30, left: 50, right: 50),
|
||||
EdgeInsets.only(top: 30, bottom: 200, left: 50, right: 50),
|
||||
color: Color(0xFFEFF3F6),
|
||||
child: Column(
|
||||
children: [
|
||||
Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
height: 75,
|
||||
@ -298,321 +303,335 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
// if (getCardArrays.length != 0)
|
||||
// Card(
|
||||
// elevation: 0,
|
||||
// color: Colors.white,
|
||||
// child: Container(
|
||||
// width: double.infinity,
|
||||
// padding: Responsive.isDesktop(context)
|
||||
// ? EdgeInsets.all(20)
|
||||
// : EdgeInsets.all(
|
||||
// 10), // Add padding to the container
|
||||
// child: Column(children: [
|
||||
// Row(children: [
|
||||
// Text(
|
||||
// 'Cash Transaction',
|
||||
// style: GoogleFonts.poppins(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
// )
|
||||
// ]),
|
||||
// SizedBox(height: 8),
|
||||
// Row(
|
||||
// children: [
|
||||
// // Create an Expanded widget with flex of 4 for each card
|
||||
// for (var cardData in getCardArrays)
|
||||
// Container(
|
||||
// width:
|
||||
// 300, // Set a fixed width for the card
|
||||
// height: cardHeight,
|
||||
// child: Card(
|
||||
// elevation: 3,
|
||||
// color: cardColors[
|
||||
// getCardArrays.indexOf(cardData) %
|
||||
// cardColors.length],
|
||||
// child: Column(
|
||||
// crossAxisAlignment:
|
||||
// CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// ListTile(
|
||||
// title: SizedBox(
|
||||
// height: 50,
|
||||
// child: Text(
|
||||
// cardData['insurerName'],
|
||||
// style: GoogleFonts.poppins(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.w500,
|
||||
// color: Color(0xFF000000),
|
||||
// height: 1.5,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// subtitle: Text(
|
||||
// 'Balance: ₹ ${cardData['balance']}',
|
||||
// style: GoogleFonts.poppins(
|
||||
// fontSize: 16,
|
||||
// fontWeight: FontWeight.w400,
|
||||
// color: Color(0xFF000000),
|
||||
// height: 1.5,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 10),
|
||||
// Padding(
|
||||
// padding: EdgeInsets.symmetric(
|
||||
// horizontal: 15),
|
||||
// child: GestureDetector(
|
||||
// onTap: () {
|
||||
// openForm(
|
||||
// cardData['depositData'],
|
||||
// cardData['insurerName'],
|
||||
// cardData['clientId'],
|
||||
// cardData['insurerId'],
|
||||
// cardColors[getCardArrays
|
||||
// .indexOf(cardData) %
|
||||
// cardColors.length],
|
||||
// );
|
||||
// },
|
||||
// child: MouseRegion(
|
||||
// cursor:
|
||||
// SystemMouseCursors.click,
|
||||
// child: Align(
|
||||
// alignment:
|
||||
// Alignment.centerRight,
|
||||
// child: Text(
|
||||
// 'View Details',
|
||||
// style:
|
||||
// GoogleFonts.poppins(
|
||||
// color:
|
||||
// Color(0xFF000000),
|
||||
// fontSize: 14,
|
||||
// fontWeight:
|
||||
// FontWeight.w300,
|
||||
// height: 1.5,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ])),
|
||||
// ),
|
||||
// SizedBox(height: 16),
|
||||
if (getCardArrays.length != 0)
|
||||
Card(
|
||||
elevation: 0,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(20)
|
||||
: EdgeInsets.all(
|
||||
10), // Add padding to the container
|
||||
child: Column(children: [
|
||||
Row(children: [
|
||||
Text(
|
||||
'Cash Transaction',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black,
|
||||
),
|
||||
)
|
||||
]),
|
||||
SizedBox(height: 8),
|
||||
color: Colors.white,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(20)
|
||||
: EdgeInsets.all(10),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
// Create an Expanded widget with flex of 4 for each card
|
||||
for (var cardData in getCardArrays)
|
||||
Container(
|
||||
width:
|
||||
300, // Set a fixed width for the card
|
||||
height: cardHeight,
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color: cardColors[
|
||||
getCardArrays.indexOf(cardData) %
|
||||
cardColors.length],
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
ListTile(
|
||||
title: SizedBox(
|
||||
height: 50,
|
||||
child: Text(
|
||||
cardData['insurerName'],
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
subtitle: Text(
|
||||
'Balance: ₹ ${cardData['balance']}',
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: List.generate(
|
||||
numExpanded,
|
||||
(index) {
|
||||
var insurerName = getCardArrays[index]
|
||||
['insurerName'];
|
||||
var policyDetails =
|
||||
getCardArrays[index]
|
||||
['policyDetails'];
|
||||
|
||||
// Determine the color for the policyDetails based on the index of the card in getCardArrays
|
||||
var cardColorIndex =
|
||||
getCardArrays.indexOf(
|
||||
getCardArrays[index]) %
|
||||
cardColors.length;
|
||||
var cardColor =
|
||||
cardColors[cardColorIndex];
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
insurerName,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 15),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
openForm(
|
||||
cardData['depositData'],
|
||||
cardData['insurerName'],
|
||||
cardData['clientId'],
|
||||
cardData['insurerId'],
|
||||
cardColors[getCardArrays
|
||||
.indexOf(cardData) %
|
||||
cardColors.length],
|
||||
);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors.click,
|
||||
child: Align(
|
||||
alignment:
|
||||
Alignment.centerRight,
|
||||
child: Text(
|
||||
'View Details',
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
color:
|
||||
Color(0xFF000000),
|
||||
fontSize: 14,
|
||||
fontWeight:
|
||||
FontWeight.w300,
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon:
|
||||
Icon(Icons.arrow_back),
|
||||
onPressed: () {
|
||||
_scrollController
|
||||
.animateTo(
|
||||
_scrollController
|
||||
.offset -
|
||||
300,
|
||||
duration: Duration(
|
||||
milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
])),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
if (getCardArrays.length != 0)
|
||||
Card(
|
||||
elevation: 0,
|
||||
child: Padding(
|
||||
padding: Responsive.isDesktop(context)
|
||||
? EdgeInsets.all(20)
|
||||
: EdgeInsets.all(10),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: List.generate(
|
||||
numExpanded,
|
||||
(index) {
|
||||
var insurerName =
|
||||
getCardArrays[index]
|
||||
['insurerName'];
|
||||
var policyDetails =
|
||||
getCardArrays[index]
|
||||
['policyDetails'];
|
||||
|
||||
// Determine the color for the policyDetails based on the index of the card in getCardArrays
|
||||
var cardColorIndex =
|
||||
getCardArrays.indexOf(
|
||||
getCardArrays[index]) %
|
||||
cardColors.length;
|
||||
var cardColor =
|
||||
cardColors[cardColorIndex];
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
insurerName,
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.black,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
SingleChildScrollView(
|
||||
scrollDirection:
|
||||
Axis.horizontal,
|
||||
controller:
|
||||
ScrollController(), // Adding ScrollController
|
||||
dragStartBehavior:
|
||||
DragStartBehavior.start,
|
||||
child: Row(
|
||||
children: List.generate(
|
||||
policyDetails.length,
|
||||
(index) => Container(
|
||||
width: 300,
|
||||
height: policyHeight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrPolicyDetails',
|
||||
arguments:
|
||||
policyDetails[
|
||||
index]);
|
||||
},
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors
|
||||
.click,
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color:
|
||||
cardColor, // Use the determined color
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
ListTile(
|
||||
title:
|
||||
SizedBox(
|
||||
height:
|
||||
50,
|
||||
child:
|
||||
Text(
|
||||
'${policyDetails[index]['policy_name']} - (${policyDetails[index]['type']})',
|
||||
style: GoogleFonts
|
||||
.poppins(
|
||||
fontSize:
|
||||
16,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
color:
|
||||
Color(0xFF000000),
|
||||
Expanded(
|
||||
child:
|
||||
SingleChildScrollView(
|
||||
scrollDirection:
|
||||
Axis.horizontal,
|
||||
controller:
|
||||
_scrollController,
|
||||
dragStartBehavior:
|
||||
DragStartBehavior
|
||||
.start,
|
||||
child: Row(
|
||||
children: List.generate(
|
||||
policyDetails.length,
|
||||
(index) => Container(
|
||||
width: 300,
|
||||
height:
|
||||
policyHeight,
|
||||
child:
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrPolicyDetails',
|
||||
arguments:
|
||||
policyDetails[
|
||||
index]);
|
||||
},
|
||||
child:
|
||||
MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors
|
||||
.click,
|
||||
child: Card(
|
||||
elevation: 3,
|
||||
color:
|
||||
cardColor,
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
ListTile(
|
||||
title:
|
||||
SizedBox(
|
||||
height:
|
||||
1.5,
|
||||
50,
|
||||
child:
|
||||
Text(
|
||||
'${policyDetails[index]['policy_name']} - (${policyDetails[index]['type']})',
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
softWrap:
|
||||
true,
|
||||
),
|
||||
),
|
||||
softWrap:
|
||||
true, // Allow text to wrap to the next line if needed
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
8),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left:
|
||||
15,
|
||||
right:
|
||||
15),
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Draft',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['membersCountOfDraft'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Enrolled',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['membersCountOfEnrolled'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Total',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['totalMembersCount'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
8),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
left:
|
||||
15,
|
||||
right:
|
||||
15),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex:
|
||||
4,
|
||||
child:
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Draft',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['membersCountOfDraft'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex:
|
||||
4,
|
||||
child:
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Enrolled',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['membersCountOfEnrolled'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex:
|
||||
4,
|
||||
child:
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Total',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
policyDetails[index]['totalMembersCount'].toString(),
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
color: Color(0xFF000000),
|
||||
height: 1.5,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
), // Adjust the horizontal padding as needed
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -620,26 +639,43 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.arrow_forward),
|
||||
onPressed: () {
|
||||
_scrollController
|
||||
.animateTo(
|
||||
_scrollController
|
||||
.offset +
|
||||
300,
|
||||
duration: Duration(
|
||||
milliseconds: 500),
|
||||
curve: Curves.easeInOut,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
))
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isLoading)
|
||||
Container(
|
||||
color: Color(0xFFFFFCE5), // Semi-transparent background
|
||||
color: Color(0x98FFFCE5), // Semi-transparent background
|
||||
child: Center(
|
||||
child: // Your GIF loader widget
|
||||
Image.asset(
|
||||
@ -648,6 +684,13 @@ class _hrDashboardState extends State<hrDashboard> {
|
||||
'assets/nhance-loader.gif'), // Adjust path to your GIF loader
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
width: double.infinity, // Make the footer full width
|
||||
child: CustomFooter(),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -267,7 +267,7 @@ class _MyPhoneState extends State<MyHrLogin> {
|
||||
return Image.asset(
|
||||
'assets/hrLogin.jpg',
|
||||
height: _size.height,
|
||||
fit: BoxFit.fill,
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
} else {
|
||||
return SizedBox();
|
||||
@ -327,23 +327,23 @@ class _MyPhoneState extends State<MyHrLogin> {
|
||||
flex: 8,
|
||||
child: Align(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align to the start
|
||||
.topRight, // Align to the start
|
||||
child: _size.width <= 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final-mobile.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: _size.width > 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
),
|
||||
)),
|
||||
],
|
||||
@ -598,42 +598,49 @@ class _MyPhoneState extends State<MyHrLogin> {
|
||||
SizedBox(
|
||||
height: _size.height * 0.1,
|
||||
),
|
||||
Container(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: TextStyle(
|
||||
child: Container(
|
||||
width: double
|
||||
.infinity, // Make the footer full width
|
||||
child: Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -19,6 +19,8 @@ import 'package:excel/excel.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import 'customAppBar/customFooter.dart';
|
||||
|
||||
class hrPolicyDetails extends StatefulWidget {
|
||||
const hrPolicyDetails({Key? key}) : super(key: key);
|
||||
|
||||
@ -31,6 +33,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
Uint8List? fileBytes;
|
||||
late String _token;
|
||||
List<Map<String, dynamic>> getEmpDependenceByClintId = [];
|
||||
bool isLoading = false;
|
||||
bool _isLoading = false;
|
||||
// dynamic clintID;
|
||||
late TabController _tabController;
|
||||
@ -133,6 +136,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
}
|
||||
|
||||
Future<void> getEmployeeAndDependence(clintID, getPolicyNo) async {
|
||||
isLoading = true;
|
||||
setState(() {
|
||||
_isLoading = true;
|
||||
});
|
||||
@ -140,6 +144,7 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
final response = await apiService.getEmployeeAndDependenceToApi(
|
||||
clintID!, getPolicyNo!, empRefId!);
|
||||
if (response['status'] == 'success') {
|
||||
isLoading = false;
|
||||
setState(() {
|
||||
getEmpDependenceByClintId =
|
||||
List<Map<String, dynamic>>.from(response['data']);
|
||||
@ -293,176 +298,336 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
if (filteredData == []) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(),
|
||||
body: SingleChildScrollView(
|
||||
child: Container(
|
||||
color: Color(0xFFEFF3F6),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text('No Data Available'),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
} else {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(),
|
||||
body: Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
color: Color(0xFFEFF3F6),
|
||||
child: Card(
|
||||
elevation: 0,
|
||||
child: SingleChildScrollView(
|
||||
body: Stack(children: [
|
||||
SingleChildScrollView(
|
||||
child: Container(
|
||||
color: Color(0xFFEFF3F6),
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: _isLoading
|
||||
? Center(child: CircularProgressIndicator())
|
||||
: originalData.isNotEmpty
|
||||
? SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(
|
||||
10), // Set your desired padding
|
||||
color: Color(
|
||||
0xFFE26728), // Set your desired background color
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerLeft, // Align text to the center
|
||||
child: Text(
|
||||
'$policyName - ($policyType)',
|
||||
textAlign: TextAlign
|
||||
.center, // Align text to the center
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align text to the center
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrDashboard');
|
||||
},
|
||||
child: Icon(
|
||||
Icons
|
||||
.close, // Replace with your desired icon
|
||||
color: Colors
|
||||
.white, // Replace with your desired icon color
|
||||
child: Text('No Data Available'),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
if (isLoading)
|
||||
Container(
|
||||
color: Color(0x98FFFCE5), // Semi-transparent background
|
||||
child: Center(
|
||||
child: // Your GIF loader widget
|
||||
Image.asset(
|
||||
height: 60,
|
||||
width: 60,
|
||||
'assets/nhance-loader.gif'), // Adjust path to your GIF loader
|
||||
),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
width: double.infinity, // Make the footer full width
|
||||
child: CustomFooter(),
|
||||
),
|
||||
),
|
||||
]));
|
||||
} else {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
color: Color(0xFFEFF3F6),
|
||||
child: Card(
|
||||
elevation: 0,
|
||||
color: Colors.white,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20),
|
||||
child: _isLoading
|
||||
? Center(child: CircularProgressIndicator())
|
||||
: originalData.isNotEmpty
|
||||
? SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(
|
||||
10), // Set your desired padding
|
||||
color: Color(
|
||||
0xFFE26728), // Set your desired background color
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerLeft, // Align text to the center
|
||||
child: Text(
|
||||
'$policyName - ($policyType)',
|
||||
textAlign: TextAlign
|
||||
.center, // Align text to the center
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align text to the center
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors
|
||||
.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrDashboard');
|
||||
},
|
||||
child: Icon(
|
||||
Icons
|
||||
.close, // Replace with your desired icon
|
||||
color: Colors
|
||||
.white, // Replace with your desired icon color
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: (policyType == 'GPA' ||
|
||||
policyType == 'GMC')
|
||||
? 8
|
||||
: 10,
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: (policyType == 'GPA' ||
|
||||
policyType == 'GMC')
|
||||
? 8
|
||||
: 10,
|
||||
child: Container(
|
||||
width:
|
||||
350, // Set your desired width here
|
||||
height:
|
||||
40, // Set your desired height here
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
0.5), // Shadow color with opacity
|
||||
offset: Offset(5,
|
||||
5), // Shadow position (horizontal, vertical)
|
||||
blurRadius:
|
||||
10, // Blur radius
|
||||
spreadRadius:
|
||||
0, // Spread radius
|
||||
alignment:
|
||||
Alignment.centerLeft,
|
||||
child: Container(
|
||||
width:
|
||||
350, // Set your desired width here
|
||||
height:
|
||||
40, // Set your desired height here
|
||||
decoration: BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(
|
||||
255,
|
||||
255,
|
||||
255,
|
||||
0.5), // Shadow color with opacity
|
||||
offset: Offset(5,
|
||||
5), // Shadow position (horizontal, vertical)
|
||||
blurRadius:
|
||||
10, // Blur radius
|
||||
spreadRadius:
|
||||
0, // Spread radius
|
||||
),
|
||||
],
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(5),
|
||||
),
|
||||
child: TextField(
|
||||
textAlignVertical:
|
||||
TextAlignVertical
|
||||
.center, // Center the text vertically
|
||||
decoration:
|
||||
InputDecoration(
|
||||
hintText: 'Search',
|
||||
suffixIcon: Icon(
|
||||
Icons.search),
|
||||
contentPadding:
|
||||
EdgeInsets.all(
|
||||
10), // Adjust the horizontal padding
|
||||
border:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(
|
||||
0xFFf5f5f7)), // Set border color to gray
|
||||
),
|
||||
),
|
||||
controller:
|
||||
searchController,
|
||||
onChanged:
|
||||
search, // Call the search method on text change
|
||||
),
|
||||
)),
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
alignment:
|
||||
Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
{downloadExcel()},
|
||||
child: Text(
|
||||
'Export',
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.white),
|
||||
),
|
||||
style: ElevatedButton
|
||||
.styleFrom(
|
||||
backgroundColor:
|
||||
Color(
|
||||
0xFFE26728),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
5),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5),
|
||||
),
|
||||
child: TextField(
|
||||
textAlignVertical:
|
||||
TextAlignVertical
|
||||
.center, // Center the text vertically
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search',
|
||||
suffixIcon:
|
||||
Icon(Icons.search),
|
||||
contentPadding:
|
||||
EdgeInsets.all(
|
||||
10), // Adjust the horizontal padding
|
||||
border:
|
||||
OutlineInputBorder(
|
||||
borderSide: BorderSide(
|
||||
color: Color(
|
||||
0xFFf5f5f7)), // Set border color to gray
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (policyType == 'GPA' ||
|
||||
policyType == 'GMC')
|
||||
? 5
|
||||
: 0),
|
||||
if ((policyType == 'GPA' ||
|
||||
policyType == 'GMC') &&
|
||||
inceptionType == 2)
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
alignment:
|
||||
Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
_uploadFile(
|
||||
policyType),
|
||||
child: Text(
|
||||
'Import Data',
|
||||
style: TextStyle(
|
||||
color: Colors
|
||||
.white),
|
||||
),
|
||||
style:
|
||||
ElevatedButton
|
||||
.styleFrom(
|
||||
backgroundColor:
|
||||
Color(
|
||||
0xFFE26728),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
5),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
controller:
|
||||
searchController,
|
||||
onChanged:
|
||||
search, // Call the search method on text change
|
||||
),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
alignment: Alignment.centerRight,
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child: _buildDataTableGPA(
|
||||
context),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
))
|
||||
: Container(
|
||||
height:
|
||||
MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(
|
||||
10), // Set your desired padding
|
||||
color: Color(
|
||||
0xFFE26728), // Set your desired background color
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
{downloadExcel()},
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerLeft, // Align text to the center
|
||||
child: Text(
|
||||
'Export',
|
||||
style: TextStyle(
|
||||
color:
|
||||
Colors.white),
|
||||
(policyName != null &&
|
||||
policyType !=
|
||||
null)
|
||||
? '$policyName - ($policyType)'
|
||||
: '',
|
||||
textAlign: TextAlign
|
||||
.center, // Align text to the center
|
||||
style:
|
||||
GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
style: ElevatedButton
|
||||
.styleFrom(
|
||||
backgroundColor:
|
||||
Color(0xFFE26728),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(5),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align text to the center
|
||||
child: MouseRegion(
|
||||
cursor:
|
||||
SystemMouseCursors
|
||||
.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrDashboard');
|
||||
},
|
||||
child: Icon(
|
||||
Icons
|
||||
.close, // Replace with your desired icon
|
||||
color: Colors
|
||||
.white, // Replace with your desired icon color
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -470,172 +635,70 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (policyType == 'GPA' ||
|
||||
policyType == 'GMC')
|
||||
? 5
|
||||
: 0),
|
||||
if ((policyType == 'GPA' ||
|
||||
policyType == 'GMC') &&
|
||||
inceptionType == 2)
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: Container(
|
||||
alignment:
|
||||
Alignment.centerRight,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
_uploadFile(
|
||||
policyType),
|
||||
child: Text(
|
||||
'Import Data',
|
||||
style: TextStyle(
|
||||
color:
|
||||
Colors.white),
|
||||
),
|
||||
style: ElevatedButton
|
||||
.styleFrom(
|
||||
backgroundColor:
|
||||
Color(0xFFE26728),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(
|
||||
5),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
child:
|
||||
_buildDataTableGPA(context),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
))
|
||||
: Container(
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(
|
||||
10), // Set your desired padding
|
||||
color: Color(
|
||||
0xFFE26728), // Set your desired background color
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerLeft, // Align text to the center
|
||||
SizedBox(height: 200),
|
||||
if (inceptionType == 2)
|
||||
Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
_uploadFile(policyType),
|
||||
child: Text(
|
||||
(policyName != null &&
|
||||
policyType != null)
|
||||
? '$policyName - ($policyType)'
|
||||
: '',
|
||||
textAlign: TextAlign
|
||||
.center, // Align text to the center
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight:
|
||||
FontWeight.w500,
|
||||
color: Colors.white,
|
||||
'Import Data',
|
||||
style: TextStyle(
|
||||
color: Colors.white),
|
||||
),
|
||||
style:
|
||||
ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
Color(0xFFE26728),
|
||||
shape:
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
5),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Container(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align text to the center
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors
|
||||
.click,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
'hrDashboard');
|
||||
},
|
||||
child: Icon(
|
||||
Icons
|
||||
.close, // Replace with your desired icon
|
||||
color: Colors
|
||||
.white, // Replace with your desired icon color
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
Center(
|
||||
child: Text(
|
||||
'No Data Available',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
letterSpacing: 0,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 200),
|
||||
if (inceptionType == 2)
|
||||
Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: () =>
|
||||
_uploadFile(policyType),
|
||||
child: Text(
|
||||
'Import Data',
|
||||
style: TextStyle(
|
||||
color: Colors.white),
|
||||
),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
Color(0xFFE26728),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
else
|
||||
Center(
|
||||
child: Text(
|
||||
'No Data Available',
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
letterSpacing: 0,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
)),
|
||||
),
|
||||
if (isLoading)
|
||||
Container(
|
||||
color: Color(0x98FFFCE5), // Semi-transparent background
|
||||
child: Center(
|
||||
child: // Your GIF loader widget
|
||||
Image.asset(
|
||||
height: 60,
|
||||
width: 60,
|
||||
'assets/nhance-loader.gif'), // Adjust path to your GIF loader
|
||||
),
|
||||
)),
|
||||
),
|
||||
);
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
child: Container(
|
||||
width: double.infinity, // Make the footer full width
|
||||
child: CustomFooter(),
|
||||
),
|
||||
),
|
||||
]));
|
||||
}
|
||||
}
|
||||
|
||||
@ -645,7 +708,8 @@ class _HrPolicyDetailsState extends State<hrPolicyDetails>
|
||||
return Text('No available data');
|
||||
} else {
|
||||
return Card(
|
||||
elevation: 0, // Set elevation to 0 for no shadow
|
||||
elevation: 0,
|
||||
color: Colors.white, // Set elevation to 0 for no shadow
|
||||
child: PaginatedDataTable(
|
||||
rowsPerPage: 25, // Adjust rows per page as needed
|
||||
columns: [
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:nhancepolicy/customAppBar/toastHelper.dart';
|
||||
import 'package:nhancepolicy/models/environment.dart';
|
||||
import 'package:pinput/pinput.dart';
|
||||
@ -404,7 +405,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
return Image.asset(
|
||||
'assets/hrLogin.jpg',
|
||||
height: _size.height,
|
||||
fit: BoxFit.fill,
|
||||
fit: BoxFit.cover,
|
||||
);
|
||||
} else {
|
||||
return SizedBox();
|
||||
@ -429,23 +430,23 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
flex: 8,
|
||||
child: Align(
|
||||
alignment: Alignment
|
||||
.centerRight, // Align to the start
|
||||
.topRight, // Align to the start
|
||||
child: _size.width <= 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final-mobile.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: _size.width > 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
),
|
||||
)),
|
||||
],
|
||||
@ -462,7 +463,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
children: [
|
||||
Text(
|
||||
"Welcome to Nhance",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@ -481,14 +482,14 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
text: TextSpan(
|
||||
text:
|
||||
"Please enter the one-time usage code sent to your mobile number $mobileNumber",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
height: 1.5,
|
||||
color: Color(0xFF000000)),
|
||||
children: [
|
||||
TextSpan(
|
||||
text: " (Change Number)",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 12,
|
||||
color: Color(
|
||||
0xFFE26728)), // Change color as desired
|
||||
@ -531,7 +532,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
_isTimerRunning
|
||||
? Text(
|
||||
"Resend OTP in $_secondsRemaining seconds",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black),
|
||||
)
|
||||
: InkWell(
|
||||
@ -540,7 +541,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
},
|
||||
child: Text(
|
||||
"Resend OTP",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.blue),
|
||||
),
|
||||
),
|
||||
@ -574,7 +575,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
},
|
||||
child: Text(
|
||||
"Submit",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFFFFFFFF)),
|
||||
),
|
||||
),
|
||||
@ -592,7 +593,7 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
SizedBox(height: 30),
|
||||
Text(
|
||||
"Benefits of Login",
|
||||
style: TextStyle(
|
||||
style: GoogleFonts.poppins(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
@ -687,42 +688,49 @@ class _MyVerifyState extends State<MyHrVerify> {
|
||||
SizedBox(
|
||||
height: _size.height * 0.1,
|
||||
),
|
||||
Container(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: TextStyle(
|
||||
child: Container(
|
||||
width: double
|
||||
.infinity, // Make the footer full width
|
||||
child: Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: TextStyle(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -273,25 +273,25 @@ class _MyPhoneState extends State<MyPhone> {
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(
|
||||
context)
|
||||
? Alignment.centerLeft
|
||||
? Alignment.topLeft
|
||||
: Alignment
|
||||
.bottomCenter, // Align to the start
|
||||
child: _size.width <= 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final-mobile.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: _size.width > 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
),
|
||||
)),
|
||||
Expanded(
|
||||
@ -581,42 +581,49 @@ class _MyPhoneState extends State<MyPhone> {
|
||||
SizedBox(
|
||||
height: _size.height * 0.1,
|
||||
),
|
||||
Container(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
child: Container(
|
||||
width: double
|
||||
.infinity, // Make the footer full width
|
||||
child: Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -32,7 +32,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getClientDetails?client_id=$clientId&emp_code=$empCode&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -47,7 +47,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getEmployeeProfile?emp_code=$empCode&client_id=$clientId&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -60,7 +60,7 @@ class ApiService {
|
||||
}
|
||||
final url = Uri.parse('${Environment.apiUrl}relationshipList');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -75,7 +75,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getEmployeePolicy?id=$empPrimaryId&emp_code=$empCode&client_id=$clientId&policy=$policy&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -90,7 +90,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getEmployeePolicy?id=$empPrimaryId&emp_code=$empCode&client_id=$clientId&policy=$policy&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -105,7 +105,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getAddOnPolicy?client_id=$client_id&emp_code=$emp_code&policy=$policy&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -120,7 +120,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getAddOnPolicy?client_id=$client_id&emp_code=$emp_code&policy=$policy&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -135,7 +135,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getAddOnPolicy?client_id=$client_id&emp_code=$emp_code&policy=$policy&client_branch_id=$branchID');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -150,7 +150,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}removeEmpAndEmpPolicyData?emp_code=$empCodeString&client_policy_id=$addOnsDependentClientPolicyId');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -165,7 +165,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}removeEmpAndEmpPolicyData?emp_code=$empCodeString&client_policy_id=$topUpClientPolicyId');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -180,7 +180,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}removeEmpAndEmpPolicyData?emp_code=$empCodeString&client_policy_id=$topUpParentClientPolicyId');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -193,7 +193,7 @@ class ApiService {
|
||||
}
|
||||
final url = Uri.parse('${Environment.apiUrl}deleteDependence?id=$id');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -208,7 +208,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}addEmployeeAndDependence');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -229,7 +229,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}addEmployeeAndDependence');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -251,7 +251,7 @@ class ApiService {
|
||||
final url =
|
||||
Uri.parse('${Environment.apiUrl}createOrUpdateEmployeePolicySiAmount');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -273,7 +273,7 @@ class ApiService {
|
||||
final url =
|
||||
Uri.parse('${Environment.apiUrl}createOrUpdateEmployeePolicySiAmount');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -295,7 +295,7 @@ class ApiService {
|
||||
final url =
|
||||
Uri.parse('${Environment.apiUrl}createOrUpdateEmployeePolicySiAmount');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -316,7 +316,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}iAgreeForAddOn');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -336,7 +336,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}calculatePremium');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -357,7 +357,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}calculatePremium');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -378,7 +378,7 @@ class ApiService {
|
||||
|
||||
final url = Uri.parse('${Environment.apiUrl}calculatePremium');
|
||||
final headers = {
|
||||
'Authorization': _token ?? '',
|
||||
'Authorization': 'Bearer $_token' ?? '',
|
||||
'Content-Type': 'application/json', // Ensure content type is JSON
|
||||
};
|
||||
|
||||
@ -401,7 +401,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getCashDepositData?client_id=$clintID&client_branch_id=$empRefId');
|
||||
final headers = {
|
||||
'Authorization': _hrtoken ?? '',
|
||||
'Authorization': 'Bearer $_hrtoken' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
@ -416,7 +416,7 @@ class ApiService {
|
||||
final url = Uri.parse(
|
||||
'${Environment.apiUrl}getEmployeeAndDependenceByClientId?client_id=$clintID&client_policy_id=$getPolicyNo&client_branch_id=$empRefId');
|
||||
final headers = {
|
||||
'Authorization': _hrtoken ?? '',
|
||||
'Authorization': 'Bearer $_hrtoken' ?? '',
|
||||
};
|
||||
final response = await _makeGetRequest(url, headers);
|
||||
return response;
|
||||
|
||||
@ -397,25 +397,25 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
child: Align(
|
||||
alignment: Responsive.isDesktop(
|
||||
context)
|
||||
? Alignment.centerLeft
|
||||
? Alignment.topLeft
|
||||
: Alignment
|
||||
.bottomCenter, // Align to the start
|
||||
child: _size.width <= 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final-mobile.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: _size.width > 1100
|
||||
? Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/Nhance-Logo-Final 1.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
height: 70,
|
||||
),
|
||||
)),
|
||||
],
|
||||
@ -658,42 +658,49 @@ class _MyVerifyState extends State<MyVerify> {
|
||||
SizedBox(
|
||||
height: _size.height * 0.1,
|
||||
),
|
||||
Container(
|
||||
Align(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
child: Container(
|
||||
width: double
|
||||
.infinity, // Make the footer full width
|
||||
child: Container(
|
||||
alignment: Alignment.bottomCenter,
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 8),
|
||||
child: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
text:
|
||||
'By continuing, you agree with our ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: 'privacy policy ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'and ',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Colors.black,
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
TextSpan(
|
||||
text: 'terms of use',
|
||||
style: GoogleFonts.poppins(
|
||||
color: Color(0xFF00989E),
|
||||
fontSize: 9,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@ -53,6 +53,7 @@ dependencies:
|
||||
flutter_animated_button: ^2.0.3
|
||||
spreadsheet_decoder: ^2.2.0
|
||||
url_launcher: ^6.2.6
|
||||
font_awesome_flutter: ^10.7.0
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user