Implement statistics components
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default } from 'ember-panda/components/organization-statistics1';
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from 'ember-panda/components/user-main-statistics1';
|
||||
@@ -1,6 +1,6 @@
|
||||
import Ember from 'ember'
|
||||
export default Ember.Route.extend
|
||||
model: -> @store.findAll('panda/project')
|
||||
model: -> @store.findAll('panda/project', backgroundReload: false)
|
||||
actions:
|
||||
editProjectsContext: ->
|
||||
@modal 'project/edit-projects-context'
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
if statistics
|
||||
ui-checkbox class='toggle' label=(t 'user.statistics1.project_specific.label') checked=project_specific onChange=(action (mut project_specific))
|
||||
if project_specific
|
||||
each-in statistics as |project_name stats|
|
||||
.ui.header= project_name
|
||||
= each stats as |stat|
|
||||
= state-badge stat.state
|
||||
'
|
||||
span.between-brackets= stat.count
|
||||
else
|
||||
/.ui.header= t 'user.statistics1.global.title'
|
||||
each-in statistics as |state count|
|
||||
= state-badge state
|
||||
'
|
||||
span.between-brackets= count
|
||||
= yield
|
||||
else
|
||||
.ui.active.inline.centered.loader
|
||||
@@ -0,0 +1,23 @@
|
||||
if user.email
|
||||
/.ui.horizontal.divider= user.nickname
|
||||
span.ui.segment.pull-right= user.nickname
|
||||
if statistics
|
||||
ui-checkbox class='toggle' label=(t 'user.statistics1.project_specific.label') checked=project_specific onChange=(action (mut project_specific))
|
||||
if project_specific
|
||||
each-in statistics as |project_name stats|
|
||||
.ui.header= project_name
|
||||
= each stats as |stat|
|
||||
= state-badge stat.state
|
||||
'
|
||||
span.between-brackets= stat.count
|
||||
else
|
||||
/.ui.header= t 'user.statistics1.global.title'
|
||||
each-in statistics as |state count|
|
||||
= state-badge state
|
||||
'
|
||||
span.between-brackets= count
|
||||
= yield
|
||||
else
|
||||
.ui.active.inline.centered.loader
|
||||
else
|
||||
.ui.active.inline.centered.loader
|
||||
@@ -3,9 +3,10 @@ d-breadcrumbs as |breadcrumb|
|
||||
= t 'models.plural.organization'
|
||||
.ui.container
|
||||
h3.ui.top.attached.header
|
||||
.ui.right.floated.icon.buttons
|
||||
/= push-action type='edit' action='editOrganizationContext'
|
||||
= push-action type='new' action='newOrganization' description='Add organization'
|
||||
if (can 'manage' 'model' 'panda/organization')
|
||||
.ui.right.floated.icon.buttons
|
||||
/= push-action type='edit' action='editOrganizationContext'
|
||||
= push-action type='new' action='newOrganization' description='Add organization'
|
||||
= t 'models.plural.organization'
|
||||
table.ui.unstackable.bottom.attached.table
|
||||
/thead
|
||||
@@ -19,4 +20,5 @@ d-breadcrumbs as |breadcrumb|
|
||||
if organization.logo
|
||||
img src=organization.logo_url.small
|
||||
td= link-to organization.name 'organization.show' organization
|
||||
td.actions= push-action type='edit' action='editOrganization' model=organization
|
||||
if (can 'manage' 'model' 'panda/organization')
|
||||
td.actions= push-action type='edit' action='editOrganization' model=organization
|
||||
|
||||
@@ -9,8 +9,8 @@ d-breadcrumbs as |breadcrumb|
|
||||
.ui.container
|
||||
.ui.header
|
||||
.ui.right.floated.icon.buttons
|
||||
if is_manager
|
||||
= push-action type='edit' action='editOrganization'
|
||||
if (can 'manage' 'model' 'panda/organization')
|
||||
= push-action type='edit' action='editOrganization' model=model
|
||||
h2
|
||||
span.resource-descriptor= t 'models.organization'
|
||||
span.resource-name= model.name
|
||||
@@ -20,6 +20,7 @@ d-breadcrumbs as |breadcrumb|
|
||||
ul.ui.list
|
||||
li= link-to 'organization.show.project-actions' model
|
||||
span= t 'organization.project_actions.title'
|
||||
organization-statistics1 record=model
|
||||
|
||||
/= line-chart data=chart_data
|
||||
/= gantt-chart organization=model
|
||||
|
||||
Reference in New Issue
Block a user