|
|
|
|
@ -326,7 +326,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
displayText = displayText.replaceAll(" 00:00:00", "");
|
|
|
|
|
}
|
|
|
|
|
if (displayText.contains("/")) {
|
|
|
|
|
displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText));
|
|
|
|
|
displayText = DateFormat('yyyy-MM-dd', "en_US").format(DateFormat("yyyy/MM/dd", "en_US").parse(DateUtil.replaceArabicNumber(displayText)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return DynamicTextFieldWidget(
|
|
|
|
|
@ -336,11 +336,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
isEnable: false,
|
|
|
|
|
onTap: () async {
|
|
|
|
|
if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
|
if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
|
selectedDate = DateFormat("yyyy/MM/dd").parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
|
|
|
|
|
} else {
|
|
|
|
|
selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
|
}
|
|
|
|
|
selectedDate = DateUtil.parseFlexibleDateTime(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME) ?? selectedDate;
|
|
|
|
|
}
|
|
|
|
|
DateTime date = await _selectDate(context);
|
|
|
|
|
String dateString = date.toString().split(' ').first;
|
|
|
|
|
@ -353,14 +349,14 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
|
pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
|
|
|
|
|
pVALUECOLUMNNAME:
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
|
|
|
|
|
} else {
|
|
|
|
|
eservicesdv = ESERVICESDV(
|
|
|
|
|
pIDCOLUMNNAME: dateString,
|
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
|
pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
|
|
|
|
|
pVALUECOLUMNNAME:
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
|
|
|
|
|
}
|
|
|
|
|
getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
|
|
|
|
|
setState(() {});
|
|
|
|
|
@ -374,7 +370,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
).paddingOnly(bottom: 12);
|
|
|
|
|
} else if (model.fORMATTYPE == "Y") {
|
|
|
|
|
String displayText = model.eSERVICESDV?.pIDCOLUMNNAME ?? "";
|
|
|
|
|
if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
|
if (getabsenceDffStructureList[index].isDefaultTypeIsCDPS) {
|
|
|
|
|
displayText = Utils.reverseFormatDate(displayText);
|
|
|
|
|
// if (displayText.contains(" 00:00:00")) {
|
|
|
|
|
// displayText = displayText.replaceAll(" 00:00:00", "");
|
|
|
|
|
@ -390,19 +386,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
isEnable: false,
|
|
|
|
|
onTap: () async {
|
|
|
|
|
if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
|
if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
|
String tempDate = getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!;
|
|
|
|
|
if (tempDate.contains("00:00:00")) {
|
|
|
|
|
tempDate = tempDate.replaceAll("00:00:00", '').trim();
|
|
|
|
|
}
|
|
|
|
|
if (tempDate.contains("/")) {
|
|
|
|
|
selectedDate = DateFormat("yyyy/MM/dd").parse(tempDate);
|
|
|
|
|
} else {
|
|
|
|
|
selectedDate = DateFormat("yyyy-MM-dd").parse(tempDate);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
|
}
|
|
|
|
|
selectedDate = DateUtil.parseFlexibleDateTime(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME) ?? selectedDate;
|
|
|
|
|
}
|
|
|
|
|
DateTime date = await _selectDate(context);
|
|
|
|
|
String dateString = date.toString().split(' ').first;
|
|
|
|
|
@ -414,14 +398,14 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
|
pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
|
|
|
|
|
pVALUECOLUMNNAME:
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
|
|
|
|
|
} else {
|
|
|
|
|
eservicesdv = ESERVICESDV(
|
|
|
|
|
pIDCOLUMNNAME: dateString,
|
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
|
pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
|
|
|
|
|
pVALUECOLUMNNAME:
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
|
|
|
|
|
@ -512,7 +496,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
displayText = displayText.replaceAll(" 00:00:00", "");
|
|
|
|
|
}
|
|
|
|
|
if (!displayText.contains("-")) {
|
|
|
|
|
displayText = DateFormat('yyyy-MM-dd').format(DateFormat("yyyy/MM/dd").parse(displayText));
|
|
|
|
|
displayText = DateFormat('yyyy-MM-dd', "en_US").format(DateFormat("yyyy/MM/dd", "en_US").parse(DateUtil.replaceArabicNumber(displayText)));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return DynamicTextFieldWidget(
|
|
|
|
|
@ -522,11 +506,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
isEnable: false,
|
|
|
|
|
onTap: () async {
|
|
|
|
|
if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
|
if (getabsenceDffStructureList![index].isDefaultTypeIsCDPS) {
|
|
|
|
|
selectedDate = DateFormat("yyyy/MM/dd").parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.replaceAll('/"', '').replaceAll(" 00:00:00", ""));
|
|
|
|
|
} else {
|
|
|
|
|
selectedDate = DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
|
}
|
|
|
|
|
selectedDate = DateUtil.parseFlexibleDateTime(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME) ?? selectedDate;
|
|
|
|
|
}
|
|
|
|
|
DateTime date = await _selectDate(context);
|
|
|
|
|
String dateString = date.toString().split(' ').first;
|
|
|
|
|
@ -536,7 +516,7 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
pRETURNMSG: "null",
|
|
|
|
|
pRETURNSTATUS: getabsenceDffStructureList![index].dEFAULTVALUE,
|
|
|
|
|
pVALUECOLUMNNAME:
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s').format(date));
|
|
|
|
|
getabsenceDffStructureList![index].isDefaultTypeIsCDPS ? Utils.reverseFormatStandardDate(Utils.formatDate(dateString)) : DateFormat('yyyy-MM-ddThh:mm:ss.s', "en_US").format(date));
|
|
|
|
|
getabsenceDffStructureList![index].eSERVICESDV = eservicesdv;
|
|
|
|
|
setState(() {});
|
|
|
|
|
// if (model.cHILDSEGMENTSVSSplited?.isNotEmpty ?? false) {
|
|
|
|
|
@ -557,14 +537,14 @@ class _AddLeaveBalanceScreenState extends State<AddLeaveBalanceScreen> {
|
|
|
|
|
if (getabsenceDffStructureList[index].mOBILEENABLED != "Y") return;
|
|
|
|
|
|
|
|
|
|
if ((getabsenceDffStructureList![index].eSERVICESDV?.pVALUECOLUMNNAME != null)) {
|
|
|
|
|
var timeString = getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!.split(":");
|
|
|
|
|
selectedDate = DateTime(0, 0, 0, int.parse(timeString[0]), int.parse(timeString[1]));
|
|
|
|
|
var timeString = DateUtil.replaceArabicNumber(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME).split(":");
|
|
|
|
|
selectedDate = DateTime(0, 0, 0, int.tryParse(timeString[0]) ?? 0, timeString.length > 1 ? (int.tryParse(timeString[1]) ?? 0) : 0);
|
|
|
|
|
|
|
|
|
|
//DateTime.parse(getabsenceDffStructureList![index].eSERVICESDV!.pVALUECOLUMNNAME!);
|
|
|
|
|
}
|
|
|
|
|
TimeOfDay _time = await _selectTime(context);
|
|
|
|
|
DateTime tempTime = DateTime(0, 1, 1, _time.hour, _time.minute);
|
|
|
|
|
String time = DateFormat('HH:mm').format(tempTime).trim();
|
|
|
|
|
String time = DateFormat('HH:mm', "en_US").format(tempTime).trim();
|
|
|
|
|
|
|
|
|
|
// DateTime date1 = DateTime(date.year, date.month, date.day);
|
|
|
|
|
// getabsenceDffStructureList![index].fieldAnswer = date.toString();
|
|
|
|
|
|