From a8660534c981bfc79f164bfff0d2f1de783969a6 Mon Sep 17 00:00:00 2001 From: sawara-mfsys Date: Thu, 14 May 2026 11:53:49 +0500 Subject: [PATCH] Enable QR routes, refine UReceived UI & tweaks Uncomment and re-enable QrSettingBinding and QR routes in app_pages to restore QR screens. Refactor UReceivedView layout: tidy formatting, adjust paddings, improve ExpansionTile content (memo truncation, spacing, styles), and better widget line breaks for readability. Comment out the persistent footer button in AddNewAccountView. Comment out the old-vs-new transaction PIN equality check in ChangeTransactionPinController. Miscellaneous formatting and minor UI/behavior cleanups. --- .../views/add_new_account_view.dart | 26 +-- .../change_transaction_pin_controller.dart | 8 +- .../bindings/qr_setting_binding.dart | 24 +-- .../u_received/views/u_received_view.dart | 155 +++++++++++++++--- lib/app/routes/app_pages.dart | 20 +-- 5 files changed, 171 insertions(+), 62 deletions(-) diff --git a/lib/app/modules/add_new_account/views/add_new_account_view.dart b/lib/app/modules/add_new_account/views/add_new_account_view.dart index e5667ef..a862ba6 100644 --- a/lib/app/modules/add_new_account/views/add_new_account_view.dart +++ b/lib/app/modules/add_new_account/views/add_new_account_view.dart @@ -20,19 +20,19 @@ class AddNewAccountView extends GetView { String className = runtimeType.toString().split('.').last; return Scaffold( - persistentFooterButtons: [ - Padding( - padding: const EdgeInsets.only(left: 20, right: 30, bottom: 10), - child: CustomButton( - onPressed: () { - controller.validateAndSendRequest(); - }, - buttonText: TranslationKeys.makeTranslation(TranslationKeys.textCreateAccount), - buttonColor: AppColors.colorButton, - buttonPadding: const EdgeInsets.only(top: 12, bottom: 12), - ), - ) - ], + // persistentFooterButtons: [ + // Padding( + // padding: const EdgeInsets.only(left: 20, right: 30, bottom: 10), + // child: CustomButton( + // onPressed: () { + // controller.validateAndSendRequest(); + // }, + // buttonText: TranslationKeys.makeTranslation(TranslationKeys.textCreateAccount), + // buttonColor: AppColors.colorButton, + // buttonPadding: const EdgeInsets.only(top: 12, bottom: 12), + // ), + // ) + // ], appBar: DashBoardAppBar( title: TranslationKeys.makeTranslation(TranslationKeys.textAddAccount), onBackButtonPressed: () { diff --git a/lib/app/modules/change_transaction_pin/controllers/change_transaction_pin_controller.dart b/lib/app/modules/change_transaction_pin/controllers/change_transaction_pin_controller.dart index ced1bf8..6a4d2f4 100644 --- a/lib/app/modules/change_transaction_pin/controllers/change_transaction_pin_controller.dart +++ b/lib/app/modules/change_transaction_pin/controllers/change_transaction_pin_controller.dart @@ -34,10 +34,10 @@ class ChangeTransactionPinController extends GetxController { return; } - if (oldTransactionPinController.text != newTransactionPinController.text) { - Toasty.error("Old and New Transaction Pin not match!"); - return; - } + // if (oldTransactionPinController.text != newTransactionPinController.text) { + // Toasty.error("Old and New Transaction Pin not match!"); + // return; + // } if (newTransactionPinController.text != confirmTransactionPinController.text) { Toasty.error("New and Confirm Transaction Pin not match!"); diff --git a/lib/app/modules/qr_setting/bindings/qr_setting_binding.dart b/lib/app/modules/qr_setting/bindings/qr_setting_binding.dart index 01a74c9..1b43262 100644 --- a/lib/app/modules/qr_setting/bindings/qr_setting_binding.dart +++ b/lib/app/modules/qr_setting/bindings/qr_setting_binding.dart @@ -1,12 +1,12 @@ -// import 'package:get/get.dart'; -// -// import '../controllers/qr_setting_controller.dart'; -// -// class QrSettingBinding extends Bindings { -// @override -// void dependencies() { -// Get.lazyPut( -// () => QrSettingController(), -// ); -// } -// } +import 'package:get/get.dart'; + +import '../controllers/qr_setting_controller.dart'; + +class QrSettingBinding extends Bindings { + @override + void dependencies() { + Get.lazyPut( + () => QrSettingController(), + ); + } +} diff --git a/lib/app/modules/u_received/views/u_received_view.dart b/lib/app/modules/u_received/views/u_received_view.dart index 666d1ff..6d0dcd8 100644 --- a/lib/app/modules/u_received/views/u_received_view.dart +++ b/lib/app/modules/u_received/views/u_received_view.dart @@ -24,7 +24,9 @@ class UReceivedView extends GetView { return Scaffold( appBar: showAppBar ? DashBoardAppBar( - title: TranslationKeys.makeTranslation(TranslationKeys.textUReceived), + title: TranslationKeys.makeTranslation( + TranslationKeys.textUReceived, + ), onBackButtonPressed: () { Get.back(); }, @@ -37,8 +39,12 @@ class UReceivedView extends GetView { Padding( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0), child: controller.depositAccountField = InputField( - refKey: FormFieldConstants.instance().getFormKey("${className}depositAccountField"), - controller: FormFieldConstants.instance().getController("${className}depositAccountField"), + refKey: FormFieldConstants.instance().getFormKey( + "${className}depositAccountField", + ), + controller: FormFieldConstants.instance().getController( + "${className}depositAccountField", + ), labelText: "Select Account", suffixIcon: const Icon(Icons.keyboard_arrow_down, size: 25), isDropDown: true, @@ -53,7 +59,12 @@ class UReceivedView extends GetView { const SizedBox(height: 10), Padding( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10), - child: Text(TranslationKeys.makeTranslation(TranslationKeys.textPendingRemittance), style: Theme.of(context).textTheme.bodyMedium), + child: Text( + TranslationKeys.makeTranslation( + TranslationKeys.textPendingRemittance, + ), + style: Theme.of(context).textTheme.bodyMedium, + ), ), controller.uReceivedData.isNotEmpty ? Expanded( @@ -61,19 +72,35 @@ class UReceivedView extends GetView { child: ListView.builder( itemCount: controller.uReceivedData.length, itemBuilder: (context, index) { - UReceivedResponseData data = controller.uReceivedData[index]; + UReceivedResponseData data = + controller.uReceivedData[index]; return Padding( - padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 15.0), + padding: const EdgeInsets.symmetric( + vertical: 3.0, + horizontal: 15.0, + ), child: Container( - decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(5.0)), border: Border.all(color: AppColors.colorGrey350, width: 1.5)), + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(5.0), + ), + border: Border.all( + color: AppColors.colorGrey350, + width: 1.5, + ), + ), child: ExpansionTile( collapsedBackgroundColor: Colors.white, - tilePadding: const EdgeInsets.symmetric(vertical: 0, horizontal: 10), + tilePadding: const EdgeInsets.symmetric( + vertical: 0, + horizontal: 10, + ), dense: false, // onExpansionChanged: controller.toggleExpansion(), maintainState: true, expandedAlignment: Alignment.topLeft, - expandedCrossAxisAlignment: CrossAxisAlignment.start, + expandedCrossAxisAlignment: + CrossAxisAlignment.start, childrenPadding: const EdgeInsets.all(10), //tilePadding: EdgeInsets.all(8.0), collapsedShape: RoundedRectangleBorder( @@ -84,46 +111,110 @@ class UReceivedView extends GetView { backgroundColor: AppColors.white, leading: Padding( padding: const EdgeInsets.only(top: 3.0), - child: Text("${data.drPcrCurrshort} ${data.sgtGntramt}", style: Theme.of(context).textTheme.bodyMedium?.copyWith(color: AppColors.colorDialogBG)), + child: Text( + "${data.drPcrCurrshort} ${data.sgtGntramt}", + style: Theme.of(context).textTheme.bodyMedium + ?.copyWith( + color: AppColors.colorDialogBG, + ), + ), ), trailing: const Icon( Icons.keyboard_arrow_down_outlined, size: 25, color: AppColors.colorGrey700, ), - title: Text(data.drmbmBkmstitle ?? "-", style: Theme.of(context).textTheme.labelMedium), + title: Text( + data.drmbmBkmstitle ?? "-", + style: Theme.of(context).textTheme.labelMedium, + ), children: [ - Text("${data.drPcrCurrshort} ${data.sgtGntramt}", style: Theme.of(context).textTheme.titleSmall?.copyWith(color: AppColors.colorButton)), + Text( + "${data.drPcrCurrshort} ${data.sgtGntramt}", + style: Theme.of(context).textTheme.titleSmall + ?.copyWith(color: AppColors.colorButton), + ), const SizedBox(height: 5), Row( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text("Memo: ", style: Theme.of(context).textTheme.labelSmall), - Text(data.toString(), style: Theme.of(context).textTheme.labelSmall), + Text( + "Memo: ", + style: Theme.of( + context, + ).textTheme.labelSmall, + ), + + Expanded( + child: Text( + data.toString(), + style: Theme.of( + context, + ).textTheme.labelSmall, + maxLines: 2, + overflow: TextOverflow.ellipsis, + ), + ), ], ), const SizedBox(height: 5), Row( children: [ - Text("Sent: ", style: Theme.of(context).textTheme.labelSmall), - Text(data.drSgtGntrdate.toString(), style: Theme.of(context).textTheme.labelSmall), + Text( + "Sent: ", + style: Theme.of( + context, + ).textTheme.labelSmall, + ), + + Text( + data.drSgtGntrdate.toString(), + style: Theme.of( + context, + ).textTheme.labelSmall, + ), ], ), const SizedBox(height: 5), - Text("Expires Date: ${data.expSgtGntrdate} ", style: Theme.of(context).textTheme.labelSmall), + Text( + "Expires Date: ${data.expSgtGntrdate} ", + style: Theme.of(context).textTheme.labelSmall, + ), const SizedBox(height: 5), - Text("Transaction-ID: ${data.sgtSentGntrnumber.toString()}${data.sgtSentNodeId}", style: Theme.of(context).textTheme.labelSmall), + Text( + "Transaction-ID: ${data.sgtSentGntrnumber.toString()}${data.sgtSentNodeId}", + style: Theme.of(context).textTheme.labelSmall, + ), const SizedBox(height: 5), - Text("Sender: ${data.drmbmBkmstitle}", style: Theme.of(context).textTheme.labelSmall), + Text( + "Sender: ${data.drmbmBkmstitle}", + style: Theme.of(context).textTheme.labelSmall, + ), const SizedBox(height: 20), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ InkWell( onTap: () { - controller.reverseTransactionRequest(data.sgtSentGntrnumber, data.sgtSentNodeId); + controller.reverseTransactionRequest( + data.sgtSentGntrnumber, + data.sgtSentNodeId, + ); }, child: Column( - children: [SvgPicture.asset(AppAssets.ic_cross_option, height: 22, width: 22), const SizedBox(height: 5), CustomText(TranslationKeys.makeTranslation(TranslationKeys.textReverse))], + children: [ + SvgPicture.asset( + AppAssets.ic_cross_option, + height: 22, + width: 22, + ), + const SizedBox(height: 5), + CustomText( + TranslationKeys.makeTranslation( + TranslationKeys.textReverse, + ), + ), + ], ), ), const SizedBox(width: 30), @@ -132,7 +223,19 @@ class UReceivedView extends GetView { controller.acceptTransaction(data); }, child: Column( - children: [SvgPicture.asset(AppAssets.ic_tick_option, height: 22, width: 22), const SizedBox(height: 5), CustomText(TranslationKeys.makeTranslation(TranslationKeys.textReceived))], + children: [ + SvgPicture.asset( + AppAssets.ic_tick_option, + height: 22, + width: 22, + ), + const SizedBox(height: 5), + CustomText( + TranslationKeys.makeTranslation( + TranslationKeys.textReceived, + ), + ), + ], ), ), ], @@ -144,7 +247,13 @@ class UReceivedView extends GetView { }, ), ) - : const Center(child: CustomNoRecord(title: "No Record Found", description: "We couldn't find any activity at this moment")), + : const Center( + child: CustomNoRecord( + title: "No Record Found", + description: + "We couldn't find any activity at this moment", + ), + ), ], ); }), diff --git a/lib/app/routes/app_pages.dart b/lib/app/routes/app_pages.dart index 86f525b..363e988 100644 --- a/lib/app/routes/app_pages.dart +++ b/lib/app/routes/app_pages.dart @@ -384,11 +384,11 @@ class AppPages { // page: () => responsiveWidget(const ChangeTransactionPinOtpView()), // binding: ChangeTransactionPinOtpBinding(), // ), - // GetPage( - // name: _Paths.QR_SETTING, - // page: () => responsiveWidget(const QrSettingView()), - // binding: QrSettingBinding(), - // ), + GetPage( + name: _Paths.QR_SETTING, + page: () => responsiveWidget(const QrSettingView()), + binding: QrSettingBinding(), + ), GetPage( name: _Paths.NOTIFICATIONS, page: () => responsiveWidget(const NotificationsView()), @@ -408,11 +408,11 @@ class AppPages { name: _Paths.qrViewScreen, page: () => responsiveWidget(const QrViewScreen()), ), - // GetPage( - // name: _Paths.qrScanView, - // page: () => responsiveWidget(const QrScanScreen()), - // binding: QrSettingBinding(), - // ), + GetPage( + name: _Paths.qrScanView, + page: () => responsiveWidget(const QrScanScreen()), + binding: QrSettingBinding(), + ), GetPage( name: _Paths.GENERAL_LEDGER, page: () => responsiveWidget(const GeneralLedgerView()),