Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move traveller to crm & fix api error on settings route #684

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 69 additions & 60 deletions apps/web/src/app/[lang]/app/[type]/navbar/groups.tsx
Original file line number Diff line number Diff line change
@@ -1,166 +1,166 @@
import type { NavbarItemsFromDB } from "@repo/ui/theme/types";

export const dashboard: NavbarItemsFromDB[] = [
export const management: NavbarItemsFromDB[] = [
{
key: "dashboard",
displayName: "Dashboard",
description: "View and manage your dashboard settings.",
href: "dashboard/openiddict/applications",
icon: "dashboard",
key: "management",
displayName: "Management",
description: "View and manage your management settings.",
href: "management/openiddict/applications",
icon: "management",
parentNavbarItemKey: "/",
displayOrder: 1,
},
{
key: "dashboard/openiddict",
key: "management/openiddict",
displayName: "Open Id Dict",
description: "Manage Open ID dict settings.",
href: "dashboard/openiddict/applications",
href: "management/openiddict/applications",
icon: "id",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
{
key: "dashboard/openiddict/applications",
key: "management/openiddict/applications",
displayName: "Applications",
description: "Manage applications within Open Id Dict.",
href: "dashboard/openiddict/applications",
href: "management/openiddict/applications",
icon: "app",
parentNavbarItemKey: "dashboard/openiddict",
parentNavbarItemKey: "management/openiddict",
displayOrder: 1,
},
{
key: "dashboard/openiddict/scopes",
key: "management/openiddict/scopes",
displayName: "Scopes",
description: "View and manage scopes for Open Id Dict.",
href: "dashboard/openiddict/scopes",
href: "management/openiddict/scopes",
icon: "scope",
parentNavbarItemKey: "dashboard/openiddict",
parentNavbarItemKey: "management/openiddict",
displayOrder: 1,
},
{
key: "dashboard/admin",
displayName: "Admin Management",
key: "management/admin",
displayName: "Admin",
description: "Access administrative tools and settings.",
href: "dashboard/admin/languages",
href: "management/admin/languages",
icon: "management",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
{
key: "dashboard/admin/languages",
key: "management/admin/languages",
displayName: "Languages",
description: "Manage language settings and translations.",
href: "dashboard/admin/languages",
href: "management/admin/languages",
icon: "language",
parentNavbarItemKey: "dashboard/admin",
parentNavbarItemKey: "management/admin",
displayOrder: 1,
},
{
key: "dashboard/admin/language-texts",
key: "management/admin/language-texts",
displayName: "Language Texts",
description: "Edit and review language texts.",
href: "dashboard/admin/language-texts",
href: "management/admin/language-texts",
icon: "book",
parentNavbarItemKey: "dashboard/admin",
parentNavbarItemKey: "management/admin",
displayOrder: 1,
},
{
key: "dashboard/saas",
displayName: "Saas Management",
key: "management/saas",
displayName: "Saas",
description: "Manage SaaS configurations and settings.",
href: "dashboard/saas/edition",
href: "management/saas/edition",
icon: "management",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
{
key: "dashboard/saas/edition",
key: "management/saas/edition",
displayName: "Edition",
description: "Manage SaaS editions and plans.",
href: "dashboard/saas/edition",
href: "management/saas/edition",
icon: "edition",
parentNavbarItemKey: "dashboard/saas",
parentNavbarItemKey: "management/saas",
displayOrder: 1,
},
{
key: "dashboard/saas/tenant",
key: "management/saas/tenant",
displayName: "Tenant",
description: "Manage SaaS tenant settings and configurations.",
href: "dashboard/saas/tenant",
href: "management/saas/tenant",
icon: "globe",
parentNavbarItemKey: "dashboard/saas",
parentNavbarItemKey: "management/saas",
displayOrder: 1,
},
{
key: "dashboard/identity",
displayName: "Identity Management",
key: "management/identity",
displayName: "Identity",
description: "Manage user identities and roles.",
href: "dashboard/identity/role",
href: "management/identity/role",
icon: "management",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
{
key: "dashboard/identity/role",
key: "management/identity/role",
displayName: "Role",
description: "Manage user roles and permissions.",
href: "dashboard/identity/role",
href: "management/identity/role",
icon: "role",
parentNavbarItemKey: "dashboard/identity",
parentNavbarItemKey: "management/identity",
displayOrder: 1,
},
{
key: "dashboard/identity/user",
key: "management/identity/user",
displayName: "User",
description: "Manage user accounts and profiles.",
href: "dashboard/identity/user",
href: "management/identity/user",
icon: "identity",
parentNavbarItemKey: "dashboard/identity",
parentNavbarItemKey: "management/identity",
displayOrder: 1,
},
{
key: "dashboard/identity/claim-type",
key: "management/identity/claim-type",
displayName: "Claim Type",
description: "Manage claim types for user identities.",
href: "dashboard/identity/claim-type",
href: "management/identity/claim-type",
icon: "scan",
parentNavbarItemKey: "dashboard/identity",
parentNavbarItemKey: "management/identity",
displayOrder: 1,
},
{
key: "dashboard/identity/security-logs",
key: "management/identity/security-logs",
displayName: "Security Logs",
description: "View security logs and audit trails.",
href: "dashboard/identity/security-logs",
href: "management/identity/security-logs",
icon: "lock",
parentNavbarItemKey: "dashboard/identity",
parentNavbarItemKey: "management/identity",
displayOrder: 1,
},
{
key: "dashboard/identity/organization",
key: "management/identity/organization",
displayName: "Organization",
description: "Manage organizational settings and structure.",
href: "dashboard/identity/organization",
href: "management/identity/organization",
icon: "building",
parentNavbarItemKey: "dashboard/identity",
parentNavbarItemKey: "management/identity",
displayOrder: 1,
},
{
key: "dashboard/audit-logs/audit-logs",
key: "management/audit-logs/audit-logs",
displayName: "Audit Logs",
description: "View and analyze audit logs.",
href: "dashboard/audit-logs/audit-logs",
href: "management/audit-logs/audit-logs",
icon: "log",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
{
key: "dashboard/text-templates/text-templates",
key: "management/text-templates/text-templates",
displayName: "Text Templates",
description: "Manage and create text templates.",
href: "dashboard/text-templates/text-templates",
href: "management/text-templates/text-templates",
icon: "text",
parentNavbarItemKey: "dashboard",
parentNavbarItemKey: "management",
displayOrder: 1,
},
];
Expand Down Expand Up @@ -276,6 +276,15 @@ export const crm: NavbarItemsFromDB[] = [
parentNavbarItemKey: "crm",
displayOrder: 1,
},
{
key: "crm/traveller",
displayName: "Traveller",
description: "Manage traveller-related settings.",
href: "crm/traveller",
icon: "plane",
parentNavbarItemKey: "crm",
displayOrder: 1,
},
];

export const contracts: NavbarItemsFromDB[] = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
import { dashboard } from "../groups";
import { management } from "../groups";

export const ayshopgoNavbarDataFromDB: NavbarItemsFromDB[] = [
{
Expand All @@ -20,7 +20,7 @@ export const ayshopgoNavbarDataFromDB: NavbarItemsFromDB[] = [
parentNavbarItemKey: "/",
displayOrder: 1,
},
...dashboard,
...management,
{
key: "customers",
displayName: "Customers",
Expand Down
14 changes: 3 additions & 11 deletions apps/web/src/app/[lang]/app/[type]/navbar/projects/unirefund.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { NavbarItemsFromDB } from "@repo/ui/theme/types";
import { contracts, crm, dashboard, settings } from "../groups";
import { contracts, crm, management, settings } from "../groups";

export const unirefundNavbarDataFromDB: NavbarItemsFromDB[] = [
{
Expand All @@ -20,19 +20,11 @@ export const unirefundNavbarDataFromDB: NavbarItemsFromDB[] = [
parentNavbarItemKey: "/",
displayOrder: 1,
},
...dashboard,
...management,
...settings,
...crm,
...contracts,
{
key: "traveller",
displayName: "Traveller",
description: "Manage traveller-related settings.",
href: "traveller",
icon: "plane",
parentNavbarItemKey: "/",
displayOrder: 1,
},

{
key: "operations",
displayName: "Operations",
Expand Down
10 changes: 5 additions & 5 deletions apps/web/src/app/[lang]/app/[type]/settings/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const dataConfigOfManagement: Record<string, any> = {
convertors: {
countryId: {
data: () => {
return fetch(getBaseLink("api/management/country")).then(
return fetch(getBaseLink("api/settings/product/country")).then(
(_data) => _data.json(),
);
},
Expand Down Expand Up @@ -136,7 +136,7 @@ export const dataConfigOfManagement: Record<string, any> = {
data: () => {
return fetch(
getBaseLink(
"api/management/product-groups?maxResultCount=1000",
"api/settings/product/product-groups?maxResultCount=1000",
),
)
.then((data) => data.json())
Expand All @@ -152,7 +152,7 @@ export const dataConfigOfManagement: Record<string, any> = {
vatId: {
data: () => {
return fetch(
getBaseLink("api/management/vats?maxResultCount=1000"),
getBaseLink("api/settings/product/vats?maxResultCount=1000"),
)
.then((data) => data.json())
.then(
Expand All @@ -166,8 +166,8 @@ export const dataConfigOfManagement: Record<string, any> = {
},
countryId: {
data: () => {
return fetch(getBaseLink("api/management/country")).then((data) =>
data.json(),
return fetch(getBaseLink("api/settings/product/country")).then(
(data) => data.json(),
);
},
get: "name",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function Page({
params: { lang: string; type: string };
}) {
permanentRedirect(
getBaseLink(`app/${params.type}/management/tenant/home`, true, params.lang),
getBaseLink(`app/${params.type}/settings/tenant/home`, true, params.lang),
RedirectType.push,
);
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-argument -- TODO: we need to fix this*/
import type { NextRequest } from "next/server";
import { getSettingServiceClient } from "src/lib";
import type { Clients } from "../../util";
import { commonDELETE, commonGET, commonPOST, commonPUT } from "../../util";
import type { Clients } from "../../../util";
import { commonDELETE, commonGET, commonPOST, commonPUT } from "../../../util";

const clients: Clients = {
vats: async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ayasofyazilim-ui
13 changes: 11 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading