readifood.git
2 years agoMerge branch 'master' into uat uat-2022-11-09
Iain Patterson [Wed, 9 Nov 2022 11:01:16 +0000 (06:01 -0500)]
Merge branch 'master' into uat

2 years agoFix autosize for jQuery 3.6.1. 2022-11-09
Iain Patterson [Wed, 9 Nov 2022 10:49:00 +0000 (05:49 -0500)]
Fix autosize for jQuery 3.6.1.

2 years agoRevert order highlighting.
Iain Patterson [Wed, 9 Nov 2022 10:43:51 +0000 (05:43 -0500)]
Revert order highlighting.

2 years agoMerge branch 'master' into uat uat-2022-10-31
Iain Patterson [Mon, 31 Oct 2022 13:52:38 +0000 (09:52 -0400)]
Merge branch 'master' into uat

2 years agojQuery 3.6.1. 2022-10-31
Iain Patterson [Mon, 31 Oct 2022 13:39:03 +0000 (09:39 -0400)]
jQuery 3.6.1.

2 years agoHighlight deliveries.
Iain Patterson [Mon, 31 Oct 2022 13:37:57 +0000 (09:37 -0400)]
Highlight deliveries.

3 years agoMerge branch 'master' into uat uat-2021-09-17
Iain Patterson [Fri, 17 Sep 2021 07:25:50 +0000 (03:25 -0400)]
Merge branch 'master' into uat

3 years agoFix sortable for modern browsers. 2021-09-17
Iain Patterson [Fri, 17 Sep 2021 07:03:58 +0000 (03:03 -0400)]
Fix sortable for modern browsers.

4 years agoCompact delivery details. uat-2020-08-31
Iain Patterson [Mon, 31 Aug 2020 12:44:11 +0000 (08:44 -0400)]
Compact delivery details.

4 years agoCompact delivery details. 2020-08-31
Iain Patterson [Mon, 31 Aug 2020 12:44:11 +0000 (08:44 -0400)]
Compact delivery details.

6 years agoMerge branch 'master' into uat uat-2018-09-03
Iain Patterson [Mon, 3 Sep 2018 09:44:05 +0000 (05:44 -0400)]
Merge branch 'master' into uat

6 years agoAllow searching in notes. 2018-09-03
Iain Patterson [Mon, 3 Sep 2018 09:40:14 +0000 (05:40 -0400)]
Allow searching in notes.

6 years agoShow unique beneficiary report.
Iain Patterson [Sun, 2 Sep 2018 22:05:02 +0000 (18:05 -0400)]
Show unique beneficiary report.

Count unique recipients of at least one parcel of each size during the
report period.

For example if a beneficiary received three "Couple" sized parcels we
would count two individuals.

Family units are averaged at four individuals since we do not record
their actual size anywhere.

6 years agoMerge branch 'master' into uat uat-2018-07-09
Iain Patterson [Mon, 9 Jul 2018 08:56:26 +0000 (04:56 -0400)]
Merge branch 'master' into uat

6 years agoStore session in database. 2018-07-09
Iain Patterson [Mon, 9 Jul 2018 08:10:34 +0000 (04:10 -0400)]
Store session in database.

Use https://github.com/j2L4e/PHP-PDO-MySQL-Session-Handler to store
session data in our existing MySQL database when MEMCACHE is unset.

We must take care to initialise Propel first, then the session and
finally Auth0.

6 years agoMerge branch 'master' into uat uat-2018-06-21
Iain Patterson [Thu, 21 Jun 2018 21:31:53 +0000 (17:31 -0400)]
Merge branch 'master' into uat

6 years agoSupport Auth0. 2018-06-21
Iain Patterson [Thu, 21 Jun 2018 21:19:08 +0000 (17:19 -0400)]
Support Auth0.

Set AUTH0_AUDIENCE, AUTH0_CALLBACK_URL, AUTH0_CLIENT_ID,
AUTH0_CLIENT_SECRET, AUTH0_DOMAIN and AUTH0_LOGOUT_CALLBACK_URL in .env
under the document root.

Auth0 takes care of setting up sessions.  To use memcache, set MEMCACHED
to a comma-separated list of memcache endpoints.

