Merge branch 'master' into development_sikander

merge-requests/31/head
Sikander Saleem 3 years ago
commit 0a73cced51

@ -421,6 +421,8 @@
"fieldIsEmpty": "'{data}' الحقل فارغ. الرجاء التحديد", "fieldIsEmpty": "'{data}' الحقل فارغ. الرجاء التحديد",
"pleaseEnterComments": "الرجاء إدخال التعليقات", "pleaseEnterComments": "الرجاء إدخال التعليقات",
"skip": "يتخطى", "skip": "يتخطى",
"typeCurrentPasswordBelow": "اكتب كلمة المرور الحاليه",
"currentPassword": "كلمة المرور الحاليه",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -420,7 +420,9 @@
"updateMember": "Are You Sure You Want to Update this Member?", "updateMember": "Are You Sure You Want to Update this Member?",
"fieldIsEmpty": "'{data}' Field is empty. Please select", "fieldIsEmpty": "'{data}' Field is empty. Please select",
"pleaseEnterComments": "Please enter comments", "pleaseEnterComments": "Please enter comments",
"skip": "skip", "skip": "Skip",
"typeCurrentPasswordBelow": "Type Your Current password below",
"currentPassword": "Current password",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -1,4 +1,5 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert';
import 'package:mohem_flutter_app/api/api_client.dart'; import 'package:mohem_flutter_app/api/api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart'; import 'package:mohem_flutter_app/app_state/app_state.dart';
@ -377,7 +378,7 @@ class ProfileApiClient {
}, url, postParams); }, url, postParams);
} }
Future<SubmitContactTransactionList?> submitContactTransactionAddAndUpdate(String actionType, int relationId, List<Map<String, dynamic>> list) async { Future<SubmitContactTransactionList?> submitContactTransactionAddAndUpdate(String actionType, relationId, List<Map<String, dynamic>> list) async {
String url = "${ApiConsts.erpRest}SUBMIT_CONTACT_TRANSACTION"; String url = "${ApiConsts.erpRest}SUBMIT_CONTACT_TRANSACTION";
Map<String, dynamic> postParams = { Map<String, dynamic> postParams = {
"P_MENU_TYPE": "E", "P_MENU_TYPE": "E",
@ -386,8 +387,14 @@ class ProfileApiClient {
"P_ACTION": actionType, "P_ACTION": actionType,
"P_CONTACT_RELATIONSHIP_ID": relationId, "P_CONTACT_RELATIONSHIP_ID": relationId,
}; };
postParams["EITTransactionTBL"] = list;
postParams.addAll(AppState().postParamsJson); postParams.addAll(AppState().postParamsJson);
print("postParam:${json.encode(postParams)}");
postParams["EITTransactionTBL"] = list;
list.forEach((element) {
print(json.encode(element));
});
return await ApiClient().postJsonForObject((json) { return await ApiClient().postJsonForObject((json) {
GenericResponseModel? responseData = GenericResponseModel.fromJson(json); GenericResponseModel? responseData = GenericResponseModel.fromJson(json);
return responseData.submitContactTransactionList; return responseData.submitContactTransactionList;

@ -52,6 +52,10 @@ class Utils {
} }
} }
static Future delay(int millis) async {
return await Future.delayed(Duration(milliseconds: millis));
}
static void showLoading(BuildContext context) { static void showLoading(BuildContext context) {
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
_isLoadingVisible = true; _isLoadingVisible = true;
@ -65,10 +69,6 @@ class Utils {
}); });
} }
static Future delay(int millis) async {
return await Future.delayed(Duration(milliseconds: millis));
}
static void hideLoading(BuildContext context) { static void hideLoading(BuildContext context) {
if (_isLoadingVisible) { if (_isLoadingVisible) {
_isLoadingVisible = false; _isLoadingVisible = false;

@ -435,6 +435,10 @@ class CodegenLoader extends AssetLoader{
"adult": "بالغ", "adult": "بالغ",
"updateMember": "هل انت متأكد تريد تحديث بيانات هذا العضو؟", "updateMember": "هل انت متأكد تريد تحديث بيانات هذا العضو؟",
"fieldIsEmpty": "'{data}' الحقل فارغ. الرجاء التحديد", "fieldIsEmpty": "'{data}' الحقل فارغ. الرجاء التحديد",
"pleaseEnterComments": "الرجاء إدخال التعليقات",
"skip": "يتخطى",
"typeCurrentPasswordBelow": "اكتب كلمة المرور الحاليه",
"currentPassword": "كلمة المرور الحاليه",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",
@ -904,6 +908,10 @@ static const Map<String,dynamic> en_US = {
"adult": "Adult", "adult": "Adult",
"updateMember": "Are You Sure You Want to Update this Member?", "updateMember": "Are You Sure You Want to Update this Member?",
"fieldIsEmpty": "'{data}' Field is empty. Please select", "fieldIsEmpty": "'{data}' Field is empty. Please select",
"pleaseEnterComments": "Please enter comments",
"skip": "Skip",
"typeCurrentPasswordBelow": "Type Your Current password below",
"currentPassword": "Current password",
"profile": { "profile": {
"reset_password": { "reset_password": {
"label": "Reset Password", "label": "Reset Password",

@ -422,6 +422,8 @@ abstract class LocaleKeys {
static const fieldIsEmpty = 'fieldIsEmpty'; static const fieldIsEmpty = 'fieldIsEmpty';
static const pleaseEnterComments = 'pleaseEnterComments'; static const pleaseEnterComments = 'pleaseEnterComments';
static const skip = 'skip'; static const skip = 'skip';
static const typeCurrentPasswordBelow = 'typeCurrentPasswordBelow';
static const currentPassword = 'currentPassword';
static const profile_reset_password_label = 'profile.reset_password.label'; static const profile_reset_password_label = 'profile.reset_password.label';
static const profile_reset_password_username = 'profile.reset_password.username'; static const profile_reset_password_username = 'profile.reset_password.username';
static const profile_reset_password_password = 'profile.reset_password.password'; static const profile_reset_password_password = 'profile.reset_password.password';

@ -790,30 +790,13 @@ class GenericResponseModel {
getCEIDFFStructureList = json['GetCEIDFFStructureList']; getCEIDFFStructureList = json['GetCEIDFFStructureList'];
getCEITransactionList = json['GetCEITransactionList']; getCEITransactionList = json['GetCEITransactionList'];
getCcpTransactionsList = json['GetCcpTransactionsList']; getCcpTransactionsList = json['GetCcpTransactionsList'];
if (json['GetContactDetailsList'] != null) {
getContactDetailsList = <GetContactDetailsList>[];
json['GetContactDetailsList'].forEach((v) {
getContactDetailsList!.add(GetContactDetailsList.fromJson(v));
});
}
if (json['GetContactColsStructureList'] != null) {
getContactColsStructureList = <GetContactColsStructureList>[];
json['GetContactColsStructureList'].forEach((v) {
getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v));
});
}
getContactColsStructureList = json['GetContactColsStructureList'];
getContactDetailsList = json['GetContactDetailsList'];
getContactDffStructureList = json['GetContactDffStructureList'];
getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]); getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
if (json['GetContactColsStructureList'] != null) { if (json['GetContactColsStructureList'] != null) {
getContactColsStructureList = []; getContactColsStructureList = [];
json['GetContactColsStructureList'].forEach((v) { json['GetContactColsStructureList'].forEach((v) {
getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v)); getContactColsStructureList!.add(GetContactColsStructureList.fromJson(v));
}); });
} }
if (json['GetContactDetailsList'] != null) { if (json['GetContactDetailsList'] != null) {
getContactDetailsList = []; getContactDetailsList = [];
json['GetContactDetailsList'].forEach((v) { json['GetContactDetailsList'].forEach((v) {
@ -826,8 +809,6 @@ class GenericResponseModel {
getContactDffStructureList!.add(GetContactDffStructureList.fromJson(v)); getContactDffStructureList!.add(GetContactDffStructureList.fromJson(v));
}); });
} }
// getContactDetailsList = json['GetContactDetailsList'];
// getContactDffStructureList = json['GetContactDffStructureList'];
getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]); getContactNotificationBodyList = json["GetContactNotificationBodyList"] == null ? null : GetContactNotificationBodyList.fromJson(json["GetContactNotificationBodyList"]);
if (json['GetCountriesList'] != null) { if (json['GetCountriesList'] != null) {

@ -116,6 +116,8 @@ class _MonthlyAttendanceScreenState extends State<MonthlyAttendanceScreen> {
initialDate: formattedDate, initialDate: formattedDate,
firstDate: DateTime(searchYear - 2), firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(), lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
).then((selectedDate) { ).then((selectedDate) {
if (selectedDate != null) { if (selectedDate != null) {
searchMonth = getMonth(selectedDate.month); searchMonth = getMonth(selectedDate.month);

@ -164,6 +164,7 @@ class _AppDrawerState extends State<AppDrawer> {
AppState().setPostParamsModel(obj!); AppState().setPostParamsModel(obj!);
Navigator.pop(context); Navigator.pop(context);
widget.onLanguageChange(); widget.onLanguageChange();
setState(() {});
} }
void performLogout() async { void performLogout() async {

@ -64,11 +64,11 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
ListView( ListView(
padding: const EdgeInsets.all(21), padding: const EdgeInsets.all(21),
children: [ children: [
"Change Password".toText24(isBold: true), LocaleKeys.changePassword.tr().toText24(isBold: true),
"Type Your Current password below".toText16(), LocaleKeys.typeCurrentPasswordBelow.tr().toText16(),
16.height, 16.height,
InputWidget( InputWidget(
"Current password", LocaleKeys.currentPassword.tr(),
"**********", "**********",
oldPassword, oldPassword,
onChange: (value) { onChange: (value) {

@ -70,6 +70,7 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
extendBody: true, extendBody: true,
backgroundColor: MyColors.lightGreyEFColor, backgroundColor: MyColors.lightGreyEFColor,
body: Stack(children: [ body: Stack(children: [
getEmployeeSubordinates!.eMPLOYEEIMAGE != null ?
Container( Container(
height: 200, height: 200,
margin: EdgeInsets.only(top: 30), margin: EdgeInsets.only(top: 30),
@ -80,6 +81,8 @@ class _EmployeeDetailsState extends State<EmployeeDetails> {
decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)), decoration: new BoxDecoration(color: Colors.white.withOpacity(0.0)),
), ),
), ),
) : Container(
decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)),
), ),
SingleChildScrollView( SingleChildScrollView(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,

@ -169,6 +169,8 @@ class _ViewAttendanceState extends State<ViewAttendance> {
initialDate: formattedDate, initialDate: formattedDate,
firstDate: DateTime(searchYear - 2), firstDate: DateTime(searchYear - 2),
lastDate: DateTime.now(), lastDate: DateTime.now(),
confirmText: Text(LocaleKeys.confirm.tr()),
cancelText: Text(LocaleKeys.cancel.tr()),
).then( ).then(
(selectedDate) { (selectedDate) {
if (selectedDate != null) { if (selectedDate != null) {

@ -38,7 +38,8 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
SubmitContactTransactionList? submitContactTransactionList; SubmitContactTransactionList? submitContactTransactionList;
dynamic args; dynamic args;
String? date = "MM/DD/YYYY"; String? date = "MM/DD/YYYY";
var dateTime = DateTime.now().timeZoneOffset;
var dateTime1 = DateTime.now().timeZoneName;
GetApprovesList? getApprovesList; GetApprovesList? getApprovesList;
@ -48,7 +49,7 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
} }
void callAddAndUpdateFamilyMember() async { void callAddAndUpdateFamilyMember() async {
try { try {
Utils.showLoading(context); Utils.showLoading(context);
getBasicDetDffStructureList = await ProfileApiClient().getBasicDetDffStructure(); getBasicDetDffStructureList = await ProfileApiClient().getBasicDetDffStructure();
getContactColsStructureList = await ProfileApiClient().getContactColsStructureList(args['actionType']); getContactColsStructureList = await ProfileApiClient().getContactColsStructureList(args['actionType']);
@ -89,11 +90,13 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
if (args == null) { if (args == null) {
args = ModalRoute.of(context)!.settings.arguments; args = ModalRoute.of(context)!.settings.arguments;
callAddAndUpdateFamilyMember();} callAddAndUpdateFamilyMember();
}
return Scaffold( return Scaffold(
appBar: AppBarWidget( appBar: AppBarWidget(
context, context,
title: LocaleKeys.profile_familyDetails.tr(),), title: LocaleKeys.profile_familyDetails.tr(),
),
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: args['flag'] == 1 body: args['flag'] == 1
? Column( ? Column(
@ -125,49 +128,45 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
separatorBuilder: (cxt, index) => 0.height, separatorBuilder: (cxt, index) => 0.height,
itemCount: getContactDffStructureList!.length), itemCount: getContactDffStructureList!.length),
]).expanded, ]).expanded,
DefaultButton( DefaultButton(LocaleKeys.next.tr(), () async {
LocaleKeys.next.tr(), () async { submitUpdateForm();
submitUpdateForm(); }).insideContainer,
}
).insideContainer,
], ],
) )
: args['flag'] == 2 : args['flag'] == 2
? Column( ? Column(
children: [ children: [
// getContactDetailsList!.isEmpty // getContactDetailsList!.isEmpty
ListView(physics: const BouncingScrollPhysics(), padding: const EdgeInsets.all(21), children: [ ListView(physics: const BouncingScrollPhysics(), padding: const EdgeInsets.all(21), children: [
ListView.separated( ListView.separated(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext cxt, int parentIndex) { itemBuilder: (BuildContext cxt, int parentIndex) {
return parseDynamicFormatTypeCols(getContactColsStructureList![parentIndex], parentIndex); return parseDynamicFormatTypeCols(getContactColsStructureList![parentIndex], parentIndex);
}, },
separatorBuilder: (cxt, index) => 0.height, separatorBuilder: (cxt, index) => 0.height,
itemCount: getContactColsStructureList!.length), itemCount: getContactColsStructureList!.length),
12.height, 12.height,
ListView.separated( ListView.separated(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext cxt, int parentIndex) { itemBuilder: (BuildContext cxt, int parentIndex) {
return parseDynamicFormatTypeBasicDetDff(getBasicDetDffStructureList![parentIndex], parentIndex); return parseDynamicFormatTypeBasicDetDff(getBasicDetDffStructureList![parentIndex], parentIndex);
}, },
separatorBuilder: (cxt, index) => 0.height, separatorBuilder: (cxt, index) => 0.height,
itemCount: getBasicDetDffStructureList!.length), itemCount: getBasicDetDffStructureList!.length),
ListView.separated( ListView.separated(
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true, shrinkWrap: true,
itemBuilder: (BuildContext cxt, int parentIndex) { itemBuilder: (BuildContext cxt, int parentIndex) {
return parseDynamicFormatTypeContactDff(getContactDffStructureList![parentIndex], parentIndex); return parseDynamicFormatTypeContactDff(getContactDffStructureList![parentIndex], parentIndex);
}, },
separatorBuilder: (cxt, index) => 0.height, separatorBuilder: (cxt, index) => 0.height,
itemCount: getContactDffStructureList!.length), itemCount: getContactDffStructureList!.length),
]).expanded, ]).expanded,
DefaultButton( DefaultButton(LocaleKeys.next.tr(), () async {
LocaleKeys.next.tr(), () async {
submitUpdateForm(); submitUpdateForm();
} }).insideContainer,
).insideContainer,
], ],
) )
: Container(), : Container(),
@ -199,13 +198,23 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
}); });
} else { } else {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model!.sEGMENTPROMPT ?? "") + (model!.rEQUIREDFLAG == "Y" ? "*" : "") , (model!.sEGMENTPROMPT ?? "") + (model!.rEQUIREDFLAG == "Y" ? "*" : ""),
( model!.getContactDetailsList!.sEGMENTVALUEDSP ?? "")+ (model!.aPPLICATIONCOLUMNNAME == "NATIONAL_IDENTIFIER" ? "1-1111-1111-1" : ""), (model!.getContactDetailsList!.sEGMENTVALUEDSP ?? ""),
//isInputTypeNum: true,
onChange: (text) { onChange: (text) {
model!.getContactDetailsList!.sEGMENTVALUEDSP = text; model!.getContactDetailsList!.sEGMENTVALUEDSP = text;
}, },
).paddingOnly(bottom: 12); ).paddingOnly(bottom: 12);
} }
} else if (model.dATATYPE == "NUMBER") {
return DynamicTextFieldWidget(
(model!.sEGMENTPROMPT ?? "") + (model!.rEQUIREDFLAG == "Y" ? "*" : ""),
(model!.getContactDetailsList!.sEGMENTVALUEDSP ?? ""),
isInputTypeNum: true,
onChange: (text) {
model!.getContactDetailsList!.sEGMENTVALUEDSP = text;
},
).paddingOnly(bottom: 12);
} else if (model.dATATYPE == "DATE") { } else if (model.dATATYPE == "DATE") {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
@ -214,8 +223,13 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = DateFormat('yyyy/MM/dd').format(dateValue); //date = DateFormat('yyyy/MM/dd').format(dateValue);
date = "2022-10-23T09:17:38.653+03:00";
// date = (DateFormat('yyyy-MM-dd').format(dateValue)+"T"+ dateTime.toString() + dateTime1.toString());
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
print(dateTime);
print(dateTime1);
print(date);
setState(() {}); setState(() {});
}, },
).paddingOnly(bottom: 12); ).paddingOnly(bottom: 12);
@ -251,11 +265,21 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.getContactDetailsList!.sEGMENTVALUEDSP ?? "", model.getContactDetailsList!.sEGMENTVALUEDSP ?? "",
// isInputTypeNum: true,
onChange: (text) { onChange: (text) {
model.getContactDetailsList!.sEGMENTVALUEDSP = text; model.getContactDetailsList!.sEGMENTVALUEDSP = text;
}, },
).paddingOnly(bottom: 12); ).paddingOnly(bottom: 12);
} }
} else if (model.fORMATTYPE == "N") {
return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.getContactDetailsList!.sEGMENTVALUEDSP ?? "",
isInputTypeNum: true,
onChange: (text) {
model.getContactDetailsList!.sEGMENTVALUEDSP = text;
},
).paddingOnly(bottom: 12);
} else if (model.fORMATTYPE == "X") { } else if (model.fORMATTYPE == "X") {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
@ -264,7 +288,9 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = DateFormat('yyyy/MM/dd').format(dateValue); date = "2022-10-23T09:17:38.653+03:00";
// date = (DateFormat('yyyy-MM-dd').format(dateValue) +"T"+ dateTime.toString() + dateTime1.toString());
// date = DateFormat('yyyy/MM/dd').format(dateValue);
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
setState(() {}); setState(() {});
}, },
@ -300,11 +326,21 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.getContactDetailsList!.sEGMENTVALUEDSP ?? "", model.getContactDetailsList!.sEGMENTVALUEDSP ?? "",
// isInputTypeNum: true,
onChange: (text) { onChange: (text) {
model.getContactDetailsList!.sEGMENTVALUEDSP = text; model.getContactDetailsList!.sEGMENTVALUEDSP = text;
}, },
).paddingOnly(bottom: 12); ).paddingOnly(bottom: 12);
} }
} else if (model.fORMATTYPE == "N") {
return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
model.getContactDetailsList!.sEGMENTVALUEDSP ?? "",
isInputTypeNum: true,
onChange: (text) {
model.getContactDetailsList!.sEGMENTVALUEDSP = text;
},
).paddingOnly(bottom: 12);
} else if (model.fORMATTYPE == "X") { } else if (model.fORMATTYPE == "X") {
return DynamicTextFieldWidget( return DynamicTextFieldWidget(
(model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""), (model.sEGMENTPROMPT ?? "") + (model.rEQUIREDFLAG == "Y" ? "*" : ""),
@ -313,7 +349,9 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
isEnable: false, isEnable: false,
onTap: () async { onTap: () async {
DateTime dateValue = await _selectDate(context); DateTime dateValue = await _selectDate(context);
date = DateFormat('yyyy/MM/dd').format(dateValue); date = "2022-10-23T09:17:38.653+03:00";
// date = (DateFormat('yyyy-MM-dd').format(dateValue)+"T"+ dateTime.toString() + dateTime1.toString());
// date = DateFormat('yyyy/MM/dd').format(dateValue);
model!.getContactDetailsList!.sEGMENTVALUEDSP = date; model!.getContactDetailsList!.sEGMENTVALUEDSP = date;
setState(() {}); setState(() {});
}, },
@ -345,8 +383,7 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
), ),
); );
} else { } else {
DateTime? picked = DateTime? picked = await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
await showDatePicker(context: context, initialDate: selectedDate, initialEntryMode: DatePickerEntryMode.calendarOnly, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
if (picked != null && picked != selectedDate) { if (picked != null && picked != selectedDate) {
time = picked; time = picked;
} }
@ -354,80 +391,81 @@ class _AddUpdateFamilyMemberState extends State<AddUpdateFamilyMember> {
return time; return time;
} }
void submitUpdateForm() async { void submitUpdateForm() async {
try { // try {
List<Map<String, dynamic>> values1 = getBasicDetDffStructureList!.map((e) { List<Map<String, dynamic>> values1 = getBasicDetDffStructureList!.map((e) {
String? dateVal = ''; String? dateVal = '';
String? vatcherVal = ''; String? vatcherVal = '';
int? numberVal; int? numberVal;
if (e!.fORMATTYPE == 'N') { if (e!.fORMATTYPE == 'N') {
dateVal = null; dateVal = null;
vatcherVal = null; vatcherVal = null;
numberVal = e!.getContactDetailsList!.nUMBERVALUE; numberVal = int.parse(e.getContactDetailsList!.sEGMENTVALUEDSP??"0");
} else if (e.fORMATTYPE == 'X') { } else if (e.fORMATTYPE == 'X') {
dateVal = e!.getContactDetailsList!.dATEVALUE.toString(); dateVal = e!.getContactDetailsList!.sEGMENTVALUEDSP.toString();
vatcherVal = null; vatcherVal = null;
numberVal = null; numberVal = null;
} else { } else {
dateVal = null; dateVal = null;
vatcherVal = e!.getContactDetailsList!.vARCHAR2VALUE.toString(); vatcherVal = e!.getContactDetailsList!.sEGMENTVALUEDSP;
numberVal = null; numberVal = null;
} }
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson(); return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson();
}).toList(); }).toList();
List<Map<String, dynamic>> values2 = getContactDffStructureList!.map((e) { List<Map<String, dynamic>> values2 = getContactDffStructureList!.map((e) {
String? dateVal = ''; String? dateVal = '';
String? vatcherVal = ''; String? vatcherVal = '';
int? numberVal; int? numberVal;
if (e!.fORMATTYPE == 'N') { if (e!.fORMATTYPE == 'N') {
dateVal = null; dateVal = null;
vatcherVal = null; vatcherVal = null;
numberVal = e!.getContactDetailsList!.nUMBERVALUE; numberVal = int.parse(e.getContactDetailsList!.sEGMENTVALUEDSP??"0");
} else if (e.fORMATTYPE == 'X') { } else if (e.fORMATTYPE == 'X') {
dateVal = e!.getContactDetailsList!.dATEVALUE.toString(); dateVal = e!.getContactDetailsList!.sEGMENTVALUEDSP;
vatcherVal = null; vatcherVal = null;
numberVal = null; numberVal = null;
} else { } else {
dateVal = null; dateVal = null;
numberVal = null; numberVal = null;
vatcherVal = e!.getContactDetailsList!.vARCHAR2VALUE.toString(); vatcherVal = e!.getContactDetailsList!.sEGMENTVALUEDSP;
} }
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson(); return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson();
}).toList(); }).toList();
List<Map<String, dynamic>> values3 = getContactColsStructureList!.map((e) { List<Map<String, dynamic>> values3 = getContactColsStructureList!.map((e) {
// String tempVar = e!.getContactDetailsList!.sEGMENTVALUEDSP ?? ""; // String tempVar = e!.getContactDetailsList!.sEGMENTVALUEDSP ?? "";
String? dateVal = ''; String? dateVal = '';
String? vatcherVal = ''; String? vatcherVal = '';
int? numberVal; int? numberVal;
if (e!.dATATYPE == 'VARCHAR2') {
dateVal = null; print("e.dATATYPE:${e?.dATATYPE}");
numberVal = null; if (e!.dATATYPE == 'VARCHAR2') {
vatcherVal = e!.getContactDetailsList!.vARCHAR2VALUE.toString(); dateVal = null;
} else if (e.dATATYPE == 'DATE') { numberVal = null;
dateVal = e!.getContactDetailsList!.dATEVALUE.toString(); vatcherVal = e.getContactDetailsList?.sEGMENTVALUEDSP ?? "";
vatcherVal = null; } else if (e.dATATYPE == 'DATE') {
numberVal = null; dateVal = e.getContactDetailsList!.sEGMENTVALUEDSP.toString();
} else if (e.dATATYPE == 'NUMBER') { print("dateVal:${dateVal ?? ""}");
dateVal = null; vatcherVal = null;
vatcherVal = null; numberVal = null;
numberVal = e!.getContactDetailsList!.nUMBERVALUE; } else if (e.dATATYPE == 'NUMBER') {
} else {} dateVal = null;
return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal.toString()).toJson(); vatcherVal = null;
}).toList(); numberVal = int.parse(e.getContactDetailsList!.sEGMENTVALUEDSP??"0");
List<Map<String, dynamic>> valuesFinal = [...values1, ...values2, ...values3]; } else {}
Utils.showLoading(context); return ValidateEitTransactionModel(dATEVALUE: dateVal, nAME: e.aPPLICATIONCOLUMNNAME, nUMBERVALUE: numberVal, tRANSACTIONNUMBER: 1, vARCHAR2VALUE: vatcherVal).toJson();
submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], args['relationID'] ?? 0, valuesFinal); }).toList();
var transactionId = submitContactTransactionList!.pTRANSACTIONID; List<Map<String, dynamic>> valuesFinal = [...values1, ...values2, ...values3];
var itemKey = submitContactTransactionList!.pITEMKEY; Utils.showLoading(context);
Utils.hideLoading(context); submitContactTransactionList = await ProfileApiClient().submitContactTransactionAddAndUpdate(args['actionType'], args['relationID'] ?? null, valuesFinal);
Navigator.pushNamed(context, AppRoutes.requestSubmitScreen, var transactionId = submitContactTransactionList!.pTRANSACTIONID;
arguments: RequestSubmitScreenParams(LocaleKeys.profile_familyDetails.tr(), transactionId!.toInt(), itemKey.toString(), 'family_member')); var itemKey = submitContactTransactionList!.pITEMKEY;
setState(() {}); Utils.hideLoading(context);
} catch (ex) { Navigator.pushNamed(context, AppRoutes.requestSubmitScreen,
Utils.hideLoading(context); arguments: RequestSubmitScreenParams(LocaleKeys.profile_familyDetails.tr(), transactionId!.toInt(), itemKey.toString(), 'family_member'));
Utils.handleException(ex, context, null); setState(() {});
} // } catch (ex) {
// Utils.hideLoading(context);
// Utils.handleException(ex, context, null);
// }
} }
} }

