Prod build process

This commit is contained in:
Jason Jordan
2026-05-06 13:28:16 -04:00
parent 1d9025276d
commit e0101be567
223 changed files with 1861 additions and 7105 deletions
@@ -1,12 +1,10 @@
<div class="pl-1 w-full">
<%= plan_fields.text_field :title, label: { text: "Plan Title" }, class: "w-full", data: { add_plan_target: "plan", benefits_template_picker_target: "title" } %>
</div>
<% if plan_fields.object.persisted? %>
<div class="pl-1 w-full">
<%= plan_fields.text_field :pb_product_key, label: { text: "Plan Product Key" }, class: "w-full" %>
</div>
<%= plan_fields.hidden_field :id %>
<% end %>
<div class="pl-1 w-full">
<%= plan_fields.text_field :pb_product_key, label: { text: "Plan Product Key" }, class: "w-full pointer-events-none opacity-65 cursor-not-allowed" %>
</div>
<%= plan_fields.hidden_field :id %>
<% unless plan_fields.object.setup.active %>
<div class="pl-1 pb-2 w-full">
<%= f.select :template_id, options_from_collection_for_select(@plan_templates, :id, :title), { prompt: "Select Plan Template", class: "w-full" }, { data: { action: "benefits-template-picker#fetchData" }} %>
@@ -1,6 +1,16 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex items-center">
<%= link_to employer_path(@employer.slug), class: "flex items-center h-14 space-x" do %>
<div class="flex items-center h-14 text-bluemana hover:text-bronze">
<%= icon "arrow-big-left-dash", library: "lucide", class: "h-full w-20 text-center" %>
<div class="w-full pb-1 font-bold text-2xl">
<%= "Back to Employer" %>
</div>
</div>
<% end %>
</div>
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">ID Card Exceptions:</h1>
<h1 class="text-platinum">Alternate ID Cards:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
</div>
<div class="flex flex-col">
@@ -12,16 +22,22 @@
<div class="flex flex-col pr-6 w-1/2">
<div class="flex justify-between items-end w-full pb-2">
<div class="w-[48%]">
<%= exception_fields.select :exception_type, options_for_select(IdCard::FieldException::VALID_TYPES.map { |type| [type.titleize(keep_id_suffix: true), type]}, exc.exception_type), { label: { text: "Exception Based On" }, prompt: "Select Type", class: "w-full" }, data: { add_exception_target: "exception" } %>
<%= exception_fields.select :exception_type, options_for_select(IdCard::FieldException::VALID_TYPES.map { |type| [type.titleize(keep_id_suffix: true), type]}, exc.exception_type), { label: { text: "Alternate ID Card Determined By" }, prompt: "Select Type", class: "w-full" }, data: { add_exception_target: "exception" } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_values, value: exc.exception_values.join(', '), label: { text: "Exception Values" }, class: "w-full" %>
<%= exception_fields.text_field :exception_values, value: exc.exception_values.join(', '), label: { text: "Alternate ID Card Determination Value(s)" }, class: "w-full" %>
</div>
</div>
<div class="text-xl text-left font-bold mb-[-4px] z-1 text-platinum">
Field Exception Items
<div class="flex flex-none items-center w-full pt-4 z-1">
<div class="flex flex-none text-xl text-left font-bold <%= "text-#{IdCard::Setup::FORM_COLORS[index]}" %>">
Alternate ID Card Change Items
</div>
<div class="grow h-[1px] mt-2 mx-1 <%= "bg-#{IdCard::Setup::FORM_COLORS[index]}" %>"></div>
<div class="flex flex-none text-xl text-left font-bold text-platinum">
(Changes to Employer Default Card)
</div>
<div class="flex flex-none w-3 h-[1px] mt-2 mx-1 <%= "bg-#{IdCard::Setup::FORM_COLORS[index]}" %>"></div>
</div>
<div class="w-full h-[3px] rounded-r bg-NEXT_COLOR ml-[1px] mb-1"></div>
<div class="flex flex-col w-full justify-start" data-controller="add-exception-item">
<%= exception_fields.fields_for :field_exception_items do |exception_item_fields| %>
<div class="flex justify-between items-start w-full" data-controller="exceptions-toggle">
@@ -41,7 +57,7 @@
</div>
</div>
<% end %>
<%= button_tag "Add Another Item To Exception", class: "cursor-pointer bg-NEXT_COLOR hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-NEXT_COLOR w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
<%= button_tag "Add Another Alternate ID Card Change Item", class: "cursor-pointer bg-#{IdCard::Setup::FORM_COLORS[index]} hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-#{IdCard::Setup::FORM_COLORS[index]} w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
<template data-add-exception-item-target="exceptionItemTemplate">
<%= exception_fields.fields_for :field_exception_items, IdCard::FieldExceptionItem.new, child_index: 'NEW_ITEM_RECORD' do |exception_item_fields| %>
<div class="flex justify-between items-start w-full" data-controller="exceptions-toggle">
@@ -66,24 +82,30 @@
</div>
<% end %>
<% end %>
<%= button_tag "Add an Exception", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/2 min-h-[340px] mt-3 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-exception#addExemption", add_exception_target: "exceptionButton" } %>
<%= button_tag "Add an Alternate ID Card", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/2 min-h-[340px] mt-3 text-[#E0E0E0] rounded-lg border border-[#C2C2C2] hover:shadow-[0_0_10px_3px_#93c5fd]", data: { action: "add-exception#addExemption", add_exception_target: "exceptionButton" } %>
<template data-add-exception-target="exceptionTemplate">
<%= f.fields_for :field_exceptions, @setup.field_exceptions.build, child_index: 'NEW_RECORD' do |exception_fields| %>
<div class="flex flex-col pr-6 w-1/2 pl-1">
<div class="flex justify-between items-end w-full pb-2">
<div class="w-[48%]">
<%= exception_fields.select :exception_type, options_for_select(IdCard::FieldException::VALID_TYPES.map { |type| [type.titleize(keep_id_suffix: true), type] }), { label: { text: "Exception Based On" }, prompt: "Select Type", class: "w-full" }, data: { add_exception_target: "exception" } %>
<%= exception_fields.select :exception_type, options_for_select(IdCard::FieldException::VALID_TYPES.map { |type| [type.titleize(keep_id_suffix: true), type] }), { label: { text: "Alternate ID Card Determined By" }, prompt: "Select Type", class: "w-full" }, data: { add_exception_target: "exception" } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_values, label: { text: "Exception Values" }, class: "w-full" %>
<%= exception_fields.text_field :exception_values, label: { text: "Alternate ID Card Determination Value(s)" }, class: "w-full" %>
</div>
</div>
<div class="text-xl text-left font-bold mb-[-4px] z-1 text-platinum">
Field Exception Items
<div class="flex flex-none items-center w-full pt-4 z-1">
<div class="flex flex-none text-xl text-left font-bold text-NEXT_COLOR">
Alternate ID Card Change Items
</div>
<div class="grow h-[1px] mt-2 mx-1 bg-NEXT_COLOR"></div>
<div class="flex flex-none text-xl text-left font-bold text-platinum">
(Changes to Employer Default Card)
</div>
<div class="flex flex-none w-3 h-[1px] mt-2 mx-1 bg-NEXT_COLOR"></div>
</div>
<div class="w-full h-[3px] rounded-r bg-NEXT_COLOR ml-[1px] mb-1"></div>
<div class="flex flex-col w-full justify-start" data-controller="add-exception-item">
<%= button_tag "Add Another Item To Exception", class: "cursor-pointer bg-NEXT_COLOR hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-NEXT_COLOR w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
<%= button_tag "Add Alternate ID Card Change Item", class: "cursor-pointer bg-NEXT_COLOR hover:bg-deepcove text-xl font-bold text-platinum my-3 py-1 font-semibold leading-tight rounded border-3 border-NEXT_COLOR w-full", data: { action: "add-exception-item#addExemptionItem", add_exception_item_target: "exceptionItemButton" } %>
<template data-add-exception-item-target="exceptionItemTemplate">
<%= exception_fields.fields_for :field_exception_items, IdCard::FieldExceptionItem.new, child_index: 'NEW_ITEM_RECORD' do |exception_item_fields| %>
<div class="flex justify-between items-start w-full" data-controller="exceptions-toggle">
@@ -110,8 +132,8 @@
</template>
</div>
</div>
<div class="py-8">
<%= f.submit "Submit Network" %>
<div class="flex space-x-3 py-8">
<%= f.submit "Save Alternate ID Cards" %>
</div>
<% end %>
</div>
+52 -34
View File
@@ -1,4 +1,14 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex items-center">
<%= link_to employer_path(@employer.slug), class: "flex items-center h-14 space-x" do %>
<div class="flex items-center h-14 text-bluemana hover:text-bronze">
<%= icon "arrow-big-left-dash", library: "lucide", class: "h-full w-20 text-center" %>
<div class="w-full pb-1 font-bold text-2xl">
<%= "Back to Employer" %>
</div>
</div>
<% end %>
</div>
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">ID Card Setup:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
@@ -6,49 +16,47 @@
<%= form_with model: @setup, url: employer_id_card_setup_path(id: @employer.slug), local: true, multipart: true do |f| %>
<div class="flex flex-col space-y-6 pb-10">
<div class="flex w-full items-end">
<div class="flex flex-col space-y-6 w-3/5" data-controller="general-form provider-update">
<div class="flex flex-col space-y-6 w-4/5" data-controller="general-form provider-update">
<div class="flex space-x-10">
<div class="w-full">
<%= f.text_field :print_name, label: { text: "Print Name" }, class: "w-full" %>
<div class="w-full flex flex-col items-start" data-controller="font-validator">
<div class="w-full">
<%= f.text_field :print_name, { label: { text: "Print Name" }, data: { font_validator_target: "textField", action: "input->font-validator#measure" }, class: "w-full" } %>
</div>
<div class="text-platinum font-md font-bold self-end"><span class="text-atmosphere" data-font-validator-target="countDisplayField"></span>/100px</div>
<%= f.hidden_field :print_name_pixel_width, data: { font_validator_target: "hiddenField" } %>
</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"], @setup.network_provider), { label: { text: "Provider Network" }, include_blank: "Select", class: "w-full" }, data: { provider_update_target: "providerNetworkField", action: "change->provider-update#syncDefaults" } %>
</div>
<div class="w-full">
<%= f.select :card_template, options_for_select([["FairosRx", "FairosRxIDCard"], ["Tandemloc", "TandemlocIDCard"], ["smART", "SmartIDCard"], ["QRCode (Healthbus)", "QRCodeIDCard"]], @setup.card_template || "FairosRxIDCard" ), { label: { text: "Card Template" }, include_blank: "Select", class: "w-full" } %>
</div>
<div class="w-full">
<%= f.select :card_color, options_for_select([["White", "white"], ["Blue", "blue"]], @setup.card_color || "white" ), { label: { text: "Card Color" }, include_blank: "Select", class: "w-full" } %>
</div>
</div>
<div class="flex space-x-10">
<div class="flex flex-col items-start space-y-3 w-full" data-controller="logo-upload" data-logo-upload-logo-type-value="employer" data-logo-upload-employer-name-value=<%= @employer.name %>>
<div class="flex w-full">
<div class="flex flex-col w-full">
<%= f.text_field :employer_logo_filename, label: { text: "Employer Logo" }, default: "No logo added", data: { logo_upload_target: "logoNameField" }, class: "w-full rounded-r-none", readonly: true %>
<%= f.fields_for :employer_logo, @setup.employer_logo do |employer_logo_fields| %>
<div class="flex space-x-10">
<div class="flex flex-col items-start space-y-3 w-full" data-controller="logo-upload" data-logo-upload-logo-type-value="employer" data-logo-upload-employer-name-value="<%= @employer.name %>" data-logo-upload-employer-id-value="<%= @employer.id %>">
<div class="flex w-full">
<div class="flex flex-col w-full">
<%= employer_logo_fields.text_field :filename, label: { text: "Employer Logo" }, default: "No logo added", data: { logo_upload_target: "logoNameField" }, 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="employer_logo_file" class="text-center cursor-pointer">
<%= icon "image-plus", library: "lucide" %>
</label>
</div>
</div>
<div class="hidden flex ml-10 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>
<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 ml-10 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"/>
<%= employer_logo_fields.hidden_field :id, value: @setup&.employer_logo&.id, label: { text: "Employer Logo" }, data: { logo_upload_target: "logoIdField" } %>
<%= f.file_field :employer_logo_file, class: "hidden", id: "employer_logo_file", data: { logo_upload_target: "previewContainer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
</div>
<%= f.hidden_field :employer_logo_id, label: { text: "Employer Logo" }, data: { logo_upload_target: "logoIdField" } %>
<%= f.file_field :employer_logo_file, class: "hidden", id: "employer_logo_file", data: { logo_upload_target: "previewContainer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
</div>
<% end %>
<div class="flex flex-col items-start space-y-3 w-full" data-controller="logo-upload" data-logo-upload-logo-type-value="network">
<div class="flex w-full">
<div class="flex flex-col w-full">
<%= f.select :network_logo_id, options_for_select(IdCard::NetworkLogo.pluck(:filename, :id), @setup.network_logo_id), { include_blank: "Select/Add Network Logo", class: "rounded-r-none flex flex-col" }, data: { provider_update_target: "networkLogoField", logo_upload_target: "logoIdField", action: "change->logo-upload#setSelectPreview" } %>
<%= f.select :network_logo_id, options_for_select(IdCard::NetworkLogo.pluck(:filename, :id), @setup.network_logo_id), { include_blank: "Select/Add Network Logo", class: "rounded-r-none w-full" }, data: { provider_update_target: "networkLogoField", logo_upload_target: "logoIdField", action: "change->logo-upload#setSelectPreview" } %>
</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="network_logo_file" class="text-center cursor-pointer">
@@ -62,12 +70,22 @@
<%= f.file_field :network_logo_file, class: "hidden", id: "network_logo_file", data: { logo_upload_target: "previewContainer", action: "change->logo-upload#uploadLogo" }, direct_upload: true %>
</div>
</div>
<div class="flex space-x-10">
<div class="w-full flex items-center pt-6">
<h3 class="flex-none font-bold text-2xl text-brightlava">Admin</h3>
<div class="grow h-[1px] mt-2 ml-1 bg-brightlava"></div>
</div>
<div class="flex flex-none space-x-10">
<div class="w-full">
<%= f.select :rx_section_id, options_from_collection_for_select(@rx_options, :id, :title, @setup.rx_section_id || @fairos_rx_id), { include_blank: "Select Rx", class: "flex-col w-full" } %>
<%= f.select :card_template, options_for_select([["FairosRx", "FairosRxIDCard"], ["Tandemloc", "TandemlocIDCard"], ["smART", "SmartIDCard"], ["QRCode (Healthbus)", "QRCodeIDCard"]], @setup.card_template || "FairosRxIDCard" ), { label: { text: "Card Template" }, include_blank: "Select", class: "w-full pointer-events-none opacity-65 cursor-not-allowed" } %>
</div>
<div class="w-full hidden">
<%= f.select :rx_section_id, options_from_collection_for_select(@rx_options, :id, :title, @setup.rx_section_id || @rx_default.id), { include_blank: "Select Rx", class: "flex-col w-full pointer-events-none opacity-65 cursor-not-allowed" } %>
</div>
<div class="w-full">
<%= f.select :provider_section_id, options_for_select(@provider_options, @setup.provider_section_id), { label: { text: "Claims Submission Section" }, include_blank: "Select/Add Claims Submission", class: "flex flex-col w-full" }, data: { provider_update_target: "providerSectionField", general_form_target: "selectField", action: "change->general-form#toggleNewFieldSection" } %>
<%= f.select :provider_section_id, options_for_select(@provider_options, @setup.provider_section_id || ""), { label: { text: "Claims Submission Section" }, include_blank: "Select/Add Claims Submission", class: "w-full pointer-events-none opacity-65 cursor-not-allowed" }, data: { provider_update_target: "providerSectionField", general_form_target: "selectField", action: "change->general-form#toggleNewFieldSection" } %>
</div>
<div class="w-full">
<%= f.select :card_color, options_for_select([["White", "white"], ["Blue", "blue"]], @setup.card_color || "white" ), { label: { text: "Card Color" }, include_blank: "Select", class: "w-full pointer-events-none opacity-65 cursor-not-allowed" } %>
</div>
</div>
<div class="w-full hidden" data-general-form-target="dependentField">
@@ -88,8 +106,8 @@
</div>
</div>
<div class="py-8">
<%= f.submit "Create ID Card Setup" %>
<div class="flex space-x-3 py-8">
<%= f.submit "Save ID Card Setup" %>
</div>
</div>
<% end %>
+13 -3
View File
@@ -1,4 +1,14 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex items-center">
<%= link_to employer_path(@employer.slug), class: "flex items-center h-14 space-x" do %>
<div class="flex items-center h-14 text-bluemana hover:text-bronze">
<%= icon "arrow-big-left-dash", library: "lucide", class: "h-full w-20 text-center" %>
<div class="w-full pb-1 font-bold text-2xl">
<%= "Back to Employer" %>
</div>
</div>
<% end %>
</div>
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">ID Card Plans:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
@@ -29,7 +39,7 @@
</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" } %>
<%= 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 h-[200px] 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, @setup.plans.build, child_index: 'NEW_RECORD' do |plan_fields| %>
@@ -55,8 +65,8 @@
</template>
</div>
</div>
<div class="py-8">
<%= f.submit "Submit Plans" %>
<div class="flex space-x-3 py-8">
<%= f.submit "Save Plans", {class: "px-8"} %>
</div>
</div>
<% end %>