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.

22 lines
492 B

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