Added Tiki if no open but closed tickets exist.
This commit is contained in:
parent
2c1d018faf
commit
b09de6aec9
4 changed files with 28 additions and 1 deletions
|
@ -1,4 +1,7 @@
|
|||
class App.OrganizationProfile extends App.Controller
|
||||
events:
|
||||
'focusout [data-type=update]': 'update'
|
||||
|
||||
constructor: (params) ->
|
||||
super
|
||||
|
||||
|
@ -116,6 +119,14 @@ class App.OrganizationProfile extends App.Controller
|
|||
items: actions
|
||||
)
|
||||
|
||||
update: (e) =>
|
||||
console.log('update')
|
||||
note = $(e.target).ceg()
|
||||
org = App.Organization.find( @organization_id )
|
||||
if org.note isnt note
|
||||
org.updateAttributes( note: note )
|
||||
@log 'notice', 'update', e, note, org
|
||||
|
||||
class Router extends App.ControllerPermanent
|
||||
constructor: (params) ->
|
||||
super
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
class App.UserProfile extends App.Controller
|
||||
events:
|
||||
'focusout [data-type=update]': 'update',
|
||||
'focusout [data-type=update]': 'update'
|
||||
|
||||
constructor: (params) ->
|
||||
super
|
||||
|
|
|
@ -64,10 +64,14 @@ class App.TicketStats extends App.Controller
|
|||
)
|
||||
|
||||
limit = 5
|
||||
iconClass = ''
|
||||
if data.user_tickets_open_ids.length is 0 && data.user_tickets_closed_ids.length > 0
|
||||
iconClass = 'mood icon supergood-state'
|
||||
new TicketStatsList(
|
||||
el: @$('.js-user-open-tickets')
|
||||
user: @user
|
||||
head: 'Open Ticket'
|
||||
iconClass: iconClass
|
||||
ticket_ids: data.user_tickets_open_ids
|
||||
limit: limit
|
||||
)
|
||||
|
@ -84,10 +88,14 @@ class App.TicketStats extends App.Controller
|
|||
ticket_volume_by_year: data.user_ticket_volume_by_year
|
||||
)
|
||||
|
||||
iconClass = ''
|
||||
if data.org_tickets_open_ids.length is 0 && data.org_tickets_closed_ids.length > 0
|
||||
iconClass = 'mood icon supergood-state'
|
||||
new TicketStatsList(
|
||||
el: @$('.js-org-open-tickets')
|
||||
user: @user
|
||||
head: 'Open Ticket'
|
||||
iconClass: iconClass
|
||||
ticket_ids: data.org_tickets_open_ids
|
||||
limit: limit
|
||||
)
|
||||
|
@ -127,10 +135,12 @@ class TicketStatsList extends App.Controller
|
|||
@html App.view('widget/ticket_stats_list')(
|
||||
user: @user
|
||||
head: @head
|
||||
iconClass: @iconClass
|
||||
ticket_ids: @ticket_ids
|
||||
ticket_ids_show: ticket_ids_show
|
||||
limit: @limit
|
||||
)
|
||||
|
||||
@frontendTimeUpdate()
|
||||
@ticketPopups()
|
||||
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ol>
|
||||
<% if @ticket_ids.length is 0: %>
|
||||
<div class="profile-ticketsPlaceholder vertical centered">
|
||||
<div class="<%- @iconClass %>"></div>
|
||||
<%- @T('No Tickets') %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @ticket_ids.length > @ticket_ids_show.length: %>
|
||||
<a href="#" class="js-showAll"><%- @T('Show all ...') %></a>
|
||||
<% end %>
|
Loading…
Reference in a new issue