lesli_driver 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +5 -0
- data/app/assets/config/lesli_driver_manifest.js +40 -0
- data/app/assets/images/lesli_driver/driver-logo.svg +101 -0
- data/app/assets/javascripts/lesli_driver/application.js +1 -0
- data/app/assets/stylesheets/lesli_driver/application.scss +96 -0
- data/app/controllers/lesli_driver/application_controller.rb +4 -0
- data/app/controllers/lesli_driver/dashboards_controller.rb +60 -0
- data/app/helpers/lesli_driver/application_helper.rb +4 -0
- data/app/helpers/lesli_driver/dashboards_helper.rb +4 -0
- data/app/jobs/lesli_driver/application_job.rb +4 -0
- data/app/mailers/lesli_driver/application_mailer.rb +6 -0
- data/app/models/lesli_driver/application_record.rb +5 -0
- data/app/models/lesli_driver/dashboard.rb +4 -0
- data/app/views/lesli_driver/dashboards/_dashboard.html.erb +2 -0
- data/app/views/lesli_driver/dashboards/_form.html.erb +17 -0
- data/app/views/lesli_driver/dashboards/edit.html.erb +10 -0
- data/app/views/lesli_driver/dashboards/index.html.erb +14 -0
- data/app/views/lesli_driver/dashboards/new.html.erb +9 -0
- data/app/views/lesli_driver/dashboards/show.html.erb +1 -0
- data/app/views/lesli_driver/partials/_engine-navigation.html.erb +37 -0
- data/config/routes.rb +36 -0
- data/db/migrate/20231007030328_create_lesli_driver_dashboards.rb +8 -0
- data/db/migrate/v1.0/0301000110_create_lesli_driver_accounts.rb +40 -0
- data/db/migrate/v1.0/0301100110_create_lesli_driver_calendars.rb +46 -0
- data/db/migrate/v1.0/0301110110_create_lesli_driver_events.rb +57 -0
- data/db/seed/development.rb +54 -0
- data/db/seed/production.rb +17 -0
- data/db/seed/test.rb +17 -0
- data/db/seeds.rb +25 -0
- data/db/tables/0301010210_create_lesli_driver_catalog_event_types.rb +14 -0
- data/db/tables/0301110310_create_lesli_driver_event_actions.rb +16 -0
- data/db/tables/0301110410_create_lesli_driver_event_activities.rb +15 -0
- data/db/tables/0301110510_create_lesli_driver_event_discussions.rb +17 -0
- data/db/tables/0301110610_create_lesli_driver_event_files.rb +16 -0
- data/db/tables/0301110710_create_lesli_driver_event_subscribers.rb +16 -0
- data/db/tables/0301111010_create_lesli_driver_event_attendants.rb +13 -0
- data/lib/lesli_driver/engine.rb +51 -0
- data/lib/lesli_driver/version.rb +4 -0
- data/lib/lesli_driver.rb +6 -0
- data/lib/tasks/lesli_driver_tasks.rake +4 -0
- data/lib/vue/application.js +46 -0
- data/lib/vue/apps/calendar/show.vue +34 -0
- data/lib/vue/components/agenda.vue +108 -0
- data/lib/vue/components/calendar.vue +143 -0
- data/lib/vue/components/event.vue +97 -0
- data/lib/vue/components/form.vue +143 -0
- data/lib/vue/components/guests.vue +148 -0
- data/lib/vue/stores/calendar.js +246 -0
- data/lib/vue/stores/event.js +53 -0
- data/lib/vue/stores/guests.js +213 -0
- data/license +674 -0
- data/readme.md +67 -0
- metadata +112 -0
@@ -0,0 +1,96 @@
|
|
1
|
+
|
2
|
+
// ·
|
3
|
+
@import "lesli/templates/dashboards";
|
4
|
+
|
5
|
+
|
6
|
+
// ·
|
7
|
+
$driver-color: #3689e6;
|
8
|
+
$focus-color: #28bca3;
|
9
|
+
$help-color: #a56de2;
|
10
|
+
|
11
|
+
|
12
|
+
// ·
|
13
|
+
#driver-calendar {
|
14
|
+
background-color: white;
|
15
|
+
box-shadow: $lesli-box-shadow;
|
16
|
+
|
17
|
+
.fc-header-toolbar {
|
18
|
+
height: 0px !important;
|
19
|
+
margin-bottom: 0;
|
20
|
+
h2 {
|
21
|
+
color: transparent;
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
// remove outside border of the calendar grid
|
26
|
+
.fc-scrollgrid {
|
27
|
+
border: none !important;
|
28
|
+
|
29
|
+
// calendar header (day names)
|
30
|
+
.fc-scrollgrid-section-header {
|
31
|
+
|
32
|
+
.fc-col-header-cell {
|
33
|
+
padding: .8rem 0;
|
34
|
+
text-align: center;
|
35
|
+
border-left-width: 0;
|
36
|
+
border-right-width: 0;
|
37
|
+
a {
|
38
|
+
color: lesli-css-color(silver, 900)
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
.fc-scrollgrid-section-body {
|
45
|
+
|
46
|
+
// grid of days of the month
|
47
|
+
.fc-daygrid-day {
|
48
|
+
|
49
|
+
// Day number
|
50
|
+
.fc-daygrid-day-top .fc-daygrid-day-number {
|
51
|
+
padding: 5px 10px;
|
52
|
+
}
|
53
|
+
|
54
|
+
// change current day indicator
|
55
|
+
&.fc-day-today .fc-daygrid-day-top .fc-daygrid-day-number {
|
56
|
+
color: $lesli-color-primary;
|
57
|
+
font-weight: 800;
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
// event in the calendar
|
62
|
+
.fc-daygrid-event {
|
63
|
+
border: none;
|
64
|
+
margin-left: 0;
|
65
|
+
margin-bottom: .2rem;
|
66
|
+
border-radius: 3px;
|
67
|
+
|
68
|
+
padding-left: 4px;
|
69
|
+
border-left: 5px solid $driver-color;
|
70
|
+
background-color: lighten($driver-color, 40);
|
71
|
+
|
72
|
+
.fc-event-title {
|
73
|
+
text-transform: capitalize;
|
74
|
+
color: darken($driver-color, 30);
|
75
|
+
font-family: "Open Sans", "Helvetica Neue", "Helvetica", "Arial", "sans-serif", sans-serif;
|
76
|
+
}
|
77
|
+
|
78
|
+
// ticket events
|
79
|
+
&.cloud-help-tickets {
|
80
|
+
border-left-color: $help-color;
|
81
|
+
background-color: lighten($help-color, 32);
|
82
|
+
.event-title { color: darken($help-color, 30) }
|
83
|
+
}
|
84
|
+
|
85
|
+
|
86
|
+
// focus events
|
87
|
+
&.cloud-focus-tasks {
|
88
|
+
border-left-color: $focus-color;
|
89
|
+
background-color: lighten($focus-color, 48 );
|
90
|
+
.event-title { color: darken($focus-color, 30) }
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module LesliDriver
|
2
|
+
class DashboardsController < ApplicationController
|
3
|
+
#before_action :set_dashboard, only: %i[ show edit update destroy ]
|
4
|
+
|
5
|
+
# GET /dashboards
|
6
|
+
def index
|
7
|
+
@dashboards = Dashboard.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /dashboards/1
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /dashboards/new
|
15
|
+
def new
|
16
|
+
@dashboard = Dashboard.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /dashboards/1/edit
|
20
|
+
def edit
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /dashboards
|
24
|
+
def create
|
25
|
+
@dashboard = Dashboard.new(dashboard_params)
|
26
|
+
|
27
|
+
if @dashboard.save
|
28
|
+
redirect_to @dashboard, notice: "Dashboard was successfully created."
|
29
|
+
else
|
30
|
+
render :new, status: :unprocessable_entity
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# PATCH/PUT /dashboards/1
|
35
|
+
def update
|
36
|
+
if @dashboard.update(dashboard_params)
|
37
|
+
redirect_to @dashboard, notice: "Dashboard was successfully updated.", status: :see_other
|
38
|
+
else
|
39
|
+
render :edit, status: :unprocessable_entity
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# DELETE /dashboards/1
|
44
|
+
def destroy
|
45
|
+
@dashboard.destroy
|
46
|
+
redirect_to dashboards_url, notice: "Dashboard was successfully destroyed.", status: :see_other
|
47
|
+
end
|
48
|
+
|
49
|
+
private
|
50
|
+
# Use callbacks to share common setup or constraints between actions.
|
51
|
+
def set_dashboard
|
52
|
+
@dashboard = Dashboard.find(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Only allow a list of trusted parameters through.
|
56
|
+
def dashboard_params
|
57
|
+
params.fetch(:dashboard, {})
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_with(model: dashboard) do |form| %>
|
2
|
+
<% if dashboard.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%= pluralize(dashboard.errors.count, "error") %> prohibited this dashboard from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% dashboard.errors.each do |error| %>
|
8
|
+
<li><%= error.full_message %></li>
|
9
|
+
<% end %>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<div>
|
15
|
+
<%= form.submit %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<p style="color: green"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Dashboards</h1>
|
4
|
+
|
5
|
+
<div id="dashboards">
|
6
|
+
<% @dashboards.each do |dashboard| %>
|
7
|
+
<%= render dashboard %>
|
8
|
+
<p>
|
9
|
+
<%= link_to "Show this dashboard", dashboard %>
|
10
|
+
</p>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= link_to "New dashboard", new_dashboard_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<router-view></router-view>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<%
|
2
|
+
=begin
|
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 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://www.lesli.tech
|
28
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
29
|
+
|
30
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
31
|
+
// ·
|
32
|
+
=end
|
33
|
+
%>
|
34
|
+
|
35
|
+
<%#= navigation_item(lesli_babel.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
|
36
|
+
<%= navigation_item(lesli_driver.dashboard_path, "Calendar", "ri-calendar-2-fill") %>
|
37
|
+
<%= navigation_item(lesli_driver.dashboard_path, "Events", "ri-map-pin-2-line") %>
|
data/config/routes.rb
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
32
|
+
|
33
|
+
LesliDriver::Engine.routes.draw do
|
34
|
+
root to: "dashboards#show"
|
35
|
+
resource :dashboard, only: [:show]
|
36
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
32
|
+
class CreateLesliDriverAccounts < ActiveRecord::Migration[6.0]
|
33
|
+
def change
|
34
|
+
create_table :lesli_driver_accounts do |t|
|
35
|
+
t.datetime :deleted_at, index: true
|
36
|
+
t.timestamps
|
37
|
+
end
|
38
|
+
add_reference(:lesli_driver_accounts, :account, foreign_key: { to_table: :lesli_accounts })
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
32
|
+
class CreateLesliDriverCalendars < ActiveRecord::Migration[6.0]
|
33
|
+
def change
|
34
|
+
create_table :lesli_driver_calendars do |t|
|
35
|
+
t.string :name
|
36
|
+
t.string :color, default: "0d52bf"
|
37
|
+
|
38
|
+
# acts_as_paranoid
|
39
|
+
t.datetime :deleted_at, index: true
|
40
|
+
t.timestamps
|
41
|
+
end
|
42
|
+
|
43
|
+
add_reference(:lesli_driver_calendars, :user, foreign_key: { to_table: :lesli_users })
|
44
|
+
add_reference(:lesli_driver_calendars, :account, foreign_key: { to_table: :lesli_driver_accounts })
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
32
|
+
class CreateLesliDriverEvents < ActiveRecord::Migration[6.0]
|
33
|
+
def change
|
34
|
+
create_table :lesli_driver_events do |t|
|
35
|
+
t.string :title, required: true
|
36
|
+
t.string :description
|
37
|
+
t.date :date
|
38
|
+
t.time :start
|
39
|
+
t.time :end
|
40
|
+
t.string :url
|
41
|
+
t.string :location
|
42
|
+
t.string :status # proposal, draft
|
43
|
+
t.boolean :public
|
44
|
+
|
45
|
+
t.datetime :deleted_at, index: true
|
46
|
+
t.timestamps
|
47
|
+
end
|
48
|
+
|
49
|
+
add_reference(:lesli_driver_events, :account, foreign_key: { to_table: :lesli_accounts })
|
50
|
+
add_reference(:lesli_driver_events, :calendar, foreign_key: { to_table: :lesli_driver_calendars })
|
51
|
+
add_reference(:lesli_driver_events, :user, foreign_key: { to_table: :lesli_users })
|
52
|
+
|
53
|
+
#add_reference(:cloud_driver_events, :assign, foreign_key: { to_table: :users })
|
54
|
+
#add_reference(:cloud_driver_events, :type, foreign_key: { to_table: :cloud_driver_catalog_event_types})
|
55
|
+
#add_reference(:cloud_driver_events, :model, polymorphic: true)
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Copyright (c) 2023, 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
|
+
=end
|
18
|
+
|
19
|
+
|
20
|
+
# delete all the existing events
|
21
|
+
CloudDriver::Event.all.delete_all
|
22
|
+
|
23
|
+
# create demo events for all the users
|
24
|
+
# NOTE: There is bug in the service, it does not use the user calendar to create the event
|
25
|
+
#User.all.each do |current_user|
|
26
|
+
|
27
|
+
current_user = User.first
|
28
|
+
|
29
|
+
# create 10 events for every user
|
30
|
+
10.times do |days|
|
31
|
+
|
32
|
+
date = days.days.from_now
|
33
|
+
|
34
|
+
CloudDriver::EventServices.create(current_user,
|
35
|
+
:title => Faker::Fantasy::Tolkien.character,
|
36
|
+
:description => Faker::Fantasy::Tolkien.poem,
|
37
|
+
:event_date => date,
|
38
|
+
:time_start => date,
|
39
|
+
:time_end => date,
|
40
|
+
:location => Faker::Fantasy::Tolkien.location
|
41
|
+
)
|
42
|
+
|
43
|
+
date = days.days.ago
|
44
|
+
|
45
|
+
CloudDriver::EventServices.create(current_user,
|
46
|
+
:title => Faker::Fantasy::Tolkien.character,
|
47
|
+
:description => Faker::Fantasy::Tolkien.poem,
|
48
|
+
:event_date => date,
|
49
|
+
:time_start => date,
|
50
|
+
:time_end => date,
|
51
|
+
:location => Faker::Fantasy::Tolkien.location
|
52
|
+
)
|
53
|
+
end
|
54
|
+
#end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Copyright (c) 2023, 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
|
+
=end
|
data/db/seed/test.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Copyright (c) 2023, 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
|
+
=end
|
data/db/seeds.rb
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
=begin
|
2
|
+
|
3
|
+
Copyright (c) 2023, 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
|
+
=end
|
18
|
+
|
19
|
+
|
20
|
+
# IMPORTANT: Seed files are only for development, if you need to create default resources for production
|
21
|
+
# you must use the initializer method in the Engine account model
|
22
|
+
if Rails.env.development?
|
23
|
+
L2.msg("Loading seeds for CloudDriver environment", "Version: #{CloudDriver::VERSION}", "Build: #{CloudDriver::BUILD}")
|
24
|
+
load CloudDriver::Engine.root.join("db", "seed", "#{ Rails.env.downcase }.rb")
|
25
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
class CreateCloudDriverCatalogEventTypes < ActiveRecord::Migration[6.1]
|
2
|
+
def change
|
3
|
+
create_table :cloud_driver_catalog_event_types do |t|
|
4
|
+
t.string :name
|
5
|
+
t.string :model_type, index: true
|
6
|
+
|
7
|
+
# acts_as_paranoid
|
8
|
+
t.datetime :deleted_at, index: true
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_reference(:cloud_driver_catalog_event_types, :account, foreign_key: { to_table: :cloud_driver_accounts })
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class CreateCloudDriverEventActions < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000003_actions.json')))
|
4
|
+
create_table :cloud_driver_event_actions do |t|
|
5
|
+
table_base_structure.each do |column|
|
6
|
+
t.send(
|
7
|
+
column["type"].parameterize.underscore.to_sym,
|
8
|
+
column["name"].parameterize.underscore.to_sym
|
9
|
+
)
|
10
|
+
end
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
add_reference :cloud_driver_event_actions, :users, foreign_key: true
|
14
|
+
add_reference :cloud_driver_event_actions, :cloud_driver_events, foreign_key: true, index: { name: "driver_event_actions_events" }
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateCloudDriverEventActivities < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
table_base_structure = JSON.parse(File.read(Rails.root.join('db','structure','00000004_activities.json')))
|
4
|
+
create_table :cloud_driver_event_activities do |t|
|
5
|
+
table_base_structure.each do |column|
|
6
|
+
t.send(
|
7
|
+
column["type"].parameterize.underscore.to_sym,
|
8
|
+
column["name"].parameterize.underscore.to_sym
|
9
|
+
)
|
10
|
+
end
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
add_reference :cloud_driver_event_activities, :cloud_driver_events, foreign_key: true
|
14
|
+
end
|
15
|
+
end
|