go-htmx-gsd #1
3 changed files with 473 additions and 316 deletions
|
|
@ -122,7 +122,7 @@ func (h *AuthHandler) GetTablosPage() http.HandlerFunc {
|
|||
|
||||
func (h *AuthHandler) GetPlanningPage() http.HandlerFunc {
|
||||
return h.renderAppPage("/planning", func(user PublicUser) templ.Component {
|
||||
return views.PlanningMainContent()
|
||||
return views.PlanningMainContent(views.NewPlanningTabData())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -159,8 +159,46 @@ templ TablosMainContent() {
|
|||
@AppSectionMainContent("Projets", "Gardez une vue claire sur vos tablos, leur état d'avancement et les prochaines décisions à prendre.")
|
||||
}
|
||||
|
||||
templ PlanningMainContent() {
|
||||
@AppSectionMainContent("Planning", "Visualisez le rythme de l'équipe, les jalons à venir et les arbitrages de charge.")
|
||||
templ PlanningMainContent(data PlanningTabData) {
|
||||
<div class="p-6">
|
||||
<section class="overview-section">
|
||||
<div class="overview-section-heading">
|
||||
<div>
|
||||
<h1>Planning</h1>
|
||||
</div>
|
||||
<div>
|
||||
<span class="text-sm text-slate-500">{ data.DateRange }</span>
|
||||
</div>
|
||||
</div>
|
||||
if len(data.Events) == 0 {
|
||||
@ui.EmptyState(ui.EmptyStateProps{
|
||||
Title: "No events in this range",
|
||||
Description: "Use the navigation controls to browse another 14-day window.",
|
||||
Icon: ui.UIIcon("calendar"),
|
||||
})
|
||||
} else {
|
||||
<div>
|
||||
for i, event := range data.Events {
|
||||
if PlanningShowDaySeparator(data.Events, i) {
|
||||
<div data-day-separator="true" class="px-4 py-2 text-center text-sm text-slate-500">
|
||||
{ event.DateLabel }
|
||||
</div>
|
||||
}
|
||||
<div class="flex items-start gap-4 border-b border-slate-100 py-3">
|
||||
<span class="w-20 shrink-0 text-sm text-slate-500">{ event.TimeRange }</span>
|
||||
<span class="grow font-medium text-slate-800">{ event.Title }</span>
|
||||
<span class="text-sm text-slate-500">
|
||||
{ event.TabloTitle }
|
||||
if event.Location != "" {
|
||||
· { event.Location }
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</section>
|
||||
</div>
|
||||
}
|
||||
|
||||
templ ChatMainContent(data DiscussionTabData) {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue