lesli_support 0.1.0

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 (165) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +5 -0
  3. data/app/assets/config/lesli_support_manifest.js +38 -0
  4. data/app/assets/images/lesli_support/support-logo.svg +9 -0
  5. data/app/assets/javascripts/lesli_support/application.js +5011 -0
  6. data/app/assets/stylesheets/lesli_support/application.css +9 -0
  7. data/app/controllers/lesli_support/accounts_controller.rb +60 -0
  8. data/app/controllers/lesli_support/application_controller.rb +4 -0
  9. data/app/controllers/lesli_support/catalog_categories_controller.rb +60 -0
  10. data/app/controllers/lesli_support/catalog_priorities_controller.rb +60 -0
  11. data/app/controllers/lesli_support/catalog_types_controller.rb +60 -0
  12. data/app/controllers/lesli_support/catalog_workspaces_controller.rb +60 -0
  13. data/app/controllers/lesli_support/catalogs_controller.rb +12 -0
  14. data/app/controllers/lesli_support/dashboard/components_controller.rb +92 -0
  15. data/app/controllers/lesli_support/dashboards_controller.rb +36 -0
  16. data/app/controllers/lesli_support/options_controller.rb +23 -0
  17. data/app/controllers/lesli_support/ticket/discussions_controller.rb +5 -0
  18. data/app/controllers/lesli_support/tickets_controller.rb +169 -0
  19. data/app/helpers/lesli_support/accounts_helper.rb +4 -0
  20. data/app/helpers/lesli_support/application_helper.rb +4 -0
  21. data/app/helpers/lesli_support/catalog_categories_helper.rb +4 -0
  22. data/app/helpers/lesli_support/catalog_priorities_helper.rb +4 -0
  23. data/app/helpers/lesli_support/catalog_types_helper.rb +4 -0
  24. data/app/helpers/lesli_support/catalog_workspaces_helper.rb +4 -0
  25. data/app/helpers/lesli_support/catalogs_helper.rb +4 -0
  26. data/app/helpers/lesli_support/dashboards_helper.rb +4 -0
  27. data/app/helpers/lesli_support/options_helper.rb +4 -0
  28. data/app/helpers/lesli_support/ticket/discussions_helper.rb +4 -0
  29. data/app/jobs/lesli_support/application_job.rb +4 -0
  30. data/app/mailers/lesli_support/application_mailer.rb +6 -0
  31. data/app/models/lesli_support/account.rb +48 -0
  32. data/app/models/lesli_support/application_record.rb +5 -0
  33. data/app/models/lesli_support/catalog.rb +15 -0
  34. data/app/models/lesli_support/catalog_category.rb +5 -0
  35. data/app/models/lesli_support/catalog_priority.rb +5 -0
  36. data/app/models/lesli_support/catalog_type.rb +5 -0
  37. data/app/models/lesli_support/catalog_workspace.rb +5 -0
  38. data/app/models/lesli_support/dashboard/component.rb +18 -0
  39. data/app/models/lesli_support/dashboard.rb +15 -0
  40. data/app/models/lesli_support/option.rb +4 -0
  41. data/app/models/lesli_support/ticket/discussion.rb +7 -0
  42. data/app/models/lesli_support/ticket.rb +44 -0
  43. data/app/services/lesli_support/catalog_service.rb +139 -0
  44. data/app/services/lesli_support/ticket_service.rb +147 -0
  45. data/app/views/layouts/lesli_support/application.html.erb +15 -0
  46. data/app/views/lesli_support/accounts/_account.html.erb +2 -0
  47. data/app/views/lesli_support/accounts/_form.html.erb +17 -0
  48. data/app/views/lesli_support/accounts/edit.html.erb +10 -0
  49. data/app/views/lesli_support/accounts/index.html.erb +14 -0
  50. data/app/views/lesli_support/accounts/new.html.erb +9 -0
  51. data/app/views/lesli_support/accounts/show.html.erb +10 -0
  52. data/app/views/lesli_support/catalog_categories/_catalog_category.html.erb +2 -0
  53. data/app/views/lesli_support/catalog_categories/_form.html.erb +17 -0
  54. data/app/views/lesli_support/catalog_categories/edit.html.erb +10 -0
  55. data/app/views/lesli_support/catalog_categories/index.html.erb +14 -0
  56. data/app/views/lesli_support/catalog_categories/new.html.erb +9 -0
  57. data/app/views/lesli_support/catalog_categories/show.html.erb +10 -0
  58. data/app/views/lesli_support/catalog_priorities/_catalog_priority.html.erb +2 -0
  59. data/app/views/lesli_support/catalog_priorities/_form.html.erb +17 -0
  60. data/app/views/lesli_support/catalog_priorities/edit.html.erb +10 -0
  61. data/app/views/lesli_support/catalog_priorities/index.html.erb +14 -0
  62. data/app/views/lesli_support/catalog_priorities/new.html.erb +9 -0
  63. data/app/views/lesli_support/catalog_priorities/show.html.erb +10 -0
  64. data/app/views/lesli_support/catalog_types/_catalog_type.html.erb +2 -0
  65. data/app/views/lesli_support/catalog_types/_form.html.erb +17 -0
  66. data/app/views/lesli_support/catalog_types/edit.html.erb +10 -0
  67. data/app/views/lesli_support/catalog_types/index.html.erb +14 -0
  68. data/app/views/lesli_support/catalog_types/new.html.erb +9 -0
  69. data/app/views/lesli_support/catalog_types/show.html.erb +10 -0
  70. data/app/views/lesli_support/catalog_workspaces/_catalog_workspace.html.erb +2 -0
  71. data/app/views/lesli_support/catalog_workspaces/_form.html.erb +17 -0
  72. data/app/views/lesli_support/catalog_workspaces/edit.html.erb +10 -0
  73. data/app/views/lesli_support/catalog_workspaces/index.html.erb +14 -0
  74. data/app/views/lesli_support/catalog_workspaces/new.html.erb +9 -0
  75. data/app/views/lesli_support/catalog_workspaces/show.html.erb +10 -0
  76. data/app/views/lesli_support/catalogs/_catalog.html.erb +2 -0
  77. data/app/views/lesli_support/catalogs/_form.html.erb +17 -0
  78. data/app/views/lesli_support/catalogs/edit.html.erb +10 -0
  79. data/app/views/lesli_support/catalogs/index.html.erb +14 -0
  80. data/app/views/lesli_support/catalogs/new.html.erb +9 -0
  81. data/app/views/lesli_support/catalogs/show.html.erb +10 -0
  82. data/app/views/lesli_support/dashboards/edit.html.erb +1 -0
  83. data/app/views/lesli_support/dashboards/index.html.erb +1 -0
  84. data/app/views/lesli_support/dashboards/new.html.erb +1 -0
  85. data/app/views/lesli_support/dashboards/show.html.erb +1 -0
  86. data/app/views/lesli_support/options/_form.html.erb +17 -0
  87. data/app/views/lesli_support/options/_option.html.erb +2 -0
  88. data/app/views/lesli_support/options/edit.html.erb +10 -0
  89. data/app/views/lesli_support/options/index.html.erb +14 -0
  90. data/app/views/lesli_support/options/new.html.erb +9 -0
  91. data/app/views/lesli_support/options/show.html.erb +10 -0
  92. data/app/views/lesli_support/partials/_engine-navigation.html.erb +39 -0
  93. data/app/views/lesli_support/ticket/discussions/_discussion.html.erb +2 -0
  94. data/app/views/lesli_support/ticket/discussions/_form.html.erb +17 -0
  95. data/app/views/lesli_support/ticket/discussions/edit.html.erb +10 -0
  96. data/app/views/lesli_support/ticket/discussions/index.html.erb +14 -0
  97. data/app/views/lesli_support/ticket/discussions/new.html.erb +9 -0
  98. data/app/views/lesli_support/ticket/discussions/show.html.erb +10 -0
  99. data/app/views/lesli_support/tickets/edit.html.erb +20 -0
  100. data/app/views/lesli_support/tickets/index.html.erb +34 -0
  101. data/app/views/lesli_support/tickets/new.html.erb +20 -0
  102. data/app/views/lesli_support/tickets/show.html.erb +20 -0
  103. data/config/locales/translations.en.yml +43 -0
  104. data/config/locales/translations.es.yml +43 -0
  105. data/config/locales/translations.fr.yml +43 -0
  106. data/config/locales/translations.it.yml +43 -0
  107. data/config/locales/translations.pt.yml +43 -0
  108. data/config/routes.rb +61 -0
  109. data/db/migrate/v1/0702000110_create_lesli_support_accounts.rb +42 -0
  110. data/db/migrate/v1/0702000210_create_lesli_support_account_settings.rb +46 -0
  111. data/db/migrate/v1/0702010110_create_lesli_support_catalog_workspaces.rb +43 -0
  112. data/db/migrate/v1/0702010210_create_lesli_support_catalog_types.rb +42 -0
  113. data/db/migrate/v1/0702010310_create_lesli_support_catalog_categories.rb +43 -0
  114. data/db/migrate/v1/0702010410_create_lesli_support_catalog_priorities.rb +43 -0
  115. data/db/migrate/v1/0702050110_create_lesli_support_dashboards.rb +50 -0
  116. data/db/migrate/v1/0702050210_create_lesli_support_dashboard_components.rb +50 -0
  117. data/db/migrate/v1/0702100110_create_lesli_support_slas.rb +59 -0
  118. data/db/migrate/v1/0702110110_create_lesli_support_tickets.rb +99 -0
  119. data/db/migrate/v1/0702110510_create_lesli_support_ticket_discussions.rb +52 -0
  120. data/db/seed/development.rb +62 -0
  121. data/db/seed/production.rb +31 -0
  122. data/db/seed/test.rb +31 -0
  123. data/db/seeds.rb +45 -0
  124. data/db/tables/0702010510_create_cloud_help_catalog_ticket_sources.rb +44 -0
  125. data/db/tables/0702020110_create_cloud_help_workflows.rb +47 -0
  126. data/db/tables/0702020210_create_cloud_help_workflow_statuses.rb +47 -0
  127. data/db/tables/0702020310_create_cloud_help_workflow_associations.rb +29 -0
  128. data/db/tables/0702020410_create_cloud_help_workflow_actions.rb +18 -0
  129. data/db/tables/0702020510_create_cloud_help_workflow_checks.rb +20 -0
  130. data/db/tables/0702030110_create_cloud_help_custom_fields.rb +15 -0
  131. data/db/tables/0702040110_create_cloud_help_custom_validations.rb +16 -0
  132. data/db/tables/0702040210_create_cloud_help_custom_validation_rules.rb +16 -0
  133. data/db/tables/0702040310_create_cloud_help_custom_validation_fields.rb +16 -0
  134. data/db/tables/0702100310_create_cloud_help_ticket_actions.rb +16 -0
  135. data/db/tables/0702100410_create_cloud_help_ticket_activities.rb +15 -0
  136. data/db/tables/0702100610_create_cloud_help_ticket_files.rb +16 -0
  137. data/db/tables/0702100710_create_cloud_help_ticket_subscribers.rb +16 -0
  138. data/db/tables/0702101010_create_cloud_help_ticket_timelines.rb +14 -0
  139. data/db/tables/0702101110_create_cloud_help_ticket_assignments.rb +15 -0
  140. data/db/tables/0702101210_create_cloud_help_ticket_histories.rb +15 -0
  141. data/db/tables/0702110310_create_cloud_help_sla_actions.rb +17 -0
  142. data/db/tables/0702110410_create_cloud_help_sla_activities.rb +15 -0
  143. data/db/tables/0702110510_create_cloud_help_sla_discussions.rb +17 -0
  144. data/db/tables/0702110610_create_cloud_help_sla_files.rb +16 -0
  145. data/db/tables/0702110710_create_cloud_help_sla_subscribers.rb +16 -0
  146. data/db/tables/0702111010_create_cloud_help_sla_associations.rb +13 -0
  147. data/lib/lesli_support/engine.rb +50 -0
  148. data/lib/lesli_support/version.rb +4 -0
  149. data/lib/lesli_support.rb +6 -0
  150. data/lib/scss/application.scss +11 -0
  151. data/lib/tasks/lesli_support_tasks.rake +4 -0
  152. data/lib/vue/application.js +93 -0
  153. data/lib/vue/apps/dashboard/components/engine-version.vue +71 -0
  154. data/lib/vue/apps/dashboard/components/my-tasks.vue +77 -0
  155. data/lib/vue/apps/tickets/components/assignments.vue +93 -0
  156. data/lib/vue/apps/tickets/components/form.vue +305 -0
  157. data/lib/vue/apps/tickets/components/internal-comments.vue +107 -0
  158. data/lib/vue/apps/tickets/components/sla-info.vue +115 -0
  159. data/lib/vue/apps/tickets/index.vue +145 -0
  160. data/lib/vue/apps/tickets/new.vue +78 -0
  161. data/lib/vue/apps/tickets/show.vue +183 -0
  162. data/lib/vue/stores/tickets.js +276 -0
  163. data/lib/vue/stores/translations.json +272 -0
  164. data/readme.md +72 -0
  165. metadata +223 -0
