You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
515 B

  1. import _ from 'lodash'
  2. import { reactive, useContext } from '@nuxtjs/composition-api'
  3. import { ProjectDTO } from '@/services/application/project/projectData'
  4. export const useProjectItem = () => {
  5. const state = reactive({
  6. project: {} as ProjectDTO
  7. })
  8. const { app } = useContext()
  9. const projectService = app.$services.project
  10. const getProjectById = async(
  11. projectId: string
  12. ) => {
  13. state.project = await projectService.findById(projectId)
  14. }
  15. return {
  16. state,
  17. getProjectById
  18. }
  19. }