Skip to content

Commit

Permalink
Merge branch 'main' into auth-page-ui-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeevaRamu0104 authored Dec 26, 2023
2 parents e068c50 + aeb4927 commit 509da0a
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 64 deletions.
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,50 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 1.14.0 (2023-12-24)

### Features

- Sidebar expansion close ([#126](https://github.com/juspay/hyperswitch-control-center/pull/126)) ([`ea91fba`](https://github.com/juspay/hyperswitch-control-center/commit/ea91fba4505fc8b64e0bc161ca41d1395fb83af2))

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

- - -


## 1.13.1 (2023-12-21)

### Bug Fixes

- Disable-user-invite-button ([#124](https://github.com/juspay/hyperswitch-control-center/pull/124)) ([`36177c7`](https://github.com/juspay/hyperswitch-control-center/commit/36177c71ae369b1b82c16b6ed59d298a646efc3a))

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

- - -


## 1.13.0 (2023-12-20)

### Features

- New wasm changes ([#114](https://github.com/juspay/hyperswitch-control-center/pull/114)) ([`758f80d`](https://github.com/juspay/hyperswitch-control-center/commit/758f80d945bd558f7059b8ec40b2b373aaa2e77a))
- Dropdown grouping added in routing ([#102](https://github.com/juspay/hyperswitch-control-center/pull/102)) ([`52933b4`](https://github.com/juspay/hyperswitch-control-center/commit/52933b434dd6920e821a465b51c5bbb46ced68cd))
- Resend Invite Removal ([#121](https://github.com/juspay/hyperswitch-control-center/pull/121)) ([`3551622`](https://github.com/juspay/hyperswitch-control-center/commit/35516226ad3e784626812e4a3be09dcb165a867d))

### Bug Fixes

- Connector UI Issue. ([#113](https://github.com/juspay/hyperswitch-control-center/pull/113)) ([`ad28e1c`](https://github.com/juspay/hyperswitch-control-center/commit/ad28e1ca72f3d57407cb679a451e43ccd94ae2de))
- Signout API removed. ([#116](https://github.com/juspay/hyperswitch-control-center/pull/116)) ([`af13892`](https://github.com/juspay/hyperswitch-control-center/commit/af13892017a5ca1e4bac8dcbe26d837a87467634))
- Connector files changes for paypal onboarding ([#115](https://github.com/juspay/hyperswitch-control-center/pull/115)) ([`74f327c`](https://github.com/juspay/hyperswitch-control-center/commit/74f327c5067a17d44313492e0032422a70d8aa9d))
- Metadata field issue fix ([#117](https://github.com/juspay/hyperswitch-control-center/pull/117)) ([`585674a`](https://github.com/juspay/hyperswitch-control-center/commit/585674a5fe324492c290c1e6ec32fd8b71822402))
- Typos in readme - fix typos in Readme.md ([#105](https://github.com/juspay/hyperswitch-control-center/pull/105)) ([`c88dcd2`](https://github.com/juspay/hyperswitch-control-center/commit/c88dcd23a8c291fd538ba6c4631a15cdf28c502d))
- Refunds reports end point change ([#119](https://github.com/juspay/hyperswitch-control-center/pull/119)) ([`ffc819e`](https://github.com/juspay/hyperswitch-control-center/commit/ffc819ef39c33f7a58e560cd3d1a1e7184ef4eba))

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

- - -


## 1.12.0 (2023-12-19)

### Features
Expand Down
1 change: 1 addition & 0 deletions src/screens/HyperSwitch/APIUtils/APIUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ let getURL = (
| #INVITE
| #RESEND_INVITE =>
`${userUrl}/user/${(userType :> string)->Js.String2.toLowerCase}`

| #SWITCH_MERCHANT =>
switch methodType {
| Get => `${userUrl}/switch/list`
Expand Down
62 changes: 22 additions & 40 deletions src/screens/HyperSwitch/Sidebar/Sidebar.res
Original file line number Diff line number Diff line change
Expand Up @@ -216,25 +216,6 @@ module NestedSidebarItem = {
</Link>
</UIUtils.RenderIf>
}

| SubLevelRemoteLink(tabOption) => {
let {name, link, access, ?remoteIcon} = tabOption
let (remoteUi, link) = if remoteIcon->Belt.Option.getWithDefault(false) {
(<Icon name="external-link-alt" size=14 className="ml-3" />, link)
} else {
(React.null, `${link}${getSearchParamByLink(link)}`)
}
<UIUtils.RenderIf condition={access !== NoAccess}>
<a
ref={nestedSidebarItemRef->ReactDOM.Ref.domRef}
href={link}
target="_blank"
className={`${textColor} relative overflow-hidden flex flex-row items-center cursor-pointer ${paddingClass} ${selectedClass} `}>
<SidebarSubOption name isSectionExpanded isSelected isSideBarExpanded />
remoteUi
</a>
</UIUtils.RenderIf>
}
}}
</UIUtils.RenderIf>
}
Expand Down Expand Up @@ -308,23 +289,18 @@ module NestedSectionItem = {
</UIUtils.RenderIf>
</div>
<UIUtils.RenderIf condition={isElementShown}>
{
let subSectionsArr =
section.links
->Array.mapWithIndex((subLevelItem, index) => {
let isSelected = subLevelItem->isSubLevelItemSelected
<NestedSidebarItem
key={string_of_int(index)}
isSelected
isSideBarExpanded
isSectionExpanded
tabInfo=subLevelItem
/>
})
->React.array

subSectionsArr
}
{section.links
->Array.mapWithIndex((subLevelItem, index) => {
let isSelected = subLevelItem->isSubLevelItemSelected
<NestedSidebarItem
key={string_of_int(index)}
isSelected
isSideBarExpanded
isSectionExpanded
tabInfo=subLevelItem
/>
})
->React.array}
</UIUtils.RenderIf>
</div>
}
Expand All @@ -341,9 +317,7 @@ module SidebarNestedSection = {
) => {
let isSubLevelItemSelected = tabInfo => {
switch tabInfo {
| SubLevelRemoteLink(item)
| SubLevelLink(item) =>
linkSelectionCheck(firstPart, item.link)
| SubLevelLink(item) => linkSelectionCheck(firstPart, item.link)
}
}

Expand All @@ -364,6 +338,15 @@ module SidebarNestedSection = {
None
}, (isSectionExpanded, isSideBarExpanded))

React.useEffect2(() => {
if isSideBarExpanded {
setIsSectionExpanded(_ => isAnySubItemSelected)
} else {
setIsSectionExpanded(_ => false)
}
None
}, (isSideBarExpanded, isAnySubItemSelected))

let toggleSectionExpansion = React.useCallback4(_ev => {
if !isSideBarExpanded {
setIsSidebarExpanded(_ => true)
Expand Down Expand Up @@ -401,7 +384,6 @@ module SidebarNestedSection = {
acc &&
switch subLevelItem {
| SubLevelLink({access}) => access === NoAccess
| SubLevelRemoteLink({access}) => access === NoAccess
}
})
<UIUtils.RenderIf condition={!areAllSubLevelsHidden}>
Expand Down
4 changes: 1 addition & 3 deletions src/screens/HyperSwitch/Sidebar/SidebarTypes.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ type nestedOption = {
iconSize?: int,
}

type subLevelItem =
| SubLevelRemoteLink(nestedOption)
| SubLevelLink(nestedOption)
type subLevelItem = SubLevelLink(nestedOption)

type sectionType = {
name: string,
Expand Down
18 changes: 9 additions & 9 deletions src/screens/HyperSwitch/UserManagement/ShowUserData.res
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module UserHeading = {
let updateDetails = useUpdateMethod()
let status = infoValue.status->UserRoleEntity.statusToVariantMapper

let resendInvite = async () => {
let _resendInvite = async () => {
try {
let url = getURL(~entityName=USERS, ~userType=#RESEND_INVITE, ~methodType=Post, ())
let body = [("user_id", userId->Js.Json.string)]->Js.Dict.fromArray->Js.Json.object_
Expand All @@ -38,14 +38,14 @@ module UserHeading = {
| _ => infoValue.status->Js.String2.toUpperCase->React.string
}}
</div>
<UIUtils.RenderIf condition={status !== Active}>
<Button
text="Resend Invite"
buttonType={SecondaryFilled}
customButtonStyle="!px-2"
onClick={_ => resendInvite()->ignore}
/>
</UIUtils.RenderIf>
// <UIUtils.RenderIf condition={status !== Active}>
// <Button
// text="Resend Invite"
// buttonType={SecondaryFilled}
// customButtonStyle="!px-2"
// onClick={_ => resendInvite()->ignore}
// />
// </UIUtils.RenderIf>
</div>
</div>
}
Expand Down
16 changes: 8 additions & 8 deletions src/screens/HyperSwitch/UserManagement/UserRoleEntry.res
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ let make = () => {
subTitle="Manage user roles and invite members of your organisation"
/>
<div className="relative">
<div className="absolute right-0 top-5">
<Button
text={"Invite users"}
buttonType=Primary
onClick={_ => RescriptReactRouter.push("/users/invite-users")}
customButtonStyle="w-48"
/>
</div>
// <div className="absolute right-0 top-5">
// <Button
// text={"Invite users"}
// buttonType=Primary
// onClick={_ => RescriptReactRouter.push("/users/invite-users")}
// customButtonStyle="w-48"
// />
// </div>
<Tabs
tabs=tabList
disableIndicationArrow=true
Expand Down
3 changes: 1 addition & 2 deletions src/screens/HyperSwitch/Utils/HSwitchGlobalSearchBar.res
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ let make = () => {
[],
(insideAcc, item) => {
switch item {
| SubLevelLink(obj)
| SubLevelRemoteLink(obj) => {
| SubLevelLink(obj) => {
if (
checkStringStartsWithSubstring(~itemToCheck=sectionObj.name, ~searchText) ||
checkStringStartsWithSubstring(~itemToCheck=obj.name, ~searchText)
Expand Down
3 changes: 1 addition & 2 deletions src/screens/HyperSwitch/Utils/PageLoaderWrapper.res
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ let make = (
}
| Error(_err) =>
<DefaultLandingPage
height=sectionHeight
title="Oops, we hit a little bump on the road!"
customStyle={`py-16 !m-0 ${customStyleForDefaultLandingPage}`}
customStyle={`py-16 !m-0 ${customStyleForDefaultLandingPage} ${sectionHeight}`}
overriddingStylesTitle="text-2xl font-semibold"
buttonText="Refresh"
overriddingStylesSubtitle="!text-sm text-grey-700 opacity-50 !w-3/4"
Expand Down

0 comments on commit 509da0a

Please sign in to comment.