mirror of
https://github.com/System-End/shipment-viewer.git
synced 2026-04-19 22:05:10 +00:00
add boba drops! (ty @leowilkin!)
This commit is contained in:
parent
888a1ddb8e
commit
d71e045ca3
1 changed files with 63 additions and 1 deletions
|
|
@ -327,4 +327,66 @@ class HSRawPendingAGHShipment < HighSeasShipment
|
|||
end
|
||||
end
|
||||
|
||||
SHIPMENT_TYPES = [WarehouseShipment, HighSeasShipment].freeze
|
||||
class BobaDropsShipment < Shipment
|
||||
self.table_name = ENV["BOBA_TABLE"]
|
||||
self.email_column = "Email"
|
||||
|
||||
def title_text
|
||||
"Boba Drops!"
|
||||
end
|
||||
def type_text
|
||||
"Boba Drops Shipment"
|
||||
end
|
||||
|
||||
def date
|
||||
self["[Shipment Viewer] Approved/pending at"] || 'error!'
|
||||
end
|
||||
|
||||
def status_text
|
||||
case fields["Physical Status"]
|
||||
when "Pending"
|
||||
"pending!"
|
||||
when "Packed"
|
||||
"labelled!"
|
||||
when "Shipped"
|
||||
"shipped!"
|
||||
else
|
||||
"please contact leow@hackclub.com, something went wrong!"
|
||||
end
|
||||
end
|
||||
|
||||
def status_icon
|
||||
case fields["Physical Status"]
|
||||
when "Pending"
|
||||
'<i class="fa-solid fa-clock"></i>'
|
||||
when "Packed"
|
||||
'<i class="fa-solid fa-dolly"></i>'
|
||||
when "Shipped"
|
||||
'<i class="fa-solid fa-truck-fast"></i>'
|
||||
else
|
||||
'<i class="fa-solid fa-circle-exclamation"></i>'
|
||||
end
|
||||
end
|
||||
|
||||
def tracking_link
|
||||
fields["[INTL] Tracking Link"]
|
||||
end
|
||||
|
||||
def tracking_number
|
||||
fields["[INTL] Tracking ID"]
|
||||
end
|
||||
|
||||
def icon
|
||||
"🧋"
|
||||
end
|
||||
|
||||
def shipped?
|
||||
fields["Physical Status"] == 'Shipped'
|
||||
end
|
||||
|
||||
def description
|
||||
"shipment from boba drops <3"
|
||||
end
|
||||
end
|
||||
|
||||
SHIPMENT_TYPES = [WarehouseShipment, HighSeasShipment, BobaDropsShipment].freeze
|
||||
Loading…
Add table
Reference in a new issue