Its been a while

This commit is contained in:
Jason Jordan
2026-07-23 10:32:51 -04:00
parent 5a90ea6e14
commit 56009fa158
70 changed files with 686 additions and 147 deletions
+7
View File
@@ -0,0 +1,7 @@
class AdminsController < ApplicationController
def new_web_user
@employers = Employer.active
@brokers = Broker.all
@carrier = Carrier.all
end
end
@@ -0,0 +1,39 @@
module Api
module V1
class WebIdCardsController < ApplicationController
def member_card
pb_entity_key = params[:id]
layout = params[:layout]
member = Member.find_by(pb_entity_key: pb_entity_key)
if member.present?
member_card = IdCardPrinterService::CardsGenerator.new(member.member_key, layout).call
send_data member_card.to_pdf,
filename: "#{member.name.gsub(", ", "_")}_digital_card_#{Date.today}.pdf",
type: "application/pdf",
disposition: 'inline'
else
render json: { error: "Member not found" }, status: :not_found
end
end
def employer_cards
pl_plan_key = params[:id]
employer = Employer.find_by(pl_plan_key: pl_plan_key)
if employer.present?
employer_cards = IdCardPrinterService::CardsGenerator.new(employer.employer_member_keys, "FullPageCard", true).call
employer_cards.rewind
send_data employer_cards.sysread,
filename: "#{employer.name.parameterize(separator: "_")}_full_page_cards_#{Date.today}.zip",
type: 'application/zip',
disposition: 'inline'
else
render json: { error: "Employer not found" }, status: :not_found
end
end
end
end
end
+1 -1
View File
@@ -2,7 +2,7 @@
class ApplicationController < ActionController::Base
include Pundit::Authorization
before_action :authenticate_user!
# before_action :authenticate_user!
def after_sign_in_path_for(resource)
stored_location_for(resource) || dashboard_path
@@ -66,6 +66,7 @@ module IdCard
def update_field_exceptions
field_exceptions_params = IdCard::FieldException.permitted_params(params)
puts field_exceptions_params
if @setup.update(field_exceptions_params)
puts "sucess"
redirect_to employer_path(@setup.employer.slug), notice: 'ID Card Exceptions successfully updated.'