shared-ritm 1.1.51 → 1.1.53
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.
- package/dist/index.css +1 -1
- package/dist/shared-ritm.es.js +59175 -39808
- package/dist/shared-ritm.umd.js +97 -87
- package/dist/types/api/services/TasksService.d.ts +1 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/api/services/TasksService.ts +52 -48
- package/src/common/app-dropdown/AppDropdown.vue +31 -31
- package/src/index.ts +2 -0
|
@@ -9,6 +9,7 @@ declare class TasksService extends ApiService {
|
|
|
9
9
|
fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>>;
|
|
10
10
|
fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>>;
|
|
11
11
|
createTask(payload: any): Promise<ResponseApi<any>>;
|
|
12
|
+
editTask(payload: any): Promise<ResponseApi<any>>;
|
|
12
13
|
mergeTask(payload: {
|
|
13
14
|
name: string;
|
|
14
15
|
tasks_id: string[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import AppSidebar from '@/common/app-sidebar/AppSidebar.vue';
|
|
|
13
13
|
import AppToggle from '@/common/app-toggle/AppToggle.vue';
|
|
14
14
|
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue';
|
|
15
15
|
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue';
|
|
16
|
+
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue';
|
|
16
17
|
import useGanttService from '@/api/services/GanttService';
|
|
17
18
|
import useMetricsService from '@/api/services/MetricsService';
|
|
18
19
|
import useProjectsService from '@/api/services/ProjectsService';
|
|
@@ -21,7 +22,7 @@ import useTasksService from '@/api/services/TasksService';
|
|
|
21
22
|
import useAuthService from '@/api/services/AuthService';
|
|
22
23
|
import useFileService from '@/api/services/FileService';
|
|
23
24
|
import ApiService from '@/api/settings/ApiService';
|
|
24
|
-
export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, };
|
|
25
|
+
export { AppButton, AppCheckbox, AppDatePicker, AppInput, AppInputSearch, AppLayout, AppLayoutHeader, AppLoader, AppSelect, AppSheet, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, };
|
|
25
26
|
export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, };
|
|
26
27
|
export type { NotificationType } from './utils/notification';
|
|
27
28
|
export { notificationSettings } from './utils/notification';
|
package/package.json
CHANGED
|
@@ -1,48 +1,52 @@
|
|
|
1
|
-
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
-
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
|
-
import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
|
|
4
|
-
|
|
5
|
-
class TasksService extends ApiService {
|
|
6
|
-
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
7
|
-
return await this.get(`/tasks/${id}`)
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
11
|
-
return await this.get('/list/tasks/search', { params })
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
15
|
-
return await this.get(`/task/${id}/subtasks/list`)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
19
|
-
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
23
|
-
return await this.get(`admin/instruments`, { params })
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
27
|
-
return this.get('repairs/equipment/list', { params })
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
31
|
-
return await this.post(`tasks`, payload)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
public async
|
|
35
|
-
return await this.
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public async
|
|
39
|
-
return await this.
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
import ApiService, { ResponseApi } from '@/api/settings/ApiService'
|
|
2
|
+
import { Api_Tasks_Dto, Api_Tasks_Task_Dto } from '@/api/types/Api_Tasks'
|
|
3
|
+
import { Api_Equipment_Full_Dto } from '@/api/types/Api_Repairs'
|
|
4
|
+
|
|
5
|
+
class TasksService extends ApiService {
|
|
6
|
+
public async fetchTaskById(id: string): Promise<ResponseApi<Api_Tasks_Task_Dto>> {
|
|
7
|
+
return await this.get(`/tasks/${id}`)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async fetchTasksList(params: any): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
11
|
+
return await this.get('/list/tasks/search', { params })
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async fetchSubtasksList(id: string): Promise<ResponseApi<Api_Tasks_Dto[]>> {
|
|
15
|
+
return await this.get(`/task/${id}/subtasks/list`)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async fetchTaskBranch(id: string): Promise<ResponseApi<any>> {
|
|
19
|
+
return await this.get(`/get_list_task_branch?task_id=${id}`)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public async fetchInstrumentsList(params: any): Promise<ResponseApi<any[]>> {
|
|
23
|
+
return await this.get(`admin/instruments`, { params })
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public fetchEquipment(params: any): Promise<ResponseApi<Api_Equipment_Full_Dto[]>> {
|
|
27
|
+
return this.get('repairs/equipment/list', { params })
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public async createTask(payload: any): Promise<ResponseApi<any>> {
|
|
31
|
+
return await this.post(`tasks`, payload)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public async editTask(payload: any): Promise<ResponseApi<any>> {
|
|
35
|
+
return await this.put(`tasks/${payload.taskId}`, payload.data)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public async mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
|
|
39
|
+
return await this.post(`tasks/merge`, payload)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public async deleteTask(id: string): Promise<any> {
|
|
43
|
+
return await this.delete(`tasks/${id}`)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
let api: TasksService
|
|
48
|
+
|
|
49
|
+
export default function useTasksService() {
|
|
50
|
+
if (!api) api = new TasksService()
|
|
51
|
+
return api
|
|
52
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
|
|
3
|
-
<template #label>
|
|
4
|
-
<slot name="label">
|
|
5
|
-
{{ label }}
|
|
6
|
-
</slot>
|
|
7
|
-
</template>
|
|
8
|
-
<template #default>
|
|
9
|
-
<slot name="content" />
|
|
10
|
-
</template>
|
|
11
|
-
</q-btn-dropdown>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
interface Props {
|
|
16
|
-
label?: string
|
|
17
|
-
color?: string
|
|
18
|
-
width?: number
|
|
19
|
-
height?: number
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const props = defineProps<Props>()
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<style scoped lang="scss">
|
|
26
|
-
.q-btn {
|
|
27
|
-
&:before {
|
|
28
|
-
box-shadow: none;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<q-btn-dropdown :color="color" :content-style="{ width: width || '200px', minWidth: height || '200px' }">
|
|
3
|
+
<template #label>
|
|
4
|
+
<slot name="label">
|
|
5
|
+
{{ label }}
|
|
6
|
+
</slot>
|
|
7
|
+
</template>
|
|
8
|
+
<template #default>
|
|
9
|
+
<slot name="content" />
|
|
10
|
+
</template>
|
|
11
|
+
</q-btn-dropdown>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
interface Props {
|
|
16
|
+
label?: string
|
|
17
|
+
color?: string
|
|
18
|
+
width?: number
|
|
19
|
+
height?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const props = defineProps<Props>()
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style scoped lang="scss">
|
|
26
|
+
.q-btn {
|
|
27
|
+
&:before {
|
|
28
|
+
box-shadow: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</style>
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
|
13
13
|
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
14
14
|
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
15
15
|
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue'
|
|
16
|
+
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue'
|
|
16
17
|
|
|
17
18
|
import useGanttService from '@/api/services/GanttService'
|
|
18
19
|
import useMetricsService from '@/api/services/MetricsService'
|
|
@@ -38,6 +39,7 @@ export {
|
|
|
38
39
|
AppToggle,
|
|
39
40
|
AppWrapper,
|
|
40
41
|
AppConfirmDialog,
|
|
42
|
+
AppDropdown,
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export {
|