locacode added #5

Open
Saman wants to merge 1 commits from code_update into pre_developmnet_branch

@ -101,7 +101,7 @@ class AppAssets {
static const ic_sort = "assets/$ORGANIZATION/icons/ic_sort.png";
static const ic_featured = "assets/$ORGANIZATION/icons/ic_featured.svg";
static const ic_congratulations = "assets/$ORGANIZATION/icons/ic_congratulations.svg";
static const ic_correct_icon = "assets/$ORGANIZATION/icons/ic_correct_icon.svg";
static const ic_correct_icon = "assets/$ORGANIZATION/icons/ic_congratulation.svg";
static const ic_arrow = "assets/$ORGANIZATION/icons/ic_arrow.svg";

@ -1,5 +1,6 @@
class GLACCAddMoneyRequestModel {
String porOrgacode = "";
String plcLocacode="";
String pctCstycode = "";
String channelCode = "";
String cmpCustcode = "";
@ -22,6 +23,7 @@ class GLACCAddMoneyRequestModel {
GLACCAddMoneyRequestModel({
this.porOrgacode = "",
this.plcLocacode="",
this.pctCstycode = "",
this.channelCode = "",
this.cmpCustcode = "",
@ -45,6 +47,7 @@ class GLACCAddMoneyRequestModel {
GLACCAddMoneyRequestModel.empty()
: this.porOrgacode = "",
this.plcLocacode="",
this.pctCstycode = "",
this.channelCode = "",
this.cmpCustcode = "",
@ -67,12 +70,13 @@ class GLACCAddMoneyRequestModel {
@override
String toString() {
return 'GLACCAddMoneyRequestModel{porOrgacode: $porOrgacode, pctCstycode: $pctCstycode, channelCode: $channelCode, cmpCustcode: $cmpCustcode, drPcaGlaccode: $drPcaGlaccode, drPcaGlacdesc: $drPcaGlacdesc, crMbmBkmsnumber: $crMbmBkmsnumber, crMbmBkmstitle: $crMbmBkmstitle, crPcrCurrcode: $crPcrCurrcode, crPcrCurrdesc: $crPcrCurrdesc, crPcrCurrshort: $crPcrCurrshort, sgtGntrnarration: $sgtGntrnarration, dmpProdCode: $dmpProdCode, transType: $transType, notificationId: $notificationId, transMode: $transMode, sgtGntramtfc: $sgtGntramtfc, otdTrancomment: $otdTrancomment, obpPincode: $obpPincode, pinType: $pinType}';
return 'GLACCAddMoneyRequestModel{porOrgacode: $porOrgacode,plcLocacode:$plcLocacode, pctCstycode: $pctCstycode, channelCode: $channelCode, cmpCustcode: $cmpCustcode, drPcaGlaccode: $drPcaGlaccode, drPcaGlacdesc: $drPcaGlacdesc, crMbmBkmsnumber: $crMbmBkmsnumber, crMbmBkmstitle: $crMbmBkmstitle, crPcrCurrcode: $crPcrCurrcode, crPcrCurrdesc: $crPcrCurrdesc, crPcrCurrshort: $crPcrCurrshort, sgtGntrnarration: $sgtGntrnarration, dmpProdCode: $dmpProdCode, transType: $transType, notificationId: $notificationId, transMode: $transMode, sgtGntramtfc: $sgtGntramtfc, otdTrancomment: $otdTrancomment, obpPincode: $obpPincode, pinType: $pinType}';
}
Map<String, dynamic> toMap() {
return {
'porOrgacode': this.porOrgacode,
'plcLocacode':this.plcLocacode,
'pctCstycode': this.pctCstycode,
'channelCode': this.channelCode,
'cmpCustcode': this.cmpCustcode,
@ -98,6 +102,7 @@ class GLACCAddMoneyRequestModel {
factory GLACCAddMoneyRequestModel.fromMap(Map<String, dynamic> map) {
return GLACCAddMoneyRequestModel(
porOrgacode: map['porOrgacode'] ?? "",
plcLocacode: map['plcLocacode'] ?? "",
pctCstycode: map['pctCstycode'] ?? "",
channelCode: map['channelCode'] ?? "",
cmpCustcode: map['cmpCustcode'] ?? "",

@ -6,10 +6,13 @@ import 'package:timer_count_down/timer_controller.dart';
import '../../../core/config/server_response.dart';
import '../../../core/constants/app_contants.dart';
import '../../../core/data/repositories/app_repositories.dart';
import '../../../core/enums/request_constants.dart';
import '../../../core/utils/SessionCache.dart';
import '../../../custom_widgets/custom_dialog.dart';
import '../../../custom_widgets/custom_toasty.dart';
import '../../../models/GLACCAddMoneyRequestModel.dart';
import '../../../models/evaluated_cuency_model.dart';
import '../../../models/resend_otp_usend.dart';
import '../../../routes/app_pages.dart';
import '../../general_ledger/controllers/general_ledger_controller.dart';
@ -53,6 +56,7 @@ class AddMoneyOTPController extends GetxController {
return;
}
transactionSubmitRequestModel;
transactionSubmitRequestModel.plcLocacode = "0010";
transactionSubmitRequestModel.pinType = "TRAN";
transactionSubmitRequestModel.obpPincode = pinPutController.text;
sendTransaction();
@ -78,12 +82,21 @@ class AddMoneyOTPController extends GetxController {
}
void resenOtp() async {
//
if (!isResend.value) {
Fluttertoast.showToast(msg: "Please wait for 1 minute");
return;
}
var responce = await repository.resendOtpUsend(ResendOtpUsendModel(
channelCode: RequestConstants.channelCode,
porOrgacode: RequestConstants.porOrgacode,
email: SessionCache.instance.userInfo.cmpUserId,
cmpCustcode: SessionCache.instance.userInfo.cmpCustcode,
isOtpRequired: false,
pctCstycode: SessionCache.instance.userInfo.pctCstycode,
pinType: 'C_TRANPIN',
));
isResend.value = false;
countdownController.restart();
Fluttertoast.showToast(msg: "OTP successfully send to your email address");

@ -1,14 +1,21 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../../../core/config/server_response.dart';
import '../../../core/constants/app_contants.dart';
import '../../../core/data/repositories/app_repositories.dart';
import '../../../core/enums/request_constants.dart';
import '../../../core/utils/SessionCache.dart';
import '../../../core/utils/logs_utils.dart';
import '../../../custom_widgets/Fields/field_validations.dart';
import '../../../custom_widgets/Fields/input_field.dart';
import '../../../custom_widgets/custom_dropdown.dart';
import '../../../custom_widgets/custom_toasty.dart';
import '../../../models/DepositAccountResponse.dart';
import '../../../models/ExchangeRate.dart';
import '../../../models/SendTransactionStep1ResponseModel.dart';
import '../../../models/TransactionPinRequestModel.dart';
import '../../../models/TransactionSubmitRequestModel.dart';
import '../../../routes/app_pages.dart';
@ -115,62 +122,62 @@ class InternalAccountTransController extends GetxController {
/// Send Transaction function
Future<void> sendTransaction() async {
// if (!validate()) {
// Toasty.error("Please input and then proceed");
// return;
// }
//
// TransactionSubmitRequestModel transactionSubmitRequestModel = TransactionSubmitRequestModel(
// porOrgacode: RequestConstants.porOrgacode,
// pctCstycode: RequestConstants.pctCstycode,
// channelCode: RequestConstants.channelCode,
// cmpCustcode: SessionCache.instance.userInfo.cmpCustcode,
// drMbmBkmsnumber: selectedFromAccount.value.mbmBkmsnumber,
// drMbmBkmstitle: selectedFromAccount.value.mbmBkmstitle,
// drPcrCurrcode: selectedFromAccount.value.pcrCurrcode,
// drPcrCurrdesc: selectedFromAccount.value.pcrCurrdesc,
// drPcrCurrshort: selectedFromAccount.value.pcrCurrshort,
// crMbmBkmsnumber: selectedToAccount.value.mbmBkmsnumber,
// crMbmBkmstitle: selectedToAccount.value.mbmBkmstitle,
// crPcrCurrcode: selectedExchangeRate!.pcrCurrcode,
// crPcrCurrdesc: selectedExchangeRate!.pcrCurrdesc,
// crPcrCurrshort: selectedExchangeRate!.pcrCurrshort,
// sgtGntrnarration: "",
// dmpProdCode: selectedFromAccount.value.dmpProdcode,
// transType: "DR",
// notificationId: "",
// transMode: "Online",
// sgtGntramtfc: double.parse(sendingAmountField.getCustomText().isEmpty ? "0.0" : sendingAmountField.getCustomText()),
// otdTrancomment: messageField.getCustomText(),
// isOtpRequired: false,
// cmpRefcode: referenceCodeField.getCustomText(),
// );
//
// dp("********************>>>>>>>>>>>>******************", transactionSubmitRequestModel);
// TransactionPinRequestModel transactionPinRequestModel = TransactionPinRequestModel(
// porOrgacode: RequestConstants.porOrgacode,
// pctCstycode: RequestConstants.pctCstycode,
// channelCode: RequestConstants.channelCode,
// cmpCustcode: SessionCache.instance.userInfo.cmpCustcode,
// email: SessionCache.instance.userInfo.cmpUserId,
// pinType: "TRAN",
// transPincode: userTransactionPinField.getCustomText(),
// isOtpRequired: false,
// );
//
// ServerResponse response = await repository.sendTransactionStep1(transactionPinRequestModel);
// if (response.isError) {
// Toasty.error(response.errorMsg);
// return;
// }
// SendTransactionStep1ResponseModel step1responseModel = SendTransactionStep1ResponseModel.fromMap(response.response);
// transactionSubmitRequestModel.notificationId = step1responseModel.notificationId.toString();
Get.toNamed(Routes.INTERNAL_TRANSACTION_OPT);
// arguments: {
// AppConstants.SEND_TRANS_STEP1_DATA: transactionSubmitRequestModel,
// AppConstants.INTERNAL_TRANSACTION_PIN_REQUEST: transactionPinRequestModel,
// AppConstants.EXCHANGE_RATE: exchangeRateField.getCustomText(),
// });
if (!validate()) {
Toasty.error("Please input and then proceed");
return;
}
TransactionSubmitRequestModel transactionSubmitRequestModel = TransactionSubmitRequestModel(
porOrgacode: RequestConstants.porOrgacode,
pctCstycode: RequestConstants.pctCstycode,
channelCode: RequestConstants.channelCode,
cmpCustcode: SessionCache.instance.userInfo.cmpCustcode,
drMbmBkmsnumber: selectedFromAccount.value.mbmBkmsnumber,
drMbmBkmstitle: selectedFromAccount.value.mbmBkmstitle,
drPcrCurrcode: selectedFromAccount.value.pcrCurrcode,
drPcrCurrdesc: selectedFromAccount.value.pcrCurrdesc,
drPcrCurrshort: selectedFromAccount.value.pcrCurrshort,
crMbmBkmsnumber: selectedToAccount.value.mbmBkmsnumber,
crMbmBkmstitle: selectedToAccount.value.mbmBkmstitle,
crPcrCurrcode: selectedExchangeRate!.pcrCurrcode,
crPcrCurrdesc: selectedExchangeRate!.pcrCurrdesc,
crPcrCurrshort: selectedExchangeRate!.pcrCurrshort,
sgtGntrnarration: "",
dmpProdCode: selectedFromAccount.value.dmpProdcode,
transType: "DR",
notificationId: "",
transMode: "Online",
sgtGntramtfc: double.parse(sendingAmountField.getCustomText().isEmpty ? "0.0" : sendingAmountField.getCustomText()),
otdTrancomment: messageField.getCustomText(),
isOtpRequired: false,
cmpRefcode: referenceCodeField.getCustomText(),
);
dp("********************>>>>>>>>>>>>******************", transactionSubmitRequestModel);
TransactionPinRequestModel transactionPinRequestModel = TransactionPinRequestModel(
porOrgacode: RequestConstants.porOrgacode,
pctCstycode: RequestConstants.pctCstycode,
channelCode: RequestConstants.channelCode,
cmpCustcode: SessionCache.instance.userInfo.cmpCustcode,
email: SessionCache.instance.userInfo.cmpUserId,
pinType: "TRAN",
transPincode: userTransactionPinField.getCustomText(),
isOtpRequired: false,
);
ServerResponse response = await repository.sendTransactionStep1(transactionPinRequestModel);
if (response.isError) {
Toasty.error(response.errorMsg);
return;
}
SendTransactionStep1ResponseModel step1responseModel = SendTransactionStep1ResponseModel.fromMap(response.response);
transactionSubmitRequestModel.notificationId = step1responseModel.notificationId.toString();
Get.toNamed(Routes.INTERNAL_TRANSACTION_OPT,
arguments: {
AppConstants.SEND_TRANS_STEP1_DATA: transactionSubmitRequestModel,
AppConstants.INTERNAL_TRANSACTION_PIN_REQUEST: transactionPinRequestModel,
AppConstants.EXCHANGE_RATE: exchangeRateField.getCustomText(),
});
}
void clearTransaction() {

@ -63,19 +63,19 @@ class NotificationsController extends GetxController {
void onInit() {
//
// for (int i = 0; i < SessionCache.instance.depositAccountList.length; i++) {
// DepositAccount depositAccount =
// SessionCache.instance.depositAccountList.elementAt(i);
//
// allDepositAccounts.add(
// DropDown(
// i.toString(),
// "${depositAccount.mbmBkmstitle} - ${depositAccount.mbmBkmsnumber}",
// depositAccount),
// );
// }
// selectedDepositAccount.value = allDepositAccounts.first.data;
for (int i = 0; i < SessionCache.instance.depositAccountList.length; i++) {
DepositAccount depositAccount =
SessionCache.instance.depositAccountList.elementAt(i);
allDepositAccounts.add(
DropDown(
i.toString(),
"${depositAccount.mbmBkmstitle} - ${depositAccount.mbmBkmsnumber}",
depositAccount),
);
}
selectedDepositAccount.value = allDepositAccounts.first.data;
super.onInit();
}

Loading…
Cancel
Save