Skip to content

Commit

Permalink
Merge branch 'create-seperate-webpack' of github.com:juspay/hyperswit…
Browse files Browse the repository at this point in the history
…ch-control-center into create-seperate-webpack
  • Loading branch information
JeevaRamu0104 committed Oct 15, 2024
2 parents e25a131 + a55cd11 commit 7e29d3b
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 57 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 2024.10.14.1

### Features

- Fiuu google pay gateway name ([#1597](https://github.com/juspay/hyperswitch-control-center/pull/1597)) ([`721cd4a`](https://github.com/juspay/hyperswitch-control-center/commit/721cd4a6cabc72e77850b2b8a8b0996cb91cd72d))

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

- - -

## 2024.10.14.0

### Bug Fixes

- Unauthorised page issue ([#1588](https://github.com/juspay/hyperswitch-control-center/pull/1588)) ([`8241854`](https://github.com/juspay/hyperswitch-control-center/commit/824185436c979389fb1bf87567ce9956abb748f2))

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

- - -

## 2024.10.11.0

### Bug Fixes
Expand Down
14 changes: 0 additions & 14 deletions src/components/SelectBox.res
Original file line number Diff line number Diff line change
Expand Up @@ -1105,20 +1105,6 @@ module RenderListItemInBaseRadio = {
~selectClass="",
~customScrollStyle=?,
) => {
let decodedValue = value->JSON.Decode.string
switch decodedValue {
| Some(str) =>
newOptions->Array.sort((item1, item2) => {
if item1.value == str {
-1.
} else if item2.value == str {
1.
} else {
0.
}
})
| None => ()
}
let dropdownList =
newOptions
->Array.mapWithIndex((option, i) => {
Expand Down
69 changes: 35 additions & 34 deletions src/entryPoints/HyperSwitchApp.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ let make = () => {
let hyperSwitchAppSidebars = SidebarValues.useGetSidebarValues(~isReconEnabled)
sessionExpired := false

let (renderKey, setRenderkey) = React.useState(_ => "")

let setUpDashboard = async () => {
try {
// NOTE: Treat groupACL map similar to screenstate
setScreenState(_ => PageLoaderWrapper.Loading)
setuserGroupACL(_ => None)
Window.connectorWasmInit()->ignore
let _ = await fetchUserGroupACL()
Expand All @@ -49,9 +48,8 @@ let make = () => {
| _ => ()
}
setDashboardPageState(_ => #HOME)
setRenderkey(_ => profileId)
} catch {
| _ => setScreenState(_ => PageLoaderWrapper.Error(""))
| _ => setScreenState(_ => PageLoaderWrapper.Error("Failed to setup dashboard!"))
}
}
let path = url.path->List.toArray->Array.joinWith("/")
Expand All @@ -76,18 +74,21 @@ let make = () => {
}, [userGroupACL])

<>
<PageLoaderWrapper screenState={screenState} sectionHeight="!h-screen" showLogoutButton=true>
<div>
{switch dashboardPageState {
| #AUTO_CONNECTOR_INTEGRATION => <HSwitchSetupAccount />
// INTEGRATION_DOC Need to be removed
| #INTEGRATION_DOC => <UserOnboarding />
| #HOME =>
<div className="relative" key={renderKey}>
// TODO: Change the key to only profileId once the userInfo starts sending profileId
<div className={`h-screen flex flex-col`}>
<div className="flex relative overflow-auto h-screen ">
<Sidebar path={url.path} sidebars={hyperSwitchAppSidebars} />
<div>
{switch dashboardPageState {
| #AUTO_CONNECTOR_INTEGRATION => <HSwitchSetupAccount />
// INTEGRATION_DOC Need to be removed
| #INTEGRATION_DOC => <UserOnboarding />
| #HOME =>
<div className="relative">
// TODO: Change the key to only profileId once the userInfo starts sending profileId
<div className={`h-screen flex flex-col`}>
<div className="flex relative overflow-auto h-screen ">
<Sidebar
path={url.path} sidebars={hyperSwitchAppSidebars} key={(screenState :> string)}
/>
<PageLoaderWrapper
screenState={screenState} sectionHeight="!h-screen w-full" showLogoutButton=true>
<div
className="flex relative flex-col flex-1 bg-hyperswitch_background dark:bg-black overflow-scroll md:overflow-x-hidden">
<div className="border-b shadow hyperswitch_box_shadow ">
Expand Down Expand Up @@ -275,25 +276,25 @@ let make = () => {
</div>
</div>
</div>
</div>
<RenderIf condition={showFeedbackModal && featureFlagDetails.feedback}>
<HSwitchFeedBackModal
modalHeading="We'd love to hear from you!"
showModal={showFeedbackModal}
setShowModal={setShowFeedbackModal}
/>
</RenderIf>
<RenderIf condition={!featureFlagDetails.isLiveMode || featureFlagDetails.quickStart}>
<ProdIntentForm />
</RenderIf>
</PageLoaderWrapper>
</div>
<RenderIf condition={showFeedbackModal && featureFlagDetails.feedback}>
<HSwitchFeedBackModal
modalHeading="We'd love to hear from you!"
showModal={showFeedbackModal}
setShowModal={setShowFeedbackModal}
/>
</RenderIf>
<RenderIf condition={!featureFlagDetails.isLiveMode || featureFlagDetails.quickStart}>
<ProdIntentForm />
</RenderIf>
</div>
| #DEFAULT =>
<div className="h-screen flex justify-center items-center">
<Loader />
</div>
}}
</div>
</PageLoaderWrapper>
</div>
| #DEFAULT =>
<div className="h-screen flex justify-center items-center">
<Loader />
</div>
}}
</div>
</>
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ let getCustomGateWayName = connector => {
| Processors(AUTHORIZEDOTNET) => "authorizenet"
| Processors(GLOBALPAY) => "globalpayments"
| Processors(BANKOFAMERICA) | Processors(CYBERSOURCE) => "cybersource"
| Processors(FIUU) => "molpay"
| _ => connector
}
}
Expand Down
1 change: 1 addition & 0 deletions src/screens/Helpers/PageLoaderWrapper.res
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@unboxed
type viewType = Loading | Error(string) | Success | Custom

module ScreenLoader = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ let paymentLifeCycleResponseMapper = (json: JSON.t) => {
let valueDict = json->getDictFromJsonObject
// response need to be changed to snake_case
{
normalSuccess: valueDict->getInt("normalSuccess", 0),
normalFailure: valueDict->getInt("normalFailure", 0),
normalSuccess: valueDict->getInt("normal_success", 0),
normalFailure: valueDict->getInt("normal_failure", 0),
cancelled: valueDict->getInt("cancelled", 0),
smartRetriedSuccess: valueDict->getInt("smartRetriedSuccess", 0),
smartRetriedFailure: valueDict->getInt("smartRetriedFailure", 0),
smartRetriedSuccess: valueDict->getInt("smart_retried_success", 0),
smartRetriedFailure: valueDict->getInt("smart_retried_failure", 0),
pending: valueDict->getInt("pending", 0),
partialRefunded: valueDict->getInt("partialRefunded", 0),
partialRefunded: valueDict->getInt("partial_refunded", 0),
refunded: valueDict->getInt("refunded", 0),
disputed: valueDict->getInt("disputed", 0),
pmAwaited: valueDict->getInt("pmAwaited", 0),
customerAwaited: valueDict->getInt("customerAwaited", 0),
merchantAwaited: valueDict->getInt("merchantAwaited", 0),
confirmationAwaited: valueDict->getInt("confirmationAwaited", 0),
pmAwaited: valueDict->getInt("pm_awaited", 0),
customerAwaited: valueDict->getInt("customer_awaited", 0),
merchantAwaited: valueDict->getInt("merchant_awaited", 0),
confirmationAwaited: valueDict->getInt("confirmation_awaited", 0),
}
}

Expand Down

0 comments on commit 7e29d3b

Please sign in to comment.