ITG Timesheet & Approval level fixes

master
haroon amjad 6 months ago
parent e91b33805e
commit 0e7bac4557

@ -88,8 +88,9 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
String month = rawDate.split('/').first;
String year = rawDate.split('/').last;
String formattedString = "${getMonthName(month)}-$year";
if (requestDetails!.requestType == "Timesheet Request") {
dynamic data = await WorkListApiClient().getITGTimeCardDetails("Timesheet Request", formattedString, AppState().memberInformationList?.eMPLOYEENUMBER ?? "");
dynamic data = await WorkListApiClient().getITGTimeCardDetails("Timesheet Request", formattedString, itgRequest!.fieldGoups![0].fields![1].value ?? "");
if (data != null) {
var decodedDta = jsonDecode(data);
// var decodedDta = jsonDecode(
@ -97,6 +98,8 @@ class _ItgDetailScreenState extends State<ItgDetailScreen> {
// );
timeCardSummaryData = ItgTimeCardSummaryData.fromJson(decodedDta);
}
} else {
timeCardSummaryData = ItgTimeCardSummaryData();
}
Utils.hideLoading(context);
setState(() {

@ -152,16 +152,16 @@ class ApprovalLevelfragment extends StatelessWidget {
// DateTime dateTimeFrom = DateUtil.convertSimpleStringDateToDate(wFHistory[index].date!);
// Duration duration = DateTime.now().difference(dateTimeFrom);
// return "Action duration: " + DateUtil.formatDuration(duration);
}
else if (wFHistory[index].employeeID == AppState().memberInformationList?.eMPLOYEENUMBER) {
// if (wFHistory[index + 1].date!.isEmpty) {
// return "";
// }
} else if (wFHistory[index].employeeID == AppState().memberInformationList?.eMPLOYEENUMBER) {
if (wFHistory[index + 1].date!.isEmpty || wFHistory[index + 1].date! == "") {
return "";
} else {
DateTime dateTimeFrom = DateUtil.convertSimpleStringDateToDate(wFHistory[index + 1].date!, isITG: true);
Duration duration = DateTime.now().difference(dateTimeFrom);
return "Action duration: " + DateUtil.formatDuration(duration);
}
} else {
if (wFHistory[index].date!.isEmpty || wFHistory[index].action!.toLowerCase() == "NO ACTION") {
if (wFHistory[index].date!.isEmpty || wFHistory[index].action!.toLowerCase() == "NO ACTION" || wFHistory[index + 1].date! == "") {
return "";
} else {
DateTime dateTimeTo = DateUtil.convertSimpleStringDateToDate(wFHistory[index].date!);

File diff suppressed because one or more lines are too long

@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#version: 3.3.01+300040
version: 3.5.9+300069
version: 3.6.1+300071
environment:
sdk: ">=2.16.0 <3.0.0"

Loading…
Cancel
Save