7 years agoMerge branch 'master' into uat live-2017-11-21
Iain Patterson [Tue, 21 Nov 2017 14:35:02 +0000 (09:35 -0500)]
Merge branch 'master' into uat

7 years agoRemoved spurious "none".
Iain Patterson [Tue, 21 Nov 2017 14:31:13 +0000 (09:31 -0500)]
Removed spurious "none".

7 years agoMerge branch 'master' into uat uat-2017-11-21
Iain Patterson [Tue, 21 Nov 2017 14:13:52 +0000 (09:13 -0500)]
Merge branch 'master' into uat

7 years agoSearch by telephone. 2017-11-21
Iain Patterson [Tue, 21 Nov 2017 14:03:31 +0000 (09:03 -0500)]
Search by telephone.

8 years agoMerge branch 'master' into uat live-2016-04-08 uat-2016-04-08
Iain Patterson [Fri, 8 Apr 2016 12:03:39 +0000 (08:03 -0400)]
Merge branch 'master' into uat

8 years agoAllow date range in order view. 2016-04-08
Iain Patterson [Fri, 8 Apr 2016 12:01:17 +0000 (08:01 -0400)]
Allow date range in order view.

Restrict to orders for delivery between specified dates.

8 years agoSplit check_report_dates() into shared function check_dates().
Iain Patterson [Fri, 8 Apr 2016 11:58:55 +0000 (07:58 -0400)]
Split check_report_dates() into shared function check_dates().

8 years agoMerge branch 'master' into uat live-2016-04-07 uat-2016-04-07
Iain Patterson [Thu, 7 Apr 2016 15:49:15 +0000 (11:49 -0400)]
Merge branch 'master' into uat

8 years agoSometimes SCRIPT_URL isn't available. 2016-04-07
Iain Patterson [Thu, 7 Apr 2016 15:47:21 +0000 (11:47 -0400)]
Sometimes SCRIPT_URL isn't available.

If not running in a virtualhost context, Apache may expose REDIRECT_URL
instead.

8 years agoMerge branch 'master' into uat
Iain Patterson [Thu, 7 Apr 2016 15:34:21 +0000 (11:34 -0400)]
Merge branch 'master' into uat

8 years agoMore efficient order querying when mask is set.
Iain Patterson [Thu, 7 Apr 2016 15:30:24 +0000 (11:30 -0400)]
More efficient order querying when mask is set.

Use a join against the area and city instead of first finding all
contacts in the desired location.

8 years agoMerge branch 'master' into uat uat-2016-04-05
Iain Patterson [Tue, 5 Apr 2016 10:18:15 +0000 (06:18 -0400)]
Merge branch 'master' into uat

8 years agoFixed parsing parameters in rewrite. 2016-04-05
Iain Patterson [Mon, 4 Apr 2016 15:13:16 +0000 (11:13 -0400)]
Fixed parsing parameters in rewrite.

A rewritten URL which was passed a query parameter would be parsed
incorrectly.

For instance /contact/search/smith?page=2 would be treated as a search
for a contact whose name was 'smith?page=2' rather than the second page
of a search for the 'smith' contact.

8 years agoClarify pagination links.
Iain Patterson [Mon, 4 Apr 2016 15:11:29 +0000 (11:11 -0400)]
Clarify pagination links.

We were showing an extra page link in paginated results.
We now show ... if there are more pages whose links are not shown.

8 years agoPaginate all sections.
Iain Patterson [Mon, 4 Apr 2016 14:56:46 +0000 (10:56 -0400)]
Paginate all sections.

Add pagination to all sections of the application.

8 years agoMerge branch 'master' into uat live-2016-04-04 uat-2016-04-04
Iain Patterson [Mon, 4 Apr 2016 13:24:34 +0000 (09:24 -0400)]
Merge branch 'master' into uat

8 years agoRemove placeholder pagination code. 2016-04-04
Iain Patterson [Mon, 4 Apr 2016 13:19:57 +0000 (09:19 -0400)]
Remove placeholder pagination code.

Pagination was always a planned feature.  Until now, however, it was
never implemented.  Now that it is in place we can remove the
placeholder for the assumed implementation style which was eventually
not used.

