automation and view updates

This commit is contained in:
Jason Jordan
2026-04-17 15:35:10 -04:00
parent 247a075c9c
commit 7ab1143db8
30 changed files with 124704 additions and 602 deletions
+109 -22
View File
@@ -1,33 +1,120 @@
<div class="bg-deepcove h-full w-full flex flex-col justify-start">
<div class="flex items-center">
<h1 class="font-bold text-4xl text-platinum my-5">Employers</h1>
<%= link_to new_employer_path, class: "flex justify-center items-center h-8 w-8 ml-2 mb-6 text-sm text-bronze bg-deepcove hover:bg-cobalt font-semibold p-1 rounded-lg border-2 border-cobalt" do %>
<%= link_to new_employer_path, class: "flex justify-center items-center h-8 w-8 ml-2 mb-6 text-sm text-bronze bg-deepcove hover:bg-cobalt font-semibold p-1 -l border-2 border-cobalt" do %>
<%= icon "clipboard-plus", library: "lucide" %>
<% end %>
</div>
<% plan_colors = IdCard::Setup::FORM_COLORS.push('copper', 'bronze').shuffle %>
<% @color_index = 0 %>
<h2 class="font-bold text-3xl text-brightlava my-5">In Process:</h2>
<% @employers.inactive.each_with_index do |emp, index| %>
<% item_color_index = @color_index == 0 ? 0 : @color_index % plan_colors.length %>
<div class="w-1/2 flex text-2xl text-platinum font-bold px-4 py-4 ml-10 space-x-4 rounded-lg border-l-5 border-b-2 <%= "border-#{plan_colors[item_color_index]}" %>">
<%= link_to emp.name, employer_path(emp.slug), class: "hover:text-#{plan_colors[item_color_index]}" %>
<div>
<%= "(Effective #{emp.effective_date})" %>
</div>
<% if @not_automation_ready.present? || @missing_keychain_initialization.present? || @missing_plans_initialization.present? || @missing_members_initialization.present? %>
<h2 class="font-bold text-3xl text-brightlava my-5">In Process:</h2>
<% no_employers_text = @not_automation_ready.present? ? "" : " NONE" %>
<h3 class="font-bold text-xl text-bronze my-5 ml-10">
<%= "Waiting for Groups Number/Pl Plan Key:#{no_employers_text}" %>
</h2>
<div class="flex flex-wrap w-full pl-20 pr-10 gap-x-4 gap-y-3">
<% @not_automation_ready.each_with_index do |emp, index| %>
<div class="w-[23%] inline-flex flex-col text-platinum font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-bronze">
<div class="w-full flex text-xl">
<%= link_to emp.name, employer_path(emp.slug), class: "text-bronze hover:text-platinum" %>
</div>
<div class="w-full flex text-md font-medium">
<%= "(Effective #{emp.effective_date})" %>
</div>
</div>
<% end %>
</div>
<% no_employers_text = @missing_keychain_initialization.present? ? "" : " NONE" %>
<h3 class="font-bold text-xl text-verdigris-vivid my-5 ml-10">
<%= "Waiting for Employer to be created in VHCS:#{no_employers_text}" %>
</h2>
<div class="flex flex-wrap w-full pl-20 pr-10 gap-x-4 gap-y-3">
<% @missing_keychain_initialization.each_with_index do |emp, index| %>
<div class="w-[23%] inline-flex flex-col text-platinum font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-verdigris-vivid">
<div class="w-full flex text-xl">
<%= link_to emp.name, employer_path(emp.slug), class: "text-verdigris-vivid hover:text-platinum" %>
</div>
<div class="w-full flex text-md font-medium">
<%= "(Effective #{emp.effective_date})" %>
</div>
</div>
<% end %>
</div>
<% no_employers_text = @missing_plans_initialization.present? ? "" : " NONE" %>
<h3 class="font-bold text-xl text-copper my-5 ml-10">
<%= "Waiting for Plans to be created in VHCS:#{no_employers_text}" %>
</h2>
<div class="flex flex-wrap w-full pl-20 pr-10 gap-x-4 gap-y-3">
<% @missing_plans_initialization.each_with_index do |emp, index| %>
<div class="w-[23%] inline-flex flex-col text-platinum font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-copper">
<div class="w-full flex text-xl">
<%= link_to emp.name, employer_path(emp.slug), class: "text-copper hover:text-platinum" %>
</div>
<div class="w-full flex text-md font-medium">
<%= "(Effective #{emp.effective_date})" %>
</div>
</div>
<% end %>
</div>
<% no_employers_text = @missing_members_initialization.present? ? "" : " NONE" %>
<h3 class="font-bold text-xl text-bluemana my-5 ml-10">
<%= "Waiting for Inital Members to be created in VHCS:#{no_employers_text}" %>
</h2>
<div class="flex flex-wrap w-full pl-20 pr-10 gap-x-4 gap-y-3">
<% @missing_members_initialization.each_with_index do |emp, index| %>
<div class="w-[32%] inline-flex flex-col text-platinum font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-bluemana">
<div class="w-full flex">
<%= link_to emp.name, employer_path(emp.slug), class: "text-bluemana hover:text-platinum" %>
</div>
<div class="w-full flex justify-between text-md font-medium">
<% member_counter_color = "text-".concat(emp.members.present? ? "limegreen" : "brightlava") %>
<div>
Members:
<span class="ml-2 <%= member_counter_color %>">
<%= emp.members.count %>
</span>
</div>
<div class="ml-2">
<%= "(Effective #{emp.effective_date})" %>
</div>
</div>
</div>
<% end %>
</div>
<% @color_index += 1 %>
<% end %>
<h2 class="font-bold text-3xl text-limegreen my-5">Live:</h2>
<% @employers.active.each_with_index do |emp, index| %>
<% item_color_index = @color_index == 0 ? 0 : @color_index % plan_colors.length %>
<div class="w-1/2 flex text-2xl text-platinum font-bold px-4 py-4 ml-10 space-x-4 rounded-lg border-l-5 border-b-2 <%= "border-#{plan_colors[item_color_index]}" %>">
<%= link_to "(#{emp.pl_plan_key}) - #{emp.name}", employer_path(emp.slug), class: "hover:text-#{plan_colors[item_color_index]}" %>
<div>
<%= "(#{emp.members.count} Members)" %>
<div class="flex flex-wrap w-full px-10 gap-x-4 gap-y-3">
<% @active_with_active_id_card_setup.order(:name).each_with_index do |emp, index| %>
<div class="w-[23%] inline-flex flex-col text-platinum font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-atmosphere">
<div class="w-full flex text-xl space-x-4">
<%= link_to emp.name, employer_path(emp.slug), class: "text-atmosphere hover:text-platinum" %>
</div>
<div class="w-full flex text-md font-medium space-x-2">
<div>
Members:
<span class="ml-2">
<%= emp.members.count %>
</span>
</div>
</div>
</div>
</div>
<% @color_index += 1 %>
<% end %>
<% end %>
</div>
<h2 class="font-bold text-3xl text-[#ADADAD] my-5">Deactivated:</h2>
<div class="flex flex-wrap w-full px-10 gap-x-4 gap-y-3">
<% @deactivated.each_with_index do |emp, index| %>
<div class="w-[23%] inline-flex flex-col text-[#ADADAD] font-bold px-4 rounded-l-lg border-l-5 border-b-2 border-[#ADADAD]">
<div class="w-full flex text-xl space-x-4">
<%= link_to emp.name, employer_path(emp.slug), class: "text-platinum hover:text-bluemana" %>
</div>
<div class="w-full flex text-md font-medium space-x-2">
<div>
Members:
<span class="ml-2">
<%= emp.members.count %>
</span>
</div>
</div>
</div>
<% end %>
</div>
</div>
+3
View File
@@ -84,6 +84,9 @@
<%= link_to "General", employer_id_card_setup_index_path(employer_id: @employer.slug), data: { turbo: false }, class: "flex justify-center items-center w-full cursor-pointer bg-#{module_color} hover:bg-deepcove border-2 border-#{module_color} text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
<%= link_to "Plans", plans_employer_id_card_setup_index_path(employer_id: @employer.slug), data: { turbo: false }, class: "flex justify-center items-center w-full cursor-pointer bg-#{module_color} hover:bg-deepcove border-2 border-#{module_color} text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
<%= link_to 'Exceptions (Optional)', field_exceptions_employer_id_card_setup_index_path(employer_id: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-full cursor-pointer bg-#{module_color} hover:bg-deepcove border-2 border-#{module_color} text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
<% unless @employer.id_card_setup.active %>
<%= link_to 'Activate ID Cards', update_active_status_employer_id_card_setup_index_path(employer_id: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-full cursor-pointer bg-brightlava hover:bg-deepcove border-2 border-brightlava text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
<% end %>
</div>
</div>
<div class="grow-1 flex flex-col items-center w-full">