lesli_driver 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/lesli_driver/application.js +3388 -1
- data/app/assets/javascripts/lesli_driver/application.js.LICENSE.txt +282 -0
- data/app/controllers/lesli_driver/calendars_controller.rb +71 -0
- data/app/controllers/lesli_driver/events_controller.rb +60 -0
- data/app/helpers/lesli_driver/calendars_helper.rb +4 -0
- data/app/helpers/lesli_driver/events_helper.rb +4 -0
- data/app/models/lesli_driver/account.rb +37 -0
- data/app/models/lesli_driver/calendar.rb +4 -0
- data/app/models/lesli_driver/event.rb +4 -0
- data/app/views/lesli_driver/calendars/_calendar.html.erb +2 -0
- data/app/views/lesli_driver/calendars/_form.html.erb +17 -0
- data/app/views/lesli_driver/calendars/edit.html.erb +10 -0
- data/app/views/lesli_driver/calendars/index.html.erb +14 -0
- data/app/views/lesli_driver/calendars/new.html.erb +9 -0
- data/app/views/lesli_driver/calendars/show.html.erb +1 -0
- data/app/views/lesli_driver/events/_event.html.erb +2 -0
- data/app/views/lesli_driver/events/_form.html.erb +17 -0
- data/app/views/lesli_driver/events/edit.html.erb +10 -0
- data/app/views/lesli_driver/events/index.html.erb +1 -0
- data/app/views/lesli_driver/events/new.html.erb +9 -0
- data/app/views/lesli_driver/events/show.html.erb +10 -0
- data/app/views/lesli_driver/partials/_engine-navigation.html.erb +2 -2
- data/config/locales/translations.en.yml +2 -0
- data/config/locales/translations.es.yml +2 -0
- data/config/routes.rb +6 -0
- data/lib/lesli_driver/version.rb +2 -2
- data/lib/vue/application.js +6 -2
- data/lib/vue/apps/calendars/show.vue +79 -0
- data/lib/vue/apps/events/index.vue +48 -0
- data/lib/vue/components/agenda.vue +24 -10
- data/lib/vue/components/calendar.vue +26 -9
- data/lib/vue/components/event.vue +9 -59
- data/lib/vue/components/form.vue +4 -4
- data/lib/vue/stores/calendar.js +1 -3
- data/lib/vue/stores/{event.js → events.js} +2 -2
- data/lib/vue/stores/translations.json +2 -0
- data/readme.md +6 -2
- metadata +29 -6
- data/db/migrate/20231007030328_create_lesli_driver_dashboards.rb +0 -8
- data/lib/vue/apps/calendar/show.vue +0 -34
@@ -0,0 +1,282 @@
|
|
1
|
+
/*
|
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
|
+
|
35
|
+
Lesli
|
36
|
+
|
37
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
38
|
+
|
39
|
+
This program is free software: you can redistribute it and/or modify
|
40
|
+
it under the terms of the GNU General Public License as published by
|
41
|
+
the Free Software Foundation, either version 3 of the License, or
|
42
|
+
(at your option) any later version.
|
43
|
+
|
44
|
+
This program is distributed in the hope that it will be useful,
|
45
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
46
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
47
|
+
GNU General Public License for more details.
|
48
|
+
|
49
|
+
You should have received a copy of the GNU General Public License
|
50
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
51
|
+
|
52
|
+
Lesli · Your Smart Business Assistant.
|
53
|
+
|
54
|
+
Made with ♥ by https://www.lesli.tech
|
55
|
+
Building a better future, one line of code at a time.
|
56
|
+
|
57
|
+
@contact hello@lesli.tech
|
58
|
+
@website https://lesli.tech
|
59
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
60
|
+
|
61
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
62
|
+
// ·
|
63
|
+
|
64
|
+
*/
|
65
|
+
|
66
|
+
/*
|
67
|
+
|
68
|
+
Lesli
|
69
|
+
|
70
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
71
|
+
|
72
|
+
This program is free software: you can redistribute it and/or modify
|
73
|
+
it under the terms of the GNU General Public License as published by
|
74
|
+
the Free Software Foundation, either version 3 of the License, or
|
75
|
+
(at your option) any later version.
|
76
|
+
|
77
|
+
This program is distributed in the hope that it will be useful,
|
78
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
79
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
80
|
+
GNU General Public License for more details.
|
81
|
+
|
82
|
+
You should have received a copy of the GNU General Public License
|
83
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
84
|
+
|
85
|
+
Lesli · Your Smart Business Assistant.
|
86
|
+
|
87
|
+
Made with ♥ by https://www.lesli.tech
|
88
|
+
Building a better future, one line of code at a time.
|
89
|
+
|
90
|
+
@contact hello@lesli.tech
|
91
|
+
@website https://lesli.tech
|
92
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
93
|
+
|
94
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
95
|
+
// ·
|
96
|
+
*/
|
97
|
+
|
98
|
+
/*
|
99
|
+
Lesli
|
100
|
+
|
101
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
102
|
+
|
103
|
+
This program is free software: you can redistribute it and/or modify
|
104
|
+
it under the terms of the GNU General Public License as published by
|
105
|
+
the Free Software Foundation, either version 3 of the License, or
|
106
|
+
(at your option) any later version.
|
107
|
+
|
108
|
+
This program is distributed in the hope that it will be useful,
|
109
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
110
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
111
|
+
GNU General Public License for more details.
|
112
|
+
|
113
|
+
You should have received a copy of the GNU General Public License
|
114
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
115
|
+
|
116
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
117
|
+
|
118
|
+
Made with ♥ by https://www.lesli.tech
|
119
|
+
Building a better future, one line of code at a time.
|
120
|
+
|
121
|
+
@contact hello@lesli.tech
|
122
|
+
@website https://www.lesli.dev
|
123
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
124
|
+
|
125
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
126
|
+
// ·
|
127
|
+
*/
|
128
|
+
|
129
|
+
/*
|
130
|
+
Lesli
|
131
|
+
|
132
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
133
|
+
|
134
|
+
This program is free software: you can redistribute it and/or modify
|
135
|
+
it under the terms of the GNU General Public License as published by
|
136
|
+
the Free Software Foundation, either version 3 of the License, or
|
137
|
+
(at your option) any later version.
|
138
|
+
|
139
|
+
This program is distributed in the hope that it will be useful,
|
140
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
141
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
142
|
+
GNU General Public License for more details.
|
143
|
+
|
144
|
+
You should have received a copy of the GNU General Public License
|
145
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
146
|
+
|
147
|
+
Lesli · Ruby on Rails SaaS development platform.
|
148
|
+
|
149
|
+
Made with ♥ by https://www.lesli.tech
|
150
|
+
Building a better future, one line of code at a time.
|
151
|
+
|
152
|
+
@contact hello@lesli.tech
|
153
|
+
@website https://www.lesli.tech
|
154
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
155
|
+
|
156
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
157
|
+
// ·
|
158
|
+
*/
|
159
|
+
|
160
|
+
/*
|
161
|
+
Lesli
|
162
|
+
|
163
|
+
Copyright (c) 2020, Lesli Technologies, S. A.
|
164
|
+
|
165
|
+
This program is free software: you can redistribute it and/or modify
|
166
|
+
it under the terms of the GNU General Public License as published by
|
167
|
+
the Free Software Foundation, either version 3 of the License, or
|
168
|
+
(at your option) any later version.
|
169
|
+
|
170
|
+
This program is distributed in the hope that it will be useful,
|
171
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
172
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
173
|
+
GNU General Public License for more details.
|
174
|
+
|
175
|
+
You should have received a copy of the GNU General Public License
|
176
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
177
|
+
|
178
|
+
Lesli JS - JavaScript utilities for JavaScript applications
|
179
|
+
|
180
|
+
Powered by LesliTech
|
181
|
+
Building a better future, one line of code at a time.
|
182
|
+
|
183
|
+
@contact <hello@lesli.tech>
|
184
|
+
@website <https://lesli.tech>
|
185
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
186
|
+
|
187
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
188
|
+
// ·
|
189
|
+
*/
|
190
|
+
|
191
|
+
/*
|
192
|
+
Lesli
|
193
|
+
|
194
|
+
Copyright (c) 2021, Lesli Technologies, S. A.
|
195
|
+
|
196
|
+
This program is free software: you can redistribute it and/or modify
|
197
|
+
it under the terms of the GNU General Public License as published by
|
198
|
+
the Free Software Foundation, either version 3 of the License, or
|
199
|
+
(at your option) any later version.
|
200
|
+
|
201
|
+
This program is distributed in the hope that it will be useful,
|
202
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
203
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
204
|
+
GNU General Public License for more details.
|
205
|
+
|
206
|
+
You should have received a copy of the GNU General Public License
|
207
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
208
|
+
|
209
|
+
Lesli JS - JavaScript utilities for JavaScript applications
|
210
|
+
|
211
|
+
Powered by LesliTech
|
212
|
+
Building a better future, one line of code at a time.
|
213
|
+
|
214
|
+
@contact <hello@lesli.tech>
|
215
|
+
@website <https://lesli.tech>
|
216
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
217
|
+
|
218
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
219
|
+
// ·
|
220
|
+
*/
|
221
|
+
|
222
|
+
/*
|
223
|
+
Lesli
|
224
|
+
|
225
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
226
|
+
|
227
|
+
This program is free software: you can redistribute it and/or modify
|
228
|
+
it under the terms of the GNU General Public License as published by
|
229
|
+
the Free Software Foundation, either version 3 of the License, or
|
230
|
+
(at your option) any later version.
|
231
|
+
|
232
|
+
This program is distributed in the hope that it will be useful,
|
233
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
234
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
235
|
+
GNU General Public License for more details.
|
236
|
+
|
237
|
+
You should have received a copy of the GNU General Public License
|
238
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
239
|
+
|
240
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
241
|
+
|
242
|
+
Made with ♥ by https://www.lesli.tech
|
243
|
+
Building a better future, one line of code at a time.
|
244
|
+
|
245
|
+
@contact hello@lesli.tech
|
246
|
+
@website https://www.lesli.dev
|
247
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
248
|
+
|
249
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
250
|
+
// ·
|
251
|
+
*/
|
252
|
+
|
253
|
+
/*
|
254
|
+
Lesli
|
255
|
+
|
256
|
+
Copyright (c) 2023, Lesli Technologies, S. A.
|
257
|
+
|
258
|
+
This program is free software: you can redistribute it and/or modify
|
259
|
+
it under the terms of the GNU General Public License as published by
|
260
|
+
the Free Software Foundation, either version 3 of the License, or
|
261
|
+
(at your option) any later version.
|
262
|
+
|
263
|
+
This program is distributed in the hope that it will be useful,
|
264
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
265
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
266
|
+
GNU General Public License for more details.
|
267
|
+
|
268
|
+
You should have received a copy of the GNU General Public License
|
269
|
+
along with this program. If not, see http://www.gnu.org/licenses/.
|
270
|
+
|
271
|
+
Lesli · Ruby on Rails SaaS Development Framework.
|
272
|
+
|
273
|
+
Made with ♥ by https://www.lesli.tech
|
274
|
+
Building a better future, one line of code at a time.
|
275
|
+
|
276
|
+
@contact hello@lesli.tech
|
277
|
+
@website https://www.lesli.tech
|
278
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
279
|
+
|
280
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
281
|
+
// ·
|
282
|
+
*/
|
@@ -0,0 +1,71 @@
|
|
1
|
+
module LesliDriver
|
2
|
+
class CalendarsController < ApplicationController
|
3
|
+
before_action :set_calendar, only: [:show, :edit, :update]
|
4
|
+
|
5
|
+
# GET /calendars
|
6
|
+
def index
|
7
|
+
respond_to do |format|
|
8
|
+
format.html { }
|
9
|
+
format.json do
|
10
|
+
respond_with_pagination(CloudDriver::CalendarService.new(current_user).index(@query))
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
# GET /calendars/1
|
16
|
+
def show
|
17
|
+
respond_to do |format|
|
18
|
+
format.html { }
|
19
|
+
format.json { respond_with_successful() }
|
20
|
+
#format.json { respond_with_successful(@calendar.show(@query)) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# GET /calendars/new
|
25
|
+
def new
|
26
|
+
end
|
27
|
+
|
28
|
+
# GET /calendars/1/edit
|
29
|
+
def edit
|
30
|
+
end
|
31
|
+
|
32
|
+
# POST /calendars
|
33
|
+
def create
|
34
|
+
end
|
35
|
+
|
36
|
+
# PATCH/PUT /calendars/1
|
37
|
+
def update
|
38
|
+
end
|
39
|
+
|
40
|
+
# DELETE /calendars/1
|
41
|
+
def destroy
|
42
|
+
end
|
43
|
+
|
44
|
+
def options
|
45
|
+
respond_with_successful(Calendar.options(current_user, @query))
|
46
|
+
end
|
47
|
+
|
48
|
+
def sync
|
49
|
+
respond_with_successful(Calendar.sync(current_user))
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
# Sets the requested user based on the current_users's account
|
55
|
+
def set_calendar
|
56
|
+
|
57
|
+
# if params[:id].blank? || params[:id] == "default"
|
58
|
+
# @calendar = CloudDriver::CalendarService.new(current_user).default_calendar
|
59
|
+
# elsif params[:id]
|
60
|
+
# @calendar = CloudDriver::CalendarService.new(current_user).find(params[:id])
|
61
|
+
# end
|
62
|
+
|
63
|
+
# return respond_with_not_found unless @calendar
|
64
|
+
end
|
65
|
+
|
66
|
+
# Only allow a trusted parameter "white list" through.
|
67
|
+
def calendar_params
|
68
|
+
params.require(:calendar)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
module LesliDriver
|
2
|
+
class EventsController < ApplicationController
|
3
|
+
before_action :set_event, only: %i[ show edit update destroy ]
|
4
|
+
|
5
|
+
# GET /events
|
6
|
+
def index
|
7
|
+
@events = Event.all
|
8
|
+
end
|
9
|
+
|
10
|
+
# GET /events/1
|
11
|
+
def show
|
12
|
+
end
|
13
|
+
|
14
|
+
# GET /events/new
|
15
|
+
def new
|
16
|
+
@event = Event.new
|
17
|
+
end
|
18
|
+
|
19
|
+
# GET /events/1/edit
|
20
|
+
def edit
|
21
|
+
end
|
22
|
+
|
23
|
+
# POST /events
|
24
|
+
def create
|
25
|
+
@event = Event.new(event_params)
|
26
|
+
|
27
|
+
if @event.save
|
28
|
+
redirect_to @event, notice: "Event was successfully created."
|
29
|
+
else
|
30
|
+
render :new, status: :unprocessable_entity
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
# PATCH/PUT /events/1
|
35
|
+
def update
|
36
|
+
if @event.update(event_params)
|
37
|
+
redirect_to @event, notice: "Event was successfully updated.", status: :see_other
|
38
|
+
else
|
39
|
+
render :edit, status: :unprocessable_entity
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# DELETE /events/1
|
44
|
+
def destroy
|
45
|
+
@event.destroy
|
46
|
+
redirect_to events_url, notice: "Event 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_event
|
52
|
+
@event = Event.find(params[:id])
|
53
|
+
end
|
54
|
+
|
55
|
+
# Only allow a list of trusted parameters through.
|
56
|
+
def event_params
|
57
|
+
params.fetch(:event, {})
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,37 @@
|
|
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.dev
|
27
|
+
@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
|
28
|
+
|
29
|
+
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
|
30
|
+
// ·
|
31
|
+
=end
|
32
|
+
|
33
|
+
module LesliDriver
|
34
|
+
class Account < ApplicationRecord
|
35
|
+
belongs_to :account, class_name: "Lesli::Account"
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_with(model: calendar) do |form| %>
|
2
|
+
<% if calendar.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%= pluralize(calendar.errors.count, "error") %> prohibited this calendar from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% calendar.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>Calendars</h1>
|
4
|
+
|
5
|
+
<div id="calendars">
|
6
|
+
<% @calendars.each do |calendar| %>
|
7
|
+
<%= render calendar %>
|
8
|
+
<p>
|
9
|
+
<%= link_to "Show this calendar", calendar %>
|
10
|
+
</p>
|
11
|
+
<% end %>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<%= link_to "New calendar", new_calendar_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<router-view></router-view>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<%= form_with(model: event) do |form| %>
|
2
|
+
<% if event.errors.any? %>
|
3
|
+
<div style="color: red">
|
4
|
+
<h2><%= pluralize(event.errors.count, "error") %> prohibited this event from being saved:</h2>
|
5
|
+
|
6
|
+
<ul>
|
7
|
+
<% event.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 @@
|
|
1
|
+
<router-view></router-view>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<p style="color: green"><%= notice %></p>
|
2
|
+
|
3
|
+
<%= render @event %>
|
4
|
+
|
5
|
+
<div>
|
6
|
+
<%= link_to "Edit this event", edit_event_path(@event) %> |
|
7
|
+
<%= link_to "Back to events", events_path %>
|
8
|
+
|
9
|
+
<%= button_to "Destroy this event", @event, method: :delete %>
|
10
|
+
</div>
|
@@ -33,5 +33,5 @@ Building a better future, one line of code at a time.
|
|
33
33
|
%>
|
34
34
|
|
35
35
|
<%#= navigation_item(lesli_babel.dashboard_path, "Dashboard", "ri-dashboard-3-line"); %>
|
36
|
-
<%= navigation_item(lesli_driver.
|
37
|
-
<%= navigation_item(lesli_driver.
|
36
|
+
<%= navigation_item(lesli_driver.calendar_path, "Calendar", "ri-calendar-2-fill") %>
|
37
|
+
<%= navigation_item(lesli_driver.events_path, "Events", "ri-map-pin-2-line") %>
|
data/config/routes.rb
CHANGED
@@ -33,4 +33,10 @@ Building a better future, one line of code at a time.
|
|
33
33
|
LesliDriver::Engine.routes.draw do
|
34
34
|
root to: "dashboards#show"
|
35
35
|
resource :dashboard, only: [:show]
|
36
|
+
|
37
|
+
resource :calendar, only: [:show] do
|
38
|
+
end
|
39
|
+
|
40
|
+
resources :events, only: [:index, :create] do
|
41
|
+
end
|
36
42
|
end
|
data/lib/lesli_driver/version.rb
CHANGED
data/lib/vue/application.js
CHANGED
@@ -36,11 +36,15 @@ import application from "Lesli/application"
|
|
36
36
|
|
37
37
|
|
38
38
|
// · Import apps and components
|
39
|
-
import appCalendarShow from "LesliDriver/apps/
|
39
|
+
import appCalendarShow from "LesliDriver/apps/calendars/show.vue"
|
40
|
+
import appEventsIndex from "LesliDriver/apps/events/index.vue"
|
40
41
|
|
41
42
|
|
42
43
|
// ·
|
43
44
|
application("LesliDriver", [{
|
44
|
-
path: "/
|
45
|
+
path: "/calendar",
|
45
46
|
component: appCalendarShow
|
47
|
+
}, {
|
48
|
+
path: "/events",
|
49
|
+
component: appEventsIndex
|
46
50
|
}])
|