|
|
@ -29,6 +29,7 @@ import 'package:mohem_flutter_app/models/worklist/hr/get_address_notification_bo
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_basic_det_ntf_body_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_contact_notification_body_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/hr/get_phones_notification_body_list_model.dart';
|
|
|
|
|
|
|
|
import 'package:mohem_flutter_app/models/worklist/payment_details_list.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/worklist_response_model.dart';
|
|
|
|
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
|
|
|
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
|
|
|
import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart';
|
|
|
|
import 'package:mohem_flutter_app/ui/work_list/sheets/delegate_sheet.dart';
|
|
|
@ -46,7 +47,6 @@ import 'package:mohem_flutter_app/widgets/dialogs/accept_reject_input_dialog.dar
|
|
|
|
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart';
|
|
|
|
import 'package:mohem_flutter_app/models/termination/termination_notification_body.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WorkListDetailScreen extends StatefulWidget {
|
|
|
|
class WorkListDetailScreen extends StatefulWidget {
|
|
|
|
WorkListDetailScreen({Key? key}) : super(key: key);
|
|
|
|
WorkListDetailScreen({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
@ -70,27 +70,30 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
|
|
|
|
List<GetStampMsNotificationBodyList> getStampMsNotifications = [];
|
|
|
|
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
|
|
|
|
List<GetStampNsNotificationBodyList> getStampNsNotifications = [];
|
|
|
|
List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
|
|
|
|
List<GetMoNotificationBodyList> getMoNotificationBodyList = [];
|
|
|
|
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes = [];
|
|
|
|
List<NotificationGetRespondAttributesList> getNotificationRespondAttributes =
|
|
|
|
|
|
|
|
[];
|
|
|
|
NotificationGetRespondAttributesList? notificationNoteInput;
|
|
|
|
NotificationGetRespondAttributesList? notificationNoteInput;
|
|
|
|
|
|
|
|
|
|
|
|
List<GetRFCEmployeeList> getRFCEmployeeList = [];
|
|
|
|
List<GetRFCEmployeeList> getRFCEmployeeList = [];
|
|
|
|
|
|
|
|
|
|
|
|
//HR Details Screen Requests
|
|
|
|
//HR Details Screen Requests
|
|
|
|
List<GetEitCollectionNotificationBodyList>? getEitCollectionNotificationBodyList = [];
|
|
|
|
List<GetEitCollectionNotificationBodyList>?
|
|
|
|
|
|
|
|
getEitCollectionNotificationBodyList = [];
|
|
|
|
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = [];
|
|
|
|
List<GetPhonesNotificationBodyList>? getPhonesNotificationBodyList = [];
|
|
|
|
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = [];
|
|
|
|
List<GetBasicDetNtfBodyList>? getBasicDetNtfBodyList = [];
|
|
|
|
List<GetAbsenceCollectionNotificationBodyList>? getAbsenceCollectionNotificationBodyList = [];
|
|
|
|
List<GetAbsenceCollectionNotificationBodyList>?
|
|
|
|
|
|
|
|
getAbsenceCollectionNotificationBodyList = [];
|
|
|
|
GetContactNotificationBodyList? getContactNotificationBodyList;
|
|
|
|
GetContactNotificationBodyList? getContactNotificationBodyList;
|
|
|
|
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
|
|
|
|
List<GetAddressNotificationBodyList>? getAddressNotificationBodyList = [];
|
|
|
|
List<TerminationNotificationBody>? getTerminationNotificationBodyList = [];
|
|
|
|
List<TerminationNotificationBody>? getTerminationNotificationBodyList = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GenericResponseModel? getBasicNTFBody;
|
|
|
|
GenericResponseModel? getBasicNTFBody;
|
|
|
|
GenericResponseModel? getICBody;
|
|
|
|
GenericResponseModel? getICBody;
|
|
|
|
GenericResponseModel? subordinatesLeavesModel;
|
|
|
|
GenericResponseModel? subordinatesLeavesModel;
|
|
|
|
GetPoNotificationBodyList? getPoNotificationBody;
|
|
|
|
GetPoNotificationBodyList? getPoNotificationBody;
|
|
|
|
GetPrNotificationBodyList? getPrNotificationBody;
|
|
|
|
GetPrNotificationBodyList? getPrNotificationBody;
|
|
|
|
GetItemCreationNtfBodyList? getItemCreationNtfBody;
|
|
|
|
GetItemCreationNtfBodyList? getItemCreationNtfBody;
|
|
|
|
|
|
|
|
GetPaymentNotificationBodyList? getPaymentNotificationBodyList;
|
|
|
|
|
|
|
|
|
|
|
|
bool isCloseAvailable = false;
|
|
|
|
bool isCloseAvailable = false;
|
|
|
|
bool isApproveAvailable = false;
|
|
|
|
bool isApproveAvailable = false;
|
|
|
@ -129,8 +132,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
getContactNotificationBodyList = null;
|
|
|
|
getContactNotificationBodyList = null;
|
|
|
|
getAddressNotificationBodyList!.clear();
|
|
|
|
getAddressNotificationBodyList!.clear();
|
|
|
|
|
|
|
|
getPaymentNotificationBodyList = null;
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") {
|
|
|
|
if (workListData!.iTEMTYPE == "HRSSA" ||
|
|
|
|
|
|
|
|
workListData!.iTEMTYPE == "STAMP") {
|
|
|
|
getUserInformation();
|
|
|
|
getUserInformation();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -152,7 +156,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
getContactNotificationBody();
|
|
|
|
getContactNotificationBody();
|
|
|
|
} else if (workListData!.rEQUESTTYPE == "ADDRESS") {
|
|
|
|
} else if (workListData!.rEQUESTTYPE == "ADDRESS") {
|
|
|
|
getAddressNotificationBody();
|
|
|
|
getAddressNotificationBody();
|
|
|
|
} else if(workListData!.rEQUESTTYPE =='TERMINATION'){
|
|
|
|
} else if (workListData!.rEQUESTTYPE == 'TERMINATION') {
|
|
|
|
getTerminationNotificationBody();
|
|
|
|
getTerminationNotificationBody();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -171,6 +175,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (workListData!.iTEMTYPE == "REQAPPRV") {
|
|
|
|
if (workListData!.iTEMTYPE == "REQAPPRV") {
|
|
|
|
getPRNotification();
|
|
|
|
getPRNotification();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (workListData!.iTEMTYPE == "PAY_REQ") {
|
|
|
|
|
|
|
|
getPaymentNotification();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (controller.hasClients) {
|
|
|
|
if (controller.hasClients) {
|
|
|
|
controller.jumpToPage(0);
|
|
|
|
controller.jumpToPage(0);
|
|
|
@ -184,7 +191,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
|
|
|
|
|
|
|
void getDataFromState() {
|
|
|
|
void getDataFromState() {
|
|
|
|
if (workListData == null) {
|
|
|
|
if (workListData == null) {
|
|
|
|
workListData = AppState().workList![AppState().workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
|
|
|
|
workListData = AppState().workList![AppState()
|
|
|
|
|
|
|
|
.workListIndex!]; // ModalRoute.of(context)!.settings.arguments as WorkListResponseModel;
|
|
|
|
getData();
|
|
|
|
getData();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -217,7 +225,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, top: 16, bottom: 16),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
|
|
|
left: 21, right: 21, top: 16, bottom: 16),
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(25),
|
|
|
|
bottomLeft: Radius.circular(25),
|
|
|
@ -236,13 +245,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
myTab(LocaleKeys.info.tr(), 0),
|
|
|
|
myTab(LocaleKeys.info.tr(), 0),
|
|
|
|
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP") ? myTab(LocaleKeys.details.tr(), 1) : myTab(LocaleKeys.request.tr(), 1),
|
|
|
|
(workListData!.iTEMTYPE == "HRSSA" ||
|
|
|
|
|
|
|
|
workListData!.iTEMTYPE == "STAMP")
|
|
|
|
|
|
|
|
? myTab(LocaleKeys.details.tr(), 1)
|
|
|
|
|
|
|
|
: myTab(LocaleKeys.request.tr(), 1),
|
|
|
|
myTab(LocaleKeys.actions.tr(), 2),
|
|
|
|
myTab(LocaleKeys.actions.tr(), 2),
|
|
|
|
myTab(LocaleKeys.attachments.tr(), 3),
|
|
|
|
myTab(LocaleKeys.attachments.tr(), 3),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
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: (int pageIndex) {
|
|
|
|
onPageChanged: (int pageIndex) {
|
|
|
@ -254,25 +269,38 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
InfoFragment(
|
|
|
|
InfoFragment(
|
|
|
|
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
|
|
|
|
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
|
|
|
|
workListData: workListData,
|
|
|
|
workListData: workListData,
|
|
|
|
itemCreationHeader: getItemCreationNtfBody?.itemCreationHeader ?? [],
|
|
|
|
itemCreationHeader:
|
|
|
|
|
|
|
|
getItemCreationNtfBody?.itemCreationHeader ?? [],
|
|
|
|
getStampMsNotifications: getStampMsNotifications,
|
|
|
|
getStampMsNotifications: getStampMsNotifications,
|
|
|
|
getStampNsNotifications: getStampNsNotifications,
|
|
|
|
getStampNsNotifications: getStampNsNotifications,
|
|
|
|
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
|
|
|
|
getEitCollectionNotificationBodyList:
|
|
|
|
getPhonesNotificationBodyList: getPhonesNotificationBodyList,
|
|
|
|
getEitCollectionNotificationBodyList,
|
|
|
|
|
|
|
|
getPhonesNotificationBodyList:
|
|
|
|
|
|
|
|
getPhonesNotificationBodyList,
|
|
|
|
getBasicDetNtfBodyList: getBasicDetNtfBodyList,
|
|
|
|
getBasicDetNtfBodyList: getBasicDetNtfBodyList,
|
|
|
|
getAddressNotificationBodyList: getAddressNotificationBodyList,
|
|
|
|
getAddressNotificationBodyList:
|
|
|
|
getAbsenceCollectionNotificationBodyList: getAbsenceCollectionNotificationBodyList,
|
|
|
|
getAddressNotificationBodyList,
|
|
|
|
getContactNotificationBodyList: getContactNotificationBodyList,
|
|
|
|
getAbsenceCollectionNotificationBodyList:
|
|
|
|
|
|
|
|
getAbsenceCollectionNotificationBodyList,
|
|
|
|
|
|
|
|
getContactNotificationBodyList:
|
|
|
|
|
|
|
|
getContactNotificationBodyList,
|
|
|
|
getPrNotificationBodyList: getPrNotificationBody,
|
|
|
|
getPrNotificationBodyList: getPrNotificationBody,
|
|
|
|
getTerminationNotificationBodyList:getTerminationNotificationBodyList
|
|
|
|
getTerminationNotificationBodyList:
|
|
|
|
|
|
|
|
getTerminationNotificationBodyList,
|
|
|
|
|
|
|
|
getPaymentNotificationBodyList:
|
|
|
|
|
|
|
|
getPaymentNotificationBodyList,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
|
|
|
|
(workListData!.iTEMTYPE == "HRSSA" ||
|
|
|
|
? DetailFragment(workListData, memberInformationListModel)
|
|
|
|
workListData!.iTEMTYPE == "STAMP" || workListData!.iTEMTYPE == "PAY_REQ")
|
|
|
|
|
|
|
|
? DetailFragment(
|
|
|
|
|
|
|
|
workListData, memberInformationListModel)
|
|
|
|
: RequestFragment(
|
|
|
|
: RequestFragment(
|
|
|
|
moNotificationBodyList: getMoNotificationBodyList,
|
|
|
|
moNotificationBodyList: getMoNotificationBodyList,
|
|
|
|
poLinesList: getPoNotificationBody?.pOLines ?? [],
|
|
|
|
poLinesList: getPoNotificationBody?.pOLines ?? [],
|
|
|
|
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
|
|
|
|
itemCreationLines:
|
|
|
|
|
|
|
|
getItemCreationNtfBody?.itemCreationLines ?? [],
|
|
|
|
prLinesList: getPrNotificationBody?.pRLines ?? [],
|
|
|
|
prLinesList: getPrNotificationBody?.pRLines ?? [],
|
|
|
|
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
isActionHistoryLoaded
|
|
|
|
isActionHistoryLoaded
|
|
|
|
? actionHistoryList.isEmpty
|
|
|
|
? actionHistoryList.isEmpty
|
|
|
@ -292,11 +320,13 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
|
|
|
|
if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
|
|
|
top: 14, bottom: 14, left: 21, right: 21),
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
color: Colors.white,
|
|
|
|
border: Border(
|
|
|
|
border: Border(
|
|
|
|
top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0),
|
|
|
|
top: BorderSide(
|
|
|
|
|
|
|
|
color: MyColors.lightGreyEFColor, width: 1.0),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
@ -305,20 +335,29 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
DefaultButton(
|
|
|
|
DefaultButton(
|
|
|
|
LocaleKeys.reject.tr(),
|
|
|
|
LocaleKeys.reject.tr(),
|
|
|
|
() => performAction(rejectAction),
|
|
|
|
() => performAction(rejectAction),
|
|
|
|
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)],
|
|
|
|
colors: const [
|
|
|
|
|
|
|
|
Color(0xffE47A7E),
|
|
|
|
|
|
|
|
Color(0xffDE6D71)
|
|
|
|
|
|
|
|
],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
if (isApproveAvailable && isRejectAvailable) 8.width,
|
|
|
|
if (isApproveAvailable && isRejectAvailable) 8.width,
|
|
|
|
if (isApproveAvailable)
|
|
|
|
if (isApproveAvailable)
|
|
|
|
DefaultButton(
|
|
|
|
DefaultButton(
|
|
|
|
LocaleKeys.approve.tr(),
|
|
|
|
LocaleKeys.approve.tr(),
|
|
|
|
() => performAction(approveAction),
|
|
|
|
() => performAction(approveAction),
|
|
|
|
colors: const [Color(0xff28C884), Color(0xff1BB271)],
|
|
|
|
colors: const [
|
|
|
|
|
|
|
|
Color(0xff28C884),
|
|
|
|
|
|
|
|
Color(0xff1BB271)
|
|
|
|
|
|
|
|
],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
if (isCloseAvailable)
|
|
|
|
if (isCloseAvailable)
|
|
|
|
DefaultButton(
|
|
|
|
DefaultButton(
|
|
|
|
LocaleKeys.ok.tr(),
|
|
|
|
LocaleKeys.ok.tr(),
|
|
|
|
() => performAction("CLOSE"),
|
|
|
|
() => performAction("CLOSE"),
|
|
|
|
colors: const [Color(0xff32D892), Color(0xff1AB170)],
|
|
|
|
colors: const [
|
|
|
|
|
|
|
|
Color(0xff32D892),
|
|
|
|
|
|
|
|
Color(0xff1AB170)
|
|
|
|
|
|
|
|
],
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
8.width,
|
|
|
|
8.width,
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
@ -328,7 +367,11 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
|
|
|
|
child: Icon(
|
|
|
|
|
|
|
|
showFabOptions
|
|
|
|
|
|
|
|
? Icons.more_vert_rounded
|
|
|
|
|
|
|
|
: Icons.more_horiz_rounded,
|
|
|
|
|
|
|
|
color: MyColors.darkIconColor),
|
|
|
|
).onPress(() {
|
|
|
|
).onPress(() {
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
showFabOptions = true;
|
|
|
|
showFabOptions = true;
|
|
|
@ -345,7 +388,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
opacity: showFabOptions ? 1 : 0,
|
|
|
|
opacity: showFabOptions ? 1 : 0,
|
|
|
|
duration: const Duration(milliseconds: 250),
|
|
|
|
duration: const Duration(milliseconds: 250),
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
padding: const EdgeInsets.only(left: 21, right: 21, bottom: 75 - 12),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
|
|
|
|
left: 21, right: 21, bottom: 75 - 12),
|
|
|
|
width: double.infinity,
|
|
|
|
width: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
height: double.infinity,
|
|
|
|
color: Colors.white.withOpacity(.67),
|
|
|
|
color: Colors.white.withOpacity(.67),
|
|
|
@ -354,15 +398,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg").onPress(() {
|
|
|
|
myFab(LocaleKeys.skip.tr(), "assets/images/skip.svg")
|
|
|
|
if (AppState().workList!.length - 1 > AppState().workListIndex!) {
|
|
|
|
.onPress(() {
|
|
|
|
|
|
|
|
if (AppState().workList!.length - 1 >
|
|
|
|
|
|
|
|
AppState().workListIndex!) {
|
|
|
|
animationIndex = animationIndex + 1;
|
|
|
|
animationIndex = animationIndex + 1;
|
|
|
|
AppState().setWorkListIndex = AppState().workListIndex! + 1;
|
|
|
|
AppState().setWorkListIndex =
|
|
|
|
|
|
|
|
AppState().workListIndex! + 1;
|
|
|
|
workListData = null;
|
|
|
|
workListData = null;
|
|
|
|
showFabOptions = false;
|
|
|
|
showFabOptions = false;
|
|
|
|
tabIndex = 0;
|
|
|
|
tabIndex = 0;
|
|
|
|
getDataFromState();
|
|
|
|
getDataFromState();
|
|
|
|
} else if (AppState().workList!.length - 1 == AppState().workListIndex!) {
|
|
|
|
} else if (AppState().workList!.length - 1 ==
|
|
|
|
|
|
|
|
AppState().workListIndex!) {
|
|
|
|
Navigator.pop(context);
|
|
|
|
Navigator.pop(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
}),
|
|
|
@ -380,25 +428,31 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
|
|
|
|
floatingActionButton:
|
|
|
|
? Container(
|
|
|
|
(!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
|
|
|
|
height: 43,
|
|
|
|
? Container(
|
|
|
|
width: 43,
|
|
|
|
height: 43,
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
width: 43,
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
),
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
|
|
|
|
),
|
|
|
|
).onPress(() {
|
|
|
|
child: Icon(
|
|
|
|
setState(() {
|
|
|
|
showFabOptions
|
|
|
|
showFabOptions = true;
|
|
|
|
? Icons.more_vert_rounded
|
|
|
|
});
|
|
|
|
: Icons.more_horiz_rounded,
|
|
|
|
})
|
|
|
|
color: MyColors.darkIconColor),
|
|
|
|
: null,
|
|
|
|
).onPress(() {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
showFabOptions = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
: null,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<Widget> viewApiButtonsList(List<GetNotificationButtonsList> notificationButtonsList) {
|
|
|
|
List<Widget> viewApiButtonsList(
|
|
|
|
|
|
|
|
List<GetNotificationButtonsList> notificationButtonsList) {
|
|
|
|
List<Widget> fabs = [];
|
|
|
|
List<Widget> fabs = [];
|
|
|
|
for (int i = 0; i < notificationButtonsList.length; i++) {
|
|
|
|
for (int i = 0; i < notificationButtonsList.length; i++) {
|
|
|
|
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" ||
|
|
|
|
if (notificationButtonsList[i].bUTTONACTION! == "REJECTED" ||
|
|
|
@ -412,7 +466,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
notificationButtonsList[i].bUTTONLABEL!,
|
|
|
|
notificationButtonsList[i].bUTTONLABEL!,
|
|
|
|
getActionImage(notificationButtonsList[i].bUTTONACTION!),
|
|
|
|
getActionImage(notificationButtonsList[i].bUTTONACTION!),
|
|
|
|
isIconAsset: true,
|
|
|
|
isIconAsset: true,
|
|
|
|
).paddingOnly(bottom: 12).onPress(() => handleFabAction(notificationButtonsList[i])));
|
|
|
|
)
|
|
|
|
|
|
|
|
.paddingOnly(bottom: 12)
|
|
|
|
|
|
|
|
.onPress(() => handleFabAction(notificationButtonsList[i])));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return fabs;
|
|
|
|
return fabs;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -491,7 +547,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
));
|
|
|
|
));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "ANSWER_INFO":
|
|
|
|
case "ANSWER_INFO":
|
|
|
|
performAction(notificationButton.bUTTONACTION!, title: notificationButton.bUTTONLABEL);
|
|
|
|
performAction(notificationButton.bUTTONACTION!,
|
|
|
|
|
|
|
|
title: notificationButton.bUTTONLABEL);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "RFC":
|
|
|
|
case "RFC":
|
|
|
|
getRFCEmployeeListFunc();
|
|
|
|
getRFCEmployeeListFunc();
|
|
|
@ -511,20 +568,31 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
child: UpdateContinueSheet(
|
|
|
|
child: UpdateContinueSheet(
|
|
|
|
workListData: workListData,
|
|
|
|
workListData: workListData,
|
|
|
|
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
|
|
|
|
getEitCollectionNotificationBodyList:
|
|
|
|
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
|
|
|
|
getEitCollectionNotificationBodyList,
|
|
|
|
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)),
|
|
|
|
dynamicParams: DynamicListViewParams(
|
|
|
|
|
|
|
|
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
|
|
|
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
|
|
|
collectionNotificationList:
|
|
|
|
|
|
|
|
getEitCollectionNotificationBodyList![0]
|
|
|
|
|
|
|
|
.collectionNotification)),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "CONTINUE_ACTION":
|
|
|
|
case "CONTINUE_ACTION":
|
|
|
|
showMyBottomSheet(
|
|
|
|
showMyBottomSheet(
|
|
|
|
context,
|
|
|
|
context,
|
|
|
|
|
|
|
|
type:"CONTINUE_ACTION",
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
child: UpdateContinueSheet(
|
|
|
|
child: UpdateContinueSheet(
|
|
|
|
workListData: workListData,
|
|
|
|
workListData: workListData,
|
|
|
|
getEitCollectionNotificationBodyList: getEitCollectionNotificationBodyList,
|
|
|
|
getEitCollectionNotificationBodyList:
|
|
|
|
dynamicParams: DynamicListViewParams(workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
|
|
|
|
getEitCollectionNotificationBodyList,
|
|
|
|
isUpdate: true, collectionNotificationList: getEitCollectionNotificationBodyList![0].collectionNotification)),
|
|
|
|
dynamicParams: DynamicListViewParams(
|
|
|
|
|
|
|
|
workListData!.sUBJECT!, workListData!.fUNCTIONNAME!,
|
|
|
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
|
|
|
collectionNotificationList:
|
|
|
|
|
|
|
|
getEitCollectionNotificationBodyList![0]
|
|
|
|
|
|
|
|
.collectionNotification)),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "APPROVE_AND_FORWARD":
|
|
|
|
case "APPROVE_AND_FORWARD":
|
|
|
@ -536,7 +604,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
notificationID: workListData!.nOTIFICATIONID,
|
|
|
|
notificationID: workListData!.nOTIFICATIONID,
|
|
|
|
actionHistoryList: actionHistoryList,
|
|
|
|
actionHistoryList: actionHistoryList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
getNotificationRespondAttributes: getNotificationRespondAttributes,
|
|
|
|
getNotificationRespondAttributes:
|
|
|
|
|
|
|
|
getNotificationRespondAttributes,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "FORWARD":
|
|
|
|
case "FORWARD":
|
|
|
@ -548,7 +617,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
notificationID: workListData!.nOTIFICATIONID,
|
|
|
|
notificationID: workListData!.nOTIFICATIONID,
|
|
|
|
actionHistoryList: actionHistoryList,
|
|
|
|
actionHistoryList: actionHistoryList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
callBackFunc: reloadWorkList,
|
|
|
|
getNotificationRespondAttributes: getNotificationRespondAttributes,
|
|
|
|
getNotificationRespondAttributes:
|
|
|
|
|
|
|
|
getNotificationRespondAttributes,
|
|
|
|
));
|
|
|
|
));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case "DEL":
|
|
|
|
case "DEL":
|
|
|
@ -569,7 +639,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
void getRFCEmployeeListFunc() async {
|
|
|
|
void getRFCEmployeeListFunc() async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
getRFCEmployeeList = await WorkListApiClient().getRFCEmployeeeList(workListData!.nOTIFICATIONID!);
|
|
|
|
getRFCEmployeeList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getRFCEmployeeeList(workListData!.nOTIFICATIONID!);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
actionHistoryList.last.sEQUENCE = getRFCEmployeeList[0].sEQ;
|
|
|
|
actionHistoryList.last.sEQUENCE = getRFCEmployeeList[0].sEQ;
|
|
|
|
showMyBottomSheet(context,
|
|
|
|
showMyBottomSheet(context,
|
|
|
@ -589,7 +660,8 @@ 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: (BuildContext cxt) => ConfirmDialog(
|
|
|
|
builder: (BuildContext cxt) => ConfirmDialog(
|
|
|
@ -599,7 +671,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
Navigator.pop(cxt);
|
|
|
|
Navigator.pop(cxt);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await WorkListApiClient().submitComment(comment: "", email: email, userId: userId, notificationId: workListData!.nOTIFICATIONID, apiMode: "REJECT");
|
|
|
|
await WorkListApiClient().submitComment(
|
|
|
|
|
|
|
|
comment: "",
|
|
|
|
|
|
|
|
email: email,
|
|
|
|
|
|
|
|
userId: userId,
|
|
|
|
|
|
|
|
notificationId: workListData!.nOTIFICATIONID,
|
|
|
|
|
|
|
|
apiMode: "REJECT");
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Navigator.pop(context, "delegate_reload");
|
|
|
|
Navigator.pop(context, "delegate_reload");
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
@ -617,7 +694,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
title.toText12(color: isSelected ? Colors.white : Colors.white.withOpacity(.74), isCenter: true),
|
|
|
|
title.toText12(
|
|
|
|
|
|
|
|
color: isSelected ? Colors.white : Colors.white.withOpacity(.74),
|
|
|
|
|
|
|
|
isCenter: true),
|
|
|
|
4.height,
|
|
|
|
4.height,
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: 8,
|
|
|
|
height: 8,
|
|
|
@ -680,14 +759,17 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
actionMode: actionMode,
|
|
|
|
actionMode: actionMode,
|
|
|
|
onTap: (String note) {
|
|
|
|
onTap: (String note) {
|
|
|
|
List<Map<String, dynamic>> responseAttribute = [];
|
|
|
|
List<Map<String, dynamic>> responseAttribute = [];
|
|
|
|
|
|
|
|
|
|
|
|
for (var element in getNotificationRespondAttributes!) {
|
|
|
|
for (var element in getNotificationRespondAttributes!) {
|
|
|
|
responseAttribute.add({
|
|
|
|
responseAttribute.add({
|
|
|
|
"ATTRIBUTE_NAME": element!.attributeName,
|
|
|
|
"ATTRIBUTE_NAME": element!.attributeName,
|
|
|
|
if (element!.attributeType == "number") "ATTRIBUTE_NUMBER_VALUE": note else if (element!.attributeType == "VARCHAR2") "ATTRIBUTE_TEXT_VALUE": note
|
|
|
|
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,
|
|
|
@ -695,11 +777,14 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
"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":responseAttribute,
|
|
|
|
"RespondAttributeList": responseAttribute,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC" || actionMode == "TRY_APPROVE_AGAIN" || actionMode == "SEND_BACK_TO_PREPARER") {
|
|
|
|
if (actionMode == "APPROVED" || actionMode == "APPROVE" || actionMode == "CLOSE" || actionMode == "ANSWER_INFO" || actionMode == "RFC" || actionMode == "TRY_APPROVE_AGAIN" || actionMode == "SEND_BACK_TO_PREPARER") {
|
|
|
|
|
|
|
|
|
|
|
|
performNotificationAction(payload);
|
|
|
|
performNotificationAction(payload);
|
|
|
|
} else if (note.isNotEmpty && (actionMode != "APPROVED" || actionMode != "APPROVE")) {
|
|
|
|
} else if (note.isNotEmpty &&
|
|
|
|
|
|
|
|
(actionMode != "APPROVED" || actionMode != "APPROVE")) {
|
|
|
|
performNotificationAction(payload);
|
|
|
|
performNotificationAction(payload);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
Utils.showToast(LocaleKeys.pleaseEnterComments.tr());
|
|
|
|
Utils.showToast(LocaleKeys.pleaseEnterComments.tr());
|
|
|
@ -712,7 +797,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
void performNotificationAction(Map<String, dynamic> payload) async {
|
|
|
|
void performNotificationAction(Map<String, dynamic> payload) async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
Utils.showLoading(context);
|
|
|
|
Utils.showLoading(context);
|
|
|
|
GenericResponseModel model = await WorkListApiClient().postNotificationActions(payload);
|
|
|
|
GenericResponseModel model =
|
|
|
|
|
|
|
|
await WorkListApiClient().postNotificationActions(payload);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
|
|
|
|
Utils.showToast(LocaleKeys.yourChangeHasBeenSavedSuccessfully.tr());
|
|
|
|
animationIndex = animationIndex + 1;
|
|
|
|
animationIndex = animationIndex + 1;
|
|
|
@ -753,7 +839,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getEitCollectionNotificationBodyList!.clear();
|
|
|
|
getEitCollectionNotificationBodyList!.clear();
|
|
|
|
getEitCollectionNotificationBodyList = await WorkListApiClient().GetEitNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
getEitCollectionNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.GetEitNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -771,7 +858,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
memberInformationListModel = null;
|
|
|
|
memberInformationListModel = null;
|
|
|
|
memberInformationListModel = await WorkListApiClient().getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
|
|
|
|
memberInformationListModel = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getUserInformation(-999, workListData!.sELECTEDEMPLOYEENUMBER!);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -789,7 +877,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getPhonesNotificationBodyList!.clear();
|
|
|
|
getPhonesNotificationBodyList!.clear();
|
|
|
|
getPhonesNotificationBodyList = await WorkListApiClient().getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
getPhonesNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getPhonesNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -807,7 +896,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getBasicDetNtfBodyList!.clear();
|
|
|
|
getBasicDetNtfBodyList!.clear();
|
|
|
|
getBasicDetNtfBodyList = await WorkListApiClient().getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
getBasicDetNtfBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getBasicDetNtfBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -825,7 +915,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
getAbsenceCollectionNotificationBodyList!.clear();
|
|
|
|
getAbsenceCollectionNotificationBodyList = await WorkListApiClient().getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
getAbsenceCollectionNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getAbsenceNotificationBody(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -842,7 +933,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getContactNotificationBodyList = await WorkListApiClient().getContactNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
getContactNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getContactNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -859,7 +951,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getAddressNotificationBodyList = await WorkListApiClient().getAddressNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
getAddressNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getAddressNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -871,15 +964,15 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void getTerminationNotificationBody() async {
|
|
|
|
void getTerminationNotificationBody() async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0)
|
|
|
|
if (apiCallCount == 0) apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getTerminationNotificationBodyList = await WorkListApiClient()
|
|
|
|
getTerminationNotificationBodyList = await WorkListApiClient().getTerminationNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
.getTerminationNotificationBodyList(workListData!.nOTIFICATIONID);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
@ -889,16 +982,16 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void getStampNotificationBody() async {
|
|
|
|
void getStampNotificationBody() async {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
if (workListData!.rEQUESTTYPE == "STAMP_MS") {
|
|
|
|
if (workListData!.rEQUESTTYPE == "STAMP_MS") {
|
|
|
|
getStampMsNotifications = await WorkListApiClient().getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getStampMsNotifications = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getStampMsNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
getStampNsNotifications = await WorkListApiClient().getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getStampNsNotifications = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getStampNsNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
@ -916,7 +1009,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getMoNotificationBodyList = await WorkListApiClient().getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getMoNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getMoNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -933,7 +1027,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getItemCreationNtfBody = await WorkListApiClient().getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getItemCreationNtfBody = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getItemCreationNtfBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -950,7 +1045,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getPoNotificationBody = await WorkListApiClient().getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getPoNotificationBody = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getPoNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -967,7 +1063,26 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getPrNotificationBody = await WorkListApiClient().getPRNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
getPrNotificationBody = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getPRNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
|
|
|
setState(() {});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (ex) {
|
|
|
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
|
|
|
|
Utils.handleException(ex, context, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void getPaymentNotification() async {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
|
|
|
getPaymentNotificationBodyList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getPaymentNotificationBody(workListData!.nOTIFICATIONID!, -999);
|
|
|
|
apiCallCount--;
|
|
|
|
apiCallCount--;
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
Utils.hideLoading(context);
|
|
|
|
Utils.hideLoading(context);
|
|
|
@ -985,7 +1100,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
getNotificationRespondAttributes.clear();
|
|
|
|
getNotificationRespondAttributes.clear();
|
|
|
|
getNotificationRespondAttributes = await WorkListApiClient().notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
|
|
|
|
getNotificationRespondAttributes = await WorkListApiClient()
|
|
|
|
|
|
|
|
.notificationGetRespondAttributes(workListData!.nOTIFICATIONID!);
|
|
|
|
if (getNotificationRespondAttributes.isNotEmpty) {
|
|
|
|
if (getNotificationRespondAttributes.isNotEmpty) {
|
|
|
|
notificationNoteInput = getNotificationRespondAttributes.first;
|
|
|
|
notificationNoteInput = getNotificationRespondAttributes.first;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1006,18 +1122,25 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
if (apiCallCount == 0) Utils.showLoading(context);
|
|
|
|
apiCallCount++;
|
|
|
|
apiCallCount++;
|
|
|
|
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((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
isCloseAvailable = notificationButtonsList.any(
|
|
|
|
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
(GetNotificationButtonsList element) =>
|
|
|
|
if (element.bUTTONACTION == "APPROVED" || element.bUTTONACTION == "APPROVE") {
|
|
|
|
element.bUTTONACTION == "CLOSE");
|
|
|
|
|
|
|
|
isApproveAvailable =
|
|
|
|
|
|
|
|
notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
|
|
|
|
if (element.bUTTONACTION == "APPROVED" ||
|
|
|
|
|
|
|
|
element.bUTTONACTION == "APPROVE") {
|
|
|
|
approveAction = element.bUTTONACTION!;
|
|
|
|
approveAction = element.bUTTONACTION!;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
isRejectAvailable =
|
|
|
|
if (element.bUTTONACTION == "REJECTED" || element.bUTTONACTION == "REJECT") {
|
|
|
|
notificationButtonsList.any((GetNotificationButtonsList element) {
|
|
|
|
|
|
|
|
if (element.bUTTONACTION == "REJECTED" ||
|
|
|
|
|
|
|
|
element.bUTTONACTION == "REJECT") {
|
|
|
|
rejectAction = element.bUTTONACTION!;
|
|
|
|
rejectAction = element.bUTTONACTION!;
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1040,7 +1163,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
isActionHistoryLoaded = false;
|
|
|
|
isActionHistoryLoaded = false;
|
|
|
|
actionHistoryList.clear();
|
|
|
|
actionHistoryList.clear();
|
|
|
|
actionHistoryList = await WorkListApiClient().getActionHistory(workListData!.nOTIFICATIONID!);
|
|
|
|
actionHistoryList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getActionHistory(workListData!.nOTIFICATIONID!);
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
isActionHistoryLoaded = true;
|
|
|
|
isActionHistoryLoaded = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -1053,7 +1177,8 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
isAttachmentLoaded = false;
|
|
|
|
isAttachmentLoaded = false;
|
|
|
|
getAttachmentList.clear();
|
|
|
|
getAttachmentList.clear();
|
|
|
|
getAttachmentList = await WorkListApiClient().getAttachments(workListData!.nOTIFICATIONID!);
|
|
|
|
getAttachmentList = await WorkListApiClient()
|
|
|
|
|
|
|
|
.getAttachments(workListData!.nOTIFICATIONID!);
|
|
|
|
setState(() {
|
|
|
|
setState(() {
|
|
|
|
isAttachmentLoaded = true;
|
|
|
|
isAttachmentLoaded = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|