Operator guideEN

Casino / Sub-categories / Reorder

Parent-category-specific drag-and-drop ordering screen for casino sub-categories.

How to use this guide

Start with the main guide

Follow the explanation and examples first. Extra definitions and formulas are available below when you need them.

What this page does

This page lets operators reorder casino sub-categories inside one selected parent category. The page loads the selected parent category's sub-categories, sorts them by stored order, and lets the operator drag rows into a new visible sequence before saving.

When to use it

  • change sub-category order for one parent category
  • review the curated sequence before saving
  • correct ordering after creating, deleting, or moving sub-categories

How to use it

  1. Choose a parent category in Select Category.
  2. Drag sub-category rows into the intended order.
  3. Review the visible Position values.
  4. Click Save Order.

Cancel returns to the main Sub-Categories list without saving the current drag state.

What changes when saved

Save Order persists the submitted row sequence for the selected parent category. The save flow rewrites each included sub-category's stored order value starting from 1.

Known caveats

  • The page initially selects parent category id 1 before the operator chooses another value.
  • The dropdown includes a blank option. Choosing it can result in an invalid parent category selection and a failed save.
  • The page reads only the first 100 sub-categories for the selected parent category. If a parent category has more than 100 sub-categories, saving can fail because save validation requires the submitted order list to match the full category count.
  • The table header says Order ID, but the rendered row value is the current visible Position, not the stored order id.
  • Dragging rows changes the browser-side sequence only. Nothing is persisted until Save Order succeeds.
More details

Definitions and formulas

Open only the section you need. The relevant section opens automatically when you request help for a specific item on screen.

Calculations9 topicsOpen details

Selected parent category

The selected parent category defines which sub-category set is being reordered.

Inputs
parent category dropdown value
Formula
The page stores the selected parent category as a number. Initial value is 1. The blank dropdown option becomes 0 because the change handler converts the selected value with `Number(...)`.
Caveats
Choosing the blank option can create an invalid save target.

Reorder list read

The table shows the first 100 sub-categories returned for the selected parent category.

Inputs
selected parent category id
Formula
The page reads sub-categories with `limit = 100`, `pageNo = 1`, and `gameCategoryId = selected parent category id`.
Caveats
Save validation expects the submitted order to include every sub-category for that parent category, not just a partial page.

Initial visible order

The first sequence the operator sees is based on stored sub-category order values.

Inputs
loaded sub-category rows, stored order id
Formula
After the read completes, the page sorts loaded rows by `orderId` ascending before putting them into the draggable list.

Local drag order

Dragging changes the visible order in the browser but does not persist anything until Save Order succeeds.

Inputs
current row array, drag source index, drag destination index
Formula
Drag-and-drop copies the current row array, removes the dragged row from the source index, and inserts it at the destination index.

Displayed position

The value shown under the Order ID header is the current visible position.

Inputs
row index in draggable list
Formula
Displayed Position = current row index + 1.
Caveats
This is not the raw stored `orderId` value from the source response.

Save Order payload

Save Order sends the current visible sequence as the new order for the selected parent category.

Inputs
selected parent category id, current draggable row sequence
Formula
Payload = `{ masterGameCategoryId: selected parent category id, order: current rows mapped to masterGameSubCategoryId }`.

Save order validation

The save only succeeds when the submitted order represents the full sub-category set for the parent category.

Inputs
selected parent category id, submitted ordered sub-category ids, parent category relation count
Formula
Save validation de-duplicates the submitted id list, loads the selected parent category with all related sub-categories, and rejects the save when related sub-category count does not equal submitted id count.
Caveats
Parent categories with more than 100 sub-categories can fail from this page because the page reads only 100 rows., Duplicate ids are removed before the count comparison.

Persisted order values

The first submitted row becomes order 1, the second becomes order 2, and so on.

Inputs
submitted order array, sub-category rows
Formula
For each matching sub-category id in the submitted order array, the save flow writes `orderId = index in submitted order + 1`.
Caveats
Operators should refresh and verify after any save error because the save loop is asynchronous.

Cancel behavior

Unsaved drag movements are discarded when leaving through Cancel.

Inputs
current local drag state
Formula
Cancel navigates back to the main Sub-Categories list without calling the save-order mutation.
Fields12 topicsOpen details

Reorder Category

Page heading for the sub-category ordering workflow.

Data Type
text
Editable
false

Select Category

Parent casino category whose sub-categories are loaded and saved as one ordered set.

Data Type
relation-filter
Editable
true
Caveats
Default local value is category id 1 before the operator chooses another category., The blank dropdown option converts to zero in local state and can produce an invalid save target.

Category option

Parent category id and English name shown in the Select Category dropdown.

Data Type
relation-option
Editable
false

Error alert

Error message shown when list read or save-order request fails.

Data Type
feedback-state
Editable
false

Success alert

Success message shown after the save-order request is accepted.

Data Type
feedback-state
Editable
false

Drag handle

Row handle used to move a sub-category to a different visible position.

Data Type
ui-control
Editable
true

ID

Internal sub-category id submitted in the saved order array.

Data Type
integer
Editable
false

Name

English sub-category name shown in the draggable row.

Data Type
string
Editable
false

Status

Shows Active when the sub-category active flag is true and Inactive when false.

Data Type
status
Editable
false

Order ID / Position

Current visible row position after sorting and any local drag movement.

Data Type
integer
Editable
true
Caveats
The table header says Order ID, but the rendered row value is current Position., Stored order id is used to build the initial sequence and is rewritten only after Save Order succeeds.

Save Order

Persists the current visible row sequence for the selected parent category.

Data Type
action
Editable
true

Cancel

Returns to the Sub-Categories list without saving unsaved drag changes.

Data Type
action
Editable
true
More help

Related pages

Casino / Sub-categories

Operator guide for sub-category catalog maintenance, including list, create or edit, reorder, and add-games relation flow.

Casino / Sub-categories / Add Games

Relation workflow for assigning, removing, bulk-loading, and resetting games for one casino sub-category.

Casino / Sub-categories / Form

Create and edit form for one sub-category, including translations, description, icon handling, parent category, and active state.

Casino / Sub-categories / List

Searchable sub-category grid with summary cards, parent-category and status filters, game counts, translation coverage, and row-level maintenance actions.

Auto Tags Manager / Order

Manual drag-and-drop ordering screen for valid auto-tag rules, with a single save action that rewrites sort positions.

Casino / Aggregators

Operator overview for the casino-side aggregator registry, pagination, and activation workflow.