Major features finished

This commit is contained in:
Jason Jordan
2026-04-15 08:12:47 -04:00
parent 9f306d3150
commit 247a075c9c
112 changed files with 3700 additions and 379 deletions
@@ -21,7 +21,7 @@
<%= network_fields.select :exception_type, options_for_select(["Zip","State"]), label: { text: "Exception Type" }, prompt: "Select Type", class: "w-full" %>
</div>
<div class="w-full">
<%= network_fields.text_field :exception_value, label: { text: "Exception Value" }, class: "w-full" %>
<%= network_fields.text_field :exception_values, label: { text: "Exception Values" }, class: "w-full" %>
</div>
</div>
<div class="flex justify-center items-end w-full">
+2 -2
View File
@@ -60,8 +60,8 @@
<span class="block w-full h-0.5 bg-copper mt-[-4]"></span>
</div>
<div class="flex flex-col items-center space-y-6 w-full">
<%= link_to 'Sync Employer with VHCS', generate_sample_id_card_print_path(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 text-lg font-bold px-3 rounded-lg h-10 transition duration-100" %>
<%= link_to 'Sync Members with VHCS', generate_print_id_card_print_path(id: @employer.slug),data: { turbo: false }, class: "flex justify-center items-center w-full bg-brightlava hover:bg-deepcove border-2 border-brightlava text-platinum text-lg font-bold px-3 rounded-lg h-10 transition duration-100" %>
<%= link_to 'Sync Employer with VHCS', refresh_employer_information_employers_path(id: @employer.id), data: { turbo: false }, class: "flex justify-center items-center w-full cursor-pointer bg-brightlava hover:bg-deepcove border-2 border-brightlava text-platinum text-lg font-bold px-3 rounded-lg h-10 transition duration-100" %>
<%= link_to 'Sync Members with VHCS', refresh_employer_members_information_employers_path(id: @employer.id),data: { turbo: false }, class: "flex justify-center items-center w-full bg-brightlava hover:bg-deepcove border-2 border-brightlava text-platinum text-lg font-bold px-3 rounded-lg h-10 transition duration-100" %>
</div>
</div>
</div>
-2
View File
@@ -10,7 +10,6 @@
<% @queued.each do |qu| %>
<div class="w-full flex items-center justify-between text-lg text-platinum my-1">
<div class="flex flex-none">
<%= qu.pl_plan_key %> -
<%= qu.employer.name %>
(
<div class="mx-1 text-bronze">
@@ -32,7 +31,6 @@
<% end %>
<div class="w-full flex items-center justify-between text-lg text-platinum my-1">
<div class="flex flex-none">
<%= nq.pl_plan_key %> -
<%= nq.employer.name %>
(
<div class="mx-1 text-verdigris-vivid">
@@ -1,7 +1,7 @@
<div class="flex flex-col items-start space-y-3 w-[42%] hidden exception-item" data-controller="logo-upload" data-logo-upload-logo-type-value="network">
<div class="flex w-full">
<div class="flex flex-col w-full">
<%= exception_item_fields.select :network_logo_id, options_for_select(IdCard::NetworkLogo.pluck(:filename, :id)), { include_blank: "Select/Add Network Logo", class: "rounded-r-none flex flex-col" }, data: { exceptions_toggle_target: "dependentField", parent_value: "network_logo", logo_upload_target: "logoIdField", action: "change->logo-upload#setSelectPreview" } %>
<%= exception_item_fields.select :network_logo_id, options_for_select(IdCard::NetworkLogo.order(:filename).pluck(:filename, :id), exception_item_fields.object.network_logo_id), { include_blank: "Select/Add Network Logo", class: "rounded-r-none flex flex-col" }, data: { exceptions_toggle_target: "dependentField", parent_value: "network_logo", 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">
@@ -3,37 +3,57 @@
<h1 class="text-platinum">ID Card Exceptions:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
</div>
<%= form_with model: @setup, url: update_field_exceptions_employer_id_card_setup_index_path(@employer.slug), local: true, multipart: true do |f| %>
<div class="flex flex-col">
<div class="flex flex-col">
<%= form_with model: @setup, url: update_field_exceptions_employer_id_card_setup_index_path(@employer.slug), local: true, multipart: true do |f| %>
<div class="w-full flex pb-10">
<div class="flex flex-wrap w-full justify-start space-y-12 my-8" data-controller="add-exception" data-add-exception-form-color-value="<%= IdCard::Setup::FORM_COLORS.to_json %>">
<% @setup.field_exceptions.each_with_index do |exc, index| %>
<%= f.fields_for :field_exceptions, exc, child_index: index do |exception_fields| %>
<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] }), { label: { text: "Exception Based On" }, prompt: "Select Type", class: "w-full" }, data: { add_exception_target: "exception" } %>
<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" } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_values, value: exc.exception_values.join(', '), label: { text: "Exception Values" }, class: "w-full" %>
</div>
</div>
<div class="text-xl text-left font-bold mb-[-4px] z-1 text-platinum">
Field Exception Items
</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">
<div class="w-[42%]">
<%= exception_item_fields.select :field_name, options_for_select(IdCard::FieldExceptionItem::VALID_FIELD_NAMES.map { |field_name| [field_name.titleize, field_name] }, exception_item_fields.object.field_name ), { label: { text: "Card Field" }, prompt: "Select Card Field", class: "w-full" }, { data: { action: "change->exceptions-toggle#toggleFields", add_exception_item_target: "exceptionItem", exceptions_toggle_target: "selectField" } } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_value, label: { text: "Exception Value" }, class: "w-full" %>
<div class="w-[42%] hidden">
<%= exception_item_fields.text_field :field_value, value: exception_item_fields.object.field_value, label: { text: "New Value" }, data: { exceptions_toggle_target: "dependentField", parent_value: "default" }, class: "w-full" %>
</div>
</div>
<div class="text-xl text-left font-bold mb-[-4px] z-1 text-platinum">
Field Exception Items
</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| %>
<%= render 'alt_network_logo_fields', exception_item_fields: exception_item_fields %>
<div class="w-[42%] hidden">
<%= exception_item_fields.select :provider_section_id, options_for_select(IdCard::ProviderSection.where.not(title: nil).map { |provider| [provider.title, provider.id] }, exception_item_fields.object.provider_section_id), { prompt: "Select Provider Template", class: "w-full" }, { data: { exceptions_toggle_target: "dependentField", parent_value: "provider_section" } } %>
</div>
<div class="mt-6 ml-1">
<%= exception_item_fields.hidden_field :_destroy %>
<%= button_tag "Remove", class: "cursor-pointer flex items-center justify-center bg-brightlava font-bold text-lg text-platinum py-[6px] px-1 font-semibold leading-tight rounded-lg border-3 border-brightlava w-full", data: { action: "add-exception-item#removeExemptionItem" } %>
</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" } %>
<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">
<div class="w-[42%]">
<%= exception_item_fields.select :field_name, options_for_select(IdCard::FieldExceptionItem::VALID_FIELD_NAMES.map { |field_name| [field_name.titleize, field_name] }, exception_item_fields.object.field_name ), { label: { text: "Card Field" }, prompt: "Select Card Field", class: "w-full" }, { data: { action: "change->exceptions-toggle#toggleFields", add_exception_item_target: "exceptionItem", exceptions_toggle_target: "selectField" } } %>
<%= exception_item_fields.select :field_name, options_for_select(IdCard::FieldExceptionItem::VALID_FIELD_NAMES.map { |field_name| [field_name.titleize, field_name] }), { label: { text: "Card Field" }, prompt: "Select Card Field", class: "w-full" }, { data: { action: "change->exceptions-toggle#toggleFields", add_exception_item_target: "exceptionItem", exceptions_toggle_target: "selectField" } } %>
</div>
<div class="w-[42%] hidden">
<%= exception_item_fields.text_field :field_value, value: exception_item_fields.object.field_value, label: { text: "New Value" }, data: { exceptions_toggle_target: "dependentField", parent_value: "default" }, class: "w-full" %>
<%= exception_item_fields.text_field :field_value, label: { text: "New Value" }, data: { exceptions_toggle_target: "dependentField", parent_value: "default" }, class: "w-full" %>
</div>
<%= render 'alt_network_logo_fields', exception_item_fields: exception_item_fields %>
<div class="w-[42%] hidden">
<%= exception_item_fields.select :provider_section_id, options_for_select(IdCard::ProviderSection.where.not(title: nil).map { |provider| [provider.title, provider.id] }, exception_item_fields.object.provider_section_id), { prompt: "Select Provider Template", class: "w-full" }, { data: { exceptions_toggle_target: "dependentField", parent_value: "provider_section" } } %>
<%= exception_item_fields.select :provider_section_id, options_for_select(IdCard::ProviderSection.where.not(title: nil).map { |provider| [provider.title, provider.id] }), { prompt: "Select Provider Template", class: "w-full" }, { data: { exceptions_toggle_target: "dependentField", parent_value: "provider_section" } } %>
</div>
<div class="mt-6 ml-1">
<%= exception_item_fields.hidden_field :_destroy %>
@@ -41,33 +61,12 @@
</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" } %>
<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">
<div class="w-[42%]">
<%= exception_item_fields.select :field_name, options_for_select(IdCard::FieldExceptionItem::VALID_FIELD_NAMES.map { |field_name| [field_name.titleize, field_name] }), { label: { text: "Card Field" }, prompt: "Select Card Field", class: "w-full" }, { data: { action: "change->exceptions-toggle#toggleFields", add_exception_item_target: "exceptionItem", exceptions_toggle_target: "selectField" } } %>
</div>
<div class="w-[42%] hidden">
<%= exception_item_fields.text_field :field_value, label: { text: "New Value" }, data: { exceptions_toggle_target: "dependentField", parent_value: "default" }, class: "w-full" %>
</div>
<%= render 'alt_network_logo_fields', exception_item_fields: exception_item_fields %>
<div class="w-[42%] hidden">
<%= exception_item_fields.select :provider_section_id, options_for_select(IdCard::ProviderSection.where.not(title: nil).map { |provider| [provider.title, provider.id] }), { prompt: "Select Provider Template", class: "w-full" }, { data: { exceptions_toggle_target: "dependentField", parent_value: "provider_section" } } %>
</div>
<div class="mt-6 ml-1">
<%= exception_item_fields.hidden_field :_destroy %>
<%= button_tag "Remove", class: "cursor-pointer flex items-center justify-center bg-brightlava font-bold text-lg text-platinum py-[6px] px-1 font-semibold leading-tight rounded-lg border-3 border-brightlava w-full", data: { action: "add-exception-item#removeExemptionItem" } %>
</div>
</div>
<% end %>
</template>
</template>
</div>
</div>
<% end %>
<% end %>
<%= button_tag "Add an Exception", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/2 h-4/5 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 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" } %>
<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">
@@ -76,7 +75,7 @@
<%= 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" } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_value, label: { text: "Exception Value" }, class: "w-full" %>
<%= exception_fields.text_field :exception_values, label: { text: "Exception Values" }, class: "w-full" %>
</div>
</div>
<div class="text-xl text-left font-bold mb-[-4px] z-1 text-platinum">
@@ -114,6 +113,6 @@
<div class="py-8">
<%= f.submit "Submit Network" %>
</div>
</div>
<% end %>
<% end %>
</div>
</div>