Merge branch 'Fatima' of https://gitlab.com/mirza.shafique/mohem_flutter_app into development_sultan
commit
57f789ca6d
@ -1,4 +1,50 @@
|
|||||||
|
|
||||||
|
|
||||||
class GetEmployeeAddressList {
|
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,151 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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/ui/profile/profile.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: 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: [
|
||||||
|
"Full Name".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${fullName}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Marital Status".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${maritalStatus}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Date of Birth".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${birthDate}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Civil Identity Number".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("Update", () async {
|
||||||
|
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||||
|
Profile();
|
||||||
|
}).insideContainer,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,188 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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_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/profile.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();
|
||||||
|
getEmployeeAddress();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void getEmployeePhones() async {
|
||||||
|
try {
|
||||||
|
Utils.showLoading(context);
|
||||||
|
getEmployeePhonesList = await ProfileApiClient().getEmployeePhones();
|
||||||
|
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: 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),
|
||||||
|
),
|
||||||
|
"Contact 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: 20),
|
||||||
|
height: 150,
|
||||||
|
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: [
|
||||||
|
"${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: 28, left: 26, right: 26,),
|
||||||
|
padding: EdgeInsets.only(left: 14, right: 14,top: 13, 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: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
"${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("Update", () async {
|
||||||
|
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||||
|
Profile();
|
||||||
|
}).insideContainer,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,263 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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/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/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: 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),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: "Family Members".toText24(isBold: true, color: MyColors.blackColor),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
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: "Update",
|
||||||
|
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: "Remove",
|
||||||
|
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("Update", () 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,124 @@
|
|||||||
|
|
||||||
|
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/member_information_list_model.dart';
|
||||||
|
import 'package:mohem_flutter_app/ui/profile/profile.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;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
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),
|
||||||
|
),
|
||||||
|
"Personal Information".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: 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: [
|
||||||
|
"Category".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${_memberInformationList!.eMPLOYMENTCATEGORYMEANING}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Address".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${_memberInformationList!.lOCATIONNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Phone Number".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${_memberInformationList!.eMPLOYEEMOBILENUMBER}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Business Group".toText13(color: MyColors.lightGrayColor),
|
||||||
|
"${_memberInformationList!.bUSINESSGROUPNAME}".toText16(isBold: true, color: MyColors.blackColor),
|
||||||
|
SizedBox(
|
||||||
|
height: 20,),
|
||||||
|
"Payroll".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("Update", () async {
|
||||||
|
// context.setLocale(const Locale("en", "US")); // to change Loacle
|
||||||
|
Profile();
|
||||||
|
}).insideContainer,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue