Skip to content

Commit

Permalink
chore: Remove Customers Module Feature flag (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pritish Budhiraja authored Feb 5, 2024
1 parent f3ea262 commit da9a7fa
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 16 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ The `production_access` feature flag enables a flow for users to request live pr

The `quick_start` feature flag enables the simplified onboarding flow for new users, where they connect to processors, configure payment routing and test a payment, all in one flow.

#### Customers Module

The `customers_module` feature flag enables the customers module in dashboard. Users can see the customers and their details via enabling this flag.

---

## Deployment
Expand Down
1 change: 0 additions & 1 deletion config/FeatureFlag.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"forgot_password": false,
"user_journey_analytics": false,
"surcharge": false,
"customers_module": false,
"permission_based_module": false,
"dispute_evidence_upload": false,
"paypal_automatic_flow": false
Expand Down
2 changes: 0 additions & 2 deletions src/entryPoints/hyperswitch/FeatureFlagUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type featureFlag = {
forgetPassword: bool,
userJourneyAnalytics: bool,
surcharge: bool,
customersModule: bool,
permissionBasedModule: bool,
disputeEvidenceUpload: bool,
paypalAutomaticFlow: bool,
Expand Down Expand Up @@ -57,7 +56,6 @@ let featureFlagType = (featureFlags: JSON.t) => {
forgetPassword: dict->getBool("forgot_password", false),
userJourneyAnalytics: dict->getBool("user_journey_analytics", false),
surcharge: dict->getBool("surcharge", false),
customersModule: dict->getBool("customers_module", false),
permissionBasedModule: dict->getBool("permission_based_module", false),
disputeEvidenceUpload: dict->getBool("dispute_evidence_upload", false),
paypalAutomaticFlow: dict->getBool("paypal_automatic_flow", false),
Expand Down
4 changes: 1 addition & 3 deletions src/entryPoints/hyperswitch/HyperSwitchApp.res
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,7 @@ let make = () => {
/>
</AccessControl>
| list{"customers", ...remainingPath} =>
<AccessControl
isEnabled=featureFlagDetails.customersModule
permission=userPermissionJson.customerRead>
<AccessControl permission=userPermissionJson.customerRead>
<EntityScaffold
entityName="Customers"
remainingPath
Expand Down
9 changes: 3 additions & 6 deletions src/entryPoints/hyperswitch/SidebarValues.res
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ let customers = permissionJson => {
})
}

let operations = (isOperationsEnabled, customersModule, ~permissionJson) => {
let operations = (isOperationsEnabled, ~permissionJson) => {
let payments = payments(permissionJson)
let refunds = refunds(permissionJson)
let disputes = disputes(permissionJson)
Expand All @@ -115,9 +115,7 @@ let operations = (isOperationsEnabled, customersModule, ~permissionJson) => {
name: "Operations",
icon: "hswitch-operations",
showSection: true,
links: customersModule
? [payments, refunds, disputes, customers]
: [payments, refunds, disputes],
links: [payments, refunds, disputes, customers],
})
: emptyComponent
}
Expand Down Expand Up @@ -387,13 +385,12 @@ let useGetSidebarValues = (~isReconEnabled: bool) => {
userJourneyAnalytics: userJourneyAnalyticsFlag,
surcharge: isSurchargeEnabled,
isLiveMode,
customersModule,
} = featureFlagDetails

let sidebar = [
productionAccess->productionAccessComponent,
default->home,
default->operations(customersModule, ~permissionJson),
default->operations(~permissionJson),
default->analytics(userJourneyAnalyticsFlag, ~permissionJson),
default->connectors(isLiveMode, ~permissionJson),
default->workflow(isSurchargeEnabled, ~permissionJson),
Expand Down

0 comments on commit da9a7fa

Please sign in to comment.