merge-requests/87/head
haroon amjad 3 years ago
parent f63e0e1e7c
commit 62acd531b0

@ -66,6 +66,41 @@ class ItemsForSaleApiClient {
}, url, postParams);
}
Future<dynamic> updateItemsForSale(int itemSaleID) async {
List<GetItemsForSaleList> getItemsForSaleList = [];
String url = "${ApiConsts.cocRest}Mohemm_ITG_UpdateItemForSale";
// request.fields['itemSaleID'] = itemSaleID.toString();
// request.fields['Channel'] = "31";
// request.fields['isActive'] = "false";
// request.fields['LogInToken'] = loginTokenID!;
// request.fields['Token'] = tokenID!;
// request.fields['MobileNo'] = empMobNum!;
// request.fields['EmployeeNumber'] = empNum!;
// request.fields['employeeNumber'] = empNum;
Map<String, dynamic> postParams = {
"EmployeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"employeeNumber": AppState().memberInformationList?.eMPLOYEENUMBER,
"MobileNo": AppState().memberInformationList?.eMPLOYEEMOBILENUMBER,
"itemSaleID": itemSaleID.toString(),
"Channel": "31",
"isActive": "false",
"Token": AppState().postParamsObject?.tokenID
};
postParams.addAll(AppState().postParamsJson);
return await ApiClient().postJsonForObject((response) {
var body = json.decode(response['Mohemm_ITG_ResponseItem']);
// body['result']['data'].forEach((v) {
// getItemsForSaleList.add(new GetItemsForSaleList.fromJson(v));
// });
return getItemsForSaleList;
}, url, postParams);
}
Future<List<EmployeePostedAds>> getEmployeePostedAds() async {
List<EmployeePostedAds> employeePostedAdsList = [];

@ -146,7 +146,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
getPRNotification();
}
if(controller.hasClients) {
if (controller.hasClients) {
controller.jumpToPage(0);
}
@ -210,6 +210,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
);
},
child: Stack(
key: ValueKey(AppState().workListIndex ?? 0),
children: [
Column(
children: [
@ -251,19 +252,19 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
(workListData!.iTEMTYPE == "HRSSA" || workListData!.iTEMTYPE == "STAMP")
? DetailFragment(workListData, memberInformationListModel)
: RequestFragment(
moNotificationBodyList: getMoNotificationBodyList,
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
prLinesList: getPrNotificationBody?.pRLines ?? [],
),
moNotificationBodyList: getMoNotificationBodyList,
poLinesList: getPoNotificationBody?.pOLines ?? [],
itemCreationLines: getItemCreationNtfBody?.itemCreationLines ?? [],
prLinesList: getPrNotificationBody?.pRLines ?? [],
),
isActionHistoryLoaded
? actionHistoryList.isEmpty
? Utils.getNoDataWidget(context)
: ActionsFragment(
workListData!.nOTIFICATIONID,
actionHistoryList,
voidCallback: reloadWorkList,
)
? Utils.getNoDataWidget(context)
: ActionsFragment(
workListData!.nOTIFICATIONID,
actionHistoryList,
voidCallback: reloadWorkList,
)
: showLoadingAnimation(),
InfoFragment(
poHeaderList: getPoNotificationBody?.pOHeader ?? [],
@ -565,7 +566,7 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
Future<void> performNetworkCall(BuildContext context, {String? email, String? userId}) async {
showDialog(
context: context,
builder: (BuildContext cxt) => ConfirmDialog(
builder: (cxt) => ConfirmDialog(
message: LocaleKeys.wantToReject.tr(),
okTitle: LocaleKeys.reject.tr(),
onTap: () async {
@ -648,12 +649,12 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
print(actionMode);
showDialog(
context: context,
builder: (BuildContext cxt) => AcceptRejectInputDialog(
builder: (cxt) => AcceptRejectInputDialog(
message: title != null ? null : LocaleKeys.requestedItems.tr(),
title: title,
notificationGetRespond: notificationNoteInput,
actionMode: actionMode,
onTap: (String note) {
onTap: (note) {
Map<String, dynamic> payload = {
"P_ACTION_MODE": actionMode,
"P_APPROVER_INDEX": null,
@ -934,9 +935,9 @@ class _WorkListDetailScreenState extends State<WorkListDetailScreen> {
apiCallCount++;
notificationButtonsList = await WorkListApiClient().getNotificationButtons(workListData!.nOTIFICATIONID!);
if (notificationButtonsList.isNotEmpty) {
isCloseAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "CLOSE");
isApproveAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "APPROVED");
isRejectAvailable = notificationButtonsList.any((GetNotificationButtonsList element) => element.bUTTONACTION == "REJECTED");
isCloseAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "CLOSE");
isApproveAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "APPROVED");
isRejectAvailable = notificationButtonsList.any((element) => element.bUTTONACTION == "REJECTED");
}
apiCallCount--;
if (apiCallCount == 0) {

@ -20,7 +20,7 @@ AppBar AppBarWidget(BuildContext context,
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() => Navigator.maybePop(context, true), context),
onTap: Feedback.wrapForTap(() => Navigator.maybePop(context), context),
child: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor),
),
4.width,

Loading…
Cancel
Save