Merge branch 'development_sultan' into 'master'

Development sultan

See merge request mirza.shafique/mohem_flutter_app!71
merge-requests/1/merge
Sikander Saleem 2 years ago
commit fba3b2e88c

@ -268,6 +268,9 @@
"summaryOfInformation": "ملخص المعلومات",
"totalPayAmount": "المبلغ الإجمالي للدفع",
"paymentInformation": "معلومات الدفع",
"performance": "تقييم الاداء",
"performanceEvaluation": "تقييم الأداء في",
"performanceEvaluationIn": "تقييم أدائك في",
"amount": "مقدار",
"correctCurrentDatails": "تعديل او اكمال التفاصيل الحالية",
"selectType": " حدد نوع التغيير الذي تريد القيام به",
@ -313,7 +316,6 @@
"employeeDigitalID": "هويةالموظف الرقمية",
"businessCard": "بطاقة العمل",
"viewBusinessCard": "عرض بطاقة العمل",
"performanceEvaluation": "تقييم الأداء",
"logout": "تسجيل خروج",
"checkOut": "وقت الخروج",
"regular": "منتظم",

@ -312,12 +312,14 @@
"wantToReject": "Are you sure want to reject?",
"employeeDigitalID": "Employee Digital ID",
"businessCard": "Business Card",
"viewBusinessCard": "View Business Card",
"performanceEvaluation": "Performance Evaluation",
"logout": "Logout",
"checkOut": "Check Out",
"regular": "Regular",
"mark": "Mark",
"performance": "Performance Evaluation",
"performanceEvaluationIn": "Your performance Evaluation in ",
"viewBusinessCard": "View Business Card",
"performanceEvaluation": "Performance Evaluation",
"logout": "Logout",
"selectMethodOfAttendance": "Select the method to mark the attendance",
"comeNearHMGWifi": "Please come near to HMG wifi",
"deliverNotificationToMeRegardless": "Deliver notifications to me regardless of any general rules",

@ -10,6 +10,7 @@ import 'package:mohem_flutter_app/models/get_employee_address_model.dart';
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
import 'package:mohem_flutter_app/models/get_employee_phones_model.dart';
import 'package:mohem_flutter_app/models/performance.dart';
import 'package:mohem_flutter_app/models/profile/get_countries_list_model.dart';
import 'package:mohem_flutter_app/models/profile/phone_number_types_model.dart';
import 'package:mohem_flutter_app/models/profile/start_address_approval_process_model.dart';
@ -379,7 +380,7 @@ class ProfileApiClient {
}, url, postParams);
}
Future<SubmitContactTransactionList?> submetConatctTransactionAddAndUpdate(String actionType, int relationId, List<Map<String, dynamic>> list) async {
Future<SubmitContactTransactionList?> submitContactTransactionAddAndUpdate(String actionType, int relationId, List<Map<String, dynamic>> list) async {
String url = "${ApiConsts.erpRest}SUBMIT_CONTACT_TRANSACTION";
Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E",
@ -395,4 +396,15 @@ class ProfileApiClient {
return responseData.submitContactTransactionList;
}, url, postParams);
}
Future<List<GetPerformanceAppraisalList>?> getPerformanceAppraisal() async {
String url = "${ApiConsts.erpRest}GET_Performance_Appraisal";
Map<String, dynamic> postParams = {};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.getPerformanceAppraisalList;
}, url, postParams);
}
}

