diff --git a/.env b/.env
index 62cddb0..359dfdf 100644
--- a/.env
+++ b/.env
@@ -1,2 +1,4 @@
API_URL=https://venbait.in/nhance/dev/employeeRest/
-TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api/
\ No newline at end of file
+TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api/
+BASE_HREF=/nhance/employee/dev/
+ENV=development
\ No newline at end of file
diff --git a/.env.development b/.env.development
index 62cddb0..359dfdf 100644
--- a/.env.development
+++ b/.env.development
@@ -1,2 +1,4 @@
API_URL=https://venbait.in/nhance/dev/employeeRest/
-TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api/
\ No newline at end of file
+TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api/
+BASE_HREF=/nhance/employee/dev/
+ENV=development
\ No newline at end of file
diff --git a/.env.production b/.env.production
index 62cddb0..a96bf9f 100644
--- a/.env.production
+++ b/.env.production
@@ -1,2 +1,4 @@
-API_URL=https://venbait.in/nhance/dev/employeeRest/
-TICKET_API_URL=https://venbait.in/nhance/helpdesk/dev/api/
\ No newline at end of file
+API_URL=https://venbait.in/nhance/uat/employeeRest/
+TICKET_API_URL=https://venbait.in/nhance/helpdesk/uat/api/
+BASE_HREF=/nhance/employee/uat/
+ENV=production
\ No newline at end of file
diff --git a/.env.test b/.env.test
new file mode 100644
index 0000000..6bf47a1
--- /dev/null
+++ b/.env.test
@@ -0,0 +1,4 @@
+API_URL=https://venbait.in/nhance/test/employeeRest/
+TICKET_API_URL=https://venbait.in/nhance/helpdesk/test/api/
+BASE_HREF=/nhance/employee/test/
+ENV=test
\ No newline at end of file
diff --git a/assets/ECard.svg b/assets/ECard.svg
new file mode 100644
index 0000000..3fa7361
--- /dev/null
+++ b/assets/ECard.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/Group.png b/assets/Group.png
deleted file mode 100644
index 7777491..0000000
Binary files a/assets/Group.png and /dev/null differ
diff --git a/assets/cashLess.svg b/assets/cashLess.svg
new file mode 100644
index 0000000..120268c
--- /dev/null
+++ b/assets/cashLess.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/claimTab.svg b/assets/claimTab.svg
new file mode 100644
index 0000000..a08f2f3
--- /dev/null
+++ b/assets/claimTab.svg
@@ -0,0 +1,15 @@
+
diff --git a/assets/cliamHistory.svg b/assets/cliamHistory.svg
new file mode 100644
index 0000000..291b786
--- /dev/null
+++ b/assets/cliamHistory.svg
@@ -0,0 +1,11 @@
+
diff --git a/assets/contactUs.svg b/assets/contactUs.svg
new file mode 100644
index 0000000..685c77a
--- /dev/null
+++ b/assets/contactUs.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/fileClaims.svg b/assets/fileClaims.svg
new file mode 100644
index 0000000..c85465e
--- /dev/null
+++ b/assets/fileClaims.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/fileaclaims.svg b/assets/fileaclaims.svg
new file mode 100644
index 0000000..e93f27e
--- /dev/null
+++ b/assets/fileaclaims.svg
@@ -0,0 +1,15 @@
+
diff --git a/assets/general.svg b/assets/general.svg
new file mode 100644
index 0000000..1b09b78
--- /dev/null
+++ b/assets/general.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/helpTab.svg b/assets/helpTab.svg
new file mode 100644
index 0000000..df9b282
--- /dev/null
+++ b/assets/helpTab.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/homeTab.svg b/assets/homeTab.svg
new file mode 100644
index 0000000..5f3afdd
--- /dev/null
+++ b/assets/homeTab.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/needHelp.svg b/assets/needHelp.svg
new file mode 100644
index 0000000..74a37a2
--- /dev/null
+++ b/assets/needHelp.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/policyCoverage.svg b/assets/policyCoverage.svg
new file mode 100644
index 0000000..13797bf
--- /dev/null
+++ b/assets/policyCoverage.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/profileTab.svg b/assets/profileTab.svg
new file mode 100644
index 0000000..5d85a5a
--- /dev/null
+++ b/assets/profileTab.svg
@@ -0,0 +1,4 @@
+
diff --git a/assets/slider1.png b/assets/slider1.png
deleted file mode 100644
index 66626b4..0000000
Binary files a/assets/slider1.png and /dev/null differ
diff --git a/assets/slider2.png b/assets/slider2.png
deleted file mode 100644
index 7ad4c86..0000000
Binary files a/assets/slider2.png and /dev/null differ
diff --git a/assets/slider3.png b/assets/slider3.png
deleted file mode 100644
index a4a9cdb..0000000
Binary files a/assets/slider3.png and /dev/null differ
diff --git a/build_dev_apk.sh b/build_dev_apk.sh
new file mode 100755
index 0000000..3eeb65f
--- /dev/null
+++ b/build_dev_apk.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Define the path to the .env file for development
+ENV_FILE_PATH=".env.development"
+
+# Check if the .env file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env file for development to .env
+cp $ENV_FILE_PATH .env
+
+# Build the APK for development
+flutter build apk --debug
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/build_prod_apk.sh b/build_prod_apk.sh
new file mode 100755
index 0000000..9261516
--- /dev/null
+++ b/build_prod_apk.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Define the path to the .env file for production
+ENV_FILE_PATH=".env.production"
+
+# Check if the .env file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env file for production to .env
+cp $ENV_FILE_PATH .env
+
+# Build the APK for production
+flutter build apk --release
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/build_test_apk.sh b/build_test_apk.sh
new file mode 100755
index 0000000..ff990f3
--- /dev/null
+++ b/build_test_apk.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Define the path to the .env file for testing
+ENV_FILE_PATH=".env.test"
+
+# Check if the .env file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env file for testing to .env
+cp $ENV_FILE_PATH .env
+
+# Build the APK for testing
+flutter build apk --debug
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/build_web_dev.sh b/build_web_dev.sh
new file mode 100755
index 0000000..c6ff6ab
--- /dev/null
+++ b/build_web_dev.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Define the path to the .env.development file
+ENV_FILE_PATH=".env.development"
+
+# Check if the .env.development file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env.development file to .env
+cp $ENV_FILE_PATH .env
+
+# Check if the BASE_HREF variable exists in the .env file
+if ! grep -q BASE_HREF .env; then
+ echo "BASE_HREF not found in .env file"
+ exit 1
+fi
+
+# Extract the BASE_HREF value
+BASE_HREF=$(grep BASE_HREF .env | cut -d '=' -f2)
+
+# Check if the BASE_HREF value is empty
+if [ -z "$BASE_HREF" ]; then
+ echo "BASE_HREF value is empty"
+ exit 1
+fi
+
+# Build the web app for development with base href
+flutter build web --debug --base-href "$BASE_HREF"
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/build_web_production.sh b/build_web_production.sh
new file mode 100755
index 0000000..7463034
--- /dev/null
+++ b/build_web_production.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Define the path to the .env file for production
+ENV_FILE_PATH=".env.production"
+
+# Check if the .env file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env file for production to .env
+cp $ENV_FILE_PATH .env
+
+# Check if the BASE_HREF variable exists in the .env file
+if ! grep -q BASE_HREF .env; then
+ echo "BASE_HREF not found in .env file"
+ exit 1
+fi
+
+# Extract the BASE_HREF value
+BASE_HREF=$(grep BASE_HREF .env | cut -d '=' -f2)
+
+# Check if the BASE_HREF value is empty
+if [ -z "$BASE_HREF" ]; then
+ echo "BASE_HREF value is empty"
+ exit 1
+fi
+
+# Build the web app for production environment with base href
+flutter build web --release --base-href "$BASE_HREF"
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/build_web_test.sh b/build_web_test.sh
new file mode 100755
index 0000000..5bdc17d
--- /dev/null
+++ b/build_web_test.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Define the path to the .env file for testing
+ENV_FILE_PATH=".env.test"
+
+# Check if the .env file exists
+if [ ! -f $ENV_FILE_PATH ]; then
+ echo "$ENV_FILE_PATH does not exist"
+ exit 1
+fi
+
+# Copy the .env file for testing to .env
+cp $ENV_FILE_PATH .env
+
+# Check if the BASE_HREF variable exists in the .env file
+if ! grep -q BASE_HREF .env; then
+ echo "BASE_HREF not found in .env file"
+ exit 1
+fi
+
+# Extract the BASE_HREF value
+BASE_HREF=$(grep BASE_HREF .env | cut -d '=' -f2)
+
+# Check if the BASE_HREF value is empty
+if [ -z "$BASE_HREF" ]; then
+ echo "BASE_HREF value is empty"
+ exit 1
+fi
+
+# Build the web app for test environment with base href
+flutter build web --debug --base-href "$BASE_HREF"
+
+# Optionally, remove the .env file after the build
+# rm .env
diff --git a/lib/customAppBar/customAppBar.dart b/lib/customAppBar/customAppBar.dart
index a6ccd03..f9b7246 100644
--- a/lib/customAppBar/customAppBar.dart
+++ b/lib/customAppBar/customAppBar.dart
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:adaptive_navbar/adaptive_navbar.dart';
-import 'package:nhance_app_pwa/customAppBar/responsive.dart';
import 'package:shared_preferences/shared_preferences.dart';
+import 'package:nhance_app_pwa/customAppBar/responsive.dart';
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
@override
@@ -24,113 +24,91 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
await prefs.clear();
Navigator.pushNamed(context, 'hrLogin');
}
- // Navigator.pushNamed(context, "phone");
}
@override
Widget build(BuildContext context) {
final sw = MediaQuery.of(context).size.width;
- return Scaffold(
- backgroundColor: Color(0xFFFFFCE5), // Set background color for AppBar
- appBar: PreferredSize(
- preferredSize: preferredSize,
- child: SafeArea(
- child: Container(
- padding: Responsive.isDesktop(context)
- ? EdgeInsets.symmetric(horizontal: 16.0)
- : EdgeInsets.symmetric(horizontal: 0),
- child: Row(
- children: [
- // Logo Column
+ return ClipRRect(
+ borderRadius: Responsive.isDesktop(context)
+ ? BorderRadius.zero
+ : BorderRadius.only(
+ bottomLeft: Radius.circular(32.0),
+ bottomRight: Radius.circular(32.0),
+ ),
+ child: AppBar(
+ backgroundColor: Color(0xFFFFFBDE), // Set background color for AppBar
+ toolbarHeight: kToolbarHeight,
+ titleSpacing: 0.0,
+ automaticallyImplyLeading: false,
+ title: Padding(
+ padding: Responsive.isDesktop(context)
+ ? EdgeInsets.symmetric(horizontal: 16.0)
+ : EdgeInsets.symmetric(horizontal: 10),
+ child: Row(
+ children: [
+ // Logo Column
+ Expanded(
+ flex: Responsive.isDesktop(context) ? 3 : 9,
+ child: Row(
+ mainAxisAlignment: Responsive.isDesktop(context)
+ ? MainAxisAlignment.spaceEvenly
+ : MainAxisAlignment
+ .start, // Adjust the alignment as needed
+ children: [
+ Container(
+ margin: EdgeInsets.only(
+ top: 10, bottom: 10, left: 10, right: 10),
+ width: Responsive.isDesktop(context) ? 230 : 170,
+ height: Responsive.isDesktop(context) ? 230 : 170,
+ child: Image.asset(
+ 'assets/nhance_client_logo.png',
+ fit: BoxFit.contain, // Adjust the fit as needed
+ ),
+ ),
+ ],
+ ),
+ ),
+ // AdaptiveNavBar Column
+ if (Responsive.isDesktop(context))
Expanded(
- flex: Responsive.isDesktop(context) ? 3 : 9,
- child: Row(
- mainAxisAlignment: Responsive.isDesktop(context)
- ? MainAxisAlignment.spaceEvenly
- : MainAxisAlignment
- .start, // Adjust the alignment as needed
- children: [
- Container(
- margin: EdgeInsets.only(
- top: 10, bottom: 10, left: 10, right: 10),
- width: Responsive.isDesktop(context) ? 230 : 170,
- height: Responsive.isDesktop(context) ? 230 : 170,
- child: Image.asset(
- 'assets/nhance_client_logo.png',
- fit: BoxFit.contain, // Adjust the fit as needed
- ),
+ flex: Responsive.isDesktop(context) ? 9 : 3,
+ child: AdaptiveNavBar(
+ screenWidth: sw,
+ backgroundColor: Color(0xFFFFFBDE),
+ leading:
+ Container(), // Set an empty container as we have the logo separately
+ title: Text(''),
+ navBarItems: [
+ NavBarItem(
+ text: "Home",
+ onTap: () {
+ Navigator.pushNamed(context, 'home');
+ },
+ ),
+ NavBarItem(
+ text: "Claim",
+ onTap: () {
+ Navigator.pushNamed(context, 'claims');
+ },
+ ),
+ NavBarItem(
+ text: "Help",
+ onTap: () {
+ Navigator.pushNamed(context, 'help');
+ },
+ ),
+ NavBarItem(
+ text: "Profile",
+ onTap: () {
+ Navigator.pushNamed(context, 'profile');
+ },
),
],
),
),
- // AdaptiveNavBar Column
- if (Responsive.isDesktop(context))
- Expanded(
- flex: Responsive.isDesktop(context) ? 9 : 3,
- child: AdaptiveNavBar(
- screenWidth: sw,
- backgroundColor: Color(0xFFFFFCE5),
- leading:
- Container(), // Set an empty container as we have the logo separately
- title: Text(''),
- navBarItems: [
- NavBarItem(
- text: "Home",
- onTap: () {
- Navigator.pushNamed(context, 'home');
- },
- ),
- NavBarItem(
- text: "Claim",
- onTap: () {
- Navigator.pushNamed(context, 'claims');
- },
- ),
- NavBarItem(
- text: "Help",
- onTap: () {
- Navigator.pushNamed(context, 'help');
- },
- ),
- NavBarItem(
- text: "Profile",
- onTap: () {
- Navigator.pushNamed(context, 'profile');
- },
- ),
- ],
- ),
- ),
- // Expanded(
- // flex: Responsive.isDesktop(context) ? 1 : 3,
- // child: Column(
- // mainAxisAlignment: MainAxisAlignment.center,
- // crossAxisAlignment: CrossAxisAlignment.end,
- // children: [
- // Row(
- // mainAxisAlignment: MainAxisAlignment
- // .end, // Aligns the content to the right
- // children: [
- // Icon(Icons.notifications, color: Colors.black),
- // ],
- // ),
- // ],
- // ),
- // ),
- // SizedBox(width: Responsive.isDesktop(context) ? 10 : 3),
- // if (Responsive.isDesktop(context))
- // Expanded(
- // flex: Responsive.isDesktop(context) ? 2 : 3,
- // child: Row(
- // children: [
- // Icon(Icons.account_circle, color: Colors.black),
- // ],
- // ),
- // ),
- // SizedBox(width: Responsive.isDesktop(context) ? 5 : 0),
- ],
- ),
+ ],
),
),
),
diff --git a/lib/customAppBar/customFooter.dart b/lib/customAppBar/customFooter.dart
index d4823d9..db7f7b2 100644
--- a/lib/customAppBar/customFooter.dart
+++ b/lib/customAppBar/customFooter.dart
@@ -4,7 +4,7 @@ class CustomFooter extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
- padding: EdgeInsets.all(16.0),
+ padding: EdgeInsets.all(8.0),
color: Color(0xFFFFFBDE), // Background color of the footer
child: Column(
mainAxisSize: MainAxisSize.min,
diff --git a/lib/main.dart b/lib/main.dart
index 14c5a91..a9376ae 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -2,15 +2,21 @@ import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:nhance_app_pwa/pages/claimprocess.dart';
import 'package:nhance_app_pwa/pages/claims.dart';
+import 'package:nhance_app_pwa/pages/claimtracklist.dart';
+import 'package:nhance_app_pwa/pages/generalexclusionsdeductibles.dart';
import 'package:nhance_app_pwa/pages/help.dart';
import 'package:nhance_app_pwa/pages/home.dart';
import 'package:nhance_app_pwa/pages/login.dart';
+import 'package:nhance_app_pwa/pages/planclaimsform.dart';
import 'package:nhance_app_pwa/pages/policies.dart';
+import 'package:nhance_app_pwa/pages/privacypolicy.dart';
import 'package:nhance_app_pwa/pages/profile.dart';
+import 'package:nhance_app_pwa/pages/termsofuse.dart';
import 'package:nhance_app_pwa/pages/verify.dart';
import 'models/environment.dart';
Future main() async {
+ WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: Environment.fileName);
runApp(MaterialApp(
@@ -25,6 +31,12 @@ Future main() async {
'help': (context) => help(),
'claimprocess': (context) => claimprocess(),
'profile': (context) => profile(),
+ 'planclaimsform': (context) => planclaimsform(),
+ 'claimtracklist': (context) => claimtracklist(),
+ 'privacypolicy': (context) => privacypolicy(),
+ 'termsofuse': (context) => termsofuse(),
+ 'generalExclusionsDeductibles': (context) =>
+ generalExclusionsDeductibles(),
},
));
}
diff --git a/lib/models/environment.dart b/lib/models/environment.dart
index c289544..0d144de 100644
--- a/lib/models/environment.dart
+++ b/lib/models/environment.dart
@@ -3,17 +3,32 @@ import 'package:flutter_dotenv/flutter_dotenv.dart';
class Environment {
static String get fileName {
- if (kReleaseMode) {
- return '.env.production';
- }
+ const bool isProduction =
+ bool.fromEnvironment('dart.vm.product', defaultValue: false);
+ const bool isTest =
+ bool.fromEnvironment('dart.vm.environment', defaultValue: false);
- return '.env.development';
+ if (isProduction) {
+ return '.env.production';
+ } else if (isTest) {
+ return '.env.test';
+ } else {
+ return '.env.development';
+ }
}
static String get apiUrl {
return dotenv.env['API_URL'] ?? 'API_URL not found!';
}
+ static String get baseHref {
+ return dotenv.env['BASE_HREF'] ?? 'BASE_HREF not found!';
+ }
+
+ static String get env {
+ return dotenv.env['ENV'] ?? 'ENV not found!';
+ }
+
static String get apiUrlTicket {
return dotenv.env['TICKET_API_URL'] ?? 'API_URL not found!';
}
diff --git a/lib/pages/claimprocess.dart b/lib/pages/claimprocess.dart
index 22fd1a9..a7ff625 100644
--- a/lib/pages/claimprocess.dart
+++ b/lib/pages/claimprocess.dart
@@ -11,6 +11,8 @@ import '../customAppBar/toastHelper.dart';
import '../models/environment.dart';
import 'package:http/http.dart' as http;
+import '../service/api_service.dart';
+
class claimprocess extends StatefulWidget {
const claimprocess({Key? key}) : super(key: key);
@@ -19,29 +21,29 @@ class claimprocess extends StatefulWidget {
}
class _claimprocessState extends State {
+ late ApiService apiService;
int _currentIndex = 0;
bool isActive = true;
dynamic _token;
dynamic empCodeString;
dynamic empPrimaryId;
dynamic client_id;
- dynamic policyList;
- dynamic policyDataIsEmpty = 1;
- dynamic policyHeading;
- dynamic policyName;
- dynamic EmployeePolicy;
- List