From f5422830b9f84b00b335860874a2b45d4c413597 Mon Sep 17 00:00:00 2001 From: Henry Hein Date: Thu, 1 Aug 2024 08:52:52 +0800 Subject: [PATCH] fix: re-enable virtual topup modal when balance is 0 --- scripts/config/pages.js | 2 +- .../user/account/top_up_virtual/pop_up.js | 2 +- .../app/user/top_up_virtual/pop_up.jsx | 28 +++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 src/templates/app/user/top_up_virtual/pop_up.jsx diff --git a/scripts/config/pages.js b/scripts/config/pages.js index 370d3179c2b..cde1341ac77 100644 --- a/scripts/config/pages.js +++ b/scripts/config/pages.js @@ -54,7 +54,7 @@ module.exports = [ // ['user/settings/professional', 'app/user/settings/professional', 'default', 'Professional Client'], // ['user/statementws', 'app/user/statement', 'default', 'Statement'], // ['user/telegram-bot', 'app/user/telegram_bot', 'default', 'Telegram Bot'], - // ['user/top_up_virtual_pop_up', 'app/user/top_up_virtual/pop_up', 'default', 'Top Up Virtual Account'], + ['user/top_up_virtual_pop_up', 'app/user/top_up_virtual/pop_up', 'default', 'Top Up Virtual Account'], // ['user/tnc_approvalws', 'app/user/tnc_approval', 'default', 'Terms and Conditions Approval'], // ['user/video-facility', 'app/user/video_facility', 'default', 'Video Room Facility'], diff --git a/src/javascript/app/pages/user/account/top_up_virtual/pop_up.js b/src/javascript/app/pages/user/account/top_up_virtual/pop_up.js index ca4451a32b7..2d6ec7c0c1f 100644 --- a/src/javascript/app/pages/user/account/top_up_virtual/pop_up.js +++ b/src/javascript/app/pages/user/account/top_up_virtual/pop_up.js @@ -68,7 +68,7 @@ const TopUpVirtualPopup = (() => { showPopup({ form_id, popup_id, - // url : urlFor('user/top_up_virtual_pop_up'), // Unused in pages.js. + url : urlFor('user/top_up_virtual_pop_up'), // Unused in pages.js. // TODO: Uncomment/update popup logic when restoring TopUpVirtualPopup. Removed JSX can be found in PR#592 (4f8e0ff) content_id : '#top_up', additionalFunction: () => { diff --git a/src/templates/app/user/top_up_virtual/pop_up.jsx b/src/templates/app/user/top_up_virtual/pop_up.jsx new file mode 100644 index 00000000000..069105f07cf --- /dev/null +++ b/src/templates/app/user/top_up_virtual/pop_up.jsx @@ -0,0 +1,28 @@ +import React from 'react'; + +const TopUpVirtualPopup = () => ( + +
+

{it.L('Top up Virtual Account')}

+

+

{it.L('Do you want to top up for another [_1]? If not, you can do this later on the [_2]Cashier page[_3], too.', '$10,000.00', ``, '')}

+
+
+ +   + +
+
+ +
+ +
+
+
+
+
+); + +export default TopUpVirtualPopup;