shared-ritm 1.1.52 → 1.1.54

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.
@@ -9,11 +9,17 @@ 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[];
15
16
  }): Promise<ResponseApi<any>>;
16
17
  deleteTask(id: string): Promise<any>;
18
+ changeStatus(payload: {
19
+ taskId: string;
20
+ data: unknown;
21
+ }): Promise<any>;
22
+ uploadComment(payload: unknown): Promise<any>;
17
23
  }
18
24
  export default function useTasksService(): TasksService;
19
25
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.1.52",
3
+ "version": "1.1.54",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -1,48 +1,61 @@
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 mergeTask(payload: { name: string; tasks_id: string[] }): Promise<ResponseApi<any>> {
35
- return await this.post(`tasks/merge`, payload)
36
- }
37
-
38
- public async deleteTask(id: string): Promise<any> {
39
- return await this.delete(`tasks/${id}`)
40
- }
41
- }
42
-
43
- let api: TasksService
44
-
45
- export default function useTasksService() {
46
- if (!api) api = new TasksService()
47
- return api
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
+ public async changeStatus(payload: { taskId: string; data: unknown }): Promise<any> {
47
+ const { taskId, data } = payload
48
+ return await this.put(`task/${taskId}/change-status`, data)
49
+ }
50
+
51
+ public async uploadComment(payload: unknown): Promise<any> {
52
+ return await this.post('comments', payload)
53
+ }
54
+ }
55
+
56
+ let api: TasksService
57
+
58
+ export default function useTasksService() {
59
+ if (!api) api = new TasksService()
60
+ return api
61
+ }
@@ -1,124 +1,124 @@
1
- export type Api_Tasks_Responsible_Dto = {
2
- id: string
3
- first_name: string
4
- last_name: string
5
- patronymic: string
6
- full_name: string
7
- }
8
-
9
- export type Api_Tasks_Assigned_Dto = {
10
- id: string
11
- first_name: string
12
- last_name: string
13
- patronymic: null | string
14
- full_name: string
15
- }
16
-
17
- export type Api_Tasks_Status_Dto = {
18
- id: string
19
- name: string
20
- title: string
21
- }
22
- export type Api_Tasks_Project_Dto = {
23
- id: string
24
- name: string
25
- teams: string[]
26
- }
27
- export type Api_Tasks_Position_Dto = {
28
- id: string
29
- name: string
30
- display_name: string
31
- }
32
-
33
- export type Api_Tasks_Position_Assigned_Dto = {
34
- id: number
35
- user: {
36
- id: string
37
- full_name: string
38
- }
39
- position: Api_Tasks_Position_Dto
40
- }
41
-
42
- export type Api_Tasks_Teams_Dto = {
43
- id: string
44
- name: string
45
- display_name: string
46
- }
47
-
48
- export type Api_Tasks_Equipment_Dto = {
49
- id: string
50
- name: string
51
- model: string
52
- registration_number: string
53
- created_at: string
54
- updated_at: string
55
- repair_frequency: number
56
- repair_range: number
57
- }
58
-
59
- export type Api_Tasks_Task_Dto = {
60
- id: string
61
- name: string
62
- type: string
63
- project_id: string
64
- description: string
65
- subtask_counter: number
66
- subtasks: Api_Tasks_Task_Dto[]
67
- state_id: null | string
68
- start_date: string
69
- end_date: string
70
- deadline: string
71
- plan_date: string
72
- time_to_complete: null | string | number
73
- time_to_complete_sec: number
74
- priority: number
75
- work_zone_id: null | string
76
- location_id: null | string
77
- target: any
78
- status: Api_Tasks_Status_Dto
79
- project: Api_Tasks_Project_Dto
80
- position: Api_Tasks_Position_Dto[]
81
- assigned: Api_Tasks_Assigned_Dto[]
82
- instruments: any[]
83
- warehouse: any[]
84
- responsible: Api_Tasks_Responsible_Dto[]
85
- position_assigned: Api_Tasks_Position_Assigned_Dto[]
86
- comments: any[]
87
- files: any[]
88
- teams: Api_Tasks_Teams_Dto[]
89
- work_zone: string
90
- planned_start: null | string
91
- planned_end: null | string
92
- fact_start_date: string
93
- fact_end_date: null | string
94
- work_sec: number
95
- pause_sec: number
96
- repair_object: null | string
97
- isPause: boolean
98
- equipment: Api_Tasks_Equipment_Dto[]
99
- }
100
-
101
- export type Api_Tasks_Simple_Responsible_Dto = {
102
- id: string
103
- full_name: string
104
- }
105
-
106
- export type Api_Tasks_Dto = {
107
- id: string
108
- name: string
109
- plan_date: null | string
110
- deadline: null | string
111
- priority: number
112
- subtasks_count: number
113
- responsible: Api_Tasks_Simple_Responsible_Dto[]
114
- assigned: any[]
115
- status: Api_Tasks_Status_Dto
116
- expired: boolean
117
- teams: Api_Tasks_Teams_Dto[]
118
- is_critical_path: boolean
119
- isPause: boolean
120
- fact_start_date: null | string
121
- fact_end_date: null | string
122
- pause_sec: number
123
- work_sec: number
124
- }
1
+ export type Api_Tasks_Responsible_Dto = {
2
+ id: string
3
+ first_name: string
4
+ last_name: string
5
+ patronymic: string
6
+ full_name: string
7
+ }
8
+
9
+ export type Api_Tasks_Assigned_Dto = {
10
+ id: string
11
+ first_name: string
12
+ last_name: string
13
+ patronymic: null | string
14
+ full_name: string
15
+ }
16
+
17
+ export type Api_Tasks_Status_Dto = {
18
+ id: string
19
+ name: string
20
+ title: string
21
+ }
22
+ export type Api_Tasks_Project_Dto = {
23
+ id: string
24
+ name: string
25
+ teams: string[]
26
+ }
27
+ export type Api_Tasks_Position_Dto = {
28
+ id: string
29
+ name: string
30
+ display_name: string
31
+ }
32
+
33
+ export type Api_Tasks_Position_Assigned_Dto = {
34
+ id: number
35
+ user: {
36
+ id: string
37
+ full_name: string
38
+ }
39
+ position: Api_Tasks_Position_Dto
40
+ }
41
+
42
+ export type Api_Tasks_Teams_Dto = {
43
+ id: string
44
+ name: string
45
+ display_name: string
46
+ }
47
+
48
+ export type Api_Tasks_Equipment_Dto = {
49
+ id: string
50
+ name: string
51
+ model: string
52
+ registration_number: string
53
+ created_at: string
54
+ updated_at: string
55
+ repair_frequency: number
56
+ repair_range: number
57
+ }
58
+
59
+ export type Api_Tasks_Task_Dto = {
60
+ id: string
61
+ name: string
62
+ type: string
63
+ project_id: string
64
+ description: string
65
+ subtask_counter: number
66
+ subtasks: Api_Tasks_Task_Dto[]
67
+ state_id: null | string
68
+ start_date: string
69
+ end_date: string
70
+ deadline: string
71
+ plan_date: string
72
+ time_to_complete: null | string | number
73
+ time_to_complete_sec: number
74
+ priority: number
75
+ work_zone_id: null | string
76
+ location_id: null | string
77
+ target: any
78
+ status: Api_Tasks_Status_Dto
79
+ project: Api_Tasks_Project_Dto
80
+ position: Api_Tasks_Position_Dto[]
81
+ assigned: Api_Tasks_Assigned_Dto[]
82
+ instruments: any[]
83
+ warehouse: any[]
84
+ responsible: Api_Tasks_Responsible_Dto[]
85
+ position_assigned: Api_Tasks_Position_Assigned_Dto[]
86
+ comments: any[]
87
+ files: any[]
88
+ teams: Api_Tasks_Teams_Dto[]
89
+ work_zone: string
90
+ planned_start: null | string
91
+ planned_end: null | string
92
+ fact_start_date: string
93
+ fact_end_date: null | string
94
+ work_sec: number
95
+ pause_sec: number
96
+ repair_object: null | string
97
+ isPause: boolean
98
+ equipment: Api_Tasks_Equipment_Dto[]
99
+ }
100
+
101
+ export type Api_Tasks_Simple_Responsible_Dto = {
102
+ id: string
103
+ full_name: string
104
+ }
105
+
106
+ export type Api_Tasks_Dto = {
107
+ id: string
108
+ name: string
109
+ plan_date: null | string
110
+ deadline: null | string
111
+ priority: number
112
+ subtasks_count: number
113
+ responsible: Api_Tasks_Simple_Responsible_Dto[]
114
+ assigned: any[]
115
+ status: Api_Tasks_Status_Dto
116
+ expired: boolean
117
+ teams: Api_Tasks_Teams_Dto[]
118
+ is_critical_path: boolean
119
+ isPause: boolean
120
+ fact_start_date: null | string
121
+ fact_end_date: null | string
122
+ pause_sec: number
123
+ work_sec: number
124
+ }
@@ -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'