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 4 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
9 changes: 9 additions & 0 deletions apps/web/src/app/[lang]/app/[type]/navbar/groups.tsx
Original file line number Diff line number Diff line change
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
Expand Up @@ -24,15 +24,7 @@ export const unirefundNavbarDataFromDB: NavbarItemsFromDB[] = [
...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
Loading