Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JeevaRamu0104 committed Dec 4, 2023
2 parents 929244f + 20d93eb commit ee38c1e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 55 deletions.
2 changes: 1 addition & 1 deletion .githooks/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ npx prettier --write .
npm run re:format

# Define your commit message convention (e.g., starts with "feature:", "fix:", etc.)
commit_regex="^(Merge branch|feat|fix|chore|docs|style|refactor|test|enhancement).+"
commit_regex="^(Merge branch|feat|fix|chore|docs|style|refactor|test|enhancement):.+"

if ! echo "$commit_msg" | grep -Ei "$commit_regex" ; then
echo "Aborting commit. Your commit message does not follow the conventional format."
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@ All notable changes to this project will be documented in this file. See [conven

- - -

## 1.1.0 (2023-12-04)
## 1.0.4 (2023-12-04)

### Bug Fixes

- Dead code removal ([#52](https://github.com/juspay/hyperswitch-control-center/pull/52)) ([`eebee65`](https://github.com/juspay/hyperswitch-control-center/commit/eebee659a8326aa32ebcbe2d06c21e8487bea377))
- Remove CHANGELOG.md ([#53](https://github.com/juspay/hyperswitch-control-center/pull/53)) ([`6978bf6`](https://github.com/juspay/hyperswitch-control-center/commit/6978bf6814fb856c67a0fe409638982239c1af80))

### Miscellaneous Tasks

- Remove dead code ([#50](https://github.com/juspay/hyperswitch-control-center/pull/50)) ([`0133ff1`](https://github.com/juspay/hyperswitch-control-center/commit/0133ff13a7e915c4c796bd98fbaf92400690531a))
- Remove CHANGELOG.md ([`0a14d6e`](https://github.com/juspay/hyperswitch-control-center/commit/0a14d6ec75d763b25c69f7fedcba9373fd29139a))

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

- - -

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "rescript-euler-dashboard",
"name": "hyperswitch-dashboard",
"version": "1.0.3",
"main": "index.js",
"author": "Shiva Nandan <[email protected]>",
Expand Down
50 changes: 0 additions & 50 deletions src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ type roleColTypes =
| Description
| ActiveUsers

let defaultColumnsForRole = [Role, Description, CreatedBy, CreatedOn, ActiveUsers]

let allColumnsForRole = [Role, Description, CreatedBy, CreatedOn, ActiveUsers]

let itemToObjMapperForUser = dict => {
{
user_id: getString(dict, "user_id", ""),
Expand Down Expand Up @@ -74,18 +70,6 @@ let itemToObjMapperForRole = dict => {
}
}

let getHeadingForRole = colType => {
switch colType {
| Role => Table.makeHeaderInfo(~key="role", ~title="Role name", ~showSort=true, ())
| Description =>
Table.makeHeaderInfo(~key="description", ~title="Description", ~showSort=true, ())
| CreatedBy => Table.makeHeaderInfo(~key="created_by", ~title="Created By", ~showSort=true, ())
| CreatedOn => Table.makeHeaderInfo(~key="created_on", ~title="Created On", ~showSort=true, ())
| ActiveUsers =>
Table.makeHeaderInfo(~key="activeUsers", ~title="Active Users", ~showSort=true, ())
}
}

let roleToVariantMapper = role => {
switch role->Js.String2.toUpperCase {
| "ADMIN" => Admin
Expand Down Expand Up @@ -149,32 +133,10 @@ let getCellForUser = (data: userTableTypes, colType: userColTypes): Table.cell =
}
}

let getCellForRole = (data: roleTableTypes, colType: roleColTypes): Table.cell => {
let role = data.role_id->roleToVariantMapper
switch colType {
| Role =>
CustomCell(
<div
className={`w-fit font-semibold text-sm px-3 py-1 rounded-full border-1 ${role->getCssMapperForRole}`}>
{data.role_id->Js.String2.toUpperCase->React.string}
</div>,
"",
)
| Description => Text(data.role_id)
| CreatedBy => Text(data.role_id)
| CreatedOn => Date(data.role_id)
| ActiveUsers => Text(data.role_id)
}
}

let getUserData: Js.Json.t => array<userTableTypes> = json => {
getArrayDataFromJson(json, itemToObjMapperForUser)
}

let getRoleData: Js.Json.t => array<roleTableTypes> = json => {
getArrayDataFromJson(json, itemToObjMapperForRole)
}

let userEntity = EntityType.makeEntity(
~uri="",
~getObjects=getUserData,
Expand All @@ -186,15 +148,3 @@ let userEntity = EntityType.makeEntity(
~getShowLink={userId => `/users/${userId.user_id}?state=user`},
(),
)

// let roleEntity = EntityType.makeEntity(
// ~uri="",
// ~getObjects=getRoleData,
// ~defaultColumns=defaultColumnsForRole,
// ~allColumns=allColumnsForRole,
// ~getHeading=getHeadingForRole,
// ~getCell=getCellForRole,
// ~dataKey="",
// ~getShowLink={roleId => `/users/${roleId.role_id}?state=role`},
// (),
// )

0 comments on commit ee38c1e

Please sign in to comment.