8 years agoFixed pagination of orders.
Iain Patterson [Mon, 4 Apr 2016 13:09:29 +0000 (09:09 -0400)]
Fixed pagination of orders.

Pagination starts at page 1 not offset 0.

8 years agoMerge branch 'master' into uat live-2016-03-29 uat-2016-03-29
Iain Patterson [Tue, 29 Mar 2016 16:09:26 +0000 (12:09 -0400)]
Merge branch 'master' into uat

8 years agoPagination for orders. 2016-03-29
Iain Patterson [Tue, 29 Mar 2016 16:04:50 +0000 (12:04 -0400)]
Pagination for orders.

9 years agoMerge branch 'master' into uat uat-2015-03-12
Iain Patterson [Thu, 12 Mar 2015 16:43:01 +0000 (12:43 -0400)]
Merge branch 'master' into uat

9 years agoRecord donation directly from hub list. 2015-03-12
Iain Patterson [Thu, 12 Mar 2015 16:36:01 +0000 (12:36 -0400)]
Record donation directly from hub list.

Show a new "Record" link next to Collection hubs, opening the donation
form with the hub preselected.

10 years agoMerge branch 'master' into uat live-2014-07-07 uat-2014-07-07
Iain Patterson [Mon, 7 Jul 2014 09:09:20 +0000 (05:09 -0400)]
Merge branch 'master' into uat

10 years agoUse Composer. 2014-07-07
Iain Patterson [Mon, 7 Jul 2014 08:26:40 +0000 (04:26 -0400)]
Use Composer.

Install propel and phing locally using Composer.

10 years agoUse DIRECTORY_SEPARATOR everywhere.
Iain Patterson [Mon, 7 Jul 2014 08:24:48 +0000 (04:24 -0400)]
Use DIRECTORY_SEPARATOR everywhere.

We were using DIRECTORY_SEPARATOR in some cases and explicitly joining
paths with slashes in others.

10 years agoMerge branch 'master' into uat live-2014-04-14 uat-2014-04-14
Iain Patterson [Mon, 14 Apr 2014 13:26:41 +0000 (09:26 -0400)]
Merge branch 'master' into uat

10 years agoTypo. 2014-04-14
Iain Patterson [Mon, 14 Apr 2014 13:25:08 +0000 (09:25 -0400)]
Typo.

10 years agoMerge branch 'master' into uat uat-2014-04-12
Iain Patterson [Sat, 12 Apr 2014 19:58:54 +0000 (15:58 -0400)]
Merge branch 'master' into uat

10 years agoTrack last selected area or city. 2014-04-12
Iain Patterson [Sat, 12 Apr 2014 19:44:41 +0000 (15:44 -0400)]
Track last selected area or city.

Unless a form was just submitted, no default option is set in a select
box, so the first option in alphabetical order is used.  That can be
annoying, for instance, for users who mainly process data in one city
and find another city selected by default in all dropdowns.

On form submission we now track the selected city or area in a session
variable, and retrieve it when showing a form with no default option.

10 years agoStore session variables.
Iain Patterson [Sat, 12 Apr 2014 19:41:12 +0000 (15:41 -0400)]
Store session variables.

Start a session so we can keep track of user preferences later.

10 years agoMerge branch 'master' into uat live-2014-04-10 uat-2014-04-10
Iain Patterson [Thu, 10 Apr 2014 15:32:16 +0000 (11:32 -0400)]
Merge branch 'master' into uat

10 years agoHandle missing weeks at the start of the report period. 2014-04-10
Iain Patterson [Thu, 10 Apr 2014 15:29:18 +0000 (11:29 -0400)]
Handle missing weeks at the start of the report period.

If there were no orders during the first week(s) of a report period we
were incorrectly treating the first week in which there were orders as
week 1.

We now determine the week offset based on the yearweek of the period
start date and correctly include one or more weeks with zero orders in
the output.

10 years agoTry harder to avoid duplicate order state IDs.
Iain Patterson [Thu, 10 Apr 2014 15:27:14 +0000 (11:27 -0400)]
Try harder to avoid duplicate order state IDs.

An order whose state was changed from delivered to something else then
back to delivered might still appear in the order state array despite
the presence of the hacked query to filter them out.

We now run a secondary hack to remove them from the array.

