shared-ritm 1.2.67 → 1.2.68

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.
Files changed (63) hide show
  1. package/README.md +103 -103
  2. package/dist/index.css +1 -1
  3. package/dist/shared-ritm.es.js +27926 -8480
  4. package/dist/shared-ritm.umd.js +3834 -7
  5. package/dist/types/api/services/ControlsService.d.ts +1 -2
  6. package/dist/types/api/services/FileService.d.ts +1 -2
  7. package/dist/types/api/services/MetricsService.d.ts +1 -2
  8. package/dist/types/api/services/PhotoService.d.ts +41 -0
  9. package/dist/types/api/services/ProjectsService.d.ts +1 -2
  10. package/dist/types/api/services/RepairsService.d.ts +1 -2
  11. package/dist/types/api/services/TasksService.d.ts +1 -2
  12. package/dist/types/api/services/UserService.d.ts +11 -0
  13. package/dist/types/api/settings/ApiService.d.ts +8 -0
  14. package/dist/types/api/types/Api_Instruments.d.ts +1 -35
  15. package/dist/types/api/types/Api_User.d.ts +42 -0
  16. package/dist/types/index.d.ts +6 -5
  17. package/dist/types/utils/helpers.d.ts +1 -0
  18. package/package.json +64 -63
  19. package/src/api/services/PhotoService.ts +137 -0
  20. package/src/api/services/UserService.ts +19 -0
  21. package/src/api/types/Api_Controls.ts +72 -72
  22. package/src/api/types/Api_Files.ts +1 -1
  23. package/src/api/types/Api_Instruments.ts +98 -133
  24. package/src/api/types/Api_Projects.ts +55 -55
  25. package/src/api/types/Api_Repairs.ts +93 -93
  26. package/src/api/types/Api_Tasks.ts +155 -155
  27. package/src/api/types/Api_User.ts +44 -0
  28. package/src/common/app-checkbox/AppCheckbox.vue +26 -26
  29. package/src/common/app-dialogs/AppConfirmDialog.vue +99 -99
  30. package/src/common/app-dropdown/AppDropdown.vue +31 -31
  31. package/src/common/app-input/AppInput.vue +148 -148
  32. package/src/common/app-select/AppSelect.vue +157 -157
  33. package/src/common/app-sheet/AppSheet.vue +120 -120
  34. package/src/common/app-sidebar/components/SidebarMenuItem.vue +148 -148
  35. package/src/common/app-table/AppTable.vue +250 -250
  36. package/src/common/app-table/AppTableLayout.vue +111 -111
  37. package/src/common/app-table/components/ModalSelect.vue +264 -264
  38. package/src/common/app-table/components/TableModal.vue +329 -329
  39. package/src/common/app-table/components/TablePagination.vue +152 -152
  40. package/src/common/app-table/components/TableSearch.vue +76 -76
  41. package/src/common/app-table/controllers/useBaseTable.ts +42 -42
  42. package/src/common/app-table/controllers/useColumnSelector.ts +38 -38
  43. package/src/common/app-table/controllers/useTableModel.ts +93 -93
  44. package/src/common/app-toggle/AppToggle.vue +23 -23
  45. package/src/common/app-wrapper/AppWrapper.vue +28 -28
  46. package/src/icons/components/table-filter-icon.vue +30 -30
  47. package/src/icons/dialogs/RemoveIcon.vue +12 -12
  48. package/src/icons/dialogs/SafetyIcon.vue +12 -12
  49. package/src/icons/task/attention-icon.vue +13 -13
  50. package/src/icons/task/clock-icon.vue +10 -10
  51. package/src/icons/task/delete-icon.vue +10 -10
  52. package/src/icons/task/fire-icon.vue +16 -16
  53. package/src/index.ts +6 -0
  54. package/src/main.ts +28 -28
  55. package/src/shared/styles/general.css +125 -125
  56. package/src/styles/variables.sass +12 -12
  57. package/src/utils/confirm.ts +12 -12
  58. package/src/utils/helpers.ts +58 -39
  59. package/src/utils/notification.ts +9 -9
  60. package/dist/types/api/services/SearchService.d.ts +0 -8
  61. package/dist/types/api/types/Api_Search.d.ts +0 -43
  62. package/dist/types/api/types/Api_Service.d.ts +0 -9
  63. package/dist/types/api/types/Api_Users.d.ts +0 -43
