shared-ritm 1.3.72 → 1.3.74

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.
@@ -1,8 +1,8 @@
1
1
  import ApiService from '../settings/ApiService';
2
- import { Api_User_Issue, Api_User_Issue_Body, Api_User_Issue_List_Item, Api_User_Issue_Properties } from '@/api/types/Api_User_Issue';
2
+ import { Api_User_Issue, Api_User_Issue_List_Item, Api_User_Issue_Properties } from '@/api/types/Api_User_Issue';
3
3
  import { ResponseApi } from '@/api/types/Api_Service';
4
4
  declare class UserIssueService extends ApiService {
5
- createUserIssue(body: Api_User_Issue_Body): Promise<Api_User_Issue_List_Item>;
5
+ createUserIssue(body: any): Promise<Api_User_Issue_List_Item>;
6
6
  getUserIssue(id: string): Promise<Api_User_Issue>;
7
7
  getUserIssueList(params: any): Promise<ResponseApi<Api_User_Issue_List_Item>>;
8
8
  getProperties(): Promise<Api_User_Issue_Properties>;
@@ -5,11 +5,13 @@ export type Api_User_Issue_List_Item = {
5
5
  type: string;
6
6
  topic: string;
7
7
  created_at: string;
8
+ number: number;
8
9
  };
9
10
  export type Api_User_Issue_Msg = {
10
11
  id: string;
11
12
  message: string;
12
13
  thread_id: string;
14
+ files: unknown[];
13
15
  user: {
14
16
  id: string;
15
17
  full_name: string;
@@ -21,15 +23,9 @@ export type Api_User_Issue = {
21
23
  status: string;
22
24
  type: string;
23
25
  topic: string;
26
+ number: number;
24
27
  messages: Api_User_Issue_Msg[];
25
28
  };
26
- export type Api_User_Issue_Body = {
27
- section: string;
28
- type: string;
29
- topic: string;
30
- description: string;
31
- files?: string[];
32
- };
33
29
  export type Api_User_Issue_Properties = {
34
30
  section: Record<string, string>;
35
31
  status: Record<string, string>;
@@ -44,9 +44,10 @@ import useCommentsService from './api/services/CommentsService';
44
44
  import useEquipmentService from './api/services/EquipmentService';
45
45
  import useBrigadesService from './api/services/BrigadesService';
46
46
  import useScheduleService from './api/services/ScheduleService';
47
+ import useUserIssueService from './api/services/UserIssueService';
47
48
  import useFaceApiHelper from './utils/faceApiHelper';
48
49
  export { AppButton, AppCheckbox, AppDatepicker, AppDatePicker, AppInput, AppInputNew, AppInputSearch, AppLayout, AppLayoutHeader, AppLayoutPage, AppLoader, AppSelect, AppSheet, AppSheetNew, AppSidebar, AppToggle, AppWrapper, AppConfirmDialog, AppDropdown, AppTablePagination, AppTableSearch, AppTableModal, AppTable, AppTableLayout, AppModalSelect, AppModal, AppFile, };
49
- export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, useInstrumentsService, useSearchService, useModulesService, useCommentsService, useFaceApiHelper, useEquipmentService, useBrigadesService, useScheduleService, };
50
+ export { ApiService, useAuthService, useGanttService, useMetricsService, useProjectsService, useRepairsService, useTasksService, useFileService, useControlsService, useVideoService, useUserService, useInstrumentsService, useSearchService, useModulesService, useCommentsService, useFaceApiHelper, useEquipmentService, useBrigadesService, useScheduleService, useUserIssueService, };
50
51
  export { useBaseTable } from './common/app-table/controllers/useBaseTable';
51
52
  export { useTableModel } from './common/app-table/controllers/useTableModel';
52
53
  export { useColumnSelector } from './common/app-table/controllers/useColumnSelector';
@@ -72,3 +73,4 @@ export * from './api/types/Api_Brigades';
72
73
  export * from './api/types/Api_Modules';
73
74
  export * from './api/types/Api_Schedule';
74
75
  export * from './api/types/Api_Metrics';
76
+ export * from './api/types/Api_User_Issue';
@@ -1 +1,3 @@
1
+ export declare function getFileFullPath(path: string): string;
2
+ export declare function openFile(url: string): Promise<void>;
1
3
  export declare const saveBlobAsFile: (blob: Blob, name: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shared-ritm",
3
- "version": "1.3.72",
3
+ "version": "1.3.74",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -0,0 +1,32 @@
1
+ import ApiService from '../settings/ApiService'
2
+ import { Api_User_Issue, Api_User_Issue_List_Item, Api_User_Issue_Properties } from '@/api/types/Api_User_Issue'
3
+ import { ResponseApi } from '@/api/types/Api_Service'
4
+
5
+ class UserIssueService extends ApiService {
6
+ public createUserIssue(body: any): Promise<Api_User_Issue_List_Item> {
7
+ return this.post('user_issue', body, { headers: { 'Content-Type': 'multipart/form-data' } })
8
+ }
9
+
10
+ public getUserIssue(id: string): Promise<Api_User_Issue> {
11
+ return this.get(`user_issue/${id}`)
12
+ }
13
+
14
+ public getUserIssueList(params: any): Promise<ResponseApi<Api_User_Issue_List_Item>> {
15
+ return this.get('user_issue/list', { params })
16
+ }
17
+
18
+ public getProperties(): Promise<Api_User_Issue_Properties> {
19
+ return this.get('user_issue/properties')
20
+ }
21
+
22
+ public deleteUserIssue(id: string): Promise<{ data: boolean; status: number }> {
23
+ return this.delete(`user_issue/${id}`)
24
+ }
25
+ }
26
+
27
+ let api: UserIssueService
28
+
29
+ export default function useUserIssueService() {
30
+ if (!api) api = new UserIssueService()
31
+ return api
32
+ }
@@ -0,0 +1,36 @@
1
+ export type Api_User_Issue_List_Item = {
2
+ id: string
3
+ section: string
4
+ status: string
5
+ type: string
6
+ topic: string
7
+ created_at: string
8
+ number: number
9
+ }
10
+
11
+ export type Api_User_Issue_Msg = {
12
+ id: string
13
+ message: string
14
+ thread_id: string
15
+ files: unknown[]
16
+ user: {
17
+ id: string
18
+ full_name: string
19
+ }
20
+ }
21
+
22
+ export type Api_User_Issue = {
23
+ id: string
24
+ section: string
25
+ status: string
26
+ type: string
27
+ topic: string
28
+ number: number
29
+ messages: Api_User_Issue_Msg[]
30
+ }
31
+
32
+ export type Api_User_Issue_Properties = {
33
+ section: Record<string, string>
34
+ status: Record<string, string>
35
+ type: Record<string, string>
36
+ }
@@ -13,6 +13,7 @@ import PassIcon from '@/icons/sidebar/pass-icon.vue'
13
13
  import AssignModuleIcon from '@/icons/sidebar/assign-module-icon.vue'
14
14
  import UsersIcon from '@/icons/sidebar/users-icon.vue'
15
15
  import UserIcon from '@/icons/sidebar/user-icon.vue'
16
+ import UserRequestsIcon from '@/icons/sidebar/user-requests-icon.vue'
16
17
  import WorkzonesIcon from '@/icons/sidebar/workzones-icon.vue'
17
18
  import LogoutIcon from '@/icons/sidebar/logout-icon.vue'
18
19
  import LogoIcon from '@/icons/sidebar/logo-icon.vue'
@@ -71,6 +72,7 @@ const sideBarIcon = computed(
71
72
  AssignModuleIcon,
72
73
  UsersIcon,
73
74
  UserIcon,
75
+ UserRequestsIcon,
74
76
  WorkzonesIcon,
75
77
  LogoutIcon,
76
78
  LogoIcon,
@@ -18,6 +18,8 @@
18
18
  :autocomplete="autocomplete"
19
19
  :debounce="debounce"
20
20
  :loading="loading"
21
+ :maxlength="maxlength"
22
+ :counter="counter"
21
23
  @blur="emit('blur')"
22
24
  >
23
25
  <slot />
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M17.98 10.79V14.79C17.98 15.05 17.97 15.3 17.94 15.54C17.71 18.24 16.12 19.58 13.19 19.58H12.79C12.54 19.58 12.3 19.7 12.15 19.9L10.95 21.5C10.42 22.21 9.56 22.21 9.03 21.5L7.82999 19.9C7.69999 19.73 7.41 19.58 7.19 19.58H6.79001C3.60001 19.58 2 18.79 2 14.79V10.79C2 7.86001 3.35001 6.27001 6.04001 6.04001C6.28001 6.01001 6.53001 6 6.79001 6H13.19C16.38 6 17.98 7.60001 17.98 10.79Z"
5
+ stroke="white"
6
+ stroke-width="1.5"
7
+ stroke-miterlimit="10"
8
+ stroke-linecap="round"
9
+ stroke-linejoin="round"
10
+ />
11
+ <path
12
+ d="M21.98 6.79001V10.79C21.98 13.73 20.63 15.31 17.94 15.54C17.97 15.3 17.98 15.05 17.98 14.79V10.79C17.98 7.60001 16.38 6 13.19 6H6.79004C6.53004 6 6.28004 6.01001 6.04004 6.04001C6.27004 3.35001 7.86004 2 10.79 2H17.19C20.38 2 21.98 3.60001 21.98 6.79001Z"
13
+ stroke="white"
14
+ stroke-width="1.5"
15
+ stroke-miterlimit="10"
16
+ stroke-linecap="round"
17
+ stroke-linejoin="round"
18
+ />
19
+ <path d="M13.4955 13.25H13.5045" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
20
+ <path d="M9.99561 13.25H10.0046" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
21
+ <path d="M6.4955 13.25H6.5045" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
22
+ </svg>
23
+ </template>
package/src/index.ts CHANGED
@@ -45,6 +45,7 @@ import useCommentsService from './api/services/CommentsService'
45
45
  import useEquipmentService from './api/services/EquipmentService'
46
46
  import useBrigadesService from './api/services/BrigadesService'
47
47
  import useScheduleService from './api/services/ScheduleService'
48
+ import useUserIssueService from './api/services/UserIssueService'
48
49
 
49
50
  import useFaceApiHelper from './utils/faceApiHelper'
50
51
 
@@ -98,6 +99,7 @@ export {
98
99
  useEquipmentService,
99
100
  useBrigadesService,
100
101
  useScheduleService,
102
+ useUserIssueService,
101
103
  }
102
104
 
103
105
  export { useBaseTable } from './common/app-table/controllers/useBaseTable'
@@ -129,3 +131,4 @@ export * from './api/types/Api_Brigades'
129
131
  export * from './api/types/Api_Modules'
130
132
  export * from './api/types/Api_Schedule'
131
133
  export * from './api/types/Api_Metrics'
134
+ export * from './api/types/Api_User_Issue'
@@ -1,3 +1,22 @@
1
+ export function getFileFullPath(path: string): string {
2
+ if (!path) return ''
3
+ const middlePart = path.startsWith('/uploads') ? '' : '/uploads'
4
+ return process.env.VUE_APP_BACKEND_BASE + middlePart + path
5
+ }
6
+
7
+ export async function openFile(url: string) {
8
+ if (!url) return
9
+
10
+ try {
11
+ const tempLink = document.createElement('a')
12
+ tempLink.href = url
13
+ tempLink.setAttribute('target', '_blank')
14
+ tempLink.click()
15
+ } catch (err) {
16
+ console.error(err)
17
+ }
18
+ }
19
+
1
20
  export const saveBlobAsFile = (blob: Blob, name: string) => {
2
21
  try {
3
22
  const a = document.createElement('a')