Action and Interview List: Suggested Date

Discussions about the Leader and Clerk Resources on lds.org.
Post Reply
tleish
New Member
Posts: 13
Joined: Tue Nov 01, 2011 11:16 pm

Action and Interview List: Suggested Date

#1

Post by tleish »

Background

As an Executive Secretary, I'm using the Action and Interview List on a frequent basis. The majority of the interviews are scheduled the Sunday prior to their birthday. My workflow for planning ahead for interview deadlines goes as follows:
  1. Click on calendar input
  2. Click on click on the right arrow to go to the next month
  3. Look at the Members birthday
  4. Locate and select the Sunday prior to their birthday
I personally use this a list of "When to Schedule an Interview", not a historical record of when the "Actual Interview" took place.

Feature Suggestion

It might be helpful to add an additional column next to "Suggested Action" titled "Suggested Date" with the Sunday prior to their Birthday. This date acts as a good "deadline" by which the interview should be scheduled. A click on the prior Sunday date could copy the date to the Interview Date field.

Tampermonkey/Greasemonkey

For those familiar with Chrome Tampermonkey of Firefox Greasemonkey, I've written a user script that sets the default date for the popup calendar to the Sunday prior to their birthday. Works well for my purposes and thought I'd share.

Code: Select all

// ==UserScript==
// @name       Bishopric - Action Interview List
// @namespace  http://tleish.com/
// @version    0.1
// @description  For the LDS Bishopric Action and Interview List this script sets the default date for the popup calendar to the Sunday prior to their birthday
// @include /^https://www.lds.org/mls/mbr/report/action-interview-list.+$/
// @require https://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js
// @copyright  2014+, tleish
// ==/UserScript==

var InterviewDate = (function() {
  var TODAY = new Date();
  var THIS_YEAR = TODAY.getFullYear();
  var NEXT_YEAR = THIS_YEAR + 1;
  var $input;

  var calc = function($ele){
    $input = $ele;
    return (parse_birthday()) ? calc_next_birthday() : TODAY;
  };

  var parse_birthday = function(){
    var birth_str = $input.closest('tr').find('td:nth-child(4)').text();
    return Date.parseExact(birth_str, "yyyyMd");
  };

  var calc_next_birthday = function(){
    var next_bday = parse_birthday();
    next_bday.set({ year: THIS_YEAR });
    if( TODAY.isAfter(next_bday) ){
      next_bday.set({ year: NEXT_YEAR });
    }
    return next_bday;
  };

  var calc_sunday_before_birthday = function(){
    var next_bday = calc_next_birthday();
    var sunday_before_birthday = next_bday.previous().sunday();
    return sunday_before_birthday.toString("dd MMM yyyy")
  };

  return {
    calc: calc
  };
})();

$('.datepicker').datepicker('option', 'beforeShow', function(){
  var $this = $(this);
  var interview_date = InterviewDate.calc($this);
  $this.datepicker( 'option', 'defaultDate', interview_date );
});
Post Reply

Return to “Leader and Clerk Resources”