|
|
|
@ -245,7 +245,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21),
|
|
|
|
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21),
|
|
|
|
PageView(
|
|
|
|
PageView(
|
|
|
|
controller: controller,
|
|
|
|
controller: controller,
|
|
|
|
onPageChanged: (pageIndex) {
|
|
|
|
onPageChanged: (int pageIndex) {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -586,7 +586,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
|
|
|
|
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder: (cxt) => ConfirmDialog(
|
|
|
|
builder: (BuildContext cxt) => ConfirmDialog(
|
|
|
|
message: LocaleKeys.wantToReject.tr(),
|
|
|
|
message: LocaleKeys.wantToReject.tr(),
|
|
|
|
okTitle: LocaleKeys.reject.tr(),
|
|
|
|
okTitle: LocaleKeys.reject.tr(),
|
|
|
|
onTap: () async {
|
|
|
|
onTap: () async {
|
|
|
|
@ -668,25 +668,28 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
void performAction(String actionMode, {String? title}) {
|
|
|
|
void performAction(String actionMode, {String? title}) {
|
|
|
|
showDialog(
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
context: context,
|
|
|
|
builder: (cxt) => AcceptRejectInputDialog(
|
|
|
|
builder: (BuildContext cxt) => AcceptRejectInputDialog(
|
|
|
|
message: title != null ? null : LocaleKeys.requestedItems.tr(),
|
|
|
|
message: title != null ? null : LocaleKeys.requestedItems.tr(),
|
|
|
|
title: title,
|
|
|
|
title: title,
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
actionMode: actionMode,
|
|
|
|
actionMode: actionMode,
|
|
|
|
onTap: (note) {
|
|
|
|
onTap: (String note) {
|
|
|
|
|
|
|
|
List<Map<String, dynamic>> responseAttribute = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var element in getNotificationRespondAttributes!) {
|
|
|
|
|
|
|
|
responseAttribute.add({
|
|
|
|
|
|
|
|
"ATTRIBUTE_NAME": element!.attributeName,
|
|
|
|
|
|
|
|
if (element!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (element!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
|
"P_APPROVER_INDEX": null,
|
|
|
|
"P_APPROVER_INDEX": null,
|
|
|
|
"P_COMMENTS": note,
|
|
|
|
"P_COMMENTS": note,
|
|
|
|
"P_FORWARD_TO_USER_NAME": "",
|
|
|
|
"P_FORWARD_TO_USER_NAME": "",
|
|
|
|
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID,
|
|
|
|
"P_NOTIFICATION_ID": workListData!.nOTIFICATIONID,
|
|
|
|
"RespondAttributeList": [
|
|
|
|
"RespondAttributeList":responseAttribute,
|
|
|
|
if (notificationNoteInput != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
"ATTRIBUTE_NAME": notificationNoteInput!.attributeName,
|
|
|
|
|
|
|
|
if (notificationNoteInput!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (notificationNoteInput!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC") {
|
|
|
|
if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC") {
|
|
|
|
performNotificationAction(payload);
|
|
|
|
performNotificationAction(payload);
|
|
|
|
@ -999,15 +1002,15 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
notificationButtonsList.clear();
|
|
|
|
notificationButtonsList.clear();
|
|
|
|
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
|
|
|
|
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
|
|
|
|
if (notificationButtonsList.isNotEmpty) {
|
|
|
|
if (notificationButtonsList.isNotEmpty) {
|
|
|
|
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
isApproveAvailable = notificationButtonsList.any((element) {
|
|
|
|
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") {
|
|
|
|
if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") {
|
|
|
|
approveAction = element.bUTTONACTION!;
|
|
|
|
approveAction = element.bUTTONACTION!;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
isRejectAvailable = notificationButtonsList.any((element) {
|
|
|
|
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") {
|
|
|
|
if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") {
|
|
|
|
rejectAction = element.bUTTONACTION!;
|
|
|
|
rejectAction = element.bUTTONACTION!;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|