create stub handlers for admin functionnality
This commit is contained in:
parent
ea796999d4
commit
b34c217d98
@ -40,6 +40,10 @@ func routes(app *config.AppConfig) http.Handler {
|
||||
mux.Route("/admin", func(mux chi.Router) {
|
||||
mux.Use(Auth)
|
||||
mux.Get("/dashboard", handlers.Repo.AdminDashboard)
|
||||
|
||||
mux.Get("/reservations-new", handlers.Repo.AdminNewReservations)
|
||||
mux.Get("/reservations-all", handlers.Repo.AdminAllReservations)
|
||||
mux.Get("/reservations-calendar", handlers.Repo.AdminReservationsCalendar)
|
||||
})
|
||||
|
||||
return mux
|
||||
|
@ -506,3 +506,15 @@ func (m *Repository) Logout(w http.ResponseWriter, r *http.Request) {
|
||||
func (m *Repository) AdminDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
render.Template(w, r, "admin-dashboard.page.tmpl", &models.TemplateData{})
|
||||
}
|
||||
|
||||
func (m *Repository) AdminNewReservations(w http.ResponseWriter, r *http.Request) {
|
||||
render.Template(w, r, "admin-new-reservations.page.tmpl", &models.TemplateData{})
|
||||
}
|
||||
|
||||
func (m *Repository) AdminAllReservations(w http.ResponseWriter, r *http.Request) {
|
||||
render.Template(w, r, "admin-all-reservations.page.tmpl", &models.TemplateData{})
|
||||
}
|
||||
|
||||
func (m *Repository) AdminReservationsCalendar(w http.ResponseWriter, r *http.Request) {
|
||||
render.Template(w, r, "admin-reservations-calendar.page.tmpl", &models.TemplateData{})
|
||||
}
|
||||
|
12
templates/admin-all-reservations.page.tmpl
Normal file
12
templates/admin-all-reservations.page.tmpl
Normal file
@ -0,0 +1,12 @@
|
||||
{{template "admin" .}}
|
||||
|
||||
{{define "page-title"}}
|
||||
All Reservations
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="col-md-12">
|
||||
All Reservations content
|
||||
</div>
|
||||
{{end}}
|
||||
|
12
templates/admin-new-reservations.page.tmpl
Normal file
12
templates/admin-new-reservations.page.tmpl
Normal file
@ -0,0 +1,12 @@
|
||||
{{template "admin" .}}
|
||||
|
||||
{{define "page-title"}}
|
||||
New Reservations
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="col-md-12">
|
||||
New Reservations content
|
||||
</div>
|
||||
{{end}}
|
||||
|
11
templates/admin-reservations-calendar.page.tmpl
Normal file
11
templates/admin-reservations-calendar.page.tmpl
Normal file
@ -0,0 +1,11 @@
|
||||
{{template "admin" .}}
|
||||
|
||||
{{define "page-title"}}
|
||||
Reservations Calendar
|
||||
{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="col-md-12">
|
||||
Reservations calendar content
|
||||
</div>
|
||||
{{end}}
|
@ -72,7 +72,7 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/admin/reservation-calendar">
|
||||
<a class="nav-link" href="/admin/reservations-calendar">
|
||||
<i class="ti-layout-list-post menu-icon"></i>
|
||||
<span class="menu-title">Reservation Canlendar</span>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user