@ -25,6 +25,7 @@ import 'package:mohem_flutter_app/ui/my_team/subordinate_leave.dart';
import 'package:mohem_flutter_app/ui/my_team/team_members.dart';
import 'package:mohem_flutter_app/ui/my_team/view_attendance.dart';
import 'package:mohem_flutter_app/ui/payslip/monthly_pay_slip_screen.dart';
import 'package:mohem_flutter_app/ui/performance/performance.dart';
import 'package:mohem_flutter_app/ui/profile/add_update_family_member.dart';
import 'package:mohem_flutter_app/ui/profile/basic_details.dart';
import 'package:mohem_flutter_app/ui/profile/contact_details.dart';
@ -144,6 +145,9 @@ class AppRoutes {
//Pay slip
static const String monthlyPaySlip = "/monthlyPaySlip";
//performance evaluation
static const String performanceEvaluation = "/performanceEvaluation";
//My Team
static const String myTeam = "/myTeam";
static const String employeeDetails = "/employeeDetails";
@ -153,7 +157,6 @@ class AppRoutes {
static const String createRequest = "/createRequest";
static const String subordinateLeave = "/subordinateLeave";
static final Map<String, WidgetBuilder> routes = {
login: (context) => LoginScreen(),
verifyLogin: (context) => VerifyLoginScreen(),
@ -234,6 +237,7 @@ class AppRoutes {
//pay slip
monthlyPaySlip: (context) => MonthlyPaySlipScreen(),
performanceEvaluation: (context) => PerformanceAppraisal(),
//My Team
myTeam: (context) => MyTeam(),
@ -243,9 +247,5 @@ class AppRoutes {
teamMembers: (context) => TeamMembers(),
createRequest: (context) => CreateRequest(),
subordinateLeave: (context) => SubordinateLeave(),
};
}
}

@ -284,6 +284,9 @@ class CodegenLoader extends AssetLoader{
"summaryOfInformation": "ملخص المعلومات",
"totalPayAmount": "المبلغ الإجمالي للدفع",
"paymentInformation": "معلومات الدفع",
"performance": "تقييم الاداء",
"performanceEvaluation": "تقييم الأداء في",
"performanceEvaluationIn": "تقييم أدائك في",
"amount": "مقدار",
"correctCurrentDatails": "تعديل او اكمال التفاصيل الحالية",
"selectType": " حدد نوع التغيير الذي تريد القيام به",
@ -329,7 +332,6 @@ class CodegenLoader extends AssetLoader{
"employeeDigitalID": "هويةالموظف الرقمية",
"businessCard": "بطاقة العمل",
"viewBusinessCard": "عرض بطاقة العمل",
"performanceEvaluation": "تقييم الأداء",
"logout": "تسجيل خروج",
"checkOut": "وقت الخروج",
"regular": "منتظم",
@ -734,12 +736,14 @@ static const Map<String,dynamic> en_US = {
"wantToReject": "Are you sure want to reject?",
"employeeDigitalID": "Employee Digital ID",
"businessCard": "Business Card",
"viewBusinessCard": "View Business Card",
"performanceEvaluation": "Performance Evaluation",
"logout": "Logout",
"checkOut": "Check Out",
"regular": "Regular",
"mark": "Mark",
"performance": "Performance Evaluation",
"performanceEvaluationIn": "Your performance Evaluation in ",
"viewBusinessCard": "View Business Card",
"performanceEvaluation": "Performance Evaluation",
"logout": "Logout",
"selectMethodOfAttendance": "Select the method to mark the attendance",
"comeNearHMGWifi": "Please come near to HMG wifi",
"deliverNotificationToMeRegardless": "Deliver notifications to me regardless of any general rules",

@ -269,6 +269,9 @@ abstract class LocaleKeys {
static const summaryOfInformation = 'summaryOfInformation';
static const totalPayAmount = 'totalPayAmount';
static const paymentInformation = 'paymentInformation';
static const performance = 'performance';
static const performanceEvaluation = 'performanceEvaluation';
static const performanceEvaluationIn = 'performanceEvaluationIn';
static const amount = 'amount';
static const correctCurrentDatails = 'correctCurrentDatails';
static const selectType = 'selectType';
@ -314,7 +317,6 @@ abstract class LocaleKeys {
static const employeeDigitalID = 'employeeDigitalID';
static const businessCard = 'businessCard';
static const viewBusinessCard = 'viewBusinessCard';
static const performanceEvaluation = 'performanceEvaluation';
static const logout = 'logout';
static const checkOut = 'checkOut';
static const regular = 'regular';

@ -66,6 +66,7 @@ import 'package:mohem_flutter_app/models/notification_action_model.dart';
import 'package:mohem_flutter_app/models/notification_get_respond_attributes_list_model.dart';
import 'package:mohem_flutter_app/models/pending_transactions/get_pending_transactions_details.dart';
import 'package:mohem_flutter_app/models/pending_transactions/get_req_functions.dart';
import 'package:mohem_flutter_app/models/performance.dart';
import 'package:mohem_flutter_app/models/privilege_list_model.dart';
import 'package:mohem_flutter_app/models/profile/basic_details_cols_structions.dart';
import 'package:mohem_flutter_app/models/profile/basic_details_dff_structure.dart';
@ -206,7 +207,11 @@ class GenericResponseModel {
List<String>? getOrganizationsSalariesList;
List<GetPaymentInformationList>? getPaymentInformationList;
List<GetPayslipList>? getPayslipList;
List<String>? getPerformanceAppraisalList;
// List<String>? getPendingReqDetailsList;
// List<String>? getPendingReqFunctionsList;
List<GetPerformanceAppraisalList>? getPerformanceAppraisalList;
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList;
List<GetPoItemHistoryList>? getPoItemHistoryList;
GetPoNotificationBodyList? getPoNotificationBodyList;
@ -227,7 +232,7 @@ class GenericResponseModel {
List<GetCCPDFFStructureModel>? getCCPDFFStructureModel;
List<String>? getSubordinatesAttdStatusList;
List<SubordinatesLeavesList>? getSubordinatesLeavesList;
List<GetSubordinatesLeavesTotalVacationsList>?getSubordinatesLeavesTotalVacationsList;
List<GetSubordinatesLeavesTotalVacationsList>? getSubordinatesLeavesTotalVacationsList;
List<GetSummaryOfPaymentList>? getSummaryOfPaymentList;
List<String>? getSwipesList;
List<String>? getTermColsStructureList;
@ -940,7 +945,8 @@ class GenericResponseModel {
}
// getPendingReqDetailsList = json['GetPendingReqDetailsList'];
// getPendingReqFunctionsList = json['GetPendingReqFunctionsList'];
getPerformanceAppraisalList = json['GetPerformanceAppraisalList'];
getPerformanceAppraisalList =
json['GetPerformanceAppraisalList'] == null ? null : List<GetPerformanceAppraisalList>.from(json["GetPerformanceAppraisalList"].map((x) => GetPerformanceAppraisalList.fromJson(x)));
getPhonesNotificationBodyList =
json["GetPhonesNotificationBodyList"] == null ? null : List<GetPhonesNotificationBodyList>.from(json["GetPhonesNotificationBodyList"].map((x) => GetPhonesNotificationBodyList.fromJson(x)));
if (json['GetPoItemHistoryList'] != null) {
@ -993,11 +999,9 @@ class GenericResponseModel {
}
if (json['GetSubordinatesLeavesTotalVacationsList'] != null) {
getSubordinatesLeavesTotalVacationsList =
<GetSubordinatesLeavesTotalVacationsList>[];
getSubordinatesLeavesTotalVacationsList = <GetSubordinatesLeavesTotalVacationsList>[];
json['GetSubordinatesLeavesTotalVacationsList'].forEach((v) {
getSubordinatesLeavesTotalVacationsList!
.add(new GetSubordinatesLeavesTotalVacationsList.fromJson(v));
getSubordinatesLeavesTotalVacationsList!.add(new GetSubordinatesLeavesTotalVacationsList.fromJson(v));
});
}
if (json['GetSummaryOfPaymentList'] != null) {
@ -1577,10 +1581,7 @@ class GenericResponseModel {
}
if (this.getSubordinatesLeavesTotalVacationsList != null) {
data['GetSubordinatesLeavesTotalVacationsList'] = this
.getSubordinatesLeavesTotalVacationsList!
.map((v) => v.toJson())
.toList();
data['GetSubordinatesLeavesTotalVacationsList'] = this.getSubordinatesLeavesTotalVacationsList!.map((v) => v.toJson()).toList();
}
if (this.getSummaryOfPaymentList != null) {
data['GetSummaryOfPaymentList'] = this.getSummaryOfPaymentList!.map((v) => v.toJson()).toList();

@ -0,0 +1,18 @@
class GetPerformanceAppraisalList {
String? aPPRAISALSCORE;
int? aPPRAISALYEAR;
GetPerformanceAppraisalList({this.aPPRAISALSCORE, this.aPPRAISALYEAR});
GetPerformanceAppraisalList.fromJson(Map<String, dynamic> json) {
aPPRAISALSCORE = json['APPRAISAL_SCORE'];
aPPRAISALYEAR = json['APPRAISAL_YEAR'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['APPRAISAL_SCORE'] = this.aPPRAISALSCORE;
data['APPRAISAL_YEAR'] = this.aPPRAISALYEAR;
return data;
}
}

@ -148,7 +148,7 @@ class DashboardProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
List<DrawerMenuItem> drawerMenuItemList = [
DrawerMenuItem("assets/images/drawer/my_profile.svg", LocaleKeys.myProfile.tr(), AppRoutes.profile),
DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), ""),
DrawerMenuItem("assets/images/drawer/performance_evaluation.svg", LocaleKeys.performanceEvaluation.tr(), AppRoutes.performanceEvaluation),
DrawerMenuItem("assets/images/drawer/mowadhafi.svg", LocaleKeys.mowadhafhi.tr(), AppRoutes.mowadhafhi),
DrawerMenuItem("assets/images/drawer/pending_trasactions.svg", LocaleKeys.pendingTransactions.tr(), AppRoutes.pendingTransactions),
DrawerMenuItem("assets/images/drawer/change_password.svg", LocaleKeys.changePassword.tr(), ""),

@ -116,6 +116,9 @@ class ServicesWidget extends StatelessWidget {
} else if (menuEntry.requestType == "VACATION_RULE") {
Navigator.pushNamed(context, AppRoutes.vacationRule);
return;
} else if (menuEntry.menuName == "MBL_PERINFO_SS") {
Navigator.of(context).pushNamed(AppRoutes.profile);
return;
}
List<GetMenuEntriesList> menuList = pro.getMenuEntriesList?.where((element) => element.parentMenuName == menuEntry.menuName && element.menuEntryType == "FUNCTION").toList() ?? [];
menuEntry.icon = "";

@ -0,0 +1,114 @@
import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/profile_api_client.dart';
import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
import 'package:mohem_flutter_app/models/performance.dart';
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
class PerformanceAppraisal extends StatefulWidget {
const PerformanceAppraisal({Key? key}) : super(key: key);
@override
_PerformanceAppraisalState createState() => _PerformanceAppraisalState();
}
class _PerformanceAppraisalState extends State<PerformanceAppraisal> {
List<GetPerformanceAppraisalList> performance = [];
@override
void initState() {
getPerformanceAppraisal();
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: MyColors.backgroundColor,
appBar: AppBarWidget(
context,
title: LocaleKeys.performance.tr(),
),
body: performance.isNotEmpty
? SingleChildScrollView(
child: Container(
width: double.infinity,
padding: const EdgeInsets.only(left: 12, right: 12, top: 10, bottom: 10),
child: Column(children: [
Row(children: [Expanded(flex: 1, child: getPerformanceCard(performance.first))]),
GridView.count(
crossAxisCount: 2,
shrinkWrap: true,
childAspectRatio:1.3,
children: performance
.where((GetPerformanceAppraisalList el) => performance.indexOf(el) != 0)
.map(
(GetPerformanceAppraisalList item) => getPerformanceCard(item),
)
.toList(),
)
])))
: Utils.getNoDataWidget(context),
);
}
Widget getPerformanceCard(GetPerformanceAppraisalList performance) {
return Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Padding(
padding: const EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
LocaleKeys.performanceEvaluationIn.tr() + performance.aPPRAISALYEAR.toString(),
style: const TextStyle(fontWeight: FontWeight.bold),
),
const SizedBox(
height: 10,
),
SliderTheme(
data: SliderThemeData(trackHeight: 3, thumbShape: SliderComponentShape.noThumb, overlayShape: SliderComponentShape.noOverlay),
child: Slider(
max: 100,
min: 0,
inactiveColor: Colors.grey.withOpacity(.4),
activeColor: Colors.green,
value: double.parse(performance.aPPRAISALSCORE!),
onChanged: (value) {},
semanticFormatterCallback: (double newValue) {
return '${newValue.round()}';
})),
const SizedBox(
height: 10,
),
Text(
performance.aPPRAISALSCORE.toString() + '%',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
color: Colors.green,
),
),
],
)));
}
void getPerformanceAppraisal() async {
try {
Utils.showLoading(context);
performance = (await ProfileApiClient().getPerformanceAppraisal())!;
setState(() {});
Utils.hideLoading(context);
} catch (ex) {
Utils.hideLoading(context);
Utils.handleException(ex, context, null);
}
}
}

@ -448,9 +448,9 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
Utils.showLoading(context);
if (args['actionType'] == "ADD") {
var relationID = null;
submitContactTransactionList = await ProfileApiClient().submetConatctTransactionAddAndUpdate(args['actionType'], relationID, valuesFinal);
submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], relationID, valuesFinal);
} else if (args['actionType'] == "UPDATE") {
submitContactTransactionList = await ProfileApiClient().submetConatctTransactionAddAndUpdate(args['actionType'], args['relationID'], valuesFinal);
submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], args['relationID'], valuesFinal);
}
var transactionId = submitContactTransactionList!.pTRANSACTIONID;
var itemKey = submitContactTransactionList!.pITEMKEY;

Loading…
Cancel
Save