lesli 5.0.11 → 5.0.13
Sign up to get free protection for your applications and to get access to all the features.
- 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
data/lib/vue/devise/sessions.js
DELETED
@@ -1,148 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Lesli
|
3
|
-
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
5
|
-
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
7
|
-
it under the terms of the GNU General Public License as published by
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
9
|
-
(at your option) any later version.
|
10
|
-
|
11
|
-
This program is distributed in the hope that it will be useful,
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
GNU General Public License for more details.
|
15
|
-
|
16
|
-
You should have received a copy of the GNU General Public License
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
18
|
-
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
20
|
-
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
22
|
-
Building a better future, one line of code at a time.
|
23
|
-
|
24
|
-
@contact hello@lesli.tech
|
25
|
-
@website https://www.lesli.tech
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
27
|
-
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
29
|
-
// ·
|
30
|
-
*/
|
31
|
-
|
32
|
-
|
33
|
-
// ·
|
34
|
-
import application from "LesliVue/public"
|
35
|
-
|
36
|
-
|
37
|
-
// ·
|
38
|
-
application({
|
39
|
-
|
40
|
-
data(){
|
41
|
-
return {
|
42
|
-
loading: false,
|
43
|
-
sign_in: {
|
44
|
-
email: "",
|
45
|
-
password: ""
|
46
|
-
},
|
47
|
-
notification: {
|
48
|
-
message: "",
|
49
|
-
show: false,
|
50
|
-
type: "default"
|
51
|
-
},
|
52
|
-
errors: []
|
53
|
-
}
|
54
|
-
},
|
55
|
-
mounted() {
|
56
|
-
this.$refs?.email?.focus()
|
57
|
-
|
58
|
-
if (lesli_application_development) {
|
59
|
-
this.sign_in.email = "hello@lesli.tech"
|
60
|
-
this.sign_in.password = "Tardis2024$"
|
61
|
-
}
|
62
|
-
},
|
63
|
-
methods: {
|
64
|
-
|
65
|
-
togglePasswordInput() {
|
66
|
-
if (this.$refs.password.type === "password") {
|
67
|
-
this.$refs.password.type = "text";
|
68
|
-
} else {
|
69
|
-
this.$refs.password.type = "password";
|
70
|
-
}
|
71
|
-
},
|
72
|
-
|
73
|
-
validateEmail() {
|
74
|
-
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(this.sign_in.email)) {
|
75
|
-
console.log("error")
|
76
|
-
}
|
77
|
-
},
|
78
|
-
|
79
|
-
build_redirect_url(default_path = null) {
|
80
|
-
|
81
|
-
// redirect to the root of the domain by default
|
82
|
-
let redirect_url = "/"
|
83
|
-
|
84
|
-
try {
|
85
|
-
|
86
|
-
// search for a redirection route in the url params
|
87
|
-
redirect_url = Object.fromEntries(new URLSearchParams(window.location.search)).r
|
88
|
-
|
89
|
-
} catch (error) {
|
90
|
-
|
91
|
-
}
|
92
|
-
|
93
|
-
// redirect to the default path if:
|
94
|
-
// - there is no query params with redirection
|
95
|
-
if (!redirect_url && default_path) {
|
96
|
-
redirect_url = default_path
|
97
|
-
}
|
98
|
-
|
99
|
-
// redirect to the root if:
|
100
|
-
// - error parsing redirection route
|
101
|
-
// - there is no query params with redirection
|
102
|
-
if (!redirect_url) {
|
103
|
-
redirect_url = "/"
|
104
|
-
}
|
105
|
-
|
106
|
-
return redirect_url
|
107
|
-
|
108
|
-
},
|
109
|
-
|
110
|
-
postLogin(event) {
|
111
|
-
|
112
|
-
this.loading = true
|
113
|
-
|
114
|
-
event.preventDefault();
|
115
|
-
|
116
|
-
this.notification.show = false
|
117
|
-
|
118
|
-
let data = {
|
119
|
-
user: {
|
120
|
-
email: this.sign_in.email.toLowerCase(),
|
121
|
-
password: this.sign_in.password
|
122
|
-
}
|
123
|
-
};
|
124
|
-
|
125
|
-
this.http.post("/login", data).then(response => {
|
126
|
-
this.url.go(this.build_redirect_url(response.default_path))
|
127
|
-
}).catch(error => {
|
128
|
-
this.showNotification(error.message)
|
129
|
-
}).finally(() => {
|
130
|
-
this.loading = false
|
131
|
-
})
|
132
|
-
|
133
|
-
},
|
134
|
-
|
135
|
-
typing() {
|
136
|
-
this.notification.message= ""
|
137
|
-
this.notification.show= false
|
138
|
-
this.notification.type= "default"
|
139
|
-
},
|
140
|
-
|
141
|
-
showNotification(message, type="danger"){
|
142
|
-
this.notification.message = message;
|
143
|
-
this.notification.type = type;
|
144
|
-
this.notification.show = true;
|
145
|
-
}
|
146
|
-
|
147
|
-
}
|
148
|
-
})
|
@@ -1,181 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
22
|
-
|
23
|
-
Made with ♥ by https://www.lesli.tech
|
24
|
-
Building a better future, one line of code at a time.
|
25
|
-
|
26
|
-
@contact hello@lesli.tech
|
27
|
-
@website https://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
// · import vue tools
|
37
|
-
import { inject, watch } from "vue"
|
38
|
-
import { useRouter } from "vue-router"
|
39
|
-
|
40
|
-
|
41
|
-
// · import store
|
42
|
-
import { useLayout } from "Lesli/vue/stores/layout"
|
43
|
-
import { useTickets } from "Lesli/vue/stores/panels/tickets"
|
44
|
-
|
45
|
-
|
46
|
-
// ·
|
47
|
-
import { editorRichText } from "lesli-vue/components"
|
48
|
-
|
49
|
-
|
50
|
-
// · initialize/inject plugins
|
51
|
-
const router = useRouter()
|
52
|
-
const url = inject("url")
|
53
|
-
|
54
|
-
|
55
|
-
// · implement stores
|
56
|
-
const storeLayout = useLayout()
|
57
|
-
const storeTicketsPanel = useTickets()
|
58
|
-
|
59
|
-
|
60
|
-
// · defining translations
|
61
|
-
const translations = {
|
62
|
-
core: {
|
63
|
-
shared: I18n.t("core.shared"),
|
64
|
-
},
|
65
|
-
main: I18n.t('help.tickets')
|
66
|
-
}
|
67
|
-
|
68
|
-
|
69
|
-
// ·
|
70
|
-
const columns = [{
|
71
|
-
field: "subject",
|
72
|
-
label: "subject"
|
73
|
-
}, {
|
74
|
-
field: "status_name",
|
75
|
-
label: "Status"
|
76
|
-
}]
|
77
|
-
|
78
|
-
// · defining props
|
79
|
-
const props = defineProps({
|
80
|
-
instanceEndpoint: {
|
81
|
-
type: String,
|
82
|
-
default: 'help'
|
83
|
-
}
|
84
|
-
})
|
85
|
-
|
86
|
-
// . Reset form on create
|
87
|
-
storeTicketsPanel.resetForm()
|
88
|
-
|
89
|
-
|
90
|
-
watch(() => storeLayout.showTickets, () => {
|
91
|
-
if(storeLayout.showTickets){
|
92
|
-
storeTicketsPanel.fetchTickets()
|
93
|
-
|
94
|
-
if(!storeTicketsPanel.loaded){
|
95
|
-
storeTicketsPanel.getTicketOptions()
|
96
|
-
}
|
97
|
-
}
|
98
|
-
})
|
99
|
-
|
100
|
-
</script>
|
101
|
-
|
102
|
-
<template>
|
103
|
-
<lesli-panel class="lesli-panel-tickets" v-model:open="storeLayout.showTickets">
|
104
|
-
<template #header>
|
105
|
-
{{ translations.main.view_text_support_tickets }}
|
106
|
-
</template>
|
107
|
-
<template #default>
|
108
|
-
<div class="lastest-tickets" v-if="storeTicketsPanel.tickets.length > 0">
|
109
|
-
<h4>{{ translations.main.view_title_latest_tickets }}</h4>
|
110
|
-
<lesli-table
|
111
|
-
class="is-narrow"
|
112
|
-
:columns="columns"
|
113
|
-
:records="storeTicketsPanel.tickets"
|
114
|
-
:loading="storeTicketsPanel.loading"
|
115
|
-
:href="(ticket) => url.to(`${props.instanceEndpoint}/tickets/${ticket.id}`)">
|
116
|
-
</lesli-table>
|
117
|
-
</div>
|
118
|
-
<hr>
|
119
|
-
<div class="form">
|
120
|
-
<h4>{{translations.main.view_title_quick_creation}}</h4>
|
121
|
-
<form @submit.prevent="storeTicketsPanel.postTicket">
|
122
|
-
<div class="columns">
|
123
|
-
<div class="column is-1"></div>
|
124
|
-
<div class="column is-3">
|
125
|
-
<label class="label">
|
126
|
-
{{translations.main.column_subject}} <sup class="has-text-danger">*</sup>
|
127
|
-
</label>
|
128
|
-
</div>
|
129
|
-
<div class="column is-7">
|
130
|
-
<input type="text" class="input" required v-model="storeTicketsPanel.ticket.subject">
|
131
|
-
</div>
|
132
|
-
</div>
|
133
|
-
|
134
|
-
<div class="columns">
|
135
|
-
<div class="column is-1"></div>
|
136
|
-
<div class="column is-3">
|
137
|
-
<label class="label">
|
138
|
-
{{translations.main.column_cloud_help_catalog_ticket_types_id}}<sup class="has-text-danger">*</sup>
|
139
|
-
</label>
|
140
|
-
</div>
|
141
|
-
<div class="column is-7">
|
142
|
-
|
143
|
-
<lesli-select
|
144
|
-
:options="storeTicketsPanel.typesSelect"
|
145
|
-
v-model="storeTicketsPanel.ticket.cloud_help_catalog_ticket_types_id"
|
146
|
-
>
|
147
|
-
</lesli-select>
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
|
151
|
-
<div class="columns">
|
152
|
-
<div class="column is-1"></div>
|
153
|
-
<div class="column is-3">
|
154
|
-
<label class="label">
|
155
|
-
{{translations.main.column_description}} <sup class="has-text-danger">*</sup>
|
156
|
-
</label>
|
157
|
-
</div>
|
158
|
-
</div>
|
159
|
-
|
160
|
-
<div class="columns">
|
161
|
-
<div class="column is-1"></div>
|
162
|
-
<div class="column is-10">
|
163
|
-
<editorRichText mode="small" v-model="storeTicketsPanel.ticket.description"></editorRichText>
|
164
|
-
</div>
|
165
|
-
</div>
|
166
|
-
|
167
|
-
<div class="columns">
|
168
|
-
<div class="column is-1"></div>
|
169
|
-
<div class="column">
|
170
|
-
<lesli-button icon="save">
|
171
|
-
{{ translations.core.shared.view_btn_save }}
|
172
|
-
</lesli-button>
|
173
|
-
</div>
|
174
|
-
</div>
|
175
|
-
|
176
|
-
</form>
|
177
|
-
</div>
|
178
|
-
</template>
|
179
|
-
|
180
|
-
</lesli-panel>
|
181
|
-
</template>
|
@@ -1,132 +0,0 @@
|
|
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 · Your Smart Business Assistant.
|
22
|
-
|
23
|
-
Made with ♥ by https://www.lesli.tech
|
24
|
-
Building a better future, one line of code at a time.
|
25
|
-
|
26
|
-
@contact hello@lesli.tech
|
27
|
-
@website https://lesli.tech
|
28
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
-
|
30
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
-
// ·
|
32
|
-
|
33
|
-
*/
|
34
|
-
|
35
|
-
|
36
|
-
// · import vue tools
|
37
|
-
import { computed, ref } from "vue"
|
38
|
-
|
39
|
-
// · import components
|
40
|
-
import NewComment from "Lesli/vue/cloudobjects/components/discussion/new.vue"
|
41
|
-
|
42
|
-
// · import store
|
43
|
-
import { useCloudObjectDiscussionStore } from "Lesli/vue/cloudobjects/stores/discussion"
|
44
|
-
|
45
|
-
const props = defineProps({
|
46
|
-
// · the discussion or activity log that will be displayed.
|
47
|
-
discussion: {
|
48
|
-
type: Object,
|
49
|
-
required: true,
|
50
|
-
},
|
51
|
-
isReply: {
|
52
|
-
type: Boolean,
|
53
|
-
default: false,
|
54
|
-
},
|
55
|
-
});
|
56
|
-
|
57
|
-
const translations = {
|
58
|
-
core: {
|
59
|
-
shared: I18n.t("core.shared"),
|
60
|
-
}
|
61
|
-
}
|
62
|
-
|
63
|
-
// · this variable is used to show the reply form.
|
64
|
-
const isReplyActive = ref(false)
|
65
|
-
|
66
|
-
// · implement store
|
67
|
-
const discussionStore = useCloudObjectDiscussionStore()
|
68
|
-
|
69
|
-
// · computed property that returns the discussion or activity log content that will be displayed in the component's element.
|
70
|
-
const getDiscussionContent = computed(() => {
|
71
|
-
|
72
|
-
if (props.discussion.type === 'activityLog' && props.discussion?.category == 'action_create_notification') return `${props.discussion.description}`
|
73
|
-
|
74
|
-
if (props.discussion.type === 'activityLog') return `${props.discussion.field_name}: (${props.discussion.value_from}) - (${props.discussion.value_to})`
|
75
|
-
|
76
|
-
if (props.discussion.type === 'discussion' || props.isReply) return props.discussion.content
|
77
|
-
})
|
78
|
-
|
79
|
-
/**
|
80
|
-
* @description This function is called when user clicks on discussion's delete button.
|
81
|
-
*/
|
82
|
-
const onDeleteDiscussion = () => {
|
83
|
-
discussionStore.deleteDiscussion(props.discussion.id)
|
84
|
-
}
|
85
|
-
|
86
|
-
/**
|
87
|
-
* @description This function shows and hides the reply form.
|
88
|
-
*/
|
89
|
-
const showReply = () => {
|
90
|
-
isReplyActive.value = !isReplyActive.value
|
91
|
-
}
|
92
|
-
</script>
|
93
|
-
|
94
|
-
<template>
|
95
|
-
<div class="discussion-content">
|
96
|
-
<div class="discussion-content-item pt-4 px-4">
|
97
|
-
<div class="avatar mr-4">
|
98
|
-
<lesli-avatar :name="props.discussion.user_name"/>
|
99
|
-
</div>
|
100
|
-
<div class="info mt-2">
|
101
|
-
<!-- Discussion's header -->
|
102
|
-
<p>
|
103
|
-
<span class="has-text-weight-bold">{{ props.discussion.user_name }}</span>
|
104
|
-
<span v-if="props.discussion.type !== 'discussion'" class="ml-4">{{ props.discussion.category }}</span>
|
105
|
-
</p>
|
106
|
-
|
107
|
-
|
108
|
-
<!-- Discussion's content -->
|
109
|
-
<p class="mt-2 has-text-weight-bold">{{ getDiscussionContent }}</p>
|
110
|
-
|
111
|
-
<!-- Discussion's footer -->
|
112
|
-
<div class="mt-4 pb-2 is-flex is-align-items-center">
|
113
|
-
<span class="mr-6">{{ props.discussion.created_at }}</span>
|
114
|
-
<template v-if="props.discussion.type === 'discussion' || props.isReply">
|
115
|
-
<button @click="onDeleteDiscussion" v-if="discussionStore.currentUserId === discussion.users_id" class="is-transparent button mr-4 has-text-weight-bold has-text-danger">
|
116
|
-
{{ translations.core.shared.view_btn_delete }}
|
117
|
-
</button>
|
118
|
-
<button @click="showReply" v-if="!props.isReply" class="is-transparent button has-text-weight-bold has-text-primary">
|
119
|
-
{{ translations.core.shared.view_btn_reply }}
|
120
|
-
</button>
|
121
|
-
</template>
|
122
|
-
</div>
|
123
|
-
|
124
|
-
<!-- Reply component to answer a discussion -->
|
125
|
-
<new-comment is-reply v-if="isReplyActive" :main-discussion="props.discussion" @on-add-comment="showReply"></new-comment>
|
126
|
-
|
127
|
-
<!-- Replies are defined in the content component -->
|
128
|
-
<slot name="replies"></slot>
|
129
|
-
</div>
|
130
|
-
</div>
|
131
|
-
</div>
|
132
|
-
</template>
|
@@ -1,113 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Lesli
|
3
|
-
|
4
|
-
Copyright (c) 2023, Lesli Technologies, S. A.
|
5
|
-
|
6
|
-
This program is free software: you can redistribute it and/or modify
|
7
|
-
it under the terms of the GNU General Public License as published by
|
8
|
-
the Free Software Foundation, either version 3 of the License, or
|
9
|
-
(at your option) any later version.
|
10
|
-
|
11
|
-
This program is distributed in the hope that it will be useful,
|
12
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14
|
-
GNU General Public License for more details.
|
15
|
-
|
16
|
-
You should have received a copy of the GNU General Public License
|
17
|
-
along with this program. If not, see http://www.gnu.org/licenses/.
|
18
|
-
|
19
|
-
Lesli · Ruby on Rails SaaS Development Framework.
|
20
|
-
|
21
|
-
Made with ♥ by https://www.lesli.tech
|
22
|
-
Building a better future, one line of code at a time.
|
23
|
-
|
24
|
-
@contact hello@lesli.tech
|
25
|
-
@website https://www.lesli.tech
|
26
|
-
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
27
|
-
|
28
|
-
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
29
|
-
// ·
|
30
|
-
*/
|
31
|
-
|
32
|
-
|
33
|
-
// ·
|
34
|
-
import { defineStore } from "pinia";
|
35
|
-
|
36
|
-
|
37
|
-
// ·
|
38
|
-
export const useAccount = defineStore("account", {
|
39
|
-
state: () => {
|
40
|
-
return {
|
41
|
-
accountInfo: {},
|
42
|
-
options: {
|
43
|
-
countries: [],
|
44
|
-
regions: [],
|
45
|
-
time_zones: []
|
46
|
-
}
|
47
|
-
}
|
48
|
-
},
|
49
|
-
actions: {
|
50
|
-
|
51
|
-
fetch (){
|
52
|
-
this.loading = true
|
53
|
-
this.http.get(this.url.admin("account")).then(result => {
|
54
|
-
this.accountInfo = result
|
55
|
-
delete this.accountInfo.created_at
|
56
|
-
delete this.accountInfo.updated_at
|
57
|
-
delete this.accountInfo.phone_number_2
|
58
|
-
delete this.accountInfo.phone_number_3
|
59
|
-
delete this.accountInfo.phone_number_4
|
60
|
-
}).catch(error => {
|
61
|
-
this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
|
62
|
-
}).finally(() => {
|
63
|
-
this.loading = false
|
64
|
-
})
|
65
|
-
},
|
66
|
-
|
67
|
-
update() {
|
68
|
-
this.submitting_form = true
|
69
|
-
this.http.patch(this.url.admin("account"), {
|
70
|
-
account: this.accountInfo
|
71
|
-
}).then(result => {
|
72
|
-
this.msg.success(I18n.t("core.users.messages_success_operation"))
|
73
|
-
}).catch(error => {
|
74
|
-
this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
|
75
|
-
}).finally(() => {
|
76
|
-
this.fetch()
|
77
|
-
})
|
78
|
-
},
|
79
|
-
getOptions (){
|
80
|
-
this.loading = true
|
81
|
-
this.http.get(this.url.admin("account/options")).then(result => {
|
82
|
-
this.options.countries = result.countries.map((country)=> {
|
83
|
-
return {
|
84
|
-
label: country.name,
|
85
|
-
value: country.id
|
86
|
-
}
|
87
|
-
} )
|
88
|
-
this.options.regions = result.regions.map((region)=> {
|
89
|
-
return {
|
90
|
-
label: region.value,
|
91
|
-
value: region.key
|
92
|
-
}
|
93
|
-
} )
|
94
|
-
}).catch(error => {
|
95
|
-
this.msg.danger(this.translations.core.shared.messages_danger_internal_error)
|
96
|
-
}).finally(() => {
|
97
|
-
this.loading = false
|
98
|
-
})
|
99
|
-
// Get options for time zone selection
|
100
|
-
this.http.get(this.url.admin("account/settings/options")).then(result => {
|
101
|
-
this.options.time_zones = result.time_zones.map((time_zone)=> {
|
102
|
-
return {
|
103
|
-
label: time_zone.text,
|
104
|
-
value: time_zone.value
|
105
|
-
}
|
106
|
-
} )
|
107
|
-
}).catch(error => {
|
108
|
-
this.msg.danger(this.translations.core.shared.messages_danger_internal_error)
|
109
|
-
})
|
110
|
-
}
|
111
|
-
|
112
|
-
},
|
113
|
-
});
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|