Move business logic out of App Router into module packages, add boundary validation scripts, and keep all routes as thin re-exports without changing URLs or API behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
40 lines
907 B
TypeScript
40 lines
907 B
TypeScript
"use client";
|
|
|
|
import { createSportsCenterListPage } from "@/modules/sports-center/components/SportsCenterListCrudPage";
|
|
import { sportsCenterApi } from "@/modules/sports-center/services/sports-center-api";
|
|
|
|
export const TeamsPage = createSportsCenterListPage({
|
|
title: "تیمها",
|
|
breadcrumb: "تیمها",
|
|
resourceKey: "competitionTeams",
|
|
api: sportsCenterApi.competitionTeams,
|
|
feature: "competition_management",
|
|
createOnly: true,
|
|
listQueryParam: "competition_id",
|
|
columns: [
|
|
{
|
|
"key": "name",
|
|
"header": "نام"
|
|
}
|
|
],
|
|
createFields: [
|
|
{
|
|
"name": "sports_center_id",
|
|
"label": "شناسه مرکز",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "competition_id",
|
|
"label": "مسابقه",
|
|
"required": true
|
|
},
|
|
{
|
|
"name": "name",
|
|
"label": "نام",
|
|
"required": true
|
|
}
|
|
],
|
|
});
|
|
|
|
export default TeamsPage;
|