@@ -0,0 +1,305 @@
1
+ <script setup>
2
+ /*
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ */
32
+
33
+
34
+ // · import vue tools
35
+ import { inject, onMounted, ref, onUnmounted } from "vue"
36
+
37
+
38
+ // · import vue router composable
39
+ import { useRouter, useRoute } from "vue-router"
40
+
41
+
42
+ // · initialize/inject plugins
43
+ const router = useRouter()
44
+ const route = useRoute()
45
+ const date = inject("date")
46
+ const url = inject("url")
47
+
48
+
49
+ // ·
50
+ import { LesliTextEditor } from "lesli-vue/components"
51
+
52
+
53
+ // · import lesli stores
54
+ import { useTickets } from "LesliSupport/vue/stores/tickets"
55
+ //import { useAssignments } from "LesliSupport/stores/tickets/assignment"
56
+
57
+
58
+ // · implement stores
59
+ const storeTickets = useTickets()
60
+ //const storeAssignments = useAssignments()
61
+
62
+
63
+ // · defining props
64
+ const props = defineProps({
65
+ editable: {
66
+ type: Boolean,
67
+ required: false,
68
+ default: false,
69
+ },
70
+ path: {
71
+ type: String,
72
+ required: false,
73
+ default: "help/tickets",
74
+ }
75
+ })
76
+
77
+
78
+ // ·
79
+ const translations = {
80
+ tickets: i18n.t("lesli_support.tickets"),
81
+ lesli: { shared: i18n.t("lesli.shared") },
82
+
83
+ users: I18n.t("core.users"),
84
+ shared: I18n.t("core.shared"),
85
+ main: I18n.t('help.tickets')
86
+ }
87
+
88
+
89
+ // ·
90
+ function onUpdate() {
91
+ console.log("update")
92
+ storeTickets.updateTicket()
93
+ }
94
+
95
+
96
+ // ·
97
+ const onCreate = () => {
98
+ console.log("create")
99
+ storeTickets.postTicket().then(result => {
100
+ //this.msg.success(I18n.t("core.users.messages_success_operation"))
101
+ router.push(url.support('tickets/:id', result.id).toString())
102
+ }).catch(error => {
103
+ this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
104
+ })
105
+ }
106
+
107
+
108
+ // ·
109
+ onMounted(() => {
110
+ storeTickets.getOptions()
111
+ // storeTickets.ticket = {}
112
+ // storeTickets.tags = []
113
+ })
114
+ </script>
115
+ <template>
116
+ <lesli-form
117
+ :editable="props.editable"
118
+ @submit="route.params.id ? onUpdate() : onCreate()"
119
+ disabled="storeTickets.ticket.status=='closed'">
120
+
121
+ <!-- Ticket subject -->
122
+ <div class="field" v-if="props.editable">
123
+ <label class="label">
124
+ {{ translations.tickets.column_subject }}
125
+ <span class="is-danger">*</span>
126
+ </label>
127
+ <div class="control">
128
+ <input name="subject" class="input" required v-model="storeTickets.ticket.subject">
129
+ </div>
130
+ </div>
131
+
132
+ <fieldset v-if="route.params.id">
133
+ <legend></legend>
134
+
135
+ <!-- Ticket creator name -->
136
+ <div class="field">
137
+ <label class="label">ID</label>
138
+ <div class="control">
139
+ <input class="input" disabled v-model="storeTickets.ticket.id">
140
+ </div>
141
+ </div>
142
+
143
+ <!-- Ticket reference url -->
144
+ <div class="field" v-if="!props.editable">
145
+ <label class="label">Reference URL</label>
146
+ <div class="control">
147
+ <input name="reference_url" disabled type="text" class="input" v-model="storeTickets.ticket.reference_url">
148
+ </div>
149
+ </div>
150
+
151
+ <!-- Ticket workspace -->
152
+ <div class="field">
153
+ <label class="label">Workspace</label>
154
+ <div class="control">
155
+ <lesli-select
156
+ v-if="storeTickets.options.workspaces"
157
+ :options="storeTickets.options.workspaces"
158
+ v-model="storeTickets.ticket.catalog_workspace_id">
159
+ </lesli-select>
160
+ </div>
161
+ </div>
162
+ </fieldset>
163
+
164
+ <!-- Ticket assigned users
165
+ <div class="field" v-if="route.params.id">
166
+ <label class="label">Assigned users</label>
167
+ <div class="control">
168
+ <div v-for="assignment in storeTickets.ticket.assignment_attributes" :key="assignment">
169
+ <span class="tag is-success">{{assignment.assignable_name}}
170
+ <button class="delete is-small" @click="storeAssignments.deleteAssignment(assignment.id)" type="button"></button>
171
+ </span>
172
+ </div>
173
+ </div>
174
+ </div>
175
+ -->
176
+
177
+ <fieldset v-if="route.params.id">
178
+ <legend></legend>
179
+ <lesli-columns>
180
+
181
+ <!-- Ticket types -->
182
+ <lesli-column>
183
+ <div class="field">
184
+ <label class="label">
185
+ Type
186
+ </label>
187
+ <div class="control">
188
+ <lesli-select
189
+ :options="storeTickets.options.types"
190
+ v-model="storeTickets.ticket.catalog_type_id">
191
+ </lesli-select>
192
+ </div>
193
+ </div>
194
+ </lesli-column>
195
+
196
+ <!-- Ticket category -->
197
+ <lesli-column>
198
+ <div class="field">
199
+ <label class="label">
200
+ Category
201
+ </label>
202
+ <div class="control">
203
+ <lesli-select
204
+ v-if="storeTickets.options.categories"
205
+ :options="storeTickets.options.categories"
206
+ v-model="storeTickets.ticket.catalog_category_id">
207
+ </lesli-select>
208
+ </div>
209
+ </div>
210
+ </lesli-column>
211
+
212
+ <!-- Ticket priority -->
213
+ <lesli-column>
214
+ <div class="field">
215
+ <label class="label">
216
+ Priority
217
+ </label>
218
+ <div class="control">
219
+ <lesli-select
220
+ v-if="storeTickets.options.priorities"
221
+ :options="storeTickets.options.priorities"
222
+ v-model="storeTickets.ticket.catalog_priority_id">
223
+ </lesli-select>
224
+ </div>
225
+ </div>
226
+ </lesli-column>
227
+ </lesli-columns>
228
+
229
+
230
+ <lesli-columns v-if="route.params.id">
231
+
232
+ <!-- Ticket deadline -->
233
+ <lesli-column>
234
+ <div class="field">
235
+ <label class="label">
236
+ Deadline
237
+ </label>
238
+ <div class="control">
239
+ <lesli-calendar mode="dateTime" v-model="storeTickets.ticket.deadline">
240
+ </lesli-calendar>
241
+ </div>
242
+ </div>
243
+ </lesli-column>
244
+
245
+
246
+ <!-- Ticket started at date -->
247
+ <lesli-column>
248
+ <div class="field">
249
+ <label class="label">
250
+ Started At
251
+ </label>
252
+ <div class="control">
253
+ <lesli-calendar v-model="storeTickets.ticket.started_at">
254
+ </lesli-calendar>
255
+ </div>
256
+ </div>
257
+ </lesli-column>
258
+
259
+ <!-- Ticket finished at date -->
260
+ <lesli-column>
261
+ <div class="field">
262
+ <label class="label">
263
+ Completed at
264
+ </label>
265
+ <div class="control">
266
+ <lesli-calendar v-model="storeTickets.ticket.completed_at">
267
+ </lesli-calendar>
268
+ </div>
269
+ </div>
270
+ </lesli-column>
271
+ </lesli-columns>
272
+ </fieldset>
273
+
274
+ <!-- Ticket hours worked -->
275
+ <div class="field" v-if="route.params.id">
276
+ <label class="label">
277
+ Hours worked
278
+ </label>
279
+ <div class="control">
280
+ <input name="Hours_worked" class="input" type="number" step="any" v-model="storeTickets.ticket.hours_worked">
281
+ </div>
282
+ </div>
283
+
284
+ <!-- Ticket description -->
285
+ <div class="field">
286
+ <label class="label">
287
+ Description
288
+ </label>
289
+ <div class="control">
290
+ <lesli-text-editor :editable="props.editable" mode="normal" v-model="storeTickets.ticket.description">
291
+ </lesli-text-editor>
292
+ </div>
293
+ </div>
294
+
295
+
296
+ <div class="field">
297
+ <label class="label"></label>
298
+ <div class="control">
299
+ <lesli-button icon="save">
300
+ {{ translations.lesli.shared.button_save }}
301
+ </lesli-button>
302
+ </div>
303
+ </div>
304
+ </lesli-form>
305
+ </template>
@@ -0,0 +1,107 @@
1
+ <script setup>
2
+ /*
3
+ Copyright (c) 2022, all rights reserved.
4
+
5
+ All the information provided by this platform is protected by international laws related to
6
+ industrial property, intellectual property, copyright and relative international laws.
7
+ All intellectual or industrial property rights of the code, texts, trade mark, design,
8
+ pictures and any other information belongs to the owner of this platform.
9
+
10
+ Without the written permission of the owner, any replication, modification,
11
+ transmission, publication is strictly forbidden.
12
+
13
+ For more information read the license file including with this software.
14
+
15
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
16
+ // ·
17
+ */
18
+
19
+
20
+ // · import vue tools
21
+ import { onMounted } from "vue"
22
+
23
+ // · import lesli stores
24
+ import { useHistory } from "LesliSupport/vue/stores/tickets/history"
25
+
26
+ // · import vue router composable
27
+ import { useRoute } from "vue-router"
28
+
29
+ // · implement stores
30
+ const storeHistories = useHistory()
31
+
32
+ // · initialize/inject plugins
33
+ const route = useRoute()
34
+
35
+ // ·
36
+ const translations = {
37
+ shared: I18n.t("core.shared"),
38
+ histories: I18n.t('help.ticket/histories'),
39
+ help:{
40
+ shared: I18n.t('help.shared')
41
+ },
42
+ core: I18n.t('core.shared'),
43
+ main: I18n.t('help.ticket/histories')
44
+ }
45
+
46
+ const columns = [{
47
+ field: "created_at",
48
+ label: translations.core.column_created_at,
49
+ }, {
50
+ field: "user_creator_name",
51
+ label: translations.main.column_users_id,
52
+ }, {
53
+ field: "content",
54
+ label: translations.main.column_content
55
+ }]
56
+
57
+ onMounted(() => {
58
+ storeHistories.getHistories(route.params.id)
59
+ storeHistories.ticket_id = route.params.id
60
+ })
61
+
62
+ /**
63
+ * @description This function is used to create a new internal comment
64
+ */
65
+ const onCreate = () => {
66
+ storeHistories.createHistory()
67
+
68
+ }
69
+
70
+
71
+ </script>
72
+ <template>
73
+
74
+ <h2>{{translations.histories.view_title_main}}</h2>
75
+
76
+ <div class="block">
77
+ <form @submit.prevent="onCreate()">
78
+ <div class="columns">
79
+ <div class="column is-6">
80
+ <input name="comment" type="text" :placeholder="translations.histories.view_placeholder_add_history" class="input" v-model="storeHistories.history">
81
+ </div>
82
+ <div class="column is-6">
83
+ <lesli-button icon="save">{{ translations.shared.view_btn_save }}</lesli-button>
84
+ </div>
85
+ </div>
86
+
87
+ </form>
88
+ </div>
89
+
90
+ <lesli-table
91
+ :records="storeHistories.histories"
92
+ :columns="columns"
93
+ :loading="storeHistories.loading"
94
+ >
95
+ <template #options="{ record, value }">
96
+ <a class="dropdown-item" @click="storeHistories.deleteHistory(record)">
97
+ <span class="material-icons">
98
+ delete
99
+ </span>
100
+ <span>
101
+ {{translations.help.shared.view_tab_title_delete_section}}
102
+ </span>
103
+ </a>
104
+ </template>
105
+ </lesli-table>
106
+
107
+ </template>
@@ -0,0 +1,115 @@
1
+ <script setup>
2
+ /*
3
+ Copyright (c) 2022, all rights reserved.
4
+
5
+ All the information provided by this platform is protected by international laws related to
6
+ industrial property, intellectual property, copyright and relative international laws.
7
+ All intellectual or industrial property rights of the code, texts, trade mark, design,
8
+ pictures and any other information belongs to the owner of this platform.
9
+
10
+ Without the written permission of the owner, any replication, modification,
11
+ transmission, publication is strictly forbidden.
12
+
13
+ For more information read the license file including with this software.
14
+
15
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
16
+ // ·
17
+ */
18
+
19
+
20
+ // · import vue tools
21
+ import { onMounted } from "vue"
22
+
23
+ // · import lesli stores
24
+ import { useTickets } from "LesliSupport/vue/stores/tickets"
25
+
26
+ // · import vue router composable
27
+ import { useRoute } from "vue-router"
28
+
29
+ // · implement stores
30
+ const storeTickets = useTickets()
31
+
32
+ // · initialize/inject plugins
33
+ const route = useRoute()
34
+
35
+ // ·
36
+ const translations = {
37
+ users: I18n.t("core.users"),
38
+ shared: I18n.t("core.shared"),
39
+ sla: I18n.t('help.slas')
40
+ }
41
+
42
+
43
+ </script>
44
+ <template>
45
+ <h2>SLA</h2>
46
+ <div class="box" v-if="!storeTickets.loading">
47
+ <div class="columns">
48
+ <div class="column">
49
+ <label>{{translations.sla.column_name}}</label>
50
+ <p>{{storeTickets.ticket.sla?.name}}</p>
51
+ </div>
52
+
53
+ <div class="column">
54
+ <label>{{translations.sla.column_default}}</label>
55
+ <p v-if="storeTickets.ticket.sla?.default">yes</p>
56
+ <p v-else> no </p>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="columns">
61
+ <div class="column">
62
+ <label>{{translations.sla.column_expected_response_time}}</label>
63
+ <p>{{storeTickets.ticket.sla?.expected_response_time}}</p>
64
+ </div>
65
+
66
+ <div class="column">
67
+ <label>{{translations.sla.column_expected_resolution_time}}</label>
68
+ <p>{{storeTickets.ticket.sla?.expected_resolution_time}}</p>
69
+ </div>
70
+
71
+ <div class="column">
72
+ <label>{{translations.sla.column_price_per_hour}}</label>
73
+ <p> {{storeTickets.ticket.sla?.price_per_hour}}</p>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="colums">
78
+ <div class="column">
79
+ <label>{{translations.sla.view_tab_title_associations}}</label>
80
+ <div v-for="association in storeTickets.ticket.sla?.association_attributes" :key="association.id">
81
+ <span class="tag is-info">{{association.ticket_type_name}}</span>
82
+ </div>
83
+ </div>
84
+ </div>
85
+
86
+ <div class="field">
87
+ <label class="label">{{translations.sla.column_body}}</label>
88
+ <div class="control">
89
+ <textarea class="textarea is-small" :v-model="storeTickets.ticket.sla?.body" disabled></textarea>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="field">
94
+ <label class="label">{{translations.sla.column_client_repercussions}}</label>
95
+ <div class="control">
96
+ <textarea class="textarea is-small" :v-model="storeTickets.ticket.sla?.client_repercussions" disabled></textarea>
97
+ </div>
98
+ </div>
99
+
100
+ <div class="field">
101
+ <label class="label">{{translations.sla.column_provider_repercussions}}</label>
102
+ <div class="control">
103
+ <textarea class="textarea is-small" :v-model="storeTickets.ticket.sla?.provider_repercussions" disabled></textarea>
104
+ </div>
105
+ </div>
106
+
107
+ <div class="field">
108
+ <label class="label">{{translations.sla.column_exceptions}}</label>
109
+ <div class="control">
110
+ <textarea class="textarea is-small" :v-model="storeTickets.ticket.sla?.exceptions" disabled></textarea>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ </template>
@@ -0,0 +1,145 @@
1
+ <script setup>
2
+ /*
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ */
32
+
33
+
34
+ // · import vue tools
35
+ import { onMounted, inject } from "vue"
36
+ import { useRouter } from "vue-router"
37
+
38
+
39
+ // · import lesli stores
40
+ import { useTickets } from "LesliSupport/vue/stores/tickets"
41
+ import { useLesliMsg } from "/Users/ldonis/code/Lesli/lesli-vue/source/composables/msg/msg.js"
42
+
43
+ const msg = useLesliMsg()
44
+
45
+ // · initialize/inject plugins
46
+ const router = useRouter()
47
+ const date = inject("date")
48
+ const url = inject("url")
49
+
50
+
51
+ // · implement stores
52
+ const storeTickets = useTickets()
53
+
54
+
55
+ // · translations
56
+ const translations = {
57
+ tickets: i18n.t("lesli_support.tickets"),
58
+ lesli: i18n.t("lesli")
59
+ }
60
+
61
+
62
+ // ·
63
+ const columns = [{
64
+ field: "id",
65
+ label: translations.tickets.column_id,
66
+ sort: true
67
+ }, {
68
+ field: "subject",
69
+ label: translations.tickets.column_subject,
70
+ sort: true
71
+ }, {
72
+ field: "deadline",
73
+ label: translations.tickets.column_deadline,
74
+ sort: true
75
+ }, {
76
+ field: "status_name",
77
+ label: translations.tickets.column_status,
78
+ align: "center",
79
+ sort: true
80
+ },{
81
+ field: "priority_name",
82
+ label: translations.tickets.column_priority,
83
+ align: "center",
84
+ sort: true
85
+ }, {
86
+ field: "user_name",
87
+ label: translations.tickets.column_creator,
88
+ sort: true
89
+ }]
90
+
91
+
92
+ // · initializing
93
+ onMounted(() => {
94
+ storeTickets.getTickets()
95
+ })
96
+ </script>
97
+ <template>
98
+ <lesli-application-container>
99
+ <lesli-header title="Tickets">
100
+ <lesli-button @click="storeTickets.reloadTickets" icon="refresh" :loading="storeTickets.loading">
101
+ {{ translations.lesli.shared.button_reload }}
102
+ </lesli-button>
103
+ <lesli-link button solid :to="url.support('tickets/new')" icon="add">
104
+ {{ translations.lesli.shared.button_add_new }}
105
+ </lesli-link>
106
+ </lesli-header>
107
+ <lesli-toolbar
108
+ @search="storeTickets.search"
109
+ :placeholder="translations.lesli.shared.toolbar_search">
110
+ <lesli-select
111
+ :options="[{
112
+ label: translations.tickets.view_all_tickets,
113
+ value: null
114
+ }, {
115
+ label: translations.tickets.view_own_tickets,
116
+ value: 'own'
117
+ }]"
118
+ v-model="storeTickets.filters.user_type"
119
+ @change="storeTickets.getTickets()">
120
+ </lesli-select>
121
+ <lesli-select
122
+ :options="[{
123
+ label: translations.tickets.view_all_tickets,
124
+ value: null
125
+ }, {
126
+ label: translations.tickets.view_active_tickets,
127
+ value: 'active'
128
+ }, {
129
+ label: translations.tickets.view_inactive_tickets,
130
+ value: 'inactive'
131
+ }]"
132
+ v-model="storeTickets.filters.search_type"
133
+ @change="storeTickets.getTickets()">
134
+ </lesli-select>
135
+ </lesli-toolbar>
136
+
137
+ <lesli-table
138
+ :columns="columns"
139
+ :records="storeTickets.index.records"
140
+ :loading="storeTickets.index.loading"
141
+ :pagination="storeTickets.index.pagination"
142
+ :link="(ticket) => url.support('tickets/:id', ticket.id)">
143
+ </lesli-table>
144
+ </lesli-application-container>
145
+ </template>