shared-ritm 1.1.52 → 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 +56827 -47154
- package/dist/shared-ritm.umd.js +97 -92
- package/dist/types/api/services/TasksService.d.ts +1 -0
- 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 +62 -62
|
@@ -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/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
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import '@/shared/styles/general.css'
|
|
2
|
-
import AppButton from '@/common/app-button/AppButton.vue'
|
|
3
|
-
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
4
|
-
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
5
|
-
import AppInput from '@/common/app-input/AppInput.vue'
|
|
6
|
-
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
7
|
-
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
8
|
-
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
9
|
-
import AppLoader from '@/common/app-loader/index.vue'
|
|
10
|
-
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
11
|
-
import AppSheet from '@/common/app-sheet/AppSheet.vue'
|
|
12
|
-
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
13
|
-
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
14
|
-
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
15
|
-
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue'
|
|
16
|
-
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue'
|
|
17
|
-
|
|
18
|
-
import useGanttService from '@/api/services/GanttService'
|
|
19
|
-
import useMetricsService from '@/api/services/MetricsService'
|
|
20
|
-
import useProjectsService from '@/api/services/ProjectsService'
|
|
21
|
-
import useRepairsService from '@/api/services/RepairsService'
|
|
22
|
-
import useTasksService from '@/api/services/TasksService'
|
|
23
|
-
import useAuthService from '@/api/services/AuthService'
|
|
24
|
-
import useFileService from '@/api/services/FileService'
|
|
25
|
-
import ApiService from '@/api/settings/ApiService'
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
AppButton,
|
|
29
|
-
AppCheckbox,
|
|
30
|
-
AppDatePicker,
|
|
31
|
-
AppInput,
|
|
32
|
-
AppInputSearch,
|
|
33
|
-
AppLayout,
|
|
34
|
-
AppLayoutHeader,
|
|
35
|
-
AppLoader,
|
|
36
|
-
AppSelect,
|
|
37
|
-
AppSheet,
|
|
38
|
-
AppSidebar,
|
|
39
|
-
AppToggle,
|
|
40
|
-
AppWrapper,
|
|
41
|
-
AppConfirmDialog,
|
|
42
|
-
AppDropdown,
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export {
|
|
46
|
-
ApiService,
|
|
47
|
-
useAuthService,
|
|
48
|
-
useGanttService,
|
|
49
|
-
useMetricsService,
|
|
50
|
-
useProjectsService,
|
|
51
|
-
useRepairsService,
|
|
52
|
-
useTasksService,
|
|
53
|
-
useFileService,
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export type { NotificationType } from './utils/notification'
|
|
57
|
-
export { notificationSettings } from './utils/notification'
|
|
58
|
-
|
|
59
|
-
export * from './api/types/Api_Tasks'
|
|
60
|
-
export * from './api/types/Api_Repairs'
|
|
61
|
-
export * from './api/types/Api_Projects'
|
|
62
|
-
// export * from '@/api/types/Api_Metrics'
|
|
1
|
+
import '@/shared/styles/general.css'
|
|
2
|
+
import AppButton from '@/common/app-button/AppButton.vue'
|
|
3
|
+
import AppCheckbox from '@/common/app-checkbox/AppCheckbox.vue'
|
|
4
|
+
import AppDatePicker from '@/common/app-date-picker/AppDatePicker.vue'
|
|
5
|
+
import AppInput from '@/common/app-input/AppInput.vue'
|
|
6
|
+
import AppInputSearch from '@/common/app-input-search/AppInputSearch.vue'
|
|
7
|
+
import AppLayout from '@/common/app-layout/AppLayout.vue'
|
|
8
|
+
import AppLayoutHeader from '@/common/app-layout/components/AppLayoutHeader.vue'
|
|
9
|
+
import AppLoader from '@/common/app-loader/index.vue'
|
|
10
|
+
import AppSelect from '@/common/app-select/AppSelect.vue'
|
|
11
|
+
import AppSheet from '@/common/app-sheet/AppSheet.vue'
|
|
12
|
+
import AppSidebar from '@/common/app-sidebar/AppSidebar.vue'
|
|
13
|
+
import AppToggle from '@/common/app-toggle/AppToggle.vue'
|
|
14
|
+
import AppWrapper from '@/common/app-wrapper/AppWrapper.vue'
|
|
15
|
+
import AppConfirmDialog from '@/common/app-dialogs/AppConfirmDialog.vue'
|
|
16
|
+
import AppDropdown from '@/common/app-dropdown/AppDropdown.vue'
|
|
17
|
+
|
|
18
|
+
import useGanttService from '@/api/services/GanttService'
|
|
19
|
+
import useMetricsService from '@/api/services/MetricsService'
|
|
20
|
+
import useProjectsService from '@/api/services/ProjectsService'
|
|
21
|
+
import useRepairsService from '@/api/services/RepairsService'
|
|
22
|
+
import useTasksService from '@/api/services/TasksService'
|
|
23
|
+
import useAuthService from '@/api/services/AuthService'
|
|
24
|
+
import useFileService from '@/api/services/FileService'
|
|
25
|
+
import ApiService from '@/api/settings/ApiService'
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
AppButton,
|
|
29
|
+
AppCheckbox,
|
|
30
|
+
AppDatePicker,
|
|
31
|
+
AppInput,
|
|
32
|
+
AppInputSearch,
|
|
33
|
+
AppLayout,
|
|
34
|
+
AppLayoutHeader,
|
|
35
|
+
AppLoader,
|
|
36
|
+
AppSelect,
|
|
37
|
+
AppSheet,
|
|
38
|
+
AppSidebar,
|
|
39
|
+
AppToggle,
|
|
40
|
+
AppWrapper,
|
|
41
|
+
AppConfirmDialog,
|
|
42
|
+
AppDropdown,
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export {
|
|
46
|
+
ApiService,
|
|
47
|
+
useAuthService,
|
|
48
|
+
useGanttService,
|
|
49
|
+
useMetricsService,
|
|
50
|
+
useProjectsService,
|
|
51
|
+
useRepairsService,
|
|
52
|
+
useTasksService,
|
|
53
|
+
useFileService,
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type { NotificationType } from './utils/notification'
|
|
57
|
+
export { notificationSettings } from './utils/notification'
|
|
58
|
+
|
|
59
|
+
export * from './api/types/Api_Tasks'
|
|
60
|
+
export * from './api/types/Api_Repairs'
|
|
61
|
+
export * from './api/types/Api_Projects'
|
|
62
|
+
// export * from '@/api/types/Api_Metrics'
|