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.

20 lines
485 B

2 years ago
  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 (projectId: string) => {
  10. state.project = await projectService.findById(projectId)
  11. }
  12. return {
  13. state,
  14. getProjectById
  15. }
  16. }