-
Notifications
You must be signed in to change notification settings - Fork 4
move ticket to frontline #234
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
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| import inboxResolvers from '@/inbox/graphql/resolvers/customResolvers'; | ||
| import ticketResolvers from '~/modules/tickets/graphql/resolvers/customResolvers'; | ||
|
|
||
| export const customResolvers = { | ||
| ...inboxResolvers, | ||
| ...ticketResolvers, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| export const TypeExtensions = ` | ||
| extend type User @key(fields: "_id") { | ||
| _id: String @external, | ||
| conversations: [Conversation] | ||
| } | ||
|
|
||
| extend type Branch @key(fields: "_id") { | ||
| _id: String @external | ||
| } | ||
|
|
||
| extend type Department @key(fields: "_id") { | ||
| _id: String @external | ||
| } | ||
|
|
||
| extend type Company @key(fields: "_id") { | ||
| _id: String @external | ||
| } | ||
|
|
||
| extend type Customer @key(fields: "_id") { | ||
| _id: String @external | ||
| conversations: [Conversation] | ||
| } | ||
|
|
||
| extend type Tag @key(fields: "_id") { | ||
| _id: String @external | ||
| } | ||
|
|
||
| extend type Brand @key(fields: "_id") { | ||
| _id: String @external | ||
| } | ||
| `; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| import { Document } from 'mongoose'; | ||
| import { IPipeline } from '~/modules/tickets/@types/pipeline'; | ||
|
|
||
| export interface IBoard { | ||
| name?: string; | ||
| order?: number; | ||
| userId?: string; | ||
| type: string; | ||
| } | ||
|
|
||
| export interface IBoardDocument extends IBoard, Document { | ||
| _id: string; | ||
|
|
||
| pipelines?: IPipeline[]; | ||
| createdAt: Date; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| import { Document } from 'mongoose'; | ||
|
|
||
| export interface IChecklist { | ||
| contentType: string; | ||
| contentTypeId: string; | ||
| title: string; | ||
| } | ||
|
|
||
| export interface IChecklistDocument extends IChecklist, Document { | ||
| _id: string; | ||
| createdUserId: string; | ||
| createdDate: Date; | ||
| } | ||
|
|
||
| export interface IChecklistItem { | ||
| checklistId: string; | ||
| content: string; | ||
| isChecked: boolean; | ||
| } | ||
|
|
||
| export interface IChecklistItemDocument extends IChecklistItem, Document { | ||
| _id: string; | ||
| order: number; | ||
| createdUserId: string; | ||
| createdDate: Date; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| import { Document } from 'mongoose'; | ||
|
|
||
| export interface IComment { | ||
| typeId: string; | ||
| type: string; | ||
|
|
||
| content: string; | ||
| parentId?: string; | ||
|
|
||
| userId?: string; | ||
| userType?: string; | ||
| } | ||
|
|
||
| export interface ICommentDocument extends IComment, Document { | ||
| _id: string; | ||
| createdAt?: Date; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { Document } from 'mongoose'; | ||
|
|
||
| export interface IPipelineLabel { | ||
| name: string; | ||
| colorCode: string; | ||
| pipelineId: string; | ||
| createdBy?: string; | ||
| } | ||
|
|
||
| export interface IPipelineLabelDocument extends IPipelineLabel, Document { | ||
| _id: string; | ||
|
|
||
| createdAt?: Date; | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,36 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import { Document } from 'mongoose'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export interface IPipeline { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| name?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| boardId: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| status?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| visibility?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| memberIds?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bgColor?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| watchedUserIds?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| startDate?: Date; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| endDate?: Date; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| metric?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| hackScoringType?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| templateId?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isCheckDate?: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isCheckUser?: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| isCheckDepartment?: boolean; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| excludeCheckUserIds?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numberConfig?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| numberSize?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| nameConfig?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| lastNum?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| departmentIds?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| branchIds?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tagId?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| order?: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| userId?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| type: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider refining the interface design for better type safety and maintainability. The
Consider this improved typing approach: +export enum PipelineType {
+ TICKET = 'ticket',
+ TASK = 'task',
+ DEAL = 'deal'
+}
+
+export enum PipelineVisibility {
+ PUBLIC = 'public',
+ PRIVATE = 'private'
+}
export interface IPipeline {
name?: string;
boardId: string;
status?: string;
- visibility?: string;
+ visibility?: PipelineVisibility;
memberIds?: string[];
bgColor?: string;
watchedUserIds?: string[];
startDate?: Date;
endDate?: Date;
metric?: string;
- hackScoringType?: string;
+ scoringType?: string;
templateId?: string;
isCheckDate?: boolean;
isCheckUser?: boolean;
isCheckDepartment?: boolean;
excludeCheckUserIds?: string[];
numberConfig?: string;
numberSize?: string;
nameConfig?: string;
lastNum?: string;
departmentIds?: string[];
branchIds?: string[];
tagId?: string;
order?: number;
userId?: string;
- type: string;
+ type: PipelineType;
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export interface IPipelineDocument extends IPipeline, Document { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| _id: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| createdAt: Date; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
🛠️ Refactor suggestion
Add type constraints for consistency.
Similar to the pipeline interface, the
typefield should have enum constraints to prevent invalid values.📝 Committable suggestion
🤖 Prompt for AI Agents