A better solution is needed here...

10 years agoMerge branch 'master' into uat live-2014-03-13 uat-2014-03-13
Iain Patterson [Tue, 18 Mar 2014 12:36:08 +0000 (08:36 -0400)]
Merge branch 'master' into uat

10 years agoFix incorrect week count across year boundary. 2014-03-13
Iain Patterson [Thu, 13 Mar 2014 19:05:08 +0000 (15:05 -0400)]
Fix incorrect week count across year boundary.

Year/week 201401 is only one week later than 201352, not 49.

10 years agoMerge branch 'master' into uat live-2013-12-12 uat-2013-12-12
Iain Patterson [Thu, 12 Dec 2013 18:17:34 +0000 (13:17 -0500)]
Merge branch 'master' into uat

10 years agoAllow reordering the delivery list. 2013-12-12
Iain Patterson [Thu, 12 Dec 2013 18:15:05 +0000 (13:15 -0500)]
Allow reordering the delivery list.

Delivery details are retrieved from the database in an undefined order.
They can now be dragged and dropped to reorder into a schedule which is
more convenient for a driver to read.

11 years agoMerge branch 'master' into uat live-2013-11-07 uat-2013-11-07
Iain Patterson [Thu, 7 Nov 2013 16:36:17 +0000 (11:36 -0500)]
Merge branch 'master' into uat

11 years agoUse popup div for Google Maps. 2013-11-07
Iain Patterson [Thu, 7 Nov 2013 16:32:50 +0000 (11:32 -0500)]
Use popup div for Google Maps.

Show an embedded Google Maps view in the popup div.  It is displayed
when hovering over the Map link for a preview of the map.  Following the
link will go to the full map on maps.google.co.uk as before.

We make sure to include the output=embedded argument and specify https
so that browsers don't refuse to load the preview on security grounds.

11 years agoAdded popup div.
Iain Patterson [Thu, 7 Nov 2013 16:32:12 +0000 (11:32 -0500)]
Added popup div.

A new, initially hidden div, is defined at the end of the document.
Later we will use it to show popup windows.

11 years agoAdded get_small_link_with_id() function.
Iain Patterson [Thu, 7 Nov 2013 16:31:05 +0000 (11:31 -0500)]
Added get_small_link_with_id() function.

The get_small_link_with_id() function behaves the same as
get_small_link() except that the returned <a> tag includes an ID
suitable for use with jQuery.

11 years agoMake textareas dynamically resizable.
Iain Patterson [Thu, 7 Nov 2013 13:00:24 +0000 (08:00 -0500)]
Make textareas dynamically resizable.

Use Jack Moore's autosize plugin[1] for jQuery to expand the height of
textareas as they are filled.

[1] http://www.jacklmoore.com/autosize/

11 years agoSimpler RewriteCond rules.
Iain Patterson [Thu, 7 Nov 2013 12:59:12 +0000 (07:59 -0500)]
Simpler RewriteCond rules.

Simply avoid rewrites for any file which exists rather than maintaining
a list of files which we explicitly don't rewrite.

11 years agoMerge branch 'master' into uat live-2013-10-31 uat-2013-10-31
Iain Patterson [Thu, 31 Oct 2013 16:50:05 +0000 (12:50 -0400)]
Merge branch 'master' into uat

11 years agoFix setting name in add_contact(). 2013-10-31
Iain Patterson [Thu, 31 Oct 2013 16:21:50 +0000 (12:21 -0400)]
Fix setting name in add_contact().

The add_contact() function was supposed to set the name parameter to the
display name of the newly-created contact.  We now ensure that that happens.

A side-effect of the bug was that we weren't showing the details of new
contacts, as was intended.

11 years agoUse label tags in checkbox descriptions.
Iain Patterson [Thu, 31 Oct 2013 16:21:09 +0000 (12:21 -0400)]
Use label tags in checkbox descriptions.

Use the HTML <label> tag to make it easier to taggle checkboxes.

11 years agoMerge branch 'master' into uat live-2013-10-15 uat-2013-10-15
Iain Patterson [Tue, 15 Oct 2013 09:27:36 +0000 (05:27 -0400)]
Merge branch 'master' into uat

