From 6455068374bfc12ff07027fa3f7f0e926bd83619 Mon Sep 17 00:00:00 2001
From: Pritish Budhiraja <1805317@kiit.ac.in>
Date: Mon, 4 Dec 2023 15:35:54 +0530
Subject: [PATCH] feat: dead code removal

---
 package.json                                  |  2 +-
 .../UserManagement/HSwitchUserRoleEntity.res  | 50 -------------------
 2 files changed, 1 insertion(+), 51 deletions(-)

diff --git a/package.json b/package.json
index 8e36174b9..0ca190a14 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,5 @@
 {
-  "name": "rescript-euler-dashboard",
+  "name": "hyperswitch-dashboard",
   "version": "1.0.3",
   "main": "index.js",
   "author": "Shiva Nandan <shiva.nandan@juspay.in>",
diff --git a/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res b/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res
index d27ae6dfb..23afdc956 100644
--- a/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res
+++ b/src/screens/HyperSwitch/UserManagement/HSwitchUserRoleEntity.res
@@ -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", ""),
@@ -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
@@ -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,
@@ -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`},
-//   (),
-// )