@ -78,31 +78,33 @@ class _BasicDetailsState extends State<BasicDetails> {
backgroundColor: MyColors.backgroundColor, backgroundColor: MyColors.backgroundColor,
body: Column( body: Column(
children: [ children: [
ListView( Expanded(
padding: const EdgeInsets.all(21), child: ListView(
children: [ padding: const EdgeInsets.all(21),
getEmployeeBasicDetailsList == null children: [
? const SizedBox().expanded getEmployeeBasicDetailsList == null
: (getEmployeeBasicDetailsList!.isEmpty ? const SizedBox()
? Utils.getNoDataWidget(context).expanded : (getEmployeeBasicDetailsList!.isEmpty
: Column( ? Utils.getNoDataWidget(context)
crossAxisAlignment: CrossAxisAlignment.start, : Column(
children: getEmployeeBasicDetailsList! crossAxisAlignment: CrossAxisAlignment.start,
.map((e) => Column( children: getEmployeeBasicDetailsList!
children: [ .map((e) => Column(
e.dISPLAYFLAG == "Y" children: [
? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ e.dISPLAYFLAG == "Y"
"${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor), ? Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
"${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor), "${e.sEGMENTPROMPT}".toText13(color: MyColors.lightGrayColor),
12.height "${e.sEGMENTVALUEDSP}".toText16(isBold: true, color: MyColors.blackColor),
]) 12.height
: Container(), ])
], : Container(),
)) ],
.toList()) ))
.objectContainerView()) .toList())
], .objectContainerView())
).expanded, ],
),
),
DefaultButton( DefaultButton(
LocaleKeys.update.tr(), LocaleKeys.update.tr(),
menuEntries.updateButton == 'Y' menuEntries.updateButton == 'Y'

@ -1,6 +1,7 @@
import 'package:easy_localization/src/public_ext.dart'; import 'package:easy_localization/src/public_ext.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mohem_flutter_app/api/profile_api_client.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/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
@ -98,11 +99,16 @@ class _ContactDetailsState extends State<ContactDetails> {
separatorBuilder: (cxt, index) => 12.height, separatorBuilder: (cxt, index) => 12.height,
itemCount: getEmployeePhonesList.length), itemCount: getEmployeePhonesList.length),
if (menuEntriesPhone.updateButton == 'Y') if (menuEntriesPhone.updateButton == 'Y')
Positioned( AppState().isArabic(context)? Positioned(
top: 1, top: 1,
right: 1, left: 1,
child: const Icon(Icons.edit_location_alt_outlined, size: 20).onPress(updatePhone), child: const Icon(Icons.edit_location_alt_outlined, size: 20).onPress(updatePhone),
), )
:Positioned(
top: 1,
right: 1,
child: const Icon(Icons.edit_location_alt_outlined, size: 20).onPress(updatePhone),
),
], ],
).objectContainerView(), ).objectContainerView(),
12.height, 12.height,

