This is an automated email from the ASF dual-hosted git repository.

sebb 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 857a72a9 Allow for filing membership app after closing date
857a72a9 is described below

commit 857a72a9eafecbb58ff67fe9f70ea1978e8fbca0
Author: Sebb <s...@apache.org>
AuthorDate: Sat Mar 16 23:04:35 2024 +0000

    Allow for filing membership app after closing date
---
 www/secretary/workbench/server.rb            | 6 +++++-
 www/secretary/workbench/views/memapp.json.rb | 9 ++-------
 www/secretary/workbench/views/parts.js.rb    | 7 ++++++-
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/www/secretary/workbench/server.rb 
b/www/secretary/workbench/server.rb
index 4b75f7a1..f563cfe6 100644
--- a/www/secretary/workbench/server.rb
+++ b/www/secretary/workbench/server.rb
@@ -196,7 +196,11 @@ get %r{/(\d{6})/(\w+)/_index_} do |month, hash|
   @appmtime = Wunderbar::Asset.convert(File.join(settings.views, 
'app.js.rb')).mtime.to_i
   @projects = (ASF::Podling.current+ASF::Committee.pmcs).map(&:name).sort
 
-  @meeting = ASF::MeetingUtil.applications_valid
+  # Check if applications closed; if so, check it application was received in 
time
+  # Default to 'now' if envelope date not found; hopefully won't be triggered 
as emails
+  # should now all have the field set up
+  @meeting = ASF::MeetingUtil.applications_valid ||
+    ASF::MeetingUtil.application_valid?(@headers[:envelope_date] || 
DateTime.now.iso8601)
 
   _html :parts
 end
diff --git a/www/secretary/workbench/views/memapp.json.rb 
b/www/secretary/workbench/views/memapp.json.rb
index 919d9dc2..f89d7738 100644
--- a/www/secretary/workbench/views/memapp.json.rb
+++ b/www/secretary/workbench/views/memapp.json.rb
@@ -2,12 +2,7 @@ require 'whimsy/asf/meeting-util'
 
 # parse and return the contents of the latest memapp-received file
 
-hoursremain = ASF::MeetingUtil.application_time_remaining[:hoursremain]
-
-if hoursremain > 0 # Not yet expired
-  table = ASF::MeetingUtil.parse_memapp_to_h.sort_by{|k| k[:name]}
-else
-  table = []
-end
+# Application expiry is now handled by the GUI
+table = ASF::MeetingUtil.parse_memapp_to_h.sort_by{|k| k[:name]}
 
 {received: table}
diff --git a/www/secretary/workbench/views/parts.js.rb 
b/www/secretary/workbench/views/parts.js.rb
index ff75314e..901792a5 100644
--- a/www/secretary/workbench/views/parts.js.rb
+++ b/www/secretary/workbench/views/parts.js.rb
@@ -149,12 +149,17 @@ class Parts < Vue
             _span 'software grant'
           end
 
-          if @@meeting
+          if @@meeting && false
             _label do
               _input type: 'radio', name: 'doctype', value: 'mem',
                 onClick: -> {@form = MemApp}
               _span 'membership application'
             end
+          else
+            _label do
+              _input type: 'radio', name: 'doctype', disabled: true
+              _span '(membership application arrived after the closing date)'
+            end
           end
 
           _label do

Reply via email to