|
|
|
@ -166,11 +166,15 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
List<GetEITDFFStructureList> filteredList =
|
|
|
|
List<GetEITDFFStructureList> filteredList =
|
|
|
|
getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
|
|
|
|
getEitDffStructureList!.where((outerElement) => parentDvRequired.any((element) => outerElement.sEGMENTNAME == element.name && element.isRequired == "REQUIRED")).toList();
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> values = filteredList
|
|
|
|
List<Map<String, dynamic>> values = filteredList.map((e) {
|
|
|
|
.map((e) => GetSetValuesRequestModel(
|
|
|
|
if (e.fORMATTYPE == "X" && e.isDefaultTypeIsCDPS && e.eSERVICESDV!.pIDCOLUMNNAME!=null) {
|
|
|
|
|
|
|
|
e.eSERVICESDV!.pVALUECOLUMNNAME = Utils.reverseFormatDate(e.eSERVICESDV!.pIDCOLUMNNAME ?? "");
|
|
|
|
|
|
|
|
e.eSERVICESDV!.pIDCOLUMNNAME = Utils.reverseFormatDate(e.eSERVICESDV!.pIDCOLUMNNAME ?? "");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return GetSetValuesRequestModel(
|
|
|
|
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
|
|
|
|
sEGMENTNAME: e.sEGMENTNAME, vALUECOLUMNNAME: e.eSERVICESDV!.pVALUECOLUMNNAME, dESCRIPTION: "", iDCOLUMNNAME: e.eSERVICESDV!.pIDCOLUMNNAME, fLEXVALUESETNAME: e.fLEXVALUESETNAME)
|
|
|
|
.toJson())
|
|
|
|
.toJson();
|
|
|
|
.toList();
|
|
|
|
}).toList();
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
|
|
|
|
List<Map<String, dynamic>> getSetList = getDefaultValuesIonicLogic(parent);
|
|
|
|
if (getSetList.isNotEmpty) {
|
|
|
|
if (getSetList.isNotEmpty) {
|
|
|
|
@ -193,8 +197,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (values.isNotEmpty) {
|
|
|
|
} else if (values.isNotEmpty) {
|
|
|
|
ESERVICESDV defaultValue =
|
|
|
|
ESERVICESDV defaultValue = await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values, empID: dynamicParams!.selectedEmp);
|
|
|
|
await MyAttendanceApiClient().getDefaultValue(segmentId, structureList.dESCFLEXCONTEXTCODE!, structureList.dESCFLEXNAME!, values, empID: dynamicParams!.selectedEmp);
|
|
|
|
|
|
|
|
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
|
|
|
|
int index = getEitDffStructureList!.indexWhere((element) => element.sEGMENTNAME == segmentId);
|
|
|
|
getEitDffStructureList![index].eSERVICESDV = defaultValue;
|
|
|
|
getEitDffStructureList![index].eSERVICESDV = defaultValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -222,7 +225,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> getDefaultValuesIonicLogic(GetEITDFFStructureList structureElement) {
|
|
|
|
List<Map<String, dynamic>> getDefaultValuesIonicLogic(GetEITDFFStructureList structureElement) {
|
|
|
|
try {
|
|
|
|
// try {
|
|
|
|
List<PARENTSEGMENTSVSSplitedVS> parentValue = structureElement.pARENTSEGMENTSVSSplitedVS ?? [];
|
|
|
|
List<PARENTSEGMENTSVSSplitedVS> parentValue = structureElement.pARENTSEGMENTSVSSplitedVS ?? [];
|
|
|
|
List<PARENTSEGMENTSDVSplited> parentsList = structureElement.pARENTSEGMENTSDVSplited ?? [];
|
|
|
|
List<PARENTSEGMENTSDVSplited> parentsList = structureElement.pARENTSEGMENTSDVSplited ?? [];
|
|
|
|
|
|
|
|
|
|
|
|
@ -290,11 +293,11 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
// setState(() {});
|
|
|
|
// setState(() {});
|
|
|
|
} catch (ex) {
|
|
|
|
// } catch (ex) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
// Utils.hideLoading(context);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
// Utils.handleException(ex, context, null);
|
|
|
|
return [];
|
|
|
|
// return [];
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> getDependenciesParams(parentsList) {
|
|
|
|
List<Map<String, dynamic>> getDependenciesParams(parentsList) {
|
|
|
|
@ -340,7 +343,10 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
idColName = val;
|
|
|
|
idColName = val;
|
|
|
|
|
|
|
|
|
|
|
|
if (getEitDffStructureList![j].fORMATTYPE == "X") {
|
|
|
|
if (getEitDffStructureList![j].fORMATTYPE == "X") {
|
|
|
|
|
|
|
|
if(!getEitDffStructureList![j].isDefaultTypeIsCDPS) {
|
|
|
|
idColName = Utils.formatDateDefault(idColName!);
|
|
|
|
idColName = Utils.formatDateDefault(idColName!);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// commenting to test
|
|
|
|
// commenting to test
|
|
|
|
// DateTime date = DateFormat('yyyy-MM-dd').parse(idColName!);
|
|
|
|
// DateTime date = DateFormat('yyyy-MM-dd').parse(idColName!);
|
|
|
|
// idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
|
|
|
|
// idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
|
|
|
|
@ -517,11 +523,15 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
displayText,
|
|
|
|
displayText,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
isEnable: false,
|
|
|
|
isEnable: false,
|
|
|
|
|
|
|
|
isReadOnly: model.rEADONLY == "Y",
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
if (getEitDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
|
|
|
|
// Utils.reverseFormatStandardDate(Utils.formatDate(dateString))
|
|
|
|
|
|
|
|
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// selectedDate = DateFormat("yyyy/MM/dd", "en_US").parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
selectedDate = DateTime.parse(getEitDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -572,6 +582,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
displayText,
|
|
|
|
displayText,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
|
|
|
|
isReadOnly: model.rEADONLY == "Y",
|
|
|
|
isEnable: false,
|
|
|
|
isEnable: false,
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
@ -717,6 +728,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
displayText,
|
|
|
|
displayText,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
suffixIconData: Icons.calendar_today,
|
|
|
|
isEnable: false,
|
|
|
|
isEnable: false,
|
|
|
|
|
|
|
|
isReadOnly: model.rEADONLY == "Y",
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
@ -729,6 +741,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
DateTime date = await _selectDate(context);
|
|
|
|
DateTime date = await _selectDate(context);
|
|
|
|
String dateString = date.toString().split(' ').first;
|
|
|
|
String dateString = date.toString().split(' ').first;
|
|
|
|
getEitDffStructureList![index].fieldAnswer = date.toString();
|
|
|
|
getEitDffStructureList![index].fieldAnswer = date.toString();
|
|
|
|
|
|
|
|
|
|
|
|
ESERVICESDV eservicesdv = ESERVICESDV(
|
|
|
|
ESERVICESDV eservicesdv = ESERVICESDV(
|
|
|
|
pIDCOLUMNNAME: dateString,
|
|
|
|
pIDCOLUMNNAME: dateString,
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
@ -750,6 +763,7 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
|
|
|
|
model.eSERVICESDV?.pIDCOLUMNNAME ?? (getEitDffStructureList![index].fieldAnswer ?? ""),
|
|
|
|
model.eSERVICESDV?.pIDCOLUMNNAME ?? (getEitDffStructureList![index].fieldAnswer ?? ""),
|
|
|
|
suffixIconData: Icons.access_time_filled_rounded,
|
|
|
|
suffixIconData: Icons.access_time_filled_rounded,
|
|
|
|
isEnable: false,
|
|
|
|
isEnable: false,
|
|
|
|
|
|
|
|
isReadOnly: model.rEADONLY == "Y",
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
toolTip: model.rEQCOLTIP,
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
if ((getEitDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
|