|
@ -1,9 +1,12 @@ |
|
|
import { Plugin } from '@nuxt/types' |
|
|
import { Plugin } from '@nuxt/types' |
|
|
import { FromApiLabelItemListRepository } from '@/repositories/label/api' |
|
|
import { FromApiLabelItemListRepository } from '@/repositories/label/api' |
|
|
|
|
|
import { FromApiMemberItemListRepository } from '@/repositories/member/api' |
|
|
import { LabelApplicationService } from '@/services/application/label.service' |
|
|
import { LabelApplicationService } from '@/services/application/label.service' |
|
|
|
|
|
import { MemberApplicationService } from '@/services/application/member.service' |
|
|
|
|
|
|
|
|
export interface Services { |
|
|
export interface Services { |
|
|
label: LabelApplicationService |
|
|
|
|
|
|
|
|
label: LabelApplicationService, |
|
|
|
|
|
member: MemberApplicationService |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
declare module 'vue/types/vue' { |
|
|
declare module 'vue/types/vue' { |
|
@ -15,8 +18,11 @@ declare module 'vue/types/vue' { |
|
|
const plugin: Plugin = (context, inject) => { |
|
|
const plugin: Plugin = (context, inject) => { |
|
|
const labelRepository = new FromApiLabelItemListRepository() |
|
|
const labelRepository = new FromApiLabelItemListRepository() |
|
|
const label = new LabelApplicationService(labelRepository) |
|
|
const label = new LabelApplicationService(labelRepository) |
|
|
|
|
|
const memberRepository = new FromApiMemberItemListRepository() |
|
|
|
|
|
const member = new MemberApplicationService(memberRepository) |
|
|
const services: Services = { |
|
|
const services: Services = { |
|
|
label |
|
|
|
|
|
|
|
|
label, |
|
|
|
|
|
member |
|
|
} |
|
|
} |
|
|
inject('services', services) |
|
|
inject('services', services) |
|
|
} |
|
|
} |
|
|