DB restructure, print page

This commit is contained in:
Jason Jordan
2026-03-13 08:47:13 -04:00
parent 6a068243f4
commit 8c885b3e76
73 changed files with 1362 additions and 325 deletions
+4
View File
@@ -19,6 +19,8 @@
--color-cobalt: #0047AB;
/* cobalt blue */
--color-cobalt-tinted: #003B8F;
/* cobalt blue */
--color-cobalt-vivid: #005DE0;
/* platinum */
--color-platinum: #E0E0E0;
/* copper */
@@ -33,6 +35,8 @@
--color-verdigris: #588288;
/* oxidized copper/bronze green-blue */
--color-verdigris-tinted: #496A6F;
/* oxidized copper/bronze green-blue */
--color-verdigris-vivid: #618D94;
/* alert red */
--color-brightlava: #f80800;
/* alert green */
@@ -0,0 +1,61 @@
module IdCard
class NetworkLogosController < ApplicationController
# View Methods
def index
end
def show
end
def new
end
def create
file = logo_params["logo_file"]
if file.present? && file.is_a?(ActionDispatch::Http::UploadedFile)
filename = file.original_filename
# binary_data = file.read
binary_data = File.binread(file)
meme_type = Marcel::MimeType.for(file)
networklogo = IdCard::NetworkLogo.create(
filename: filename,
image_data: binary_data,
content_type: meme_type
)
render json: networklogo, only: [:id], status: :ok
end
end
def edit
end
def update
end
def destroy
end
# API Methods
def image
logo_file = IdCard::NetworkLogo.find(params[:id])
puts params[:id]
logo_binary = logo_file.image_data
logo_filename = logo_file.filename
send_data logo_binary,
filename: logo_filename,
disposition: 'inline'
end
private
def logo_params
params.require(:id_card_network_logo).permit(:logo_file)
end
end
end
@@ -0,0 +1,35 @@
module IdCard
class PlansController < ApplicationController
# View Methods
def new
end
def create
end
def edit
end
def update
end
def destroy
end
# API Methods
def get_plan_benefits
@plan_benefits = IdCard::Plan.find(params[:id]).plan_benefits
render json: @plan_benefits.as_json
end
private
end
end
@@ -0,0 +1,27 @@
module IdCard
class PrinterController < ApplicationController
# View Methods
def index
@employer_configurations = IdCard::Configuration.active.to_a.sort_by { |config| config.pl_plan_key.to_i }
add_queued_count_to_card_configuration
render :index
end
# API Methods
private
def add_queued_count_to_card_configuration
@queue_counts = EmployerCards::QueueCounter.new().call
@queue_counts.each do |qc|
match = @employer_configurations.find { |configuration| configuration.pl_plan_key == qc["PLPlanKey"] }
if match.present?
match.queued_card_count = qc["QueuedCardsCount"]
end
end
end
end
end
@@ -0,0 +1,40 @@
module IdCard
class ProviderSectionsController < ApplicationController
# View Methods
def index
end
def show
end
def new
end
def create
end
def edit
end
def update
end
def destroy
end
# API Methods
def get_section_data
@provider_section = IdCard::ProviderSection.find(params[:id])
render json: @provider_section.as_json
end
private
def logo_params
params.require(:id_card_network_logo).permit(:logo_file)
end
end
end
+89 -36
View File
@@ -1,41 +1,25 @@
module IdCard
class SetupController < ApplicationController
class ConfigurationController < ApplicationController
before_action :set_employer_and_setup
# View Methods
def new
@employer = Employer.find_by(slug: params[:employer])
@setup = @employer.create_id_card_setup
render :new
end
def create
xyz
employer_params = Employer.permitted_params(params)
puts "---Params---"
puts employer_params
# post_image_processing_params = process_logos(employer_setup_process_params)
@employer = Employer.new(employer_params)
if @employer.save
# update_logos_with_employer_setup_information()
redirect_to employer_path(@employer.slug), notice: 'Employer Saved'
else
render :new
end
end
def edit
@employer = Employer.find_by(slug: params[:id])
@employer = Employer.find_by(slug: params[:employer_id])
if @employer.id_card_enabled?
@setup = @employer.id_card_setup
else
@setup = @employer.create_id_card_setup
end
render :edit
end
def update
puts "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
employer_params = Employer.permitted_params(params)
@employer = Employer.find(params[:id])
setup_params = IdCard::Configuration.permitted_params(params)
@setup = IdCard::Configuration.find(params[:id])
if @employer.update(employer_params)
if @setup.update(setup_params)
puts "sucess"
redirect_to employer_path(@employer.slug), notice: 'Employer was successfully updated.'
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Configuration was successfully updated.'
else
puts "fail"
render :edit, status: :unprocessable_entity
@@ -43,6 +27,66 @@ module IdCard
end
def general
provider_defaults = IdCard::ProviderSection.defaults
@provider_options = provider_defaults.map { |p| ["Default #{p.title}", p.id] }.concat(provider_defaults.map { |p| ["New #{p.title}", "new|#{p.id}"] })
if @setup.provider_section_id.present? && provider_defaults.map(&:id).exclude?(@setup.provider_section_id)
@provider_options.insert(0, ["#{@employer.name} Custom", @setup.provider_section_id])
end
@rx_options = IdCard::RxSection.all
@fairos_rx_id = IdCard::RxSection.find_by(title: "FairosRx").id
render :general
end
def update_general
if params[:id_card_setup]["provider_section_id"].include?("new|")
new_provider_section_params = IdCard::ProviderSection.permitted_params(params)
new_provider_section = IdCard::ProviderSection.create(new_provider_section_params)
params[:id_card_setup]["provider_section_id"] = new_provider_section.id
end
general_params = IdCard::Configuration.permitted_params(params)
if @setup.update(general_params)
puts "sucess"
redirect_to employer_path(@employer.slug), notice: 'ID Card Configuration was successfully updated.'
else
puts "fail"
render :general, status: :unprocessable_entity
end
end
def plans
@plan_templates = IdCard::Plan.templates
render :plans
end
def update_plans
plans_params = IdCard::Plan.permitted_params(params)
if @setup.update(plans_params)
puts "sucess"
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Plans successfully updated.'
else
puts "fail"
render :plans, status: :unprocessable_entity
end
end
def field_exceptions
render :field_exceptions
end
def update_field_exceptions
field_exceptions_params = IdCard::FieldException.permitted_params(params)
if @setup.update(field_exceptions_params)
puts "sucess"
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Exceptions successfully updated.'
else
puts "fail"
render :field_exceptions, status: :unprocessable_entity
end
end
def destroy
# @resource = Resource.find(params[:id])
# @resource.destroy
@@ -53,6 +97,15 @@ module IdCard
private
def set_employer_and_setup
@employer = Employer.find_by(slug: params[:employer_id])
if @employer.id_card_setup.present?
@setup = @employer.id_card_setup
else
@setup = @employer.create_id_card_setup
end
end
# def process_logos(employer_setup_process_params)
# @uploaded_logos = []
# employer_logo = employer_setup_process_params["employer_logo"]
@@ -129,15 +182,15 @@ module IdCard
# )
# end
# def network_exceptions_params
# params.require(:employer_setup_network_exceptions_form).permit(
# network_exceptions: [:network_logo, exceptions: [:type, :value]],
# def network_field_exceptions_params
# params.require(:employer_setup_network_field_exceptions_form).permit(
# network_field_exceptions: [:network_logo, field_exceptions: [:type, :value]],
# )
# end
# def form_for_step
# step_name = @top_form.current_step
# form_method = "EmployerSetup#{step_name.camelize}Form".constantize
# form_method = "EmployerConfiguration#{step_name.camelize}Form".constantize
# # puts "/////\\\\\\||||||"
# # puts session[:employer_setup_data]
# # puts session[:employer_setup_data]['employer_setup_process_id']
@@ -146,7 +199,7 @@ module IdCard
# end
# def process_step(step_name)
# @form_method = "EmployerSetup#{step_name.camelize}Form".constantize
# @form_method = "EmployerConfiguration#{step_name.camelize}Form".constantize
# session_data_name = "#{step_name}_data"
# # puts "1--------------params----"
# # puts params
@@ -180,13 +233,13 @@ module IdCard
# def global_params(step_name)
# form_name_sym = "employer_setup_#{step_name}_form".to_sym
# params.require(form_name_sym).permit(EmployerSetupForm.permitted_params)
# params.require(form_name_sym).permit(EmployerConfigurationForm.permitted_params)
# end
# def process_step(step_name)
# form_name = "employer_setup_#{step_name}_form".camelize.constantize
# form_params_name = "#{step_name}_params".to_sym
# allowed_params = [:general_information_params, :plans_params, :network_exceptions_params]
# allowed_params = [:general_information_params, :plans_params, :network_field_exceptions_params]
# if allowed_params.include?(form_params_name)
# form_params = send(form_params_name)
# @form = form_name.new(form_params)
@@ -211,7 +264,7 @@ module IdCard
# :number_of_plans,
# :network,
# :number_of_additional_network_logos,
# network_exceptions: [:network_logo, exceptions: [:type, :value]],
# network_field_exceptions: [:network_logo, field_exceptions: [:type, :value]],
# plans: permited_plans_keys,
# benefit_descs: benefit_sequence_keys
# )
@@ -4,9 +4,10 @@ export default class extends Controller {
static targets = ["exceptionItemTemplate", "exceptionItemContainer", "exceptionItem", "exceptionItemButton"]
connect() {
const content = this.#newExemptionItem()
this.exceptionItemButtonTarget.insertAdjacentHTML('beforebegin', content);
if (this.exceptionItemTargets.length > 0) {
const content = this.#newExemptionItem()
this.exceptionItemButtonTarget.insertAdjacentHTML('beforebegin', content);
}
}
addExemptionItem(event) {
@@ -36,6 +37,7 @@ export default class extends Controller {
#newExemptionItem() {
const nextIndex = this.exceptionItemTargets.length
console.log(nextIndex)
const buttonElement = this.exceptionItemButtonTarget;
// Get the computed style (returns rgb/rgba value)
@@ -33,6 +33,7 @@ export default class extends Controller {
#updateTemplatePlan() {
const nextIndex = this.planTargets.length
console.log(nextIndex)
const num_of_colors = this.formColorValue.length
let colorIndex = 0
let newSecondaryColor = "copper"
@@ -14,7 +14,7 @@ export default class extends Controller {
return;
}
const url = `/id_card_benefits_templates/get_template_benefits/${templateId}`
const url = `/id_card/plans/${templateId}/get_plan_benefits`
const response = await fetch(url);
const templateBenefitsData = await response.json();
@@ -0,0 +1,57 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["dependentField", "providerField", "selectField"]
connect() {
console.log("--- in toggle connect --- ")
const selector = this.selectFieldTarget;
if (selector.value) {
const selectedValue = selector.value
this.dependentFieldTargets.forEach((field) => {
if (field.value) {
if (selectedValue == "network_logo") {
field.parentElement.parentElement.parentElement.classList.remove("hidden");
} else {
field.parentElement.classList.remove("hidden");
}
}
})
}
}
toggleFields() {
console.log("--- in toggle --- ")
const selector = this.selectFieldTarget;
if (selector.value) {
const selectedValue = selector.value
this.field_match = false;
this.dependentFieldTargets.forEach((field) => {
// console.log("- ", selectedValue)
// console.log("-- ", this.field_match)
// Check a data attribute on the field to see if it matches the selected value
if (field.dataset.parentValue === selectedValue) {
if (selectedValue == "network_logo") {
field.parentElement.parentElement.parentElement.classList.remove("hidden");
} else {
field.parentElement.classList.remove("hidden");
}
this.field_match = true;
} else {
if (field.dataset.parentValue == "network_logo") {
field.parentElement.parentElement.parentElement.classList.add("hidden");
} else {
field.parentElement.classList.add("hidden");
}
}
});
if (!this.field_match) {
console.log("--- ", this.field_match)
const defaultOption = this.dependentFieldTargets.find(target => {
return target.dataset.parentValue === 'default';
});
defaultOption.parentElement.classList.remove("hidden");
}
}
}
}
@@ -1,9 +1,78 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["dependentField"]
static targets = ["dependentField", "providerField", "selectField"]
connect() {
if (this.selectFieldTarget.value) {
this.toggleNewFieldSection();
}
}
async initNewFieldSection() {
console.log("--- in init async --- ")
const selector = this.selectFieldTarget
console.log(selector.textContent)
console.log(selector.value)
if (selector && selector.value && !selector.textContent.includes("Default")) {
const sectionId = selector.value
const response = await fetch(`/id_card/provider_sections/${sectionId}/get_section_data`);
const templateSectionData = await response.json();
this.#updateFields(templateSectionData)
this.dependentFieldTarget.classList.remove("hidden");
}
}
async toggleNewFieldSection() {
console.log("--- in new field toggle --- ")
const selector = this.selectFieldTarget
const selectedOption = selector.options[selector.selectedIndex]
const selectedValue = selectedOption.value
const selectedLabel = selectedOption.textContent
if (selectedValue && selectedLabel.includes("Default")) {
this.dependentFieldTarget.classList.add("hidden");
} else if (selectedValue) {
let sectionId = selectedValue
if (selectedValue.includes("new")) {
sectionId = selectedValue.split('|')[1]
}
const response = await fetch(`/id_card/provider_sections/${sectionId}/get_section_data`);
const sectionData = await response.json();
this.#updateFields(sectionData)
this.dependentFieldTarget.classList.remove("hidden");
}
}
async #updateFields(templateSectionData) {
const providerFieldTargetsList = this.providerFieldTargets
console.log(templateSectionData)
providerFieldTargetsList.forEach(function(formField) {
const dbField = formField.id.replace('id_card_configuration_provider_section_', '')
const dbValue = templateSectionData[dbField]
formField.value = dbValue;
})
// templateSectionData.forEach(function(data) {
// const targetElement = providerFieldTargetsList.find(
// (element) => element.dataset.sequence == data.sequence
// );
// if (targetElement) {
// targetElement.value = data.benefit;
// } else {
// console.error(`Target not found for sequence: ${data.sequence}`);
// }
// });
}
toggleFields() {
@@ -5,21 +5,38 @@ export default class extends Controller {
logoType: String,
employerName: String
}
static targets = ["preview", "previewContainer", "logoSelect", "logoField", "initialLogoFile"];
static targets = ["preview", "previewContainer", "logoSelect", "logoIdField", "logoNameField", "initialLogoFile"];
async connect() {
console.log('in connect');
const initValue = this.logoFieldTarget.value
this.setPreviewImage()
// Remember to revoke the URL when the controller is disconnected if necessary
// this.disconnect = () => URL.revokeObjectURL(objectUrl);
}
async setPreviewImage() {
const initValue = this.logoIdFieldTarget.value
console.log(initValue)
console.log(this.logoTypeValue)
if (initValue) {
const response = await fetch(`/id_card/${this.logoTypeValue}_logos/${initValue}/image`); // Fetch the binary data
const logoType = this.logoTypeValue
if (logoType == "employer") {
const contentDisposition = response.headers.get('Content-Disposition');
const filename = contentDisposition.match(/filename="?([^"]+)"?/)[1];
this.logoNameFieldTarget.value = filename;
}
const blob = await response.blob();
const objectUrl = URL.createObjectURL(blob);
this.previewTarget.src = objectUrl;
this.previewContainerTarget.classList.remove("hidden");
} else {
this.previewContainerTarget.classList.add("hidden");
}
// Remember to revoke the URL when the controller is disconnected if necessary
// this.disconnect = () => URL.revokeObjectURL(objectUrl);
}
setSelectPreview(event) {
this.setPreviewImage()
}
uploadLogo(event) {
@@ -34,19 +51,25 @@ export default class extends Controller {
if (logoType == "network") {
console.log("n " + newFileName);
newFileName = this.determineNetworkFilename(logoFile)
this.addOptionToSelect(newFileName)
logoFile = new File([logoFile], newFileName)
} else if (logoType == "employer") {
newFileName = this.determineEmployerFilename(logoFile)
logoFile = new File([logoFile], newFileName)
}
logoFile = new File([logoFile], newFileName)
this.uploadLogoToServer(logoFile)
.then((result) => {
console.log(result);
const logoId = result.id
this.previewFile(logoFile);
this.logoFieldTarget.value = logoId;
if (logoType == "network") {
this.addOptionToSelect(newFileName, logoId)
} else {
this.logoNameFieldTarget.value = newFileName;
}
this.logoIdFieldTarget.value = logoId;
})
.catch((error) => {
// Handle any errors that occurred
@@ -93,23 +116,22 @@ export default class extends Controller {
}
}
addOptionToSelect(name) {
addOptionToSelect(name, id) {
const blankOptionIndex = 0;
const newOption = new Option(name, name, true, true)
const newOption = new Option(name, id, true, true)
if (this.logoFieldTarget.options.length > blankOptionIndex + 1) {
this.logoFieldTarget.insertBefore(newOption, this.logoFieldTarget.options[blankOptionIndex + 1]);
if (this.logoIdFieldTarget.options.length > blankOptionIndex + 1) {
this.logoIdFieldTarget.insertBefore(newOption, this.logoIdFieldTarget.options[blankOptionIndex + 1]);
} else {
this.logoFieldTarget.appendChild(newOption);
this.logoIdFieldTarget.appendChild(newOption);
}
this.logoFieldTarget.value = name;
}
determineNetworkFilename(logoFile) {
const fileExtension = logoFile.name.split('.').pop();
const primaryNetworkName = prompt("Enter the name for the primary network (Usually 'Cigna' or 'MedCost':");
const secondaryNetworkName = prompt("Enter the name for the primary network (ex: Health Partners):");
const secondaryNetworkName = prompt("Enter the name for the partner network (ex: Health Partners):");
const logoFilename = this.titleizeText(primaryNetworkName).concat(this.titleizeText(secondaryNetworkName)).concat("Logo.").concat(fileExtension).replaceAll(' ', '');
return logoFilename
@@ -0,0 +1,25 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["providerNetworkField", "networkLogoField", "providerSectionField"]
connect() {
console.log("---provider update---")
}
syncDefaults() {
const pnValue = this.providerNetworkFieldTarget.value
if (pnValue == "Cigna") {
this.networkLogoFieldTarget.value = 1
this.providerSectionFieldTarget.value = 30
} else if (pnValue == "Medcost") {
this.networkLogoFieldTarget.value = 2
this.providerSectionFieldTarget.value = 26
} else {
this.networkLogoFieldTarget.value = ""
this.providerSectionFieldTarget.value = ""
}
const event = new Event('change', { bubbles: true });
this.networkLogoFieldTarget.dispatchEvent(event);
}
}
+9 -1
View File
@@ -1,6 +1,6 @@
class Employer < ApplicationRecord
has_many :members
has_one :id_card_setup, class_name: 'IdCard::Setup', dependent: :destroy
has_one :id_card_configuration, class_name: 'IdCard::Configuration', dependent: :destroy
scope :active, -> { where(active: true) }
scope :inactive, -> { where(active: false) }
@@ -38,6 +38,14 @@ class Employer < ApplicationRecord
self.slug = employer_trim_name(self.name).parameterize
end
def id_card_enabled?
self.id_card_configuration.present?
end
def claims_check_enabled?
false
end
# def name_to_logo_filename(extension)
# self.employer_trim_name(self.name).titleize.gsub(/\s+/, '').concat('Logo').concat(extension.downcase)
# end
+2 -2
View File
@@ -5,11 +5,11 @@ module IdCard
private
def calculate_aspect_ratio
image_io = StringIO.new(self.image_data)
image_io = StringIO.new(image_data)
width, height = FastImage.size(image_io)
image_ratio = width.to_f / height
if image_ratio
self.aspect_ratio = image_ratio.round(2)
aspect_ratio = image_ratio.round(2)
end
end
end
-12
View File
@@ -1,12 +0,0 @@
module IdCard
class Exception < ApplicationRecord
belongs_to :setup
has_many :exception_items
accepts_nested_attributes_for :exception_items, allow_destroy: true, reject_if: :all_blank
VALID_TYPES = ['zipcode', 'state', 'family_id']
validates :type, inclusion: { in: VALID_TYPES,
message: "%{value} is not a valid exception type" }
end
end
+35
View File
@@ -0,0 +1,35 @@
module IdCard
class FieldException < ApplicationRecord
belongs_to :configuration
has_many :field_exception_items, dependent: :destroy
accepts_nested_attributes_for :field_exception_items, allow_destroy: true, reject_if: :all_blank
VALID_TYPES = ['zipcode', 'state', 'family_id']
validates :exception_type, inclusion: { in: VALID_TYPES,
message: "%{value} is not a valid exception type" }
class << self
def permitted_params(params)
params.require(:id_card_configuration).permit(
field_exceptions_attributes: [
:exception_type,
:exception_value,
:_destroy,
field_exception_items_attributes: [
:field_name,
:field_value,
:network_logo_id,
:provider_section_id,
:_destroy
]
]
)
end
end
end
end
+22 -4
View File
@@ -1,13 +1,31 @@
module IdCard
class NetworkLogo < ApplicationRecord
before_save :round_aspect_ratio
before_validation :calculate_aspect_ratio, if: :image_data_changed?
scope :defaults, -> { where(default: true) }
class << self
def medcost
defaults.where("filename LIKE ?", "%Medcost%")
end
def cigna
defaults.where("filename LIKE ?", "%Cigna%")
end
end
private
def round_aspect_ratio
if self.aspect_ratio.present?
self.aspect_ratio = self.aspect_ratio.round(2)
def calculate_aspect_ratio
image_io = StringIO.new(image_data)
width, height = FastImage.size(image_io)
image_ratio = width.to_f / height
if image_ratio
self.aspect_ratio = image_ratio.round(2)
end
end
end
end
+57 -16
View File
@@ -1,27 +1,68 @@
module IdCard
class Plan < ApplicationRecord
belongs_to :setup
belongs_to :configuration, optional: true
has_many :plan_benefits, dependent: :destroy
accepts_nested_attributes_for :plan_benefits, allow_destroy: true, reject_if: :all_blank
# after_initialize :create_default_benefits, if: :new_record?
scope :templates, -> { where(template: true) }
BENEFIT_FIELDS = ["Primary Visit",
"Specialist Visit",
"Urgent Care",
"INN-Ind Ded",
"INN-Family Ded",
"OON-Ind Ded",
"OON-Family Ded",
"Co-Insurance",
"INN-Ind OOP",
"INN-Family OOP",
"OON-Ind OOP",
"OON-Family OOP",
"Emergency Room",
"Preventive Care"].freeze
def self.permitted_params(params)
params.require(:id_card_plan).permit(
:title,
:pb_product_key,
:pl_plan_key,
:_destroy,
id_card_plan_benefits_attributes: [
:id,
:benefit_desc,
:benefit,
:sequence,
:_destroy,
]
)
after_initialize :build_plan_benefits, if: :new_record?
def build_plan_benefits
BENEFIT_FIELDS.each_with_index do |bene, i|
self.plan_benefits.build(benefit_desc: bene, sequence: (i + 1))
end
end
def format_template
formatted_title = title
if pl_plan_key.present?
employer_name = Employer.find_by(pl_plan_key: pl_plan_key).pluck(:name)
formatted_title.concat( " (#{employer_name})" )
end
{ id: id, title: formatted_title }
end
class << self
# def templates
# active_templates.map(&:format_template)
# end
def permitted_params(params)
params.require(:id_card_configuration).permit(
plans_attributes: [
:title,
:pb_product_key,
:pl_plan_key,
:_destroy,
plan_benefits_attributes: [
:id,
:benefit_desc,
:benefit,
:sequence,
:_destroy,
]
]
)
end
end
private
+31
View File
@@ -1,5 +1,36 @@
module IdCard
class ProviderSection < ApplicationRecord
scope :defaults, -> { where(default: true) }
def self.permitted_params(params)
params.require(:id_card_configuration).require(:provider_section).permit(
:provider_line_1,
:provider_line_2,
:provider_line_3,
:provider_line_4,
:provider_line_5,
:provider_line_6,
:provider_line_7,
:provider_line_8,
:provider_line_9,
:provider_line_10,
:provider_line_11,
:provider_line_12,
:claim_to_1,
:claim_to_2,
:claim_to_3,
:claim_to_4,
:claim_to_5,
:claim_to_6,
:claim_to_7,
:claim_to_8,
:claim_to_9,
:claim_to_10,
:claim_to_11,
:claim_to_12
)
end
end
end
+25 -4
View File
@@ -1,5 +1,5 @@
module IdCard
class Setup < ApplicationRecord
class Configuration < ApplicationRecord
belongs_to :employer, class_name: 'Employer'
belongs_to :employer_logo, optional: true
belongs_to :network_logo, optional: true
@@ -7,8 +7,17 @@ module IdCard
belongs_to :rx_section, optional: true
has_many :plans, dependent: :destroy
has_many :field_exceptions, dependent: :destroy
has_many :exceptions, dependent: :destroy
accepts_nested_attributes_for :plans, allow_destroy: true, reject_if: :all_blank
accepts_nested_attributes_for :field_exceptions, allow_destroy: true, reject_if: :all_blank
attribute :queued_card_count, :integer, default: 0
scope :active, -> { where(active: true) }
FORM_COLORS = ['atmosphere', 'verdigris', 'bluemana', 'cobalt']
MODULE_COLOR = 'atmosphere'
# def employer_logo_filename
# self.employer_logo.filename
@@ -18,13 +27,25 @@ module IdCard
# self.network_logo.filename
# end
def build_plan_with_default_benefits(attributes = {})
plan = plans.new(attributes)
benefits = IdCardBenefitsTemplate.find_by(title: "BLANK").id_card_benefits.sort_by(&:sequence)
benefits.each do |ben|
plan.plan_benefits.new(benefit_desc: ben.benefit_desc, sequence: ben.sequence)
end
plan
end
def self.permitted_params(params)
params.require(:id_card_setup).permit(
params.require(:id_card_configuration).permit(
:print_name,
:network_provider,
:card_template,
:rx_group_number,
:id_card_employer_logo_id
:employer_logo_id,
:network_logo_id,
:rx_section_id,
:provider_section_id
)
end
end
@@ -19,10 +19,9 @@ module BenefitsWordDoc
filename = @employer.name_to_logo_filename(file_extension)
logo = CardLogoFile.find_or_create_by(filename: filename) do |clf|
logo = IdCard::EmployerLogo.find_or_create_by(filename: filename) do |clf|
clf.image_data = image_binary
clf.content_type = meme_type
clf.logo_type = "employer"
end
# new_logo = CardLogoFile.create!(
@@ -32,16 +31,16 @@ module BenefitsWordDoc
# logo_type: "employer"
# )
image_io = StringIO.new(image_binary)
width, height = FastImage.size(image_io)
image_ratio = width.to_f / height
if (0.8..1.2).cover?(image_ratio)
@employer.single_card_template = "FairosRxIDCard-Half"
else
@employer.single_card_template = "FairosRxIDCard"
end
# image_io = StringIO.new(image_binary)
# width, height = FastImage.size(image_io)
# image_ratio = width.to_f / height
# if (0.8..1.2).cover?(image_ratio)
# @employer.single_card_template = "FairosRxIDCard-Half"
# else
# @employer.single_card_template = "FairosRxIDCard"
# end
@employer.employer_logo_filename = logo.filename
@employer.id_card_configuration.employer_logo = logo
end
end
@employer
@@ -7,19 +7,29 @@ module BenefitsWordDoc
end
def call
network_matches = []
@word_doc_section.each do |line|
if network_matches.exclude?("Cigna") && line.match?(/cigna/i)
network_matches.push("Cigna")
elsif network_matches.exclude?("Medcost") && line.match?(/medcost/i)
network_matches.push("Medcost")
# network = @word_doc_section.each do |line|
# if line.match?(/cigna/i)
# return "Cigna"
# elsif line.match?(/medcost/i)
# return "Medcost"
# end
# end
network = @word_doc_section.find do |line|
if line.match?(/cigna/i)
break "Cigna"
elsif line.match?(/medcost/i)
break "Medcost"
end
end
if network_matches.length == 1
network_provider = network_matches.first
@employer.network_provider = network_provider
@employer.default_network_logo = "#{network_provider}Logo.png"
# yellow_fruit_names_filtered = @word_doc_section.filter_map do |line|
# item[:name] if item[:color] == 'yellow'
# end
if network
@employer.id_card_configuration.network_provider = network
@employer.id_card_configuration.network_logo = IdCard::NetworkLogo
provider_code = network_provider == "Cigna" ? "5" : "2"
@employer.card_provider = CardProvider.find_by(provider_code: provider_code)
@employer.card_rx = CardRx.find_by(web_url: "www.FairosRx.com")
@@ -0,0 +1,13 @@
module EmployerCards
class QueueCounter
def initialize()
@employer_pl_plan_keys = IdCard::Configuration.active.pluck(:pl_plan_key).join(',')
end
def call
CallStoredProc.new('HLGetQueuedIdCardsTPANewCount', { PLPlanKeys: @employer_pl_plan_keys }).call.to_ary
end
end
end
+13 -7
View File
@@ -1,8 +1,14 @@
class ImageProcessor
ALLOWED_LOGO_TYPES = ['Network', 'Employer'].freeze
def initialize(image_path, new_filename = nil)
def initialize(image_path, logo_type, new_filename = nil)
@image_path = image_path
@logo_type = logo_type.capitalize
@new_filename = new_filename
unless ALLOWED_LOGO_TYPES.include?(@logo_type)
raise ArgumentError, "Invalid logo type: #{@logo_type}. Must be one of: #{ALLOWED_LOGO_TYPES.join(', ')}"
end
end
def call
@@ -17,11 +23,11 @@ class ImageProcessor
# binary_data = File.open(@image_path, 'rb').read
meme_type = Marcel::MimeType.for Pathname.new(@image_path)
CardLogoFile.create(
filename: filename,
image_data: binary_data,
content_type: meme_type,
logo_type: "employer"
)
logo_model = "IdCard::#{@logo_type}Logo".constantize
logo_model.find_or_create_by(filename: filename) do |logo|
logo.image_data = binary_data
logo.content_type = meme_type
end
end
end
+3 -3
View File
@@ -32,7 +32,7 @@ module SampleCard
def set_plan_fields
plans_sample_cards = []
@employer.plans.each do |plan|
@employer.id_card_configuration.plans.each do |plan|
plan_sample_card = @sample_card.dup
plan_name = plan.title.split(/(?<=\d[kK])/).first
plan_sample_card.family_id = plan_name
@@ -56,7 +56,7 @@ module SampleCard
end
def set_network_fields
selected_attributes = @employer.card_provider.attributes.with_indifferent_access.slice(
selected_attributes = @employer.id_card_configuration.provider_section.attributes.with_indifferent_access.slice(
:provider_line_1, :provider_line_2, :provider_line_3, :provider_line_4, :provider_line_5, :provider_line_6,
:provider_line_7, :provider_line_8, :provider_line_9, :provider_line_10, :provider_line_11, :provider_line_12,
:claim_to_1, :claim_to_2, :claim_to_3, :claim_to_4, :claim_to_5, :claim_to_6,
@@ -71,7 +71,7 @@ module SampleCard
def set_rx_fields
# fairos_information = Vhcs::HlrxCrosRef.where(pl_plan_key: 52).first
selected_attributes = @employer.card_rx.attributes.with_indifferent_access.slice(
selected_attributes = @employer.id_card_configuration.rx_section.attributes.with_indifferent_access.slice(
:customer_service,
:web_url
)
@@ -4,8 +4,8 @@
<% end %>
</div>
<div class="inline-flex flex-col justify-end pr-6 pl-1 mt-10 relative w-1/4" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{i + 1}" %>
</div>
<div class="pl-1 w-full">
+7 -7
View File
@@ -1,6 +1,6 @@
<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_setup, url: employer_setup_index_path, local: true, multipart: true do |f| %>
<%= form_with model: @employer_configuration, url: employer_configuration_index_path, 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>
@@ -51,17 +51,17 @@
<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="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>" >
<div class="flex flex-wrap w-full" data-add-plan-target="container">
<% @employer_setup.plans.each_with_index do |plan, index| %>
<% @employer_configuration.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">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[index]}" %>"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_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]}" %>">
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{IdCard::Configuration::FORM_COLORS[index]}" %>">
Benefit Values
</div>
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
@@ -106,7 +106,7 @@
<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 w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_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>
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<h1 class="font-bold text-4xl text-platinum my-5">Employer Setups</h1>
<% plan_colors = EmployerSetupPlansForm::PLAN_COLORS.push('copper', 'bronze').shuffle %>
<% plan_colors = IdCard::Configuration::FORM_COLORS.push('copper', 'bronze').shuffle %>
<% @employer_setups.each_with_index do |es, index| %>
<% item_color_index = index == 0 ? 0 : index % plan_colors.length %>
<div class="w-full flex text-2xl text-platinum font-bold px-4 py-4 ml-10 rounded-lg border-l-5 border-b-2 <%= "border-#{plan_colors[item_color_index]}" %>">
@@ -1,4 +1,4 @@
<div class="min-h-screen w-full flex flex-col" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="min-h-screen w-full flex flex-col" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>">
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">Provider Network</h3>
<%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %>
+5 -5
View File
@@ -57,16 +57,16 @@
<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="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>" >
<div class="flex flex-wrap w-full" data-add-plan-target="container">
<%= f.fields_for :plans, @employer_setup.plans.first, child_index: 0 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-#{EmployerSetupPlansForm::PLAN_COLORS[0]}" %> "></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[0]}" %> -ml-[6px] z-2 w-full">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[0]}" %> "></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_COLORS[0]}" %> -ml-[6px] z-2 w-full">
<%= "Plan 1" %>
</div>
<%= render 'plan_fields', plan_fields: plan_fields, f: f, index: 0 %>
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[0]}" %>">
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{IdCard::Configuration::FORM_COLORS[0]}" %>">
Benefit Values
</div>
<div class="w-full h-[3px] rounded-r bg-bronze ml-[3px]"></div>
@@ -110,7 +110,7 @@
<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 w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_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>
+3 -3
View File
@@ -1,4 +1,4 @@
<div class="min-h-screen w-full flex flex-col" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="min-h-screen w-full flex flex-col" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>">
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">Medical Plans</h3>
<div class="flex flex-col pl-6">
@@ -17,8 +17,8 @@
</div>
<% @form.plans.each_with_index do |plan, i| %>
<div class="inline-flex flex-col justify-end pr-6 pl-1 mt-10 relative w-1/4" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{i + 1}" %>
</div>
<%= f.fields_for :plans, index: i do |plan_fields| %>
+1 -1
View File
@@ -6,7 +6,7 @@
<% end %>
</div>
<% plan_colors = EmployerSetupPlansForm::PLAN_COLORS.push('copper', 'bronze').shuffle %>
<% plan_colors = IdCard::Configuration::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| %>
+77 -22
View File
@@ -1,17 +1,20 @@
<div class="bg-deepcove text-platinum h-full w-full flex flex-col">
<%= link_to employers_path, class: "flex h-10 w-10 text-xl transition duration-100" do %>
<%= icon "arrow-big-left-dash", library: "lucide", class: "h-full w-full text-center text-bluemana hover:text-bronze" %>
<% end %>
<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]">
<% 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]" %>
<% if @employer&.id_card_configuration&.employer_logo&.filename %>
<%= image_tag image_id_card_employer_logo_path(@employer.id_card_configuration.employer_logo.id), class: "max-h-[50px] object-contain shadow-[0_0_10px_3px_#93c5fd]" %>
<% end %>
</div>
</div>
<div class="flex space-x-6">
<div class="flex flex-col space-y-1 w-1/3">
<div class="flex flex-col space-y-1 w-1/4">
<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>
<h3 class="flex-none font-bold text-2xl text-bluemana">Employer Information</h3>
<div class="grow h-[1px] mt-2 ml-1 bg-bronze"></div>
</div>
<div class="flex flex-col space-y-1 ml-4">
<p class="text-<%="#{@employer.active == false ? "brightlava" : "limegreen"}" %>">
@@ -23,7 +26,7 @@
<%= @employer.effective_date %>
</p>
<div>
<strong class="text-atmosphere mr-2">└── Key Chain</strong>
<strong class="text-bluemana 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"}" %>">
@@ -31,11 +34,11 @@
<%= attribute_value.present? ? attribute_value.to_s : "waiting" %>
</p>
<% end %>
<% if @employer&.id_card_setup&.id_card_plans %>
<% if @employer&.id_card_configuration&.plans.present? %>
<div>
<strong class="text-atmosphere mr-2">└── Plans</strong>
</div>
<% @employer.id_card_setup.id_card_plans.pluck(:title, :pb_product_key).each do |plan| %>
<% @employer.id_card_configuration.plans.pluck(:title, :pb_product_key).each do |plan| %>
<div class="ml-9">
├── <%= plan.first %>
</div>
@@ -45,24 +48,76 @@
</p>
<% end %>
<% 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 class="w-full flex items-end mt-10">
<%= link_to 'Edit Employer', edit_employer_path(@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" %>
</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">ID Card Actions</h3>
<div class="h-[1px] w-2/3 mt-2 bg-bluemana"></div>
</div>
<div class="flex flex-col space-y w-[23%]">
<% module_color = IdCard::Configuration::MODULE_COLOR %>
<div class="w-full flex flex-none items-center justify-between">
<h3 class="flex-none font-bold text-2xl text-<%= module_color %>">ID Card Module</h3>
<div class="grow h-[1px] mt-2 ml-1 bg-bronze"></div>
</div>
<%= link_to "Setup", new_id_card_setup_path(employer: @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" %>
<div class="grow flex flex-col w-full border-l-4 border-b-4 border-<%= module_color %> rounded-xl pl-2 pb-2">
<% if @employer.id_card_enabled? %>
<div class="grow-1 flex flex-col items-center w-full">
<div class="w-full flex flex-col items-center my-3">
<div class="font-bold text-lg text-bronze">
Setup
</div>
<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 "General", general_employer_id_card_configuration_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_configuration_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_configuration_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" %>
</div>
</div>
<div class="grow-1 flex flex-col items-center w-full">
<div class="w-full flex flex-col items-center my-3">
<div class="font-bold text-lg text-bronze">
Actions
</div>
<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 'Generate Sample Cards', generate_sample_id_card_print_data_path(employer_slug: @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 '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-full #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} 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 '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-full #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} 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 '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-full #{@employer.active ? "" : "pointer-events-none opacity-50 cursor-not-allowed"} bg-#{module_color} hover:bg-deepcove border-2 border-#{module_color} text-platinum font-bold px-3 rounded-lg h-10 transition duration-100" %>
</div>
</div>
<% else %>
<%= link_to "Enable ID Card", general_employer_id_card_configuration_index_path(employer_id: @employer.slug), data: { turbo: false }, class: "flex justify-center items-center w-full h-full cursor-pointer bg-#{module_color} hover:bg-deepcove border-4 border-atmosphere text-platinum text-xl font-bold px-3 rounded-md mt-3 transition duration-100" %>
<% end %>
</div>
</div>
<div class="flex flex-col space-y w-[23%]">
<div class="w-full flex items-center">
<h3 class="flex-none font-bold text-2xl text-cobalt-vivid">Claims Check Module</h3>
<div class="grow h-[1px] mt-2 ml-1 bg-bronze"></div>
</div>
<div class="grow flex flex-col w-full border-l-4 border-b-4 border-cobalt-vivid rounded-xl pl-2 pb-2">
<% if @employer.claims_check_enabled? %>
<%= 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" %>
<% else %>
<%= link_to "Enable Claims Check", general_employer_id_card_configuration_index_path(employer_id: @employer.slug), data: { turbo: false }, class: "flex justify-center items-center w-full h-full cursor-pointer bg-cobalt-vivid hover:bg-deepcove border-4 border-cobalt-vivid text-platinum text-xl font-bold px-3 rounded-md mt-3 transition duration-100" %>
<% end %>
</div>
</div>
<div class="flex flex-col space-y w-[23%]">
<div class="w-full flex items-center">
<h3 class="flex-none font-bold text-2xl text-verdigris-vivid">FairosRx Eligibility Module</h3>
<div class="grow h-[1px] mt-2 ml-1 bg-bronze"></div>
</div>
<div class="grow flex flex-col w-full border-l-4 border-b-4 border-verdigris-vivid rounded-xl pl-2 pb-2">
<% if @employer.claims_check_enabled? %>
<% else %>
<%= link_to "Enable FairosRx Eligibility", general_employer_id_card_configuration_index_path(employer_id: @employer.slug), data: { turbo: false }, class: "flex justify-center items-center w-full h-full cursor-pointer bg-verdigris-vivid hover:bg-deepcove border-4 border-verdigris-vivid text-platinum text-xl font-bold px-3 rounded-md mt-3 transition duration-100" %>
<% end %>
</div>
</div>
</div>
</div>
@@ -4,8 +4,8 @@
<% end %>
</div>
<div class="inline-flex flex-col justify-end pr-6 pl-1 mt-10 relative w-1/4" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{i + 1}" %>
</div>
<div class="pl-1 w-full">
+5 -5
View File
@@ -51,17 +51,17 @@
<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="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_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">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[index]}" %>"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_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]}" %>">
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{IdCard::Configuration::FORM_COLORS[index]}" %>">
Benefit Values
</div>
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
@@ -106,7 +106,7 @@
<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 w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_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>
+1 -1
View File
@@ -6,7 +6,7 @@
<% end %>
</div>
<% plan_colors = EmployerSetupPlansForm::PLAN_COLORS.push('copper', 'bronze').shuffle %>
<% plan_colors = IdCard::Configuration::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| %>
@@ -1,4 +1,4 @@
<div class="min-h-screen w-full flex flex-col" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="min-h-screen w-full flex flex-col" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>">
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">Provider Network</h3>
<%= form_with model: @form, url: employer_setup_index_path, local: true do |f| %>
+5 -5
View File
@@ -61,17 +61,17 @@
<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="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_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">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[index]}" %> "></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_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]}" %>">
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{IdCard::Configuration::FORM_COLORS[index]}" %>">
Benefit Values
</div>
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
@@ -116,7 +116,7 @@
<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 w-full justify-start" data-controller="add-alt-network-logo" data-add-alt-network-logo-form-color-value="<%= IdCard::Configuration::FORM_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>
+5 -5
View File
@@ -61,17 +61,17 @@
<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="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_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">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[index]}" %> "></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_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]}" %>">
<div class="text-xl text-left font-bold pl-[2px] mb-[-4px] z-1 <%= "text-#{IdCard::Configuration::FORM_COLORS[index]}" %>">
Benefit Values
</div>
<div class="w-full h-[3px] rounded-r <%= "bg-#{index % 2 == 1 ? 'bronze' : 'copper'}" %> ml-[3px]"></div>
@@ -116,7 +116,7 @@
<h3 class="font-bold text-2xl text-bluemana">ID Card Exceptions Information</h3>
<div class="h-[1px] w-1/2 mt-2 bg-bluemana"></div>
</div>
<div class="flex flex-wrap w-full justify-start my-8" data-controller="add-exception" data-add-exception-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="flex flex-wrap w-full justify-start my-8" data-controller="add-exception" data-add-exception-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>">
<%= button_tag "Add an Exception", class: "cursor-pointer text-lg font-medium py-2 px-4 rounded w-1/7 h-35 my-8 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 :card_exceptions, CardException.new, child_index: 'NEW_RECORD' do |exception_fields| %>
+3 -3
View File
@@ -1,4 +1,4 @@
<div class="min-h-screen w-full flex flex-col" data-controller="add-plan" data-add-plan-form-color-value="<%= EmployerSetupPlansForm::PLAN_COLORS.to_json %>">
<div class="min-h-screen w-full flex flex-col" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>">
<h1 class="font-bold text-4xl text-platinum">New Employer Setup</h1>
<h3 class="font-bold text-2xl text-bluemana">Medical Plans</h3>
<div class="flex flex-col pl-6">
@@ -17,8 +17,8 @@
</div>
<% @form.plans.each_with_index do |plan, i| %>
<div class="inline-flex flex-col justify-end pr-6 pl-1 mt-10 relative w-1/4" data-controller="benefits-template-picker">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{EmployerSetupPlansForm::PLAN_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<div class="absolute left-0 top-[2%] h-[98%] border-l-4 <%= "border-#{IdCard::Configuration::FORM_COLORS[i]}" %> rounded-bl-lg"></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_COLORS[i]}" %> -ml-[6px] z-2 w-full">
<%= "Plan #{i + 1}" %>
</div>
<%= f.fields_for :plans, index: i do |plan_fields| %>
+34
View File
@@ -0,0 +1,34 @@
<div class="bg-deepcove h-full w-full flex flex-col justify-start font-bold">
<div class="w-full flex flex-col items-center mb-3">
<div class="text-5xl text-platinum">
ID Card Printer
</div>
<span class="block w-full h-0.5 bg-copper"></span>
</div>
<div class="w-full items-start flex">
<div class="w-1/2 flex flex-col">
<% @employer_configurations.each do |es| %>
<div class="w-full flex items-center justify-between text-lg text-platinum my-1">
<div class="flex flex-none">
<%= es.pl_plan_key %> -
<%= es.employer.name %>
(
<div class="mx-1 text-<%= es.queued_card_count > 0 ? "brightlava" : "limegreen" %>">
<%= es.queued_card_count %>
</div>
)
</div>
<div class="grow h-[1px] mx-1 bg-cobalt-vivid"></div>
<div class="flex flex-none items-center text-xs">
<%= link_to general_employer_id_card_configuration_index_path(employer_id: es.employer.slug), class: "flex h-7 w-14 transition duration-100 #{es.queued_card_count > 0 ? "" : "pointer-events-none opacity-50 cursor-not-allowed" }" do %>
<%= icon "printer", library: "lucide", class: "h-full w-full text-center text-platinum bg-atmosphere hover:bg-deepcove border-2 border-atmosphere rounded-md p-0.5" %>
<% end %>
</div>
</div>
<% end %>
</div>
<div class="w-1/2 flex justify-center items-center text-center text-2xl">
<%= link_to "Print All Queued", id_card_printer_index_path, class: "flex justify-center items-center w-1/2 h-15 text-platinum bg-cobalt-vivid hover:bg-deepcove border-2 border-cobalt-vivid rounded-lg p-2" %>
</div>
</div>
</div>
@@ -0,0 +1,16 @@
<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" } %>
</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">
<%= icon "image-plus", library: "lucide" %>
</label>
</div>
</div>
<div class="hidden flex ml-10 justify-center rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
<img data-logo-upload-target="preview" src="#" alt="Netwoek Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
</div>
<%= exception_item_fields.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>
@@ -0,0 +1,5 @@
<% (1..12).each do |n| %>
<div class="pl-1 pt-2 w-full">
<%= provider_fields.text_field "claim_to_#{n}".to_sym, label: { text: "Claim To Line #{n}" }, data: { general_form_target: "providerField"}, class: "w-full" %>
</div>
<% end %>
@@ -0,0 +1,5 @@
<div class="pl-1 pt-2 w-full">
<%= plan_benefits_fields.text_field :benefit, label: { text: "#{plan_benefits_fields.object.benefit_desc}" }, data: { benefits_template_picker_target: "benefit", sequence: plan_benefits_fields.object.sequence}, class: "w-full" %>
<%= plan_benefits_fields.hidden_field :benefit_desc %>
<%= plan_benefits_fields.hidden_field :sequence %>
</div>
@@ -0,0 +1,13 @@
<div class="pl-1 w-full">
<%= plan_fields.text_field :title, label: { text: "Plan Title" }, class: "w-full", data: { add_plan_target: "plan" } %>
</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>
<% end %>
<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" }} %>
</div>
@@ -0,0 +1,5 @@
<% (1..12).each do |n| %>
<div class="pl-1 pt-2 w-full">
<%= provider_fields.text_field "provider_line_#{n}".to_sym, label: { text: "Provider Line #{n}" }, data: { general_form_target: "providerField"}, class: "w-full" %>
</div>
<% end %>
-34
View File
@@ -1,34 +0,0 @@
<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,119 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">ID Card Exceptions:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
</div>
<%= form_with model: @configuration, url: update_field_exceptions_employer_id_card_configuration_index_path(@employer.slug), local: true, multipart: true do |f| %>
<div class="flex flex-col">
<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::Configuration::FORM_COLORS.to_json %>">
<% @configuration.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>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_value, label: { text: "Exception Value" }, 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-[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>
<%= 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] }), { 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>
</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" } %>
<template data-add-exception-target="exceptionTemplate">
<%= f.fields_for :field_exceptions, @configuration.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" } %>
</div>
<div class="w-[48%]">
<%= exception_fields.text_field :exception_value, label: { text: "Exception Value" }, 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">
<%= 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>
</div>
</div>
<% end %>
</template>
</div>
</div>
<div class="py-8">
<%= f.submit "Submit Network" %>
</div>
</div>
<% end %>
</div>
+93
View File
@@ -0,0 +1,93 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<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>
</div>
<%= form_with model: @configuration, url: update_general_employer_id_card_configuration_index_path(@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 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"], @configuration.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"]], @configuration.card_template || "FairosRxIDCard" ), { label: { text: "Card Template" }, 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 %>
</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>
<%= 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>
<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), @configuration.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" } %>
</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">
<%= icon "image-plus", library: "lucide" %>
</label>
</div>
</div>
<div class="hidden flex ml-10 justify-center rounded-lg border-4 border-atmosphere" data-logo-upload-target="previewContainer">
<img data-logo-upload-target="preview" src="#" alt="Netwoek Logo preview" class="max-h-[100px] max-w-[133px] bg-platinum m-1"/>
</div>
<%= 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">
<%= f.select :rx_section_id, options_from_collection_for_select(@rx_options, :id, :title, @configuration.rx_section_id || @fairos_rx_id), { include_blank: "Select Rx", class: "flex-col w-full" } %>
</div>
<div class="w-full">
<%= f.select :provider_section_id, options_for_select(@provider_options, @configuration.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" } %>
</div>
</div>
<div class="w-full hidden" data-general-form-target="dependentField">
<div class="text-xl text-left font-bold text-platinum pt-8">
New Claims Submission Section
</div>
<%= f.fields_for :provider_section do |provider_fields| %>
<div class="flex w-full space-x-3">
<div class="flex flex-col w-1/2">
<%= render 'claim_fields', provider_fields: provider_fields %>
</div>
<div class="flex flex-col w-1/2">
<%= render 'provider_fields', provider_fields: provider_fields %>
</div>
</div>
<% end %>
</div>
</div>
</div>
<div class="py-8">
<%= f.submit "Create ID Card Setup" %>
</div>
</div>
<% end %>
</div>
+57
View File
@@ -0,0 +1,57 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">ID Card Network:</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
</div>
<%= form_with model: @configuration, url: update_network_employer_id_card_configuration_index_path(@employer.slug), local: true, multipart: true do |f| %>
<div class="flex flex-col space-y-6 pb-10">
<div class="flex flex-col space-y-6 w-full" data-controller="logo-upload" data-logo-upload-logo-type-value="network">
<div class="flex w-2/5">
<div class="flex items-end">
<div class="flex">
<div class="flex flex-col w-full">
<%= f.select :network_logo_id, options_for_select(IdCard::NetworkLogo.pluck(:filename)), { include_blank: "Select/Add Network Logo", class: "rounded-r-none flex flex-col" }, data: { logo_upload_target: "logoField" } %>
</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.file_field :logo_file, 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 class="flex">
<div class="flex flex-col w-full">
<div class="flex flex-col w-1/3">
<%= f.select :provider_section_id, options_from_collection_for_select(@provider_sections, :id, :title), { include_blank: "Select/Add Network Provider Info", class: "rounded-r-none flex flex-col" }, data: { logo_upload_target: "logoField" } %>
</div>
<div class="flex flex-col w-1/3">
<%= f.select :rx_section_id, options_from_collection_for_select(@rx_sections, :id, :title), { include_blank: "Select Rx Info", class: "rounded-r-none flex flex-col" } %>
</div>
<div class="text-xl text-left font-bold text-platinum pt-4">
Claims Submission Section
</div>
<div class="flex w-full space-x-3">
<div class="flex flex-col w-1/3">
<%= render 'provider_fields', f: f %>
</div>
<div class="flex flex-col w-1/3">
<%= render 'claim_fields', f: f %>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="py-8">
<%= f.submit "Submit Network" %>
</div>
</div>
<% end %>
</div>
+1 -2
View File
@@ -1,10 +1,9 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<div class="flex space-x-6 my-5 font-bold text-4xl">
<h1 class="text-platinum">New ID Card Setup:</h1>
<h1 class="text-verdigris">(<%= @employer.name %>)</h1>
<h1 class="text-atmosphere">(<%= @employer.name %>)</h1>
</div>
<%= form_with model: @setup, local: true, multipart: true do |f| %>
<%= form_with model: @employer, url: import_employers_path, data: { turbo: false }, local: true, multipart: true do |form| %>
<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">
+63
View File
@@ -0,0 +1,63 @@
<div class="bg-deepcove h-full w-full flex flex-col">
<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>
</div>
<%= form_with model: @configuration, url: update_plans_employer_id_card_configuration_index_path(@employer.slug), local: true, multipart: true do |f| %>
<div class="flex flex-col space-y-6 pb-10">
<div class="w-full flex my-8" data-controller="add-plan" data-add-plan-form-color-value="<%= IdCard::Configuration::FORM_COLORS.to_json %>" >
<div class="flex flex-wrap w-full" data-add-plan-target="container">
<% @configuration.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-#{IdCard::Configuration::FORM_COLORS[index]}" %> "></div>
<div class="font-bold text-2xl <%= "text-#{IdCard::Configuration::FORM_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-#{IdCard::Configuration::FORM_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, @configuration.plans.build, 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="py-8">
<%= f.submit "Submit Plans" %>
</div>
</div>
<% end %>
</div>
+3 -1
View File
@@ -14,5 +14,7 @@
<div class="text-verdigris bg-verdigris border border-verdigris">co</div>
<div class="text-verdigris-tinted bg-verdigris-tinted border border-verdigris-tinted">co</div>
<div class="text-brightlava bg-brightlava border border-brightlava">co</div>
<div class="text-limegreen bg-brightlava border border-brightlava">co</div>
<div class="text-limegreen bg-limegreen border border-limegreen">co</div>
<div class="text-cobalt-vivid bg-cobalt-vivid border border-cobalt-vivid">co</div>
<div class="text-verdigris-vivid bg-verdigris-vivid border border-verdigris-vivid">co</div>