|
|
|
@ -191,7 +191,24 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
return Scaffold(
|
|
|
|
|
appBar: AppBarWidget(context, title: LocaleKeys.details.tr()),
|
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
|
body: Stack(
|
|
|
|
|
body: AnimatedSwitcher(
|
|
|
|
|
duration: const Duration(milliseconds: 500),
|
|
|
|
|
switchInCurve: Curves.easeInToLinear,
|
|
|
|
|
transitionBuilder: (Widget child, Animation<double> animation) {
|
|
|
|
|
Animation<Offset> custom = Tween<Offset>(
|
|
|
|
|
begin: const Offset(1.0, 0.0),
|
|
|
|
|
end: Offset.zero,
|
|
|
|
|
).animate(animation);
|
|
|
|
|
return ClipRect(
|
|
|
|
|
child: SlideTransition(
|
|
|
|
|
position: custom,
|
|
|
|
|
child: child,
|
|
|
|
|
// textDirection: TextDirection.ltr,
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Stack(
|
|
|
|
|
key: ValueKey(AppState().workListIndex ?? 0),
|
|
|
|
|
children: [
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
@ -224,7 +241,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
if ((workListData?.sUBJECT ?? "").isNotEmpty) workListData!.sUBJECT!.toText14().paddingOnly(top: 20, right: 21, left: 21),
|
|
|
|
|
PageView(
|
|
|
|
|
controller: controller,
|
|
|
|
|
onPageChanged: (pageIndex) {
|
|
|
|
|
onPageChanged: (int pageIndex) {
|
|
|
|
|
setState(() {
|
|
|
|
|
tabIndex = pageIndex;
|
|
|
|
|
});
|
|
|
|
@ -355,6 +372,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
floatingActionButton: (!isApproveAvailable && !isRejectAvailable && !isCloseAvailable)
|
|
|
|
|
? Container(
|
|
|
|
|
height: 43,
|
|
|
|
@ -546,7 +564,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (cxt) => ConfirmDialog(
|
|
|
|
|
builder: (BuildContext cxt) => ConfirmDialog(
|
|
|
|
|
message: LocaleKeys.wantToReject.tr(),
|
|
|
|
|
okTitle: LocaleKeys.reject.tr(),
|
|
|
|
|
onTap: () async {
|
|
|
|
@ -629,12 +647,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
print(actionMode);
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (cxt) => AcceptRejectInputDialog(
|
|
|
|
|
builder: (BuildContext cxt) => AcceptRejectInputDialog(
|
|
|
|
|
message: title != null ? null : LocaleKeys.requestedItems.tr(),
|
|
|
|
|
title: title,
|
|
|
|
|
notificationGetRespond: notificationNoteInput,
|
|
|
|
|
actionMode: actionMode,
|
|
|
|
|
onTap: (note) {
|
|
|
|
|
onTap: (String note) {
|
|
|
|
|
Map<String, dynamic> payload = {
|
|
|
|
|
"P_ACTION_MODE": actionMode,
|
|
|
|
|
"P_APPROVER_INDEX": null,
|
|
|
|
@ -915,9 +933,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
apiCallCount++;
|
|
|
|
|
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
|
|
|
|
|
if (notificationButtonsList.isNotEmpty) {
|
|
|
|
|
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
|
isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
|
|
|
|
|
isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED");
|
|
|
|
|
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
|
|
|
|
|
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "APPROVED");
|
|
|
|
|
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "REJECTED");
|
|
|
|
|
}
|
|
|
|
|
apiCallCount--;
|
|
|
|
|
if (apiCallCount == 0) {
|
|
|
|
|