From fdc4fa2365e6bf57bef69fbf1ffd54ed8a39ec01 Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 5 Mar 2021 11:47:22 +0900 Subject: [PATCH] Add document service to the plugin --- frontend/plugins/services.ts | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/frontend/plugins/services.ts b/frontend/plugins/services.ts index 4e2730b6..1392c56b 100644 --- a/frontend/plugins/services.ts +++ b/frontend/plugins/services.ts @@ -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) }