diff --git a/lib/helpers/services/api_endpoints.dart b/lib/helpers/services/api_endpoints.dart index c0c360b..15f24d7 100644 --- a/lib/helpers/services/api_endpoints.dart +++ b/lib/helpers/services/api_endpoints.dart @@ -110,4 +110,14 @@ class ApiEndpoints { static const String tenantSubscribe = '/Tenant/self/subscription'; static const String tenantRenewSubscription = '/Tenant/renew/subscription'; static const String getIndustries = '/market/industries'; + + // Payment Module API Endpoints + static const String createOrder = "/payment/create-order"; + static const String verifyPayment = "/payment/verify-payment"; + + // Tenant endpoints + static const String createTenantSelf = '/Tenant/self/create'; + static const String tenantSubscribe = '/Tenant/self/subscription'; + static const String tenantRenewSubscription = '/Tenant/renew/subscription'; + static const String getIndustries = '/market/industries'; } diff --git a/lib/view/auth/login_option_screen.dart b/lib/view/auth/login_option_screen.dart index ea6d5b9..154ab6f 100644 --- a/lib/view/auth/login_option_screen.dart +++ b/lib/view/auth/login_option_screen.dart @@ -142,6 +142,13 @@ class _WelcomeScreenState extends State option: null, ), const SizedBox(height: 16), + _buildActionButton( + context, + label: "Subscribe", + icon: LucideIcons.bell, + option: null, + ), + const SizedBox(height: 16), _buildActionButton( context, label: "Request a Demo", @@ -250,6 +257,10 @@ class _WelcomeScreenState extends State shadowColor: Colors.black26, ), onPressed: () { + if (label == "Subscribe") { + Get.toNamed('/subscription'); // Navigate to Subscription screen + return; + } if (label == "Subscribe") { Get.toNamed('/subscription'); // Navigate to Subscription screen return; diff --git a/lib/view/layouts/user_profile_right_bar.dart b/lib/view/layouts/user_profile_right_bar.dart index 7b19564..2002e93 100644 --- a/lib/view/layouts/user_profile_right_bar.dart +++ b/lib/view/layouts/user_profile_right_bar.dart @@ -132,6 +132,12 @@ class _UserProfileBarState extends State final TenantSwitchController tenantSwitchController = Get.put(TenantSwitchController()); + return Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), + child: Obx(() { + if (tenantSwitchController.isLoading.value) { + return _loadingTenantContainer(); + } return Padding( padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6), child: Obx(() { @@ -139,9 +145,12 @@ class _UserProfileBarState extends State return _loadingTenantContainer(); } + final tenants = tenantSwitchController.tenants; + if (tenants.isEmpty) return _noTenantContainer(); final tenants = tenantSwitchController.tenants; if (tenants.isEmpty) return _noTenantContainer(); + final selectedTenant = TenantService.currentTenant; final selectedTenant = TenantService.currentTenant; final sortedTenants = List.of(tenants); @@ -324,6 +333,14 @@ class _UserProfileBarState extends State textColor: Colors.redAccent, ), SizedBox(height: spacingHeight), + _menuItemRow( + icon: LucideIcons.bell, + label: 'Subscribe', + onTap: _onSubscribeTap, + iconColor: Colors.redAccent, + textColor: Colors.redAccent, + ), + SizedBox(height: spacingHeight), _menuItemRow( icon: LucideIcons.settings, label: 'Settings', @@ -398,6 +415,11 @@ class _UserProfileBarState extends State } + void _onSubscribeTap() { + Get.toNamed("/subscription"); + } + + void _onMpinTap() { final controller = Get.put(MPINController()); if (hasMpin) controller.setChangeMpinMode();