mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
- Squawks: defer an inoperative item under 91.213(d) once each condition is confirmed (pilots may too); deferred items stop grounding and are listed for awareness. Resolving can record the fix as a logbook entry (43.9 fields) or link an existing one - Expiration dates on components (ELT battery, 91.207(c)) and documents; new document types (registration, airworthiness certificate, insurance, radio license). Expired replacement-critical parts and an expired registration (91.203) ground; others warn; registration warns 90 days out - Standard inspections: one click adds annual, 100-hour, 91.411, 91.413, ELT (91.207(d)) and VOR (91.171) checks with the right rules, skipping ones already tracked and linking annual to 100-hour - Weekly Monday reminder email to owners when something needs attention; profile opt-out; admin "send me this week's reminder" - README feature table updated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
3.1 KiB
ERB
53 lines
3.1 KiB
ERB
<h1 class="mb-4 text-2xl font-bold">Your Profile</h1>
|
|
<%= form_with model: @user, url: profile_path, method: :patch, class: "card card-body space-y-4 max-w-md" do |f| %>
|
|
<%= f.errors_summary %>
|
|
<%= f.field :name %>
|
|
<%= f.field :email_address, as: :email, label: "Email" %>
|
|
<%= f.field :reminder_emails, as: :checkbox, label: "Weekly maintenance reminders",
|
|
hint: "A Monday email about overdue and upcoming inspections, ADs, parts and documents on aircraft you own. Only sent when something needs attention#{' (once email is set up)' unless MailSettings.configured?}." %>
|
|
<%= f.field :password, as: :password, label: "New password", hint: "Leave blank to keep your current password.", autocomplete: "new-password" %>
|
|
<%= f.field :password_confirmation, as: :password, label: "Confirm new password", autocomplete: "new-password" %>
|
|
<div>
|
|
<%= label_tag "user[current_password]", "Current password", class: "label" %>
|
|
<%= password_field_tag "user[current_password]", nil, id: "user_current_password", class: "input", autocomplete: "current-password" %>
|
|
<p class="hint">Needed to change your email or password.<%= " Signed up with #{Sso.label} and never set one? Use “Forgot password?” on the sign-in page." if Sso.enabled? && @user.sso_uid? %></p>
|
|
</div>
|
|
<%= f.submit "Save" %>
|
|
<% end %>
|
|
|
|
<% if Sso.enabled? %>
|
|
<section class="card card-body mt-5 max-w-md">
|
|
<h2 class="card-title">Single sign-on</h2>
|
|
<% if @user.sso_uid? %>
|
|
<p class="mt-1 text-sm text-slate-600">Your account is linked to <%= Sso.label %>; you can sign in with it.</p>
|
|
<% if Sso.password_login? %>
|
|
<div class="mt-3"><%= button_to "Unlink #{Sso.label}", sso_link_path, method: :delete, class: "btn-secondary btn-sm",
|
|
form: { data: { turbo_confirm: "Unlink #{Sso.label}? You'll sign in with your email and password." } } %></div>
|
|
<% end %>
|
|
<% else %>
|
|
<p class="mt-1 text-sm text-slate-600">Link your <%= Sso.label %> account to sign in with it.</p>
|
|
<div class="mt-3"><%= button_to "Link #{Sso.label}", "/auth/#{Sso::PROVIDER}", class: "btn-secondary btn-sm", data: { turbo: false } %></div>
|
|
<% end %>
|
|
</section>
|
|
<% end %>
|
|
|
|
<section class="card card-body mt-5 max-w-md">
|
|
<h2 class="card-title">Sessions</h2>
|
|
<% others = @user.sessions.where.not(id: Current.session.id).count %>
|
|
<p class="mt-1 text-sm text-slate-600">
|
|
You're signed in on <%= pluralize(others, "other device or browser", plural: "other devices or browsers") %>.
|
|
Sessions unused for <%= Authentication::SESSION_IDLE_TIMEOUT.inspect %> sign out on their own.
|
|
</p>
|
|
<% if others.positive? %>
|
|
<div class="mt-3"><%= button_to "Sign out everywhere else", other_sessions_path, method: :delete, class: "btn-secondary btn-sm" %></div>
|
|
<% end %>
|
|
</section>
|
|
|
|
<section class="card card-body mt-5 max-w-md">
|
|
<h2 class="card-title">Integrations</h2>
|
|
<p class="mt-1 text-sm text-slate-600">
|
|
<%= link_to "AirTrail sync", air_trail_connection_path, class: "link" %>:
|
|
<%= current_user.air_trail_connection&.enabled? ? "on" : "off" %>. Push the flights you log to your AirTrail flight map automatically.
|
|
</p>
|
|
</section>
|