@ -27,7 +27,7 @@ class FamilyMembers extends StatefulWidget {
class _FamilyMembersState extends State<FamilyMembers> { class _FamilyMembersState extends State<FamilyMembers> {
List<GetEmployeeContactsList> getEmployeeContactsList = []; List<GetEmployeeContactsList> getEmployeeContactsList = [];
int? relationId; dynamic? relationId;
int? flag; int? flag;
GetMenuEntriesList menuEntries = GetMenuEntriesList(); GetMenuEntriesList menuEntries = GetMenuEntriesList();
@ -97,8 +97,8 @@ class _FamilyMembersState extends State<FamilyMembers> {
style:TextStyle(color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600), style:TextStyle(color: menuEntries.updateButton == 'Y' ? MyColors.grey67Color : MyColors.lightGreyColor, fontSize: 12, letterSpacing: -0.36, fontWeight: FontWeight.w600),
recognizer: TapGestureRecognizer() recognizer: TapGestureRecognizer()
..onTap = () async { ..onTap = () async {
relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID;
menuEntries.updateButton == 'Y'? showUpdateAlertDialog(context, relationId!.toInt(), 2, "UPDATE"):null; menuEntries.updateButton == 'Y'? showUpdateAlertDialog(context, relationId, 2, "UPDATE"):null;
} }
) )
], ],
@ -118,8 +118,8 @@ class _FamilyMembersState extends State<FamilyMembers> {
), ),
], ],
), ),
).onPress(() { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID!.toInt(); ).onPress(() { relationId = getEmployeeContactsList[index]!.cONTACTRELATIONSHIPID;
showRemoveAlertDialog(context, relationId!.toInt());}), showRemoveAlertDialog(context, relationId);}),
], ],
), ),
], ],
@ -136,7 +136,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
)); ));
} }
void showUpdateAlertDialog(BuildContext context, int relationId, int flag, String actionType) { void showUpdateAlertDialog(BuildContext context, relationId, int flag, String actionType) {
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: Text( child: Text(
LocaleKeys.cancel.tr(), LocaleKeys.cancel.tr(),
@ -175,7 +175,7 @@ class _FamilyMembersState extends State<FamilyMembers> {
); );
} }
void showRemoveAlertDialog(BuildContext context, int relationId) { void showRemoveAlertDialog(BuildContext context, relationId) {
Widget cancelButton = TextButton( Widget cancelButton = TextButton(
child: Text( child: Text(
LocaleKeys.cancel.tr(), LocaleKeys.cancel.tr(),

@ -44,23 +44,26 @@ class _ProfileScreenState extends State<ProfileScreen> {
backgroundColor: const Color(0xffefefef), backgroundColor: const Color(0xffefefef),
body: Stack( body: Stack(
children: [ children: [
Container( memberInformationList!.eMPLOYEEIMAGE != null
height: 300, ? Container(
margin: const EdgeInsets.only(top: 50), height: 300,
decoration: BoxDecoration( margin: const EdgeInsets.only(top: 50),
decoration: BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: MemoryImage( image: MemoryImage(
Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!), Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!),
), ),
fit: BoxFit.cover), fit: BoxFit.cover),
), ),
child: BackdropFilter( child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0), filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
child: Container( child: Container(
color: Colors.white.withOpacity(0.0), color: Colors.white.withOpacity(0.0),
), ),
), ),
), ): Container(
decoration: BoxDecoration(color: Colors.white.withOpacity(0.0)),
),
SingleChildScrollView( SingleChildScrollView(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
child: Column( child: Column(

@ -4,6 +4,7 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/api/items_for_sale/items_for_sale_api_client.dart'; import 'package:mohem_flutter_app/api/items_for_sale/items_for_sale_api_client.dart';
import 'package:mohem_flutter_app/app_state/app_state.dart';
import 'package:mohem_flutter_app/classes/colors.dart'; import 'package:mohem_flutter_app/classes/colors.dart';
import 'package:mohem_flutter_app/classes/utils.dart'; import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/config/routes.dart'; import 'package:mohem_flutter_app/config/routes.dart';
@ -98,7 +99,9 @@ class _ItemsForSaleFragmentState extends State<ItemsForSaleFragment> {
currentCategoryID == getSaleCategoriesList[index].categoryID ? const Icon(Icons.check_circle_rounded, color: MyColors.greenColor, size: 16.0) : Container(), currentCategoryID == getSaleCategoriesList[index].categoryID ? const Icon(Icons.check_circle_rounded, color: MyColors.greenColor, size: 16.0) : Container(),
], ],
).expanded, ).expanded,
getSaleCategoriesList[index].title!.toText10() AppState().isArabic(context)
?getSaleCategoriesList[index].titleAr!.toText10()
:getSaleCategoriesList[index].title!.toText10()
], ],
).paddingOnly(left: 10, right: 10, bottom: 10, top: 12).expanded.objectContainerView(disablePadding: true), ).paddingOnly(left: 10, right: 10, bottom: 10, top: 12).expanded.objectContainerView(disablePadding: true),
), ),

