Files
JML/docs/SETTINGS_PERMISSIONS.md

4.6 KiB

Settings Module — Permission Documentation

Module: Settings

Controls access to all system configuration areas including KYC documents, plans, and company policies.


1. KYC Documents

Permission Keys:

  • settings.kyc_documents_config — Admin can configure document lists
  • settings.kyc_documents_view — Staff/Users can view document lists

Description:

  • Admin will set KYC Documents list for:

    • Investor
    • Merchant
    • Swap Station
    • Rental Types:
      • Rental (Single)
      • Rental (2 Person Shared)
      • Rent-to-Own
  • Staffs and Users will show the list of documents based on what Admin configured.


2. Plan Selection + EV Condition

Permission Keys:

  • settings.plan_selection_with_condition_config — Admin can configure plan details
  • settings.plan_selection_with_condition_view — Staff/Users can view plan details

Description:

  • Admin will set Rental Types plan selection with EV condition including:

    • Rental (Single)
    • Rental (2 Person Shared)
    • Rent-to-Own
  • Configurable fields: Price, Deposit, EV Condition, etc.

  • Staffs and Users will show the list of Plan Selection + EV Condition with price and deposit etc.


3. Investment Plan

Permission Keys:

  • settings.investment_plan_config — Admin can configure investment plans
  • settings.investment_plan_view — Staff/Users can view investment plans

Description:

  • Admin can create/edit investment plans with pricing, duration, features.
  • Staffs and Users can only view the available investment plans.

4. Swap Station Plan

Permission Keys:

  • settings.swap_station_plan_config — Admin can configure swap station plans
  • settings.swap_station_plan_view — Staff/Users can view swap station plans

Description:

  • Admin can create/edit swap station plans with pricing, requirements, features.
  • Staffs and Users can only view the available swap station plans.

5. Rider Request Plan for Merchant

Permission Keys:

  • settings.rider_request_plan_for_merchant_config — Admin can configure merchant rider request plans
  • settings.rider_request_plan_for_merchant_view — Staff/Users can view merchant rider request plans

Description:

  • Admin can create/edit rider request plans specifically for merchants.
  • Staffs and Users can only view the available rider request plans for merchants.

6. Company Policy

Permission Keys:

  • settings.company_policy_config — Admin can configure company policies
  • settings.company_policy_view — Staff/Users can view company policies

Description:

  • Admin can create/edit company policies for all sections.
  • Staffs and Users can only view the company policies.

Summary Table

Section Config Permission View Permission
KYC Documents settings.kyc_documents_config settings.kyc_documents_view
Plan Selection + EV Condition settings.plan_selection_with_condition_config settings.plan_selection_with_condition_view
Investment Plan settings.investment_plan_config settings.investment_plan_view
Swap Station Plan settings.swap_station_plan_config settings.swap_station_plan_view
Rider Request Plan for Merchant settings.rider_request_plan_for_merchant_config settings.rider_request_plan_for_merchant_view
Company Policy settings.company_policy_config settings.company_policy_view

Role Examples

Admin

  • Has Config + View for all settings sections

Front Desk Officer

  • Has View only (can see documents, plans, policies)
  • Cannot edit any settings

Biker / Rider

  • Has View only for visible settings (plans, policies)
  • Cannot access KYC document configuration

Investor / Merchant / Shop

  • Has View only for their relevant sections
  • Cannot configure any settings

Next.js will automatically detect the changes to your next.config.ts and restart the server, but if it doesn't, just restart your npm run dev command manually. You should now see the message (pwa) PWA support is enabled in your terminal!

WARNING

A quick heads-up about developing with PWA enabled: Because the Service Worker aggressively caches files to make your app work offline, you might occasionally notice that your code changes don't immediately show up in the browser.

If that happens, you can easily bypass the cache by:

Opening Chrome DevTools (F12) Going to the Application tab -> Service Workers Clicking "Update on reload" or "Unregister" Alternatively, keeping DevTools open and checking "Disable cache" in the Network tab usually prevents stale code while developing!