performance page added

merge-requests/1/merge
Sultan Khan 3 years ago
parent ff4a546e5f
commit 39b916bcc8

@ -266,6 +266,7 @@
"summaryOfInformation": "ملخص المعلومات",
"totalPayAmount": "المبلغ الإجمالي للدفع",
"paymentInformation": "معلومات الدفع",
"performance": "تقييم الاداء",
"amount": "مقدار",
"correctCurrentDatails": "تعديل او اكمال التفاصيل الحالية",
"selectType": " حدد نوع التغيير الذي تريد القيام به",
@ -310,10 +311,10 @@
"requestType": "نوع الطلب",
"employeeDigitalID": "هويةالموظف الرقمية",
"businessCard": "بطاقة العمل",
"checkOut":"وقت الخروج",
"regular":"منتظم",
"mark" : "علامة",
"selectMethodOfAttendance":"اختر طريقة تسجيل الحضور",
"checkOut": "وقت الخروج",
"regular": "منتظم",
"mark": "علامة",
"selectMethodOfAttendance": "اختر طريقة تسجيل الحضور",
"comeNearHMGWifi": "HMG wifi من فضلك اقترب من",
"profile": {
"reset_password": {

@ -310,10 +310,11 @@
"wantToReject": "Are you sure want to reject?",
"employeeDigitalID": "Employee Digital ID",
"businessCard": "Business Card",
"checkOut":"Check Out",
"regular":"Regular",
"mark" : "Mark",
"selectMethodOfAttendance":"Select the method to mark the attendance",
"checkOut": "Check Out",
"regular": "Regular",
"mark": "Mark",
"performance": "Performance Evaluation",
"selectMethodOfAttendance": "Select the method to mark the attendance",
"comeNearHMGWifi": "Please come near to HMG wifi",
"profile": {
"reset_password": {

@ -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);
}
}

@ -15,6 +15,7 @@ import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_input
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
import 'package:mohem_flutter_app/ui/my_attendance/my_attendance_screen.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';
@ -104,6 +105,10 @@ class AppRoutes {
//Pay slip
static const String monthlyPaySlip = "/monthlyPaySlip";
//performance evaluation
static const String performanceEvaluation = "/performanceEvaluation";
static final Map<String, WidgetBuilder> routes = {
login: (context) => LoginScreen(),
verifyLogin: (context) => VerifyLoginScreen(),
@ -165,5 +170,6 @@ class AppRoutes {
//pay slip
monthlyPaySlip: (context) => MonthlyPaySlipScreen(),
performanceEvaluation: (context) => PerformanceAppraisal(),
};
}

@ -1,6 +1,6 @@
// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
abstract class LocaleKeys {
abstract class LocaleKeys {
static const mohemm = 'mohemm';
static const english = 'english';
static const arabic = 'arabic';
@ -247,7 +247,7 @@ abstract class LocaleKeys {
static const Payroll = 'Payroll';
static const civilIdentityNumber = 'civilIdentityNumber';
static const dateOfBirth = 'dateOfBirth';
static const maritalStatus = 'maritalStatus ';
static const maritalStatus = 'maritalStatus ';
static const fullName = 'fullName';
static const remove = 'remove';
static const submit = 'submit';
@ -273,7 +273,7 @@ abstract class LocaleKeys {
static const enterNewInfo = 'enterNewInfo';
static const endDate = 'endDate';
static const removeThisMember = 'removeThisMember';
static const updateThisMember = 'updateThisMember ';
static const updateThisMember = 'updateThisMember ';
static const addNewFamilyMember = 'addNewFamilyMember';
static const addRow = 'addRow';
static const pleaseSelect = 'pleaseSelect';
@ -282,6 +282,7 @@ abstract class LocaleKeys {
static const add = 'add';
static const myProfile = 'myProfile';
static const mowadhafhi = 'mowadhafhi';
static const performance = 'performance';
static const searchAnnouncements = 'searchAnnouncements';
static const announcements = 'announcements';
static const swipeRequest = 'swipeRequest';
@ -334,5 +335,4 @@ abstract class LocaleKeys {
static const gender_with_arg = 'gender.with_arg';
static const gender = 'gender';
static const reset_locale = 'reset_locale';
}

@ -51,6 +51,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';
@ -193,7 +194,7 @@ class GenericResponseModel {
// List<String>? getPendingReqDetailsList;
// List<String>? getPendingReqFunctionsList;
List<String>? getPerformanceAppraisalList;
List<GetPerformanceAppraisalList>? getPerformanceAppraisalList;
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList;
List<GetPoItemHistoryList>? getPoItemHistoryList;
GetPoNotificationBodyList? getPoNotificationBodyList;
@ -900,7 +901,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) {

@ -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() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['APPRAISAL_SCORE'] = this.aPPRAISALSCORE;
data['APPRAISAL_YEAR'] = this.aPPRAISALYEAR;
return data;
}
}

@ -44,7 +44,7 @@ class _AppDrawerState extends State<AppDrawer> {
const Divider(),
InkWell(
child: DrawerItem(
// 'Mowadhafhi',
// 'Mowadhafhi',
LocaleKeys.mowadhafhi.tr(),
icon: Icons.person,
color: Colors.grey,
@ -54,6 +54,18 @@ class _AppDrawerState extends State<AppDrawer> {
},
),
const Divider(),
InkWell(
child: DrawerItem(
// 'Mowadhafhi',
LocaleKeys.performance.tr(),
icon: Icons.person,
color: Colors.grey,
),
onTap: () {
drawerNavigator(context, AppRoutes.performanceEvaluation);
},
),
const Divider(),
InkWell(
child: DrawerItem(
LocaleKeys.pendingTransactions.tr(),

@ -115,6 +115,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,117 @@
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),
// margin: 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,
// padding: EdgeInsets.all(4.0),
// //childAspectRatio: 8.0 / 9.0,
children: performance
.where((el) => performance.indexOf(el) != 0)
.map(
(item) => getPerformanceCard(item),
)
.toList(),
)
])))
: Utils.getNoDataWidget(context),
);
}
Widget getPerformanceCard(GetPerformanceAppraisalList performance) {
return Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
child: Padding(
padding: EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
child: Text(
"Performance evaluation in " + performance.aPPRAISALYEAR.toString(),
style: const TextStyle(fontWeight: FontWeight.bold),
)),
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()}';
})),
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