mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Show info icon as orange if invitation opened but not viewed
This commit is contained in:
parent
2a328627ac
commit
769465542d
@ -214,6 +214,7 @@ class InvoiceController extends BaseController
|
||||
$contact->email_error = $invitation->email_error;
|
||||
$contact->invitation_link = $invitation->getLink();
|
||||
$contact->invitation_viewed = $invitation->viewed_date && $invitation->viewed_date != '0000-00-00 00:00:00' ? $invitation->viewed_date : false;
|
||||
$contact->invitation_openend = $invitation->opened_date && $invitation->opened_date != '0000-00-00 00:00:00' ? $invitation->opened_date : false;
|
||||
$contact->invitation_status = $contact->email_error ? false : $invitation->getStatus();
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@
|
||||
data-bind="visible: $data.email_error, tooltip: {title: $data.email_error}"></span>
|
||||
<span style="vertical-align:text-top" class="glyphicon glyphicon-info-sign"
|
||||
data-bind="visible: $data.invitation_status, tooltip: {title: $data.invitation_status, html: true},
|
||||
style: {color: $data.hasOwnProperty('invitation_viewed') && $data.invitation_viewed() ? '#57D172':'#B1B5BA'}"></span>
|
||||
style: {color: $data.info_color}"></span>
|
||||
@endif
|
||||
</span>
|
||||
</div>
|
||||
|
@ -615,6 +615,7 @@ function ContactModel(data) {
|
||||
self.send_invoice = ko.observable(false);
|
||||
self.invitation_link = ko.observable('');
|
||||
self.invitation_status = ko.observable('');
|
||||
self.invitation_openend = ko.observable(false);
|
||||
self.invitation_viewed = ko.observable(false);
|
||||
self.email_error = ko.observable('');
|
||||
|
||||
@ -656,6 +657,16 @@ function ContactModel(data) {
|
||||
|
||||
return str;
|
||||
});
|
||||
|
||||
self.info_color = ko.computed(function() {
|
||||
if (self.invitation_viewed()) {
|
||||
return '#57D172';
|
||||
} else if (self.invitation_openend()) {
|
||||
return '#FFCC00';
|
||||
} else {
|
||||
return '#B1B5BA';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function ItemModel(data) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user