feat(dashboard): Customer groups domain (#6098)

**What**
- Adds list, detail, edit, create, add customers views to the CG domain.

**Note**
- Missing metadata in forms (coming in separate PR for entire admin)
- Missing table filters (separate PR)

CLOSES CORE-1648
This commit is contained in:
Kasper Fabricius Kristensen
2024-01-17 14:25:59 +00:00
committed by GitHub
parent 19bbae61f8
commit 80feb972cb
33 changed files with 1540 additions and 48 deletions
@@ -1,4 +1,5 @@
import type {
AdminCustomerGroupsRes,
AdminCustomersRes,
AdminProductsRes,
AdminRegionsRes,
@@ -183,12 +184,43 @@ const router = createBrowserRouter([
},
children: [
{
index: true,
lazy: () => import("../../routes/customer-groups/list"),
path: "",
lazy: () =>
import("../../routes/customer-groups/customer-group-list"),
children: [
{
path: "create",
lazy: () =>
import(
"../../routes/customer-groups/customer-group-create"
),
},
],
},
{
path: ":id",
lazy: () => import("../../routes/customer-groups/details"),
lazy: () =>
import("../../routes/customer-groups/customer-group-detail"),
handle: {
crumb: (data: AdminCustomerGroupsRes) =>
data.customer_group.name,
},
children: [
{
path: "add-customers",
lazy: () =>
import(
"../../routes/customer-groups/customer-group-add-customers"
),
},
{
path: "edit",
lazy: () =>
import(
"../../routes/customer-groups/customer-group-edit"
),
},
],
},
],
},