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:update saas #196

Merged
merged 2 commits into from
Mar 6, 2025
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
15 changes: 1 addition & 14 deletions apps/public/actions/upwithcrowd/project/action.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
"use server";

import type {
GetApiProjectByIdUpdatePermissionData,
GetApiProjectData,
} from "@ayasofyazilim/upwithcrowd-saas/UPWCService";
import type {GetApiProjectData} from "@ayasofyazilim/upwithcrowd-saas/UPWCService";
import {structuredResponse, structuredError, structuredSuccessResponse} from "@repo/utils/api";
import {getUpwithcrowd} from "@/utils/client";

Expand Down Expand Up @@ -36,13 +33,3 @@ export async function getProjectByIdMembersApi(id: string) {
return structuredError(error);
}
}

export async function getProjectByIdUpdatePermissionApi(data: GetApiProjectByIdUpdatePermissionData) {
try {
const client = await getUpwithcrowd();
const dataResponse = await client.project.getApiProjectByIdUpdatePermission(data);
return structuredSuccessResponse(dataResponse);
} catch (error) {
throw structuredError(error);
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
"use server";

import type {GetApiPublicProjectProjectListData} from "@ayasofyazilim/upwithcrowd-saas/UPWCService";
import type {
GetApiPublicProjectByIdUpdatePermissionData,
GetApiPublicProjectProjectListData,
} from "@ayasofyazilim/upwithcrowd-saas/UPWCService";
import {structuredError, structuredResponse, structuredSuccessResponse} from "@repo/utils/api";
import {getUpwithcrowd} from "@/utils/client";

Expand Down Expand Up @@ -33,3 +36,13 @@ export async function getPublicProjectByIdMembersApi(id: string) {
throw structuredError(error);
}
}

export async function getProjectByIdUpdatePermissionApi(data: GetApiPublicProjectByIdUpdatePermissionData) {
try {
const client = await getUpwithcrowd();
const dataResponse = await client.publicProject.getApiPublicProjectByIdUpdatePermission(data);
return structuredSuccessResponse(dataResponse);
} catch (error) {
throw structuredError(error);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ErrorComponent from "@repo/ui/components/error-component";
import {structuredError} from "@repo/utils/api";
import {isRedirectError} from "next/dist/client/components/redirect";
import {getApiPaymentTransactionApi} from "@/actions/upwithcrowd/payment-transaction/action";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/actions";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/action";
import {getResourceData} from "@/language/core/Default";
import EmptyPaymentsState from "../_components/empty-payments-state";
import PaymentsPage from "./client";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export default function SupportFormClient() {
projectId,
summary: values.summary,
description: values.description,
status: "Open",
},
});
if (response.type === "success") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {structuredError} from "@repo/utils/api";
import {isRedirectError} from "next/dist/client/components/redirect";
import ErrorComponent from "@repo/ui/components/error-component";
import {getCategoryApi, getTypeApi} from "@/actions/upwithcrowd/category-project/action";
import {getPublicProjectDetailByIdApi} from "@/actions/upwithcrowd/public-project/actions";
import {getPublicProjectDetailByIdApi} from "@/actions/upwithcrowd/public-project/action";
import {getResourceData} from "@/language/core/Default";
import ClientBasics from "./client";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import ErrorComponent from "@repo/ui/components/error-component";
import {structuredError} from "@repo/utils/api";
import {isRedirectError} from "next/dist/client/components/redirect";
import {getResourceData} from "@/language/core/Default";
import {getPublicProjectDetailByIdApi} from "@/actions/upwithcrowd/public-project/actions";
import {getPublicProjectDetailByIdApi} from "@/actions/upwithcrowd/public-project/action";
import ProjectDetails from "./client";

async function getApiRequests(id: string) {
Expand Down
2 changes: 1 addition & 1 deletion apps/public/app/[lang]/(landing)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import MissionsSection from "@/components/mission-section";
import OrganizationNumbers from "@/components/organization-numbers";
import ServicesSection from "@/components/services-section";
import Testimonials from "@/components/testimoni";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/actions";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/action";

export default async function Page() {
const publicProjectsResponse = await getPublicProjectsApi({});
Expand Down
2 changes: 1 addition & 1 deletion apps/public/app/[lang]/(landing)/projects/[id]/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export default function ProjectDetails({
</CardHeader>
<CardContent>
<div className="space-y-4">
{paymentResponse.items.slice(0, 3).map((payment, index) => (
{paymentResponse.items?.slice(0, 3).map((payment, index) => (
<div className="flex items-center space-x-4" key={payment.id}>
<Avatar className="h-10 w-10">
<AvatarFallback>JD</AvatarFallback>
Expand Down
4 changes: 2 additions & 2 deletions apps/public/app/[lang]/(landing)/projects/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import {getFileApi} from "@/actions/upwithcrowd/images/action";
import {
getPublicProjectByIdMembersApi,
getPublicProjectDetailByIdApi,
} from "@/actions/upwithcrowd/public-project/actions";
getProjectByIdUpdatePermissionApi,
} from "@/actions/upwithcrowd/public-project/action";
import {getResourceData} from "@/language/core/Default";
import {getApiPaymentTransactionApi} from "@/actions/upwithcrowd/payment-transaction/action";
import {getProjectByIdUpdatePermissionApi} from "@/actions/upwithcrowd/project/action";
import ProjectDetails from "./client";

async function getApiRequests(id: string) {
Expand Down
2 changes: 1 addition & 1 deletion apps/public/app/[lang]/(landing)/projects/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {UpwithCrowd_Projects_FundCollectionType} from "@ayasofyazilim/upwithcrowd-saas/UPWCService";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/actions";
import {getPublicProjectsApi} from "@/actions/upwithcrowd/public-project/action";
import LandingHero from "@/components/landing-hero";
import FilterSelector from "./_components/filter-selector";
import ListedProjectCard from "./_components/listed-project-card";
Expand Down
7 changes: 3 additions & 4 deletions apps/public/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
},
"lint-staged": {
"*": [
"next lint --fix",
"tsc --noEmit"
"next lint --fix && tsc --noEmit"
]
},
"dependencies": {
"@ayasofyazilim/core-saas": "latest",
"@ayasofyazilim/upwithcrowd-saas": "^0.0.36",
"@ayasofyazilim/upwithcrowd-saas": "^0.0.37",
"@formatjs/intl-localematcher": "^0.5.4",
"@hookform/resolvers": "4.1.2",
"@radix-ui/react-accordion": "^1.2.2",
Expand All @@ -35,6 +34,7 @@
"@repo/ayasofyazilim-ui": "workspace:^",
"@repo/ui": "workspace:*",
"@repo/utils": "workspace:*",
"@tailwindcss/typography": "^0.5.10",
"@tanstack/react-table": "^8.20.6",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
Expand All @@ -53,7 +53,6 @@
"react-international-phone": "^4.3.0",
"recharts": "^2.15.1",
"tailwind-merge": "^2.6.0",
"@tailwindcss/typography": "^0.5.10",
"tailwindcss-animate": "^1.0.7",
"zod": "3.24.2"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dependencies": {
"@auth/core": "^0.30.0",
"@ayasofyazilim/core-saas": "latest",
"@ayasofyazilim/upwithcrowd-saas": "^0.0.36",
"@ayasofyazilim/upwithcrowd-saas": "^0.0.37",
"@novu/react": "^2.6.5",
"@radix-ui/react-icons": "^1.3.0",
"@repo/ayasofyazilim-ui": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/[lang]/(main)/(core)/home/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {getMemberApi} from "@upwithcrowd/member/actions";
import {getPublicProjectsApi} from "@upwithcrowd/public-project/actions";
import {getPublicProjectsApi} from "@upwithcrowd/public-project/action";
import ErrorComponent from "@repo/ui/components/error-component";
import {isRedirectError} from "next/dist/client/components/redirect";
import {structuredError} from "@repo/utils/api";
Expand Down
14 changes: 7 additions & 7 deletions pnpm-lock.yaml

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

Loading