|
|
@ -6,6 +6,7 @@ import { FromApiRoleItemListRepository } from '@/repositories/role/api' |
|
|
|
import { FromApiProjectItemListRepository } from '@/repositories/project/api' |
|
|
|
import { FromApiCommentItemListRepository } from '@/repositories/comment/api' |
|
|
|
import { FromApiStatisticsRepository } from '@/repositories/statistics/api' |
|
|
|
import { FromApiDocumentItemListRepository } from '@/repositories/document/api' |
|
|
|
import { LabelApplicationService } from '@/services/application/label.service' |
|
|
|
import { MemberApplicationService } from '@/services/application/member.service' |
|
|
|
import { UserApplicationService } from '@/services/application/user.service' |
|
|
@ -13,6 +14,7 @@ import { RoleApplicationService } from '@/services/application/role.service' |
|
|
|
import { ProjectApplicationService } from '@/services/application/project.service' |
|
|
|
import { CommentApplicationService } from '@/services/application/comment.service' |
|
|
|
import { StatisticsApplicationService } from '@/services/application/statistics.service' |
|
|
|
import { DocumentApplicationService } from '@/services/application/document.service' |
|
|
|
|
|
|
|
export interface Services { |
|
|
|
label: LabelApplicationService, |
|
|
@ -21,7 +23,8 @@ export interface Services { |
|
|
|
role: RoleApplicationService, |
|
|
|
project: ProjectApplicationService, |
|
|
|
comment: CommentApplicationService, |
|
|
|
statistics: StatisticsApplicationService |
|
|
|
statistics: StatisticsApplicationService, |
|
|
|
document: DocumentApplicationService |
|
|
|
} |
|
|
|
|
|
|
|
declare module 'vue/types/vue' { |
|
|
@ -31,20 +34,24 @@ declare module 'vue/types/vue' { |
|
|
|
} |
|
|
|
|
|
|
|
const plugin: Plugin = (context, inject) => { |
|
|
|
const labelRepository = new FromApiLabelItemListRepository() |
|
|
|
const label = new LabelApplicationService(labelRepository) |
|
|
|
const memberRepository = new FromApiMemberItemListRepository() |
|
|
|
const member = new MemberApplicationService(memberRepository) |
|
|
|
const userRepository = new FromApiUserItemListRepository() |
|
|
|
const user = new UserApplicationService(userRepository) |
|
|
|
const roleRepository = new FromApiRoleItemListRepository() |
|
|
|
const role = new RoleApplicationService(roleRepository) |
|
|
|
const projectRepository = new FromApiProjectItemListRepository() |
|
|
|
const project = new ProjectApplicationService(projectRepository) |
|
|
|
const commentRepository = new FromApiCommentItemListRepository() |
|
|
|
const comment = new CommentApplicationService(commentRepository) |
|
|
|
const labelRepository = new FromApiLabelItemListRepository() |
|
|
|
const memberRepository = new FromApiMemberItemListRepository() |
|
|
|
const userRepository = new FromApiUserItemListRepository() |
|
|
|
const roleRepository = new FromApiRoleItemListRepository() |
|
|
|
const projectRepository = new FromApiProjectItemListRepository() |
|
|
|
const commentRepository = new FromApiCommentItemListRepository() |
|
|
|
const statisticsRepository = new FromApiStatisticsRepository() |
|
|
|
const documentRepository = new FromApiDocumentItemListRepository() |
|
|
|
|
|
|
|
const label = new LabelApplicationService(labelRepository) |
|
|
|
const member = new MemberApplicationService(memberRepository) |
|
|
|
const user = new UserApplicationService(userRepository) |
|
|
|
const role = new RoleApplicationService(roleRepository) |
|
|
|
const project = new ProjectApplicationService(projectRepository) |
|
|
|
const comment = new CommentApplicationService(commentRepository) |
|
|
|
const statistics = new StatisticsApplicationService(statisticsRepository) |
|
|
|
const document = new DocumentApplicationService(documentRepository) |
|
|
|
|
|
|
|
const services: Services = { |
|
|
|
label, |
|
|
|
member, |
|
|
@ -52,7 +59,8 @@ const plugin: Plugin = (context, inject) => { |
|
|
|
role, |
|
|
|
project, |
|
|
|
comment, |
|
|
|
statistics |
|
|
|
statistics, |
|
|
|
document |
|
|
|
} |
|
|
|
inject('services', services) |
|
|
|
} |
|
|
|