Skip to content

Commit

Permalink
merge branch:fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
kanikabansal-juspay committed Jan 28, 2025
2 parents db35b93 + 49bb20b commit f03c32e
Show file tree
Hide file tree
Showing 16 changed files with 141 additions and 38 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 2025.01.28.0

### Features

- Recovery product feature flag and folder structure ([#2141](https://github.com/juspay/hyperswitch-control-center/pull/2141)) ([`746f8b2`](https://github.com/juspay/hyperswitch-control-center/commit/746f8b286bb2a77b521ccc7bebb80eeccb253d2c))

### Bug Fixes

- Sdk checkout overlapping divs ([#2126](https://github.com/juspay/hyperswitch-control-center/pull/2126)) ([`bd240e5`](https://github.com/juspay/hyperswitch-control-center/commit/bd240e5ce65dfb2ebbebef91b271044be494e7ad))

**Full Changelog:** [`2025.01.27.0...2025.01.28.0`](https://github.com/juspay/hyperswitch-control-center/compare/2025.01.27.0...2025.01.28.0)

- - -

## 2025.01.27.0

### Bug Fixes
Expand Down
1 change: 1 addition & 0 deletions config/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ tenant_user=false
dev_click_to_pay=false
dev_recon_v2_product=false
dev_org_sidebar=false
dev_recovery_v2_product=false
maintainence_alert=""
[default.merchant_config]
[default.merchant_config.new_analytics]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@react.component
let make = () => {
"Revenue Recovery Billing Processors"->React.string
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@react.component
let make = () => {
"Revenue Recovery Home"->React.string
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@react.component
let make = () => {
"Revenue Recovery Payment Processors"->React.string
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@react.component
let make = () => {
"Revenue Recovery Payments"->React.string
}
2 changes: 2 additions & 0 deletions src/entryPoints/FeatureFlagUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type featureFlag = {
clickToPay: bool,
devThemeFeature: bool,
devReconv2Product: bool,
devRecoveryV2Product: bool,
maintainenceAlert: string,
forceCookies: bool,
devOrgSidebar: bool,
Expand Down Expand Up @@ -91,6 +92,7 @@ let featureFlagType = (featureFlags: JSON.t) => {
tenantUser: dict->getBool("tenant_user", false),
devThemeFeature: dict->getBool("dev_theme_feature", false),
devReconv2Product: dict->getBool("dev_recon_v2_product", false),
devRecoveryV2Product: dict->getBool("dev_recovery_v2_product", false),
maintainenceAlert: dict->getString("maintainence_alert", ""),
forceCookies: dict->getBool("force_cookies", false),
devOrgSidebar: dict->getBool("dev_org_sidebar", false),
Expand Down
25 changes: 0 additions & 25 deletions src/entryPoints/HSReconApp.res

This file was deleted.

7 changes: 4 additions & 3 deletions src/entryPoints/HyperSwitchApp.res
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let make = () => {

let maintainenceAlert = featureFlagDetails.maintainenceAlert
let hyperSwitchAppSidebars = SidebarValues.useGetSidebarValues(~isReconEnabled)
let reconSidebars = HSReconSidebarValues.useGetReconSideBar()
let productSidebars = ProductsSidebarValues.useGetSideBarValues()
sessionExpired := false

let setUpDashboard = async () => {
Expand Down Expand Up @@ -113,7 +113,7 @@ let make = () => {
path={url.path}
sidebars={hyperSwitchAppSidebars}
key={(screenState :> string)}
productSiebars={reconSidebars}
productSiebars=productSidebars
/>
</RenderIf>
<PageLoaderWrapper
Expand Down Expand Up @@ -155,7 +155,8 @@ let make = () => {
className="p-6 md:px-16 md:pb-16 pt-[4rem] flex flex-col gap-10 max-w-fixedPageWidth">
<ErrorBoundary>
{switch url.path->urlPath {
| list{"v2", "recon", ..._} => <HSReconApp />
| list{"v2", "recon", ..._} => <ReconApp />
| list{"v2", "recovery", ..._} => <RevenueRecoveryApp />
| list{"home", ..._}
| list{"recon"}
| list{"upload-files"}
Expand Down
20 changes: 20 additions & 0 deletions src/entryPoints/ProductsSidebarValues.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
open SidebarTypes
let emptyComponent = CustomComponent({
component: React.null,
})

let useGetSideBarValues = () => {
let {devReconv2Product, devRecoveryV2Product} =
HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom
let sideBarValues = []

if devReconv2Product {
sideBarValues->Array.push(ReconSidebarValues.reconSidebars)
}

if devRecoveryV2Product {
sideBarValues->Array.push(RevenueRecoverySidebarValues.recoverySidebars)
}

sideBarValues
}
14 changes: 14 additions & 0 deletions src/entryPoints/ReconApp/ReconApp.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@react.component
let make = () => {
let url = RescriptReactRouter.useUrl()

{
switch url.path->HSwitchUtils.urlPath {
| list{"v2", "recon", "onboarding"} => <ReconOnBoardingContainer />
| list{"v2", "recon", "configuration"} => <ReconConfigurationContainer />
| list{"v2", "recon", "home"} => <ReconHomeContainer />
| list{"v2", "recon", "analytics"} => <ReconAnalyticsContainer />
| _ => React.null
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let reconAnalytics = {
})
}

let recon = () => {
let reconSidebars = {
let links = [reconOnBoarding, reconAnalytics]
Section({
name: "Recon And Settlement",
Expand All @@ -34,12 +34,3 @@ let recon = () => {
links,
})
}
let emptyComponent = CustomComponent({
component: React.null,
})

let useGetReconSideBar = () => {
let {devReconv2Product} = HyperswitchAtom.featureFlagAtom->Recoil.useRecoilValueFromAtom
let sidebar = [devReconv2Product ? recon() : emptyComponent]
sidebar
}
14 changes: 14 additions & 0 deletions src/entryPoints/RevenueRecoveryApp/RevenueRecoveryApp.res
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@react.component
let make = () => {
let url = RescriptReactRouter.useUrl()

{
switch url.path->HSwitchUtils.urlPath {
| list{"v2", "recovery", "home"} => <RevenueRecoveryHome />
| list{"v2", "recovery", "payment-processors"} => <RevenueRecoveryPaymentProcessors />
| list{"v2", "recovery", "billing-processors"} => <RevenueRecoveryBillingProcessors />
| list{"v2", "recovery", "payments"} => <RevenueRecoveryPayments />
| _ => React.null
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
open SidebarTypes

let revenueRecoveryHome = {
SubLevelLink({
name: "Home",
link: `v2/recovery/home`,
access: Access,
searchOptions: [("Recovery home", "")],
})
}

let revenueRecoveryPaymentProcessors = {
SubLevelLink({
name: "Payment Processors",
link: `v2/recovery/payment-processors`,
access: Access,
searchOptions: [("Payment Processors", "")],
})
}

let revenueRecoveryBillingProcessors = {
SubLevelLink({
name: "Billing Processors",
link: `v2/recovery/billing-processors`,
access: Access,
searchOptions: [("Billing Processors", "")],
})
}

let revenueRecoveryPayments = {
SubLevelLink({
name: "Payments",
link: `v2/recovery/payments`,
access: Access,
searchOptions: [("Payments", "")],
})
}

let recoverySidebars = {
let links = [
revenueRecoveryHome,
revenueRecoveryPayments,
revenueRecoveryPaymentProcessors,
revenueRecoveryBillingProcessors,
]

Section({
name: "Recovery",
icon: "v2/recovery",
showSection: true,
links,
})
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module ProfileActions = {
"Profile name cannot exceed 64 characters"
} else if !RegExp.test(RegExp.fromString(regexForProfileName), profileName) {
"Profile name should not contain special characters"
} else if profileName === defaultProfileName {
"Profile name cannot be same as the current profile name"
} else {
""
}
Expand Down

0 comments on commit f03c32e

Please sign in to comment.