mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 23:50:36 -05:00
Calendar feed: due items (inspections, ADs, component limits, documents) as a private iCalendar link, hour-based dates projected from the past year's flying
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
87e30946fe
commit
98e943cf0a
14 files changed
+266
-7
No files matched your search
@@ -46,6 +46,23 @@
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<section class="card card-body mt-5 max-w-md" id="calendar">
|
||||
<h2 class="card-title">Calendar feed</h2>
|
||||
<p class="mt-1 text-sm text-slate-600">What's coming due on your aircraft (inspections, ADs, part replacements and limits, expiring documents) in your calendar app. Items due by hours get a date projected from the past year's flying; it updates on its own.</p>
|
||||
<% if @user.calendar_token.present? %>
|
||||
<% feed = "#{Sso.app_url}#{calendar_feed_path(@user.calendar_token)}" %>
|
||||
<input class="input mt-3 font-mono text-xs" value="<%= feed %>" readonly aria-label="Calendar feed address">
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<%= link_to "Subscribe", feed.sub(%r{\Ahttps?://}, "webcal://"), class: "btn-secondary btn-sm" %>
|
||||
<%= button_to "Make a new link", calendar_token_path, class: "btn-secondary btn-sm",
|
||||
form: { data: { turbo_confirm: "Replace the calendar link? Calendars using the old one stop updating." } } %>
|
||||
</div>
|
||||
<p class="hint">Anyone with this link can see the due list, so keep it private. In Google Calendar: Other calendars → From URL. On an iPhone: tap Subscribe.</p>
|
||||
<% else %>
|
||||
<div class="mt-3"><%= button_to "Create calendar link", calendar_token_path, class: "btn-secondary btn-sm" %></div>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
<section class="card card-body mt-5 max-w-md" id="certificates">
|
||||
<h2 class="card-title">Certificates</h2>
|
||||
<p class="mt-1 text-sm text-slate-600">Your FAA certificates, for signing logbook entries: “Sign as” fills in your name, the kind of certificate and its number.</p>
|
||||
|
||||
Reference in new issue
Block a user