@@ -1,155 +1,155 @@
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
- }
125
-
126
- export type Api_Task_Instrument_Dto = {
127
- id: string
128
- name: string
129
- }
130
-
131
- export type Api_Task_Module_Instrument_Condition = {
132
- instruments_types_conditions: Record<
133
- string,
134
- {
135
- warehouse_responsible: boolean
136
- warehouse_statuses: boolean
137
- warehouse_modules: boolean
138
- }
139
- >
140
- instruments_types_count: Record<string, number>
141
- }
142
-
143
- export type Api_Task_Instrument_From_Warehouse = {
144
- id: string
145
- name: string
146
- warehouse_prepared_quantity: number
147
- has_status: boolean
148
- has_responsible: boolean
149
- has_module: boolean
150
- }
151
-
152
- export type Api_Task_Close_Reason = {
153
- has_reason: boolean
154
- category: string
155
- }
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
+ }
125
+
126
+ export type Api_Task_Instrument_Dto = {
127
+ id: string
128
+ name: string
129
+ }
130
+
131
+ export type Api_Task_Module_Instrument_Condition = {
132
+ instruments_types_conditions: Record<
133
+ string,
134
+ {
135
+ warehouse_responsible: boolean
136
+ warehouse_statuses: boolean
137
+ warehouse_modules: boolean
138
+ }
139
+ >
140
+ instruments_types_count: Record<string, number>
141
+ }
142
+
143
+ export type Api_Task_Instrument_From_Warehouse = {
144
+ id: string
145
+ name: string
146
+ warehouse_prepared_quantity: number
147
+ has_status: boolean
148
+ has_responsible: boolean
149
+ has_module: boolean
150
+ }
151
+
152
+ export type Api_Task_Close_Reason = {
153
+ has_reason: boolean
154
+ category: string
155
+ }
@@ -0,0 +1,44 @@
1
+ export type Api_User_Team = {
2
+ id: string
3
+ name: string
4
+ display_name: string
5
+ description: string
6
+ created_at: string
7
+ updated_at: string
8
+ pivot: {
9
+ team_id: string
10
+ user_id: string
11
+ }
12
+ }
13
+
14
+ export type Api_User_Photo = {
15
+ id: string
16
+ name: string
17
+ path: string
18
+ type: string
19
+ }
20
+
21
+ export type Api_User = {
22
+ id: string
23
+ RFID: string
24
+ avatar: unknown | null
25
+ avatar_id: string | null
26
+ change_password: string
27
+ created_at: string
28
+ updated_at: string
29
+ deleted_at: string | null
30
+ dismissal_at: string | null
31
+ email_verified_at: string
32
+ divisions: string
33
+ email: string
34
+ face_recognition_id: string | null
35
+ first_name: string
36
+ full_name: string
37
+ last_name: string
38
+ patronymic: string
39
+ personnel_number: number
40
+ phone: string
41
+ profession: string
42
+ teams: Api_User_Team[]
43
+ photos: Api_User_Photo[]
44
+ }
@@ -1,26 +1,26 @@
1
- <template>
2
- <q-checkbox v-model="value" :class="$style['app-checkbox']" />
3
- </template>
4
- <script setup lang="ts">
5
- import { computed } from 'vue'
6
-
7
- interface Props {
8
- modelValue: any
9
- }
10
-
11
- const props = defineProps<Props>()
12
- const emit = defineEmits(['update:modelValue', 'number'])
13
-
14
- const value = computed({
15
- get: () => props.modelValue,
16
- set: (newValue: any) => emit('update:modelValue', newValue),
17
- })
18
- </script>
19
- <style module lang="scss">
20
- .app-checkbox {
21
- :global(.q-checkbox__bg) {
22
- border-radius: 6px;
23
- border-color: white;
24
- }
25
- }
26
- </style>
1
+ <template>
2
+ <q-checkbox v-model="value" :class="$style['app-checkbox']" />
3
+ </template>
4
+ <script setup lang="ts">
5
+ import { computed } from 'vue'
6
+
7
+ interface Props {
8
+ modelValue: any
9
+ }
10
+
11
+ const props = defineProps<Props>()
12
+ const emit = defineEmits(['update:modelValue', 'number'])
13
+
14
+ const value = computed({
15
+ get: () => props.modelValue,
16
+ set: (newValue: any) => emit('update:modelValue', newValue),
17
+ })
18
+ </script>
19
+ <style module lang="scss">
20
+ .app-checkbox {
21
+ :global(.q-checkbox__bg) {
22
+ border-radius: 6px;
23
+ border-color: white;
24
+ }
25
+ }
26
+ </style>
@@ -1,99 +1,99 @@
1
- <template>
2
- <q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
3
- <q-card :class="$style.modal">
4
- <q-card-section :class="$style['modal__content']">
5
- <div :class="$style['modal__content__header']">
6
- <safety-icon v-if="type === 'edit'" />
7
- <remove-icon v-if="type === 'delete'" />
8
- </div>
9
- <p>{{ content }}</p>
10
- </q-card-section>
11
- <q-card-section :class="$style.footer">
12
- <app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
13
- <app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
14
- </q-card-section>
15
- </q-card>
16
- </q-dialog>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import { useDialogPluginComponent } from 'quasar'
21
- import AppButton from '@/common/app-button/AppButton.vue'
22
- import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
23
- import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
24
-
25
- const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
26
-
27
- interface Props {
28
- content: string
29
- type: 'delete' | 'edit'
30
- }
31
-
32
- const props = defineProps<Props>()
33
- </script>
34
-
35
- <style lang="scss" module>
36
- .modal {
37
- font-family: NunitoSansFont, sans-serif;
38
- display: flex;
39
- flex-direction: column;
40
- width: 400px;
41
- border-radius: 8px !important;
42
- justify-content: space-between;
43
- &__content {
44
- margin: 0 auto;
45
- padding: 0;
46
- flex-grow: 1;
47
- &__header {
48
- width: 100%;
49
- display: flex;
50
- align-items: center;
51
- justify-content: center;
52
- flex-direction: column;
53
- gap: 16px;
54
- padding-top: 18px;
55
- h4 {
56
- font-size: 24px;
57
- font-weight: 600;
58
- }
59
- }
60
- }
61
- p {
62
- margin: 0;
63
- font-size: 16px;
64
- text-align: center;
65
- padding: 18px;
66
- }
67
- }
68
-
69
- .footer {
70
- display: flex;
71
- gap: 12px;
72
- align-items: center;
73
- justify-content: center;
74
- border-radius: 0px 0px 2px 2px;
75
- background: #F4F9FD;
76
- padding: 18px 12px;
77
- &__btn--ok,
78
- &__btn--cancel {
79
- background-color: #3f8cff;
80
- border-radius: 4px;
81
- color: white;
82
- font-size: 16px;
83
- font-weight: bold;
84
- width: 165px;
85
- height: 48px;
86
- cursor: pointer;
87
- span {
88
- color: white;
89
- }
90
- }
91
- &__btn--cancel {
92
- background-color: white;
93
- border: 1px solid #3f8cff;
94
- span {
95
- color: #3f8cff;
96
- }
97
- }
98
- }
99
- </style>
1
+ <template>
2
+ <q-dialog ref="dialogRef" persistent transition-show="slide-up" transition-hide="slide-down" :class="$style.dialog">
3
+ <q-card :class="$style.modal">
4
+ <q-card-section :class="$style['modal__content']">
5
+ <div :class="$style['modal__content__header']">
6
+ <safety-icon v-if="type === 'edit'" />
7
+ <remove-icon v-if="type === 'delete'" />
8
+ </div>
9
+ <p>{{ content }}</p>
10
+ </q-card-section>
11
+ <q-card-section :class="$style.footer">
12
+ <app-button :class="$style['footer__btn--ok']" label="Подтвердить" @click="onDialogOK" />
13
+ <app-button :class="$style['footer__btn--cancel']" label="Отменить" @click="onDialogHide" />
14
+ </q-card-section>
15
+ </q-card>
16
+ </q-dialog>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import { useDialogPluginComponent } from 'quasar'
21
+ import AppButton from '@/common/app-button/AppButton.vue'
22
+ import SafetyIcon from '@/icons/dialogs/SafetyIcon.vue'
23
+ import RemoveIcon from '@/icons/dialogs/RemoveIcon.vue'
24
+
25
+ const { onDialogHide, onDialogOK, dialogRef } = useDialogPluginComponent()
26
+
27
+ interface Props {
28
+ content: string
29
+ type: 'delete' | 'edit'
30
+ }
31
+
32
+ const props = defineProps<Props>()
33
+ </script>
34
+
35
+ <style lang="scss" module>
36
+ .modal {
37
+ font-family: NunitoSansFont, sans-serif;
38
+ display: flex;
39
+ flex-direction: column;
40
+ width: 400px;
41
+ border-radius: 8px !important;
42
+ justify-content: space-between;
43
+ &__content {
44
+ margin: 0 auto;
45
+ padding: 0;
46
+ flex-grow: 1;
47
+ &__header {
48
+ width: 100%;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ flex-direction: column;
53
+ gap: 16px;
54
+ padding-top: 18px;
55
+ h4 {
56
+ font-size: 24px;
57
+ font-weight: 600;
58
+ }
59
+ }
60
+ }
61
+ p {
62
+ margin: 0;
63
+ font-size: 16px;
64
+ text-align: center;
65
+ padding: 18px;
66
+ }
67
+ }
68
+
69
+ .footer {
70
+ display: flex;
71
+ gap: 12px;
72
+ align-items: center;
73
+ justify-content: center;
74
+ border-radius: 0px 0px 2px 2px;
75
+ background: #F4F9FD;
76
+ padding: 18px 12px;
77
+ &__btn--ok,
78
+ &__btn--cancel {
79
+ background-color: #3f8cff;
80
+ border-radius: 4px;
81
+ color: white;
82
+ font-size: 16px;
83
+ font-weight: bold;
84
+ width: 165px;
85
+ height: 48px;
86
+ cursor: pointer;
87
+ span {
88
+ color: white;
89
+ }
90
+ }
91
+ &__btn--cancel {
92
+ background-color: white;
93
+ border: 1px solid #3f8cff;
94
+ span {
95
+ color: #3f8cff;
96
+ }
97
+ }
98
+ }
99
+ </style>
@@ -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>