Halfway through table redesign, saving to revert to working version
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
<h1 class="font-bold text-4xl text-platinum my-5">Edit Employer</h1>
|
||||
<%= form_with model: @employer, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">General Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full items-end" data-controller="logo-upload">
|
||||
<div class="flex flex-col space-y-6 w-3/5">
|
||||
<div class="flex space-x-10">
|
||||
@@ -16,110 +12,21 @@
|
||||
<%= f.text_field :slug, label: { text: "Slug" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
|
||||
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
|
||||
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost"]), label: { text: "Provider Network" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex flex-col">
|
||||
<%= f.text_field :employer_logo_filename, data: { logo_upload_target: "logofield" }, class: "w-full rounded-r-none", readonly: true %>
|
||||
</div>
|
||||
<div class="flex items-center justify-center cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
|
||||
<label for="file_upload_input_employer" class="text-center cursor-pointer">
|
||||
<%= icon "image-plus", library: "lucide" %>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
|
||||
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
|
||||
</div>
|
||||
<%= f.file_field :add_or_update_logo, class: "hidden", id: "file_upload_input_employer", data: { logo_upload_target: "previewContainer", logo_upload_type_param: "employer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Plans Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>" >
|
||||
<div class="flex flex-wrap w-full" data-add-plan-target="container">
|
||||
<% @employer.plans.each_with_index do |plan, index| %>
|
||||
<%= f.fields_for :plans, plan, child_index: index do |plan_fields| %>
|
||||
<div class="inline-flex flex-col pr-6 w-1/4 relative pl-1" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>"></div>
|
||||
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
|
||||
<%= "Plan #{index + 1}" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan #{index + 1}", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-#{index % 2 == 1 ? 'bronze' : 'copper'} hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_tag "Add a Plan", class: "cursor-pointer text-2xl font-bold py-2 pr-6 mt-10 w-[calc(24%-1rem)] w-1/4 min-h-[940px] text-[#E0E0E0] rounded-lg font-medium border border-[#E0E0E0] bg-[#173057] hover:bg-transparent hover:shadow-[0_0_10px_3px_#93c5fd] transition-colors duration-150", data: { action: "add-plan#add", add_plan_target: "button" } %>
|
||||
<template data-add-plan-target="template">
|
||||
<%= f.fields_for :plans, @employer.build_plan_with_default_benefits, child_index: 'NEW_RECORD' do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 border-NEXT_COLOR"></div>
|
||||
<div class="font-bold text-2xl text-NEXT_COLOR -ml-[6px] z-2 w-full">
|
||||
<%= "Plan NEW_PLAN" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: "NEW_RECORD".to_i %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 text-NEXT_COLOR">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r bg-NEXT_SECONDARY_COLOR ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan NEW_PLAN", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Alternative Network Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
|
||||
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
|
||||
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-75 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-alt-network-logo-target="template">
|
||||
<%= f.fields_for :alternate_network_logos, AlternateNetworkLogo.new, child_index: 'NEW_RECORD' do |network_fields| %>
|
||||
<div class="flex flex-col my-8 mr-3 space-y-6 px-3" data-controller="add-network-exception" data-add-network-exception-parent-color-value="NEXT_SECONDARY_COLOR">
|
||||
<%= render 'alt_network_logo_fields', network_fields: network_fields, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
<div class="flex py-8 space-x-4">
|
||||
<%= f.submit "Submit" %>
|
||||
<%= f.submit "Save Employer" %>
|
||||
<%= link_to "Back", employer_path(@employer.slug), class: "flex justify-center items-center cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-sm h-10 transition duration-100" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,10 +13,6 @@
|
||||
</div>
|
||||
<%= form_with model: @employer, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6 pb-10">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">General Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full items-end" data-controller="logo-upload">
|
||||
<div class="flex flex-col space-y-6 w-2/5">
|
||||
<div class="flex space-x-10">
|
||||
@@ -31,105 +27,11 @@
|
||||
<div class="w-full">
|
||||
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost"]), label: { text: "Provider Network" }, data: { logo_upload_target: "network" }, class: "w-full" %>
|
||||
<%= f.hidden_field :single_card_template, value: @employer.single_card_template %>
|
||||
<%= f.hidden_field :default_network_logo, value: @employer.default_network_logo %>
|
||||
<%= f.hidden_field :card_provider_id, value: @employer.card_provider_id %>
|
||||
<%= f.hidden_field :card_rx_id, value: @employer.card_rx_id %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex">
|
||||
<div class="flex flex-col">
|
||||
<%= f.text_field :employer_logo_filename, label: { text: "Employer Logo" }, default: "No logo added", data: { logo_upload_target: "logofield" }, class: "w-full rounded-r-none", readonly: true %>
|
||||
</div>
|
||||
<div class="flex items-center justify-center self-end cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
|
||||
<label for="file_upload_input_employer" class="text-center cursor-pointer">
|
||||
<%= icon "image-plus", library: "lucide" %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
|
||||
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
|
||||
</div>
|
||||
<%= f.file_field :add_or_update_logo, class: "hidden", id: "file_upload_input_employer", data: { logo_upload_target: "previewContainer", logo_upload_type_param: "employer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Plans Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>" >
|
||||
<div class="flex flex-wrap w-full" data-add-plan-target="container">
|
||||
<% @employer.plans.each_with_index do |plan, index| %>
|
||||
<%= f.fields_for :plans, plan, child_index: index do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1 plan-item" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> "></div>
|
||||
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
|
||||
<%= "Plan #{index + 1}" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan #{index + 1}", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-copper hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-copper w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_tag "Add a Plan", class: "cursor-pointer text-2xl font-bold py-2 pr-6 mt-10 w-[calc(24%-1rem)] w-1/4 min-h-[940px] text-[#E0E0E0] rounded-lg font-medium border border-[#E0E0E0] bg-[#173057] hover:bg-transparent hover:shadow-[0_0_10px_3px_#93c5fd] transition-colors duration-150", data: { action: "add-plan#add", add_plan_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-plan-target="template">
|
||||
<%= f.fields_for :plans, @employer.build_plan_with_default_benefits, child_index: 'NEW_RECORD' do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1 plan-item" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 border-NEXT_COLOR"></div>
|
||||
<div class="font-bold text-2xl text-NEXT_COLOR -ml-[6px] z-2 w-full">
|
||||
<%= "Plan NEW_PLAN" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: "NEW_RECORD".to_i %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 text-NEXT_COLOR">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r bg-NEXT_SECONDARY_COLOR ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan NEW_PLAN", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Alternative Network Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
|
||||
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
|
||||
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-55 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-alt-network-logo-target="template">
|
||||
<%= f.fields_for :alternate_network_logos, AlternateNetworkLogo.new, child_index: 'NEW_RECORD' do |network_fields| %>
|
||||
<div class="flex flex-col my-8 mr-3 space-y-6 px-3 min-w-1/3 network-item" data-controller="logo-upload" data-add-network-exception-parent-color-value="NEXT_SECONDARY_COLOR">
|
||||
<%= render 'alt_network_logo_fields', network_fields: network_fields, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
<div class="py-8">
|
||||
<%= f.submit "Submit" %>
|
||||
<%= f.submit "Create New Employer" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
<div class="flex w-full items-center space-x-4">
|
||||
<h1 class="font-bold text-4xl text-platinum my-5"><%= @employer.name %></h1>
|
||||
<div class="h-[50px] max-w-[200px]">
|
||||
<%= image_tag image_card_logo_file_path(@employer.employer_logo_filename), class: "max-h-[50px] object-contain shadow-[0_0_10px_3px_#93c5fd]" %>
|
||||
<% if @employer&.id_card_setup&.id_card_employer_logo&.filename %>
|
||||
<%= image_tag image_id_card_employer_logo_path(@employer.id_card_setup.id_card_employer_logo.filename), class: "max-h-[50px] object-contain shadow-[0_0_10px_3px_#93c5fd]" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-6">
|
||||
@@ -29,17 +31,19 @@
|
||||
<%= attribute_value.present? ? attribute_value.to_s : "waiting" %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div>
|
||||
<strong class="text-atmosphere mr-2">└── Plans</strong>
|
||||
</div>
|
||||
<% @employer.plans.pluck(:title, :pb_product_key).each do |plan| %>
|
||||
<div class="ml-9">
|
||||
├── <%= plan.first %>
|
||||
<% if @employer&.id_card_setup&.id_card_plans %>
|
||||
<div>
|
||||
<strong class="text-atmosphere mr-2">└── Plans</strong>
|
||||
</div>
|
||||
<p class="ml-14 text-<%="#{plan.last.present? ? "limegreen" : "brightlava"}" %>">
|
||||
<strong class="text-platinum mr-2">└── PB Product Key:</strong>
|
||||
<%= plan.last.present? ? plan.last.to_s : "waiting" %>
|
||||
</p>
|
||||
<% @employer.id_card_setup.id_card_plans.pluck(:title, :pb_product_key).each do |plan| %>
|
||||
<div class="ml-9">
|
||||
├── <%= plan.first %>
|
||||
</div>
|
||||
<p class="ml-14 text-<%="#{plan.last.present? ? "limegreen" : "brightlava"}" %>">
|
||||
<strong class="text-platinum mr-2">└── PB Product Key:</strong>
|
||||
<%= plan.last.present? ? plan.last.to_s : "waiting" %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-full flex items-center space-x-2 mt-10 ml-14">
|
||||
@@ -53,10 +57,10 @@
|
||||
<h3 class="font-bold text-2xl text-bluemana">Actions</h3>
|
||||
<div class="h-[1px] w-2/3 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<%= link_to 'Generate Sample Cards', generate_sample_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for print)', generate_print_sample_id_cards_path(employer_slug: @employer.slug ),data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for display)', generate_mobile_display_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for download)', generate_full_page_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Sample Cards', generate_sample_id_card_print_data_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for print)', generate_print_id_card_print_data_path(employer_slug: @employer.slug ),data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for display)', generate_mobile_display_id_card_print_data_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for download)', generate_full_page_id_card_print_data_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,127 @@
|
||||
<div class="bg-deepcove h-full w-full flex flex-col">
|
||||
<h1 class="font-bold text-4xl text-platinum my-5">Edit Employer</h1>
|
||||
<%= form_with model: @employer, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">General Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full items-end" data-controller="logo-upload">
|
||||
<div class="flex flex-col space-y-6 w-3/5">
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :name, label: { text: "Employer Name" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :slug, label: { text: "Slug" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost"]), label: { text: "Provider Network" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex flex-col">
|
||||
<%= f.text_field :employer_logo_filename, data: { logo_upload_target: "logofield" }, class: "w-full rounded-r-none", readonly: true %>
|
||||
</div>
|
||||
<div class="flex items-center justify-center cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
|
||||
<label for="file_upload_input_employer" class="text-center cursor-pointer">
|
||||
<%= icon "image-plus", library: "lucide" %>
|
||||
</label>
|
||||
</div>
|
||||
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
|
||||
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
|
||||
</div>
|
||||
<%= f.file_field :add_or_update_logo, class: "hidden", id: "file_upload_input_employer", data: { logo_upload_target: "previewContainer", logo_upload_type_param: "employer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Plans Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>" >
|
||||
<div class="flex flex-wrap w-full" data-add-plan-target="container">
|
||||
<% @employer.plans.each_with_index do |plan, index| %>
|
||||
<%= f.fields_for :plans, plan, child_index: index do |plan_fields| %>
|
||||
<div class="inline-flex flex-col pr-6 w-1/4 relative pl-1" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>"></div>
|
||||
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
|
||||
<%= "Plan #{index + 1}" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan #{index + 1}", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-#{index % 2 == 1 ? 'bronze' : 'copper'} hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_tag "Add a Plan", class: "cursor-pointer text-2xl font-bold py-2 pr-6 mt-10 w-[calc(24%-1rem)] w-1/4 min-h-[940px] text-[#E0E0E0] rounded-lg font-medium border border-[#E0E0E0] bg-[#173057] hover:bg-transparent hover:shadow-[0_0_10px_3px_#93c5fd] transition-colors duration-150", data: { action: "add-plan#add", add_plan_target: "button" } %>
|
||||
<template data-add-plan-target="template">
|
||||
<%= f.fields_for :plans, @employer.build_plan_with_default_benefits, child_index: 'NEW_RECORD' do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 border-NEXT_COLOR"></div>
|
||||
<div class="font-bold text-2xl text-NEXT_COLOR -ml-[6px] z-2 w-full">
|
||||
<%= "Plan NEW_PLAN" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: "NEW_RECORD".to_i %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 text-NEXT_COLOR">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r bg-NEXT_SECONDARY_COLOR ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan NEW_PLAN", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Alternative Network Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
|
||||
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
|
||||
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-75 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-alt-network-logo-target="template">
|
||||
<%= f.fields_for :alternate_network_logos, AlternateNetworkLogo.new, child_index: 'NEW_RECORD' do |network_fields| %>
|
||||
<div class="flex flex-col my-8 mr-3 space-y-6 px-3" data-controller="add-network-exception" data-add-network-exception-parent-color-value="NEXT_SECONDARY_COLOR">
|
||||
<%= render 'alt_network_logo_fields', network_fields: network_fields, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
<div class="flex py-8 space-x-4">
|
||||
<%= f.submit "Submit" %>
|
||||
<%= link_to "Back", employer_path(@employer.slug), class: "flex justify-center items-center cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-sm h-10 transition duration-100" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,33 @@
|
||||
<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 %>
|
||||
<%= icon "clipboard-plus", library: "lucide" %>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
<% plan_colors = EmployerSetupPlansForm::PLAN_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>
|
||||
</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.name, employer_path(emp.slug), class: "hover:text-#{plan_colors[item_color_index]}" %>
|
||||
<div>
|
||||
<%= "(#{emp.members.count} Members)" %>
|
||||
</div>
|
||||
</div>
|
||||
<% @color_index += 1 %>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,136 @@
|
||||
<div class="bg-deepcove h-full w-full flex flex-col">
|
||||
<div class="flex justify-between">
|
||||
<h1 class="font-bold text-4xl text-platinum my-5">New Employer</h1>
|
||||
<%= form_with model: @employer, url: import_employers_path, data: { turbo: false }, local: true, multipart: true do |form| %>
|
||||
<div class="flex items-end space-x-4">
|
||||
<div class="flex flex-col">
|
||||
<%= form.label :import_from_word, 'ID Card Setup Word Doc', class: "block text-platinum font-bold mb-1 md:mb-0 pr-4" %>
|
||||
<%= form.file_field :import_from_word %>
|
||||
</div>
|
||||
<%= form.submit "Import", class: "h-[40px]" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<%= form_with model: @employer, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6 pb-10">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">General Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full items-end" data-controller="logo-upload">
|
||||
<div class="flex flex-col space-y-6 w-2/5">
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :name, label: { text: "Employer Name" }, data: { logo_upload_target: "employer" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost"]), label: { text: "Provider Network" }, data: { logo_upload_target: "network" }, class: "w-full" %>
|
||||
<%= f.hidden_field :single_card_template, value: @employer.single_card_template %>
|
||||
<%= f.hidden_field :default_network_logo, value: @employer.default_network_logo %>
|
||||
<%= f.hidden_field :card_provider_id, value: @employer.card_provider_id %>
|
||||
<%= f.hidden_field :card_rx_id, value: @employer.card_rx_id %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex">
|
||||
<div class="flex flex-col">
|
||||
<%= f.text_field :employer_logo_filename, label: { text: "Employer Logo" }, default: "No logo added", data: { logo_upload_target: "logofield" }, class: "w-full rounded-r-none", readonly: true %>
|
||||
</div>
|
||||
<div class="flex items-center justify-center self-end cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
|
||||
<label for="file_upload_input_employer" class="text-center cursor-pointer">
|
||||
<%= icon "image-plus", library: "lucide" %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
|
||||
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
|
||||
</div>
|
||||
<%= f.file_field :add_or_update_logo, class: "hidden", id: "file_upload_input_employer", data: { logo_upload_target: "previewContainer", logo_upload_type_param: "employer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Plans Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>" >
|
||||
<div class="flex flex-wrap w-full" data-add-plan-target="container">
|
||||
<% @employer.plans.each_with_index do |plan, index| %>
|
||||
<%= f.fields_for :plans, plan, child_index: index do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1 plan-item" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> "></div>
|
||||
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %> -ml-[6px] z-2 w-full">
|
||||
<%= "Plan #{index + 1}" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: index %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[index]}" %>">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan #{index + 1}", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-copper hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-copper w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_tag "Add a Plan", class: "cursor-pointer text-2xl font-bold py-2 pr-6 mt-10 w-[calc(24%-1rem)] w-1/4 min-h-[940px] text-[#E0E0E0] rounded-lg font-medium border border-[#E0E0E0] bg-[#173057] hover:bg-transparent hover:shadow-[0_0_10px_3px_#93c5fd] transition-colors duration-150", data: { action: "add-plan#add", add_plan_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-plan-target="template">
|
||||
<%= f.fields_for :plans, @employer.build_plan_with_default_benefits, child_index: 'NEW_RECORD' do |plan_fields| %>
|
||||
<div class="inline-flex flex-col justify-end pr-6 w-1/4 relative pl-1 plan-item" data-controller="benefits-template-picker">
|
||||
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 border-NEXT_COLOR"></div>
|
||||
<div class="font-bold text-2xl text-NEXT_COLOR -ml-[6px] z-2 w-full">
|
||||
<%= "Plan NEW_PLAN" %>
|
||||
</div>
|
||||
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: "NEW_RECORD".to_i %>
|
||||
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 text-NEXT_COLOR">
|
||||
Benefit Values
|
||||
</div>
|
||||
<div class="w-full h-[3px] rounded-r bg-NEXT_SECONDARY_COLOR ml-[3px]"></div>
|
||||
<%= plan_fields.fields_for :plan_benefits do |plan_benefits_fields| %>
|
||||
<%= render 'plan_benefits_fields', plan_benefits_fields: plan_benefits_fields %>
|
||||
<% end %>
|
||||
<div class="mt-4 pl-1">
|
||||
<%= plan_fields.hidden_field :_destroy %>
|
||||
<%= button_tag "Remove Plan NEW_PLAN", class: "cursor-pointer bg-deepcove hover:bg-brightlava text-xl font-bold text-NEXT_SECONDARY_COLOR hover:text-platinum py-2 px-4 font-semibold leading-tight rounded-lg border-3 border-NEXT_SECONDARY_COLOR w-full", data: { action: "add-plan#remove" } %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Alternative Network Information</h3>
|
||||
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
|
||||
<div class="flex flex-wrap w-full" data-add-alt-network-logo-target="container">
|
||||
<%= button_tag "Add a Regional Logo", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-55 my-8 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-alt-network-logo#add", add_alt_network_logo_target: "button" } %>
|
||||
</div>
|
||||
<template data-add-alt-network-logo-target="template">
|
||||
<%= f.fields_for :alternate_network_logos, AlternateNetworkLogo.new, child_index: 'NEW_RECORD' do |network_fields| %>
|
||||
<div class="flex flex-col my-8 mr-3 space-y-6 px-3 min-w-1/3 network-item" data-controller="logo-upload" data-add-network-exception-parent-color-value="NEXT_SECONDARY_COLOR">
|
||||
<%= render 'alt_network_logo_fields', network_fields: network_fields, f: f %>
|
||||
</div>
|
||||
<% end %>
|
||||
</template>
|
||||
</div>
|
||||
<div class="py-8">
|
||||
<%= f.submit "Submit" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
<div class="bg-deepcove text-platinum h-full w-full flex flex-col">
|
||||
<div class="flex w-full items-center space-x-4">
|
||||
<h1 class="font-bold text-4xl text-platinum my-5"><%= @employer.name %></h1>
|
||||
<div class="h-[50px] max-w-[200px]">
|
||||
<%= image_tag image_card_logo_file_path(@employer.employer_logo_filename), class: "max-h-[50px] object-contain shadow-[0_0_10px_3px_#93c5fd]" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-6">
|
||||
<div class="flex flex-col space-y-1 w-1/3">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="grow-0 font-bold text-2xl text-bluemana">Employer Information</h3>
|
||||
<div class="h-[1px] grow mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-1 ml-4">
|
||||
<p class="text-<%="#{@employer.active == false ? "brightlava" : "limegreen"}" %>">
|
||||
<strong class="text-platinum mr-2">└── Status:</strong>
|
||||
<%= @employer.active == false ? "inactive" : "active" %>
|
||||
</p>
|
||||
<p class="ml-9 text-bluemana">
|
||||
<strong class="text-platinum mr-2">├── Effective Date:</strong>
|
||||
<%= @employer.effective_date %>
|
||||
</p>
|
||||
<div>
|
||||
<strong class="text-atmosphere mr-2">└── Key Chain</strong>
|
||||
</div>
|
||||
<% @employer.attributes.with_indifferent_access.slice(:pl_plan_key, :company_pb_entity_key, :group_number).each do |attribute_name, attribute_value| %>
|
||||
<p class="ml-9 text-<%="#{attribute_value.present? ? "limegreen" : "brightlava"}" %>">
|
||||
<strong class="text-platinum mr-2">├── <%= attribute_name.titleize %>:</strong>
|
||||
<%= attribute_value.present? ? attribute_value.to_s : "waiting" %>
|
||||
</p>
|
||||
<% end %>
|
||||
<div>
|
||||
<strong class="text-atmosphere mr-2">└── Plans</strong>
|
||||
</div>
|
||||
<% @employer.plans.pluck(:title, :pb_product_key).each do |plan| %>
|
||||
<div class="ml-9">
|
||||
├── <%= plan.first %>
|
||||
</div>
|
||||
<p class="ml-14 text-<%="#{plan.last.present? ? "limegreen" : "brightlava"}" %>">
|
||||
<strong class="text-platinum mr-2">└── PB Product Key:</strong>
|
||||
<%= plan.last.present? ? plan.last.to_s : "waiting" %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="w-full flex items-center space-x-2 mt-10 ml-14">
|
||||
<%= link_to 'Edit', edit_employer_path(@employer.slug), class: "hover:text-atmosphere" %>
|
||||
<p>|</p>
|
||||
<%= link_to 'Back', employers_path, class: "hover:text-atmosphere" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col space-y-6 w-1/3">
|
||||
<div class="w-full flex items-center">
|
||||
<h3 class="font-bold text-2xl text-bluemana">Actions</h3>
|
||||
<div class="h-[1px] w-2/3 mt-2 bg-bluemana"></div>
|
||||
</div>
|
||||
<%= link_to 'Generate Sample Cards', generate_sample_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for print)', generate_print_sample_id_cards_path(employer_slug: @employer.slug ),data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for display)', generate_mobile_display_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
<%= link_to 'Generate Group Cards (for download)', generate_full_page_sample_id_cards_path(employer_slug: @employer.slug ), data: { turbo: false }, class: "flex justify-center items-center w-2/3 #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,34 @@
|
||||
<div class="bg-deepcove h-full w-full flex flex-col">
|
||||
<h1 class="font-bold text-4xl text-platinum my-5">Edit Employer</h1>
|
||||
<%= form_with model: @employer, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6">
|
||||
<div class="flex w-full items-end" data-controller="logo-upload">
|
||||
<div class="flex flex-col space-y-6 w-3/5">
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :name, label: { text: "Employer Name" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :slug, label: { text: "Slug" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :group_number, label: { text: "Group/Medical Number" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :pl_plan_key, label: { text: "Pl Plan Key" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :effective_date, label: { text: "Effective Date" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex py-8 space-x-4">
|
||||
<%= f.submit "Save Employer" %>
|
||||
<%= link_to "Back", employer_path(@employer.slug), class: "flex justify-center items-center cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-sm h-10 transition duration-100" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
@@ -0,0 +1,48 @@
|
||||
<div class="bg-deepcove h-full w-full flex flex-col">
|
||||
<div class="flex justify-between my-5 font-bold text-4xl">
|
||||
<h1 class="text-platinum">New ID Card Setup:</h1>
|
||||
<h1 class="text-verdigris">(<%= @employer.name %>)</h1>
|
||||
</div>
|
||||
<%= form_with model: @setup, local: true, multipart: true do |f| %>
|
||||
<div class="flex flex-col space-y-6 pb-10">
|
||||
<div class="flex w-full items-end" data-controller="logo-upload" data-logo-upload-logo-type-value="employer" data-logo-upload-employer-name-value=<%= @employer.name %>>
|
||||
<div class="flex flex-col space-y-6 w-2/5">
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.text_field :print_name, label: { text: "Print Name" }, class: "w-full" %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.text_field :rx_group_number, label: { text: "Rx Group Number" }, class: "w-full" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex space-x-10">
|
||||
<div class="w-full">
|
||||
<%= f.select :network_provider, options_for_select(["Cigna", "Medcost", "Other"]), { label: { text: "Provider Network" }, include_blank: "Select", class: "w-full" } %>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<%= f.select :card_template, options_for_select([["FairosRx", "FairosRxIDCard"], ["Tandemloc", "TandemlocIDCard"], ["smART", "SmartIDCard"], ["QRCode (Healthbus)", "QRCodeIDCard"]]), { label: { text: "Card Template" }, include_blank: "Select", class: "w-full" } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-end">
|
||||
<div class="flex">
|
||||
<div class="text-platinum">Employer Logo</div>
|
||||
<div class="flex items-center justify-center self-end cursor-pointer bg-atmosphere hover:bg-deepcove border-2 border-atmosphere text-platinum font-bold px-3 rounded-r h-10 transition duration-100">
|
||||
<label for="employer_logo_file" class="text-center cursor-pointer">
|
||||
<%= icon "image-plus", library: "lucide" %>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden flex justify-center ml-15 rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
|
||||
<img data-logo-upload-target="preview" src="#" alt="Employer Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
|
||||
</div>
|
||||
<%= f.hidden_field :id_card_employer_logo_id, data: { logo_upload_target: "logofield", logo_upload_target: "employer" } %>
|
||||
<%= f.file_field :add_or_update_logo, class: "hidden", id: "employer_logo_file", data: { logo_upload_target: "previewContainer", parent_value: "network_logo", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="py-8">
|
||||
<%= f.submit "Create New Employer" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user