business trip fixed

master
Sultan khan 1 year ago
parent 790103bdc9
commit aca223c700

@ -90,7 +90,7 @@ class AppState {
String get getHuaweiPushToken => _huaweiPushToken;
final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 33, versionID: 4.6, mobileType: Platform.isAndroid ? "android" : "ios");
final PostParamsModel _postParamsInitConfig = PostParamsModel(channel: 31, versionID: 4.6, mobileType: Platform.isAndroid ? "android" : "ios");
void setPostParamsInitConfig() {
isAuthenticated = false;

@ -401,4 +401,14 @@ class Utils {
}
return false;
}
static bool isDate(String input, String format) {
try {
DateTime d = DateFormat(format).parseStrict(input);
//print(d);
return true;
} catch (e) {
//print(e);
return false;
}
}
}

@ -339,12 +339,27 @@ class _DynamicInputScreenState extends State<DynamicInputScreen> {
}
idColName = val;
// if (getEitDffStructureList![j].fORMATTYPE == "X") {
// idColName = Utils.formatDateDefault(idColName!);
// // commenting to test
// // DateTime date = DateFormat('yyyy-MM-dd').parse(idColName!);
// // idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
//
// }
if (getEitDffStructureList![j].fORMATTYPE == "X") {
idColName = Utils.formatDateDefault(idColName!);
// commenting to test
// DateTime date = DateFormat('yyyy-MM-dd').parse(idColName!);
// idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
idColName = Utils.reverseFormatDate(idColName!);
if(Utils.isDate(Utils.reverseFormatDate(Utils.formatDateNew(idColName!)), "yyyy-MM-dd")){
idColName = Utils.formatStandardDate(Utils.formatStandardDate(Utils.formatDateNew(idColName!)));
// idColName = DateFormat('yyyy/MM/dd HH:mm:ss').format(date);
}else if(Utils.isDate(Utils.reverseFormatDate(idColName!), "dd-MM-yyyy")){
// // change date format on 31/05/2023
DateTime date = DateFormat('dd-MM-yyyy').parse(idColName!);
idColName = DateFormat('yyyy-MM-dd HH:mm:ss').format(date);
}
}
}

Loading…
Cancel
Save