2019-07-30 21:29:24 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-06-12 20:03:43 +00:00
|
|
|
# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later
|
|
|
|
# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/LICENSE
|
2018-03-25 17:30:42 +00:00
|
|
|
module FetchTodoStatus
|
2019-07-30 21:29:24 +00:00
|
|
|
def self.for_profile(np)
|
|
|
|
{
|
|
|
|
has_logo: np.logo?,
|
|
|
|
has_background: np.background_image?,
|
|
|
|
has_summary: np.summary?,
|
|
|
|
has_image: np.main_image?,
|
|
|
|
has_highlight: !np.achievements.join.blank?,
|
|
|
|
has_services: np.full_description?
|
|
|
|
}
|
|
|
|
end
|
2018-03-25 17:30:42 +00:00
|
|
|
|
2019-07-30 21:29:24 +00:00
|
|
|
def self.for_dashboard(np)
|
|
|
|
{
|
|
|
|
has_campaign: np.campaigns.any?,
|
|
|
|
has_event: np.events.any?,
|
|
|
|
has_donation: np.donations.any?,
|
|
|
|
has_branding: np.brand_color?,
|
|
|
|
has_bank: np.bank_account.present?,
|
|
|
|
is_paying: np.billing_plan.present?,
|
|
|
|
has_imported: np.supporters.pluck(:imported_at).any?,
|
|
|
|
is_verified: np.verification_status == 'verified' && np.bank_account.present?,
|
|
|
|
has_thank_you: np.thank_you_note.present?
|
|
|
|
}
|
|
|
|
end
|
2018-03-25 17:30:42 +00:00
|
|
|
end
|