|
|
|
|
@ -297,50 +297,52 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (isApproveAvailable || isRejectAvailable || isCloseAvailable)
|
|
|
|
|
Container(
|
|
|
|
|
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21),
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border(
|
|
|
|
|
top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0),
|
|
|
|
|
SafeArea(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: const EdgeInsets.only(top: 14, bottom: 14, left: 21, right: 21),
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
border: Border(
|
|
|
|
|
top: BorderSide(color: MyColors.lightGreyEFColor, width: 1.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
if (isRejectAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.reject.tr(),
|
|
|
|
|
() => performAction(rejectAction),
|
|
|
|
|
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (isApproveAvailable && isRejectAvailable) 8.width,
|
|
|
|
|
if (isApproveAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.approve.tr(),
|
|
|
|
|
() => performAction(approveAction),
|
|
|
|
|
colors: const [Color(0xff28C884), Color(0xff1BB271)],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (isCloseAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.ok.tr(),
|
|
|
|
|
() => performAction("CLOSE"),
|
|
|
|
|
colors: const [Color(0xff32D892), Color(0xff1AB170)],
|
|
|
|
|
).expanded,
|
|
|
|
|
8.width,
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
width: 43,
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
|
),
|
|
|
|
|
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
setState(() {
|
|
|
|
|
showFabOptions = true;
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
if (isRejectAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.reject.tr(),
|
|
|
|
|
() => performAction(rejectAction),
|
|
|
|
|
colors: const [Color(0xffE47A7E), Color(0xffDE6D71)],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (isApproveAvailable && isRejectAvailable) 8.width,
|
|
|
|
|
if (isApproveAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.approve.tr(),
|
|
|
|
|
() => performAction(approveAction),
|
|
|
|
|
colors: const [Color(0xff28C884), Color(0xff1BB271)],
|
|
|
|
|
).expanded,
|
|
|
|
|
if (isCloseAvailable)
|
|
|
|
|
DefaultButton(
|
|
|
|
|
LocaleKeys.ok.tr(),
|
|
|
|
|
() => performAction("CLOSE"),
|
|
|
|
|
colors: const [Color(0xff32D892), Color(0xff1AB170)],
|
|
|
|
|
).expanded,
|
|
|
|
|
8.width,
|
|
|
|
|
Container(
|
|
|
|
|
height: 43,
|
|
|
|
|
width: 43,
|
|
|
|
|
decoration: const BoxDecoration(
|
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
|
color: MyColors.lightGreyE6Color,
|
|
|
|
|
),
|
|
|
|
|
child: Icon(showFabOptions ? Icons.more_vert_rounded : Icons.more_horiz_rounded, color: MyColors.darkIconColor),
|
|
|
|
|
).onPress(() {
|
|
|
|
|
setState(() {
|
|
|
|
|
showFabOptions = true;
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
@ -679,8 +681,13 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void performAction(String actionMode, {String? title}) {
|
|
|
|
|
GetActionHistoryList? object = actionHistoryList.firstWhere((element) => element.aCTIONCODE == "REQUEST_INFO");
|
|
|
|
|
String question = "${object.aCTION}: ${object.nOTE}";
|
|
|
|
|
String question = "";
|
|
|
|
|
if (actionMode == "ANSWER_INFO") {
|
|
|
|
|
List<GetActionHistoryList> list = actionHistoryList.where((element) => element.aCTIONCODE == "REQUEST_INFO").toList();
|
|
|
|
|
if (list.isNotEmpty) {
|
|
|
|
|
question = "${list.first.aCTION}: ${list.first.nOTE}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
showDialog(
|
|
|
|
|
context: context,
|
|
|
|
|
builder: (BuildContext cxt) => AcceptRejectInputDialog(
|
|
|
|
|
|