Employers working - onboarding to card print
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<div id="<%= dom_id card_rx %>" class="w-full sm:w-auto my-5 space-y-5">
|
||||
<div>
|
||||
<strong class="block font-medium mb-1">Help desk:</strong>
|
||||
<%= card_rx.help_desk %>
|
||||
</div>
|
||||
<div>
|
||||
<strong class="block font-medium mb-1">Customer service:</strong>
|
||||
<%= card_rx.customer_service %>
|
||||
</div>
|
||||
<div>
|
||||
<strong class="block font-medium mb-1">Web url:</strong>
|
||||
<%= card_rx.web_url %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,2 @@
|
||||
json.extract! card_rx, :id, :help_desk, :customer_service, :web_url, :created_at, :updated_at
|
||||
json.url card_rx_url(card_rx, format: :json)
|
||||
@@ -0,0 +1,32 @@
|
||||
<%= form_with(model: card_rx, class: "contents") do |form| %>
|
||||
<% if card_rx.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(card_rx.errors.count, "error") %> prohibited this card_rx from being saved:</h2>
|
||||
|
||||
<ul class="list-disc ml-6">
|
||||
<% card_rx.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :help_desk %>
|
||||
<%= form.text_field :help_desk, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:help_desk].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:help_desk].any?}] %>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :customer_service %>
|
||||
<%= form.text_field :customer_service, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:customer_service].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:customer_service].any?}] %>
|
||||
</div>
|
||||
|
||||
<div class="my-5">
|
||||
<%= form.label :web_url %>
|
||||
<%= form.text_field :web_url, class: ["block shadow-sm rounded-md border px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": card_rx.errors[:web_url].none?, "border-red-400 focus:outline-red-600": card_rx.errors[:web_url].any?}] %>
|
||||
</div>
|
||||
|
||||
<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 %>
|
||||
@@ -0,0 +1,10 @@
|
||||
<% content_for :title, "Editing card rx" %>
|
||||
|
||||
<div class="md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">Editing card rx</h1>
|
||||
|
||||
<%= render "form", card_rx: @card_rx %>
|
||||
|
||||
<%= link_to "Show this card rx", @card_rx, 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 card rxes", card_rxes_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>
|
||||
@@ -0,0 +1,29 @@
|
||||
<% content_for :title, "Card rxes" %>
|
||||
|
||||
<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">Card rxes</h1>
|
||||
<%= link_to "New card rx", new_card_rx_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="card_rxes" class="min-w-full divide-y divide-gray-200 space-y-5">
|
||||
<% if @card_rxes.any? %>
|
||||
<% @card_rxes.each do |card_rx| %>
|
||||
<div class="flex flex-col sm:flex-row justify-between items-center pb-5 sm:pb-0">
|
||||
<%= render card_rx %>
|
||||
<div class="w-full sm:w-auto flex flex-col sm:flex-row space-x-2 space-y-2">
|
||||
<%= link_to "Show", card_rx, 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_card_rx_path(card_rx), 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", card_rx, 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 card rxes found.</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
json.array! @card_rxes, partial: "card_rxes/card_rx", as: :card_rx
|
||||
@@ -0,0 +1,9 @@
|
||||
<% content_for :title, "New card rx" %>
|
||||
|
||||
<div class="md:w-2/3 w-full">
|
||||
<h1 class="font-bold text-4xl">New card rx</h1>
|
||||
|
||||
<%= render "form", card_rx: @card_rx %>
|
||||
|
||||
<%= link_to "Back to card rxes", card_rxes_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>
|
||||
@@ -0,0 +1,15 @@
|
||||
<% content_for :title, "Showing card rx" %>
|
||||
|
||||
<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 card rx</h1>
|
||||
|
||||
<%= render @card_rx %>
|
||||
|
||||
<%= link_to "Edit this card rx", edit_card_rx_path(@card_rx), 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 card rxes", card_rxes_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 card rx", @card_rx, 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>
|
||||
@@ -0,0 +1 @@
|
||||
json.partial! "card_rxes/card_rx", card_rx: @card_rx
|
||||
Reference in New Issue
Block a user