@ -183,7 +183,6 @@ class _OffersAndDiscountsHomeState extends State<OffersAndDiscountsHome> {
), ),
), ),
), ),
10.height,
AppState().isArabic(context) AppState().isArabic(context)
? getOffersList.titleAR!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1) ? getOffersList.titleAR!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1)
: getOffersList.title!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1), : getOffersList.title!.toText16(isBold: true, color: const Color(0xff2B353E), maxlines: 1),
@ -194,7 +193,7 @@ class _OffersAndDiscountsHomeState extends State<OffersAndDiscountsHome> {
// // } // // }
// ), // ),
getOffersList.description!.toText12(maxLine: 2, color: const Color(0xff535353)), getOffersList.description!.toText12(maxLine: 2, color: const Color(0xff535353)),
16.height, // 8.height,
getOffersList.discount!.toText14(isBold: true, maxlines: 1), getOffersList.discount!.toText14(isBold: true, maxlines: 1),
10.height, 10.height,
Row( Row(
@ -212,7 +211,11 @@ class _OffersAndDiscountsHomeState extends State<OffersAndDiscountsHome> {
if (enteredKeyword.isEmpty) { if (enteredKeyword.isEmpty) {
results = getOffersList; results = getOffersList;
} else { } else {
results = getOffersList.where((offer) => offer.title!.toLowerCase().contains(enteredKeyword.toLowerCase())).toList(); if(AppState().isArabic(context)) {
results = getOffersList.where((offer) => offer.titleAR!.toLowerCase().contains(enteredKeyword.toLowerCase())).toList();
} else {
results = getOffersList.where((offer) => offer.title!.toLowerCase().contains(enteredKeyword.toLowerCase())).toList();
}
} }
setState(() { setState(() {
_foundOffersList = results; _foundOffersList = results;

@ -465,10 +465,10 @@ class _DelegateSheetState extends State<DelegateSheet> {
child: Row( child: Row(
children: [ children: [
CircularAvatar( CircularAvatar(
url: actionHistory.employeeImage ?? "", url: actionHistory.employeeImage,
height: 30, height: 30,
width: 30, width: 30,
isImageBase64: true, isImageBase64: (actionHistory.employeeImage != null || actionHistory.employeeImage!.isNotEmpty) ? true : false,
), ),
16.width, 16.width,
Expanded( Expanded(
@ -510,10 +510,10 @@ class _DelegateSheetState extends State<DelegateSheet> {
child: Row( child: Row(
children: [ children: [
CircularAvatar( CircularAvatar(
url: actionHistory.employeeImage ?? "", url: actionHistory.employeeImage,
height: 30, height: 30,
width: 30, width: 30,
isImageBase64: true, isImageBase64: actionHistory.employeeImage != null ? true : false,
), ),
16.width, 16.width,
Expanded( Expanded(

@ -142,10 +142,17 @@ class SelectedItemSheet extends StatelessWidget {
padding: EdgeInsets.only(top: 16, bottom: 16, left: 21, right: 21), padding: EdgeInsets.only(top: 16, bottom: 16, left: 21, right: 21),
child: Row( child: Row(
children: [ children: [
CircularAvatar( actionHistoryList != null
height: 30, ? CircularAvatar(
width: 30, height: 30,
), width: 30,
url: actionHistoryList!.eMPLOYEEIMAGE,
isImageBase64: true,
)
: CircularAvatar(
height: 30,
width: 30,
),
16.width, 16.width,
Expanded( Expanded(
child: (name ?? "").toText12(), child: (name ?? "").toText12(),

@ -98,6 +98,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") { if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
getUserInformation(); getUserInformation();
} }
notificationGetRespondAttributes();
getNotificationButtons();
getAttachments();
getActionHistory();
if (workListData!.iTEMTYPE == "HRSSA") { if (workListData!.iTEMTYPE == "HRSSA") {
if (workListData!.rEQUESTTYPE == "EIT") { if (workListData!.rEQUESTTYPE == "EIT") {
getEitNotificationBody(); getEitNotificationBody();
@ -130,8 +136,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getPRNotification(); getPRNotification();
} }
notificationGetRespondAttributes();
// List dataToFetch = await Future.wait([ // List dataToFetch = await Future.wait([
// //
// WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!), // WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!),
@ -142,10 +146,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
// actionHistoryList = dataToFetch[1]; // actionHistoryList = dataToFetch[1];
// getAttachmentList = dataToFetch[2]; // getAttachmentList = dataToFetch[2];
getNotificationButtons();
getActionHistory();
getAttachments();
// if (notificationButtonsList.isNotEmpty) { // if (notificationButtonsList.isNotEmpty) {
// isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE"); // isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
// isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED"); // isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
@ -354,7 +354,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" || notificationButtonsList[i].bUTTONACTION! == "APPROVED" || notificationButtonsList[i].bUTTONACTION! == "CLOSE") { if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" || notificationButtonsList[i].bUTTONACTION! == "APPROVED" || notificationButtonsList[i].bUTTONACTION! == "CLOSE") {
continue; continue;
} }
fabs.add(myFab(notificationButtonsList[i].bUTTONLABEL!, notificationButtonsList[i].bUTTONICON ?? "", isIconAsset: false) fabs.add(myFab(notificationButtonsList[i].bUTTONLABEL!, notificationButtonsList[i].bUTTONACTION == "DELEGATE" ? "assets/images/delegate.svg" : notificationButtonsList[i].bUTTONICON ?? "",
isIconAsset: notificationButtonsList[i].bUTTONACTION == "DELEGATE" ? true : false,)
.paddingOnly(bottom: 12) .paddingOnly(bottom: 12)
.onPress(() => handleFabAction(notificationButtonsList[i]))); .onPress(() => handleFabAction(notificationButtonsList[i])));
} }
@ -486,7 +487,6 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
builder: (cxt) => AcceptRejectInputDialog( builder: (cxt) => AcceptRejectInputDialog(
message: LocaleKeys.requestedItems.tr(), message: LocaleKeys.requestedItems.tr(),
notificationGetRespond: notificationNoteInput, notificationGetRespond: notificationNoteInput,
textEditingController: textEditingController,
onTap: (note) { onTap: (note) {
Map<String, dynamic> payload = { Map<String, dynamic> payload = {
"P_ACTION_MODE": actionMode, "P_ACTION_MODE": actionMode,
@ -772,17 +772,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
void getActionHistory() async { void getActionHistory() async {
try { try {
if (apiCallCount == 0) Utils.showLoading(context); // if (apiCallCount == 0) Utils.showLoading(context);
apiCallCount++; // apiCallCount++;
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!); actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
apiCallCount--; // apiCallCount--;
if (apiCallCount == 0) { // if (apiCallCount == 0) {
Utils.hideLoading(context); // Utils.hideLoading(context);
setState(() {}); setState(() {});
} // }
} catch (ex) { } catch (ex) {
apiCallCount--; // apiCallCount--;
Utils.hideLoading(context); // Utils.hideLoading(context);
Utils.handleException(ex, context, null); Utils.handleException(ex, context, null);
} }
} }

@ -440,7 +440,7 @@ class InfoFragment extends StatelessWidget {
Widget getPRNotificationBodyListWidget(GetPrNotificationBodyList getPrNotificationBodyList) { Widget getPRNotificationBodyListWidget(GetPrNotificationBodyList getPrNotificationBodyList) {
return Column( return Column(
children: [ children: [
getPrNotificationBodyList.pINFORMATION.toString().toText14(color: MyColors.textMixColor).objectContainerView(), getPrNotificationBodyList.pINFORMATION != null ? getPrNotificationBodyList.pINFORMATION.toString().toText14(color: MyColors.textMixColor).objectContainerView() : Container(),
12.height, 12.height,
Column( Column(
children: [ children: [
@ -456,21 +456,23 @@ class InfoFragment extends StatelessWidget {
ItemDetailViewCol(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""), ItemDetailViewCol(LocaleKeys.id.tr(), workListData!.nOTIFICATIONID?.toString() ?? ""),
ItemDetailViewCol(LocaleKeys.responder.tr(), workListData!.rESPONDER ?? ""), ItemDetailViewCol(LocaleKeys.responder.tr(), workListData!.rESPONDER ?? ""),
), ),
ItemDetailGrid( Column(
ItemDetailViewCol(getPrNotificationBodyList.pRHeader![2].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![2].hDRATTRIBUTEVALUE ?? ""), children: getPRHeaderValues(),
ItemDetailViewCol(getPrNotificationBodyList.pRHeader![0].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![0].hDRATTRIBUTEVALUE ?? ""), )
),
ItemDetailGrid(
ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""),
Container(),
isItLast: true,
),
], ],
).objectContainerView(), ).objectContainerView(),
], ],
); );
} }
List<Widget> getPRHeaderValues() {
List<Widget> pRHeaders = [];
getPrNotificationBodyList!.pRHeader!.forEach((element) {
pRHeaders.add(ItemDetailGrid(ItemDetailViewCol(element.hDRATTRIBUTENAME!, element.hDRATTRIBUTEVALUE!), Container()));
});
return pRHeaders;
}
Widget getContactNotificationBodyListWidget(GetContactNotificationBodyList data) { Widget getContactNotificationBodyListWidget(GetContactNotificationBodyList data) {
bool isOdd = false; bool isOdd = false;
try { try {

@ -115,37 +115,42 @@ class RequestFragment extends StatelessWidget {
} }
Widget prLinesDataView() { Widget prLinesDataView() {
return Column( return ExpandableNotifier(
children: [ child: ListView.separated(
prLinesList[0].dESCRIPTION.toString().toText14(color: MyColors.textMixColor).objectContainerView(), shrinkWrap: true,
12.height, physics: const NeverScrollableScrollPhysics(),
Column( itemBuilder: (cxt, index) => ExpandablePanel(
children: [ header: prLinesList[index].dESCRIPTION.toString().toText14(color: MyColors.textMixColor),
ItemDetailGrid( collapsed: Column(
ItemDetailViewCol("Cost Center", prLinesList[0].cOSTCENTER ?? ""), children: [
ItemDetailViewCol("Code", prLinesList[0].iTEMCODE ?? ""), ItemDetailGrid(
), ItemDetailViewCol("Cost Center", prLinesList[index].cOSTCENTER ?? ""),
ItemDetailGrid( ItemDetailViewCol("Code", prLinesList[index].iTEMCODE ?? ""),
ItemDetailViewCol("Unit", prLinesList[0].uOM ?? ""), ),
ItemDetailViewCol("Price (SAR)", prLinesList[0].uNITPRICE.toString() ?? ""), ItemDetailGrid(
), ItemDetailViewCol("Unit", prLinesList[index].uOM ?? ""),
ItemDetailGrid( ItemDetailViewCol("Price (SAR)", prLinesList[index].uNITPRICE.toString() ?? ""),
ItemDetailViewCol("Amount (SAR)", prLinesList[0].lINEAMOUNT.toString() ?? ""), ),
ItemDetailViewCol("Quantity", prLinesList[0].qUANTITY.toString() ?? ""), ItemDetailGrid(
), ItemDetailViewCol("Amount (SAR)", prLinesList[index].lINEAMOUNT.toString() ?? ""),
ItemDetailGrid( ItemDetailViewCol("Quantity", prLinesList[index].qUANTITY.toString() ?? ""),
ItemDetailViewCol("AMU (Last 3 months)", prLinesList[0].iTEMAMU.toString() ?? ""), ),
Container(), ItemDetailGrid(
isItLast: true, ItemDetailViewCol("AMU (Last 3 months)", prLinesList[index].iTEMAMU.toString() ?? ""),
), Container(),
// ItemDetailGrid( isItLast: true,
// ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""), ),
// Container(), // ItemDetailGrid(
// isItLast: true, // ItemDetailViewCol(getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTENAME!, getPrNotificationBodyList.pRHeader![1].hDRATTRIBUTEVALUE ?? ""),
// ), // Container(),
], // isItLast: true,
).objectContainerView(), // ),
], ],
),
expanded: const SizedBox(),
).objectContainerView(),
separatorBuilder: (cxt, index) => 12.height,
itemCount: prLinesList.length),
); );
} }

@ -15,9 +15,9 @@ class AcceptRejectInputDialog extends StatelessWidget {
final String? okTitle; final String? okTitle;
final NotificationGetRespondAttributesList? notificationGetRespond; final NotificationGetRespondAttributesList? notificationGetRespond;
final Function(String) onTap; final Function(String) onTap;
final TextEditingController textEditingController; // final TextEditingController textEditingController;
AcceptRejectInputDialog({Key? key, this.title, @required this.message, this.okTitle, required this.onTap, this.notificationGetRespond, required this.textEditingController}) : super(key: key); AcceptRejectInputDialog({Key? key, this.title, @required this.message, this.okTitle, required this.onTap, this.notificationGetRespond}) : super(key: key);
String note = ""; String note = "";

Loading…
Cancel
Save