11 years agoUse show_date_form() for donations. 2013-10-15
Iain Patterson [Tue, 15 Oct 2013 09:10:42 +0000 (05:10 -0400)]
Use show_date_form() for donations.

11 years agoUse datepicker() in show_date_form().
Iain Patterson [Tue, 15 Oct 2013 09:17:12 +0000 (05:17 -0400)]
Use datepicker() in show_date_form().

All date selectors are now standardised.

11 years agoUse datepicker() to select dates for reports.
Iain Patterson [Tue, 15 Oct 2013 09:05:48 +0000 (05:05 -0400)]
Use datepicker() to select dates for reports.

11 years agoUse JQuery date pickers.
Iain Patterson [Tue, 15 Oct 2013 09:02:07 +0000 (05:02 -0400)]
Use JQuery date pickers.

Added the datepicker() function which will show an input field for an
ISO8601 date entry.  If scripting is enabled, JQuery will be used to
show a popup date picker when the user clicks in the field.

The date picker can be restricted to showing dates no earlier and/or no
later than today, and it can be linked to another picker to form a date
range selector.

11 years agoTypo.
Iain Patterson [Thu, 3 Oct 2013 07:59:17 +0000 (03:59 -0400)]
Typo.

Postcode validation rules are described in BS7666 not BS766.

11 years agoMerge branch 'master' into uat uat-2013-10-03
Iain Patterson [Thu, 3 Oct 2013 07:53:55 +0000 (03:53 -0400)]
Merge branch 'master' into uat

11 years agoPostcode validation. 2013-10-03
Iain Patterson [Thu, 3 Oct 2013 07:51:54 +0000 (03:51 -0400)]
Postcode validation.

Validate postcode according to the rules described in BS766.

11 years agoMerge branch 'master' into uat uat-2013-09-24
Iain Patterson [Tue, 24 Sep 2013 08:16:19 +0000 (04:16 -0400)]
Merge branch 'master' into uat

11 years agoReport orders by beneficiary postcode. 2013-09-24
Iain Patterson [Tue, 24 Sep 2013 08:13:26 +0000 (09:13 +0100)]
Report orders by beneficiary postcode.

11 years agoMerge branch 'master' into uat live-2013-09-11 uat-2013-09-11
Iain Patterson [Wed, 11 Sep 2013 14:57:54 +0000 (10:57 -0400)]
Merge branch 'master' into uat

11 years agoAdditionally report orders by parcel contents. 2013-09-11
Iain Patterson [Wed, 11 Sep 2013 14:45:11 +0000 (15:45 +0100)]
Additionally report orders by parcel contents.

Break down sizes of parcel into parcel contents.

11 years agoReport orders by parcel size.
Iain Patterson [Mon, 9 Sep 2013 21:46:16 +0000 (22:46 +0100)]
Report orders by parcel size.

11 years agoAdded report table class.
Iain Patterson [Mon, 5 Aug 2013 17:51:35 +0000 (18:51 +0100)]
Added report table class.

Report tables have extra padding for legibility.

11 years agoRemoved rogue brace.
Iain Patterson [Mon, 5 Aug 2013 17:51:27 +0000 (18:51 +0100)]
Removed rogue brace.

11 years agoReport orders by week.
Iain Patterson [Mon, 5 Aug 2013 17:37:14 +0000 (18:37 +0100)]
Report orders by week.

11 years agoReport orders by requester.
Iain Patterson [Tue, 23 Jul 2013 21:33:25 +0000 (22:33 +0100)]
Report orders by requester.

11 years agoFramework for reports.
Iain Patterson [Tue, 23 Jul 2013 21:33:12 +0000 (22:33 +0100)]
Framework for reports.

11 years agoMerge branch 'master' into uat live-2013-07-10 uat-2013-07-10
Iain Patterson [Wed, 10 Jul 2013 14:19:13 +0000 (10:19 -0400)]
Merge branch 'master' into uat

11 years agoShow phone number(s) in delivery schedule. 2013-07-10
Iain Patterson [Wed, 10 Jul 2013 14:16:19 +0000 (10:16 -0400)]
Show phone number(s) in delivery schedule.

If a contact or hub has one r more phone numbers, show them in the
delivery schedule so the driver can phone ahead.

