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