Merge branch 'master' into development_sikander
# Conflicts: # assets/langs/ar-SA.json # assets/langs/en-US.json # lib/classes/consts.dart # lib/config/routes.dart # lib/generated/codegen_loader.g.dart # lib/generated/locale_keys.g.dart # lib/models/generic_response_model.dart # lib/ui/my_attendance/dynamic_screens/dynamic_input_screen.dart # pubspec.yamlmerge-requests/1/merge
commit
ae0a788728
@ -0,0 +1,5 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"MPLOYEEIMAGE"
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="19.914" height="15.524" viewBox="0 0 19.914 15.524">
|
||||
<g id="contact-details" transform="translate(0 -40.4)">
|
||||
<g id="Group_7494" data-name="Group 7494" transform="translate(0 40.4)">
|
||||
<rect id="Rectangle_17431" data-name="Rectangle 17431" width="1.676" height="1.677" transform="translate(3.789 9.359)" fill="#2bb8a6"/>
|
||||
<path id="Path_4578" data-name="Path 4578" d="M70.584,123.011a.838.838,0,1,1-.838.838A.838.838,0,0,1,70.584,123.011Z" transform="translate(-65.957 -118.523)" fill="#2bb8a6"/>
|
||||
<path id="Path_4579" data-name="Path 4579" d="M19.2,40.4H.719A.719.719,0,0,0,0,41.118V55.206a.719.719,0,0,0,.719.718H19.2a.718.718,0,0,0,.718-.718V41.119A.719.719,0,0,0,19.2,40.4ZM6.9,52.154a.718.718,0,0,1-.719.718H3.071a.718.718,0,0,1-.718-.718V49.041a.718.718,0,0,1,.718-.718H6.185a.718.718,0,0,1,.719.718v3.114ZM4.628,48A2.276,2.276,0,1,1,6.9,45.727,2.278,2.278,0,0,1,4.628,48Zm12.216,4.431H10A.718.718,0,0,1,10,51h6.844a.718.718,0,1,1,0,1.437Zm0-2.4H10A.719.719,0,0,1,10,48.6h6.844a.719.719,0,0,1,0,1.437Zm0-2.4H10a.719.719,0,0,1,0-1.437h6.844a.719.719,0,0,1,0,1.437Zm0-2.4H10a.719.719,0,0,1,0-1.437h6.844a.719.719,0,0,1,0,1.437Z" transform="translate(0 -40.4)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="15.083" height="20.111" viewBox="0 0 15.083 20.111">
|
||||
<g id="Pin" transform="translate(-8)">
|
||||
<path id="Path_4580" data-name="Path 4580" d="M15.542,0A7.552,7.552,0,0,0,8,7.542c0,5.414,7.026,12.2,7.325,12.481a.311.311,0,0,0,.434,0c.3-.286,7.325-7.067,7.325-12.481A7.552,7.552,0,0,0,15.542,0Zm0,11A3.457,3.457,0,1,1,19,7.542,3.457,3.457,0,0,1,15.542,11Z" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 435 B |
@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="17.224" height="16.16" viewBox="0 0 17.224 16.16">
|
||||
<path id="family_3_" data-name="family (3)" d="M7.976,15.087v.831a2.518,2.518,0,0,1-2.515,2.515H2.214a.287.287,0,0,1-.287-.287V16.626A1.828,1.828,0,0,1,3.753,14.8H7.688A.287.287,0,0,1,7.976,15.087Zm-2.515,3.92c-2.147,0-2.919.007-3.237,0a.287.287,0,0,0-.3.287v.533a2.489,2.489,0,1,0,4.979-.02v-.713a.287.287,0,0,0-.383-.271A3.073,3.073,0,0,1,5.461,19.008Zm3.975,9.87a3.24,3.24,0,0,1-1.629,0,.144.144,0,0,0-.148.229,1.242,1.242,0,0,0,1.925-.006A.143.143,0,0,0,9.436,28.878Zm1.259-.217h-.059a.284.284,0,0,0-.268.2,1.826,1.826,0,0,1-3.319.377,1.9,1.9,0,0,1-.174-.376.288.288,0,0,0-.272-.2H6.528A1.724,1.724,0,0,0,4.8,30.385v.287a.287.287,0,0,0,.287.287h7.041a.287.287,0,0,0,.287-.287v-.287A1.724,1.724,0,0,0,10.7,28.661ZM1.93,27.605H.287A.287.287,0,0,0,0,27.893v2.78a.287.287,0,0,0,.287.287H1.93a.287.287,0,0,0,.287-.287v-2.78A.287.287,0,0,0,1.93,27.605Zm4.8-4.484a.287.287,0,0,0-.152-.522H6.491a.237.237,0,0,0-.223.154,1.949,1.949,0,0,1-1.792,1.294,1.975,1.975,0,0,1-1.825-1.33.174.174,0,0,0-.163-.117A2.489,2.489,0,0,0,0,25.087v1.656a.287.287,0,0,0,.287.287H1.93a.287.287,0,0,0,.287-.287v-.12a.293.293,0,0,1,.268-.3.287.287,0,0,1,.306.287v4.06a.287.287,0,0,0,.287.287h.862a.287.287,0,0,0,.287-.292c0-.074,0-.163,0-.282A2.3,2.3,0,0,1,5.9,28.174a.288.288,0,0,0,.148-.454,3.239,3.239,0,0,1,.68-4.6Zm8.007-.524a.234.234,0,0,0-.222.161A1.847,1.847,0,0,1,12.8,24.036a1.928,1.928,0,0,1-1.731-1.292.232.232,0,0,0-.216-.146c-.064,0-.131,0-.2,0a.288.288,0,0,0-.156.523,3.239,3.239,0,0,1,.678,4.6.288.288,0,0,0,.148.454,2.3,2.3,0,0,1,1.67,2.212c0,.119,0,.208,0,.282a.287.287,0,0,0,.287.292h.862a.287.287,0,0,0,.287-.287v-4.06a.287.287,0,0,1,.306-.287.293.293,0,0,1,.268.3v.12a.287.287,0,0,0,.287.287h1.642a.287.287,0,0,0,.287-.287V25.087A2.489,2.489,0,0,0,14.734,22.6Zm.272,5.295v2.78a.287.287,0,0,0,.287.287h1.642a.287.287,0,0,0,.287-.287v-2.78a.287.287,0,0,0-.287-.287H15.294A.287.287,0,0,0,15.007,27.893ZM12.857,14.816A3.583,3.583,0,0,0,9.243,18.4v3.564a.288.288,0,0,0,.392.267,3.056,3.056,0,0,1,.474-.139.288.288,0,0,0,.173-.455,3.1,3.1,0,0,1-.6-1.84V18.683a.862.862,0,0,1,.873-.862,10.523,10.523,0,0,0,3.477-.542,1.353,1.353,0,0,1,1.784,1.281v1.253a3.076,3.076,0,0,1-.6,1.825.287.287,0,0,0,.166.453,3.036,3.036,0,0,1,.617.2.288.288,0,0,0,.408-.261V18.441A3.609,3.609,0,0,0,12.857,14.816ZM8.612,23.092a2.659,2.659,0,1,0,2.659,2.659,2.662,2.662,0,0,0-2.659-2.659ZM12.06,22.8a.144.144,0,0,0-.137.239,1.156,1.156,0,0,0,1.819-.052.144.144,0,0,0-.152-.229A3.085,3.085,0,0,1,12.06,22.8Zm2.151-4.979a11.083,11.083,0,0,1-3.667.572.287.287,0,0,0-.291.287v1.109a2.492,2.492,0,1,0,4.984.02V18.559A.778.778,0,0,0,14.211,17.823ZM3.638,22.787a.144.144,0,0,0-.143.236,1.292,1.292,0,0,0,1.991-.044.144.144,0,0,0-.152-.23A3.069,3.069,0,0,1,3.638,22.787Z" transform="translate(0 -14.8)" fill="#2bb8a6"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
@ -0,0 +1,14 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="17.232" height="19.606" viewBox="0 0 17.232 19.606">
|
||||
<g id="user_19_" data-name="user (19)" transform="translate(-31)">
|
||||
<g id="Group_7233" data-name="Group 7233" transform="translate(34.446)">
|
||||
<g id="Group_7232" data-name="Group 7232">
|
||||
<path id="Path_16" data-name="Path 16" d="M126.17,0a5.17,5.17,0,1,0,5.169,5.17A5.175,5.175,0,0,0,126.17,0Z" transform="translate(-121)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="Group_7235" data-name="Group 7235" transform="translate(31 11.488)">
|
||||
<g id="Group_7234" data-name="Group 7234">
|
||||
<path id="Path_17" data-name="Path 17" d="M46.048,302.228A7.369,7.369,0,0,0,40.765,300h-2.3a7.37,7.37,0,0,0-5.283,2.228A7.534,7.534,0,0,0,31,307.544a.574.574,0,0,0,.574.574H47.657a.574.574,0,0,0,.574-.574A7.534,7.534,0,0,0,46.048,302.228Z" transform="translate(-31 -300)" fill="#2bb8a6"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 936 B |
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,31 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/consts.dart';
|
||||
import 'package:mohem_flutter_app/models/basic_member_information_model.dart';
|
||||
import 'package:mohem_flutter_app/models/check_mobile_app_version_model.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
||||
import 'package:mohem_flutter_app/models/eit/get_eit_transaction_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/member_login_list_model.dart';
|
||||
|
||||
import 'api_client.dart';
|
||||
|
||||
class EITApiClient {
|
||||
static final EITApiClient _instance = EITApiClient._internal();
|
||||
|
||||
EITApiClient._internal();
|
||||
|
||||
factory EITApiClient() => _instance;
|
||||
|
||||
Future<List<CollectionTransaction>?> getEITTransactions(String functionName) async {
|
||||
String url = "${ApiConsts.erpRest}GET_EIT_TRANSACTIONS";
|
||||
Map<String, dynamic> postParams = {'P_FUNCTION_NAME': functionName, "P_MENU_TYPE": "E", "P_PAGE_LIMIT": 50, "P_PAGE_NUM": 1};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
List<CollectionTransaction>? responseData = GET_EIT_Transactions_Model.fromJson(json['GetEITTransactionList'][0]).collectionTransaction;
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/consts.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_day_hours_type_details_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_mobile_login_info_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
|
||||
import 'api_client.dart';
|
||||
|
||||
class MonthlyAttendanceApiClient {
|
||||
static final MonthlyAttendanceApiClient _instance = MonthlyAttendanceApiClient._internal();
|
||||
|
||||
MonthlyAttendanceApiClient._internal();
|
||||
|
||||
factory MonthlyAttendanceApiClient() => _instance;
|
||||
|
||||
|
||||
Future<GetTimeCardSummaryList?> getTimeCardSummary(String month, int year) async {
|
||||
String url = "${ApiConsts.erpRest}GET_TIME_CARD_SUMMARY";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
"SearchMonth": month,
|
||||
"SearchYear": year,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return (responseData.getTimeCardSummaryList?.length ?? 0) > 0 ? responseData.getTimeCardSummaryList!.first : null;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetDayHoursTypeDetailsList>> getDayHoursTypeDetails(String month, int year) async {
|
||||
String url = "${ApiConsts.erpRest}GET_DAY_HOURS_TYPE_DETAILS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_PAGE_LIMIT": 100,
|
||||
"P_PAGE_NUM": 1,
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
"SearchMonth": month,
|
||||
"SearchYear": year,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
// postParams["DeviceToken"] = deviceToken;
|
||||
// postParams["DeviceType"] = deviceType;
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
print("Response Data______");
|
||||
print(responseData.getDayHoursTypeDetailsList!.length);
|
||||
return responseData.getDayHoursTypeDetailsList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
|
||||
Future<GetScheduleShiftsDetailsList?> getScheduleShiftsDetails(int pRTPID) async {
|
||||
String url = "${ApiConsts.erpRest}GET_SCHEDULE_SHIFTS_DETAILS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_PAGE_LIMIT": 10,
|
||||
"P_PAGE_NUM": 1,
|
||||
"P_RTP_ID": pRTPID,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return (responseData.getScheduleShiftsDetailsList?.length ?? 0) > 0 ? responseData.getScheduleShiftsDetailsList!.first : null;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/consts.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
|
||||
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/profile/phone_number_types_modek.dart';
|
||||
import 'api_client.dart';
|
||||
|
||||
class ProfileApiClient {
|
||||
static final ProfileApiClient _instance = ProfileApiClient._internal();
|
||||
|
||||
ProfileApiClient._internal();
|
||||
|
||||
factory ProfileApiClient() => _instance;
|
||||
|
||||
Future<List<GetEmployeeContactsList>> getEmployeeContacts() async {
|
||||
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_CONTACTS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getEmployeeContactsList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetEmployeeBasicDetailsList>> getEmployeeBasicDetails() async {
|
||||
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_BASIC_DETAILS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getEmployeeBasicDetailsList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetEmployeePhonesList>> getEmployeePhones() async {
|
||||
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_PHONES";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getEmployeePhonesList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetEmployeeAddressList>> getEmployeeAddress() async {
|
||||
String url = "${ApiConsts.erpRest}GET_EMPLOYEE_ADDRESS";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getEmployeeAddressList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future updateEmpImage(img) async {
|
||||
String url = "${ApiConsts.erpRest}UPDATE_EMPLOYEE_IMAGE";
|
||||
Map<String, dynamic> postParams = {"P_MENU_TYPE": "E", "P_SELECTED_RESP_ID": -999, "P_IMAGE": img};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
// GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return json['UpdateEmployeeImageList'];
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel> getDffStructure(String pFunctionName, String uRL, String requestType) async {
|
||||
String url = ApiConsts.erpRest + uRL;
|
||||
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName, "P_REQUEST_TYPE": requestType};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<GenericResponseModel> getColStructure(String pFunctionName, String uRL, String requestType) async {
|
||||
String url = ApiConsts.erpRest + uRL;
|
||||
Map<String, dynamic> postParams = {"P_SELECTED_RESP_ID": -999, "P_MENU_TYPE": "E", "P_FUNCTION_NAME": pFunctionName, "P_REQUEST_TYPE": requestType};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<ESERVICESVS> getValueSetValues(String pSegmentName, String pDescFlexContextCode, String pDescFlexName, List<Map<String, dynamic>> list) async {
|
||||
String url = "${ApiConsts.erpRest}GET_VALUE_SET_VALUES";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_PAGE_LIMIT": 1000,
|
||||
"P_PAGE_NUM": 1,
|
||||
"P_PARENT_VALUE": null,
|
||||
"P_SEGMENT_NAME": pSegmentName,
|
||||
"P_DESC_FLEX_CONTEXT_CODE": pDescFlexContextCode,
|
||||
"P_DESC_FLEX_NAME": pDescFlexName,
|
||||
"GetValueSetValuesTBL": list,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getValueSetValuesList!.first;
|
||||
}, url, postParams);
|
||||
}
|
||||
|
||||
Future<List<GetPhoneNumberTypesModel>> getPhoneNumberTypes() async {
|
||||
String url = "${ApiConsts.erpRest}GET_OBJECT_VALUES";
|
||||
Map<String, dynamic> postParams = {
|
||||
"P_MENU_TYPE": "E",
|
||||
"P_SELECTED_RESP_ID": -999,
|
||||
};
|
||||
postParams.addAll(AppState().postParamsJson);
|
||||
return await ApiClient().postJsonForObject((json) {
|
||||
GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
|
||||
return responseData.getObjectValuesList ?? [];
|
||||
}, url, postParams);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
class GET_EIT_Transactions_Model {
|
||||
List<CollectionTransaction>? collectionTransaction;
|
||||
|
||||
GET_EIT_Transactions_Model({this.collectionTransaction});
|
||||
|
||||
GET_EIT_Transactions_Model.fromJson(Map<String, dynamic> json) {
|
||||
if (json['Collection_Transaction'] != null) {
|
||||
collectionTransaction = <CollectionTransaction>[];
|
||||
json['Collection_Transaction'].forEach((v) {
|
||||
collectionTransaction!.add(new CollectionTransaction.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.collectionTransaction != null) {
|
||||
data['Collection_Transaction'] = this.collectionTransaction!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class CollectionTransaction {
|
||||
String? aPPLICATIONCOLUMNNAME;
|
||||
String? dATATYPE;
|
||||
String? dATEVALUE;
|
||||
String? dESCFLEXCONTEXTCODE;
|
||||
String? dESCFLEXNAME;
|
||||
String? dISPLAYFLAG;
|
||||
int? fROMROWNUM;
|
||||
int? nOOFROWS;
|
||||
dynamic? nUMBERVALUE;
|
||||
int? rOWNUM;
|
||||
String? sEGMENTNAME;
|
||||
String? sEGMENTPROMPT;
|
||||
int? sEGMENTSEQNUM;
|
||||
String? sEGMENTVALUEDSP;
|
||||
int? tOROWNUM;
|
||||
int? tRANSACTIONNUMBER;
|
||||
String? vARCHAR2VALUE;
|
||||
|
||||
CollectionTransaction(
|
||||
{this.aPPLICATIONCOLUMNNAME,
|
||||
this.dATATYPE,
|
||||
this.dATEVALUE,
|
||||
this.dESCFLEXCONTEXTCODE,
|
||||
this.dESCFLEXNAME,
|
||||
this.dISPLAYFLAG,
|
||||
this.fROMROWNUM,
|
||||
this.nOOFROWS,
|
||||
this.nUMBERVALUE,
|
||||
this.rOWNUM,
|
||||
this.sEGMENTNAME,
|
||||
this.sEGMENTPROMPT,
|
||||
this.sEGMENTSEQNUM,
|
||||
this.sEGMENTVALUEDSP,
|
||||
this.tOROWNUM,
|
||||
this.tRANSACTIONNUMBER,
|
||||
this.vARCHAR2VALUE});
|
||||
|
||||
CollectionTransaction.fromJson(Map<String, dynamic> json) {
|
||||
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
|
||||
dATATYPE = json['DATATYPE'];
|
||||
dATEVALUE = json['DATE_VALUE'];
|
||||
dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
|
||||
dESCFLEXNAME = json['DESC_FLEX_NAME'];
|
||||
dISPLAYFLAG = json['DISPLAY_FLAG'];
|
||||
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||
nOOFROWS = json['NO_OF_ROWS'];
|
||||
nUMBERVALUE = json['NUMBER_VALUE'];
|
||||
rOWNUM = json['ROW_NUM'];
|
||||
sEGMENTNAME = json['SEGMENT_NAME'];
|
||||
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
|
||||
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
|
||||
sEGMENTVALUEDSP = json['SEGMENT_VALUE_DSP'];
|
||||
tOROWNUM = json['TO_ROW_NUM'];
|
||||
tRANSACTIONNUMBER = json['TRANSACTION_NUMBER'];
|
||||
vARCHAR2VALUE = json['VARCHAR2_VALUE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
|
||||
data['DATATYPE'] = this.dATATYPE;
|
||||
data['DATE_VALUE'] = this.dATEVALUE;
|
||||
data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
|
||||
data['DESC_FLEX_NAME'] = this.dESCFLEXNAME;
|
||||
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
|
||||
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||
data['NUMBER_VALUE'] = this.nUMBERVALUE;
|
||||
data['ROW_NUM'] = this.rOWNUM;
|
||||
data['SEGMENT_NAME'] = this.sEGMENTNAME;
|
||||
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
|
||||
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
|
||||
data['SEGMENT_VALUE_DSP'] = this.sEGMENTVALUEDSP;
|
||||
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||
data['TRANSACTION_NUMBER'] = this.tRANSACTIONNUMBER;
|
||||
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,180 @@
|
||||
class GetDayHoursTypeDetailsList {
|
||||
Null? aBSENCEATTENDANCEID;
|
||||
Null? aBSENCEATTENDANCETYPEID;
|
||||
String? aBSENTFLAG;
|
||||
String? aCTUALHRS;
|
||||
String? aNALAYZEDFLAG;
|
||||
String? aPPROVEDTIMEBACKHRS;
|
||||
String? aPPRTIMEBACKFLAG;
|
||||
int? aSSIGNMENTID;
|
||||
String? aTTENDEDFLAG;
|
||||
Null? cALENDARENTRYID;
|
||||
String? cOMPOFFFLAG;
|
||||
String? cOMPOFFHRS;
|
||||
String? cOMPOFFHHRS;
|
||||
String? cOMPOFFNHRS;
|
||||
String? cOMPOFFWHRS;
|
||||
String? dAYTYPE;
|
||||
String? eARLYOUTFLAG;
|
||||
String? eARLYOUTHRS;
|
||||
String? eXCESSFLAG;
|
||||
String? eXCESSHRS;
|
||||
int? fROMROWNUM;
|
||||
String? lATEINFLAG;
|
||||
String? lATEINHRS;
|
||||
String? mISSINGSWIPEFLAG;
|
||||
String? nONSCHEDULEDFLAG;
|
||||
Null? nOOFROWS;
|
||||
String? oNCALLHRS;
|
||||
Null? pERSONEXTRAINFOID;
|
||||
String? pLANNEDOTHRS;
|
||||
String? pLANNEDOTHRSFLAG;
|
||||
String? rEMARKS;
|
||||
int? rOWNUM;
|
||||
int? rTPID;
|
||||
String? sCHEDULEDHRS;
|
||||
String? sCHEDULEDONCALLHRS;
|
||||
String? sCHEDULEDPLANNEDOTHRS;
|
||||
String? sCHEDULEDATE;
|
||||
String? sHORTAGEFLAG;
|
||||
String? sHORTAGEHRS;
|
||||
String? tIMEBACKFLAG;
|
||||
String? tIMEBACKHRS;
|
||||
int? tOROWNUM;
|
||||
|
||||
GetDayHoursTypeDetailsList(
|
||||
{this.aBSENCEATTENDANCEID,
|
||||
this.aBSENCEATTENDANCETYPEID,
|
||||
this.aBSENTFLAG,
|
||||
this.aCTUALHRS,
|
||||
this.aNALAYZEDFLAG,
|
||||
this.aPPROVEDTIMEBACKHRS,
|
||||
this.aPPRTIMEBACKFLAG,
|
||||
this.aSSIGNMENTID,
|
||||
this.aTTENDEDFLAG,
|
||||
this.cALENDARENTRYID,
|
||||
this.cOMPOFFFLAG,
|
||||
this.cOMPOFFHRS,
|
||||
this.cOMPOFFHHRS,
|
||||
this.cOMPOFFNHRS,
|
||||
this.cOMPOFFWHRS,
|
||||
this.dAYTYPE,
|
||||
this.eARLYOUTFLAG,
|
||||
this.eARLYOUTHRS,
|
||||
this.eXCESSFLAG,
|
||||
this.eXCESSHRS,
|
||||
this.fROMROWNUM,
|
||||
this.lATEINFLAG,
|
||||
this.lATEINHRS,
|
||||
this.mISSINGSWIPEFLAG,
|
||||
this.nONSCHEDULEDFLAG,
|
||||
this.nOOFROWS,
|
||||
this.oNCALLHRS,
|
||||
this.pERSONEXTRAINFOID,
|
||||
this.pLANNEDOTHRS,
|
||||
this.pLANNEDOTHRSFLAG,
|
||||
this.rEMARKS,
|
||||
this.rOWNUM,
|
||||
this.rTPID,
|
||||
this.sCHEDULEDHRS,
|
||||
this.sCHEDULEDONCALLHRS,
|
||||
this.sCHEDULEDPLANNEDOTHRS,
|
||||
this.sCHEDULEDATE,
|
||||
this.sHORTAGEFLAG,
|
||||
this.sHORTAGEHRS,
|
||||
this.tIMEBACKFLAG,
|
||||
this.tIMEBACKHRS,
|
||||
this.tOROWNUM});
|
||||
|
||||
GetDayHoursTypeDetailsList.fromJson(Map<String, dynamic> json) {
|
||||
aBSENCEATTENDANCEID = json['ABSENCE_ATTENDANCE_ID'];
|
||||
aBSENCEATTENDANCETYPEID = json['ABSENCE_ATTENDANCE_TYPE_ID'];
|
||||
aBSENTFLAG = json['ABSENT_FLAG'];
|
||||
aCTUALHRS = json['ACTUAL_HRS'];
|
||||
aNALAYZEDFLAG = json['ANALAYZED_FLAG'];
|
||||
aPPROVEDTIMEBACKHRS = json['APPROVED_TIMEBACK_HRS'];
|
||||
aPPRTIMEBACKFLAG = json['APPR_TIMEBACK_FLAG'];
|
||||
aSSIGNMENTID = json['ASSIGNMENT_ID'];
|
||||
aTTENDEDFLAG = json['ATTENDED_FLAG'];
|
||||
cALENDARENTRYID = json['CALENDAR_ENTRY_ID'];
|
||||
cOMPOFFFLAG = json['COMP_OFF_FLAG'];
|
||||
cOMPOFFHRS = json['COMP_OFF_HRS'];
|
||||
cOMPOFFHHRS = json['COMP_OFF_H_HRS'];
|
||||
cOMPOFFNHRS = json['COMP_OFF_N_HRS'];
|
||||
cOMPOFFWHRS = json['COMP_OFF_W_HRS'];
|
||||
dAYTYPE = json['DAY_TYPE'];
|
||||
eARLYOUTFLAG = json['EARLY_OUT_FLAG'];
|
||||
eARLYOUTHRS = json['EARLY_OUT_HRS'];
|
||||
eXCESSFLAG = json['EXCESS_FLAG'];
|
||||
eXCESSHRS = json['EXCESS_HRS'];
|
||||
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||
lATEINFLAG = json['LATE_IN_FLAG'];
|
||||
lATEINHRS = json['LATE_IN_HRS'];
|
||||
mISSINGSWIPEFLAG = json['MISSING_SWIPE_FLAG'];
|
||||
nONSCHEDULEDFLAG = json['NON_SCHEDULED_FLAG'];
|
||||
nOOFROWS = json['NO_OF_ROWS'];
|
||||
oNCALLHRS = json['ON_CALL_HRS'];
|
||||
pERSONEXTRAINFOID = json['PERSON_EXTRA_INFO_ID'];
|
||||
pLANNEDOTHRS = json['PLANNED_OT_HRS'];
|
||||
pLANNEDOTHRSFLAG = json['PLANNED_OT_HRS_FLAG'];
|
||||
rEMARKS = json['REMARKS'];
|
||||
rOWNUM = json['ROW_NUM'];
|
||||
rTPID = json['RTP_ID'];
|
||||
sCHEDULEDHRS = json['SCHEDULED_HRS'];
|
||||
sCHEDULEDONCALLHRS = json['SCHEDULED_ON_CALL_HRS'];
|
||||
sCHEDULEDPLANNEDOTHRS = json['SCHEDULED_PLANNED_OT_HRS'];
|
||||
sCHEDULEDATE = json['SCHEDULE_DATE'];
|
||||
sHORTAGEFLAG = json['SHORTAGE_FLAG'];
|
||||
sHORTAGEHRS = json['SHORTAGE_HRS'];
|
||||
tIMEBACKFLAG = json['TIMEBACK_FLAG'];
|
||||
tIMEBACKHRS = json['TIMEBACK_HRS'];
|
||||
tOROWNUM = json['TO_ROW_NUM'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ABSENCE_ATTENDANCE_ID'] = this.aBSENCEATTENDANCEID;
|
||||
data['ABSENCE_ATTENDANCE_TYPE_ID'] = this.aBSENCEATTENDANCETYPEID;
|
||||
data['ABSENT_FLAG'] = this.aBSENTFLAG;
|
||||
data['ACTUAL_HRS'] = this.aCTUALHRS;
|
||||
data['ANALAYZED_FLAG'] = this.aNALAYZEDFLAG;
|
||||
data['APPROVED_TIMEBACK_HRS'] = this.aPPROVEDTIMEBACKHRS;
|
||||
data['APPR_TIMEBACK_FLAG'] = this.aPPRTIMEBACKFLAG;
|
||||
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
|
||||
data['ATTENDED_FLAG'] = this.aTTENDEDFLAG;
|
||||
data['CALENDAR_ENTRY_ID'] = this.cALENDARENTRYID;
|
||||
data['COMP_OFF_FLAG'] = this.cOMPOFFFLAG;
|
||||
data['COMP_OFF_HRS'] = this.cOMPOFFHRS;
|
||||
data['COMP_OFF_H_HRS'] = this.cOMPOFFHHRS;
|
||||
data['COMP_OFF_N_HRS'] = this.cOMPOFFNHRS;
|
||||
data['COMP_OFF_W_HRS'] = this.cOMPOFFWHRS;
|
||||
data['DAY_TYPE'] = this.dAYTYPE;
|
||||
data['EARLY_OUT_FLAG'] = this.eARLYOUTFLAG;
|
||||
data['EARLY_OUT_HRS'] = this.eARLYOUTHRS;
|
||||
data['EXCESS_FLAG'] = this.eXCESSFLAG;
|
||||
data['EXCESS_HRS'] = this.eXCESSHRS;
|
||||
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||
data['LATE_IN_FLAG'] = this.lATEINFLAG;
|
||||
data['LATE_IN_HRS'] = this.lATEINHRS;
|
||||
data['MISSING_SWIPE_FLAG'] = this.mISSINGSWIPEFLAG;
|
||||
data['NON_SCHEDULED_FLAG'] = this.nONSCHEDULEDFLAG;
|
||||
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||
data['ON_CALL_HRS'] = this.oNCALLHRS;
|
||||
data['PERSON_EXTRA_INFO_ID'] = this.pERSONEXTRAINFOID;
|
||||
data['PLANNED_OT_HRS'] = this.pLANNEDOTHRS;
|
||||
data['PLANNED_OT_HRS_FLAG'] = this.pLANNEDOTHRSFLAG;
|
||||
data['REMARKS'] = this.rEMARKS;
|
||||
data['ROW_NUM'] = this.rOWNUM;
|
||||
data['RTP_ID'] = this.rTPID;
|
||||
data['SCHEDULED_HRS'] = this.sCHEDULEDHRS;
|
||||
data['SCHEDULED_ON_CALL_HRS'] = this.sCHEDULEDONCALLHRS;
|
||||
data['SCHEDULED_PLANNED_OT_HRS'] = this.sCHEDULEDPLANNEDOTHRS;
|
||||
data['SCHEDULE_DATE'] = this.sCHEDULEDATE;
|
||||
data['SHORTAGE_FLAG'] = this.sHORTAGEFLAG;
|
||||
data['SHORTAGE_HRS'] = this.sHORTAGEHRS;
|
||||
data['TIMEBACK_FLAG'] = this.tIMEBACKFLAG;
|
||||
data['TIMEBACK_HRS'] = this.tIMEBACKHRS;
|
||||
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
|
||||
|
||||
class GetEmployeeAddressList {
|
||||
String? aPPLICATIONCOLUMNNAME;
|
||||
String? dATATYPE;
|
||||
String? dATEVALUE;
|
||||
String? dISPLAYFLAG;
|
||||
Null? nUMBERVALUE;
|
||||
String? sEGMENTPROMPT;
|
||||
int? sEGMENTSEQNUM;
|
||||
String? sEGMENTVALUEDSP;
|
||||
String? vARCHAR2VALUE;
|
||||
|
||||
GetEmployeeAddressList(
|
||||
{this.aPPLICATIONCOLUMNNAME,
|
||||
this.dATATYPE,
|
||||
this.dATEVALUE,
|
||||
this.dISPLAYFLAG,
|
||||
this.nUMBERVALUE,
|
||||
this.sEGMENTPROMPT,
|
||||
this.sEGMENTSEQNUM,
|
||||
this.sEGMENTVALUEDSP,
|
||||
this.vARCHAR2VALUE});
|
||||
|
||||
GetEmployeeAddressList.fromJson(Map<String, dynamic> json) {
|
||||
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
|
||||
dATATYPE = json['DATATYPE'];
|
||||
dATEVALUE = json['DATE_VALUE'];
|
||||
dISPLAYFLAG = json['DISPLAY_FLAG'];
|
||||
nUMBERVALUE = json['NUMBER_VALUE'];
|
||||
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
|
||||
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
|
||||
sEGMENTVALUEDSP = json['SEGMENT_VALUE_DSP'];
|
||||
vARCHAR2VALUE = json['VARCHAR2_VALUE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
|
||||
data['DATATYPE'] = this.dATATYPE;
|
||||
data['DATE_VALUE'] = this.dATEVALUE;
|
||||
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
|
||||
data['NUMBER_VALUE'] = this.nUMBERVALUE;
|
||||
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
|
||||
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
|
||||
data['SEGMENT_VALUE_DSP'] = this.sEGMENTVALUEDSP;
|
||||
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
|
||||
class GetEmployeeBasicDetailsList {
|
||||
String? aPPLICATIONCOLUMNNAME;
|
||||
String? dATATYPE;
|
||||
String? dATEVALUE;
|
||||
String? dISPLAYFLAG;
|
||||
int? gROUPNUM;
|
||||
int? nUMBERVALUE;
|
||||
String? sEGMENTPROMPT;
|
||||
int? sEGMENTSEQNUM;
|
||||
String? sEGMENTVALUEDSP;
|
||||
String? vARCHAR2VALUE;
|
||||
|
||||
GetEmployeeBasicDetailsList(
|
||||
{this.aPPLICATIONCOLUMNNAME,
|
||||
this.dATATYPE,
|
||||
this.dATEVALUE,
|
||||
this.dISPLAYFLAG,
|
||||
this.gROUPNUM,
|
||||
this.nUMBERVALUE,
|
||||
this.sEGMENTPROMPT,
|
||||
this.sEGMENTSEQNUM,
|
||||
this.sEGMENTVALUEDSP,
|
||||
this.vARCHAR2VALUE});
|
||||
|
||||
GetEmployeeBasicDetailsList.fromJson(Map<String, dynamic> json) {
|
||||
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
|
||||
dATATYPE = json['DATATYPE'];
|
||||
dATEVALUE = json['DATE_VALUE'];
|
||||
dISPLAYFLAG = json['DISPLAY_FLAG'];
|
||||
gROUPNUM = json['GROUP_NUM'];
|
||||
nUMBERVALUE = json['NUMBER_VALUE'];
|
||||
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
|
||||
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
|
||||
sEGMENTVALUEDSP = json['SEGMENT_VALUE_DSP'];
|
||||
vARCHAR2VALUE = json['VARCHAR2_VALUE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
|
||||
data['DATATYPE'] = this.dATATYPE;
|
||||
data['DATE_VALUE'] = this.dATEVALUE;
|
||||
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
|
||||
data['GROUP_NUM'] = this.gROUPNUM;
|
||||
data['NUMBER_VALUE'] = this.nUMBERVALUE;
|
||||
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
|
||||
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
|
||||
data['SEGMENT_VALUE_DSP'] = this.sEGMENTVALUEDSP;
|
||||
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,45 @@
|
||||
|
||||
class GetEmployeeContactsList {
|
||||
String? cONTACTNAME;
|
||||
int? cONTACTPERSONID;
|
||||
int? cONTACTRELATIONSHIPID;
|
||||
String? cONTACTTYPE;
|
||||
String? dATEOFBIRTH;
|
||||
int? pERSONID;
|
||||
String? pRIMARYCONTACTFLAG;
|
||||
String? rELATIONSHIP;
|
||||
|
||||
GetEmployeeContactsList(
|
||||
{this.cONTACTNAME,
|
||||
this.cONTACTPERSONID,
|
||||
this.cONTACTRELATIONSHIPID,
|
||||
this.cONTACTTYPE,
|
||||
this.dATEOFBIRTH,
|
||||
this.pERSONID,
|
||||
this.pRIMARYCONTACTFLAG,
|
||||
this.rELATIONSHIP});
|
||||
|
||||
GetEmployeeContactsList.fromJson(Map<String, dynamic> json) {
|
||||
cONTACTNAME = json['CONTACT_NAME'];
|
||||
cONTACTPERSONID = json['CONTACT_PERSON_ID'];
|
||||
cONTACTRELATIONSHIPID = json['CONTACT_RELATIONSHIP_ID'];
|
||||
cONTACTTYPE = json['CONTACT_TYPE'];
|
||||
dATEOFBIRTH = json['DATE_OF_BIRTH'];
|
||||
pERSONID = json['PERSON_ID'];
|
||||
pRIMARYCONTACTFLAG = json['PRIMARY_CONTACT_FLAG'];
|
||||
rELATIONSHIP = json['RELATIONSHIP'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['CONTACT_NAME'] = this.cONTACTNAME;
|
||||
data['CONTACT_PERSON_ID'] = this.cONTACTPERSONID;
|
||||
data['CONTACT_RELATIONSHIP_ID'] = this.cONTACTRELATIONSHIPID;
|
||||
data['CONTACT_TYPE'] = this.cONTACTTYPE;
|
||||
data['DATE_OF_BIRTH'] = this.dATEOFBIRTH;
|
||||
data['PERSON_ID'] = this.pERSONID;
|
||||
data['PRIMARY_CONTACT_FLAG'] = this.pRIMARYCONTACTFLAG;
|
||||
data['RELATIONSHIP'] = this.rELATIONSHIP;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
|
||||
class GetEmployeePhonesList {
|
||||
String? dATEFROM;
|
||||
String? dATETO;
|
||||
int? oBJECTVERSIONNUMBER;
|
||||
int? pARENTID;
|
||||
String? pARENTTABLE;
|
||||
int? pHONEID;
|
||||
String? pHONENUMBER;
|
||||
String? pHONETYPE;
|
||||
String? pHONETYPEMEANING;
|
||||
int? rOWINDEX;
|
||||
|
||||
GetEmployeePhonesList(
|
||||
{this.dATEFROM,
|
||||
this.dATETO,
|
||||
this.oBJECTVERSIONNUMBER,
|
||||
this.pARENTID,
|
||||
this.pARENTTABLE,
|
||||
this.pHONEID,
|
||||
this.pHONENUMBER,
|
||||
this.pHONETYPE,
|
||||
this.pHONETYPEMEANING,
|
||||
this.rOWINDEX});
|
||||
|
||||
GetEmployeePhonesList.fromJson(Map<String, dynamic> json) {
|
||||
dATEFROM = json['DATE_FROM'];
|
||||
dATETO = json['DATE_TO'];
|
||||
oBJECTVERSIONNUMBER = json['OBJECT_VERSION_NUMBER'];
|
||||
pARENTID = json['PARENT_ID'];
|
||||
pARENTTABLE = json['PARENT_TABLE'];
|
||||
pHONEID = json['PHONE_ID'];
|
||||
pHONENUMBER = json['PHONE_NUMBER'];
|
||||
pHONETYPE = json['PHONE_TYPE'];
|
||||
pHONETYPEMEANING = json['PHONE_TYPE_MEANING'];
|
||||
rOWINDEX = json['ROW_INDEX'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['DATE_FROM'] = this.dATEFROM;
|
||||
data['DATE_TO'] = this.dATETO;
|
||||
data['OBJECT_VERSION_NUMBER'] = this.oBJECTVERSIONNUMBER;
|
||||
data['PARENT_ID'] = this.pARENTID;
|
||||
data['PARENT_TABLE'] = this.pARENTTABLE;
|
||||
data['PHONE_ID'] = this.pHONEID;
|
||||
data['PHONE_NUMBER'] = this.pHONENUMBER;
|
||||
data['PHONE_TYPE'] = this.pHONETYPE;
|
||||
data['PHONE_TYPE_MEANING'] = this.pHONETYPEMEANING;
|
||||
data['ROW_INDEX'] = this.rOWINDEX;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
|
||||
class GetScheduleShiftsDetailsList {
|
||||
String? aCTUALWOBHRS;
|
||||
String? aPPROVEDENDDATETIME;
|
||||
String? aPPROVEDENDREASON;
|
||||
String? aPPROVEDENDREASONDESC;
|
||||
String? aPPROVEDENDTIME;
|
||||
String? aPPROVEDSTARTDATETIME;
|
||||
String? aPPROVEDSTARTREASON;
|
||||
String? aPPROVEDSTARTREASONDESC;
|
||||
String? aPPROVEDSTARTTIME;
|
||||
int? aSSIGNMENTID;
|
||||
String? bREAKNAME;
|
||||
int? fROMROWNUM;
|
||||
int? nOOFROWS;
|
||||
String? pERCENTAGE;
|
||||
int? rOWNUM;
|
||||
int? rTPID;
|
||||
int? rTPSCHEDULEID;
|
||||
String? sCHEDULEDATE;
|
||||
int? sEQNO;
|
||||
String? sHTACTUALENDDATETIME;
|
||||
String? sHTACTUALENDTIME;
|
||||
String? sHTACTUALHRS;
|
||||
String? sHTACTUALSTARTDATETIME;
|
||||
String? sHTACTUALSTARTTIME;
|
||||
String? sHTCODE;
|
||||
String? sHTNAME;
|
||||
String? sHTTYPE;
|
||||
String? sHTTYPEDESC;
|
||||
int? tOROWNUM;
|
||||
|
||||
GetScheduleShiftsDetailsList(
|
||||
{this.aCTUALWOBHRS,
|
||||
this.aPPROVEDENDDATETIME,
|
||||
this.aPPROVEDENDREASON,
|
||||
this.aPPROVEDENDREASONDESC,
|
||||
this.aPPROVEDENDTIME,
|
||||
this.aPPROVEDSTARTDATETIME,
|
||||
this.aPPROVEDSTARTREASON,
|
||||
this.aPPROVEDSTARTREASONDESC,
|
||||
this.aPPROVEDSTARTTIME,
|
||||
this.aSSIGNMENTID,
|
||||
this.bREAKNAME,
|
||||
this.fROMROWNUM,
|
||||
this.nOOFROWS,
|
||||
this.pERCENTAGE,
|
||||
this.rOWNUM,
|
||||
this.rTPID,
|
||||
this.rTPSCHEDULEID,
|
||||
this.sCHEDULEDATE,
|
||||
this.sEQNO,
|
||||
this.sHTACTUALENDDATETIME,
|
||||
this.sHTACTUALENDTIME,
|
||||
this.sHTACTUALHRS,
|
||||
this.sHTACTUALSTARTDATETIME,
|
||||
this.sHTACTUALSTARTTIME,
|
||||
this.sHTCODE,
|
||||
this.sHTNAME,
|
||||
this.sHTTYPE,
|
||||
this.sHTTYPEDESC,
|
||||
this.tOROWNUM});
|
||||
|
||||
GetScheduleShiftsDetailsList.fromJson(Map<String, dynamic> json) {
|
||||
aCTUALWOBHRS = json['ACTUAL_WOB_HRS'];
|
||||
aPPROVEDENDDATETIME = json['APPROVED_END_DATETIME'];
|
||||
aPPROVEDENDREASON = json['APPROVED_END_REASON'];
|
||||
aPPROVEDENDREASONDESC = json['APPROVED_END_REASON_DESC'];
|
||||
aPPROVEDENDTIME = json['APPROVED_END_TIME'];
|
||||
aPPROVEDSTARTDATETIME = json['APPROVED_START_DATETIME'];
|
||||
aPPROVEDSTARTREASON = json['APPROVED_START_REASON'];
|
||||
aPPROVEDSTARTREASONDESC = json['APPROVED_START_REASON_DESC'];
|
||||
aPPROVEDSTARTTIME = json['APPROVED_START_TIME'];
|
||||
aSSIGNMENTID = json['ASSIGNMENT_ID'];
|
||||
bREAKNAME = json['BREAK_NAME'];
|
||||
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||
nOOFROWS = json['NO_OF_ROWS'];
|
||||
pERCENTAGE = json['PERCENTAGE'];
|
||||
rOWNUM = json['ROW_NUM'];
|
||||
rTPID = json['RTP_ID'];
|
||||
rTPSCHEDULEID = json['RTP_SCHEDULE_ID'];
|
||||
sCHEDULEDATE = json['SCHEDULE_DATE'];
|
||||
sEQNO = json['SEQ_NO'];
|
||||
sHTACTUALENDDATETIME = json['SHT_ACTUAL_END_DATETIME'];
|
||||
sHTACTUALENDTIME = json['SHT_ACTUAL_END_TIME'];
|
||||
sHTACTUALHRS = json['SHT_ACTUAL_HRS'];
|
||||
sHTACTUALSTARTDATETIME = json['SHT_ACTUAL_START_DATETIME'];
|
||||
sHTACTUALSTARTTIME = json['SHT_ACTUAL_START_TIME'];
|
||||
sHTCODE = json['SHT_CODE'];
|
||||
sHTNAME = json['SHT_NAME'];
|
||||
sHTTYPE = json['SHT_TYPE'];
|
||||
sHTTYPEDESC = json['SHT_TYPE_DESC'];
|
||||
tOROWNUM = json['TO_ROW_NUM'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ACTUAL_WOB_HRS'] = this.aCTUALWOBHRS;
|
||||
data['APPROVED_END_DATETIME'] = this.aPPROVEDENDDATETIME;
|
||||
data['APPROVED_END_REASON'] = this.aPPROVEDENDREASON;
|
||||
data['APPROVED_END_REASON_DESC'] = this.aPPROVEDENDREASONDESC;
|
||||
data['APPROVED_END_TIME'] = this.aPPROVEDENDTIME;
|
||||
data['APPROVED_START_DATETIME'] = this.aPPROVEDSTARTDATETIME;
|
||||
data['APPROVED_START_REASON'] = this.aPPROVEDSTARTREASON;
|
||||
data['APPROVED_START_REASON_DESC'] = this.aPPROVEDSTARTREASONDESC;
|
||||
data['APPROVED_START_TIME'] = this.aPPROVEDSTARTTIME;
|
||||
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
|
||||
data['BREAK_NAME'] = this.bREAKNAME;
|
||||
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||
data['PERCENTAGE'] = this.pERCENTAGE;
|
||||
data['ROW_NUM'] = this.rOWNUM;
|
||||
data['RTP_ID'] = this.rTPID;
|
||||
data['RTP_SCHEDULE_ID'] = this.rTPSCHEDULEID;
|
||||
data['SCHEDULE_DATE'] = this.sCHEDULEDATE;
|
||||
data['SEQ_NO'] = this.sEQNO;
|
||||
data['SHT_ACTUAL_END_DATETIME'] = this.sHTACTUALENDDATETIME;
|
||||
data['SHT_ACTUAL_END_TIME'] = this.sHTACTUALENDTIME;
|
||||
data['SHT_ACTUAL_HRS'] = this.sHTACTUALHRS;
|
||||
data['SHT_ACTUAL_START_DATETIME'] = this.sHTACTUALSTARTDATETIME;
|
||||
data['SHT_ACTUAL_START_TIME'] = this.sHTACTUALSTARTTIME;
|
||||
data['SHT_CODE'] = this.sHTCODE;
|
||||
data['SHT_NAME'] = this.sHTNAME;
|
||||
data['SHT_TYPE'] = this.sHTTYPE;
|
||||
data['SHT_TYPE_DESC'] = this.sHTTYPEDESC;
|
||||
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,153 @@
|
||||
|
||||
|
||||
class GetTimeCardSummaryList {
|
||||
int? aBSENTDAYS;
|
||||
int? aCTUALHRS;
|
||||
int? aPPROVEDTIMEBACKHRS;
|
||||
int? aSSIGNMENTID;
|
||||
int? aTTENDEDDAYS;
|
||||
int? bUSINESSTRIP;
|
||||
int? cOMPOFFHHRS;
|
||||
int? cOMPOFFNHRS;
|
||||
int? cOMPOFFWHRS;
|
||||
int? dESIREDSCHEDULEDHRS;
|
||||
int? eARLYOUTHRS;
|
||||
int? eXCESSHRS;
|
||||
int? hALFDAYLEAVE;
|
||||
int? lATEINHRS;
|
||||
int? lEAVESHOLIDAYSHRS;
|
||||
int? nONSCHEDULEDAYS;
|
||||
int? nOTANALYZEDDAYS;
|
||||
int? oFFDAYS;
|
||||
int? oNCALLHRS;
|
||||
int? pAIDLEAVE;
|
||||
int? pERIODDAYS;
|
||||
int? pLANNEDOTHRS;
|
||||
int? pUBLICHOLIDAY;
|
||||
int? sCHEDULEDHRS;
|
||||
int? sCHEDULEDONCALLHRS;
|
||||
int? sCHEDULEDPLANNEDOTHRS;
|
||||
int? sCHEDULEDAYS;
|
||||
int? sHORTAGEHRS;
|
||||
int? sHORTAGESCHEDULEHRS;
|
||||
int? sICKLEAVE;
|
||||
int? tIMEBACKHRS;
|
||||
double? tIMEBACKBALANCE;
|
||||
int? uNAUTHORIZEDLEAVE;
|
||||
int? uNCOVERDSHORTAGEHRS;
|
||||
int? uNPAIDLEAVE;
|
||||
|
||||
GetTimeCardSummaryList(
|
||||
{this.aBSENTDAYS,
|
||||
this.aCTUALHRS,
|
||||
this.aPPROVEDTIMEBACKHRS,
|
||||
this.aSSIGNMENTID,
|
||||
this.aTTENDEDDAYS,
|
||||
this.bUSINESSTRIP,
|
||||
this.cOMPOFFHHRS,
|
||||
this.cOMPOFFNHRS,
|
||||
this.cOMPOFFWHRS,
|
||||
this.dESIREDSCHEDULEDHRS,
|
||||
this.eARLYOUTHRS,
|
||||
this.eXCESSHRS,
|
||||
this.hALFDAYLEAVE,
|
||||
this.lATEINHRS,
|
||||
this.lEAVESHOLIDAYSHRS,
|
||||
this.nONSCHEDULEDAYS,
|
||||
this.nOTANALYZEDDAYS,
|
||||
this.oFFDAYS,
|
||||
this.oNCALLHRS,
|
||||
this.pAIDLEAVE,
|
||||
this.pERIODDAYS,
|
||||
this.pLANNEDOTHRS,
|
||||
this.pUBLICHOLIDAY,
|
||||
this.sCHEDULEDHRS,
|
||||
this.sCHEDULEDONCALLHRS,
|
||||
this.sCHEDULEDPLANNEDOTHRS,
|
||||
this.sCHEDULEDAYS,
|
||||
this.sHORTAGEHRS,
|
||||
this.sHORTAGESCHEDULEHRS,
|
||||
this.sICKLEAVE,
|
||||
this.tIMEBACKHRS,
|
||||
this.tIMEBACKBALANCE,
|
||||
this.uNAUTHORIZEDLEAVE,
|
||||
this.uNCOVERDSHORTAGEHRS,
|
||||
this.uNPAIDLEAVE});
|
||||
|
||||
GetTimeCardSummaryList.fromJson(Map<String, dynamic> json) {
|
||||
aBSENTDAYS = json['ABSENT_DAYS'];
|
||||
aCTUALHRS = json['ACTUAL_HRS'];
|
||||
aPPROVEDTIMEBACKHRS = json['APPROVED_TIMEBACK_HRS'];
|
||||
aSSIGNMENTID = json['ASSIGNMENT_ID'];
|
||||
aTTENDEDDAYS = json['ATTENDED_DAYS'];
|
||||
bUSINESSTRIP = json['BUSINESS_TRIP'];
|
||||
cOMPOFFHHRS = json['COMP_OFF_H_HRS'];
|
||||
cOMPOFFNHRS = json['COMP_OFF_N_HRS'];
|
||||
cOMPOFFWHRS = json['COMP_OFF_W_HRS'];
|
||||
dESIREDSCHEDULEDHRS = json['DESIRED_SCHEDULED_HRS'];
|
||||
eARLYOUTHRS = json['EARLY_OUT_HRS'];
|
||||
eXCESSHRS = json['EXCESS_HRS'];
|
||||
hALFDAYLEAVE = json['HALF_DAY_LEAVE'];
|
||||
lATEINHRS = json['LATE_IN_HRS'];
|
||||
lEAVESHOLIDAYSHRS = json['LEAVES_HOLIDAYS_HRS'];
|
||||
nONSCHEDULEDAYS = json['NON_SCHEDULE_DAYS'];
|
||||
nOTANALYZEDDAYS = json['NOT_ANALYZED_DAYS'];
|
||||
oFFDAYS = json['OFF_DAYS'];
|
||||
oNCALLHRS = json['ON_CALL_HRS'];
|
||||
pAIDLEAVE = json['PAID_LEAVE'];
|
||||
pERIODDAYS = json['PERIOD_DAYS'];
|
||||
pLANNEDOTHRS = json['PLANNED_OTHRS'];
|
||||
pUBLICHOLIDAY = json['PUBLIC_HOLIDAY'];
|
||||
sCHEDULEDHRS = json['SCHEDULED_HRS'];
|
||||
sCHEDULEDONCALLHRS = json['SCHEDULED_ON_CALL_HRS'];
|
||||
sCHEDULEDPLANNEDOTHRS = json['SCHEDULED_PLANNED_OT_HRS'];
|
||||
sCHEDULEDAYS = json['SCHEDULE_DAYS'];
|
||||
sHORTAGEHRS = json['SHORTAGE_HRS'];
|
||||
sHORTAGESCHEDULEHRS = json['SHORTAGE_SCHEDULE_HRS'];
|
||||
sICKLEAVE = json['SICK_LEAVE'];
|
||||
tIMEBACKHRS = json['TIMEBACK_HRS'];
|
||||
tIMEBACKBALANCE = json['TIME_BACK_BALANCE'];
|
||||
uNAUTHORIZEDLEAVE = json['UNAUTHORIZED_LEAVE'];
|
||||
uNCOVERDSHORTAGEHRS = json['UNCOVERD_SHORTAGE_HRS'];
|
||||
uNPAIDLEAVE = json['UNPAID_LEAVE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['ABSENT_DAYS'] = this.aBSENTDAYS;
|
||||
data['ACTUAL_HRS'] = this.aCTUALHRS;
|
||||
data['APPROVED_TIMEBACK_HRS'] = this.aPPROVEDTIMEBACKHRS;
|
||||
data['ASSIGNMENT_ID'] = this.aSSIGNMENTID;
|
||||
data['ATTENDED_DAYS'] = this.aTTENDEDDAYS;
|
||||
data['BUSINESS_TRIP'] = this.bUSINESSTRIP;
|
||||
data['COMP_OFF_H_HRS'] = this.cOMPOFFHHRS;
|
||||
data['COMP_OFF_N_HRS'] = this.cOMPOFFNHRS;
|
||||
data['COMP_OFF_W_HRS'] = this.cOMPOFFWHRS;
|
||||
data['DESIRED_SCHEDULED_HRS'] = this.dESIREDSCHEDULEDHRS;
|
||||
data['EARLY_OUT_HRS'] = this.eARLYOUTHRS;
|
||||
data['EXCESS_HRS'] = this.eXCESSHRS;
|
||||
data['HALF_DAY_LEAVE'] = this.hALFDAYLEAVE;
|
||||
data['LATE_IN_HRS'] = this.lATEINHRS;
|
||||
data['LEAVES_HOLIDAYS_HRS'] = this.lEAVESHOLIDAYSHRS;
|
||||
data['NON_SCHEDULE_DAYS'] = this.nONSCHEDULEDAYS;
|
||||
data['NOT_ANALYZED_DAYS'] = this.nOTANALYZEDDAYS;
|
||||
data['OFF_DAYS'] = this.oFFDAYS;
|
||||
data['ON_CALL_HRS'] = this.oNCALLHRS;
|
||||
data['PAID_LEAVE'] = this.pAIDLEAVE;
|
||||
data['PERIOD_DAYS'] = this.pERIODDAYS;
|
||||
data['PLANNED_OTHRS'] = this.pLANNEDOTHRS;
|
||||
data['PUBLIC_HOLIDAY'] = this.pUBLICHOLIDAY;
|
||||
data['SCHEDULED_HRS'] = this.sCHEDULEDHRS;
|
||||
data['SCHEDULED_ON_CALL_HRS'] = this.sCHEDULEDONCALLHRS;
|
||||
data['SCHEDULED_PLANNED_OT_HRS'] = this.sCHEDULEDPLANNEDOTHRS;
|
||||
data['SCHEDULE_DAYS'] = this.sCHEDULEDAYS;
|
||||
data['SHORTAGE_HRS'] = this.sHORTAGEHRS;
|
||||
data['SHORTAGE_SCHEDULE_HRS'] = this.sHORTAGESCHEDULEHRS;
|
||||
data['SICK_LEAVE'] = this.sICKLEAVE;
|
||||
data['TIMEBACK_HRS'] = this.tIMEBACKHRS;
|
||||
data['TIME_BACK_BALANCE'] = this.tIMEBACKBALANCE;
|
||||
data['UNAUTHORIZED_LEAVE'] = this.uNAUTHORIZEDLEAVE;
|
||||
data['UNCOVERD_SHORTAGE_HRS'] = this.uNCOVERDSHORTAGEHRS;
|
||||
data['UNPAID_LEAVE'] = this.uNPAIDLEAVE;
|
||||
return data;
|
||||
}}
|
||||
@ -0,0 +1,85 @@
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
||||
|
||||
class GetBasicDetColsStructureList {
|
||||
String? aPPLICATIONCOLUMNNAME;
|
||||
String? dATATYPE;
|
||||
String? dISPLAYFLAG;
|
||||
int? mAXIMUMSIZE;
|
||||
String? oBJECTNAME;
|
||||
String? oBJECTTYPE;
|
||||
List<ObjectValuesList>? objectValuesList;
|
||||
String? rEQUIREDFLAG;
|
||||
String? sEGMENTPROMPT;
|
||||
int? sEGMENTSEQNUM;
|
||||
GetEmployeeBasicDetailsList? userBasicDetail;
|
||||
GetBasicDetColsStructureList({
|
||||
this.aPPLICATIONCOLUMNNAME,
|
||||
this.dATATYPE,
|
||||
this.dISPLAYFLAG,
|
||||
this.mAXIMUMSIZE,
|
||||
this.oBJECTNAME,
|
||||
this.oBJECTTYPE,
|
||||
this.objectValuesList,
|
||||
this.rEQUIREDFLAG,
|
||||
this.sEGMENTPROMPT,
|
||||
this.sEGMENTSEQNUM,
|
||||
this.userBasicDetail,
|
||||
});
|
||||
|
||||
GetBasicDetColsStructureList.fromJson(Map<String, dynamic> json) {
|
||||
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
|
||||
dATATYPE = json['DATATYPE'];
|
||||
dISPLAYFLAG = json['DISPLAY_FLAG'];
|
||||
mAXIMUMSIZE = json['MAXIMUM_SIZE'];
|
||||
oBJECTNAME = json['OBJECT_NAME'];
|
||||
oBJECTTYPE = json['OBJECT_TYPE'];
|
||||
if (json['ObjectValuesList'] != null) {
|
||||
objectValuesList = <ObjectValuesList>[];
|
||||
json['ObjectValuesList'].forEach((v) {
|
||||
objectValuesList!.add(new ObjectValuesList.fromJson(v));
|
||||
});
|
||||
}
|
||||
rEQUIREDFLAG = json['REQUIRED_FLAG'];
|
||||
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
|
||||
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
|
||||
data['DATATYPE'] = this.dATATYPE;
|
||||
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
|
||||
data['MAXIMUM_SIZE'] = this.mAXIMUMSIZE;
|
||||
data['OBJECT_NAME'] = this.oBJECTNAME;
|
||||
data['OBJECT_TYPE'] = this.oBJECTTYPE;
|
||||
if (this.objectValuesList != null) {
|
||||
data['ObjectValuesList'] = this.objectValuesList!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['REQUIRED_FLAG'] = this.rEQUIREDFLAG;
|
||||
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
|
||||
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class ObjectValuesList {
|
||||
String? cODE;
|
||||
String? dESCRIPTION;
|
||||
String? mEANING;
|
||||
|
||||
ObjectValuesList({this.cODE, this.dESCRIPTION, this.mEANING});
|
||||
|
||||
ObjectValuesList.fromJson(Map<String, dynamic> json) {
|
||||
cODE = json['CODE'];
|
||||
dESCRIPTION = json['DESCRIPTION'];
|
||||
mEANING = json['MEANING'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['CODE'] = this.cODE;
|
||||
data['DESCRIPTION'] = this.dESCRIPTION;
|
||||
data['MEANING'] = this.mEANING;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,188 @@
|
||||
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
||||
|
||||
class GetBasicDetDffStructureList {
|
||||
String? aLPHANUMERICALLOWEDFLAG;
|
||||
String? aPPLICATIONCOLUMNNAME;
|
||||
String? cHILDSEGMENTSVS;
|
||||
Null? cHILDSEGMENTSVSSplited;
|
||||
String? dEFAULTTYPE;
|
||||
String? dEFAULTVALUE;
|
||||
String? dESCFLEXCONTEXTCODE;
|
||||
String? dESCFLEXCONTEXTNAME;
|
||||
String? dESCFLEXNAME;
|
||||
String? dISPLAYFLAG;
|
||||
String? eNABLEDFLAG;
|
||||
ESERVICESDV? eSERVICESDV;
|
||||
List<ESERVICESVS>? eSERVICESVS;
|
||||
String? fLEXVALUESETNAME;
|
||||
String? fORMATTYPE;
|
||||
String? fORMATTYPEDSP;
|
||||
bool? isEmptyOption;
|
||||
String? lONGLISTFLAG;
|
||||
int? mAXIMUMSIZE;
|
||||
String? mAXIMUMVALUE;
|
||||
String? mINIMUMVALUE;
|
||||
String? mOBILEENABLED;
|
||||
String? nUMBERPRECISION;
|
||||
String? nUMERICMODEENABLEDFLAG;
|
||||
String? pARENTSEGMENTSDV;
|
||||
List<Null>? pARENTSEGMENTSDVSplited;
|
||||
String? pARENTSEGMENTSVS;
|
||||
List<Null>? pARENTSEGMENTSVSSplitedVS;
|
||||
String? rEADONLY;
|
||||
String? rEQUIREDFLAG;
|
||||
String? sEGMENTNAME;
|
||||
String? sEGMENTPROMPT;
|
||||
int? sEGMENTSEQNUM;
|
||||
String? uPPERCASEONLYFLAG;
|
||||
String? uSEDFLAG;
|
||||
String? vALIDATIONTYPE;
|
||||
String? vALIDATIONTYPEDSP;
|
||||
GetEmployeeBasicDetailsList? userBasicDetail;
|
||||
|
||||
GetBasicDetDffStructureList(
|
||||
{this.aLPHANUMERICALLOWEDFLAG,
|
||||
this.aPPLICATIONCOLUMNNAME,
|
||||
this.cHILDSEGMENTSVS,
|
||||
this.cHILDSEGMENTSVSSplited,
|
||||
this.dEFAULTTYPE,
|
||||
this.dEFAULTVALUE,
|
||||
this.dESCFLEXCONTEXTCODE,
|
||||
this.dESCFLEXCONTEXTNAME,
|
||||
this.dESCFLEXNAME,
|
||||
this.dISPLAYFLAG,
|
||||
this.eNABLEDFLAG,
|
||||
this.eSERVICESDV,
|
||||
this.eSERVICESVS,
|
||||
this.fLEXVALUESETNAME,
|
||||
this.fORMATTYPE,
|
||||
this.fORMATTYPEDSP,
|
||||
this.isEmptyOption,
|
||||
this.lONGLISTFLAG,
|
||||
this.mAXIMUMSIZE,
|
||||
this.mAXIMUMVALUE,
|
||||
this.mINIMUMVALUE,
|
||||
this.mOBILEENABLED,
|
||||
this.nUMBERPRECISION,
|
||||
this.nUMERICMODEENABLEDFLAG,
|
||||
this.pARENTSEGMENTSDV,
|
||||
this.pARENTSEGMENTSDVSplited,
|
||||
this.pARENTSEGMENTSVS,
|
||||
this.pARENTSEGMENTSVSSplitedVS,
|
||||
this.rEADONLY,
|
||||
this.rEQUIREDFLAG,
|
||||
this.sEGMENTNAME,
|
||||
this.sEGMENTPROMPT,
|
||||
this.sEGMENTSEQNUM,
|
||||
this.uPPERCASEONLYFLAG,
|
||||
this.uSEDFLAG,
|
||||
this.vALIDATIONTYPE,
|
||||
this.vALIDATIONTYPEDSP,
|
||||
this.userBasicDetail});
|
||||
|
||||
GetBasicDetDffStructureList.fromJson(Map<String, dynamic> json) {
|
||||
aLPHANUMERICALLOWEDFLAG = json['ALPHANUMERIC_ALLOWED_FLAG'];
|
||||
aPPLICATIONCOLUMNNAME = json['APPLICATION_COLUMN_NAME'];
|
||||
cHILDSEGMENTSVS = json['CHILD_SEGMENTS_VS'];
|
||||
cHILDSEGMENTSVSSplited = json['CHILD_SEGMENTS_VS_Splited'];
|
||||
dEFAULTTYPE = json['DEFAULT_TYPE'];
|
||||
dEFAULTVALUE = json['DEFAULT_VALUE'];
|
||||
dESCFLEXCONTEXTCODE = json['DESC_FLEX_CONTEXT_CODE'];
|
||||
dESCFLEXCONTEXTNAME = json['DESC_FLEX_CONTEXT_NAME'];
|
||||
dESCFLEXNAME = json['DESC_FLEX_NAME'];
|
||||
dISPLAYFLAG = json['DISPLAY_FLAG'];
|
||||
eNABLEDFLAG = json['ENABLED_FLAG'];
|
||||
eSERVICESDV = json['E_SERVICES_DV'] != null ? ESERVICESDV.fromJson(json['E_SERVICES_DV']) : null;
|
||||
if (json['E_SERVICES_VS'] != null) {
|
||||
eSERVICESVS = <ESERVICESVS>[];
|
||||
json['E_SERVICES_VS'].forEach((v) {
|
||||
eSERVICESVS!.add(ESERVICESVS.fromJson(v));
|
||||
});
|
||||
}
|
||||
fLEXVALUESETNAME = json['FLEX_VALUE_SET_NAME'];
|
||||
fORMATTYPE = json['FORMAT_TYPE'];
|
||||
fORMATTYPEDSP = json['FORMAT_TYPE_DSP'];
|
||||
isEmptyOption = json['IsEmptyOption'];
|
||||
lONGLISTFLAG = json['LONGLIST_FLAG'];
|
||||
mAXIMUMSIZE = json['MAXIMUM_SIZE'];
|
||||
mAXIMUMVALUE = json['MAXIMUM_VALUE'];
|
||||
mINIMUMVALUE = json['MINIMUM_VALUE'];
|
||||
mOBILEENABLED = json['MOBILE_ENABLED'];
|
||||
nUMBERPRECISION = json['NUMBER_PRECISION'];
|
||||
nUMERICMODEENABLEDFLAG = json['NUMERIC_MODE_ENABLED_FLAG'];
|
||||
pARENTSEGMENTSDV = json['PARENT_SEGMENTS_DV'];
|
||||
if (json['PARENT_SEGMENTS_DV_Splited'] != null) {
|
||||
pARENTSEGMENTSDVSplited = <Null>[];
|
||||
json['PARENT_SEGMENTS_DV_Splited'].forEach((v) {
|
||||
pARENTSEGMENTSDVSplited!.add((v));
|
||||
});
|
||||
}
|
||||
pARENTSEGMENTSVS = json['PARENT_SEGMENTS_VS'];
|
||||
if (json['PARENT_SEGMENTS_VS_SplitedVS'] != null) {
|
||||
pARENTSEGMENTSVSSplitedVS = <Null>[];
|
||||
json['PARENT_SEGMENTS_VS_SplitedVS'].forEach((v) {
|
||||
pARENTSEGMENTSVSSplitedVS!.add(v);
|
||||
});
|
||||
}
|
||||
rEADONLY = json['READ_ONLY'];
|
||||
rEQUIREDFLAG = json['REQUIRED_FLAG'];
|
||||
sEGMENTNAME = json['SEGMENT_NAME'];
|
||||
sEGMENTPROMPT = json['SEGMENT_PROMPT'];
|
||||
sEGMENTSEQNUM = json['SEGMENT_SEQ_NUM'];
|
||||
uPPERCASEONLYFLAG = json['UPPERCASE_ONLY_FLAG'];
|
||||
uSEDFLAG = json['USED_FLAG'];
|
||||
vALIDATIONTYPE = json['VALIDATION_TYPE'];
|
||||
vALIDATIONTYPEDSP = json['VALIDATION_TYPE_DSP'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = Map<String, dynamic>();
|
||||
data['ALPHANUMERIC_ALLOWED_FLAG'] = this.aLPHANUMERICALLOWEDFLAG;
|
||||
data['APPLICATION_COLUMN_NAME'] = this.aPPLICATIONCOLUMNNAME;
|
||||
data['CHILD_SEGMENTS_VS'] = this.cHILDSEGMENTSVS;
|
||||
data['CHILD_SEGMENTS_VS_Splited'] = this.cHILDSEGMENTSVSSplited;
|
||||
data['DEFAULT_TYPE'] = this.dEFAULTTYPE;
|
||||
data['DEFAULT_VALUE'] = this.dEFAULTVALUE;
|
||||
data['DESC_FLEX_CONTEXT_CODE'] = this.dESCFLEXCONTEXTCODE;
|
||||
data['DESC_FLEX_CONTEXT_NAME'] = this.dESCFLEXCONTEXTNAME;
|
||||
data['DESC_FLEX_NAME'] = this.dESCFLEXNAME;
|
||||
data['DISPLAY_FLAG'] = this.dISPLAYFLAG;
|
||||
data['ENABLED_FLAG'] = this.eNABLEDFLAG;
|
||||
if (this.eSERVICESDV != null) {
|
||||
data['E_SERVICES_DV'] = this.eSERVICESDV!.toJson();
|
||||
}
|
||||
if (this.eSERVICESVS != null) {
|
||||
data['E_SERVICES_VS'] = this.eSERVICESVS!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['FLEX_VALUE_SET_NAME'] = this.fLEXVALUESETNAME;
|
||||
data['FORMAT_TYPE'] = this.fORMATTYPE;
|
||||
data['FORMAT_TYPE_DSP'] = this.fORMATTYPEDSP;
|
||||
data['IsEmptyOption'] = this.isEmptyOption;
|
||||
data['LONGLIST_FLAG'] = this.lONGLISTFLAG;
|
||||
data['MAXIMUM_SIZE'] = this.mAXIMUMSIZE;
|
||||
data['MAXIMUM_VALUE'] = this.mAXIMUMVALUE;
|
||||
data['MINIMUM_VALUE'] = this.mINIMUMVALUE;
|
||||
data['MOBILE_ENABLED'] = this.mOBILEENABLED;
|
||||
data['NUMBER_PRECISION'] = this.nUMBERPRECISION;
|
||||
data['NUMERIC_MODE_ENABLED_FLAG'] = this.nUMERICMODEENABLEDFLAG;
|
||||
data['PARENT_SEGMENTS_DV'] = this.pARENTSEGMENTSDV;
|
||||
if (this.pARENTSEGMENTSDVSplited != null) {
|
||||
data['PARENT_SEGMENTS_DV_Splited'] = this.pARENTSEGMENTSDVSplited!.map((v) => v).toList();
|
||||
}
|
||||
data['PARENT_SEGMENTS_VS'] = this.pARENTSEGMENTSVS;
|
||||
if (this.pARENTSEGMENTSVSSplitedVS != null) {
|
||||
data['PARENT_SEGMENTS_VS_SplitedVS'] = this.pARENTSEGMENTSVSSplitedVS!.map((v) => v).toList();
|
||||
}
|
||||
data['READ_ONLY'] = this.rEADONLY;
|
||||
data['REQUIRED_FLAG'] = this.rEQUIREDFLAG;
|
||||
data['SEGMENT_NAME'] = this.sEGMENTNAME;
|
||||
data['SEGMENT_PROMPT'] = this.sEGMENTPROMPT;
|
||||
data['SEGMENT_SEQ_NUM'] = this.sEGMENTSEQNUM;
|
||||
data['UPPERCASE_ONLY_FLAG'] = this.uPPERCASEONLYFLAG;
|
||||
data['USED_FLAG'] = this.uSEDFLAG;
|
||||
data['VALIDATION_TYPE'] = this.vALIDATIONTYPE;
|
||||
data['VALIDATION_TYPE_DSP'] = this.vALIDATIONTYPEDSP;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
class GetPhoneNumberTypesModel {
|
||||
String? cODE;
|
||||
String? dESCRIPTION;
|
||||
String? mEANING;
|
||||
|
||||
GetPhoneNumberTypesModel({this.cODE, this.dESCRIPTION, this.mEANING});
|
||||
|
||||
GetPhoneNumberTypesModel.fromJson(Map<String, dynamic> json) {
|
||||
cODE = json['CODE'];
|
||||
dESCRIPTION = json['DESCRIPTION'];
|
||||
mEANING = json['MEANING'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['CODE'] = this.cODE;
|
||||
data['DESCRIPTION'] = this.dESCRIPTION;
|
||||
data['MEANING'] = this.mEANING;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ProfileMenu {
|
||||
final String name;
|
||||
final String icon;
|
||||
final String route;
|
||||
final String dynamicUrl;
|
||||
final String functionName;
|
||||
final String requestID;
|
||||
ProfileMenu({this.name = '', this.icon = '', this.route = '', this.dynamicUrl = '', this.functionName = '', this.requestID = ''});
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/dashboard_api_client.dart';
|
||||
import 'package:mohem_flutter_app/api/eit_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/main.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/get_attendance_tracking_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/itg_forms_model.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menus.dart';
|
||||
import 'package:mohem_flutter_app/models/eit/get_eit_transaction_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/widgets/Updater.dart';
|
||||
|
||||
/// Mix-in [DiagnosticableTreeMixin] to have access to [debugFillProperties] for the devtool
|
||||
// ignore: prefer_mixin
|
||||
class EITProviderModel with ChangeNotifier, DiagnosticableTreeMixin {
|
||||
List<CollectionTransaction>? eitTransactionList;
|
||||
late bool isEitLoaded = false;
|
||||
void getEITList(String functionName) async {
|
||||
try {
|
||||
eitTransactionList = await EITApiClient().getEITTransactions(functionName);
|
||||
isEitLoaded = true;
|
||||
|
||||
notifyListeners();
|
||||
} catch (ex) {
|
||||
isEitLoaded = false;
|
||||
logger.wtf(ex);
|
||||
notifyListeners();
|
||||
Utils.handleException(ex, null, (ts) {
|
||||
print(ts);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,804 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:easy_localization/src/public_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/painting.dart';
|
||||
import 'package:mohem_flutter_app/api/monthlyAttendance_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.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/models/get_day_hours_type_details_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_schedule_shifts_details_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_time_card_summary_list_model.dart';
|
||||
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:syncfusion_flutter_calendar/calendar.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:pie_chart/pie_chart.dart';
|
||||
|
||||
class MonthlyAttendance extends StatefulWidget {
|
||||
MonthlyAttendance({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_MonthlyAttendanceState createState() {
|
||||
return _MonthlyAttendanceState();
|
||||
}
|
||||
}
|
||||
|
||||
class _MonthlyAttendanceState extends State<MonthlyAttendance> {
|
||||
bool isPresent = true;
|
||||
bool isAbsent = true;
|
||||
bool isMissingDays = true;
|
||||
bool isOffDays = true;
|
||||
DateTime date = DateTime.now();
|
||||
late var formattedDate;
|
||||
var currentMonth = DateTime.now().month;
|
||||
String searchMonth = getMonth(DateTime.now().month);
|
||||
int searchYear = DateTime.now().year;
|
||||
int? pRTPID;
|
||||
|
||||
List<GetDayHoursTypeDetailsList> getDayHoursTypeDetailsList = [];
|
||||
GetTimeCardSummaryList? getTimeCardSummaryList;
|
||||
|
||||
// GetDayHoursTypeDetailsList? getDayHoursTypeDetailsList;
|
||||
GetScheduleShiftsDetailsList? getScheduleShiftsDetailsList;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getTimeCardSummary(searchMonth, searchYear);
|
||||
getDayHoursTypeDetails(date.day, searchMonth, searchYear);
|
||||
formattedDate = DateFormat('MMM-yyyy').format(date);
|
||||
}
|
||||
|
||||
void getTimeCardSummary(searchMonth, searchYear) async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getTimeCardSummaryList = await MonthlyAttendanceApiClient().getTimeCardSummary(searchMonth, searchYear);
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
void getDayHoursTypeDetails(index, searchMonth, searchYear) async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getDayHoursTypeDetailsList = await MonthlyAttendanceApiClient().getDayHoursTypeDetails(searchMonth, searchYear);
|
||||
Utils.hideLoading(context);
|
||||
pRTPID = getDayHoursTypeDetailsList[index].rTPID;
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
countAllAttendDays();
|
||||
getScheduleShiftsDetails(pRTPID);
|
||||
}
|
||||
|
||||
getScheduleShiftsDetails(pRTPID) async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getScheduleShiftsDetailsList = await MonthlyAttendanceApiClient().getScheduleShiftsDetails(pRTPID);
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
countAllAttendDays() {
|
||||
// print(getDayHoursTypeDetailsList.length);
|
||||
for (int i = 0; i < getDayHoursTypeDetailsList.length; i++) {
|
||||
if (getDayHoursTypeDetailsList[i].aTTENDEDFLAG == 'Y') {
|
||||
isPresent = true;
|
||||
isAbsent = false;
|
||||
isMissingDays = false;
|
||||
isOffDays = false;
|
||||
} else if (getDayHoursTypeDetailsList[i].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[i].aBSENTFLAG == 'Y') {
|
||||
isPresent = false;
|
||||
isAbsent = true;
|
||||
isMissingDays = false;
|
||||
isOffDays = false;
|
||||
} else if (getDayHoursTypeDetailsList[i].aTTENDEDFLAG == 'N' && getDayHoursTypeDetailsList[i].dAYTYPE == 'OFF') {
|
||||
isPresent = false;
|
||||
isAbsent = false;
|
||||
isMissingDays = false;
|
||||
isOffDays = true;
|
||||
} else {
|
||||
isPresent = false;
|
||||
isAbsent = false;
|
||||
isMissingDays = true;
|
||||
isOffDays = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final CalendarController _calendarController = CalendarController();
|
||||
|
||||
final List<Color> _colorList = [Color(0xff2AB2AB), Color(0xff202529)];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Map<String, double> dataMap = {
|
||||
"Present": getTimeCardSummaryList!.aTTENDEDDAYS!.toDouble(),
|
||||
"Absent": getTimeCardSummaryList!.aBSENTDAYS!.toDouble(),
|
||||
};
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: MyColors.white,
|
||||
leading: IconButton(
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
body: ListView(
|
||||
scrollDirection: Axis.vertical,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
20.height,
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Attendance".toText24(isBold: true, color: MyColors.darkIconColor),
|
||||
Row(
|
||||
children: [
|
||||
Text(formattedDate),
|
||||
const Icon(Icons.keyboard_arrow_down_rounded, color: MyColors.greyACColor),
|
||||
],
|
||||
).onPress(() async {
|
||||
await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(2021),
|
||||
lastDate: DateTime.now(),
|
||||
builder: (context, child) {
|
||||
return Theme(
|
||||
data: ThemeData.dark().copyWith(
|
||||
colorScheme: const ColorScheme.dark(
|
||||
primary: MyColors.lightGreenColor,
|
||||
onPrimary: MyColors.white,
|
||||
surface: MyColors.lightGreenColor,
|
||||
onSurface: MyColors.darkTextColor,
|
||||
),
|
||||
dialogBackgroundColor: Colors.white,
|
||||
),
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
).then((selectedDate) {
|
||||
if (selectedDate != null) {
|
||||
var selectedMonth = DateFormat('MMMM').format(selectedDate);
|
||||
var selectedYear = DateFormat('yyyy').format(selectedDate);
|
||||
searchMonth = selectedMonth;
|
||||
searchYear = int.parse(selectedYear);
|
||||
setState(() {
|
||||
// date = selectedDate;
|
||||
formattedDate = DateFormat('MMMM-yyyy').format(selectedDate);
|
||||
getTimeCardSummary(searchMonth, searchYear);
|
||||
getDayHoursTypeDetails(selectedDate.day, searchMonth, searchYear);
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
],
|
||||
).paddingOnly(left: 21, right: 21),
|
||||
18.height,
|
||||
AspectRatio(aspectRatio: 333 / 270, child: calendarWidget()).paddingOnly(left: 21, right: 21),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
optionUI("Schedule\nDays", "${getTimeCardSummaryList!.sCHEDULEDAYS}"),
|
||||
6.width,
|
||||
optionUI("Off\nDays", "${getTimeCardSummaryList!.oFFDAYS}"),
|
||||
6.width,
|
||||
optionUI("Non\nAnalyzed", "${getTimeCardSummaryList!.uNAUTHORIZEDLEAVE}"),
|
||||
6.width,
|
||||
optionUI("Shortage\nHour", "${getTimeCardSummaryList!.sHORTAGEHRS}"),
|
||||
],
|
||||
).paddingOnly(left: 21, right: 21),
|
||||
35.height,
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 227,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, 2),
|
||||
blurRadius: 26,
|
||||
color: MyColors.darkColor.withOpacity(0.1),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Column(
|
||||
children: [
|
||||
"Attendance".toText12(isBold: true, color: MyColors.grey3AColor),
|
||||
"Stats".toText24(isBold: true, color: MyColors.grey3AColor),
|
||||
],
|
||||
).paddingOnly(left: 21, top: 29, bottom: 36),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 9,
|
||||
width: 9,
|
||||
decoration: BoxDecoration(
|
||||
color: MyColors.lightGreenColor,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(left: 5, right: 5),
|
||||
child: "PRESENT ${getTimeCardSummaryList!.aTTENDEDDAYS}".toText16(isBold: true, color: MyColors.lightGreenColor),
|
||||
),
|
||||
],
|
||||
).paddingOnly(left: 21, right: 23),
|
||||
8.height,
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
height: 9,
|
||||
width: 9,
|
||||
decoration: BoxDecoration(
|
||||
color: MyColors.backgroundBlackColor,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: const EdgeInsets.only(left: 5, right: 5),
|
||||
child: "ABSENT ${getTimeCardSummaryList!.aBSENTDAYS}".toText16(
|
||||
isBold: true,
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
)
|
||||
],
|
||||
).paddingOnly(left: 21, top: 8),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: 169,
|
||||
height: 170,
|
||||
child: PieChart(
|
||||
dataMap: dataMap,
|
||||
animationDuration: const Duration(milliseconds: 800),
|
||||
chartLegendSpacing: 0,
|
||||
chartRadius: MediaQuery.of(context).size.width / 5.2,
|
||||
colorList: _colorList,
|
||||
initialAngleInDegree: 0,
|
||||
chartType: ChartType.ring,
|
||||
ringStrokeWidth: 80,
|
||||
legendOptions: const LegendOptions(
|
||||
showLegendsInRow: false,
|
||||
showLegends: false,
|
||||
),
|
||||
chartValuesOptions: const ChartValuesOptions(
|
||||
showChartValueBackground: false,
|
||||
showChartValues: true,
|
||||
showChartValuesInPercentage: true,
|
||||
showChartValuesOutside: false,
|
||||
decimalPlaces: 1,
|
||||
chartValueStyle: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
color: MyColors.white,
|
||||
)),
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingOnly(left: 65, top: 27, right: 21, bottom: 28),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget optionUI(String title, String value) {
|
||||
return AspectRatio(
|
||||
aspectRatio: 1 / 1,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(top: 10, left: 8, right: 8, bottom: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, 1),
|
||||
blurRadius: 15,
|
||||
color: MyColors.darkColor.withOpacity(0.1),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[title.toText10(color: MyColors.darkTextColor).expanded, value.toText20(color: MyColors.darkTextColor)],
|
||||
),
|
||||
),
|
||||
).expanded;
|
||||
}
|
||||
|
||||
Widget calendarWidget() {
|
||||
return SfCalendar(
|
||||
view: CalendarView.month,
|
||||
// onViewChanged: viewChanged,
|
||||
controller: _calendarController,
|
||||
headerHeight: 0,
|
||||
todayHighlightColor: MyColors.grey3AColor,
|
||||
viewHeaderStyle: const ViewHeaderStyle(
|
||||
dayTextStyle: TextStyle(color: MyColors.grey3AColor, fontSize: 13, fontWeight: FontWeight.w600),
|
||||
),
|
||||
monthCellBuilder: (cxt, build) {
|
||||
int val = build.date.day;
|
||||
val == countAllAttendDays();
|
||||
if (isPresent) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
transform: GradientRotation(.46),
|
||||
begin: Alignment.topRight,
|
||||
end: Alignment.bottomLeft,
|
||||
colors: [MyColors.gradiantEndColor, MyColors.gradiantStartColor],
|
||||
),
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, 2),
|
||||
blurRadius: 26,
|
||||
color: MyColors.blackColor.withOpacity(0.100),
|
||||
),
|
||||
],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"${build.date.day}",
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: MyColors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (isAbsent) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: MyColors.backgroundBlackColor,
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, 2),
|
||||
blurRadius: 26,
|
||||
color: MyColors.blackColor.withOpacity(0.100),
|
||||
),
|
||||
],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"${build.date.day}",
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: MyColors.white,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (isMissingDays) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: MyColors.backgroundBlackColor, width: 2.0, style: BorderStyle.solid), //Border.all
|
||||
shape: BoxShape.circle,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
offset: const Offset(0, 2),
|
||||
blurRadius: 26,
|
||||
color: MyColors.blackColor.withOpacity(0.100),
|
||||
),
|
||||
],
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"${build.date.day}",
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Color(0xff1F2428),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else if (isOffDays) {
|
||||
return Container(
|
||||
margin: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
color: MyColors.greyACColor.withOpacity(.12),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
"${build.date.day}",
|
||||
style: const TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: MyColors.greyA5Color,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
monthViewSettings: const MonthViewSettings(
|
||||
dayFormat: 'EEE',
|
||||
showTrailingAndLeadingDates: false,
|
||||
appointmentDisplayMode: MonthAppointmentDisplayMode.appointment,
|
||||
showAgenda: false,
|
||||
navigationDirection: MonthNavigationDirection.horizontal,
|
||||
monthCellStyle: MonthCellStyle(
|
||||
textStyle: TextStyle(
|
||||
fontStyle: FontStyle.normal,
|
||||
fontSize: 13,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
showNavigationArrow: false,
|
||||
showDatePickerButton: false,
|
||||
showCurrentTimeIndicator: false,
|
||||
showWeekNumber: false,
|
||||
cellBorderColor: Colors.white,
|
||||
selectionDecoration: BoxDecoration(
|
||||
border: Border.all(color: MyColors.white, width: 10),
|
||||
borderRadius: const BorderRadius.all(Radius.circular(100)),
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
dataSource: MeetingDataSource(_getDataSource()),
|
||||
onTap: calendarTapped,
|
||||
);
|
||||
}
|
||||
|
||||
calendarTapped(CalendarTapDetails details) {
|
||||
dynamic string = getScheduleShiftsDetailsList!.pERCENTAGE;
|
||||
dynamic percentage = string!.indexOf('%');
|
||||
print(percentage);
|
||||
print(details.date?.day.toString());
|
||||
int? index = details.date?.day;
|
||||
if (index != null) {
|
||||
index = index - 1;
|
||||
}
|
||||
getDayHoursTypeDetails(index, getMonth(details.date!.month), details.date?.year);
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(25)),
|
||||
isScrollControlled: true,
|
||||
backgroundColor: MyColors.backgroundBlackColor,
|
||||
builder: (_) {
|
||||
return DraggableScrollableSheet(
|
||||
maxChildSize: 0.9,
|
||||
expand: false,
|
||||
builder: (_, controller) {
|
||||
return Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 75,
|
||||
height: 7,
|
||||
margin: const EdgeInsets.symmetric(vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
color: MyColors.darkGreyColor,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: ListView.builder(
|
||||
controller: controller,
|
||||
itemCount: 1,
|
||||
itemBuilder: (_, i) => Container(
|
||||
decoration: const BoxDecoration(
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.circular(35.0),
|
||||
),
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Column(children: [
|
||||
"${getScheduleShiftsDetailsList!.sCHEDULEDATE!.substring(0, 9)}".toText24(isBold: true, color: Colors.white),
|
||||
"Attendance Details".tr().toText16(color: MyColors.lightGreyEFColor),
|
||||
21.height,
|
||||
]).paddingOnly(top: 25, left: 21, right: 21, bottom: 10),
|
||||
Center(
|
||||
child: CircularStepProgressBar(
|
||||
totalSteps: 16 * 4,
|
||||
currentStep: percentage,
|
||||
width: 210,
|
||||
height: 210,
|
||||
selectedColor: MyColors.gradiantEndColor,
|
||||
unselectedColor: MyColors.grey70Color,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
"${getScheduleShiftsDetailsList!.pERCENTAGE}".toText44(color: Colors.white, isBold: true),
|
||||
"Completed".tr().toText11(color: MyColors.greyACColor),
|
||||
19.height,
|
||||
"Shift Time".tr().toText11(color: MyColors.greyACColor),
|
||||
"${getScheduleShiftsDetailsList!.sHTNAME}".toText22(color: Colors.white, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20, bottom: 20),
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 5,
|
||||
padding: const EdgeInsets.only(top: 24, bottom: 24),
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
|
||||
padding: const EdgeInsets.only(left: 21, right: 21, top: 28, bottom: 24),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(right: 30, left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Actual Check In ".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getScheduleShiftsDetailsList!.sHTACTUALSTARTTIME}".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
40.width,
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Actual Check Out".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getScheduleShiftsDetailsList!.sHTACTUALENDTIME}".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
25.height,
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: MyColors.whiteColor,
|
||||
),
|
||||
25.height,
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(right: 30, left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Approved Check In".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getScheduleShiftsDetailsList!.aPPROVEDSTARTTIME}".toText22(color: MyColors.greenColor, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
30.width,
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Approved Check Out".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getScheduleShiftsDetailsList!.aPPROVEDENDTIME}".toText22(color: MyColors.greenColor, isBold: true),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
25.height,
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: MyColors.whiteColor,
|
||||
),
|
||||
25.height,
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(right: 30, left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Late In".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getDayHoursTypeDetailsList[i].lATEINHRS}".toText22(color: MyColors.redColor, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
80.width,
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Excess".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getDayHoursTypeDetailsList[i].eXCESSHRS}".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
25.height,
|
||||
const Divider(
|
||||
height: 1,
|
||||
thickness: 1,
|
||||
color: MyColors.whiteColor,
|
||||
),
|
||||
25.height,
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(right: 30, left: 15),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Shortage".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getDayHoursTypeDetailsList[i].sHORTAGEHRS}".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
80.width,
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"Early Out".tr().toText11(
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
8.height,
|
||||
"${getDayHoursTypeDetailsList[i].eARLYOUTHRS}".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
List<Meeting> _getDataSource() {
|
||||
final List<Meeting> meetings = <Meeting>[];
|
||||
return meetings;
|
||||
}
|
||||
|
||||
static getMonth(int month) {
|
||||
switch (month) {
|
||||
case 1:
|
||||
return "January";
|
||||
case 2:
|
||||
return "February";
|
||||
case 3:
|
||||
return "March";
|
||||
case 4:
|
||||
return "April";
|
||||
case 5:
|
||||
return "May";
|
||||
case 6:
|
||||
return "June";
|
||||
case 7:
|
||||
return "July";
|
||||
case 8:
|
||||
return "August";
|
||||
case 9:
|
||||
return "September";
|
||||
case 10:
|
||||
return "October";
|
||||
case 11:
|
||||
return "November";
|
||||
case 12:
|
||||
return "December";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MeetingDataSource extends CalendarDataSource {
|
||||
MeetingDataSource(List<Meeting> source) {
|
||||
appointments = source;
|
||||
}
|
||||
|
||||
@override
|
||||
DateTime getStartTime(int index) {
|
||||
return _getMeetingData(index).from;
|
||||
}
|
||||
|
||||
@override
|
||||
DateTime getEndTime(int index) {
|
||||
return _getMeetingData(index).to;
|
||||
}
|
||||
|
||||
@override
|
||||
String getSubject(int index) {
|
||||
return _getMeetingData(index).eventName;
|
||||
}
|
||||
|
||||
@override
|
||||
Color getColor(int index) {
|
||||
return _getMeetingData(index).background;
|
||||
}
|
||||
|
||||
@override
|
||||
bool isAllDay(int index) {
|
||||
return _getMeetingData(index).isAllDay;
|
||||
}
|
||||
|
||||
Meeting _getMeetingData(int index) {
|
||||
final dynamic meeting = appointments;
|
||||
Meeting meetingData;
|
||||
if (meeting is Meeting) {
|
||||
meetingData = meeting;
|
||||
}
|
||||
return meeting;
|
||||
}
|
||||
}
|
||||
|
||||
class Meeting {
|
||||
Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
|
||||
|
||||
String eventName;
|
||||
DateTime from;
|
||||
DateTime to;
|
||||
Color background;
|
||||
bool isAllDay;
|
||||
}
|
||||
@ -0,0 +1,228 @@
|
||||
import 'package:easy_localization/src/public_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.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/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/widgets/circular_step_progress_bar.dart';
|
||||
|
||||
class AttendenceDetailsBottomSheet extends StatefulWidget {
|
||||
|
||||
AttendenceDetailsBottomSheet({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_AttendenceDetailsBottomSheetState createState() => _AttendenceDetailsBottomSheetState();
|
||||
}
|
||||
|
||||
class _AttendenceDetailsBottomSheetState extends State<AttendenceDetailsBottomSheet> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
bottomSheet:BottomSheet(
|
||||
|
||||
onClosing: () => print("not getting called"),
|
||||
builder: (_) => Container(
|
||||
color: Colors.red,
|
||||
height: MediaQuery.of(context).size.height*0.9,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.vertical( top: Radius.circular(25.0),),
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
margin:EdgeInsets.only(top: 45) ,
|
||||
padding: EdgeInsets.only(left: 11, right: 11, bottom: 21),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Container(
|
||||
margin:EdgeInsets.only(top: 5) ,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(35.0),),
|
||||
color: Color(0xff464646),
|
||||
),
|
||||
width: 80,
|
||||
height: 6,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(top: 25,left: 11, right: 11, bottom: 10),
|
||||
child: Column(children: [
|
||||
"June 13, 2021".toText24(isBold: true, color: Colors.white),
|
||||
// LocaleKeys.attendanceDetails.tr().toText16(color: Color(0xffACACAC)),
|
||||
// LocaleKeys.timeLeftToday.tr().toText16(color: Color(0xffACACAC)),
|
||||
21.height,
|
||||
] ),
|
||||
),
|
||||
Center(
|
||||
child: CircularStepProgressBar(
|
||||
totalSteps: 16 * 4,
|
||||
currentStep: 16,
|
||||
width: 210,
|
||||
height: 210,
|
||||
selectedColor: MyColors.gradiantEndColor,
|
||||
unselectedColor: MyColors.grey70Color,
|
||||
child: Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
"99%".toText32(color: Colors.white, isBold: true),
|
||||
"Completed".tr().toText12(color: MyColors.greyACColor),
|
||||
19.height,
|
||||
"Shift Time".tr().toText12(color: MyColors.greyACColor),
|
||||
"08:00 - 17:00".toText22(color: Colors.white, isBold: true),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
Container(
|
||||
height: 32,
|
||||
// padding: EdgeInsets.only(top: 24, bottom: 24),
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), color: Colors.white),
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
padding: EdgeInsets.only(left: 21, right: 21, top: 24, bottom: 24),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children:[
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
"Actual Check In ".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"08:27".toText22(color: Colors.black, isBold: true),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: [
|
||||
"Approved Check In".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"09:27".toText22(color: Color(0xff1FA269), isBold: true),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: [
|
||||
"Late In".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"00:27".toText22(color: Color(0xffD02127), isBold: true),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: [ "Shortage".tr().toText12(color: MyColors.black),
|
||||
] ),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"00:00".toText22(color: Colors.black, isBold: true),],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
"Actual Check Out".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"18:20".toText22(color: Colors.black, isBold: true),],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: [ "Approved Check Out".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"18:20".toText22(color: Color(0xff1FA269), isBold: true),],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: ["Excess".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"00:00".toText22(color: Colors.black, isBold: true),],
|
||||
),
|
||||
SizedBox(height: 30,),
|
||||
Row(
|
||||
children: ["Early Out".tr().toText12(color: MyColors.black),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8,),
|
||||
Row(
|
||||
children: [
|
||||
"00:00".toText22(color: Colors.black, isBold: true),],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
] ),
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
)
|
||||
));
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/ui/landing/widget/drawer_item.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AppDrawer extends StatefulWidget {
|
||||
@override
|
||||
_AppDrawerState createState() => _AppDrawerState();
|
||||
}
|
||||
|
||||
class _AppDrawerState extends State<AppDrawer> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
color: Colors.white,
|
||||
child: Drawer(
|
||||
child: Column(children: <Widget>[
|
||||
const SizedBox(
|
||||
height: 200,
|
||||
),
|
||||
Expanded(
|
||||
child: ListView(padding: const EdgeInsets.all(21), physics: const BouncingScrollPhysics(), children: [
|
||||
Divider(),
|
||||
InkWell(
|
||||
child: DrawerItem(
|
||||
'My Profile',
|
||||
icon: Icons.person,
|
||||
color: Colors.grey,
|
||||
),
|
||||
onTap: () {
|
||||
drawerNavigator(context, AppRoutes.profile);
|
||||
})
|
||||
]))
|
||||
])));
|
||||
}
|
||||
|
||||
drawerNavigator(context, routeName) {
|
||||
Navigator.of(context).pushNamed(routeName);
|
||||
}
|
||||
}
|
||||
|
||||
String capitalizeOnlyFirstLater(String text) {
|
||||
if (text.trim().isEmpty) return "";
|
||||
|
||||
return "${text[0].toUpperCase()}${text.substring(1)}";
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DrawerItem extends StatefulWidget {
|
||||
final String title;
|
||||
final String subTitle;
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final dynamic assetLink;
|
||||
|
||||
const DrawerItem(this.title, {required this.icon, required this.color, this.subTitle = '', this.assetLink});
|
||||
|
||||
@override
|
||||
_DrawerItemState createState() => _DrawerItemState();
|
||||
}
|
||||
|
||||
class _DrawerItemState extends State<DrawerItem> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
margin: EdgeInsets.only(top: 0, bottom: 5, left: 0, right: 0),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
if (widget.assetLink != null)
|
||||
Container(
|
||||
height: 20,
|
||||
width: 20,
|
||||
child: Image.asset(widget.assetLink),
|
||||
),
|
||||
if (widget.assetLink == null)
|
||||
Icon(
|
||||
widget.icon,
|
||||
color: widget.color ?? Colors.black87,
|
||||
size: 25,
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width * 0.45,
|
||||
child: Text(widget.title,
|
||||
style: TextStyle(
|
||||
color: widget.color ?? Color(0xFF2E303A),
|
||||
fontSize: 14,
|
||||
fontFamily: 'Poppins',
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.84,
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,110 @@
|
||||
import 'package:easy_localization/src/public_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.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/dashboard/menu_entries.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menus.dart';
|
||||
import 'package:mohem_flutter_app/models/eit/get_eit_transaction_model.dart';
|
||||
import 'package:mohem_flutter_app/provider/dashboard_provider_model.dart';
|
||||
import 'package:mohem_flutter_app/provider/eit_provider_model.dart';
|
||||
import 'package:mohem_flutter_app/ui/work_list/work_list_screen.dart';
|
||||
import 'package:mohem_flutter_app/widgets/loading_dialog.dart';
|
||||
import 'package:mohem_flutter_app/widgets/shimmer/dashboard_shimmer_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class MissingSwipe extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<EITProviderModel>(
|
||||
builder: (context, data, child) {
|
||||
return !data.isEitLoaded
|
||||
? LoadingDialog()
|
||||
: SizedBox(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return rowItem(data.eitTransactionList![index]);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return 12.height;
|
||||
},
|
||||
itemCount: data.eitTransactionList?.length ?? 0,
|
||||
padding: EdgeInsets.only(left: 21, right: 21),
|
||||
));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Widget rowItem(CollectionTransaction types) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// Navigator.pushNamed(context, AppRoutes.missingSwipe);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0xff000000).withOpacity(.05),
|
||||
blurRadius: 26,
|
||||
offset: const Offset(0, -3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
gradient: LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [Colors.red, Colors.blue]),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
"assets/images/miss_swipe.svg",
|
||||
color: Colors.white,
|
||||
),
|
||||
2.height,
|
||||
Text(types.aPPLICATIONCOLUMNNAME.toString())
|
||||
],
|
||||
).paddingAll(6),
|
||||
),
|
||||
12.width,
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Missing Swipe Request".toText16(),
|
||||
"Missing Swipe Request for Hussain, Mohammad has been approved".toText10(),
|
||||
12.height,
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: "07 Jan 2021".toText10(color: MyColors.lightTextColor)),
|
||||
SvgPicture.asset(
|
||||
"assets/images/arrow_next.svg",
|
||||
color: MyColors.darkIconColor,
|
||||
)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,238 @@
|
||||
import 'package:easy_localization/src/public_ext.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/config/routes.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';
|
||||
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_profile_screen.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
|
||||
class BasicDetails extends StatefulWidget {
|
||||
const BasicDetails({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BasicDetailsState createState() => _BasicDetailsState();
|
||||
}
|
||||
|
||||
class _BasicDetailsState extends State<BasicDetails> {
|
||||
String? fullName = "";
|
||||
String? maritalStatus = "";
|
||||
String? birthDate = "";
|
||||
String? civilIdentityNumber = "";
|
||||
String? emailAddress = "";
|
||||
String? employeeNo = "";
|
||||
|
||||
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getEmployeeBasicDetails();
|
||||
basicDetails();
|
||||
}
|
||||
|
||||
void getEmployeeBasicDetails() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEmployeeBasicDetailsList = await ProfileApiClient().getEmployeeBasicDetails();
|
||||
Utils.hideLoading(context);
|
||||
basicDetails();
|
||||
print("getEmployeeBasicDetailsList.length");
|
||||
print(getEmployeeBasicDetailsList.length);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
basicDetails() {
|
||||
for (int i = 0; i < getEmployeeBasicDetailsList.length; i++) {
|
||||
if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'FULL_NAME') {
|
||||
fullName = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'MARITAL_STATUS') {
|
||||
maritalStatus = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'DATE_OF_BIRTH') {
|
||||
birthDate = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'NATIONAL_IDENTIFIER') {
|
||||
civilIdentityNumber = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'EMAIL_ADDRESS') {
|
||||
emailAddress = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'EMPLOYEE_NUMBER') {
|
||||
employeeNo = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: LocaleKeys.profile_basicDetails.tr(),
|
||||
),
|
||||
// appBar: AppBar(
|
||||
// backgroundColor: MyColors.white,
|
||||
// leading: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// IconButton(
|
||||
// icon: const Icon(
|
||||
// Icons.arrow_back_ios,
|
||||
// color: MyColors.backgroundBlackColor,
|
||||
// ),
|
||||
// onPressed: () => Navigator.pop(context),
|
||||
// ),
|
||||
// "Basic Details".toText24(isBold: true, color: MyColors.blackColor),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
bottomSheet: footer(),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
top: 28,
|
||||
left: 26,
|
||||
right: 26,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 5),
|
||||
height: 280,
|
||||
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: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
LocaleKeys.fullName.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${fullName}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.maritalStatus.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${maritalStatus}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.dateOfBirth.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${birthDate}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.civilIdentityNumber.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${civilIdentityNumber}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
footer() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
color: MyColors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
||||
],
|
||||
),
|
||||
child: DefaultButton(LocaleKeys.update.tr(), () async {
|
||||
showAlertDialog(context);
|
||||
}).insideContainer,
|
||||
);
|
||||
}
|
||||
|
||||
showAlertDialog(BuildContext context) {
|
||||
dynamic changeOrNew = 1;
|
||||
Widget cancelButton = TextButton(
|
||||
child: Text("Cancel"),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
Widget continueButton = TextButton(
|
||||
child: Text("Next"),
|
||||
onPressed: () {
|
||||
continueDynamicForms();
|
||||
},
|
||||
);
|
||||
StatefulBuilder alert = StatefulBuilder(builder: (context, setState) {
|
||||
return AlertDialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(10.0))),
|
||||
title: Text("Confirm"),
|
||||
content: Builder(builder: (context) {
|
||||
// Get available height and width of the build area of this widget. Make a choice depending on the size.
|
||||
var height = MediaQuery.of(context).size.height * .5;
|
||||
return Container(
|
||||
height: height,
|
||||
child: Column(children: [
|
||||
Text(
|
||||
"Select the type of change you want to make.",
|
||||
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
|
||||
),
|
||||
Divider(),
|
||||
Column(
|
||||
children: [
|
||||
ListTile(
|
||||
title: Text("correct or complete the current details"),
|
||||
leading: Radio(
|
||||
value: 1,
|
||||
groupValue: changeOrNew,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
changeOrNew = int.parse(value.toString());
|
||||
});
|
||||
},
|
||||
activeColor: Colors.green,
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text("Enter new Information because of a real change to the current details (e.g because of a change in marital status)"),
|
||||
leading: Radio(
|
||||
value: 2,
|
||||
groupValue: changeOrNew,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
changeOrNew = int.parse(value.toString());
|
||||
});
|
||||
},
|
||||
activeColor: Colors.green,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
]));
|
||||
}),
|
||||
actions: [
|
||||
cancelButton,
|
||||
continueButton,
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return alert;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void continueDynamicForms() {
|
||||
Navigator.pushNamed(context, AppRoutes.addDynamicInputProfile,
|
||||
arguments: DynamicProfileParams(LocaleKeys.profile_basicDetails.tr(), 'HR_PERINFO_SS',
|
||||
uRL: 'GET_BASIC_DET_DFF_STRUCTURE', requestID: 'BASIC_DETAILS', getEmployeeBasicDetailsList: getEmployeeBasicDetailsList));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,236 @@
|
||||
import 'package:easy_localization/src/public_ext.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/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/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_phones_model.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/phone_numbers.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/profile.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
|
||||
class ContactDetails extends StatefulWidget {
|
||||
const ContactDetails({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ContactDetailsState createState() => _ContactDetailsState();
|
||||
}
|
||||
|
||||
class _ContactDetailsState extends State<ContactDetails> {
|
||||
String? fullName = "";
|
||||
String? maritalStatus = "";
|
||||
String? birthDate = "";
|
||||
String? civilIdentityNumber = "";
|
||||
String? emailAddress = "";
|
||||
String? employeeNo = "";
|
||||
|
||||
List<GetEmployeePhonesList> getEmployeePhonesList = [];
|
||||
List<GetEmployeeAddressList> getEmployeeAddressList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
getEmployeePhones();
|
||||
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void getEmployeePhones() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEmployeePhonesList = await ProfileApiClient().getEmployeePhones();
|
||||
getEmployeeAddress();
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
void getEmployeeAddress() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEmployeeAddressList = await ProfileApiClient().getEmployeeAddress();
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: LocaleKeys.profile_contactDetails.tr(),
|
||||
),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
bottomSheet: footer(),
|
||||
body: Column(children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
top: 20,
|
||||
left: 26,
|
||||
right: 26,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 14, right: 14, top: 5, bottom: 20),
|
||||
height: 200,
|
||||
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: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.edit_location_alt_outlined,
|
||||
size: 20,
|
||||
),
|
||||
onPressed: () {
|
||||
updatePhone();
|
||||
},
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: getEmployeePhonesList
|
||||
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
"${e.pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
|
||||
"${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
]))
|
||||
.toList())
|
||||
])
|
||||
|
||||
// [
|
||||
// "${getEmployeePhonesList[0].pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeePhonesList[0].pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,),
|
||||
// "${getEmployeePhonesList[1].pHONETYPEMEANING}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeePhonesList[1].pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// ]
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
top: 20,
|
||||
left: 26,
|
||||
right: 26,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 14, right: 14, top: 5, bottom: 20),
|
||||
height: 400,
|
||||
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: SingleChildScrollView(
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.edit_location_alt_outlined,
|
||||
size: 20,
|
||||
),
|
||||
onPressed: () {},
|
||||
)
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: getEmployeeAddressList
|
||||
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
]))
|
||||
.toList())
|
||||
])))
|
||||
// "${getEmployeeAddressList[0].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[0].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
// "${getEmployeeAddressList[2].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[2].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
// "${getEmployeeAddressList[3].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[3].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
// "${getEmployeeAddressList[4].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[4].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
// "${getEmployeeAddressList[5].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[5].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// ),
|
||||
// "${getEmployeeAddressList[6].sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
|
||||
// "${getEmployeeAddressList[6].sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
//]),
|
||||
//),
|
||||
//],
|
||||
]));
|
||||
}
|
||||
|
||||
footer() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
color: MyColors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
||||
],
|
||||
),
|
||||
child: DefaultButton(LocaleKeys.update.tr(), () async {
|
||||
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||
Profile();
|
||||
}).insideContainer,
|
||||
);
|
||||
}
|
||||
|
||||
updatePhone() {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => PhoneNumbers(getEmployeePhonesList: this.getEmployeePhonesList)),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,327 @@
|
||||
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/my_attendance_api_client.dart';
|
||||
import 'package:mohem_flutter_app/api/profile_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.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/dyanmic_forms/get_set_values_request_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.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';
|
||||
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
|
||||
|
||||
class DynamicProfileParams {
|
||||
String title;
|
||||
String dynamicId;
|
||||
String uRL;
|
||||
String requestID;
|
||||
String colsURL;
|
||||
List<GetEmployeeBasicDetailsList>? getEmployeeBasicDetailsList;
|
||||
|
||||
DynamicProfileParams(this.title, this.dynamicId,
|
||||
{this.uRL = 'GET_EIT_DFF_STRUCTURE', this.requestID = '', this.colsURL = '', this.getEmployeeBasicDetailsList = const <GetEmployeeBasicDetailsList>[]});
|
||||
}
|
||||
|
||||
class DynamicInputScreenProfile extends StatefulWidget {
|
||||
DynamicInputScreenProfile({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DynamicInputScreenState createState() {
|
||||
return _DynamicInputScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _DynamicInputScreenState extends State<DynamicInputScreenProfile> {
|
||||
GenericResponseModel? genericResponseModel;
|
||||
List<GetBasicDetDffStructureList>? getBasicDetDffStructureList;
|
||||
List<GetBasicDetColsStructureList>? getBasicDetColsStructureList;
|
||||
DynamicProfileParams? dynamicParams;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void getTransactionsStructure() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
genericResponseModel = await ProfileApiClient().getDffStructure(dynamicParams!.dynamicId, dynamicParams!.uRL, dynamicParams!.requestID);
|
||||
getBasicDetDffStructureList = genericResponseModel?.getBasicDetDffStructureList ?? [];
|
||||
|
||||
getBasicDetDffStructureList?.forEach((element) {
|
||||
element.userBasicDetail = dynamicParams!.getEmployeeBasicDetailsList!.singleWhere((userDetail) => userDetail.aPPLICATIONCOLUMNNAME == element.aPPLICATIONCOLUMNNAME);
|
||||
});
|
||||
|
||||
genericResponseModel = await ProfileApiClient().getColStructure(dynamicParams!.dynamicId, 'GET_BASIC_DET_COLS_STRUCTURE', dynamicParams!.requestID);
|
||||
getBasicDetColsStructureList = genericResponseModel?.getBasicDetColsStructureList ?? [];
|
||||
getBasicDetColsStructureList?.forEach((element) {
|
||||
element.userBasicDetail = dynamicParams!.getEmployeeBasicDetailsList!.singleWhere((userDetail) => userDetail.aPPLICATIONCOLUMNNAME == element.aPPLICATIONCOLUMNNAME);
|
||||
});
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
void calGetValueSetValues(GetBasicDetDffStructureList structureList) async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
String segmentId = structureList.cHILDSEGMENTSVS!;
|
||||
List<GetBasicDetDffStructureList> filteredList = getBasicDetDffStructureList?.where((element) => element.cHILDSEGMENTSVS == segmentId).toList() ?? [];
|
||||
List<Map<String, dynamic>> values = filteredList
|
||||
.map((e) => GetSetValuesRequestModel(
|
||||
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
|
||||
.toJson())
|
||||
.toList();
|
||||
ESERVICESVS genericResponseModel = await MyAttendanceApiClient().getValueSetValues(structureList.cHILDSEGMENTSVS!, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values);
|
||||
|
||||
int index = getBasicDetDffStructureList!.indexWhere((element) => element.sEGMENTNAME == structureList.cHILDSEGMENTSVS);
|
||||
getBasicDetDffStructureList![index].eSERVICESVS!.add(genericResponseModel);
|
||||
// getEitDffStructureList = genericResponseModel?.getEITDFFStructureList ?? [];
|
||||
//getEitDffStructureList = getEitDffStructureList!.where((element) => element.dISPLAYFLAG != "N").toList();
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (dynamicParams == null) {
|
||||
dynamicParams = ModalRoute.of(context)!.settings.arguments as DynamicProfileParams;
|
||||
getTransactionsStructure();
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: dynamicParams!.title,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
(getBasicDetDffStructureList == null && getBasicDetColsStructureList == null
|
||||
? const SizedBox()
|
||||
: (getBasicDetDffStructureList!.isEmpty && getBasicDetColsStructureList!.isEmpty
|
||||
? LocaleKeys.noDataAvailable.tr().toText16().center
|
||||
: ListView(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: const EdgeInsets.all(21),
|
||||
children: [
|
||||
ListView.separated(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (BuildContext cxt, int parentIndex) {
|
||||
return parseDynamicFormatTypeCols(getBasicDetColsStructureList![parentIndex], parentIndex);
|
||||
},
|
||||
separatorBuilder: (cxt, index) => 0.height,
|
||||
itemCount: getBasicDetColsStructureList!.length),
|
||||
12.height,
|
||||
ListView.separated(
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (BuildContext cxt, int parentIndex) {
|
||||
return parseDynamicFormatType(getBasicDetDffStructureList![parentIndex], parentIndex);
|
||||
},
|
||||
separatorBuilder: (cxt, index) => 0.height,
|
||||
itemCount: getBasicDetDffStructureList!.length),
|
||||
],
|
||||
)))
|
||||
.expanded,
|
||||
// 12.height,
|
||||
DefaultButton(
|
||||
LocaleKeys.next.tr(),
|
||||
(getBasicDetDffStructureList ?? []).isEmpty
|
||||
? null
|
||||
: () => {
|
||||
//Navigator.of(context).pushNamed(LOGIN_TYPE)
|
||||
},
|
||||
).insideContainer,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget parseDynamicFormatType(GetBasicDetDffStructureList model, int index) {
|
||||
if (model.dISPLAYFLAG != "N") {
|
||||
} else {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
if (model.fORMATTYPE == "C") {
|
||||
if (model.eSERVICESVS?.isNotEmpty ?? false) {
|
||||
return PopupMenuButton(
|
||||
child: DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.userBasicDetail?.sEGMENTVALUEDSP ?? "",
|
||||
isEnable: false,
|
||||
isPopup: true,
|
||||
).paddingOnly(bottom: 12),
|
||||
itemBuilder: (_) => <PopupMenuItem<int>>[
|
||||
for (int i = 0; i < model.eSERVICESVS!.length; i++) PopupMenuItem<int>(child: Text(model.eSERVICESVS![i].vALUECOLUMNNAME!), value: i),
|
||||
],
|
||||
onSelected: (int popupIndex) {
|
||||
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.eSERVICESVS![popupIndex].vALUECOLUMNNAME!;
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
return DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.eSERVICESDV?.pIDCOLUMNNAME ?? "",
|
||||
isReadOnly: model.rEADONLY == "Y",
|
||||
onChange: (text) {
|
||||
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = text;
|
||||
|
||||
},
|
||||
).paddingOnly(bottom: 12);
|
||||
} else if (model.fORMATTYPE == "X") {
|
||||
return DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.eSERVICESDV?.pIDCOLUMNNAME ?? (getBasicDetDffStructureList![index].userBasicDetail?.sEGMENTVALUEDSP ?? ""),
|
||||
suffixIconData: Icons.calendar_today,
|
||||
isEnable: false,
|
||||
onTap: () async {
|
||||
DateTime date = await _selectDate(context);
|
||||
DateTime date1 = DateTime(date.year, date.month, date.day);
|
||||
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = date.toString();
|
||||
ESERVICESDV eservicesdv = ESERVICESDV(
|
||||
pIDCOLUMNNAME: DateFormat('yyyy-MM-dd').format(date1),
|
||||
pRETURNMSG: "null",
|
||||
pRETURNSTATUS: getBasicDetDffStructureList![index].dEFAULTVALUE,
|
||||
pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
||||
getBasicDetDffStructureList![index].eSERVICESDV = eservicesdv;
|
||||
setState(() {});
|
||||
if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
|
||||
calGetValueSetValues(model);
|
||||
}
|
||||
},
|
||||
).paddingOnly(bottom: 12);
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [],
|
||||
).objectContainerView();
|
||||
}
|
||||
|
||||
Widget parseDynamicFormatTypeCols(GetBasicDetColsStructureList model, int index) {
|
||||
if (model.dISPLAYFLAG != "N") {
|
||||
} else {
|
||||
return const SizedBox();
|
||||
}
|
||||
|
||||
if (model.dATATYPE == "VARCHAR2") {
|
||||
if (model.objectValuesList?.isNotEmpty ?? false) {
|
||||
return PopupMenuButton(
|
||||
child: DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.userBasicDetail?.sEGMENTVALUEDSP ?? "",
|
||||
isEnable: false,
|
||||
isPopup: true,
|
||||
).paddingOnly(bottom: 12),
|
||||
itemBuilder: (_) => <PopupMenuItem<int>>[
|
||||
for (int i = 0; i < model.objectValuesList!.length; i++) PopupMenuItem<int>(child: Text(model.objectValuesList![i].mEANING!), value: i),
|
||||
],
|
||||
onSelected: (int popupIndex) {
|
||||
ESERVICESDV eservicesdv =
|
||||
ESERVICESDV(pIDCOLUMNNAME: model.objectValuesList![index].dESCRIPTION, pRETURNMSG: "null", pRETURNSTATUS: model.oBJECTNAME, pVALUECOLUMNNAME: model.aPPLICATIONCOLUMNNAME);
|
||||
getBasicDetDffStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = model.objectValuesList![popupIndex].dESCRIPTION!;
|
||||
setState(() {});
|
||||
});
|
||||
}
|
||||
|
||||
return DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.userBasicDetail?.sEGMENTVALUEDSP ?? "",
|
||||
//model.aPPLICATIONCOLUMNNAME ?? "",
|
||||
//"",
|
||||
isReadOnly: false,
|
||||
onChange: (text) {
|
||||
getBasicDetColsStructureList![index].userBasicDetail!.sEGMENTVALUEDSP = text;
|
||||
},
|
||||
).paddingOnly(bottom: 12);
|
||||
} else if (model.dATATYPE == "DATE") {
|
||||
return DynamicTextFieldWidget(
|
||||
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
|
||||
model.aPPLICATIONCOLUMNNAME ?? (getBasicDetColsStructureList![index].userBasicDetail?.sEGMENTVALUEDSP ?? ""),
|
||||
suffixIconData: Icons.calendar_today,
|
||||
isEnable: false,
|
||||
onTap: () async {
|
||||
DateTime date = await _selectDate(context);
|
||||
DateTime date1 = DateTime(date.year, date.month, date.day);
|
||||
getBasicDetColsStructureList![index].userBasicDetail?.sEGMENTVALUEDSP = date.toString();
|
||||
// ESERVICESDV eservicesdv = ESERVICESDV(
|
||||
// pIDCOLUMNNAME: DateFormat('yyyy-MM-dd').format(date1),
|
||||
// pRETURNMSG: "null",
|
||||
// pRETURNSTATUS: getBasicDetDffStructureList![index].dEFAULTVALUE,
|
||||
// pVALUECOLUMNNAME: DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
||||
// getBasicDetDffStructureList![index].eSERVICESDV = eservicesdv;
|
||||
setState(() {});
|
||||
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
|
||||
// calGetValueSetValues(model);
|
||||
// }
|
||||
},
|
||||
).paddingOnly(bottom: 12);
|
||||
}
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [],
|
||||
).objectContainerView();
|
||||
}
|
||||
|
||||
DateTime selectedDate = DateTime.now();
|
||||
|
||||
Future<DateTime> _selectDate(BuildContext context) async {
|
||||
DateTime time = selectedDate;
|
||||
if (!Platform.isIOS) {
|
||||
await showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (cxt) => Container(
|
||||
height: 250,
|
||||
color: Colors.white,
|
||||
child: CupertinoDatePicker(
|
||||
backgroundColor: Colors.white,
|
||||
mode: CupertinoDatePickerMode.date,
|
||||
onDateTimeChanged: (value) {
|
||||
if (value != null && value != selectedDate) {
|
||||
time = value;
|
||||
}
|
||||
},
|
||||
initialDateTime: selectedDate,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
final DateTime? picked =
|
||||
await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
|
||||
if (picked != null && picked != selectedDate) {
|
||||
time = picked;
|
||||
}
|
||||
}
|
||||
return time;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,105 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/my_attendance_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/get_eit_transaction_list_model.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/item_detail_view_widget.dart';
|
||||
|
||||
class DynamicListViewParams {
|
||||
String title;
|
||||
String dynamicId;
|
||||
String uRL;
|
||||
String requestID;
|
||||
DynamicListViewParams(this.title, this.dynamicId, {this.uRL = 'GET_EIT_DFF_STRUCTURE', this.requestID = ''});
|
||||
}
|
||||
|
||||
class DynamicListViewScreen extends StatefulWidget {
|
||||
DynamicListViewScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DynamicListViewScreenState createState() {
|
||||
return _DynamicListViewScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _DynamicListViewScreenState extends State<DynamicListViewScreen> {
|
||||
List<GetEITTransactionList>? getEITTransactionList;
|
||||
DynamicListViewParams? dynamicParams;
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void getTransactions() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEITTransactionList = await MyAttendanceApiClient().getEitTransaction(dynamicParams!.dynamicId);
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (dynamicParams == null) {
|
||||
dynamicParams = ModalRoute.of(context)!.settings.arguments as DynamicListViewParams;
|
||||
getTransactions();
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: dynamicParams!.title,
|
||||
),
|
||||
body: getEITTransactionList == null
|
||||
? const SizedBox()
|
||||
: (getEITTransactionList!.isEmpty
|
||||
? LocaleKeys.noDataAvailable.tr().toText16().center
|
||||
: ListView.separated(
|
||||
physics: const BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(21),
|
||||
itemBuilder: (cxt, int parentIndex) => Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
for (int t = 0; t < (getEITTransactionList![parentIndex].collectionTransaction ?? []).length; t++)
|
||||
if (getEITTransactionList![parentIndex].collectionTransaction![t].dISPLAYFLAG == "Y")
|
||||
ItemDetailView(
|
||||
getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTPROMPT!, getEITTransactionList![parentIndex].collectionTransaction![t].sEGMENTVALUEDSP ?? ""),
|
||||
],
|
||||
).objectContainerView(),
|
||||
separatorBuilder: (cxt, index) => 12.height,
|
||||
itemCount: getEITTransactionList!.length)),
|
||||
floatingActionButton: Container(
|
||||
height: 50,
|
||||
width: 50,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
gradient: LinearGradient(transform: GradientRotation(.83), begin: Alignment.topRight, end: Alignment.bottomLeft, colors: [
|
||||
MyColors.gradiantEndColor,
|
||||
MyColors.gradiantStartColor,
|
||||
]),
|
||||
),
|
||||
child: const Icon(Icons.add, color: Colors.white, size: 30),
|
||||
).onPress(() {
|
||||
Navigator.pushNamed(context, AppRoutes.addDynamicInput, arguments: dynamicParams);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,251 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import 'package:easy_localization/src/public_ext.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/dialogs/otp_dialog.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/get_employee_basic_details.model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/profile.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
|
||||
class FamilyMembers extends StatefulWidget {
|
||||
const FamilyMembers({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_FamilyMembersState createState() => _FamilyMembersState();
|
||||
}
|
||||
|
||||
class _FamilyMembersState extends State<FamilyMembers> {
|
||||
|
||||
List<GetEmployeeContactsList> getEmployeeContactsList = [];
|
||||
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getEmployeeContacts();
|
||||
|
||||
}
|
||||
|
||||
void getEmployeeContacts() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEmployeeContactsList = await ProfileApiClient().getEmployeeContacts();
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: LocaleKeys.profile_familyDetails.tr(),
|
||||
),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
bottomSheet:footer(),
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(height: 20,),
|
||||
getEmployeeContactsList.length != 0
|
||||
? SingleChildScrollView(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
ListView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
shrinkWrap: true,
|
||||
physics: ScrollPhysics(),
|
||||
itemCount: getEmployeeContactsList.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(top: 10, left: 26, right: 26,),
|
||||
padding: EdgeInsets.only(left: 14, right: 14,top: 13, ),
|
||||
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: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
"${getEmployeeContactsList[index].cONTACTNAME}".toText16(color: MyColors.blackColor),
|
||||
"${getEmployeeContactsList[index].rELATIONSHIP}".toText11(isBold: true, color: MyColors.textMixColor),
|
||||
SizedBox(height: 5,),
|
||||
Divider(
|
||||
color: MyColors.lightGreyEFColor,
|
||||
height: 20,
|
||||
thickness: 1,
|
||||
indent: 0,
|
||||
endIndent: 0,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: <Widget>[
|
||||
Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Icon(
|
||||
Icons.edit,
|
||||
size: 15,
|
||||
color: MyColors.grey67Color,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: LocaleKeys.update.tr(),
|
||||
style: TextStyle(
|
||||
color: MyColors.grey67Color,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
child: SizedBox(
|
||||
child: Container(
|
||||
width: 3,
|
||||
color: MyColors.lightGreyEFColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showAlertDialog(context);
|
||||
},
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
size: 15,
|
||||
color: Color(0x99FF0000),
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text:LocaleKeys.remove.tr(),
|
||||
style: TextStyle(
|
||||
color: MyColors.DarkRedColor,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
// ElevatedButton.icon(
|
||||
// icon: Icon(
|
||||
// Icons.delete,
|
||||
// size: 15,
|
||||
// color: Color(0x99FF0000),
|
||||
// ),
|
||||
// style: ElevatedButton.styleFrom(
|
||||
// shadowColor: Colors.white,
|
||||
// primary: Colors.white,
|
||||
// ),
|
||||
// label: "remove".toText12(color: MyColors.DarkRedColor),
|
||||
// onPressed: (){},
|
||||
// ),
|
||||
],
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
):Container(),
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
footer(){
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
color: MyColors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
||||
],
|
||||
),
|
||||
child: DefaultButton(LocaleKeys.update.tr(), () async {
|
||||
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||
Profile();
|
||||
}).insideContainer,
|
||||
);
|
||||
}
|
||||
|
||||
showAlertDialog(BuildContext context) {
|
||||
Widget cancelButton = TextButton(
|
||||
child: Text("CANCEL"),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
);
|
||||
Widget continueButton = TextButton(
|
||||
child: Text("OK"),
|
||||
onPressed: () {},
|
||||
);
|
||||
AlertDialog alert = AlertDialog(
|
||||
title: Text("Confirm"),
|
||||
content: Text("Are You Sure You Want to Remove this Member?"),
|
||||
actions: [
|
||||
cancelButton,
|
||||
continueButton,
|
||||
],
|
||||
);
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return alert;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
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/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';
|
||||
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
||||
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
|
||||
class PesonalInfo extends StatefulWidget {
|
||||
const PesonalInfo({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PesonalInfoState createState() => _PesonalInfoState();
|
||||
}
|
||||
|
||||
class _PesonalInfoState extends State<PesonalInfo> {
|
||||
String? fullName = "";
|
||||
String? maritalStatus = "";
|
||||
String? birthDate = "";
|
||||
String? civilIdentityNumber = "";
|
||||
String? emailAddress = "";
|
||||
String? employeeNo = "";
|
||||
|
||||
// List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
||||
// MemberInformationListModel? _memberInformationList;
|
||||
|
||||
late MemberInformationListModel memberInformationList;
|
||||
|
||||
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
memberInformationList = AppState().memberInformationList!;
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: LocaleKeys.profile_personalInformation.tr(),
|
||||
),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
// bottomSheet:footer(),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
top: 28,
|
||||
left: 26,
|
||||
right: 26,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 14, right: 14, top: 13, bottom: 20),
|
||||
height: 350,
|
||||
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: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
LocaleKeys.category.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${memberInformationList!.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.address.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${memberInformationList!.lOCATIONNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.phoneNumber.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${memberInformationList!.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.businessGroup.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${memberInformationList!.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
LocaleKeys.Payroll.tr().toText13(color: MyColors.lightGrayColor),
|
||||
"${memberInformationList!.pAYROLLNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
footer() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
color: MyColors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
||||
],
|
||||
),
|
||||
child: DefaultButton(LocaleKeys.update.tr(), () async {}).insideContainer,
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,115 @@
|
||||
import 'package:easy_localization/src/public_ext.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/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/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_phones_model.dart';
|
||||
import 'package:mohem_flutter_app/models/profile/phone_number_types_modek.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/profile.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
|
||||
|
||||
class PhoneNumbers extends StatefulWidget {
|
||||
List<GetEmployeePhonesList> getEmployeePhonesList;
|
||||
|
||||
PhoneNumbers({Key? key, required this.getEmployeePhonesList}) : super(key: key);
|
||||
|
||||
@override
|
||||
_PhoneNumbersState createState() => _PhoneNumbersState();
|
||||
}
|
||||
|
||||
class _PhoneNumbersState extends State<PhoneNumbers> {
|
||||
List<GetPhoneNumberTypesModel> getPhoneNumberTypesList = [];
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getPhoneNumberTypes();
|
||||
}
|
||||
|
||||
void getPhoneNumberTypes() async {
|
||||
Utils.showLoading(context);
|
||||
getPhoneNumberTypesList = await ProfileApiClient().getPhoneNumberTypes();
|
||||
setState(() {});
|
||||
Utils.hideLoading(context);
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: LocaleKeys.profile_contactDetails.tr(),
|
||||
),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
bottomSheet: footer(),
|
||||
body: Column(children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(
|
||||
top: 20,
|
||||
left: 26,
|
||||
right: 26,
|
||||
),
|
||||
padding: EdgeInsets.only(left: 14, right: 14, top: 5, bottom: 20),
|
||||
height: 400,
|
||||
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: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: widget.getEmployeePhonesList
|
||||
.map((e) => Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
PopupMenuButton(
|
||||
child: DynamicTextFieldWidget(
|
||||
"Please Select *",
|
||||
e.pHONETYPEMEANING ?? "",
|
||||
isEnable: true,
|
||||
isPopup: true,
|
||||
).paddingOnly(bottom: 12),
|
||||
itemBuilder: (_) => <PopupMenuItem<int>>[
|
||||
for (int i = 0; i < getPhoneNumberTypesList.length; i++) PopupMenuItem<int>(child: Text(getPhoneNumberTypesList![i].mEANING!), value: i),
|
||||
],
|
||||
onSelected: (int index) {
|
||||
e.pHONETYPEMEANING = getPhoneNumberTypesList[index].mEANING;
|
||||
setState(() {});
|
||||
}),
|
||||
"${e.pHONENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||
]))
|
||||
.toList())))
|
||||
]));
|
||||
}
|
||||
|
||||
footer() {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(10),
|
||||
color: MyColors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(color: MyColors.lightGreyEFColor, spreadRadius: 3),
|
||||
],
|
||||
),
|
||||
child: DefaultButton(LocaleKeys.update.tr(), () async {
|
||||
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||
Profile();
|
||||
}).insideContainer,
|
||||
);
|
||||
}
|
||||
|
||||
updatePhone() {}
|
||||
}
|
||||
@ -0,0 +1,289 @@
|
||||
import 'package:easy_localization/src/public_ext.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/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/models/get_employee_basic_details.model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
|
||||
|
||||
class Profile extends StatefulWidget {
|
||||
const Profile({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ProfileState createState() => _ProfileState();
|
||||
}
|
||||
|
||||
class _ProfileState extends State<Profile> {
|
||||
String? fullName = "";
|
||||
String? maritalStatus = "";
|
||||
String? birthDate = "";
|
||||
String? civilIdentityNumber = "";
|
||||
String? emailAddress = "";
|
||||
String? employeeNo = "";
|
||||
|
||||
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getEmployeeBasicDetails();
|
||||
basicDetails();
|
||||
}
|
||||
|
||||
void getEmployeeBasicDetails() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
getEmployeeBasicDetailsList = await ProfileApiClient().getEmployeeBasicDetails();
|
||||
Utils.hideLoading(context);
|
||||
basicDetails();
|
||||
print("getEmployeeBasicDetailsList.length");
|
||||
print(getEmployeeBasicDetailsList.length);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
basicDetails() {
|
||||
for (int i = 0; i < getEmployeeBasicDetailsList.length; i++) {
|
||||
if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'FULL_NAME') {
|
||||
fullName = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'MARITAL_STATUS') {
|
||||
maritalStatus = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'DATE_OF_BIRTH') {
|
||||
birthDate = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'NATIONAL_IDENTIFIER') {
|
||||
civilIdentityNumber = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'EMAIL_ADDRESS') {
|
||||
emailAddress = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
} else if (getEmployeeBasicDetailsList[i].aPPLICATIONCOLUMNNAME == 'EMPLOYEE_NUMBER') {
|
||||
employeeNo = getEmployeeBasicDetailsList[i].sEGMENTVALUEDSP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: MyColors.lightGreenColor,
|
||||
leading: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: MyColors.backgroundBlackColor,
|
||||
),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
backgroundColor: MyColors.lightGreenColor,
|
||||
body: Stack(children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: Container(
|
||||
height: 30,
|
||||
width: 80,
|
||||
padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 5, bottom: 5),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: MyColors.gradiantEndColor,
|
||||
style: BorderStyle.solid,
|
||||
),
|
||||
color: MyColors.gradiantEndColor,
|
||||
borderRadius: BorderRadius.circular(100.0)),
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
children: [
|
||||
WidgetSpan(
|
||||
child: Icon(
|
||||
Icons.image,
|
||||
size: 20,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: " Edit",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
margin: EdgeInsets.only(top: 48),
|
||||
height: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(30.0), topRight: Radius.circular(30.0)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
"${fullName}".toText20(isBold: true, color: MyColors.blackColor),
|
||||
"${employeeNo}".toText12(isBold: false, color: MyColors.lightGrayColor),
|
||||
"${emailAddress}".toText12(isBold: false, color: MyColors.black),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
Divider(
|
||||
color: MyColors.lightGreyE6Color,
|
||||
height: 20,
|
||||
thickness: 8,
|
||||
indent: 0,
|
||||
endIndent: 0,
|
||||
),
|
||||
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 10.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
SizedBox(
|
||||
width: 15,
|
||||
),
|
||||
"Personal Information".toText16(isBold: true, color: MyColors.grey3AColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
SizedBox(
|
||||
width: 15,
|
||||
),
|
||||
"Basic Details".toText16(isBold: true, color: MyColors.grey3AColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
"Contact Details".toText16(isBold: true, color: MyColors.grey3AColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
||||
},
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
|
||||
SizedBox(
|
||||
width: 20,
|
||||
),
|
||||
"Family Members".toText16(isBold: true, color: MyColors.grey3AColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingOnly( top: 35, bottom: 36),
|
||||
),
|
||||
Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SizedBox(
|
||||
child: CircleAvatar(
|
||||
radius: 40.0,
|
||||
backgroundColor: Colors.white,
|
||||
child: CircleAvatar(
|
||||
child: Align(
|
||||
alignment: Alignment.bottomRight,
|
||||
// child: CircleAvatar(
|
||||
// backgroundColor: Colors.white,
|
||||
// radius: 12.0,
|
||||
// child: Icon(
|
||||
// Icons.camera_alt,
|
||||
// size: 15.0,
|
||||
// color: Color(0xFF404040),
|
||||
// ),
|
||||
// ),
|
||||
),
|
||||
radius: 38.0,
|
||||
// url:"",
|
||||
),
|
||||
),
|
||||
)),
|
||||
])
|
||||
// Container(
|
||||
// margin: const EdgeInsets.only(top:50),
|
||||
// decoration: const BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.only(
|
||||
// topLeft: Radius.circular(30.0),
|
||||
// topRight: Radius.circular(30.0))
|
||||
// ),
|
||||
// // color: MyColors.white,
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 30,
|
||||
// color: MyColors.lightGreenColor,
|
||||
// margin: const EdgeInsets.only(bottom: 20,),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// CircleAvatar(
|
||||
// backgroundColor: Colors.grey.shade800,
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ListView(
|
||||
// scrollDirection: Axis.vertical,
|
||||
// children: [
|
||||
// Column(
|
||||
// children: [
|
||||
// // 20.height,
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ]
|
||||
// ),
|
||||
// ),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menus.dart';
|
||||
import 'package:mohem_flutter_app/provider/eit_provider_model.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/ui/landing/widget/missing_swipe.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class AddEITScreen extends StatelessWidget {
|
||||
late GetMenuEntriesList getMenu;
|
||||
late EITProviderModel data;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
getMenu = ModalRoute.of(context)!.settings.arguments as GetMenuEntriesList;
|
||||
|
||||
data = Provider.of<EITProviderModel>(context, listen: false);
|
||||
data.getEITList(getMenu.functionName.toString());
|
||||
return DefaultTabController(
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(context, title: getMenu.prompt.toString()),
|
||||
//AppBar(
|
||||
|
||||
// title: getMenu.prompt.toString(),
|
||||
// ),
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(children: [
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)),
|
||||
gradient: LinearGradient(transform: GradientRotation(.46), begin: Alignment.topRight, end: Alignment.bottomRight, colors: [
|
||||
MyColors.gradiantEndColor,
|
||||
MyColors.gradiantStartColor,
|
||||
]),
|
||||
),
|
||||
clipBehavior: Clip.antiAlias,
|
||||
child: TabBar(
|
||||
indicatorColor: Colors.white,
|
||||
labelColor: Colors.white,
|
||||
tabs: [
|
||||
Tab(
|
||||
text: "Missing Swipe",
|
||||
),
|
||||
Tab(
|
||||
text: "Swipe Request",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: TabBarView(
|
||||
children: [MissingSwipe(), Container()],
|
||||
),
|
||||
)
|
||||
])),
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
import 'dart:ui';
|
||||
import 'dart:convert';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:mohem_flutter_app/api/profile_api_client.dart';
|
||||
import 'package:mohem_flutter_app/app_state/app_state.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
||||
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
||||
import 'package:mohem_flutter_app/ui/screens/profile/widgets/header.dart';
|
||||
import 'package:mohem_flutter_app/ui/screens/profile/widgets/profile_panel.dart';
|
||||
import 'package:mohem_flutter_app/widgets/bottom_sheet.dart';
|
||||
|
||||
class ProfileScreen extends StatefulWidget {
|
||||
const ProfileScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_ProfileScreenState createState() => _ProfileScreenState();
|
||||
}
|
||||
|
||||
class _ProfileScreenState extends State<ProfileScreen> {
|
||||
late MemberInformationListModel memberInformationList;
|
||||
final ImagePicker _picker = ImagePicker();
|
||||
List<GetEmployeeBasicDetailsList> getEmployeeBasicDetailsList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
memberInformationList = AppState().memberInformationList!;
|
||||
//getEmployeeBasicDetails();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
extendBody: true,
|
||||
backgroundColor: const Color(0xffefefef),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
height: 300,
|
||||
margin: EdgeInsets.only(top: 50),
|
||||
decoration: BoxDecoration(image: DecorationImage(image: MemoryImage(Utils.getPostBytes(memberInformationList.eMPLOYEEIMAGE)), fit: BoxFit.cover)),
|
||||
child: new BackdropFilter(
|
||||
filter: new ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
|
||||
child: new Container(
|
||||
decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)),
|
||||
),
|
||||
)),
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.center, children: [
|
||||
SizedBox(
|
||||
height: 80,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 15, right: 15),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.arrow_back_ios,
|
||||
color: Colors.white,
|
||||
)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
startImageSheet();
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 5),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(15), color: Colors.black.withOpacity(.3)),
|
||||
child: Row(children: [
|
||||
Icon(Icons.photo, color: Colors.white),
|
||||
Text(
|
||||
'Edit',
|
||||
style: TextStyle(color: Colors.white, fontSize: 12),
|
||||
)
|
||||
]))),
|
||||
],
|
||||
)),
|
||||
HeaderPanel(memberInformationList),
|
||||
ProfilePanle(memberInformationList)
|
||||
]),
|
||||
)
|
||||
]));
|
||||
}
|
||||
|
||||
startImageSheet() {
|
||||
showMyBottomSheet(context,
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 20, right: 20),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [Text('OK'), Text('CANCEL')],
|
||||
)),
|
||||
BottomSheetItem(
|
||||
onTap: () {
|
||||
openGallery(false);
|
||||
},
|
||||
title: 'Open Gallery',
|
||||
icon: Icons.browse_gallery_outlined,
|
||||
),
|
||||
BottomSheetItem(
|
||||
onTap: () {
|
||||
openGallery(true);
|
||||
},
|
||||
title: 'Open Camera',
|
||||
icon: Icons.camera,
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
void openGallery(bool isCamera) async {
|
||||
final XFile? image = await _picker.pickImage(source: isCamera ? ImageSource.camera : ImageSource.gallery);
|
||||
|
||||
if (image != null) {
|
||||
String img = base64.encode(await image!.readAsBytes());
|
||||
Utils.showLoading(context);
|
||||
dynamic empImageUpdteResp = await ProfileApiClient().updateEmpImage(img);
|
||||
Utils.hideLoading(context);
|
||||
if (empImageUpdteResp['P_RETURN_STATUS'] == 'S') {
|
||||
setState(() {
|
||||
memberInformationList.eMPLOYEEIMAGE = img;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
||||
|
||||
class HeaderPanel extends StatelessWidget {
|
||||
HeaderPanel(this.memberInformationList);
|
||||
late MemberInformationListModel memberInformationList;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double _width = MediaQuery.of(context).size.width;
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: _width / 10, vertical: 0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [],
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:mohem_flutter_app/models/profile_menu.model.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';
|
||||
|
||||
class ProfileInFo extends StatelessWidget {
|
||||
ProfileInFo(this.memberInfo);
|
||||
MemberInformationListModel memberInfo;
|
||||
String data = '.';
|
||||
double sliderValue = 75;
|
||||
List<ProfileMenu> menu = [
|
||||
ProfileMenu(name: LocaleKeys.profile_personalInformation.tr(), icon: 'personal-info.svg', route: AppRoutes.personalInfo, dynamicUrl: ''),
|
||||
ProfileMenu(
|
||||
name: LocaleKeys.profile_basicDetails.tr(),
|
||||
icon: 'basic-details.svg',
|
||||
route: AppRoutes.basicDetails,
|
||||
),
|
||||
ProfileMenu(name: LocaleKeys.profile_contactDetails.tr(), icon: 'contact-details.svg', route: AppRoutes.contactDetails, dynamicUrl: ''),
|
||||
ProfileMenu(name: LocaleKeys.profile_familyDetails.tr(), icon: 'family-members.svg', route: AppRoutes.familyMembers, dynamicUrl: ''),
|
||||
];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.center, children: [
|
||||
/// card header
|
||||
customLabel(memberInfo.eMPLOYEENAME.toString(), 22, Colors.black, true),
|
||||
|
||||
customLabel(memberInfo.eMPLOYEENUMBER.toString() + ' | ' + memberInfo.jOBNAME.toString(), 14, Colors.grey, false),
|
||||
|
||||
customLabel(memberInfo.eMPLOYEEEMAILADDRESS.toString(), 13, Colors.black, true),
|
||||
|
||||
Divider(height: 40, thickness: 8, color: const Color(0xffefefef)),
|
||||
|
||||
customLabel(LocaleKeys.completingYear.tr(), 10, Colors.black, true),
|
||||
|
||||
SizedBox(height: 10),
|
||||
Container(
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [
|
||||
Column(
|
||||
children: [customLabel(LocaleKeys.year.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEYEARS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
||||
),
|
||||
Column(
|
||||
children: [customLabel(LocaleKeys.month.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEMONTHS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
||||
),
|
||||
Column(
|
||||
children: [customLabel(LocaleKeys.day.tr(), 14, const Color(0xff808080), true), customLabel(memberInfo.sERVICEDAYS.toString().padLeft(2, '0'), 22, Color(0xff2BB8A6), true)],
|
||||
)
|
||||
])),
|
||||
|
||||
Divider(height: 40, thickness: 8, color: const Color(0xffefefef)),
|
||||
Container(
|
||||
padding: EdgeInsets.only(
|
||||
left: 20,
|
||||
right: 20,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
customLabel(LocaleKeys.profile_profileCompletionPer.tr() + ' 75%', 18, Colors.black, true),
|
||||
const SizedBox(height: 10),
|
||||
Row(
|
||||
children: [
|
||||
for (var i = 0; i < 4; i++)
|
||||
if (i < 3) Expanded(child: drawSlider(Color(0xff2BB8A6))) else Expanded(child: drawSlider(const Color(0xffefefef)))
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
LocaleKeys.profile_completeProfile.tr(),
|
||||
style: TextStyle(color: Color(0xff2BB8A6), fontWeight: FontWeight.bold, decoration: TextDecoration.underline),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
/// description
|
||||
Divider(height: 50, thickness: 8, color: const Color(0xffefefef)),
|
||||
|
||||
Column(
|
||||
children: menu.map((i) => rowItem(i, context)).toList(),
|
||||
)
|
||||
]));
|
||||
}
|
||||
|
||||
Widget drawSlider(color) {
|
||||
return Row(children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
child: Container(
|
||||
height: 6,
|
||||
width: 20,
|
||||
color: color,
|
||||
),
|
||||
)),
|
||||
Container(height: 6, width: 3, color: Colors.white),
|
||||
]);
|
||||
}
|
||||
|
||||
Widget rowItem(obj, context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
//if (obj.dynamicUrl == '') {
|
||||
Navigator.pushNamed(context, obj.route);
|
||||
// } else {
|
||||
// Navigator.pushNamed(context, AppRoutes.addDynamicInputProfile, arguments: DynamicListViewParams(obj.name, obj.functionName, uRL: obj.dynamicUrl, requestID: obj.requestID));
|
||||
//}
|
||||
},
|
||||
child: ListTile(
|
||||
leading: SvgPicture.asset('assets/images/' + obj.icon),
|
||||
title: Text(obj.name),
|
||||
trailing: Icon(Icons.arrow_forward),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget customLabel(String label, double size, Color color, bool isBold, {double padding = 0.0}) => Container(
|
||||
padding: EdgeInsets.all(padding),
|
||||
// height: 50,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [Text(label, style: TextStyle(color: color, fontSize: size, fontWeight: isBold ? FontWeight.bold : FontWeight.normal))]));
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
|
||||
import 'package:mohem_flutter_app/ui/screens/profile/widgets/profile_info.dart';
|
||||
|
||||
class ProfilePanle extends StatelessWidget {
|
||||
ProfilePanle(this.memberInformationList);
|
||||
late MemberInformationListModel memberInformationList;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
double _width = MediaQuery.of(context).size.width;
|
||||
return Container(
|
||||
margin: EdgeInsets.fromLTRB(5, 0, 5, 10),
|
||||
height: MediaQuery.of(context).size.height,
|
||||
child: Stack(children: [
|
||||
Container(
|
||||
width: _width,
|
||||
margin: EdgeInsets.only(top: 50),
|
||||
padding: EdgeInsets.only(top: 50),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)),
|
||||
boxShadow: [BoxShadow(color: Colors.white60, blurRadius: 10, spreadRadius: 10)]),
|
||||
child: ProfileInFo(memberInformationList),
|
||||
),
|
||||
Container(height: 100, alignment: Alignment.center, child: ProfileImage())
|
||||
]));
|
||||
}
|
||||
|
||||
Widget ProfileImage() => CircleAvatar(
|
||||
radius: 70,
|
||||
backgroundImage: MemoryImage(Utils.getPostBytes(memberInformationList.eMPLOYEEIMAGE)),
|
||||
backgroundColor: Colors.black,
|
||||
);
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menu_entries.dart';
|
||||
import 'package:mohem_flutter_app/models/dashboard/menus.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
|
||||
class SubMenuScreen extends StatelessWidget {
|
||||
late Menus menu;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
menu = ModalRoute.of(context)!.settings.arguments as Menus;
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(context, title: menu.menuEntry.prompt.toString()),
|
||||
// AppBar(
|
||||
// context,
|
||||
// title: menu.menuEntry.prompt.toString(),
|
||||
// ),
|
||||
|
||||
body: Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
child: Column(
|
||||
children: menu.menuEntiesList.map((i) => rowItem(i, context)).toList(),
|
||||
)),
|
||||
);
|
||||
}
|
||||
|
||||
Widget rowItem(obj, context) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
AppRoutes.addEitScreen,
|
||||
arguments: obj,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.all(12),
|
||||
margin: EdgeInsets.only(top: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0xff000000).withOpacity(.1),
|
||||
blurRadius: 26,
|
||||
offset: const Offset(0, -3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [Text(obj.prompt.toString()), Icon(Icons.arrow_right)],
|
||||
).paddingAll(6),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue