Skip to content
Open
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
9 changes: 0 additions & 9 deletions .env.deploy

This file was deleted.

Binary file modified assets/images/component/AppFooter/icons/socials/icon-fb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/component/AppFooter/icons/socials/icon-ig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/component/AppFooter/icons/socials/icon-ln.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/component/AppFooter/icons/socials/icon-yt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions backend/app/graphql/resolvers/company.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,15 @@ class CreateCompanyInput extends CompanyCreateInput {
@Field()
industry: string = "";

@Field(() => String, { nullable: true })
instagram?: string = undefined;

@Field(() => String, { nullable: true })
facebook?: string = undefined;

@Field(() => String, { nullable: true })
linkedIn?: string = undefined;

@Field(() => GraphQLUpload, { nullable: true })
vectorLogo: FileUpload | null = null;

Expand Down
61 changes: 8 additions & 53 deletions backend/app/graphql/resolvers/galleryImage.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import {
GalleryImage, Image,
GalleryImage, SponsorCreateInput,
} from "@generated/type-graphql";
import {
Arg, Authorized, Ctx, Field, FieldResolver, Info, InputType, Int, Mutation, ObjectType, Query, Resolver,
Root,
Arg, Authorized, Ctx, Field, Info, InputType, Int, Mutation, ObjectType, Query, Resolver,
} from "type-graphql";
import {
type GraphQLResolveInfo,
Expand All @@ -15,10 +14,9 @@ import {
type Context,
} from "../../types/apollo-context";
import {
toSelect, transformSelectDefaults, transformSelectFor,
toSelect, transformSelectFor,
} from "../helpers/resolver";
import {
GQLField,
type Dict, type GQLResponse,
} from "../../types/helpers";
import {
Expand All @@ -39,31 +37,15 @@ import {
import {
swap,
} from "../../services/helpers/orderable";
import {
transformSelect as transformSelectImage,
} from "./image";

@Resolver(() => GalleryImage)
export class GalleryImageFieldResolver {
@FieldResolver(() => Image, { nullable: true })
photo(
@Root() galleryImage: GalleryImage,
): GQLField<Image, "nullable"> {
return galleryImage.photo ?? null;
}

}

export const transformSelect = transformSelectFor<GalleryImageFieldResolver>({
...transformSelectDefaults({
photo: transformSelectImage,
}),
});

@InputType()
class GalleryImageFilter {
@Field(() => Int, { nullable: true })
take: number = 0;
}
});

@InputType()
export class GalleryImageCreateInput {
Expand All @@ -76,7 +58,7 @@ export class GalleryImageCreateInput {
@Field()
visible: boolean = false;

@Field(() => GraphQLUpload, { nullable: true })
@Field(() => GraphQLUpload)
photo: FileUpload = null as unknown as FileUpload;
}

Expand All @@ -90,10 +72,8 @@ export class GalleryImageQueryResolver {
galleryImages(
@Ctx() ctx: Context,
@Info() info: GraphQLResolveInfo,
@Arg("filter", { nullable: true }) filter?: GalleryImageFilter,
): GQLResponse<GalleryImage[]> {
return ctx.prisma.galleryImage.findMany({
take: filter?.take,
where: {
visible: true,
},
Expand All @@ -120,31 +100,6 @@ export class GalleryImageQueryResolver {
});
}

@Query(() => GalleryImage, { nullable: true })
galleryImageItemByUid(
@Ctx() ctx: Context,
@Info() info: GraphQLResolveInfo,
@Arg("uid") uid: string,
): GQLResponse<GalleryImage, "nullable"> {
// const { user } = ctx;

// if (!user) {
// return null;
// };

// if (!hasAtLeastRole(Role.Admin, user)) {
// return null;
// }

return ctx.prisma.galleryImage.findFirst({
where: {
uid,
},
select: toSelect(info, transformSelect),
});
}


@Mutation(() => CreateGalleryImageResponse, { nullable: true })
async createGalleryImage(
@Ctx() ctx: Context,
Expand Down Expand Up @@ -311,7 +266,7 @@ export class GalleryImageQueryResolver {
@Mutation(() => Boolean)
async deleteGalleryImage(
@Ctx() ctx: Context,
@Arg("uid") uid: string,
@Arg("galleryImage") galleryImageUid: string,
) {
const { user } = ctx;

Expand All @@ -326,7 +281,7 @@ export class GalleryImageQueryResolver {
const success = await ctx.prisma.$transaction(async (prisma) => {
const galleryImage = await prisma.galleryImage.delete({
where: {
uid: uid,
uid: galleryImageUid,
},
select: {
order: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- AlterTable
ALTER TABLE "Company" ADD COLUMN "facebook" TEXT,
ADD COLUMN "instagram" TEXT,
ADD COLUMN "linkedIn" TEXT;
3 changes: 3 additions & 0 deletions backend/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ model Company {
brandName String
address String
website String
instagram String?
facebook String?
linkedIn String?
/// @TypeGraphQL.omit(input: true)
industry Industry @relation(fields: [industryId], references: [id])
/// @TypeGraphQL.omit(input: true)
Expand Down
Loading
Loading