Commit Graph

9359 Commits

Author SHA1 Message Date
Pau Pérez Fabregat
cf77bb439a Merge pull request #2337 from Matt-Yorkley/uk/modal_fix
Fix guest checkout login modal
2018-06-04 09:56:00 +02:00
Pau Pérez Fabregat
ed116867d4 Merge pull request #2322 from luisramos0/issue1913
Fixed issue #1913 with expand/collapse of list of producers of a shop
2018-06-04 09:55:40 +02:00
Rob Harrington
fed0a81159 Add an optional link to Skylight dashboard to footer 2018-06-02 11:55:28 +10:00
Rob Harrington
e3ea60fda5 Process proxy orders even if underlying subscription has been paused or cancelled 2018-06-01 16:57:56 +10:00
Rob Harrington
184bf9ce36 Allow super admin users to enable subscriptions for enterprises 2018-05-30 09:42:03 +10:00
Rob Harrington
16211da5f6 Reimplement tabs on shopfront using our custom tab directive 2018-05-30 08:35:21 +10:00
Maikel
cb19643b3a Merge pull request #2332 from oeoeaio/1938-oc-switch
Correct 'Next Order Closing' text in shopfront when switching OCs
2018-05-30 08:28:23 +10:00
Maikel
cee2f76406 Merge pull request #2299 from frank-west-iii/issue-1832-phone-shopfront
Add phone number to shopfront contact info
2018-05-30 08:27:07 +10:00
Maikel
32ef507221 Merge pull request #2318 from luisramos0/issue2307
Fixed broken translation keys in "new order cycle" screen
2018-05-29 17:38:04 +10:00
Maikel
603c88a93c Merge pull request #2317 from luisramos0/issue2308
Added missing translation key for no results in admin orders page
2018-05-29 17:37:26 +10:00
Maikel
307132d1f7 Merge pull request #2298 from frank-west-iii/issue-953-ent-description-formatting
Fix enterprise description display formatting
2018-05-29 17:36:47 +10:00
Matt-Yorkley
fc2cc09ea5 checkout redirect excludes angular path variables 2018-05-26 18:13:35 +01:00
Pau Pérez Fabregat
e04141d797 Merge pull request #2291 from coopdevs/remove-producers-tab-from-dashboard
Remove producers tab from dashboard
2018-05-25 19:24:29 +02:00
Rob Harrington
17259b3269 Overwrite cached value for current_order_cycle when updating it
This ensures that the correct order cycle is rendered in the json response
2018-05-25 17:28:54 +10:00
Pau Pérez Fabregat
9d57beb33f Merge pull request #2305 from Matt-Yorkley/uk/domain_headers
Ensure domain in SSL header matches request with or without www prefix
v1.15.2
2018-05-23 20:08:56 +02:00
luisramos0
d821664ee3 Fixed issue #1913 with expand/collapse of list of producers of a shop 2018-05-23 17:32:38 +01:00
luisramos0
a59d9cb670 Fixed broken translation keys in new order cycle screen 2018-05-23 13:12:56 +01:00
Luis Ramos
12232f552c Added missing translation key for no results in admin orders page 2018-05-22 21:00:03 +01:00
Pau Perez
2a3772dba0 Do not show icons for producer-enterprises
Payment and shipping methods don't apply to them.
2018-05-22 16:50:27 +02:00
Pau Perez
208e3bbadd Ensure non-distributors are listed in dashboard
We want to show all enterprises in a single list regardless of their
type.
2018-05-22 10:21:35 +02:00
Pau Perez
bd34f27ace Inline partials into enterprises view
Now there are no tabs in the dashboard so is pointless to refer to them
and to split in multiple partials.
2018-05-22 10:21:35 +02:00
Pau Perez
889199a525 Refactor Overview Controller to make it more clear
Assigns meaningful names to the boolean conditions to make it easier
to understand, breaks down the big and nested if/else and converts the
specs to RSpec 3.

