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_sort = "assets/$ORGANIZATION/icons/ic_sort.png";
static const ic_featured = "assets/$ORGANIZATION/icons/ic_featured.svg"; static const ic_featured = "assets/$ORGANIZATION/icons/ic_featured.svg";
static const ic_congratulations = "assets/$ORGANIZATION/icons/ic_congratulations.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"; static const ic_arrow = "assets/$ORGANIZATION/icons/ic_arrow.svg";

@ -1,5 +1,6 @@
class GLACCAddMoneyRequestModel { class GLACCAddMoneyRequestModel {
String porOrgacode = ""; String porOrgacode = "";
String plcLocacode="";
String pctCstycode = ""; String pctCstycode = "";
String channelCode = ""; String channelCode = "";
String cmpCustcode = ""; String cmpCustcode = "";
@ -22,6 +23,7 @@ class GLACCAddMoneyRequestModel {
GLACCAddMoneyRequestModel({ GLACCAddMoneyRequestModel({
this.porOrgacode = "", this.porOrgacode = "",
this.plcLocacode="",
this.pctCstycode = "", this.pctCstycode = "",
this.channelCode = "", this.channelCode = "",
this.cmpCustcode = "", this.cmpCustcode = "",
@ -45,6 +47,7 @@ class GLACCAddMoneyRequestModel {
GLACCAddMoneyRequestModel.empty() GLACCAddMoneyRequestModel.empty()
: this.porOrgacode = "", : this.porOrgacode = "",
this.plcLocacode="",
this.pctCstycode = "", this.pctCstycode = "",
this.channelCode = "", this.channelCode = "",
this.cmpCustcode = "", this.cmpCustcode = "",
@ -67,12 +70,13 @@ class GLACCAddMoneyRequestModel {
@override @override
String toString() { 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() { Map<String, dynamic> toMap() {
return { return {
'porOrgacode': this.porOrgacode, 'porOrgacode': this.porOrgacode,
'plcLocacode':this.plcLocacode,
'pctCstycode': this.pctCstycode, 'pctCstycode': this.pctCstycode,
'channelCode': this.channelCode, 'channelCode': this.channelCode,
'cmpCustcode': this.cmpCustcode, 'cmpCustcode': this.cmpCustcode,
@ -98,6 +102,7 @@ class GLACCAddMoneyRequestModel {
factory GLACCAddMoneyRequestModel.fromMap(Map<String, dynamic> map) { factory GLACCAddMoneyRequestModel.fromMap(Map<String, dynamic> map) {
return GLACCAddMoneyRequestModel( return GLACCAddMoneyRequestModel(
porOrgacode: map['porOrgacode'] ?? "", porOrgacode: map['porOrgacode'] ?? "",
plcLocacode: map['plcLocacode'] ?? "",
pctCstycode: map['pctCstycode'] ?? "", pctCstycode: map['pctCstycode'] ?? "",
channelCode: map['channelCode'] ?? "", channelCode: map['channelCode'] ?? "",
cmpCustcode: map['cmpCustcode'] ?? "", cmpCustcode: map['cmpCustcode'] ?? "",

@ -6,10 +6,13 @@ import 'package:timer_count_down/timer_controller.dart';
import '../../../core/config/server_response.dart'; import '../../../core/config/server_response.dart';
import '../../../core/constants/app_contants.dart'; import '../../../core/constants/app_contants.dart';
import '../../../core/data/repositories/app_repositories.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_dialog.dart';
import '../../../custom_widgets/custom_toasty.dart'; import '../../../custom_widgets/custom_toasty.dart';
import '../../../models/GLACCAddMoneyRequestModel.dart'; import '../../../models/GLACCAddMoneyRequestModel.dart';
import '../../../models/evaluated_cuency_model.dart'; import '../../../models/evaluated_cuency_model.dart';
import '../../../models/resend_otp_usend.dart';
import '../../../routes/app_pages.dart'; import '../../../routes/app_pages.dart';
import '../../general_ledger/controllers/general_ledger_controller.dart'; import '../../general_ledger/controllers/general_ledger_controller.dart';
@ -53,6 +56,7 @@ class AddMoneyOTPController extends GetxController {
return; return;
} }
transactionSubmitRequestModel; transactionSubmitRequestModel;
transactionSubmitRequestModel.plcLocacode = "0010";
transactionSubmitRequestModel.pinType = "TRAN"; transactionSubmitRequestModel.pinType = "TRAN";
transactionSubmitRequestModel.obpPincode = pinPutController.text; transactionSubmitRequestModel.obpPincode = pinPutController.text;
sendTransaction(); sendTransaction();
@ -78,12 +82,21 @@ class AddMoneyOTPController extends GetxController {
} }
void resenOtp() async { void resenOtp() async {
//
if (!isResend.value) { if (!isResend.value) {
Fluttertoast.showToast(msg: "Please wait for 1 minute"); Fluttertoast.showToast(msg: "Please wait for 1 minute");
return; 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; isResend.value = false;
countdownController.restart(); countdownController.restart();
Fluttertoast.showToast(msg: "OTP successfully send to your email address"); Fluttertoast.showToast(msg: "OTP successfully send to your email address");

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

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

Loading…
Cancel
Save