You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/09/24 15:46:43 UTC
[whimsy] branch master updated: rework post-meeting actions - client
This is an automated email from the ASF dual-hosted git repository.
rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 24cdd6e rework post-meeting actions - client
24cdd6e is described below
commit 24cdd6e766a44a322be659882fc6800434b880bf
Author: Sam Ruby <ru...@intertwingly.net>
AuthorDate: Sun Sep 24 11:45:18 2017 -0400
rework post-meeting actions - client
---
www/board/agenda/views/pages/adjournment.js.rb | 159 +++++++++++--------------
1 file changed, 68 insertions(+), 91 deletions(-)
diff --git a/www/board/agenda/views/pages/adjournment.js.rb b/www/board/agenda/views/pages/adjournment.js.rb
index 2dc8ea1..10cbf40 100644
--- a/www/board/agenda/views/pages/adjournment.js.rb
+++ b/www/board/agenda/views/pages/adjournment.js.rb
@@ -6,6 +6,8 @@ class Adjournment < Vue
def initialize
@add = []
@remove = []
+ @change = []
+ @terminate = []
@establish = []
@feedback = []
@minutes = {}
@@ -48,7 +50,7 @@ class Adjournment < Vue
if
Todos.add.empty? and Todos.remove.empty? and
- Todos.establish.empty?
+ Todos.change.empty? and Todos.establish.empty?
then
if Todos.loading
_em 'Loading...'
@@ -58,18 +60,16 @@ class Adjournment < Vue
end
end
- unless Todos.add.empty?
- _TodoActions action: 'add'
+ unless
+ Todos.add.empty? and Todos.change.empty? and Todos.establish.empty?
+ then
+ _PMCActions
end
unless Todos.remove.empty?
_TodoActions action: 'remove'
end
- unless Todos.establish.empty?
- _EstablishActions action: 'remove'
- end
-
unless Todos.feedback.empty?
_FeedbackReminder
end
@@ -137,6 +137,67 @@ class Adjournment < Vue
end
end
+class PMCActions < Vue
+ def initialize
+ @resolutions = []
+ end
+
+ def render
+ _p do
+ _a 'PMC resolutions:',
+ href: 'https://infra.apache.org/officers/tlpreq'
+ end
+
+ _ul.checklist @resolutions do |item|
+ _li do
+ _input type: 'checkbox', checked: item.checked,
+ onChange:-> { item.checked = !item.checked; self.refresh() }
+
+ _Link text: item.title, href: Todos.link(item.title)
+
+ if item.minutes
+ _ ' - '
+ _Link text: item.minutes, href: Todos.link(item.title)
+ end
+ end
+ end
+
+ _button.checklist.btn.btn_default 'Submit', disabled: @disabled,
+ onClick: self.submit
+ end
+
+ # update check marks based on current Todo list
+ def created()
+ @resolutions = []
+ Agenda.index.each do |item|
+ if Todos.change.any? {|todo| todo.resolution == item.title}
+ action = :change
+ elsif Todos.establish.any? {|todo| todo.resolution == item.title}
+ action = :establish
+ elsif Todos.terminate.any? {|todo| todo.resolution == item.title}
+ action = :terminate
+ else
+ next
+ end
+
+ minutes = Minutes.get(item.title)
+
+ @resolutions << {
+ action: action,
+ title: item.title,
+ minutes: minutes,
+ checked: (minutes != 'tabled')
+ }
+ end
+
+ self.refresh()
+ end
+
+ def refresh()
+ @disabled = @resolutions.all? {|item| not item.checked}
+ end
+end
+
########################################################################
# Add, Remove chairs #
########################################################################
@@ -229,90 +290,6 @@ class TodoActions < Vue
end
########################################################################
-# Establish actions #
-########################################################################
-
-class EstablishActions < Vue
- def initialize
- @checked = {}
- @disabled = true
- @podlings = []
- end
-
- # update check marks based on current Todo list
- def created()
- @podlings = Todos.establish
-
- # uncheck podlings that were removed
- for name in @checked
- unless @podlings.any? {|podling| podling.name == name}
- @checked[name] = false
- end
- end
-
- # check podlings that were added
- @podlings.each do |podling|
- if @checked[podling.name] == undefined
- if not podling.resolution or Minutes.get(podling.resolution) != 'tabled'
- @checked[podling.name] = true
- end
- end
- end
-
- self.refresh()
- end
-
- def refresh()
- # disable button if nobody is checked
- disabled = true
- for id in @checked
- disabled = false if @checked[id]
- end
- @disabled = disabled
-
- Vue.forceUpdate()
- end
-
- def render
- _p do
- _a 'Establish pmcs:',
- href: 'https://infra.apache.org/officers/tlpreq'
- end
-
- _ul.checklist @podlings do |podling|
- _li do
- _input type: 'checkbox', checked: @checked[podling.name],
- onChange:-> {
- @checked[podling.name] = !@checked[podling.name]
- self.refresh()
- }
-
- _span podling.name
-
- resolution = Minutes.get(podling.resolution)
- if resolution
- _ ' - '
- _Link text: resolution, href: Todos.link(podling.resolution)
- end
- end
- end
-
- _button.checklist.btn.btn_default 'Submit', disabled: @disabled,
- onClick: self.submit
- end
-
- def submit()
- @disabled = true
- data = {establish: @checked}
-
- post "secretary-todos/#{Agenda.title}", data do |todos|
- @disabled = false
- Todos.set todos
- end
- end
-end
-
-########################################################################
# Reminder to draft feedback #
########################################################################
--
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <co...@whimsical.apache.org>'].