small msg changes

This commit is contained in:
Harry Bomrah 2016-07-26 14:36:28 +08:00
parent 0a7cac8ee3
commit 3b131fe6eb
1 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ class EmailEntry
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include OrbitCategory::Categorizable include OrbitCategory::Categorizable
field :mail_subject #not optional field :mail_subject #not optional
field :mail_content #not optional field :mail_content #not optional
field :create_user_id field :create_user_id
@ -31,11 +31,11 @@ class EmailEntry
status = "" status = ""
t = self.email_sentdate.nil? ? self.created_at : self.email_sentdate t = self.email_sentdate.nil? ? self.created_at : self.email_sentdate
if self.approved && t < Time.now if self.approved && t < Time.now
status = "Sent" status = "Delivered"
elsif !self.approved elsif !self.approved
status = "Waiting for approval" status = "Waiting for approval"
elsif self.approved && t > Time.now elsif self.approved && t > Time.now
status = "Mail ready to be send" status = "Scheduled for delivery"
elsif self.approved && t == Time.now elsif self.approved && t == Time.now
status = "Sending" status = "Sending"
end end