Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions app/models/public/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
#
Expand Down