Promotion Categories
1. What is this page for?
The Promotion Categories page (/promotion/categories) is used to create, edit, reorder, and show or hide category tabs that group promotions in the player lobby, such as "Deposit Bonus", "New Members", "Cashback", or "Special Promotions". This helps players easily find and claim the bonuses they want. This page is designed for marketing staff and administrators managing player campaign incentives.
2. Before you start
- Required permissions:
- You must have the 'Promotion categories' permission granted by an administrator to view, create, edit, or delete categories.
- If you only have view permission, you can view the list and category details, but the add, edit, switch, and delete controls will be disabled.
- Things to prepare:
- Category names in Thai and English: Must be between 1 and 100 characters and unique across all categories in the system.
- Display order: Plan the order of tabs as you want players to see them from left to right in the lobby.
- Deletion prerequisites: Before deleting a category, you must move or delete all promotions assigned to it (promotion count must be 0) and switch its status to Hidden.
3. Screen overview
This page consists of 6 main sections arranged from top to bottom:
- Header: Displays the page title Promotion Categories, a brief description, a shortcut button to Promotions (to manage individual promotions), and the Add category button.
- Status summary cards / Filter tabs: Top tabs showing category counts and quick filtering: All categories, Shown in the lobby, Hidden, and the Deleted tab.
- Search and filter bar: Text input to search by category name, along with an Advanced filter toggle button and a Clear button.
- Table toolbar: A Refresh button and a count indicator showing total records found, such as "5 categories".
- Data table: Displays the list of categories, lobby display order, promotion count, last modified details, status toggle switch, and action buttons.
- Pagination: Located at the bottom to navigate between pages and select row limits (10, 25, 50, 100 entries).
4. Search and filters
| Field / Filter | Type | How to use | Result |
|---|---|---|---|
| Search a category's name... | Text input | Type a category name in Thai or English | Filters table to matching category names |
| Status tabs | Tab buttons | Click: All categories, Shown in the lobby, Hidden, or Deleted | Filters table immediately by display status |
| More filters | Toggle button | Click to expand or collapse additional filter fields | Displays date range and admin picker fields |
| Created | Date range picker | Select From date and To date | Displays categories created within the selected date range |
| Updated | Date range picker | Select From date and To date | Displays categories last updated within the selected date range |
| Created by | Admin typeahead | Type an admin name and select from the list | Displays categories created by the selected admin |
| Updated by | Admin typeahead | Type an admin name and select from the list | Displays categories last updated by the selected admin |
| Clear | Button | Click the clear button | Resets all search and filter fields back to default |
5. Data table
All columns in the table
| Column | What you see | Meaning | Badges / Icons |
|---|---|---|---|
| Order | Order number with up/down arrows | Display position of the category tab in the lobby (1 is leftmost) | - Up / Down arrow buttons - Dropdown action Move to... |
| Category | Thai name (bold) with English name below | Name displayed on the lobby tab according to the player's language | Gray badge Deleted (in the Deleted tab) |
| Promotions | Summary text, e.g. 3 shown · 1 hidden | Number of promotions filed under this category, split by active and hidden | Numeric summary |
| Last edited | Date, time, and admin name | Timestamp and username of the last person who updated this record | Date and user badge |
| Status | Toggle switch or text | Visibility status of this category tab in the player lobby | - Switch on (green) = Shown in the lobby - Switch off (gray) = Hidden |
| Actions | Action buttons in each row | Commands to view, edit, reorder, or delete the category | See action buttons table below |
Row buttons (Actions column)
| Button | Icon / Color | What happens when clicked | Notes / Conditions |
|---|---|---|---|
| Edit | Pencil icon / Blue | Opens the edit page (/promotion/categories/[id]/edit) | Shown when you have update permissions |
| View | Eye icon / Gray | Opens the category details in read-only mode | Shown when you only have view permissions or if deleted |
| More options (...) | Three dots icon | Opens a menu with additional row actions | Contains Move and Delete options |
| Move to... | Grid icon in dropdown | Opens the dialog to move this category directly to a specific place | Allows jumping to any rank without pressing arrows repeatedly |
| Delete | Trash icon / Red in dropdown | Opens the confirmation dialog to delete the category | Enabled only when the category is Hidden and has 0 promotions |
6. Step-by-step guides
1. Adding a new promotion category
- Go to Promotions > Promotion categories in the left sidebar.
- Click the Add category button in the top-right corner.
- In the form, fill in the required fields:
- Category name (Thai): Type the Thai tab name, e.g.
โปรฝากเงิน. - Category name (English): Type the English tab name, e.g.
Deposit Promotions.
- Category name (Thai): Type the Thai tab name, e.g.
- Review the initial status (new categories default to active and are placed at the end of the list).
- Click Save in the bottom action bar.
- A green toast "Category added" will appear and you will return to the categories list.
2. Editing a promotion category
- Find the category you want to edit in the table.
- Click the Edit button (pencil icon) in its row.
- Update the desired fields, such as the Thai or English name.
- To change its position, pick a number in the Order dropdown on the right.
- Click Save in the bottom action bar.
- A green toast "Category saved" will appear.
3. Reordering category tabs in the lobby
You can reorder tabs using two methods:
- Method 1 (Step by step): In the Order column, click the Move up or Move down arrow button on the row. The category will swap positions with the adjacent one immediately.
- Method 2 (Jump to position): Click the
...menu on the row, select Move to..., choose the destination number, and confirm.
4. Showing or hiding a category in the lobby
- Locate the switch in the Status column of the category row.
- Click the switch:
- On (Green): The category tab will be visible to players in the lobby immediately.
- Off (Gray): The category tab and all promotions inside it are hidden from players immediately (including in the All tab and gift box), but its order position is preserved.
- A confirmation toast will notify you that the category is shown or hidden.
5. Deleting a promotion category
- Check the Promotions column to verify the count is
0. If promotions still exist, go to Promotions to reassign them to another category or delete them first. - Toggle the switch in the Status column to Off (Hidden).
- Click the
...menu on that row and select Delete. - In the confirmation dialog "Delete this category?", review the name and click the red Delete button.
- The category will be deleted and moved to the Deleted tab, with a toast confirming "Category deleted".
7. Create or edit page
The create and edit screen (/promotion/categories/new and /promotion/categories/[id]/edit) is split into category details on the left and status/order settings on the right:
Category information (Left)
| Field | Required? | What to enter | Example | Constraints |
|---|---|---|---|---|
| Category name (Thai) | Required | Tab name visible to players using the Thai language interface | โปรฝากเงิน | 1–100 characters, unique across all categories |
| Category name (English) | Required | Tab name visible to players using the English language interface | Deposit Bonus | 1–100 characters, unique across all categories |
Status and order controls (Right)
| Field | Required? | What to enter | Example | Constraints |
|---|---|---|---|---|
| Status | Required | Toggle switch to control display in the lobby | Shown in the lobby / Hidden | Defaults to shown on new records |
| Order | Required (edit mode only) | Position number of this tab in the lobby | Place 1 | Choose from 1 up to the total number of categories |
Promotions in this category (Below form, edit mode only)
When editing a category with assigned promotions, a summary block Promotions in this category appears below:
- Displays total, active, and hidden counts (e.g.
4 promotions: 3 shown, 1 hidden). - Lists promotions in the exact order players see them.
- Shows each promotion's priority number, title, update time, and status badge.
- Click any promotion row to navigate directly to its edit page.
8. Popups and dialogs
1. Confirmation popup: Delete this category? (ConfirmModal)
- Triggered when: Clicking Delete from the row menu of a hidden category.
- What you see: Title "Delete this category?", description indicating
"{name}" will be deleted. This cannot be undone., Cancel button, and red Delete button. - What to do: Verify the category name, then click Delete (or click Cancel to abort).
- Result: The category is deleted and moved to the Deleted tab with a success toast.
2. Popup: Move order (MoveToDialog)
- Triggered when: Selecting Move to... from the row action menu.
- What you see: Category name, current position, and a selector for the new position (1 to maximum order).
- What to do: Pick the destination order number and confirm.
- Result: The category moves to the new position and a toast confirms "Moved".
3. Popup: Version conflict (VersionConflictDialog)
- Triggered when: Saving a category that was modified and saved by another admin in the meantime.
- What you see: A warning explaining that another user saved changes first, along with a reload button.
- What to do: Click reload to fetch the latest version and verify changes before saving again.
- Result: Prevents accidental overwrites between multiple administrators.
9. Statuses and badges
| Badge / Status | Badge Color | Meaning | Next Action Required |
|---|---|---|---|
| Shown in the lobby | Green | This category is active and visible as a tab in the lobby | No action needed. Operates normally |
| Hidden | Gray | This category and its promotions are hidden from players | Toggle switch to green if you want to make it visible |
| Deleted | Gray | This category has been deleted and moved to the Deleted tab | Read-only archive. Cannot be restored |
10. Frequently asked questions / Troubleshooting
- If the delete button cannot be clicked or shows an error:
- Verify that the category status is set to Hidden. The system prevents deleting active categories.
- Check the Promotions column to ensure no promotions are assigned to this category. If any remain, reassign or delete them in Promotions first.
- If saving fails due to a duplicate name:
- Check the red error message under the field. If it says "Another category already has this name", change the Thai or English name so it does not conflict with existing categories.
- If a version conflict dialog appears on save:
- Another staff member edited this category at the same time. Reload the page to view their changes before applying your edits.
- If players report that a promotion category tab is missing in the lobby:
- Check whether the category toggle switch is set to Shown in the lobby (Green).
- Check if the promotions inside that category are active. If all promotions in a category are hidden, the lobby tab may not display.