presentation updates
This commit is contained in:
@@ -49,6 +49,7 @@ export default Ember.Component.extend
|
|||||||
|
|
||||||
init: ->
|
init: ->
|
||||||
@_super()
|
@_super()
|
||||||
|
@set "filters.#{@get('key')}", [] unless Ember.isArray(@get("filters.#{@get('key')}")) # ensure selected to be an array
|
||||||
Ember.defineProperty @, 'selected', Ember.computed.alias("filters.#{@get('key')}")
|
Ember.defineProperty @, 'selected', Ember.computed.alias("filters.#{@get('key')}")
|
||||||
|
|
||||||
actions:
|
actions:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import Ember from 'ember'
|
import Ember from 'ember'
|
||||||
import BaseModal from 'ember-cli-dunlop/components/modals/base'
|
import BaseModal from 'ember-cli-dunlop/mixins/modal-base'
|
||||||
|
#import BaseModal from 'components/modals/base'
|
||||||
export default BaseModal.extend
|
export default BaseModal.extend
|
||||||
current_selected: Ember.computed.alias 'modal_options.base.value'
|
current_selected: Ember.computed.alias 'modal_options.base.value'
|
||||||
options: Ember.computed.alias 'modal_options.base.options'
|
options: Ember.computed.alias 'modal_options.base.options'
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{{yield (hash
|
{{yield (hash
|
||||||
input=(component "table-filters/input" apply_filters=(action 'apply_filters') filters=filters)
|
input = (component "table-filters/input" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
date=(component "table-filters/date" apply_filters=(action 'apply_filters') filters=filters)
|
date = (component "table-filters/date" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
date-range=(component "table-filters/date-range" apply_filters=(action 'apply_filters') filters=filters)
|
date-range = (component "table-filters/date-range" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
number-range=(component "table-filters/number-range" apply_filters=(action 'apply_filters') filters=filters)
|
number-range = (component "table-filters/number-range" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
dropdown-select=(component "table-filters/dropdown-select" apply_filters=(action 'apply_filters') filters=filters)
|
dropdown-select = (component "table-filters/dropdown-select" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
dropdown-select-multiple=(component "table-filters/dropdown-select-multiple" apply_filters=(action 'apply_filters') filters=filters)
|
dropdown-select-multiple = (component "table-filters/dropdown-select-multiple" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
option-buttons=(component "table-filters/option-buttons" apply_filters=(action 'apply_filters') filters=filters)
|
option-buttons = (component "table-filters/option-buttons" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
boolean-checkboxes=(component "table-filters/boolean-checkboxes" apply_filters=(action 'apply_filters') filters=filters)
|
boolean-checkboxes = (component "table-filters/boolean-checkboxes" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
select-multiple=(component "table-filters/select-multiple" apply_filters=(action 'apply_filters') filters=filters)
|
select-multiple = (component "table-filters/select-multiple" apply_filters=(action 'apply_filters') filters=filters)
|
||||||
actions=(component 'table-filters/actions' apply_filters=(action 'apply_filters') clear_filters=(action 'clear_filters') filter_calls=filter_calls)
|
actions = (component 'table-filters/actions' apply_filters=(action 'apply_filters') clear_filters=(action 'clear_filters') filter_calls=filter_calls)
|
||||||
)}}
|
)}}
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
button.ui.tiny.icon.button{action 'edit_selection'} title=selectedTitle
|
||||||
|
i.list.icon
|
||||||
|
== selected_display
|
||||||
|
= yield
|
||||||
|
h1 adsaf
|
||||||
@@ -6,5 +6,26 @@ export default Ember.Controller.extend
|
|||||||
{id: "B1", grumpy: "Cool name for B1!"}
|
{id: "B1", grumpy: "Cool name for B1!"}
|
||||||
{id: "B2", grumpy: "Cool name for B2!"}
|
{id: "B2", grumpy: "Cool name for B2!"}
|
||||||
]
|
]
|
||||||
|
apply_filters: ->
|
||||||
|
Ember.$('.page-title').click()
|
||||||
|
query = @get('filters')?.toProperties() || {}
|
||||||
|
console.log "QUERY"
|
||||||
|
console.log query
|
||||||
|
if query.target_week
|
||||||
|
[week, year] = query.target_week.split('-')
|
||||||
|
delete query.target_week
|
||||||
|
query.week_eq = week
|
||||||
|
query.year_eq = year
|
||||||
|
@set 'model.page', 1
|
||||||
|
@set 'model.lastPage', null
|
||||||
|
@get('model').setOtherParam('q', query)
|
||||||
|
false
|
||||||
|
|
||||||
a: 3
|
actions:
|
||||||
|
clear_filter: (keys...) ->
|
||||||
|
keys.forEach (key) =>
|
||||||
|
if Ember.isArray(@get("filters.#{key}"))
|
||||||
|
@set "filters.#{key}", []
|
||||||
|
else
|
||||||
|
@set "filters.#{key}", null
|
||||||
|
@apply_filters()
|
||||||
|
|||||||
@@ -0,0 +1,117 @@
|
|||||||
|
window.client_id ||= "client#{Math.round(Math.random()*10000)}"
|
||||||
|
state_names =
|
||||||
|
planned: 'Planned'
|
||||||
|
active: 'Active'
|
||||||
|
overdue: 'Overdue'
|
||||||
|
all_completed: 'Completed'
|
||||||
|
default_globals =
|
||||||
|
flash_message: ''
|
||||||
|
preload_resources_fulfilled: true
|
||||||
|
first_day_of_week: 1
|
||||||
|
current_user: null
|
||||||
|
workflow_action_definition:
|
||||||
|
value_type_options: ['boolean', 'date', 'number', 'select', 'string', 'text', 'timestamp']
|
||||||
|
workflow_action_offset:
|
||||||
|
offset_unit_options: ['day']
|
||||||
|
location_planning:
|
||||||
|
filter_scopes:
|
||||||
|
with_changed_planning: 'Aangepaste planning'
|
||||||
|
is_instructed: 'Allinq aangestuurd'
|
||||||
|
is_not_instructed: 'Allinq niet aangestuurd'
|
||||||
|
with_unequal_number_of_cards: '# cards verschil'
|
||||||
|
with_more_netcap_cards_than_calculated: 'NetCap overschot'
|
||||||
|
with_less_netcap_cards_than_calculated: 'NetCap tekort'
|
||||||
|
|
||||||
|
migration_window_planning:
|
||||||
|
filter_scopes:
|
||||||
|
epots_ready_without_work_order: 'ePOTS ready zonder work-order'
|
||||||
|
with_changed_planning: 'Aangepaste HAN planning'
|
||||||
|
#with_remarks: 'Meldingen!'
|
||||||
|
with_non_active_dslam_cards: 'Inactieve DSLAM cards'
|
||||||
|
with_work_order: 'Met work order'
|
||||||
|
without_work_order: 'Zonder work order'
|
||||||
|
with_different_target_week: 'Andere forecast week'
|
||||||
|
with_different_target_date: 'Andere forecast dag'
|
||||||
|
with_work_order_epots_ready_not_realized: 'Met work-order, ePOTS ready niet opgeleverd'
|
||||||
|
|
||||||
|
time_formatting: 'YYYY-MM-DD HH:mm'
|
||||||
|
date_formatting: 'DD-MM-YYYY'
|
||||||
|
state_names: state_names
|
||||||
|
project_instance_states: [
|
||||||
|
'planned'
|
||||||
|
'active'
|
||||||
|
'overdue'
|
||||||
|
'all_completed'
|
||||||
|
].map (state) -> {id: state, label: state_names[state]}
|
||||||
|
attention_incident:
|
||||||
|
sources: [
|
||||||
|
{id: 'allinq-daily-report', label: 'Allinq daily report'}
|
||||||
|
{id: 'work-order-epots-ready-existence-check', label: 'ePOTS ready daily check'}
|
||||||
|
{id: 'work-order-create-epots-ready-check', label: 'work-order create ePOTS ready check'}
|
||||||
|
{id: 'kanvas-f107-source-file', label: 'Kanvas F107 source file HAN HOST-1 -> Kanvas host-name'}
|
||||||
|
]
|
||||||
|
|
||||||
|
format_date:
|
||||||
|
compact_month: (->
|
||||||
|
date: (jsdate, settings) ->
|
||||||
|
return '' unless jsdate
|
||||||
|
current_year = new Date().getFullYear()
|
||||||
|
mdate = moment(jsdate)
|
||||||
|
if jsdate.getFullYear() isnt current_year
|
||||||
|
mdate.format('D MMM YYYY')
|
||||||
|
else
|
||||||
|
mdate.format('D MMM')
|
||||||
|
).property()
|
||||||
|
|
||||||
|
# overloaded by adapters/epots/config/settings.yml
|
||||||
|
coarsing_date:
|
||||||
|
quarter_threshold: 147 # 21 weeks
|
||||||
|
month_threshold: 98 # 14 weeks
|
||||||
|
week_threshold: 49 # 7 weeks
|
||||||
|
|
||||||
|
week_days: [
|
||||||
|
{name: 'monday', index: 1}
|
||||||
|
{name: 'tuesday', index: 2}
|
||||||
|
{name: 'wednesday', index: 3}
|
||||||
|
{name: 'thursday', index: 4}
|
||||||
|
{name: 'friday', index: 5}
|
||||||
|
{name: 'saturday', index: 6}
|
||||||
|
{name: 'sunday', index: 0}
|
||||||
|
]
|
||||||
|
project:
|
||||||
|
instance_scope_options: ['instance', 'batch']
|
||||||
|
workflow_group:
|
||||||
|
batch_element_threshold_unit_options: ['businessday', 'day', 'week']
|
||||||
|
project_instance_action:
|
||||||
|
states: ['pending', 'planned', 'overdue', 'rejected', 'completed']
|
||||||
|
project_instance_group:
|
||||||
|
states: ['pending', 'processing', 'overdue', 'completed']
|
||||||
|
#if window.app_globals
|
||||||
|
# for key, value of window.app_globals
|
||||||
|
# debugger
|
||||||
|
# Globals[key] = value
|
||||||
|
|
||||||
|
default_globals.attention_incident.source = {}
|
||||||
|
for s in default_globals.attention_incident.sources
|
||||||
|
default_globals.attention_incident.source[s.id] = s.label
|
||||||
|
|
||||||
|
export globals = Ember.Object.create default_globals, window.app_globals
|
||||||
|
|
||||||
|
initialize = (application) ->
|
||||||
|
application.register 'service:globals', globals, instantiate: false #, singleton: true
|
||||||
|
application.inject 'controller', 'globals', 'service:globals'
|
||||||
|
application.inject 'component', 'globals', 'service:globals'
|
||||||
|
application.inject 'component', 'router', 'router:main'
|
||||||
|
#application.inject 'component', 'store', 'store:main'
|
||||||
|
#application.inject 'component', 'store', 'service:store'
|
||||||
|
application.inject 'view', 'globals', 'service:globals'
|
||||||
|
application.inject 'router', 'globals', 'service:globals'
|
||||||
|
|
||||||
|
GlobalsInitializer =
|
||||||
|
name: 'globals'
|
||||||
|
initialize: initialize
|
||||||
|
|
||||||
|
export {initialize, state_names}
|
||||||
|
export default GlobalsInitializer
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import Ember from 'ember'
|
||||||
|
import DunlopApplicationRoute from 'ember-cli-dunlop/mixins/application-route'
|
||||||
|
|
||||||
|
export default Ember.Route.extend DunlopApplicationRoute,
|
||||||
|
_loadCurrentUser: -> # disable authentication magic for now
|
||||||
|
|
||||||
@@ -9,8 +9,8 @@ table.ui.celled.striped.compact.table.sortable
|
|||||||
/th date-range
|
/th date-range
|
||||||
= sortable-table-header filters=filters key='target_date' model=model
|
= sortable-table-header filters=filters key='target_date' model=model
|
||||||
/= sortable-table-header filters=filters key='target_date' action=(invoke 'reload' model) model=model
|
/= sortable-table-header filters=filters key='target_date' action=(invoke 'reload' model) model=model
|
||||||
th select-multiple
|
th dropdown-select-multiple
|
||||||
th select-multiple-modal
|
th select-multiple (using modal)
|
||||||
th CUSTOM
|
th CUSTOM
|
||||||
th number-range
|
th number-range
|
||||||
th dropdown-select
|
th dropdown-select
|
||||||
@@ -27,13 +27,15 @@ table.ui.celled.striped.compact.table.sortable
|
|||||||
button.ui.mini.primary.button{action 'set_filter_target_date_this_week'}= t 'date.this_week'
|
button.ui.mini.primary.button{action 'set_filter_target_date_this_week'}= t 'date.this_week'
|
||||||
'
|
'
|
||||||
button.ui.mini.primary.button{action 'set_filter_target_date_next_fifteen_weeks'} Nu ↔ 15 weken
|
button.ui.mini.primary.button{action 'set_filter_target_date_next_fifteen_weeks'} Nu ↔ 15 weken
|
||||||
th
|
= filter.dropdown-select-multiple key='dropdown_select_multiple_ids_in' options=scenario_classification_objects labelPath='grumpy'
|
||||||
th
|
= filter.select-multiple key='select_multiple_modal_ids_in' options=scenario_classification_objects valueKey='id' textKey='grumpy'
|
||||||
th class=filters.target_week:active-filter
|
th class=filters.target_week:active-filter
|
||||||
if filters.target_week
|
if filters.target_week
|
||||||
|
|
|
|
||||||
span= filters.target_week
|
span= filters.target_week
|
||||||
i.close.icon.clear-target-week-filter{action 'clear_filter' 'target_week'}
|
i.close.icon.clear-target-week-filter{action 'clear_filter' 'target_week'}
|
||||||
|
else
|
||||||
|
i.filter.icon{action 'set_filter' 'target_week' '7-2018'}
|
||||||
= filter.number-range key='age' inclusive=true
|
= filter.number-range key='age' inclusive=true
|
||||||
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_options
|
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_options
|
||||||
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_objects labelPath='grumpy'
|
= filter.dropdown-select key='location_planning_scenario_classification' options=scenario_classification_objects labelPath='grumpy'
|
||||||
|
|||||||
Reference in New Issue
Block a user