1
0
mirror of https://github.com/fspc/Yellow-Bike-Database.git synced 2025-02-23 09:13:23 -05:00

167 Commits

Author SHA1 Message Date
Jonathan Rosenbaum
f59020a823 membership_benefits now just one call as desired for issue #46
* now need to do the same thing for volunteer_benefits
2017-12-15 05:22:18 +00:00
Jonathan Rosenbaum
a7decc5735 Closes #29! 2017-11-26 05:35:50 +00:00
Jonathan Rosenbaum
e99d2863b8 This fixes a bug introduced by the 34650c9be fix.
* There is an issue if the spinner is used, when the transaction is complete, the function is called infinitely.
2017-11-26 04:44:27 +00:00
Jonathan Rosenbaum
34650c9be0 Mozilla, not chrome, picked up on the strict javascript requirement.
* some javascript libraries failed, but not all
* put volunteer_hours_to_membership_discount() in the right place, right above redeemable().
* Fixed!
2017-11-15 02:53:25 +00:00
Jonathan Rosenbaum
f471c24339 Had to comment out disabled of amount as introduced with 956faaa2795
* amount.val was saved because input was disabled
2017-11-14 08:02:51 +00:00
Jonathan Rosenbaum
956faaa279 Because #4 creates a special type of transaction, amount is disabled.
* enabled on sold_to.change
2017-11-14 06:32:57 +00:00
Jonathan Rosenbaum
2e0568c107 This fixes #4 with option 1, but introduces #29. 2017-11-14 05:06:06 +00:00
Jonathan Rosenbaum
62a51320e3 This fixes #21, and cleans up the code a little. 2017-11-13 22:00:18 +00:00
Jonathan Rosenbaum
69b9c5e433 Two minor fixes.
* If sum is really large it is fixed(2) so that difference in transaction_log is correct and it turns green, etc.
* typeof amount.val() is check for undefined to avoid unneccesary error output.
2017-11-13 07:27:44 +00:00
Jonathan Rosenbaum
3f870cf60e Fixes #24. 2017-11-12 03:05:10 +00:00
Jonathan Rosenbaum
424c279e9e Fixes #22 with escape() 2017-11-12 02:35:42 +00:00
Jonathan Rosenbaum
3d02473e03 This should fix #22. 2017-11-11 22:46:04 +00:00
Jonathan Rosenbaum
3c5eea235a This fixes #9 by allowing two behaviors via REDEEM_ONE_TO_ONE:
* based on the SWEAT_EQUITY_LIMIT with discounts applied,
* based on 1 to 1 (1hr of volunteering === 1hr of free stand time) regardless of the SWEAT_EQUITY_LIMIT
2017-10-19 04:27:44 +00:00
Jonathan Rosenbaum
798ae356b6 Fixes Membership discount for non-member (EAB (all hours) and Volunteer) #2 2017-09-03 00:00:54 +00:00
Jonathan Rosenbaum
f95febd851 Realized that having readonly on membership may prevent a patron from renewing slightly earlier, so reverted.
* Could allow renewal perhaps 2 months before, and turn off readonly, as a feature.
2017-08-11 07:38:39 +00:00
Jonathan Rosenbaum
2b5c07665b Fixes another introduced bug so that readonly is only on for paid members for Memberships transactions. 2017-08-11 06:55:36 +00:00
Jonathan Rosenbaum
7b84256a39 Turns off input for membership transaction if patron is a paid member. 2017-08-11 06:36:17 +00:00
Jonathan Rosenbaum
79e8baf0b7 Fixes a bug where paid member was not showing for someone with a valid membership. 2017-08-11 06:24:31 +00:00
Jonathan Rosenbaum
1eb5982595 Cleans up the code a little bit. 2017-08-09 07:48:26 +00:00
Jonathan Rosenbaum
a2ae9907e4 Fixes a bug with then newest introduced volunteer benefits math. 2017-08-09 05:48:56 +00:00
Jonathan Rosenbaum
3f195f358b Comments out console.log. 2017-08-09 05:30:27 +00:00
Jonathan Rosenbaum
e37a0ec2f7 Redeemable now properly adds discount when there has been previous transactions .
* some fun math!
2017-08-09 05:25:23 +00:00
Jonathan Rosenbaum
8f45c94cd8 Turns off all console.log. 2017-08-08 05:42:31 +00:00
Jonathan Rosenbaum
d450864bdf Displays original price for membership discount transaction. 2017-08-08 05:29:47 +00:00
Jonathan Rosenbaum
2c05f7e768 Properly reflects membership discount in amount on save. 2017-08-08 04:50:43 +00:00
Jonathan Rosenbaum
8da2bb24eb Switches to membership discount when there are no remaining volunteer hours to redeem for volunteers who are also paid members. 2017-08-08 03:32:04 +00:00
Jonathan Rosenbaum
6bd1742c54 Improves the code be expanding the scope of the volunteer benefits object, and providing correct calculations in Stand Time so that the stand time transaction is properly rendered on select change. 2017-08-07 22:42:55 +00:00
Jonathan Rosenbaum
945428b0c9 amount.one didn't hack it, back to amount.on. 2017-08-07 20:17:43 +00:00
Jonathan Rosenbaum
eaa1d18788 Assigns a value if transaction tests true for membership discount. 2017-08-07 20:06:08 +00:00
Jonathan Rosenbaum
f040988854 This changes on to one which is a better strategy when it is only necessary for the handler to fire once and empty the results for the membership discount. 2017-08-07 18:00:34 +00:00
Jonathan Rosenbaum
137cc27ca1 Properly displays discounted price in #membership_discount. 2017-08-07 17:33:47 +00:00
Jonathan Rosenbaum
a0f3e74165 This improves the math for membership discount and shows it in the original price element. 2017-08-07 03:40:15 +00:00
Jonathan Rosenbaum
1f73ed2a2e Changed to allow unlimited hour-to-hour Stand Time. 2017-08-06 19:03:39 +00:00
Jonathan Rosenbaum
2d264773ed This properly records orginal price when redeeming volunteer hours for Stand Time when input is already pre-filled. 2017-08-06 08:22:55 +00:00
Jonathan Rosenbaum
09cc2893a4 Improves the output feedback. 2017-08-06 07:16:55 +00:00
Jonathan Rosenbaum
a084161d03 Free stand time for bike purchases is now working. 2017-08-06 07:00:52 +00:00
Jonathan Rosenbaum
ff0bb290e2 Tests the free stand time callback. 2017-08-06 05:18:53 +00:00
Jonathan Rosenbaum
aab521eb6b Improves the max bike earned logic. 2017-08-05 22:01:02 +00:00
Jonathan Rosenbaum
e852af5e5f Max Bike Earned logic now working. 2017-08-05 21:15:20 +00:00
Jonathan Rosenbaum
fb0e9cfbfb Corrects some human introduced bugs by returned code to earlier state. 2017-08-05 19:22:02 +00:00
Jonathan Rosenbaum
3e18f89e65 Discount works properly when redeemable value is not greater than sweat equity limit.
* Also, improved tabbing to take into account the spinner.
2017-08-05 19:05:16 +00:00
Jonathan Rosenbaum
27ff8f87d2 Corrects an introduced bug where max is assigned a value, but obj.volunteer does not have a value assigned, yet. 2017-08-05 18:28:16 +00:00
Jonathan Rosenbaum
165b81adc5 Gives a 0 value when there is no vhr & vhr 2017-08-05 18:13:57 +00:00
Jonathan Rosenbaum
2f33f8eef8 If volunteer hours remaining is 0, spinner is disabled on spin or zeroed on input. 2017-08-05 06:44:59 +00:00
Jonathan Rosenbaum
17573c20e4 Adds new value to redeemable function, and comments unneccesary code in function. 2017-08-05 06:13:59 +00:00
Jonathan Rosenbaum
5e80aedca7 Fills in the blanks for volunteer hours remaining and redeemed in mouseover. 2017-08-05 05:49:25 +00:00
Jonathan Rosenbaum
bc747c90a2 Creates new object when year changes. 2017-08-05 04:41:55 +00:00
Jonathan Rosenbaum
9e8ea84a0e Assigns 0.00 if redeemable_hours are NaN, and runs a test so info isn't shown esessentially for a non-volunteer. 2017-08-05 03:42:21 +00:00
Jonathan Rosenbaum
5047f59996 This uses tradition declaration notation rather than emacscript 6 notation, just for compatibility with older browsers. 2017-08-05 03:08:18 +00:00
Jonathan Rosenbaum
b7f128feca Creates the object, and adds redeemed hours together. 2017-08-04 06:25:27 +00:00