diff --git a/app/lib/snail_mail/assets/images/flavortown/chefs.png b/app/lib/snail_mail/assets/images/flavortown/chefs.png new file mode 100644 index 00000000..8f420a18 Binary files /dev/null and b/app/lib/snail_mail/assets/images/flavortown/chefs.png differ diff --git a/app/lib/snail_mail/assets/images/flavortown/domain.png b/app/lib/snail_mail/assets/images/flavortown/domain.png new file mode 100644 index 00000000..84473611 Binary files /dev/null and b/app/lib/snail_mail/assets/images/flavortown/domain.png differ diff --git a/app/lib/snail_mail/components/templates/flavortown_free_stickers_fulfillment_template.rb b/app/lib/snail_mail/components/templates/flavortown_free_stickers_fulfillment_template.rb new file mode 100644 index 00000000..656cb11d --- /dev/null +++ b/app/lib/snail_mail/components/templates/flavortown_free_stickers_fulfillment_template.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +module SnailMail + module Components + module Templates + class FlavortownFreeStickersFulfillmentTemplate < TemplateBase + def self.template_name + "flavortown free stickers fulfillment" + end + + def self.template_description + "Flavortown Free Stickers Fulfillment" + end + + def self.show_on_single? + true + end + + def view_template + # Add your template content here + + # Example: Add an image + image( + image_path("flavortown/domain.png"), + at: [ -2.5, 295 ], + width: 443, + ) + + # Render return address + render_return_address(10, 278, 260, 70, size: 10) + + # Render destination address + render_destination_address( + 160, + 140, + 220, + 71, + size: 14, + valign: :bottom, + align: :left + ) + + # Render postal elements + render_imb(240, 24, 183) + render_qr_code(5, 115, 60) + render_letter_id(10, 65, 10, rotate: 90) + render_postage + end + + end + end + end +end diff --git a/app/lib/snail_mail/components/templates/flavortown_fulfillment_template.rb b/app/lib/snail_mail/components/templates/flavortown_fulfillment_template.rb new file mode 100644 index 00000000..0599102b --- /dev/null +++ b/app/lib/snail_mail/components/templates/flavortown_fulfillment_template.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +module SnailMail + module Components + module Templates + class FlavortownFulfillmentTemplate < TemplateBase + def self.template_name + "flavortown fulfillment" + end + + def self.template_description + "Flavortown Fulfillment" + end + + def self.show_on_single? + true + end + + def view_template + + image( + image_path("flavortown/chefs.png"), + at: [46, 260], + width: 340, + ) + + # Render return address + render_return_address(10, 278, 260, 70, size: 10) + + # Render destination address + render_destination_address( + 100, + 155, + 230, + 55, + size: 12, + valign: :center, + align: :center + ) + + # Render postal elements + render_imb(240, 24, 183) + render_qr_code(5, 65, 60) + render_letter_id(10, 19, 10) + + render_postage + end + + end + end + end +end diff --git a/app/models/public/user.rb b/app/models/public/user.rb index 64744217..4dd04a0c 100644 --- a/app/models/public/user.rb +++ b/app/models/public/user.rb @@ -7,6 +7,11 @@ # opted_out_of_map :boolean default(FALSE) # created_at :datetime not null # updated_at :datetime not null +# hca_id :string +# +# Indexes +# +# index_public_users_on_hca_id (hca_id) UNIQUE # class Public::User < ApplicationRecord has_many :login_codes diff --git a/app/models/user.rb b/app/models/user.rb index 23cbca6f..cb0a93da 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -12,13 +12,14 @@ # username :string # created_at :datetime not null # updated_at :datetime not null +# hca_id :string # home_mid_id :bigint default(1), not null # home_return_address_id :bigint default(1), not null -# hca_id :string # slack_id :string # # Indexes # +# index_users_on_hca_id (hca_id) UNIQUE # index_users_on_home_mid_id (home_mid_id) # index_users_on_home_return_address_id (home_return_address_id) #