-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(root): ✨ added help center with minor oauth changes
- Loading branch information
Showing
29 changed files
with
2,028 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
import { Field, Int, ObjectType } from "type-graphql"; | ||
import { | ||
Entity, | ||
PrimaryGeneratedColumn, | ||
Column, | ||
CreateDateColumn, | ||
UpdateDateColumn, | ||
BaseEntity, | ||
ManyToOne, | ||
JoinTable, | ||
OneToMany, | ||
} from "typeorm"; | ||
import { User } from "./User"; | ||
import { IssueCategory } from "./IssueCategory"; | ||
import { IssueComment } from "./IssueComment"; | ||
|
||
export const POSSIBLE_ISSUE_STATUS = [ | ||
"SUBMITTED", | ||
"OPEN", | ||
"IN_PROGRESS", | ||
"ON_HOLD", | ||
"CLOSED", | ||
"REJECTED", | ||
"RESOLVED_BY_CUSTOMER", | ||
"PENDING_CUSTOMER_RESPONSE", | ||
]; | ||
|
||
export type IssueStatus = | ||
| "SUBMITTED" | ||
| "OPEN" | ||
| "IN_PROGRESS" | ||
| "ON_HOLD" | ||
| "CLOSED" | ||
| "REJECTED" | ||
| "RESOLVED_BY_CUSTOMER" | ||
| "PENDING_CUSTOMER_RESPONSE"; | ||
|
||
@ObjectType() | ||
@Entity() | ||
export class Issue extends BaseEntity { | ||
@Field(() => Int) | ||
@PrimaryGeneratedColumn() | ||
id!: number; | ||
|
||
@Field(() => String) | ||
@Column() | ||
subject!: string; | ||
|
||
@Field(() => String) | ||
@Column({ | ||
type: "text", | ||
}) | ||
content!: string; | ||
|
||
@Field(() => String, { | ||
nullable: true, | ||
}) | ||
@Column({ | ||
type: "text", | ||
nullable: true, | ||
}) | ||
html?: string; | ||
|
||
@Field(() => String) | ||
@Column({ | ||
type: "enum", | ||
enum: POSSIBLE_ISSUE_STATUS, | ||
default: "SUBMITTED", | ||
}) | ||
status!: IssueStatus; | ||
|
||
@Field(() => [IssueComment], { nullable: true }) | ||
@OneToMany(() => IssueComment, (comment) => comment.issue) | ||
@JoinTable({ name: "comment_id" }) | ||
comments?: IssueComment[]; | ||
|
||
@Field(() => String, { nullable: true }) | ||
@Column({ | ||
type: "timestamp with time zone", | ||
nullable: true, | ||
}) | ||
completed_at?: string; | ||
|
||
@Field(() => Int) | ||
@Column() | ||
categoryId!: number; | ||
|
||
@Field(() => IssueCategory) | ||
@ManyToOne(() => IssueCategory, (category) => category.issues) | ||
@JoinTable({ name: "category_id" }) | ||
category!: IssueCategory; | ||
|
||
@Field() | ||
@Column() | ||
userId!: number; | ||
|
||
@Field(() => User) | ||
@ManyToOne(() => User, (user) => user.issues) | ||
user!: User; | ||
|
||
@Field(() => String) | ||
@CreateDateColumn() | ||
created_at = new Date(); | ||
|
||
@Field(() => String) | ||
@UpdateDateColumn() | ||
updated_at = new Date(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Field, Int, ObjectType } from "type-graphql"; | ||
import { | ||
BaseEntity, | ||
Column, | ||
CreateDateColumn, | ||
Entity, | ||
JoinTable, | ||
OneToMany, | ||
PrimaryGeneratedColumn, | ||
UpdateDateColumn, | ||
} from "typeorm"; | ||
import { Issue } from "./Issue"; | ||
|
||
@ObjectType() | ||
@Entity() | ||
export class IssueCategory extends BaseEntity { | ||
@Field(() => Int) | ||
@PrimaryGeneratedColumn() | ||
id!: number; | ||
|
||
@Field(() => String) | ||
@Column() | ||
name!: string; | ||
|
||
@Field(() => String) | ||
@Column({ unique: true }) | ||
identifier!: string; | ||
|
||
@Field(() => String) | ||
@Column({ type: "text" }) | ||
desc!: string; | ||
|
||
@Field(() => [Issue], { nullable: true }) | ||
@OneToMany(() => Issue, (issue) => issue.category) | ||
@JoinTable({ name: "issue_id" }) | ||
issues?: Issue[]; | ||
|
||
@Field(() => String) | ||
@CreateDateColumn() | ||
created_at = new Date(); | ||
|
||
@Field(() => String) | ||
@UpdateDateColumn() | ||
updated_at = new Date(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import { Field, Int, ObjectType } from "type-graphql"; | ||
import { | ||
Entity, | ||
PrimaryGeneratedColumn, | ||
Column, | ||
CreateDateColumn, | ||
UpdateDateColumn, | ||
BaseEntity, | ||
ManyToOne, | ||
JoinTable, | ||
} from "typeorm"; | ||
import { User } from "./User"; | ||
import { Issue } from "./Issue"; | ||
|
||
@ObjectType() | ||
@Entity() | ||
export class IssueComment extends BaseEntity { | ||
@Field(() => Int) | ||
@PrimaryGeneratedColumn() | ||
id!: number; | ||
|
||
@Field(() => String) | ||
@Column({ | ||
type: "text", | ||
}) | ||
content!: string; | ||
|
||
@Field(() => String, { | ||
nullable: true, | ||
}) | ||
@Column({ | ||
type: "text", | ||
nullable: true, | ||
}) | ||
html?: string; | ||
|
||
@Field(() => String, { nullable: true }) | ||
@Column({ | ||
type: "timestamp with time zone", | ||
nullable: true, | ||
}) | ||
completed_at?: string; | ||
|
||
@Field(() => Int) | ||
@Column() | ||
issueId!: number; | ||
|
||
@Field(() => Issue) | ||
@ManyToOne(() => Issue, (issue) => issue.comments) | ||
@JoinTable({ name: "issue_id" }) | ||
issue!: Issue; | ||
|
||
@Field() | ||
@Column() | ||
userId!: number; | ||
|
||
@Field(() => User) | ||
@ManyToOne(() => User, (user) => user.addresses) | ||
user!: User; | ||
|
||
@Field(() => String) | ||
@CreateDateColumn() | ||
created_at = new Date(); | ||
|
||
@Field(() => String) | ||
@UpdateDateColumn() | ||
updated_at = new Date(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { InputType, Field } from "type-graphql"; | ||
|
||
@InputType() | ||
export default class IssueInput { | ||
@Field() | ||
subject!: string; | ||
|
||
@Field() | ||
content!: string; | ||
|
||
@Field() | ||
html!: string; | ||
|
||
@Field() | ||
categoryId!: number; | ||
} |
Oops, something went wrong.
f826a21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ecommerce-admin-client – ./apps/admin
ecommerce-admin-client-sahrohit.vercel.app
ecommerce-admin-client.vercel.app
ecommerce-admin-client-git-main-sahrohit.vercel.app
f826a21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ecommerce-storefront-client – ./apps/storefront
ecommerce-storefront-client-git-main-sahrohit.vercel.app
hamropasal.vercel.app
www.rudejellyfish.live
ecommerce-storefront-client-sahrohit.vercel.app
rudejellyfish.live