Its been a while

This commit is contained in:
Jason Jordan
2026-07-23 10:32:51 -04:00
parent 5a90ea6e14
commit 56009fa158
70 changed files with 686 additions and 147 deletions
+17
View File
@@ -0,0 +1,17 @@
<%= form_with(model: provider, class: "contents") do |form| %>
<% if provider.errors.any? %>
<div id="error_explanation" class="bg-red-50 text-red-500 px-3 py-2 font-medium rounded-md mt-3">
<h2><%= pluralize(provider.errors.count, "error") %> prohibited this provider from being saved:</h2>
<ul class="list-disc ml-6">
<% provider.errors.each do |error| %>
<li><%= error.full_message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="inline">
<%= form.submit class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white inline-block font-medium cursor-pointer" %>
</div>
<% end %>
+2
View File
@@ -0,0 +1,2 @@
<div id="<%= dom_id provider %>" class="w-full sm:w-auto my-5 space-y-5">
</div>
@@ -0,0 +1,2 @@
json.extract! provider, :id, :created_at, :updated_at
json.url provider_url(provider, format: :json)
+10
View File
@@ -0,0 +1,10 @@
<% content_for :title, "Editing provider" %>
<div class="md:w-2/3 w-full">
<h1 class="font-bold text-4xl">Editing provider</h1>
<%= render "form", provider: @provider %>
<%= link_to "Show this provider", @provider, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
</div>
+29
View File
@@ -0,0 +1,29 @@
<% content_for :title, "Providers" %>
<div class="w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
<% end %>
<div class="flex justify-between items-center">
<h1 class="font-bold text-4xl">Providers</h1>
<%= link_to "New provider", new_provider_path, class: "rounded-md px-3.5 py-2.5 bg-blue-600 hover:bg-blue-500 text-white block font-medium" %>
</div>
<div id="providers" class="min-w-full divide-y divide-gray-200 space-y-5">
<% if @providers.any? %>
<% @providers.each do |provider| %>
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
<%= render provider %>
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
<%= link_to "Show", provider, class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= link_to "Edit", edit_provider_path(provider), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= button_to "Destroy", provider, method: :delete, class: "w-full sm:w-auto rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
</div>
</div>
<% end %>
<% else %>
<p class="text-center my-10">No providers found.</p>
<% end %>
</div>
</div>
+1
View File
@@ -0,0 +1 @@
json.array! @providers, partial: "providers/provider", as: :provider
+9
View File
@@ -0,0 +1,9 @@
<% content_for :title, "New provider" %>
<div class="md:w-2/3 w-full">
<h1 class="font-bold text-4xl">New provider</h1>
<%= render "form", provider: @provider %>
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
</div>
+15
View File
@@ -0,0 +1,15 @@
<% content_for :title, "Showing provider" %>
<div class="md:w-2/3 w-full">
<% if notice.present? %>
<p class="py-2 px-3 bg-green-50 mb-5 text-green-500 font-medium rounded-md inline-block" id="notice"><%= notice %></p>
<% end %>
<h1 class="font-bold text-4xl">Showing provider</h1>
<%= render @provider %>
<%= link_to "Edit this provider", edit_provider_path(@provider), class: "w-full sm:w-auto text-center rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= link_to "Back to providers", providers_path, class: "w-full sm:w-auto text-center mt-2 sm:mt-0 sm:ml-2 rounded-md px-3.5 py-2.5 bg-gray-100 hover:bg-gray-50 inline-block font-medium" %>
<%= button_to "Destroy this provider", @provider, method: :delete, form_class: "sm:inline-block mt-2 sm:mt-0 sm:ml-2", class: "w-full rounded-md px-3.5 py-2.5 text-white bg-red-600 hover:bg-red-500 font-medium cursor-pointer", data: { turbo_confirm: "Are you sure?" } %>
</div>
+1
View File
@@ -0,0 +1 @@
json.partial! "providers/provider", provider: @provider