shared-ritm 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,6 +2,16 @@ import ApiService, { ResponseApi } from '@/api/settings/ApiService';
|
|
|
2
2
|
import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks';
|
|
3
3
|
declare class ProjectsService extends ApiService {
|
|
4
4
|
fetchProjectById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>>;
|
|
5
|
+
createProject(params: any): Promise<ResponseApi<any>>;
|
|
6
|
+
editProject(id: string, params: any): Promise<ResponseApi<any>>;
|
|
7
|
+
fetchProjects(id: string, params: any): Promise<ResponseApi<any>>;
|
|
8
|
+
cloneProject(project: any): Promise<ResponseApi<any>>;
|
|
9
|
+
archiveProject(id: string, data: any): Promise<ResponseApi<any>>;
|
|
10
|
+
unArchiveProject(id: string, data: any): Promise<ResponseApi<any>>;
|
|
11
|
+
moveAprProject(id: string): Promise<ResponseApi<any>>;
|
|
12
|
+
restoreProject(id: string): Promise<ResponseApi<any>>;
|
|
13
|
+
importTasks(payload: any): Promise<ResponseApi<any>>;
|
|
14
|
+
fetchProjectTeamList(id: string): Promise<ResponseApi<any>>;
|
|
5
15
|
}
|
|
6
16
|
export default function useProjectsService(): ProjectsService;
|
|
7
17
|
export {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,48 @@ import { Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
|
3
3
|
|
|
4
4
|
class ProjectsService extends ApiService {
|
|
5
5
|
public async fetchProjectById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
6
|
-
return
|
|
6
|
+
return this.get(`/projects/${id}`)
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
public createProject(params: any): Promise<ResponseApi<any>> {
|
|
10
|
+
return this.post<any, ResponseApi<any>>('/projects', params)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public editProject(id: string, params: any): Promise<ResponseApi<any>> {
|
|
14
|
+
return this.put<any, ResponseApi<any>>(`/projects/${id}`, params)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public fetchProjects(id: string, params: any): Promise<ResponseApi<any>> {
|
|
18
|
+
return this.get(`/get_list_project/${id}`, { params })
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public cloneProject(project: any): Promise<ResponseApi<any>> {
|
|
22
|
+
return this.post<any, ResponseApi<any>>(`projects/${project.id}/clone`, project)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public archiveProject(id: string, data: any): Promise<ResponseApi<any>> {
|
|
26
|
+
return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public unArchiveProject(id: string, data: any): Promise<ResponseApi<any>> {
|
|
30
|
+
return this.put<any, ResponseApi<any>>(`/projects/${id}`, data)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public moveAprProject(id: string): Promise<ResponseApi<any>> {
|
|
34
|
+
return this.post<any, ResponseApi<any>>('repairs/move_plan_to_real', {
|
|
35
|
+
repairs: [id],
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
public restoreProject(id: string): Promise<ResponseApi<any>> {
|
|
39
|
+
return this.post<any, ResponseApi<any>>('/restore_project', { projects_ids: [id] })
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public importTasks(payload: any): Promise<ResponseApi<any>> {
|
|
43
|
+
return this.post<any, ResponseApi<any>>('tasks/import', payload)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public fetchProjectTeamList(id: string): Promise<ResponseApi<any>> {
|
|
47
|
+
return this.put<any, ResponseApi<any>>(`/projects/${id}`, null)
|
|
7
48
|
}
|
|
8
49
|
}
|
|
9
50
|
|