diff --git a/assets/images/call.svg b/assets/images/call.svg
new file mode 100644
index 0000000..f98d059
--- /dev/null
+++ b/assets/images/call.svg
@@ -0,0 +1,7 @@
+
diff --git a/assets/images/create_request.svg b/assets/images/create_request.svg
new file mode 100644
index 0000000..c5bdeea
--- /dev/null
+++ b/assets/images/create_request.svg
@@ -0,0 +1,6 @@
+
diff --git a/assets/images/profile_details.svg b/assets/images/profile_details.svg
new file mode 100644
index 0000000..9daf5ad
--- /dev/null
+++ b/assets/images/profile_details.svg
@@ -0,0 +1,14 @@
+
diff --git a/assets/images/team.svg b/assets/images/team.svg
new file mode 100644
index 0000000..aff9c19
--- /dev/null
+++ b/assets/images/team.svg
@@ -0,0 +1,34 @@
+
diff --git a/assets/images/view_attendance.svg b/assets/images/view_attendance.svg
new file mode 100644
index 0000000..256bf7a
--- /dev/null
+++ b/assets/images/view_attendance.svg
@@ -0,0 +1,8 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index 0c6ce54..c14d655 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -339,6 +339,17 @@
"pleaseSelectEmployeeForReplacement": "الرجاء تحديد موظف للاستبدال",
"pleaseSelectAction": "الرجاء تحديد الإجراء",
"pleaseSelectDate": "الرجاء تحديد التاريخ",
+ "todayAttendance": "حضور اليوم",
+ "viewAttendance": "عرض الحضور",
+ "teamMembers":"اعضاءالفريق",
+ "profileDetails": "الملف الشخصي",
+ "noResultsFound" : "لايوجد نتائج",
+ "searchBy": "بحث بواسطة",
+ "myTeamMembers": "اعضاء فريقي",
+ "save": "حفظ",
+ "itemType": "نوع العنصر",
+ "TurnNotificationsFor": "تفعيل الاشعارات",
+ "worklistSettings": "اعدادات الاشعارات",
"profile": {
"reset_password": {
"label": "Reset Password",
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 812fa49..69adbf2 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -339,6 +339,17 @@
"pleaseSelectEmployeeForReplacement": "Please select employee for replacement",
"pleaseSelectAction": "Please select action",
"pleaseSelectDate": "Please select date",
+ "todayAttendance": "Today's Attendance",
+ "viewAttendance": "View Attendance",
+ "teamMembers":"Team Members",
+ "profileDetails": "Profile Details",
+ "noResultsFound" : "No Results Found",
+ "searchBy": "Search by",
+ "myTeamMembers": "My Team Members",
+ "save": "Save",
+ "itemType": "Item Type",
+ "TurnNotificationsFor": "Turn on notifications for",
+ "worklistSettings": "Worklist Settings",
"profile": {
"reset_password": {
"label": "Reset Password",
diff --git a/lib/classes/colors.dart b/lib/classes/colors.dart
index feabaea..322bac6 100644
--- a/lib/classes/colors.dart
+++ b/lib/classes/colors.dart
@@ -43,4 +43,9 @@ class MyColors {
static const Color lightGrayColor = Color(0xff808080);
static const Color DarkRedColor = Color(0xffD02127);
static const Color lightGreyColor = Color(0xffC7C7C7);
+ static const Color green69Color = Color(0xff1FA169);
+ static const Color redA3Color = Color(0xffCA3332);
+ static const Color green9CColor = Color(0xff259CB8);
+ static const Color green2DColor = Color(0xff32D892);
+ static const Color greyC4Color = Color(0xffC4C4C4);
}
diff --git a/lib/config/routes.dart b/lib/config/routes.dart
index 4742b0d..92d39ab 100644
--- a/lib/config/routes.dart
+++ b/lib/config/routes.dart
@@ -14,7 +14,7 @@ import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/services_menu_list_screen.dart';
-import 'package:mohem_flutter_app/ui/my_attendance/my_attendance_screen.dart';
+// import 'package:mohem_flutter_app/ui/my_attendance/my_attendance_screen.dart';
import 'package:mohem_flutter_app/ui/my_team/create_request.dart';
import 'package:mohem_flutter_app/ui/my_team/employee_details.dart';
import 'package:mohem_flutter_app/ui/my_team/my_team.dart';
diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart
index 57323da..ae25a1e 100644
--- a/lib/generated/codegen_loader.g.dart
+++ b/lib/generated/codegen_loader.g.dart
@@ -355,6 +355,16 @@ class CodegenLoader extends AssetLoader{
"pleaseSelectEmployeeForReplacement": "الرجاء تحديد موظف للاستبدال",
"pleaseSelectAction": "الرجاء تحديد الإجراء",
"pleaseSelectDate": "الرجاء تحديد التاريخ",
+ "todayAttendance": "حضور اليوم",
+ "viewAttendance": "عرض الحضور",
+ "teamMembers": "اعضاءالفريق",
+ "profileDetails": "الملف الشخصي",
+ "noResultsFound": "لايوجد نتائج",
+ "searchBy": "بحث بواسطة",
+ "myTeamMembers": "اعضاء فريقي",
+ "save": "حفظ",
+ "TurnNotificationsFor": "تفعيل الاشعارات",
+ "worklistSettings": "اعدادات الاشعارات",
"profile": {
"reset_password": {
"label": "Reset Password",
@@ -730,6 +740,16 @@ static const Map en_US = {
"pleaseSelectEmployeeForReplacement": "Please select employee for replacement",
"pleaseSelectAction": "Please select action",
"pleaseSelectDate": "Please select date",
+ "todayAttendance": "Today's Attendance",
+ "viewAttendance": "View Attendance",
+ "teamMembers": "Team Members",
+ "profileDetails": "Profile Details",
+ "noResultsFound": "No Results Found",
+ "searchBy": "Search by",
+ "myTeamMembers": "My Team Members",
+ "save": "Save",
+ "TurnNotificationsFor": "Turn on notifications for",
+ "worklistSettings": "Worklist Settings",
"profile": {
"reset_password": {
"label": "Reset Password",
diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart
index d736c34..c3e3081 100644
--- a/lib/generated/locale_keys.g.dart
+++ b/lib/generated/locale_keys.g.dart
@@ -340,6 +340,16 @@ abstract class LocaleKeys {
static const pleaseSelectEmployeeForReplacement = 'pleaseSelectEmployeeForReplacement';
static const pleaseSelectAction = 'pleaseSelectAction';
static const pleaseSelectDate = 'pleaseSelectDate';
+ static const todayAttendance = 'todayAttendance';
+ static const viewAttendance = 'viewAttendance';
+ static const teamMembers = 'teamMembers';
+ static const profileDetails = 'profileDetails';
+ static const noResultsFound = 'noResultsFound';
+ static const searchBy = 'searchBy';
+ static const myTeamMembers = 'myTeamMembers';
+ static const save = 'save';
+ static const TurnNotificationsFor = 'TurnNotificationsFor';
+ static const worklistSettings = 'worklistSettings';
static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password';
diff --git a/lib/models/profile_menu.model.dart b/lib/models/profile_menu.model.dart
index b14198f..0fdfb6b 100644
--- a/lib/models/profile_menu.model.dart
+++ b/lib/models/profile_menu.model.dart
@@ -2,10 +2,6 @@ class ProfileMenu {
final String name;
final String icon;
final String route;
- final String dynamicUrl;
- final String functionName;
- final String requestID;
- final GetMenuEntriesList menuEntries;
final dynamic arguments;
- ProfileMenu({this.name = '', this.icon = '', this.route = '', this.arguments = '', this.dynamicUrl = '', this.functionName = '', this.requestID = '', required this.menuEntries});
+ ProfileMenu({this.name = '', this.icon = '', this.route = '', this.arguments = ''});
}
diff --git a/lib/ui/attendance/monthly_attendance_screen.dart b/lib/ui/attendance/monthly_attendance_screen.dart
index 6a73f70..614fc94 100644
--- a/lib/ui/attendance/monthly_attendance_screen.dart
+++ b/lib/ui/attendance/monthly_attendance_screen.dart
@@ -113,8 +113,8 @@ class _MonthlyAttendanceScreenState extends State {
LocaleKeys.attendance.tr().toText24(isBold: true, color: MyColors.darkIconColor),
Row(
children: [
- "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.greyACColor),
- const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
+ "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor),
+ const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor),
],
).onPress(() async {
showMonthPicker(
diff --git a/lib/ui/login/login_screen.dart b/lib/ui/login/login_screen.dart
index a2ef87a..7cccca8 100644
--- a/lib/ui/login/login_screen.dart
+++ b/lib/ui/login/login_screen.dart
@@ -135,7 +135,7 @@ class _LoginScreenState extends State {
@override
Widget build(BuildContext context) {
username.text = "15153";
- password.text = "Abcd@1234";
+ password.text = "Abcd@12345";
// username.text = "15444";
return Scaffold(
diff --git a/lib/ui/my_team/employee_details.dart b/lib/ui/my_team/employee_details.dart
index 064158c..2ef488b 100644
--- a/lib/ui/my_team/employee_details.dart
+++ b/lib/ui/my_team/employee_details.dart
@@ -2,6 +2,7 @@ import 'dart:collection';
import 'dart:ui';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_html/html_parser.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart';
import 'package:mohem_flutter_app/api/worklist/worklist_api_client.dart';
@@ -42,7 +43,7 @@ class _EmployeeDetailsState extends State {
@override
void initState() {
super.initState();
- setState(() {});
+ // setState(() {});
}
//favorite
@@ -126,67 +127,67 @@ class _EmployeeDetailsState extends State {
width: _width,
//height: 150,
margin: EdgeInsets.only(top: 50),
- padding: EdgeInsets.only(top: 50),
+ //padding: EdgeInsets.only(right: 17, left: 17),
decoration: BoxDecoration(
- color: Colors.white,
+ color: MyColors.whiteColor,
borderRadius: const BorderRadius.all(Radius.circular(15)),
boxShadow: [BoxShadow(color: MyColors.lightGreyColor, blurRadius: 15, spreadRadius: 3)],
),
- child: Container(
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- /// card header
- customLabel(getEmployeeSubordinates!.eMPLOYEENAME.toString(), 22, Colors.black, true),
- customLabel(getEmployeeSubordinates!.eMPLOYEENUMBER.toString() + ' | ' + getEmployeeSubordinates!.jOBNAME.toString(), 14, Colors.grey, false),
- customLabel(getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS.toString(), 13, Colors.black, true),
- ],
- ).paddingOnly(top: 10, bottom: 10),
+ child: Column(
+ children: [
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ IconButton(
+ onPressed: (){
+ if(getEmployeeSubordinates!.isFavorite != true){
+ showFavoriteAlertDialog(context);
+ setState(() {});
+ }else{
+ fetchChangeFav(
+ email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "",
+ employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "",
+ image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "",
+ userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "",
+ isFav: false,);
+ setState(() {});
+ } },
+ icon: getEmployeeSubordinates!.isFavorite != true
+ ? Icon(
+ Icons.star_outline,
+ size: 35,
+ color: MyColors.green9CColor,
+ )
+ : Icon(
+ Icons.star_outlined,
+ size: 35,
+ color: MyColors.green9CColor,
+ ),
+ ),
+ // Container(height: 100, alignment: Alignment.center, child: ProfileImage()),
+ InkWell(
+ onTap:() {
+ launchUrl(phoneNumber);
+ },
+ child: SvgPicture.asset("assets/images/call.svg"),
+ ),
+ ],
+ ).paddingOnly(left:6, right: 17, top: 16),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ /// card header
+ customLabel(getEmployeeSubordinates!.eMPLOYEENAME.toString(), 21, MyColors.grey3AColor, true),
+ customLabel(getEmployeeSubordinates!.eMPLOYEENUMBER.toString() + ' | ' + getEmployeeSubordinates!.jOBNAME.toString(), 13, MyColors.grey80Color, true),
+ customLabel(getEmployeeSubordinates!.eMPLOYEEEMAILADDRESS.toString(), 13, MyColors.grey3AColor, true),
+ ],
+ ).paddingOnly(bottom: 10),
+ ],
),
),
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- IconButton(
- onPressed: (){
- if(getEmployeeSubordinates!.isFavorite != true){
- showFavoriteAlertDialog(context);
- setState(() {});
- }else{
- fetchChangeFav(
- email: getEmployeeSubordinates?.eMPLOYEEEMAILADDRESS ?? "",
- employeName: getEmployeeSubordinates!.eMPLOYEENAME ?? "",
- image: getEmployeeSubordinates!.eMPLOYEEIMAGE ?? "",
- userName: getEmployeeSubordinates!.eMPLOYEENUMBER ?? "",
- isFav: false,);
- setState(() {});
- } },
- icon: getEmployeeSubordinates!.isFavorite != true
- ? Icon(
- Icons.star_outline,
- size: 35,
- color: Colors.green,
- )
- : Icon(
- Icons.star_outlined,
- size: 35,
- color: Colors.green,
- ),
- ).paddingOnly(top: 50),
- Container(height: 100, alignment: Alignment.center, child: ProfileImage()),
- IconButton(
- onPressed: () {
- launchUrl(phoneNumber);
- },
- icon: Icon(
- Icons.whatsapp,
- color: Colors.green,
- size: 30,
- ).paddingOnly(top: 30),
- ),
- ],
- )
- ])),
+ Container(height: 100, alignment: Alignment.center, child: ProfileImage()),
+ ])
+ ),
Container(
margin: EdgeInsets.fromLTRB(21, 8, 21, 10),
height: 260,
@@ -228,17 +229,21 @@ class _EmployeeDetailsState extends State {
},
child: ListTile(
leading: SvgPicture.asset('assets/images/' + obj.icon),
- title: Text(obj.name),
- trailing: Icon(Icons.arrow_forward),
+ title: Text(obj.name,
+ style: TextStyle(color: MyColors.grey3AColor,
+ fontWeight: FontWeight.w600,
+ fontSize: 16)),
+ trailing: Icon(Icons.arrow_forward,
+ color: MyColors.grey3AColor,),
),
);
}
void setMenu(){
menu = [
- ProfileMenu(name: "Profile Details", icon: 'personal-info.svg', route: AppRoutes.profileDetails, arguments:getEmployeeSubordinates, dynamicUrl: '', menuEntries: getMenuEntries('')),
- ProfileMenu(name: "Create Request", icon: 'personal-info.svg', route: AppRoutes.createRequest,arguments: getEmployeeSubordinates, menuEntries: getMenuEntries('')),
- ProfileMenu(name: "View Attendance", icon: 'personal-info.svg', route: AppRoutes.viewAttendance, arguments: getEmployeeSubordinates, dynamicUrl: '', menuEntries: getMenuEntries('')),
- ProfileMenu(name: "Team Members", icon: 'family-members.svg', route: AppRoutes.teamMembers, arguments: getEmployeeSubordinates, dynamicUrl: '', menuEntries: getMenuEntries('')),
+ ProfileMenu(name: "Profile Details", icon: "profile_details.svg", route: AppRoutes.profileDetails, arguments:getEmployeeSubordinates),
+ ProfileMenu(name: "Create Request", icon: "create_request.svg", route: AppRoutes.createRequest,arguments: getEmployeeSubordinates),
+ ProfileMenu(name: "View Attendance", icon: "view_attendance.svg", route: AppRoutes.viewAttendance, arguments: getEmployeeSubordinates),
+ ProfileMenu(name: "Team Members", icon: "team.svg", route: AppRoutes.teamMembers, arguments: getEmployeeSubordinates),
];
}
diff --git a/lib/ui/my_team/my_team.dart b/lib/ui/my_team/my_team.dart
index 5cb89ef..7366128 100644
--- a/lib/ui/my_team/my_team.dart
+++ b/lib/ui/my_team/my_team.dart
@@ -1,16 +1,18 @@
-
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart';
+import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
+import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:url_launcher/url_launcher.dart';
-
class MyTeam extends StatefulWidget {
const MyTeam({Key? key}) : super(key: key);
@@ -19,8 +21,8 @@ class MyTeam extends StatefulWidget {
}
class _MyTeamState extends State {
- String searchEmpEmail ="";
- String searchEmpName ="";
+ String searchEmpEmail = "";
+ String searchEmpName = "";
String searchEmpNo = "";
String? empId;
List getEmployeeSubordinatesList = [];
@@ -38,7 +40,7 @@ class _MyTeamState extends State {
try {
Utils.showLoading(context);
getEmployeeSubordinatesList = await MyTeamApiClient().getEmployeeSubordinates(searchEmpEmail.toString(), searchEmpName.toString(), searchEmpNo.toString());
- getEmployeeSListOnSearch =getEmployeeSubordinatesList;
+ getEmployeeSListOnSearch = getEmployeeSubordinatesList;
Utils.hideLoading(context);
setState(() {});
} catch (ex) {
@@ -51,191 +53,132 @@ class _MyTeamState extends State {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarWidget(
- context,
- title:"My Team Members",
+ context,
+ title: LocaleKeys.myTeamMembers.tr(),
),
- backgroundColor: MyColors.backgroundColor,
+ backgroundColor: MyColors.backgroundColor,
body: SingleChildScrollView(
child: Column(
children: [
- Container(
- width: double.infinity,
- margin: EdgeInsets.only(
- top: 28,
- left: 18,
- right: 18,
- // bottom: 28
- ),
- padding: EdgeInsets.only( left: 10, right: 10),
- height: 65,
- decoration: BoxDecoration(
- boxShadow: [
- BoxShadow(
- color: Colors.grey.withOpacity(0.5),
- spreadRadius: 5,
- blurRadius: 26,
- offset: Offset(0, 3),
- ),
- ],
- color: Colors.white,
- borderRadius: BorderRadius.circular(10.0),
- ),
- child:
- Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children : [
- Expanded(
- child:
- TextField(
- onChanged: dropdownValue =="Name" ?
- (String value){
- getEmployeeSListOnSearch = getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element)
- => element.eMPLOYEENAME!.toLowerCase().contains(value.toLowerCase())).toList();
+ Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
+ Expanded(
+ child: TextField(
+ onChanged: dropdownValue == "Name"
+ ? (String value) {
+ getEmployeeSListOnSearch =
+ getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEENAME!.toLowerCase().contains(value.toLowerCase())).toList();
+ setState(() {});
+ }
+ : (String value) {
+ getEmployeeSListOnSearch =
+ getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element) => element.eMPLOYEEEMAILADDRESS!.toLowerCase().contains(value.toLowerCase())).toList();
setState(() {});
- }: (String value){
- getEmployeeSListOnSearch = getEmployeeSubordinatesList.where((GetEmployeeSubordinatesList element)
- => element.eMPLOYEEEMAILADDRESS!.toLowerCase().contains(value.toLowerCase())).toList();
- setState(() {});
},
- controller: _textEditingController,
- decoration: InputDecoration(
- filled: true,
- fillColor: Colors.white,
- border: InputBorder.none,
- enabledBorder: InputBorder.none,
- focusedBorder: InputBorder.none,
- // contentPadding: EdgeInsets.fromLTRB(10, 15, 10, 15),
- hintText: 'Search by $dropdownValue',
- hintStyle: TextStyle(fontSize: 16.0, color: Colors.black,),
- ),
- )),
- dropDown()
- ]),
- ),
+ controller: _textEditingController,
+ decoration: InputDecoration(
+ filled: true,
+ fillColor: Colors.white,
+ border: InputBorder.none,
+ enabledBorder: InputBorder.none,
+ focusedBorder: InputBorder.none,
+ // contentPadding: EdgeInsets.fromLTRB(10, 15, 10, 15),
+ hintText: LocaleKeys.searchBy.tr() + " $dropdownValue",
+ hintStyle: TextStyle(fontSize: 14.0, color: MyColors.grey57Color, fontWeight: FontWeight.w600),
+ ),
+ )),
+ Row(
+ children: [
+ "|".toText16(color: MyColors.greyC4Color),
+ 10.width,
+ dropDown(),
+ ],
+ )
+ ]).objectContainerBorderView(),
+ // ),
Container(
+ margin: EdgeInsets.only(left: 21, right: 21),
width: MediaQuery.of(context).size.width,
child: SingleChildScrollView(
scrollDirection: Axis.vertical,
child: Column(
children: [
- _textEditingController!.text.isNotEmpty && getEmployeeSListOnSearch.isEmpty ?
- Container(
- child: "No Results found".toText16(color: MyColors.blackColor),).paddingOnly(top: 10)
- : ListView.builder(
- scrollDirection: Axis.vertical,
- shrinkWrap: true,
- physics: ScrollPhysics(),
- itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length,
- itemBuilder: (context, index) {
- var phoneNumber = Uri.parse('tel:${getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER}');
- return Container(
- width: double.infinity,
- margin: EdgeInsets.only(
- top: 18,
- left: 18,
- right: 18,
- ),
- padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
- // height: 110,
- decoration: BoxDecoration(
- boxShadow: [
- BoxShadow(
- color: Colors.grey.withOpacity(0.5),
- spreadRadius: 5,
- blurRadius: 26,
- offset: Offset(0, 3),
- ),
- ],
- color: Colors.white,
- borderRadius: BorderRadius.circular(10.0),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Row(
+ _textEditingController!.text.isNotEmpty && getEmployeeSListOnSearch.isEmpty
+ ? Container(
+ child: LocaleKeys.noResultsFound.tr().toText16(color: MyColors.blackColor),
+ ).paddingOnly(top: 10)
+ : ListView.separated(
+ scrollDirection: Axis.vertical,
+ shrinkWrap: true,
+ // padding: EdgeInsets.only(left: 21, right: 21),
+ physics: ScrollPhysics(),
+ separatorBuilder: (cxt, index) => 12.height,
+ itemCount: _textEditingController!.text.isNotEmpty ? getEmployeeSListOnSearch.length : getEmployeeSubordinatesList.length,
+ itemBuilder: (context, index) {
+ var phoneNumber = Uri.parse('tel:${getEmployeeSListOnSearch[index].eMPLOYEEMOBILENUMBER}');
+ return Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
+ CircleAvatar(
+ radius: 25,
+ backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE)),
+ backgroundColor: Colors.black,
+ ),
+ 10.width,
Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
children: [
-
- CircleAvatar(
- radius: 25,
- backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSListOnSearch[index].eMPLOYEEIMAGE)),
- backgroundColor: Colors.black,
- ),
+ // "Present".toText13(color: MyColors.greenColor),
+ "${getEmployeeSListOnSearch[index].eMPLOYEENAME}".toText16(isBold: true, color: MyColors.grey3AColor),
+ "${getEmployeeSListOnSearch[index].pOSITIONNAME}".toText10(isBold: true, color: MyColors.grey57Color),
],
- ),
- SizedBox(
- width: 10,
- ),
+ ).expanded,
Column(
- crossAxisAlignment: CrossAxisAlignment.start,
children: [
- "Present".toText13(color: MyColors.greenColor),
- "${getEmployeeSListOnSearch[index].eMPLOYEENAME}".toText16(color: MyColors.blackColor),
- "${getEmployeeSListOnSearch[index].pOSITIONNAME}".toText13(color: MyColors.blackColor),
-
+ InkWell(
+ onTap: () {
+ launchUrl(phoneNumber);
+ },
+ child: SvgPicture.asset("assets/images/call.svg"),
+ ),
+ 21.height,
+ InkWell(
+ onTap: () async {
+ Navigator.pushNamed(context, AppRoutes.employeeDetails, arguments: getEmployeeSListOnSearch[index]);
+ },
+ child: Icon(Icons.arrow_forward_outlined, color: MyColors.grey3AColor),
+ ),
],
),
],
- ),
- Column(
- children: [
- IconButton(
- onPressed: () {
- launchUrl(phoneNumber);
- },
- icon: Icon(
- Icons.whatsapp,
- color: Colors.green,
- ),
- ),
- IconButton(
- onPressed: () async{
- Navigator.pushNamed(context,AppRoutes.employeeDetails,arguments: getEmployeeSListOnSearch[index]);
- // Navigator.of(context).push(MaterialPageRoute(builder: (context)=> EmployeeDetails(getEmployeeSubordinates: getEmployeeSubordinatesList[index])),);
- },
- icon: Icon(
- Icons.arrow_forward_outlined,
- color: Colors.grey,
- ),
- ),
-
-
- ],
- ),
- ],
- ),
- );
- })
+ ).objectContainerView();
+ })
],
),
- )
+ ),
)
],
),
- )
- );
+ ));
}
- Widget dropDown(){
+ Widget dropDown() {
return DropdownButton(
value: dropdownValue,
- icon: const Icon(Icons.keyboard_arrow_down),
+ icon: const Icon(Icons.keyboard_arrow_down,
+ color: MyColors.grey57Color),
elevation: 16,
onChanged: (String? newValue) {
setState(() {
dropdownValue = newValue!;
});
},
- items: ['Name', 'Email']
- .map>((String value) {
+ items: ['Name', 'Email'].map>((String value) {
return DropdownMenuItem(
value: value,
child: Text(value),
);
}).toList(),
+ style: TextStyle(fontSize: 14.0, color: MyColors.grey57Color, fontWeight: FontWeight.w600),
);
}
-
}
-
diff --git a/lib/ui/my_team/profile_details.dart b/lib/ui/my_team/profile_details.dart
index 49690f0..419f897 100644
--- a/lib/ui/my_team/profile_details.dart
+++ b/lib/ui/my_team/profile_details.dart
@@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
+import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
@@ -33,7 +34,7 @@ class _ProfileDetailsState extends State {
return Scaffold(
appBar: AppBarWidget(
context,
- title: "Profile Details",
+ title: LocaleKeys.profileDetails.tr(),
),
backgroundColor: MyColors.backgroundColor,
body: Column(
@@ -41,12 +42,11 @@ class _ProfileDetailsState extends State {
Container(
width: double.infinity,
margin: EdgeInsets.only(
- top: 28,
- left: 26,
- right: 26,
+ top: 20,
+ left: 21,
+ right: 21,
),
padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 20),
- height: 350,
decoration: BoxDecoration(
boxShadow: [
BoxShadow(
@@ -61,27 +61,19 @@ class _ProfileDetailsState extends State {
),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor),
- "${getEmployeeSubordinates?.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.blackColor),
- SizedBox(
- height: 20,
- ),
+ "${getEmployeeSubordinates?.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.darkTextColor),
+ 23.height,
LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor),
- "${getEmployeeSubordinates?.lOCATIONNAME}".toText16(isBold: true, color: MyColors.blackColor),
- SizedBox(
- height: 20,
- ),
+ "${getEmployeeSubordinates?.lOCATIONNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
+ 23.height,
LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor),
- "${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
- SizedBox(
- height: 20,
- ),
+ "${getEmployeeSubordinates?.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.darkTextColor),
+ 23.height,
LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor),
- "${getEmployeeSubordinates?.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.blackColor),
- SizedBox(
- height: 20,
- ),
+ "${getEmployeeSubordinates?.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
+ 23.height,
LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor),
- "${getEmployeeSubordinates?.pAYROLLNAME}".toText16(isBold: true, color: MyColors.blackColor),
+ "${getEmployeeSubordinates?.pAYROLLNAME}".toText16(isBold: true, color: MyColors.darkTextColor),
]),
),
],
diff --git a/lib/ui/my_team/team_members.dart b/lib/ui/my_team/team_members.dart
index 7dccf5e..f36a13b 100644
--- a/lib/ui/my_team/team_members.dart
+++ b/lib/ui/my_team/team_members.dart
@@ -1,9 +1,13 @@
+import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/my_team/my_team_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart';
+import 'package:mohem_flutter_app/extensions/int_extensions.dart';
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
+import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
+import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/my_team/get_employee_subordinates_list.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'package:url_launcher/url_launcher.dart';
@@ -26,8 +30,6 @@ class _TeamMembersState extends State {
void initState() {
super.initState();
employeeSubordinates();
- setState(() {});
-
}
void employeeSubordinates() async {
@@ -49,108 +51,58 @@ class _TeamMembersState extends State {
return Scaffold(
appBar: AppBarWidget(
context,
- title: "Team Members",
+ title: LocaleKeys.teamMembers.tr(),
),
backgroundColor: MyColors.backgroundColor,
body: SingleChildScrollView(
- child: Column(
- children: [
- Container(
- width: MediaQuery.of(context).size.width,
- child: SingleChildScrollView(
- scrollDirection: Axis.vertical,
- child: Column(
- children: [
- if(getEmployeeSubordinatesList != 0)
- ListView.builder(
- scrollDirection: Axis.vertical,
- shrinkWrap: true,
- physics: ScrollPhysics(),
- itemCount: getEmployeeSubordinatesList.length,
- itemBuilder: (context, index) {
- var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEENUMBER}');
- return Container(
- width: double.infinity,
- margin: EdgeInsets.only(
- top: 18,
- left: 18,
- right: 18,
- ),
- padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
- decoration: BoxDecoration(
- boxShadow: [
- BoxShadow(
- color: Colors.grey.withOpacity(0.5),
- spreadRadius: 5,
- blurRadius: 26,
- offset: Offset(0, 3),
- ),
- ],
- color: Colors.white,
- borderRadius: BorderRadius.circular(10.0),
- ),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Row(
- children: [
- Column(
- children: [
- CircleAvatar(
- radius: 25,
- backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE)),
- backgroundColor: Colors.black,
- ),
- // MyTeamImage()
- ],
- ),
- SizedBox(
- width: 10,
- ),
- Column(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- "Present".toText13(color: MyColors.greenColor),
- "${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(color: MyColors.blackColor),
- "${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText13(color: MyColors.blackColor),
- ],
- ),
- ],
- ),
- Column(
- children: [
- IconButton(
- onPressed: () {
- launchUrl(phoneNumber);
- },
- icon: Icon(
- Icons.whatsapp,
- color: Colors.green,
- ),
- ),
- ],
- ),
- ],
- ),
- );
- }),
- Container(
- margin: EdgeInsets.only(top:30),
- child: "No Members".toText16(isBold: true, color: MyColors.black),
- )
- ],
- ),
- )
- // SizedBox(height: 20),
- )
- ],
- ),
- ));
+ scrollDirection: Axis.vertical,
+ child: Column(
+ children: [
+ getEmployeeSubordinatesList != 0
+ ? ListView.separated(
+ scrollDirection: Axis.vertical,
+ shrinkWrap: true,
+ padding: EdgeInsets.all(21),
+ physics: ScrollPhysics(),
+ separatorBuilder: (cxt, index) => 12.height,
+ itemCount: getEmployeeSubordinatesList.length,
+ itemBuilder: (context, index) {
+ var phoneNumber = Uri.parse('tel:${getEmployeeSubordinatesList[index].eMPLOYEEMOBILENUMBER}');
+ return Container(
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ CircleAvatar(
+ radius: 25,
+ backgroundImage: MemoryImage(Utils.getPostBytes(getEmployeeSubordinatesList[index].eMPLOYEEIMAGE)),
+ backgroundColor: Colors.black,
+ ),
+ SizedBox(width: 10,),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // "Present".toText13(color: MyColors.greenColor),
+ "${getEmployeeSubordinatesList[index].eMPLOYEENAME}".toText16(isBold: true, color: MyColors.grey3AColor),
+ "${getEmployeeSubordinatesList[index].pOSITIONNAME}".toText10(isBold: true, color: MyColors.grey57Color),
+ ],
+ ).expanded,
+ Column(
+ children: [
+ IconButton(
+ onPressed: () {
+ launchUrl(phoneNumber);
+ },
+ icon: Icon(
+ Icons.whatsapp,
+ color: Colors.green,
+ ),),],
+ ),],
+ ),).objectContainerView();
+ }): Container(
+ child: LocaleKeys.noResultsFound.tr().toText16(color: MyColors.blackColor),
+ ).paddingOnly(top: 10),
+ ],
+ )
+ ));
}
-
- Widget MyTeamImage() => CircleAvatar(
- radius: 30,
- //backgroundImage: MemoryImage(Utils.getPostBytes(memberInformationList.eMPLOYEEIMAGE)),
- backgroundColor: Colors.black,
- );
}
diff --git a/lib/ui/my_team/view_attendance.dart b/lib/ui/my_team/view_attendance.dart
index f08ca3b..b24a895 100644
--- a/lib/ui/my_team/view_attendance.dart
+++ b/lib/ui/my_team/view_attendance.dart
@@ -91,7 +91,7 @@ class _ViewAttendanceState extends State {
return Scaffold(
appBar: AppBarWidget(
context,
- title: "View Attendance",
+ title: LocaleKeys.viewAttendance.tr(),
),
backgroundColor: MyColors.backgroundColor,
body: SingleChildScrollView(
@@ -99,11 +99,11 @@ class _ViewAttendanceState extends State {
Container(
width: double.infinity,
margin: EdgeInsets.only(
- top: 28,
- left: 18,
- right: 18,
+ top: 21,
+ left: 21,
+ right: 21,
),
- padding: EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 16),
+ padding: EdgeInsets.only(left: 14, right: 14, top: 15, bottom: 15),
// height: 120,
decoration: BoxDecoration(
boxShadow: [
@@ -120,7 +120,7 @@ class _ViewAttendanceState extends State {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- "Today's Attendance".toText20(color: MyColors.blackColor),
+ LocaleKeys.todayAttendance.tr().toText16(isBold: true, color: MyColors.darkColor),
SizedBox(
height: 10,
),
@@ -129,20 +129,20 @@ class _ViewAttendanceState extends State {
children: [
Column(
children: [
- LocaleKeys.checkIn.tr().toText12(isBold: true, color: MyColors.greenColor),
- "${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText16(isBold: true, color: MyColors.grey57Color),
+ LocaleKeys.checkIn.tr().toText10(isBold: true, color: MyColors.green69Color),
+ "${(attendanceTracking?.pSwipeIn)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color),
],
),
Column(
children: [
- LocaleKeys.checkOut.tr().toText12(isBold: true, color: MyColors.redColor),
- "${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText16(isBold: true, color: MyColors.grey57Color),
+ LocaleKeys.checkOut.tr().toText10(isBold: true, color: MyColors.redA3Color),
+ "${(attendanceTracking?.pSwipeOut)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color),
],
),
Column(
children: [
- LocaleKeys.lateIn.tr().toText12(isBold: true, color: MyColors.blackColor),
- "${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText16(isBold: true, color: MyColors.grey57Color),
+ LocaleKeys.lateIn.tr().toText10(isBold: true, color: MyColors.darkGreyColor),
+ "${(attendanceTracking?.pLateInHours)?? "- - : - -"}".toText14(isBold: true, color: MyColors.grey57Color),
],
),
],
@@ -179,8 +179,8 @@ class _ViewAttendanceState extends State {
children: [
Row(
children: [
- "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.blackColor),
- const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.blackColor),
+ "${DateFormat("MMMM-yyyy").format(formattedDate)}".toText16(color: MyColors.grey3AColor),
+ const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.grey3AColor),
],
).onPress(() async {
showMonthPicker(
@@ -438,10 +438,6 @@ class _ViewAttendanceState extends State {
),
),
);
- // return Container(
- // alignment: Alignment.center,
- // child: Text("$val"),
- // );
} else {
return const SizedBox();
}
diff --git a/lib/ui/profile/add_update_family_member.dart b/lib/ui/profile/add_update_family_member.dart
index 9a0bd66..107f289 100644
--- a/lib/ui/profile/add_update_family_member.dart
+++ b/lib/ui/profile/add_update_family_member.dart
@@ -19,6 +19,7 @@ import 'package:mohem_flutter_app/ui/misc/request_submit_screen.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
import 'dart:io';
import 'package:flutter/cupertino.dart';
+import 'package:mohem_flutter_app/widgets/button/default_button.dart';
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
import 'package:easy_localization/src/public_ext.dart';
@@ -37,13 +38,12 @@ class _AddUpdateFamilyMemberState extends State {
SubmitContactTransactionList? submitContactTransactionList;
dynamic args;
String? date = "MM/DD/YYYY";
- // String actionType = "UPDATE";
+
GetApprovesList? getApprovesList;
@override
void initState() {
- //
super.initState();
}
@@ -89,15 +89,12 @@ class _AddUpdateFamilyMemberState extends State {
Widget build(BuildContext context) {
if (args == null) {
args = ModalRoute.of(context)!.settings.arguments;
- callAddAndUpdateFamilyMember();
- }
+ callAddAndUpdateFamilyMember();}
return Scaffold(
appBar: AppBarWidget(
context,
- title: LocaleKeys.profile_familyDetails.tr(),
- ),
+ title: LocaleKeys.profile_familyDetails.tr(),),
backgroundColor: MyColors.backgroundColor,
- bottomSheet: footer(),
body: args['flag'] == 1
? Column(
children: [
@@ -128,9 +125,11 @@ class _AddUpdateFamilyMemberState extends State {
separatorBuilder: (cxt, index) => 0.height,
itemCount: getContactDffStructureList!.length),
]).expanded,
- SizedBox(
- height: 50,
- ),
+ DefaultButton(
+ LocaleKeys.next.tr(), () async {
+ submitUpdateForm();
+ }
+ ).insideContainer,
],
)
: args['flag'] == 2
@@ -165,9 +164,11 @@ class _AddUpdateFamilyMemberState extends State {
separatorBuilder: (cxt, index) => 0.height,
itemCount: getContactDffStructureList!.length),
]).expanded,
- SizedBox(
- height: 50,
- ),
+ DefaultButton(
+ LocaleKeys.next.tr(), () async {
+ submitUpdateForm();
+ }
+ ).insideContainer,
],
)
: Container(),
@@ -405,7 +406,6 @@ class _AddUpdateFamilyMemberState extends State {
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson();
}).toList();
List