11 years agoMerge branch 'master' into uat live-2013-06-25 uat-2013-06-25
Iain Patterson [Tue, 25 Jun 2013 10:32:27 +0000 (06:32 -0400)]
Merge branch 'master' into uat

11 years agoAdded logout link. 2013-06-25
Iain Patterson [Tue, 25 Jun 2013 10:26:33 +0000 (06:26 -0400)]
Added logout link.

Configure web server to deny all requests for the /logout URI, for
example with "require user nonexistent" thus forcing a reauthentication.

11 years agoDon't show menu when not logged in.
Iain Patterson [Tue, 25 Jun 2013 10:18:49 +0000 (06:18 -0400)]
Don't show menu when not logged in.

11 years agoShow not logged in message on failed login.
Iain Patterson [Tue, 25 Jun 2013 10:16:07 +0000 (06:16 -0400)]
Show not logged in message on failed login.

Configure the server ErrorDocument to login.php and allow access to that
file for any client.  The message will then be shown with full
stylesheet to clients who fail to authenticate.

11 years agoURL decode contact search string.
Iain Patterson [Sun, 16 Jun 2013 11:50:20 +0000 (07:50 -0400)]
URL decode contact search string.

11 years agoExtend contact search to address.
Iain Patterson [Sun, 16 Jun 2013 11:49:34 +0000 (07:49 -0400)]
Extend contact search to address.

Find contacts whose address matches the search string as well as those
whose name matches.

11 years agoMerge branch 'master' into uat live-2013-05-15 uat-2013-05-15
Iain Patterson [Wed, 15 May 2013 14:35:38 +0000 (10:35 -0400)]
Merge branch 'master' into uat

11 years agoTypo. 2013-05-15
Iain Patterson [Wed, 15 May 2013 14:34:03 +0000 (10:34 -0400)]
Typo.

Incorrect bitshift caused order state to be recorded incorrectly.

11 years agoMerge branch 'master' into uat uat-2013-05-13
Iain Patterson [Mon, 13 May 2013 13:01:47 +0000 (09:01 -0400)]
Merge branch 'master' into uat

11 years agoCorrectly filter city or area. 2013-05-13
Iain Patterson [Mon, 13 May 2013 12:22:26 +0000 (08:22 -0400)]
Correctly filter city or area.

When separate dropdowns for city and area are shown in one form we must
ensure that the correct search criterion is applied.  Previously we
checked for an area or city ID parameter but both of those will be
present in the form submission.  Instead we check for the name of the
submit button.

11 years agoConfirm deletion.
Iain Patterson [Mon, 13 May 2013 10:52:21 +0000 (06:52 -0400)]
Confirm deletion.

Show a second link to confirm the deletion of an object rather than
simply deleting immediately.

11 years agoShow map link from address.
Iain Patterson [Mon, 13 May 2013 10:21:49 +0000 (06:21 -0400)]
Show map link from address.

Link to Google Maps for existing addresses.

11 years agoAdded get_address_map_link().
Iain Patterson [Mon, 13 May 2013 10:21:01 +0000 (06:21 -0400)]
Added get_address_map_link().

Function to return a Google Maps URL for an address.

11 years agoFilter area and city searches.
Iain Patterson [Mon, 13 May 2013 10:12:27 +0000 (06:12 -0400)]
Filter area and city searches.

Only show areas or city in dropdown for searches if there are
contacts, hubs etc in that area or city.

11 years agoShow order state in summary line.
Iain Patterson [Mon, 13 May 2013 10:01:36 +0000 (06:01 -0400)]
Show order state in summary line.

Include order's current state in order summary.

11 years agoUse get_order_state*() functions.
Iain Patterson [Mon, 13 May 2013 09:58:49 +0000 (05:58 -0400)]
Use get_order_state*() functions.

Use the new functions get_order_state() and get_order_state_string()
where we were previously accessing the state directly.

11 years agoAdded get_order_state() and get_order_state_string().
Iain Patterson [Mon, 13 May 2013 09:57:02 +0000 (05:57 -0400)]
Added get_order_state() and get_order_state_string().

Return an order state with get_order_state().  Return a string
representation of an order state with get_order_state_string().