lesli 5.0.11 → 5.0.13
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.
- checksums.yaml +4 -4
- data/app/assets/config/lesli_manifest.js +0 -13
- data/app/assets/icons/lesli/engine-security.svg +1 -0
- data/app/assets/icons/lesli/engine-shield.svg +1 -0
- data/app/assets/images/lesli/brand/app-logo.png +0 -0
- data/app/assets/images/lesli/lesli-logo.svg +4 -0
- data/app/assets/javascripts/lesli/templates/application.js +14 -0
- data/app/assets/javascripts/lesli/templates/public.js +14 -0
- data/app/assets/stylesheets/lesli/templates/application.css +1365 -293
- data/app/assets/stylesheets/lesli/templates/public.css +1 -1
- data/app/controllers/lesli/abouts_controller.rb +12 -18
- data/app/controllers/lesli/application_controller.rb +26 -25
- data/app/controllers/lesli/application_lesli_controller.rb +5 -6
- data/app/controllers/lesli/interfaces/application/authorization.rb +2 -2
- data/app/controllers/lesli/interfaces/application/customization.rb +1 -1
- data/app/controllers/lesli/interfaces/application/requester.rb +2 -2
- data/app/controllers/lesli/interfaces/application/responder.rb +8 -8
- data/app/controllers/lesli/interfaces/controllers/actions.rb +250 -0
- data/app/controllers/lesli/interfaces/controllers/activities.rb +215 -0
- data/app/controllers/lesli/interfaces/controllers/discussions.rb +270 -0
- data/app/controllers/lesli/interfaces/controllers/files.rb +467 -0
- data/app/controllers/lesli/interfaces/controllers/subscribers.rb +234 -0
- data/app/helpers/lesli/assets_helper.rb +26 -8
- data/app/helpers/lesli/navigation_helper.rb +53 -92
- data/app/lib/date2.rb +8 -0
- data/app/lib/lesli/system.rb +17 -4
- data/app/models/concerns/account_initializer.rb +46 -42
- data/app/models/concerns/user_extensions.rb +6 -0
- data/{lib/scss/devise/registrations.scss → app/models/lesli/account/detail.rb} +7 -3
- data/app/models/lesli/account.rb +12 -5
- data/app/models/lesli/cloud_object/action.rb +70 -0
- data/app/models/lesli/cloud_object/activity.rb +311 -0
- data/app/models/lesli/cloud_object/custom_field.rb +158 -0
- data/app/models/lesli/cloud_object/discussion.rb +219 -0
- data/app/models/lesli/cloud_object/subscriber.rb +186 -0
- data/app/models/lesli/shared/dashboard.rb +16 -5
- data/app/models/lesli/user/session.rb +0 -2
- data/app/models/lesli/user.rb +13 -13
- data/app/operators/lesli/controller_operator.rb +4 -1
- data/app/operators/lesli/user_registration_operator.rb +3 -3
- data/app/services/lesli/user_service.rb +1 -1
- data/app/views/lesli/layouts/application-devise.html.erb +6 -6
- data/app/views/lesli/layouts/application-lesli.html.erb +3 -1
- data/app/views/lesli/partials/_application-data.html.erb +5 -4
- data/app/views/lesli/partials/_application-lesli-engines.html.erb +14 -39
- data/app/views/lesli/partials/_application-lesli-header.html.erb +50 -25
- data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
- data/app/views/lesli/partials/_application-lesli-javascript.html.erb +2 -2
- data/app/views/lesli/partials/_application-lesli-navigation.html.erb +8 -1
- data/app/views/lesli/partials/_application-lesli-panels.html.erb +7 -7
- data/app/views/lesli/partials/_application-lesli-scss.html.erb +2 -2
- data/app/views/lesli/wrappers/_application-devise-simple.erb +1 -1
- data/app/views/lesli/wrappers/_application-devise.html.erb +5 -7
- data/config/initializers/devise.rb +335 -335
- data/config/initializers/lesli.rb +9 -2
- data/config/locales/translations.en.yml +9 -3
- data/config/locales/translations.es.yml +9 -3
- data/config/locales/translations.fr.yml +30 -0
- data/config/locales/translations.it.yml +30 -0
- data/config/locales/translations.pt.yml +30 -0
- data/config/routes.rb +1 -10
- data/db/migrate/{v1.0/0010003010_create_lesli_user_details.rb → v1/0010000110_create_lesli_accounts.rb} +19 -13
- data/db/migrate/{v1.0/0010000110_create_lesli_accounts.rb → v1/0010001010_create_lesli_account_details.rb} +5 -7
- data/db/migrate/{v1.0/0010001010_create_lesli_account_settings.rb → v1/0010001110_create_lesli_account_settings.rb} +2 -2
- data/db/seed/development/accounts.rb +10 -7
- data/db/seed/development/users.rb +20 -20
- data/db/seed/production/accounts.rb +10 -7
- data/lib/generators/application_lesli_generator.rb +164 -0
- data/lib/generators/lesli/spec/USAGE +8 -0
- data/lib/generators/lesli/spec/spec_generator.rb +25 -0
- data/lib/generators/lesli/spec/templates/spec-factory.template +17 -0
- data/lib/generators/lesli/spec/templates/spec-model.template +70 -0
- data/lib/lesli/configuration.rb +1 -1
- data/lib/lesli/engine.rb +3 -14
- data/lib/{scss/devise/passwords.scss → lesli/r_spec.rb} +12 -5
- data/lib/lesli/routing.rb +51 -20
- data/lib/lesli/version.rb +2 -2
- data/lib/lesli.rb +1 -0
- data/lib/scss/cloud-objects/discussion.scss +8 -5
- data/lib/scss/layouts/application-component.scss +1 -1
- data/lib/scss/{devise/sessions.scss → layouts/application-content.scss} +4 -4
- data/lib/scss/layouts/application-header.scss +38 -108
- data/lib/scss/layouts/{application-navbar.scss → application-navigation.scss} +23 -5
- data/lib/scss/layouts/application-search.scss +1 -1
- data/lib/scss/{elements/msg.scss → overrides/notification.scss} +16 -18
- data/lib/scss/pages/devise-simple.scss +4 -2
- data/lib/scss/pages/devise.scss +111 -107
- data/lib/scss/panels/panel-notification.scss +1 -1
- data/lib/scss/panels/{panel-ticket.scss → panel-support-ticket.scss} +3 -4
- data/lib/scss/settings/variables.scss +1 -1
- data/lib/scss/templates/application.scss +14 -41
- data/lib/scss/templates/public.scss +6 -4
- data/lib/tasks/lesli/controllers.rake +1 -1
- data/lib/tasks/lesli/db.rake +24 -12
- data/lib/tasks/lesli_tasks.rake +7 -7
- data/lib/vue/application.js +18 -15
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/content.vue +10 -8
- data/lib/vue/cloudobjects/discussion/element.vue +170 -0
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/filters.vue +1 -1
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion/new.vue +20 -16
- data/lib/vue/{refactor/shared/cloudobjects → cloudobjects}/discussion.vue +25 -24
- data/lib/vue/{refactor/stores/cloudobjects → cloudobjects/stores}/discussion.js +7 -16
- data/lib/vue/layouts/application-component.vue +2 -2
- data/lib/vue/layouts/application-header.vue +109 -88
- data/lib/vue/panels/{panel-notifications.vue → panel-bell-notifications.vue} +15 -19
- data/lib/vue/panels/panel-support-tickets.vue +163 -0
- data/lib/vue/panels/stores/bell-notifications.js +46 -0
- data/lib/vue/panels/stores/support-tickets.js +103 -0
- data/lib/vue/shared/dashboards/apps/edit.vue +10 -10
- data/lib/vue/shared/dashboards/components/form.vue +31 -40
- data/lib/vue/shared/stores/dashboard.js +2 -0
- data/lib/vue/shared/stores/layout.js +2 -1
- data/lib/{scss/devise/confirmations.scss → vue/shared/stores/users.js} +22 -21
- data/lib/vue/stores/translations.json +119 -2
- data/lib/webpack/base.js +18 -12
- data/lib/webpack/core.js +16 -12
- data/lib/webpack/engines.js +3 -1
- data/lib/webpack/root.js +105 -0
- data/lib/webpack/version.js +37 -0
- data/readme.md +16 -15
- metadata +58 -92
- data/app/assets/icons/lesli/engine-guard.svg +0 -1
- data/app/assets/javascripts/lesli/users/sessions.js +0 -1
- data/app/assets/stylesheets/lesli/users/sessions.css +0 -1
- data/app/controllers/users/confirmations_controller.rb +0 -66
- data/app/controllers/users/omniauth_callbacks_controller.rb +0 -30
- data/app/controllers/users/passwords_controller.rb +0 -71
- data/app/controllers/users/registrations_controller.rb +0 -141
- data/app/controllers/users/sessions_controller.rb +0 -141
- data/app/controllers/users/unlocks_controller.rb +0 -30
- data/app/views/devise/confirmations/new.html.erb +0 -2
- data/app/views/devise/confirmations/show.html.erb +0 -63
- data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/app/views/devise/mailer/password_change.html.erb +0 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/devise/passwords/edit.html.erb +0 -79
- data/app/views/devise/passwords/new.html.erb +0 -75
- data/app/views/devise/registrations/edit.html.erb +0 -43
- data/app/views/devise/registrations/new.html.erb +0 -147
- data/app/views/devise/sessions/new.html.erb +0 -114
- data/app/views/devise/shared/_demo.html.erb +0 -7
- data/app/views/devise/shared/_error_messages.html.erb +0 -15
- data/app/views/devise/shared/_links.html.erb +0 -96
- data/app/views/devise/unlocks/new.html.erb +0 -16
- data/db/migrate/v1.0/0010000210_create_lesli_roles.rb +0 -59
- data/db/migrate/v1.0/0010000310_create_lesli_users.rb +0 -97
- data/db/migrate/v1.0/0010003110_create_lesli_user_settings.rb +0 -44
- data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +0 -55
- data/db/migrate/v1.0/0010003410_create_lesli_user_powers.rb +0 -43
- data/db/migrate/v1.0/0010004010_create_lesli_user_logs.rb +0 -45
- data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +0 -44
- data/db/migrate/v1.0/0010005110_create_lesli_descriptor_privileges.rb +0 -45
- data/db/migrate/v1.0/0010005210_create_lesli_descriptor_activities.rb +0 -49
- data/db/migrate/v1.0/0010005510_create_lesli_role_powers.rb +0 -51
- data/db/migrate/v1.0/0010005710_create_lesli_role_privileges.rb +0 -45
- data/lib/scss/bulma/loader.scss +0 -92
- data/lib/scss/components/editor-richtext.scss +0 -88
- data/lib/scss/devise/oauth.scss +0 -34
- data/lib/scss/elements/avatar.scss +0 -48
- data/lib/scss/elements/calendar.scss +0 -47
- data/lib/scss/elements/toggle.scss +0 -102
- data/lib/vue/devise/confirmations.js +0 -33
- data/lib/vue/devise/passwords.js +0 -137
- data/lib/vue/devise/registrations.js +0 -157
- data/lib/vue/devise/sessions.js +0 -148
- data/lib/vue/panels/panel-tickets.vue +0 -181
- data/lib/vue/refactor/shared/cloudobjects/discussion/element.vue +0 -132
- data/lib/vue/shared/stores/account.js +0 -113
- /data/app/assets/icons/lesli/{engine-driver.svg → engine-calendar.svg} +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000610_create_lesli_system_controllers.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010000710_create_lesli_system_controller_actions.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001210_create_lesli_account_activities.rb +0 -0
- /data/db/migrate/{v1.0 → v1}/0010001410_create_lesli_account_logs.rb +0 -0
|
@@ -53,9 +53,14 @@ const url = inject("url")
|
|
|
53
53
|
|
|
54
54
|
// · defining props
|
|
55
55
|
const props = defineProps({
|
|
56
|
+
showProfile: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
required: false
|
|
60
|
+
},
|
|
56
61
|
showEngines: {
|
|
57
62
|
type: Boolean,
|
|
58
|
-
default:
|
|
63
|
+
default: false,
|
|
59
64
|
required: false
|
|
60
65
|
},
|
|
61
66
|
showBell: {
|
|
@@ -68,7 +73,7 @@ const props = defineProps({
|
|
|
68
73
|
default: false,
|
|
69
74
|
required: false
|
|
70
75
|
},
|
|
71
|
-
|
|
76
|
+
showSupport: {
|
|
72
77
|
type: Boolean,
|
|
73
78
|
default: false,
|
|
74
79
|
required: false
|
|
@@ -89,7 +94,8 @@ const props = defineProps({
|
|
|
89
94
|
// · translations
|
|
90
95
|
const translations = {
|
|
91
96
|
lesli: {
|
|
92
|
-
|
|
97
|
+
shared: {},
|
|
98
|
+
application: {},
|
|
93
99
|
}
|
|
94
100
|
}
|
|
95
101
|
|
|
@@ -122,15 +128,108 @@ function safeEngineUrl() {
|
|
|
122
128
|
</script>
|
|
123
129
|
<template>
|
|
124
130
|
<header ref="lesliApplicationHeader" class="lesli-application-header">
|
|
125
|
-
<
|
|
126
|
-
<
|
|
127
|
-
<
|
|
131
|
+
<lesli-navbar>
|
|
132
|
+
<template v-slot:brand>
|
|
133
|
+
<a :href="safeEngineUrl()">
|
|
128
134
|
<slot name="brand"></slot>
|
|
129
|
-
</
|
|
130
|
-
</
|
|
135
|
+
</a>
|
|
136
|
+
</template>
|
|
137
|
+
<template v-slot:end>
|
|
138
|
+
|
|
139
|
+
<slot name="end"></slot>
|
|
140
|
+
|
|
141
|
+
<!-- tickets -->
|
|
142
|
+
<div class="navbar-item" v-if="props.showSupport">
|
|
143
|
+
<a class="header-indicator"
|
|
144
|
+
@click="() => { storeLayout.showSupport = true }">
|
|
145
|
+
<span class="count" v-if="storeLayout.header.support > 0"></span>
|
|
146
|
+
<span class="ri-ticket-2-line"></span>
|
|
147
|
+
</a>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<!-- tasks -->
|
|
151
|
+
<div class="navbar-item" v-if="props.showFocus">
|
|
152
|
+
<a class="header-indicator"
|
|
153
|
+
@click="() => { storeLayout.showSuppor = true }">
|
|
154
|
+
<span class="ri-list-check-3">
|
|
155
|
+
</span>
|
|
156
|
+
<span class="count" v-if="storeLayout.header.support > 0">
|
|
157
|
+
</span>
|
|
158
|
+
</a>
|
|
159
|
+
</div>
|
|
160
|
+
|
|
161
|
+
<!-- notifications -->
|
|
162
|
+
<div class="navbar-item" v-if="props.showBell">
|
|
163
|
+
<a class="header-indicator">
|
|
164
|
+
<span :class="['ri-notification-3-line', { 'is-active' : storeLayout.header.notifications > 0 }]">
|
|
165
|
+
</span>
|
|
166
|
+
<span class="count">
|
|
167
|
+
</span>
|
|
168
|
+
</a>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<!-- engines selector -->
|
|
172
|
+
<div class="navbar-item" v-if="props.showEngines">
|
|
173
|
+
<a @click="toggleEngines()">
|
|
174
|
+
<span class="ri-apps-2-line"></span>
|
|
175
|
+
</a>
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<!-- profile options -->
|
|
179
|
+
<div class="navbar-item" v-if="props.showProfile">
|
|
180
|
+
<div class="dropdown is-hoverable">
|
|
181
|
+
<div class="dropdown-trigger">
|
|
182
|
+
<a @click="storeLayout.showProfile = true">
|
|
183
|
+
<span class="ri-user-smile-line">
|
|
184
|
+
</span>
|
|
185
|
+
</a>
|
|
186
|
+
</div>
|
|
187
|
+
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
|
188
|
+
<div class="dropdown-content">
|
|
189
|
+
<a :href="url.admin('profile')" class="dropdown-item py-3">
|
|
190
|
+
<span class="icon-text">
|
|
191
|
+
<span class="icon has-text-grey-dark">
|
|
192
|
+
<span class="ri-questionnaire-line"></span>
|
|
193
|
+
</span>
|
|
194
|
+
<span>Help</span>
|
|
195
|
+
</span>
|
|
196
|
+
</a>
|
|
197
|
+
<a :href="url.admin('profile')" class="dropdown-item py-3">
|
|
198
|
+
<span class="icon-text">
|
|
199
|
+
<span class="icon has-text-grey-dark">
|
|
200
|
+
<span class="ri-equalizer-line"></span>
|
|
201
|
+
</span>
|
|
202
|
+
<span>Settings</span>
|
|
203
|
+
</span>
|
|
204
|
+
</a>
|
|
205
|
+
<a :href="url.admin('profile')" class="dropdown-item py-3">
|
|
206
|
+
<span class="icon-text">
|
|
207
|
+
<span class="icon has-text-grey-dark">
|
|
208
|
+
<span class="ri-user-line"></span>
|
|
209
|
+
</span>
|
|
210
|
+
<span>Profile</span>
|
|
211
|
+
</span>
|
|
212
|
+
</a>
|
|
213
|
+
<hr class="dropdown-divider" />
|
|
214
|
+
<a href="/logout" class="dropdown-item py-3">
|
|
215
|
+
<span class="icon-text">
|
|
216
|
+
<span class="icon has-text-grey-dark">
|
|
217
|
+
<span class="ri-logout-box-r-line"></span>
|
|
218
|
+
</span>
|
|
219
|
+
<span>Logout</span>
|
|
220
|
+
</span>
|
|
221
|
+
</a>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
</template>
|
|
227
|
+
</lesli-navbar>
|
|
228
|
+
<!--
|
|
229
|
+
<div class="lesli-application-header-container container">
|
|
131
230
|
<div class="lesli-application-header-left">
|
|
132
231
|
<div class="control is-medium has-icons-left has-text-grey">
|
|
133
|
-
<span class="icon is-left has-text-
|
|
232
|
+
<span class="icon is-left has-text-grey-dark">
|
|
134
233
|
<span class="material-icons" v-if="!storeSearch.loading">
|
|
135
234
|
search
|
|
136
235
|
</span>
|
|
@@ -147,85 +246,7 @@ function safeEngineUrl() {
|
|
|
147
246
|
/>
|
|
148
247
|
</div>
|
|
149
248
|
</div>
|
|
150
|
-
<div class="lesli-application-header-right">
|
|
151
|
-
|
|
152
|
-
<!-- -->
|
|
153
|
-
<slot></slot>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<!-- engines selector -->
|
|
157
|
-
<a v-if="props.showEngines"
|
|
158
|
-
class="header-indicator"
|
|
159
|
-
@click="toggleEngines()">
|
|
160
|
-
<span class="ri-apps-2-line"></span>
|
|
161
|
-
</a>
|
|
162
|
-
|
|
163
|
-
<!-- Tickets -->
|
|
164
|
-
<a
|
|
165
|
-
v-if="props.showTickets"
|
|
166
|
-
class="header-indicator"
|
|
167
|
-
@click="() => { storeLayout.showTickets = true }">
|
|
168
|
-
<span :class="['ri-ticket-2-line', { 'is-active' : storeLayout.header.tickets > 0 }]">
|
|
169
|
-
</span>
|
|
170
|
-
<span class="count" v-if="storeLayout.header.tickets > 0">
|
|
171
|
-
{{ storeLayout.header.tickets }}
|
|
172
|
-
</span>
|
|
173
|
-
</a>
|
|
174
|
-
|
|
175
|
-
<!-- Tasks -->
|
|
176
|
-
<a v-if="props.showFocus"
|
|
177
|
-
class="header-indicator"
|
|
178
|
-
@click="() => { if (storeLayout.header.tasks > 0 ) { storeLayout.showTasks = true }}">
|
|
179
|
-
<span :class="['ri-list-check-3', { 'is-active' : storeLayout.header.tasks > 0 }]">
|
|
180
|
-
</span>
|
|
181
|
-
<span class="count" v-if="storeLayout.header.tasks > 0">
|
|
182
|
-
{{ storeLayout.header.tasks }}
|
|
183
|
-
</span>
|
|
184
|
-
</a>
|
|
185
|
-
|
|
186
|
-
<!-- Notifications -->
|
|
187
|
-
<a
|
|
188
|
-
v-if="props.showBell"
|
|
189
|
-
class="header-indicator"
|
|
190
|
-
@click="() => { if (storeLayout.header.notifications > 0 ) { storeLayout.showNotifications = true }}">
|
|
191
|
-
<span :class="['ri-notification-3-line', { 'is-active' : storeLayout.header.notifications > 0 }]">
|
|
192
|
-
</span>
|
|
193
|
-
<span class="count" v-if="storeLayout.header.notifications > 0">
|
|
194
|
-
{{ storeLayout.header.notifications }}
|
|
195
|
-
</span>
|
|
196
|
-
</a>
|
|
197
|
-
|
|
198
|
-
<!-- Profile options -->
|
|
199
|
-
<div class="dropdown is-right is-hoverable header-user-options">
|
|
200
|
-
<div class="dropdown-trigger">
|
|
201
|
-
<span class="icon has-text-link">
|
|
202
|
-
<span class="ri-user-smile-line" @click="storeLayout.showProfile = true">
|
|
203
|
-
</span>
|
|
204
|
-
</span>
|
|
205
|
-
</div>
|
|
206
|
-
<div class="dropdown-menu" id="dropdown-menu" role="menu">
|
|
207
|
-
<div class="dropdown-content">
|
|
208
|
-
<a :href="url.admin('profile')" class="dropdown-item py-3">
|
|
209
|
-
<span class="icon-text">
|
|
210
|
-
<span class="icon has-text-grey-dark">
|
|
211
|
-
<span class="ri-user-line"></span>
|
|
212
|
-
</span>
|
|
213
|
-
<span>{{ translations.lesli.application.navigation_my_profile }}</span>
|
|
214
|
-
</span>
|
|
215
|
-
</a>
|
|
216
|
-
<hr class="dropdown-divider">
|
|
217
|
-
<a href="/logout" class="dropdown-item py-3">
|
|
218
|
-
<span class="icon-text">
|
|
219
|
-
<span class="icon has-text-grey-dark">
|
|
220
|
-
<span class="ri-logout-box-r-line"></span>
|
|
221
|
-
</span>
|
|
222
|
-
<span>{{ translations.lesli.application.navigation_logout }}</span>
|
|
223
|
-
</span>
|
|
224
|
-
</a>
|
|
225
|
-
</div>
|
|
226
|
-
</div>
|
|
227
|
-
</div>
|
|
228
|
-
</div>
|
|
229
249
|
</div>
|
|
250
|
+
-->
|
|
230
251
|
</header>
|
|
231
252
|
</template>
|
|
@@ -18,18 +18,17 @@ GNU General Public License for more details.
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
19
|
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
20
|
|
|
21
|
-
Lesli ·
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
22
|
|
|
23
|
-
Made with ♥ by
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
24
|
Building a better future, one line of code at a time.
|
|
25
25
|
|
|
26
26
|
@contact hello@lesli.tech
|
|
27
|
-
@website https://lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
28
|
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
29
|
|
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
31
|
// ·
|
|
32
|
-
|
|
33
32
|
*/
|
|
34
33
|
|
|
35
34
|
|
|
@@ -38,13 +37,14 @@ import { ref, reactive, onMounted, watch, computed, inject } from "vue"
|
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
// · import stores
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
40
|
+
import { useLayout } from "Lesli/vue/shared/stores/layout"
|
|
41
|
+
import { useNotifications } from "Lesli/vue/panels/stores/bell-notifications"
|
|
42
|
+
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
// · implement stores
|
|
46
|
-
const storeUser = useUser()
|
|
47
46
|
const storeLayout = useLayout()
|
|
47
|
+
const storeNotifications = useNotifications()
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
// · initialize/inject plugins
|
|
@@ -52,28 +52,22 @@ const url = inject("url")
|
|
|
52
52
|
const date = inject("date")
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
// · emit the page selected received from the pagination component
|
|
56
|
-
function paginate(page) {
|
|
57
|
-
storeUser.paginateNotifications(page)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
55
|
// ·
|
|
62
56
|
watch(() => storeLayout.showNotifications, () => {
|
|
63
|
-
|
|
57
|
+
storeNotifications.get()
|
|
64
58
|
})
|
|
65
59
|
|
|
66
60
|
</script>
|
|
67
61
|
<template>
|
|
68
|
-
<lesli-panel class="lesli-panel-notifications" v-model:open="storeLayout.showNotifications">
|
|
62
|
+
<lesli-panel class="lesli-panel-bell-notifications" v-model:open="storeLayout.showNotifications">
|
|
69
63
|
<template #header>
|
|
70
|
-
Notifications ({{
|
|
64
|
+
Notifications ({{ storeNotifications.notifications.pagination.total }})
|
|
71
65
|
</template>
|
|
72
66
|
<template #default>
|
|
73
67
|
<div class="block">
|
|
74
68
|
<ul class="">
|
|
75
69
|
<li class="lesli-notification pt-3 pb-2 px-4"
|
|
76
|
-
v-for="notification in
|
|
70
|
+
v-for="notification in storeNotifications.notifications.records">
|
|
77
71
|
<a :href="notification.url"
|
|
78
72
|
:class="['mb-2 is-block', `notification-${ notification.category }`]">
|
|
79
73
|
<h4 :class="['notification-title', `has-text-${ notification.category }-dark`]">
|
|
@@ -99,7 +93,9 @@ watch(() => storeLayout.showNotifications, () => {
|
|
|
99
93
|
</ul>
|
|
100
94
|
</div>
|
|
101
95
|
<div class="block px-5">
|
|
102
|
-
|
|
96
|
+
<!--
|
|
97
|
+
<lesli-pagination :pagination="storeNotifications.notifications.pagination" @paginate="paginate" mode="simple"></lesli-pagination>
|
|
98
|
+
-->
|
|
103
99
|
</div>
|
|
104
100
|
</template>
|
|
105
101
|
</lesli-panel>
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
/*
|
|
3
|
+
|
|
4
|
+
Lesli
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
|
7
|
+
|
|
8
|
+
This program is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
(at your option) any later version.
|
|
12
|
+
|
|
13
|
+
This program is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
|
20
|
+
|
|
21
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
|
22
|
+
|
|
23
|
+
Made with ♥ by LesliTech
|
|
24
|
+
Building a better future, one line of code at a time.
|
|
25
|
+
|
|
26
|
+
@contact hello@lesli.tech
|
|
27
|
+
@website https://www.lesli.tech
|
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
|
29
|
+
|
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
31
|
+
// ·
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
// TODO: Move this to own engine
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
// · import vue tools
|
|
39
|
+
import { inject, watch } from "vue"
|
|
40
|
+
import { useRouter } from "vue-router"
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
// · import store
|
|
44
|
+
import { useLayout } from "Lesli/vue/shared/stores/layout"
|
|
45
|
+
import { useTickets } from "Lesli/vue/panels/stores/support-tickets"
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
// ·
|
|
49
|
+
import { LesliTextEditor } from "lesli-vue/components"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
// · initialize/inject plugins
|
|
53
|
+
const router = useRouter()
|
|
54
|
+
const url = inject("url")
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
// · implement stores
|
|
58
|
+
const storeLayout = useLayout()
|
|
59
|
+
const storeTicketsPanel = useTickets()
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
// · defining translations
|
|
63
|
+
const translations = {
|
|
64
|
+
tickets: {},
|
|
65
|
+
lesli: {
|
|
66
|
+
shared:{}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
// ·
|
|
72
|
+
const columns = [{
|
|
73
|
+
field: "subject",
|
|
74
|
+
label: "subject"
|
|
75
|
+
}, {
|
|
76
|
+
field: "status_name",
|
|
77
|
+
label: "Status"
|
|
78
|
+
}]
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
// . Reset form on create
|
|
82
|
+
storeTicketsPanel.resetForm()
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
// .
|
|
86
|
+
watch(() => storeLayout.showSupportTickets, () => {
|
|
87
|
+
if (storeLayout.showSupportTickets) {
|
|
88
|
+
storeTicketsPanel.fetchTickets()
|
|
89
|
+
|
|
90
|
+
if (!storeTicketsPanel.loaded) {
|
|
91
|
+
//storeTicketsPanel.getTicketOptions()
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<template>
|
|
99
|
+
<lesli-panel class="lesli-panel-support-tickets" v-model:open="storeLayout.showSupportTickets">
|
|
100
|
+
<template #header>
|
|
101
|
+
Support tickets
|
|
102
|
+
</template>
|
|
103
|
+
<template #default>
|
|
104
|
+
<div class="lastest-tickets" v-if="storeTicketsPanel.tickets.length > 0">
|
|
105
|
+
<h4>Latest tickets</h4>
|
|
106
|
+
<lesli-table
|
|
107
|
+
class="is-narrow"
|
|
108
|
+
:columns="columns"
|
|
109
|
+
:records="storeTicketsPanel.tickets"
|
|
110
|
+
:loading="storeTicketsPanel.loading"
|
|
111
|
+
:href="(ticket) => url.support('tickets/:id', ticket.id)">
|
|
112
|
+
</lesli-table>
|
|
113
|
+
</div>
|
|
114
|
+
<hr>
|
|
115
|
+
<div class="form">
|
|
116
|
+
<lesli-form flat @submit="storeTicketsPanel.postTicket">
|
|
117
|
+
<div class="field">
|
|
118
|
+
<label class="label">
|
|
119
|
+
{{ translations.tickets.column_subject }}
|
|
120
|
+
{{ translations.tickets.column_subject }}
|
|
121
|
+
<sup class="has-text-danger">*</sup>
|
|
122
|
+
</label>
|
|
123
|
+
<div class="control">
|
|
124
|
+
<input type="text" class="input" required v-model="storeTicketsPanel.ticket.subject">
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
<div class="field">
|
|
129
|
+
<label class="label">
|
|
130
|
+
{{ translations.tickets.column_type }}
|
|
131
|
+
<sup class="has-text-danger">*</sup>
|
|
132
|
+
</label>
|
|
133
|
+
<div class="control">
|
|
134
|
+
<lesli-select
|
|
135
|
+
:options="storeTicketsPanel.typesSelect"
|
|
136
|
+
v-model="storeTicketsPanel.ticket.cloud_help_catalog_ticket_types_id">
|
|
137
|
+
</lesli-select>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
<div class="field">
|
|
142
|
+
<label class="label">
|
|
143
|
+
{{ translations.tickets.column_description }}
|
|
144
|
+
<sup class="has-text-danger">*</sup>
|
|
145
|
+
</label>
|
|
146
|
+
<div class="control">
|
|
147
|
+
<lesli-text-editor mode="small" v-model="storeTicketsPanel.ticket.description">
|
|
148
|
+
</lesli-text-editor>
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
|
|
152
|
+
<div class="field">
|
|
153
|
+
<div class="control">
|
|
154
|
+
<lesli-button icon="save">
|
|
155
|
+
{{ translations.lesli.shared.button_save }}
|
|
156
|
+
</lesli-button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</lesli-form>
|
|
160
|
+
</div>
|
|
161
|
+
</template>
|
|
162
|
+
</lesli-panel>
|
|
163
|
+
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2022, all rights reserved.
|
|
3
|
+
|
|
4
|
+
All the information provided by this platform is protected by international laws related to
|
|
5
|
+
industrial property, intellectual property, copyright and relative international laws.
|
|
6
|
+
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
7
|
+
pictures and any other information belongs to the owner of this platform.
|
|
8
|
+
|
|
9
|
+
Without the written permission of the owner, any replication, modification,
|
|
10
|
+
transmission, publication is strictly forbidden.
|
|
11
|
+
|
|
12
|
+
For more information read the license file including with this software.
|
|
13
|
+
|
|
14
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
15
|
+
// ·
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
// ·
|
|
20
|
+
import { defineStore } from "pinia"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
// ·
|
|
24
|
+
export const useNotifications = defineStore("lesli.panelBellNotifications", {
|
|
25
|
+
state: () => {
|
|
26
|
+
return {
|
|
27
|
+
loading: false,
|
|
28
|
+
notifications: {
|
|
29
|
+
pagination: {},
|
|
30
|
+
records: []
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
actions: {
|
|
35
|
+
|
|
36
|
+
get() {
|
|
37
|
+
this.http.get(this.url.bell("notifications")).then(result => {
|
|
38
|
+
this.notifications.pagination = result.pagination
|
|
39
|
+
this.notifications.records = result.records
|
|
40
|
+
console.log(result)
|
|
41
|
+
}).catch(error => {
|
|
42
|
+
console.log(error)
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
})
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) 2022, all rights reserved.
|
|
3
|
+
|
|
4
|
+
All the information provided by this platform is protected by international laws related to
|
|
5
|
+
industrial property, intellectual property, copyright and relative international laws.
|
|
6
|
+
All intellectual or industrial property rights of the code, texts, trade mark, design,
|
|
7
|
+
pictures and any other information belongs to the owner of this platform.
|
|
8
|
+
|
|
9
|
+
Without the written permission of the owner, any replication, modification,
|
|
10
|
+
transmission, publication is strictly forbidden.
|
|
11
|
+
|
|
12
|
+
For more information read the license file including with this software.
|
|
13
|
+
|
|
14
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
|
15
|
+
// ·
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
// ·
|
|
20
|
+
import { defineStore } from "pinia"
|
|
21
|
+
//import { useLayout } from "LesliVue/stores/layout"
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
// ·
|
|
25
|
+
export const useTickets = defineStore("lesli.panelSupportTickets", {
|
|
26
|
+
state: () => {
|
|
27
|
+
return {
|
|
28
|
+
loading: false,
|
|
29
|
+
loaded: false,
|
|
30
|
+
ticket: {
|
|
31
|
+
cloud_help_catalog_ticket_types_id: 2,
|
|
32
|
+
cloud_help_catalog_ticket_workspaces_id: null,
|
|
33
|
+
subject: "",
|
|
34
|
+
description: "",
|
|
35
|
+
reference_url: null
|
|
36
|
+
},
|
|
37
|
+
tickets: {},
|
|
38
|
+
options: {
|
|
39
|
+
types: [],
|
|
40
|
+
categories: [],
|
|
41
|
+
priorities: []
|
|
42
|
+
},
|
|
43
|
+
typesSelect : [],
|
|
44
|
+
workspaceSelect: [],
|
|
45
|
+
//storeLayout: useLayout()
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
actions: {
|
|
49
|
+
|
|
50
|
+
fetchTickets() {
|
|
51
|
+
this.loading = true
|
|
52
|
+
this.http.get(this.url.support("tickets")
|
|
53
|
+
.paginate(1,3) // Here we only fetch the last 3 tickets assigned to show in the support ticket panel
|
|
54
|
+
.filter({search_type: ['active'], user_type:['own']})
|
|
55
|
+
).then(result => {
|
|
56
|
+
this.tickets = result.records
|
|
57
|
+
}).catch(error => {
|
|
58
|
+
this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
|
|
59
|
+
}).finally(() => {
|
|
60
|
+
this.loading = false
|
|
61
|
+
})
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
postTicket(){
|
|
65
|
+
this.loading = true
|
|
66
|
+
this.ticket.reference_url = window.location.href
|
|
67
|
+
|
|
68
|
+
this.http.post(this.url.support('tickets'), this.ticket).then(result => {
|
|
69
|
+
this.msg.success(I18n.t("core.users.messages_success_operation"))
|
|
70
|
+
this.resetForm()
|
|
71
|
+
//this.storeLayout.showTickets = false
|
|
72
|
+
}).catch(error => {
|
|
73
|
+
this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
|
|
74
|
+
}).finally(() => {
|
|
75
|
+
this.loading = false
|
|
76
|
+
})
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
resetForm(){
|
|
80
|
+
this.ticket.subject = ''
|
|
81
|
+
this.ticket.description = ""
|
|
82
|
+
this.ticket.type = 2
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
getTicketOptions() {
|
|
86
|
+
this.loaded = true
|
|
87
|
+
this.http.get(this.url.support('tickets/options')).then(result => {
|
|
88
|
+
this.options = result
|
|
89
|
+
|
|
90
|
+
result.types.map((type)=>{
|
|
91
|
+
this.typesSelect.push({label: type.name, value: type.id})
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
result.workspaces.map((workspace)=>{
|
|
95
|
+
this.workspaceSelect.push({label: workspace.name, value: workspace.id})
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
}).catch(error => {
|
|
99
|
+
this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
|
|
100
|
+
})
|
|
101
|
+
},
|
|
102
|
+
}
|
|
103
|
+
})
|