Note the check `!spree_current_user.admin?` has been removed because
in admin/base_controller_decorator.rb `#authorize_admin` is already
called.
2018-05-22 10:21:35 +02:00
Pau Perez
51f3542a92 Remove no longer used Angular controller
There are no tabs to keep track of now.
2018-05-22 10:21:35 +02:00
Pau Perez
5a182e8e88 Remove enterprises producers tab from dashboard 2018-05-22 10:21:35 +02:00
Matt-Yorkley
c2934d3570 Ensure domain in SSL header matches request with or without www prefix 2018-05-21 17:50:34 +01:00
Frank West
f995a04ebf Add phone number to shopfront contact info 2018-05-18 14:05:28 -07:00
Frank West
b05b9747b8 Fix enterprise description display formatting
Removes `text-small` class from container and change container to `div`
instead of `p` for semantic differentiation.
2018-05-18 07:20:56 -07:00
Maikel Linke
d218a51d96 Test public instead of private method
Refactoring and styling the whole thing, possibly causing conflicts with
other pull requests.
2018-05-18 11:27:48 +10:00
Maikel Linke
57dd984512 Convert specs to RSpec 3.7.0 syntax with Transpec
This conversion is done by Transpec 3.3.0 with the following command:
    transpec spec/lib/open_food_network/order_and_distributor_report_spec.rb

* 2 conversions
    from: == expected
      to: eq(expected)

* 2 conversions
    from: obj.should
      to: expect(obj).to

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2018-05-18 11:27:48 +10:00
Maikel Linke
7f8f935017 Shorten module referencing 2018-05-18 11:27:48 +10:00
Maikel Linke
0fa9ca653e Move duplicate code into its own module 2018-05-18 11:27:48 +10:00
Maikel Linke
40b0a0bd5a Determine searching state by params, not request
We may want to use GET for searching or POST to display a certain report
type.
2018-05-18 11:27:48 +10:00
Maikel Linke
8a1a540f3d Clarify creating objects for test context 2018-05-18 11:27:48 +10:00
Maikel Linke
acee5da31b Remove unnecessary whitespace 2018-05-18 11:27:48 +10:00
Maikel Linke
8a4457e8e4 Give better names 2018-05-18 11:27:48 +10:00
Maikel Linke
63799b2cb1 Remove outdated comment 2018-05-18 11:27:48 +10:00
Maikel Linke
8e2aee71da Compile Order Cycle Management only on search 2018-05-18 11:27:48 +10:00
Maikel Linke
7a546087b2 Compile Packing report data only on search 2018-05-18 11:27:47 +10:00
Maikel Linke
1e80487afc Compile Order And Distributors only on search
And move most logic into the report class like the others.
2018-05-18 11:27:47 +10:00
Maikel Linke
53436024e2 Compile Orders & Fulfillment report only on search 2018-05-18 11:27:47 +10:00
Maikel Linke
feb33c3ca5 Compile Payments report only on search 2018-05-18 11:27:47 +10:00
Maikel Linke
bf74282e5f Compile Bulk Co-Op report only on search 2018-05-18 11:27:47 +10:00
Maikel Linke
5f9d239f19 Compile Products & Inventory report only on search 2018-05-18 11:27:47 +10:00
Maikel Linke
d464216027 Don't compile Sales Tax report data before search 2018-05-18 11:27:47 +10:00
Maikel Linke
983e128d90 Half test run time by loading less data
On my computer it took 3 seconds to load all four orders with all the
attached order cycles and enterprises.

Runtime before: 56.38 seconds
Runtime after:  25.14 seconds

This really speeds up developing reports.
2018-05-18 11:27:47 +10:00
Maikel Linke
b8ca37e9d2 Don't compile xero report data before search 2018-05-18 11:27:47 +10:00
Maikel Linke
14e7cdd138 Don't compile customers report data before search
Distributors, suppliers and order cycles are still loaded for the search
form.
2018-05-18 11:27:47 +10:00
Maikel Linke
8393b1d4c0 Don't compile user-enterprises report before search 2018-05-18 11:27:47 +10:00
Maikel Linke
fcd41c67fa Add logic for showing empty reports initially 2018-05-18 11:27:47 +10:00
Maikel Linke
031c4d417e Simplify report rendering 2018-05-18 11:27:47 +10:00