'array',
'admin_notes' => 'array',
'email_verified_at' => 'datetime',
'admin_notified_at' => 'datetime',
'action_taken_at' => 'datetime',
'user_has_responded' => 'boolean',
'is_awaiting_more_info' => 'boolean',
'is_accepted' => 'boolean',
'is_rejected' => 'boolean',
'is_closed' => 'boolean',
];
public function adminStatusLabel()
{
if($this->user_has_responded) {
return 'Awaiting Admin Response';
}
if(!$this->email_verified_at) {
return 'Unverified email';
}
if($this->is_approved) {
return 'Approved';
}
if($this->is_rejected) {
return 'Rejected';
}
if($this->is_awaiting_more_info ) {
return 'Awaiting User Response';
}
if($this->is_closed ) {
return 'Closed';
}
return 'Open';
}
public function emailConfirmUrl()
{
return url('/auth/sign_up/confirm?sid=' . $this->id . '&code=' . $this->verify_code);
}
public function emailReplyUrl()
{
return url('/auth/sign_up/concierge?sid=' . $this->id . '&code=' . $this->verify_code . '&sc=' . str_random(8));
}
public function adminReviewUrl()
{
return url('/i/admin/curated-onboarding/show/' . $this->id);
}
}