Compare commits

...

200 Commits

Author SHA1 Message Date
Jean-Baptiste Bellet
eb663af292 Update all locales with the latest Transifex translations 2023-01-13 09:55:18 +01:00
Filipe
5c04d00ff8 Merge pull request #10178 from jibees/9573-split-checkout-typing-checkoutcart-on-the-url-bar-brings-back-legacy-checkout
When `split_checkout` is enabled, redirect to split checkout controller in any cases
2023-01-12 17:05:53 +00:00
dependabot[bot]
fd446970ca Merge pull request #10265 from openfoodfoundation/dependabot/bundler/view_component-2.82.0 2023-01-12 09:46:15 +00:00
dependabot[bot]
be004383a4 Bump view_component from 2.80.0 to 2.82.0
Bumps [view_component](https://github.com/viewcomponent/view_component) from 2.80.0 to 2.82.0.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/viewcomponent/view_component/compare/v2.80.0...v2.82.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-12 09:02:24 +00:00
Maikel Linke
1e77b96c2c Simplify negated feature toggle constraint 2023-01-11 10:10:30 +00:00
Jean-Baptiste Bellet
b2db63178f Redirect /checkout/whatever to /checkout when split_checkout is activate
+ constraint the legacy checkout routes when `split_checkout` feature is disabled

+ add specs
2023-01-11 10:10:30 +00:00
David Cook
ee70645d04 Merge pull request #10251 from openfoodfoundation/dependabot/bundler/listen-3.8.0
Bump listen from 3.7.1 to 3.8.0
2023-01-11 13:46:21 +11:00
Konrad
c4b89e466b Merge pull request #9804 from jibees/9420-resend-confirmation-email-in-bulk
Admin, Orders list: Resend confirmation email in bulk
2023-01-11 00:16:57 +01:00
Filipe
57aeee94f9 Merge pull request #10229 from mkllnk/report-paths
Link relative report path instead of absolute URL
2023-01-10 15:35:32 +00:00
Filipe
3a9be42389 Merge pull request #10234 from mkllnk/drop-spree_product_groups
Remove unused Spree database tables
2023-01-10 15:16:52 +00:00
dependabot[bot]
b7930e7d38 Merge pull request #10252 from openfoodfoundation/dependabot/bundler/spring-4.1.1 2023-01-10 09:15:37 +00:00
dependabot[bot]
7c69cc5aa9 Bump listen from 3.7.1 to 3.8.0
Bumps [listen](https://github.com/guard/listen) from 3.7.1 to 3.8.0.
- [Release notes](https://github.com/guard/listen/releases)
- [Commits](https://github.com/guard/listen/compare/v3.7.1...v3.8.0)

---
updated-dependencies:
- dependency-name: listen
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 09:05:05 +00:00
dependabot[bot]
2baa55262b Bump spring from 4.1.0 to 4.1.1
Bumps [spring](https://github.com/rails/spring) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/rails/spring/releases)
- [Changelog](https://github.com/rails/spring/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rails/spring/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: spring
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-10 09:04:31 +00:00
David Cook
2835265a1e Update release template
The release is now posted automatically, thanks to whomever set that up\!
2023-01-10 10:49:39 +11:00
Filipe
bd20a8c16f Merge pull request #10237 from mkllnk/report-rendering
Remove report dependency on report controller
2023-01-09 18:49:19 +00:00
Rachel Arnould
61175c036a Merge pull request #10131 from jibees/10125-change-oc-page-colors
[WIP 🚧 ] `/admin/order_cycles` behind feature toggle `admin_style_v2`
2023-01-06 15:07:41 +01:00
dependabot[bot]
6b3a0fa14a Merge pull request #10244 from openfoodfoundation/dependabot/bundler/bugsnag-6.25.1 2023-01-06 13:14:53 +00:00
Jean-Baptiste Bellet
e403a2c174 Secondary button can actually be disabled 2023-01-06 14:03:40 +01:00
Jean-Baptiste Bellet
5aca76e520 OC, incoming|outgoing products, have the actions inside the table 2023-01-06 14:03:40 +01:00
Jean-Baptiste Bellet
73a2b90e1b On hovering, all the tr should be colored
This needs to be respecified with an `!important` keyword

Even if already defined in `app/webpacker/css/admin/openfoodnetwork.scss`
2023-01-06 14:03:40 +01:00
Jean-Baptiste Bellet
c7d4c4c195 Put action in the flex container for incoming|outgoing products in OC 2023-01-06 14:03:40 +01:00
Jean-Baptiste Bellet
bba1d6c725 Do not specify sizes, let the browser fix the best layout for table 2023-01-06 10:46:01 +01:00
Jean-Baptiste Bellet
52cb6d4eec Put all actions in the same flex container, aligned to right 2023-01-06 10:45:30 +01:00
Jean-Baptiste Bellet
fc6bd53720 Put some specials rules for listing_orders as generics for all tables
- `.actions` is now integrated to the table itself, with the same design
- We have to use `!important` keyword as already defined like this...
2023-01-06 10:33:27 +01:00
dependabot[bot]
650fd69f60 Bump bugsnag from 6.25.0 to 6.25.1
Bumps [bugsnag](https://github.com/bugsnag/bugsnag-ruby) from 6.25.0 to 6.25.1.
- [Release notes](https://github.com/bugsnag/bugsnag-ruby/releases)
- [Changelog](https://github.com/bugsnag/bugsnag-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bugsnag/bugsnag-ruby/compare/v6.25.0...v6.25.1)

---
updated-dependencies:
- dependency-name: bugsnag
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-06 09:12:10 +00:00
Maikel Linke
22a086ebc1 Remove report dependency on report controller
The ReportsController was referencing the report and the report was
referencing the controller. It's unlikely that this circular dependency
created a memory leak but it's generally a bad design. And we need to
make the reporting independent of the controller to isolate it in a
background job.
2023-01-05 15:06:41 +11:00
Maikel Linke
446fa2ddab Remove confusing and unused db table
This table came from Spree but has never been used. We soon want to use
the term Product Group and having this table would be confusing.
2023-01-05 15:04:52 +11:00
Maikel Linke
59a565c446 Remove confusing and unused db table
This table came from Spree but has never been used.
2023-01-05 15:04:01 +11:00
Maikel
dc6ac99a3f Merge pull request #10223 from filipefurtad0/sets_pending_on_complex_creating_specific_time_spec
Comments out flaky example with xit
2023-01-05 14:10:11 +11:00
David Cook
5c8c4c36f7 Update all locales with the latest Transifex translations 2023-01-05 13:35:44 +11:00
David Cook
be25ea0b9e Merge pull request #10235 from mkllnk/drop-skrill
Remove unused Spree database table
2023-01-05 13:27:51 +11:00
Maikel Linke
9cba9395e3 Remove unused "skrill" translations 2023-01-05 11:16:12 +11:00
Maikel Linke
cdd39f526d Remove unused Spree database table
I randomly stumbled across this one and couldn't find any use of it. I
think that it refers to an old payment gateway that may have been used
by Spree once upon a time.
2023-01-05 11:05:15 +11:00
Maikel
31f7cadd92 Merge pull request #10217 from openfoodfoundation/dependabot/bundler/puma-6.0.2
Bump puma from 5.6.5 to 6.0.2 // Blocked by ofn-install/pull/855
2023-01-05 10:16:16 +11:00
Jean-Baptiste Bellet
972e0b5d0b Specify color for h4. Same as others titles. 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
927c1c81e5 Border and background for a panel 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
fd87013a63 Colorize and customize tagging componenent 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
274e0d0335 Same color but with variable 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
c5f3d3fa71 Use a darker grey for disabled button 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
26684f7db5 New colors for wizard progress 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
2ccb7de004 Specify cursor: default when button is disabled 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
7c321922ad Actually, this needs to be white since the body is no more white 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
d7e3e81c8c Adjust border color when active 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
d7454ecb9f Adjust border radius when drop is above 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
4c172b5ace Adjust color and height between input type text and select 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
6529a8d98f #clear_all_filters button as a secondary one 2023-01-04 10:41:30 +01:00
Jean-Baptiste Bellet
ccfc632149 Whatever the condition, display the td
And put the `ng-if` inside the `td`, attached to a new `div`
2023-01-04 10:41:30 +01:00
dependabot[bot]
32ec39ad8c Merge pull request #10231 from openfoodfoundation/dependabot/npm_and_yarn/json5-1.0.2 2023-01-04 09:39:08 +00:00
dependabot[bot]
449d500371 Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-04 09:25:17 +00:00
dependabot[bot]
cbb7e52795 Merge pull request #10230 from openfoodfoundation/dependabot/bundler/bullet-7.0.7 2023-01-04 09:24:24 +00:00
dependabot[bot]
1eb1beda3b Bump bullet from 7.0.5 to 7.0.7
Bumps [bullet](https://github.com/flyerhzm/bullet) from 7.0.5 to 7.0.7.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/7.0.5...7.0.7)

---
updated-dependencies:
- dependency-name: bullet
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-04 09:03:38 +00:00
Maikel Linke
da4069679c Link relative report path instead of absolute URL
You can reach a development server under localhost, 127.0.0.1, 0.0.0.0
or other names you define in your environment. The reports were using
absolute links to localhost though and therefore breaking your session
(login) while navigating.

I'm not sure why this was done though. Sebastian didn't explain this in
the commit message and it may have been accidental.
2023-01-04 15:43:12 +11:00
Jean-Baptiste Bellet
b858371735 Be more specific on allowed request origins by adding OFN_URL
+ add same configuration for production
2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
992b497b75 Allow request origins
https://guides.rubyonrails.org/action_cable_overview.html#allowed-request-origins
2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
53fa2ef8d5 Change order of the Actions menu: resend, print, cancel
It's more close to the Actions menu for a specific order (ie. on page `/admin/orders/[ORDER_ID]/edit`)
2023-01-03 10:32:11 +01:00
Maikel
79f602b4ea Remove unnecessary spec line 2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
ab39341192 Add permission management with cancancan 2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
edc0c189df Add spec for bulk "Resend email confirmation" action 2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
7e844ee289 Implement resend email confirmation bulk action
- Create a controller that send a reflex action with the order_ids array
2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
bcc9d447e1 Create a reflex that handle re-send email confirmation to user 2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
9997fe26fc Small adjustments to make it usable in admin section 2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
519c15a9d5 Create a ConfirmModalComponent
- Inherits from ModalComponent
 - Has a close button
 - Accept `confirm_actions` to trigger reflexes
 - Accept `controller` to encapsulate stimulus reflexe controllers
2023-01-03 10:32:11 +01:00
Jean-Baptiste Bellet
64ca0a4eea Extract open/close/closeIfEscapeKey methods to a mixins
therefore we can compose any controller from it
 - simplify `help-modal-controller` then
 - + create a simple `modal-controller` that close on `modal:close` event
2023-01-03 10:30:25 +01:00
Jean-Baptiste Bellet
2fde3abe37 Extract a StimulusJS modal_controller
+ make `help_modal_link_controller` inherit from it
2023-01-03 10:30:25 +01:00
Jean-Baptiste Bellet
c3805b8187 Create ModalComponent and make HelpModalComponent inherit from it 2023-01-03 10:30:25 +01:00
dependabot[bot]
70b1888d45 Merge pull request #10225 from openfoodfoundation/dependabot/npm_and_yarn/js-big-decimal-1.3.15 2023-01-03 09:27:11 +00:00
dependabot[bot]
f03df26e4e Merge pull request #10224 from openfoodfoundation/dependabot/npm_and_yarn/husky-8.0.3 2023-01-03 09:22:35 +00:00
dependabot[bot]
662ca16aa3 Bump js-big-decimal from 1.3.13 to 1.3.15
Bumps [js-big-decimal](https://github.com/royNiladri/js-big-decimal) from 1.3.13 to 1.3.15.
- [Release notes](https://github.com/royNiladri/js-big-decimal/releases)
- [Commits](https://github.com/royNiladri/js-big-decimal/compare/v1.3.13...v1.3.15)

---
updated-dependencies:
- dependency-name: js-big-decimal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 09:01:30 +00:00
dependabot[bot]
07f9379956 Bump husky from 8.0.2 to 8.0.3
Bumps [husky](https://github.com/typicode/husky) from 8.0.2 to 8.0.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Commits](https://github.com/typicode/husky/compare/v8.0.2...v8.0.3)

---
updated-dependencies:
- dependency-name: husky
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-03 09:01:14 +00:00
Maikel
f122f4bf50 Merge pull request #10188 from filipefurtad0/error_message_inventory_import
Adds coverage for error message in product and inventory import
2023-01-03 16:28:25 +11:00
Maikel
4a250f41f3 Merge pull request #10168 from filipefurtad0/updates_bom_spec
Updates BOM system spec - prepares for #10123
2023-01-03 15:20:37 +11:00
Maikel
388923e963 Merge pull request #10218 from openfoodfoundation/dependabot/bundler/bullet-7.0.5
Bump bullet from 7.0.4 to 7.0.5
2023-01-03 15:18:27 +11:00
Maikel
235f4bb767 Merge pull request #10219 from openfoodfoundation/dependabot/bundler/rubocop-1.42.0
Bump rubocop from 1.41.1 to 1.42.0
2023-01-03 15:17:58 +11:00
filipefurtad0
3a3fc066dc Comments out flaky example with xit 2023-01-02 19:20:00 +00:00
filipefurtad0
f3ff70a9f2 Updates BOM system spec after changes from #10123 2023-01-02 12:58:22 +00:00
filipefurtad0
5ae6223a8c Updates error messages after #10174 merge 2023-01-02 11:15:26 +00:00
filipefurtad0
a465093d12 Adds coverage for inconsistent variant unit name on csv - product creation 2023-01-02 11:15:26 +00:00
filipefurtad0
95c9f9afbb Adds coverage for inconsistent variant unit name on csv - inventory import 2023-01-02 11:15:26 +00:00
dependabot[bot]
2842f2bb9e Bump rubocop from 1.41.1 to 1.42.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.41.1 to 1.42.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.41.1...v1.42.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 09:05:39 +00:00
dependabot[bot]
dc8ccba972 Bump bullet from 7.0.4 to 7.0.5
Bumps [bullet](https://github.com/flyerhzm/bullet) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/7.0.4...7.0.5)

---
updated-dependencies:
- dependency-name: bullet
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 09:04:05 +00:00
dependabot[bot]
a0d7f10256 Bump puma from 5.6.5 to 6.0.2
Bumps [puma](https://github.com/puma/puma) from 5.6.5 to 6.0.2.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v5.6.5...v6.0.2)

---
updated-dependencies:
- dependency-name: puma
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-02 09:02:00 +00:00
Sigmund Petersen
d5ef68323e Merge pull request #10169 from cillian/remove-unused-angular-directives
Remove unused angular directives
2023-01-01 13:14:23 +01:00
Rachel Arnould
6c1c103272 Merge pull request #10080 from jibees/10075-change-edit-order-page-colors
[WIP 🚧 ] Admin - Order edition, behind feature toggle `admin_style_v2`: adjust colors
2022-12-30 11:42:23 +01:00
dependabot[bot]
985cf990d6 Merge pull request #10214 from openfoodfoundation/dependabot/bundler/knapsack_pro-3.7.0 2022-12-30 09:35:54 +00:00
dependabot[bot]
22eee4493f Bump knapsack_pro from 3.6.0 to 3.7.0
Bumps [knapsack_pro](https://github.com/KnapsackPro/knapsack_pro-ruby) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/KnapsackPro/knapsack_pro-ruby/releases)
- [Changelog](https://github.com/KnapsackPro/knapsack_pro-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/KnapsackPro/knapsack_pro-ruby/compare/v3.6.0...v3.7.0)

---
updated-dependencies:
- dependency-name: knapsack_pro
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-30 09:01:14 +00:00
Jean-Baptiste Bellet
74b618230f Put action icons on the same line inside a .flex container 2022-12-30 09:39:01 +01:00
Jean-Baptiste Bellet
5601a6d3b6 Darken labels since the background is now more white but light grey 2022-12-29 14:47:12 +01:00
Jean-Baptiste Bellet
7b7718977f Put action icons on the same line with .flex container
As they are now `display: flex;` (due to alignement of the background, and the icon itself), we are obliged to add this small container
2022-12-29 14:44:30 +01:00
Maikel Linke
c54942d1ce Update translations 2022-12-29 10:14:50 +11:00
Filipe
fdc78b717e Merge pull request #10123 from jibees/10017-introduce-a-filter-results-button-on-the-bom-page
Introduce a filter results button on the BOM page
2022-12-28 16:55:30 +00:00
Rachel Arnould
95821098d8 Merge pull request #10154 from jibees/10146-split-checkout-design-changes-part-1
Split checkout design changes part 1
2022-12-28 16:36:57 +01:00
Rachel Arnould
27643945ed Merge pull request #10200 from ijdershem/idersh/OFN-9834
[OFN-9834] Preserve 'Items' unit size selection on new product form e…
2022-12-28 16:05:43 +01:00
Jean-Baptiste Bellet
b0048cb453 Underline the text for title of the previously completed step 2022-12-28 15:27:37 +01:00
Jean-Baptiste Bellet
1e1ec95a5a Include payment form right after the payment description
which is right after the radio input that select the payment description
2022-12-28 15:24:46 +01:00
Jean-Baptiste Bellet
2d86e8857a Put payment method description just above the
+ update spec by adding `data-paymentmethod-id` attribute
2022-12-28 15:21:29 +01:00
Jean-Baptiste Bellet
f1bb4fdf38 Same display css rules for price of payment and shipping method
+ update spec since parenthesis are added by css
2022-12-28 15:21:29 +01:00
Jean-Baptiste Bellet
a6856f3d21 Cancel button looked as disabled: now use a orange border and white bg 2022-12-28 15:21:29 +01:00
Jean-Baptiste Bellet
ca1a850d4a Show shipping method description just bellow the radio input 2022-12-28 15:21:29 +01:00
Rachel Arnould
921e1f8083 Merge pull request #10113 from jibees/10112-remove-storybook-styleguide
Remove `@storybook`
2022-12-28 13:03:00 +01:00
Jean-Baptiste Bellet
928b4144d5 Remove @storybook 2022-12-27 10:50:11 +01:00
Jean-Baptiste Bellet
93e736fdf6 Use label as a placeholder that move above the input when focused
Couldn't make a pure CSS version because of the way rails generates its errors (it add `<span />` over the element, either `input` or `label`, itself)
2022-12-27 10:47:18 +01:00
Jean-Baptiste Bellet
988dcc6081 Use two columns for contact info and first/last name
For small screen, it's a one column
2022-12-27 10:46:59 +01:00
Jean-Baptiste Bellet
d43f0331ac Contact information section for email + phone number
+ add first name and last name to the billing address section
2022-12-27 10:46:38 +01:00
Jean-Baptiste Bellet
dcbe9dd1cb Do not underline element that aren't link 2022-12-27 10:46:37 +01:00
Filipe
c96bba8094 Merge pull request #10137 from ijdershem/idersh/issue-9834-pt2
[OFN-9834-PT2] Fix new product form error label styling
2022-12-26 11:54:25 +00:00
Filipe
45a49d01ec Merge pull request #10064 from abdellani/add_final_weight_to_occt_report_
Add final weight to occt report
2022-12-26 11:32:08 +00:00
dependabot[bot]
3b6d0a8760 Merge pull request #10203 from openfoodfoundation/dependabot/bundler/mini_portile2-2.8.1 2022-12-26 10:00:23 +00:00
dependabot[bot]
5f4aed92d8 Merge pull request #10204 from openfoodfoundation/dependabot/bundler/simplecov-0.22.0 2022-12-26 09:59:51 +00:00
dependabot[bot]
a118c786ef Merge pull request #10202 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.1.0 2022-12-26 09:58:11 +00:00
dependabot[bot]
1572a81274 Merge pull request #10205 from openfoodfoundation/dependabot/bundler/rubocop-rails-2.17.4 2022-12-26 09:55:12 +00:00
dependabot[bot]
6f8dc4dd79 Bump rubocop-rails from 2.17.3 to 2.17.4
Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.17.3 to 2.17.4.
- [Release notes](https://github.com/rubocop/rubocop-rails/releases)
- [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rails/compare/v2.17.3...v2.17.4)

---
updated-dependencies:
- dependency-name: rubocop-rails
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 09:03:23 +00:00
dependabot[bot]
6879643044 Bump simplecov from 0.21.2 to 0.22.0
Bumps [simplecov](https://github.com/simplecov-ruby/simplecov) from 0.21.2 to 0.22.0.
- [Release notes](https://github.com/simplecov-ruby/simplecov/releases)
- [Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md)
- [Commits](https://github.com/simplecov-ruby/simplecov/compare/v0.21.2...v0.22.0)

---
updated-dependencies:
- dependency-name: simplecov
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 09:02:54 +00:00
dependabot[bot]
2a0cd5e275 Bump mini_portile2 from 2.8.0 to 2.8.1
Bumps [mini_portile2](https://github.com/flavorjones/mini_portile) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/flavorjones/mini_portile/releases)
- [Changelog](https://github.com/flavorjones/mini_portile/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/mini_portile/compare/v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: mini_portile2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 09:01:28 +00:00
dependabot[bot]
af7c11bb3e Bump @floating-ui/dom from 1.0.12 to 1.1.0
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.0.12 to 1.1.0.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.1.0/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-26 09:01:28 +00:00
dependabot[bot]
046d7d5f44 Merge pull request #10189 from openfoodfoundation/dependabot/bundler/rubocop-1.41.1 2022-12-26 08:40:18 +00:00
dependabot[bot]
81e1bb19a3 Merge pull request #10190 from openfoodfoundation/dependabot/bundler/view_component-2.80.0 2022-12-26 08:39:55 +00:00
dependabot[bot]
d30d3d256d Merge pull request #10196 from openfoodfoundation/dependabot/bundler/jwt-2.6.0 2022-12-26 08:39:35 +00:00
dependabot[bot]
850c845992 Merge pull request #10197 from openfoodfoundation/dependabot/bundler/debug-1.7.1 2022-12-26 08:39:07 +00:00
Mohamed ABDELLANI
f1b81613d6 fix OCCT unit test 2022-12-26 08:47:42 +01:00
Mohamed ABDELLANI
e3914ed306 add final_weight_volume column to the hidden by default column of OCCT report 2022-12-26 08:29:36 +01:00
ijdershem-jf
ef092dd53a [OFN-9834] Fix red error highlighting on product unit value label
[OFN-9834] Fix unit value form label association

[OFN-9834] Update tests to reference correct product unit 'Value' field id
2022-12-24 18:36:41 -07:00
ijdershem-jf
5e0287d93f [9834] Fix red error highlighting on product category select label 2022-12-24 18:13:23 -07:00
ijdershem-jf
58fb2ebe29 [9834] Fix red error highlighting on product unit selection label 2022-12-24 09:44:37 -07:00
ijdershem-jf
0d37614e90 [OFN-9834] Preserve 'Items' unit size selection on new product form error 2022-12-24 09:31:31 -07:00
dependabot[bot]
cb4b54c927 Bump rubocop from 1.41.0 to 1.41.1
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.41.0 to 1.41.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.41.0...v1.41.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-24 10:27:11 +00:00
dependabot[bot]
a9a7ad5cb3 Bump debug from 1.7.0 to 1.7.1
Bumps [debug](https://github.com/ruby/debug) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/ruby/debug/releases)
- [Commits](https://github.com/ruby/debug/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: debug
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-24 10:27:04 +00:00
dependabot[bot]
46562aace7 Bump view_component from 2.79.0 to 2.80.0
Bumps [view_component](https://github.com/viewcomponent/view_component) from 2.79.0 to 2.80.0.
- [Release notes](https://github.com/viewcomponent/view_component/releases)
- [Changelog](https://github.com/ViewComponent/view_component/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/viewcomponent/view_component/compare/v2.79.0...v2.80.0)

---
updated-dependencies:
- dependency-name: view_component
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-24 10:26:49 +00:00
dependabot[bot]
a57d1863c0 Bump jwt from 2.5.0 to 2.6.0
Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/jwt/ruby-jwt/releases)
- [Changelog](https://github.com/jwt/ruby-jwt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jwt/ruby-jwt/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: jwt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-24 10:26:11 +00:00
jibees
fd74473bdd Merge pull request #10199 from filipefurtad0/fixes_list_spec
Changes dates to be dynamic using Time.zone.now
2022-12-24 11:22:34 +01:00
filipefurtad0
78c29f2c6a Changes dates to be dynamic using Time.zone.now
Strips leading zeroes from datepicker assertion
2022-12-23 17:11:49 +00:00
Rachel Arnould
7a62a95e0b Merge pull request #10103 from binarygit/stop-horizontal-scroll-of-body-in-order-summary-page
[Split Checkout] Stop horizontal scroll on body in order summary page
2022-12-23 10:29:21 +01:00
Jean-Baptiste Bellet
b8e4dcac7c Update all locales with the latest Transifex translations 2022-12-23 10:27:19 +01:00
Filipe
944d552f6b Merge pull request #10156 from ijdershem/idersh/issue-9834-pt3
[OFN-9834-PT3] Add placeholder for new product supplier field
2022-12-22 15:42:38 +00:00
Filipe
c3e4c53a01 Merge pull request #10074 from binarygit/order-cycle-closes-during-split-co
Redirect to shopfront when Order cycle closes during split checkout
2022-12-22 15:09:57 +00:00
Filipe
ae59621341 Merge pull request #10174 from ijdershem/idersh/OFN-9870
[OFN-9870] Correct error message for differing variant_unit_name for same product in import
2022-12-22 11:20:12 +00:00
Filipe
d61affd82b Merge pull request #10093 from vviekk/viv/noneTranslate
Translating text 'None' for tax and shipping categories of the product
2022-12-21 21:45:05 +00:00
jibees
c0364a845d Merge pull request #10172 from filipefurtad0/fix_flaky_invoice_spec_2
Removes line break for displaying product units
2022-12-21 18:37:50 +01:00
Filipe
47e100607c Merge pull request #10041 from abdellani/add_on-hand_and_on-demand_to_product_report
Add 'on hand' and 'on demand' to Products report
2022-12-21 17:31:21 +00:00
filipefurtad0
7f17bfaa9a Separates assertions to account for line breaks
Rubocop corrections
2022-12-21 17:25:30 +00:00
jibees
e9f92d39aa Merge pull request #10184 from abdellani/fix-zeitwork-load-exception
prevent loading the reporting module if already loaded [dev environment]
2022-12-21 11:26:19 +01:00
Mohamed ABDELLANI
23462e9965 avoid loading reporting lib if it's already loaded 2022-12-21 10:58:48 +01:00
Mohamed ABDELLANI
0d0c568b10 overwrite the default fields_to_hide to [] on OrderCycleSupplierTotals tests 2022-12-21 07:33:05 +01:00
Mohamed ABDELLANI
155b8ed725 subtract fields_to_hide when the fields_to_show are calculated 2022-12-21 07:32:18 +01:00
Mohamed ABDELLANI
11ea6b39cf test if All products report returns on_hand and on_demand 2022-12-21 07:23:32 +01:00
ijdershem-jf
18e9aba6b8 [OFN-9870] Display accurate error message for differing variant_unit_name for same product in import 2022-12-20 08:19:47 -07:00
Filipe
561458ce43 Merge pull request #9933 from Laurel16/instagram
Admin, Enterprise Settings, Social: Add instagram handler validator
2022-12-20 12:40:57 +00:00
Filipe
6f3d27b99b Merge pull request #10089 from abdellani/fix-payment-non-3d-need-to-be-manually-captured-in-BO
Fix Payments with non-3D cards need to be manually captured in the BO (Split checkout)
2022-12-20 10:09:45 +00:00
dependabot[bot]
8e5495c34d Merge pull request #10176 from openfoodfoundation/dependabot/bundler/rubocop-1.41.0 2022-12-20 09:18:06 +00:00
dependabot[bot]
59b727aa95 Bump rubocop from 1.40.0 to 1.41.0
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.40.0 to 1.41.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.40.0...v1.41.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-20 09:04:30 +00:00
binarygit
3b179e75a4 Stop horizontal scroll on body in cart page 2022-12-19 21:30:31 +05:45
Jean-Baptiste Bellet
2ff50587d8 Align icon content in the center via display: flex; 2022-12-19 11:53:58 +01:00
Jean-Baptiste Bellet
2296a51dd2 Remove useless CSS class .filte-row 2022-12-19 10:50:00 +01:00
dependabot[bot]
33896a73f3 Merge pull request #10171 from openfoodfoundation/dependabot/bundler/shoulda-matchers-5.3.0 2022-12-19 09:33:32 +00:00
dependabot[bot]
d97f49d1d4 Bump shoulda-matchers from 5.2.0 to 5.3.0
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/main/CHANGELOG.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: shoulda-matchers
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-19 09:03:57 +00:00
Cillian O'Ruanaidh
c000010d0b Update CSS comment to reflect that singleLineSelectors directive was replaced by filterSelectors 2022-12-16 16:24:42 +00:00
Cillian O'Ruanaidh
26baad53e4 Remove unused singleLineSelectors angular directive 2022-12-16 14:50:09 +00:00
Jean-Baptiste Bellet
86c437ee24 No need to be as specific
Didn't work for firefox.
Seems to be useless now, removing it.
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
19bd067379 White background for dropdowns 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
20596b9441 Mark as icon-remove and then considered as secondary 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
d8e22a5ee7 Add rounded corner on top of table header 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
896743ee34 Icon road (ie. ship button) should be dark blue on hover 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
f935a27253 Override border color when open or active for multi select 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
54fd768aa4 Darker blue instead of green on the side menu when active or hover 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
89acd3a589 Body is now with bg-color $v2-body-bg, ie. #f7f9fa 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
819cf5cc49 Add this td even if empty
easier to design table then
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
10b0f9b650 Be more and more specific to be sure that this overrides applies 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
67cca34daa Consider remove button as a secondary one 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
19f3fd872f Re-organise to be as clear as possible
Use default then override
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
3175f0f68c Specify for edit, capture, ok and plus icons: background is always blue
The previously success color (which is green) is doesn't fit the v2 design
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
5f7f7c78b0 Change tom-select colors
cf. select2
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
aa26e15e6b Permit to use hovering background color get from the state
Do not override, and then, icon can be:
 - red if it's a delete icon,
 - green if it's ..
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
64d467ce39 Specify table#listing_orders and be as generic as possible for table 2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
727e6d4966 Only called in a v2 context, no need to specify a selector
+ adjust that should be adjusted
2022-12-16 15:49:38 +01:00
Jean-Baptiste Bellet
66134c24b7 Sidebar should be blue instead of green 2022-12-16 15:48:36 +01:00
Jean-Baptiste Bellet
19d5723dd6 In v2, .cancel button are secondary 2022-12-16 15:48:36 +01:00
Jean-Baptiste Bellet
03c38aee3c Only import v2 scss files in a v2 context 2022-12-16 15:48:36 +01:00
Jean-Baptiste Bellet
ada76a9bf7 Create a palette mixin that override global color variables
This is widely used elsewhere and especially for all the state colors
2022-12-16 15:48:26 +01:00
Jean-Baptiste Bellet
bf073599d7 Align before pseudo component by using flex (and not width and padding) 2022-12-16 15:48:26 +01:00
Jean-Baptiste Bellet
faf106b282 Specify color for [class*="icon-"] as well 2022-12-16 15:48:26 +01:00
Cillian O'Ruanaidh
d79b4bdcf9 Remove unused fillVertical angular directive 2022-12-16 13:10:36 +00:00
Cillian O'Ruanaidh
d90d352a86 Remove unused showMore angular directive 2022-12-16 12:55:28 +00:00
dependabot[bot]
1ca305ab7c Merge pull request #10166 from openfoodfoundation/dependabot/npm_and_yarn/floating-ui/dom-1.0.12 2022-12-16 10:33:18 +00:00
dependabot[bot]
ea07795304 Bump @floating-ui/dom from 1.0.10 to 1.0.12
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.0.10 to 1.0.12.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.0.12/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-16 09:01:18 +00:00
ijdershem-jf
741dc0e29c [9834-PT3] Add en translation for new product supplier select placeholder 2022-12-14 20:35:19 -07:00
Jean-Baptiste Bellet
a0056553b0 Do not override date range selection when an order cycle is selected
Therefor user can change date range after selecting an order cycle
2022-12-14 10:14:54 +01:00
Jean-Baptiste Bellet
87ae8a40d1 Put date filter after the order cycle selector
it's way easier to understand then that date range could change when selecting order cycle
2022-12-14 10:13:36 +01:00
Jean-Baptiste Bellet
ac494f97ec When changing order cycle selection, update date range selector value
Date selector should change when selecting an order cycle in order to reflect the order cycle date range itself
2022-12-14 10:12:42 +01:00
ijdershem-jf
ea45462e50 [9834-PT3] Add placeholder/default select option for new product supplier field 2022-12-13 18:17:49 -07:00
Jean-Baptiste Bellet
e971f46611 Change behavior: dates shouldn't have changed
Seems like more coherent with the new behavior (ie. don't load orders on filters changes but on click on "Filter Results" button)
2022-12-12 16:18:39 +01:00
Jean-Baptiste Bellet
5fd78a8db5 Update specs: Need to click on "Filter Results" button to update orders 2022-12-12 16:18:39 +01:00
Jean-Baptiste Bellet
311675f2cf Used an already existing key
Update bulk_management.html.haml
2022-12-12 16:18:39 +01:00
Jean-Baptiste Bellet
97c3aaebb2 Update the view as well: remove red clear button
+ remove all `refreshData()` callback on input change
+ align html (add fieldset, legend) to look same as `/admin/orders`
2022-12-12 16:18:39 +01:00
Jean-Baptiste Bellet
4716ed19dc Remove the watch collection on date range: not needed anymore
Yes!
This simplifies a lot the code now since we have a "Search" button and we don't need to watch for date range changes
2022-12-12 16:18:39 +01:00
Jean-Baptiste Bellet
cd743e5c2c Call resetSelectFilters on page load
+ init start and end date with a method (will be re-used)
2022-12-12 16:18:39 +01:00
Laurel16
bfd396e644 Add instagram handler validator
update entreprise model to match the correct pattern for instagram attribute & add migration to correct wrong links in db + test
2022-12-08 15:22:05 +01:00
Mohamed ABDELLANI
84aedaa1a1 run process_payments before order confirmation 2022-12-08 11:13:54 +01:00
Mohamed ABDELLANI
86c25e1d48 add on_demand/on_hand columns to all products_and_inventory/all_products report 2022-12-06 08:42:42 +01:00
binarygit
368cd76611 [Split Checkout] Stop horizontal scroll on body in order summary page 2022-12-06 12:12:38 +05:45
vviekk
ccddb7ad65 Transalting text 'None' for tax and shipping categories of the product 2022-12-03 18:36:46 +05:30
binarygit
764c8d7d27 Redirect to shopfront when OC closes during split checkout 2022-12-01 15:13:36 +05:45
168 changed files with 2155 additions and 4759 deletions

View File

@@ -23,8 +23,7 @@ assignees: ''
## Finish on Tuesday
- [ ] Publish and notify [#global-community]:
> The next release is ready: https://github.com/openfoodfoundation/openfoodnetwork/releases/latest
- [ ] Publish and notify [#global-community] (this is automatically posted with a plugin)
- [ ] Deploy the new release to all managed instances.
<details><summary>Command line instructions</summary>
<pre>

1
.gitignore vendored
View File

@@ -50,7 +50,6 @@ vendor/bundle/
coverage
/reports/
!/reports/README.md
/spec/components/stories/**/*.stories.json
/public/packs
/public/packs-test

View File

@@ -12,7 +12,6 @@
babel.config.js
postcss.config.js
.storybook/
/app/assets/
/config/
/coverage/

View File

@@ -1,7 +0,0 @@
module.exports = {
stories: ['../spec/components/stories/**/*.stories.json'],
addons: [
'@storybook/addon-docs',
'@storybook/addon-controls',
],
};

View File

@@ -1,2 +0,0 @@
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300italic,400italic,300,700,700italic|Oswald:300,400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" media="screen" href="http://localhost:3000/assets/darkswarm/all.css" />

View File

@@ -1,5 +0,0 @@
export const parameters = {
server: {
url: `http://localhost:3000/rails/stories`,
},
};

View File

@@ -185,7 +185,6 @@ group :development do
gem 'spring-commands-rspec'
gem 'web-console'
gem "view_component_storybook"
gem 'rack-mini-profiler', '< 3.0.0'
end

View File

@@ -179,10 +179,10 @@ GEM
bindex (0.8.1)
bootsnap (1.15.0)
msgpack (~> 1.2)
bugsnag (6.25.0)
bugsnag (6.25.1)
concurrent-ruby (~> 1.0)
builder (3.2.4)
bullet (7.0.4)
bullet (7.0.7)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
cable_ready (5.0.0.pre9)
@@ -241,7 +241,7 @@ GEM
debase-ruby_core_source (= 0.10.12)
msgpack
debase-ruby_core_source (0.10.12)
debug (1.7.0)
debug (1.7.1)
irb (>= 1.5.0)
reline (>= 0.3.1)
debugger-linecache (1.2.0)
@@ -349,9 +349,9 @@ GEM
ruby-vips (>= 2.0.17, < 3)
immigrant (0.3.6)
activerecord (>= 3.0)
io-console (0.5.11)
io-console (0.6.0)
ipaddress (0.8.3)
irb (1.5.1)
irb (1.6.2)
reline (>= 0.3.0)
jmespath (1.6.2)
jquery-rails (4.4.0)
@@ -374,15 +374,15 @@ GEM
rspec (>= 2.0, < 4.0)
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
jwt (2.5.0)
knapsack_pro (3.6.0)
jwt (2.6.0)
knapsack_pro (3.7.0)
rake
launchy (2.5.0)
addressable (~> 2.7)
letter_opener (1.8.1)
launchy (>= 2.2, < 3)
libv8-node (15.14.0.1)
listen (3.7.1)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
loofah (2.19.1)
@@ -401,10 +401,10 @@ GEM
rake
mini_magick (4.11.0)
mini_mime (1.1.2)
mini_portile2 (2.8.0)
mini_portile2 (2.8.1)
mini_racer (0.4.0)
libv8-node (~> 15.14.0.0)
minitest (5.16.3)
minitest (5.17.0)
monetize (1.12.0)
money (~> 6.12)
money (6.16.0)
@@ -472,7 +472,7 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.0)
puma (5.6.5)
puma (6.0.2)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.6.1)
@@ -540,13 +540,13 @@ GEM
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
i18n
rb-fsevent (0.11.0)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.5.1)
redis (4.8.0)
regexp_parser (2.6.1)
reline (0.3.1)
reline (0.3.2)
io-console (~> 0.5)
request_store (1.5.0)
rack (>= 1.4)
@@ -599,19 +599,19 @@ GEM
rswag-ui (2.8.0)
actionpack (>= 3.1, < 7.1)
railties (>= 3.1, < 7.1)
rubocop (1.40.0)
rubocop (1.42.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.23.0, < 2.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.24.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
rubocop-rails (2.17.3)
rubocop-rails (2.17.4)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
@@ -634,7 +634,7 @@ GEM
tilt (>= 1.1, < 3)
sd_notify (0.1.1)
semantic_range (3.0.0)
shoulda-matchers (5.2.0)
shoulda-matchers (5.3.0)
activesupport (>= 5.2.0)
sidekiq (6.5.8)
connection_pool (>= 2.2.5, < 3)
@@ -645,16 +645,16 @@ GEM
rufus-scheduler (~> 3.2)
sidekiq (>= 4, < 7)
tilt (>= 1.4.0)
simplecov (0.21.2)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.3)
simplecov_json_formatter (0.1.4)
spreadsheet_architect (5.0.0)
caxlsx (>= 3.3.0, < 4)
rodf (>= 1.0.0, < 2)
spring (4.1.0)
spring (4.1.1)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.2)
@@ -710,16 +710,14 @@ GEM
activemodel (>= 3.0.0)
public_suffix
vcr (6.1.0)
view_component (2.79.0)
activesupport (>= 5.0.0, < 8.0)
view_component (2.82.0)
activesupport (>= 5.2.0, < 8.0)
concurrent-ruby (~> 1.0)
method_source (~> 1.0)
view_component_reflex (3.1.14.pre9)
rails (>= 5.2, < 8.0)
stimulus_reflex (>= 3.5.0.pre2)
view_component (>= 2.28.0)
view_component_storybook (0.11.1)
view_component (>= 2.36)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
@@ -884,7 +882,6 @@ DEPENDENCIES
vcr
view_component
view_component_reflex (= 3.1.14.pre9)
view_component_storybook
web!
web-console
webmock

View File

@@ -1,12 +0,0 @@
angular.module("admin.indexUtils").component 'showMore',
templateUrl: 'admin/show_more.html'
bindings:
data: "="
limit: "="
increment: "="
# For now, this component is not being used.
# Something about binding "data" to a variable on the parent scope that is continually refreshed by
# being assigned within an ng-repeat means that we get $digest iteration errors. Seems to be solved
# by using the new "as" syntax for ng-repeat to assign and alias the outcome of the filters, but this
# has the limitation of not being able to be limited AFTER the assignment has been made, which we need

View File

@@ -3,10 +3,6 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.RequestMonitor = RequestMonitor
$scope.line_items = LineItems.all
$scope.confirmDelete = true
$scope.startDate = moment().startOf('day').subtract(7, 'days').format('YYYY-MM-DD')
$scope.endDate = moment().startOf('day').format('YYYY-MM-DD')
$scope.previousDates = { startDate: $scope.startDate, endDate: $scope.endDate }
$scope.datesChangedOnCancelEvent = false
$scope.bulkActions = [ { name: t("admin.orders.bulk_management.actions_delete"), callback: 'deleteLineItems' } ]
$scope.selectedUnitsProduct = {}
$scope.selectedUnitsVariant = {}
@@ -17,42 +13,29 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.confirmRefresh = ->
LineItems.allSaved() || confirm(t("unsaved_changes_warning"))
$scope.initStartAndEnDate = ->
$scope.startDate = moment().startOf('day').subtract(7, 'days').format('YYYY-MM-DD')
$scope.endDate = moment().startOf('day').format('YYYY-MM-DD')
$scope.resetFilters = ->
$scope.distributorFilter = ''
$scope.supplierFilter = ''
$scope.orderCycleFilter = ''
$scope.quickSearch = ''
$scope.initStartAndEnDate()
event = new CustomEvent('flatpickr:change', {
detail: {
startDate: $scope.startDate,
endDate: $scope.endDate
}
})
window.dispatchEvent(event)
$scope.resetSelectFilters = ->
$scope.resetFilters()
$scope.refreshData()
$scope.$watchCollection "[startDate, endDate]", (newValues, oldValues) ->
if newValues != oldValues && !$scope.datesChangedOnCancelEvent
state = $scope.refreshData()
if (state == "cancel")
$scope.datesChangedOnCancelEvent = true
$scope.cancelDateChange()
$scope.cancelDateChange = ->
# Reset the date filters to the previous values
$scope.startDate = $scope.previousDates.startDate
$scope.endDate = $scope.previousDates.endDate
# throw a flatpickr:change event to change the date back in the datepicker
event = new CustomEvent('flatpickr:change', {
detail: {
startDate: $scope.previousDates.startDate,
endDate: $scope.previousDates.endDate
}
})
window.dispatchEvent(event)
$timeout ->
$scope.datesChangedOnCancelEvent = false
$scope.refreshData = ->
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
$scope.setOrderCycleDateRange()
$scope.formattedStartDate = moment($scope.startDate).format()
$scope.formattedEndDate = moment($scope.endDate).add(1,'day').format()
@@ -67,11 +50,6 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.loadAssociatedData()
$scope.dereferenceLoadedData()
$timeout ->
# update the previous dates with the current ones since loading was successful
$scope.previousDates.startDate = $scope.startDate
$scope.previousDates.endDate = $scope.endDate
$scope.setOrderCycleDateRange = ->
start_date = OrderCycles.byID[$scope.orderCycleFilter].orders_open_at
@@ -79,6 +57,14 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
format = "YYYY-MM-DD HH:mm:ss Z"
$scope.startDate = moment(start_date, format).format('YYYY-MM-DD')
$scope.endDate = moment(end_date, format).startOf('day').format('YYYY-MM-DD')
# throw a flatpickr:change event to change the date back in the datepicker
event = new CustomEvent('flatpickr:change', {
detail: {
startDate: $scope.startDate,
endDate: $scope.endDate
}
})
window.dispatchEvent(event)
$scope.loadOrders = ->
RequestMonitor.load $scope.orders = Orders.index(
@@ -277,5 +263,4 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
lineItem.final_weight_volume = LineItems.pristineByID[lineItem.id].final_weight_volume * lineItem.quantity / LineItems.pristineByID[lineItem.id].quantity
$scope.weightAdjustedPrice(lineItem)
$scope.resetFilters()
$scope.refreshData()
$scope.resetSelectFilters()

View File

@@ -21,8 +21,14 @@ angular.module("admin.products")
else
$scope.product.variant_unit = $scope.product.variant_unit_with_scale
$scope.product.variant_unit_scale = null
else if $scope.product.variant_unit && $scope.product.variant_unit_scale
$scope.product.variant_unit_with_scale = VariantUnitManager.getUnitWithScale($scope.product.variant_unit, parseFloat($scope.product.variant_unit_scale))
else if $scope.product.variant_unit
# Preserves variant_unit_with_scale when form validation fails and reload triggers
if $scope.product.variant_unit_scale
$scope.product.variant_unit_with_scale = VariantUnitManager.getUnitWithScale(
$scope.product.variant_unit, parseFloat($scope.product.variant_unit_scale)
)
else
$scope.product.variant_unit_with_scale = $scope.product.variant_unit
else
$scope.product.variant_unit = $scope.product.variant_unit_scale = null

View File

@@ -1,9 +0,0 @@
angular.module('Darkswarm').directive "fillVertical", ($window)->
# Makes something fill the window vertically. Used on the Google Map.
restrict: 'A'
link: (scope, element, attrs)->
setSize = ->
element.css "height", ($window.innerHeight - element.offset().top)
setSize()
angular.element($window).bind "resize", ->
setSize()

View File

@@ -1,82 +0,0 @@
angular.module('Darkswarm').directive 'singleLineSelectors', ($timeout, $filter) ->
restrict: 'E'
templateUrl: "single_line_selectors.html"
scope:
selectors: "="
objects: "&"
activeSelectors: "="
selectorName: "@activeSelectors"
link: (scope, element, attrs) ->
scope.fitting = false
scope.refit = ->
if scope.allSelectors?
scope.fitting = true
selector.fits = true for selector in scope.allSelectors
$timeout(loadWidths, 0, true).then ->
$timeout fit, 0, true
fit = ->
used = $(element).find("li.more").outerWidth(true)
used += selector.width for selector in scope.allSelectors when selector.fits
available = $(element).parent(".filter-shopfront").innerWidth() - used
if available > 0
for selector in scope.allSelectors when !selector.fits
available -= selector.width
selector.fits = true if available > 0
else
if scope.allSelectors.length > 0
for i in [scope.allSelectors.length-1..0]
selector = scope.allSelectors[i]
if !selector.fits
continue
else
if available < 0
selector.fits = false
available += selector.width
scope.fitting = false
loadWidths = ->
$(element).find("li").not(".more").each (i) ->
if i < scope.allSelectors.length
scope.allSelectors[i].width = $(this).outerWidth(true)
return null # So we don't exit the loop weirdly
scope.overFlowSelectors = ->
return [] unless scope.allSelectors?
$filter('filter')(scope.allSelectors, { fits: false })
scope.selectedOverFlowSelectors = ->
$filter('filter')(scope.overFlowSelectors(), { active: true })
# had to duplicate this to make overflow selectors work
scope.emit = ->
scope.activeSelectors = scope.allSelectors.filter (selector)->
selector.active
.map (selector) ->
selector.object.id
# From: http://stackoverflow.com/questions/4298612/jquery-how-to-call-resize-event-only-once-its-finished-resizing
debouncer = (func, timeout) ->
timeoutID = undefined
timeout = timeout or 50
->
subject = this
args = arguments
clearTimeout timeoutID
timeoutID = setTimeout(->
func.apply subject, Array::slice.call(args)
, timeout)
# -- Event management
scope.$watchCollection "allSelectors", ->
scope.refit()
scope.$on "filtersToggled", ->
scope.refit()
$(window).resize debouncer (e) ->
scope.fitting = true
if scope.allSelectors?
$timeout fit, 0, true

View File

@@ -1,3 +0,0 @@
%div{ ng: { show: "data.length > limit" } }
%input{ type: 'button', value: t(:show_more), ng: { click: 'limit = limit + increment' } }
%input{ type: 'button', value: t(:show_all_with_more, num: '{{ data.length - limit }}'), ng: { click: 'limit = data.length' } }

View File

@@ -1,14 +0,0 @@
-# In order for the single-line-selector scope to have access to the available selectors,
%filter-selector{"selector-set" => "selectors", objects: "objects()", "active-selectors" => "activeSelectors", "all-selectors" => "allSelectors" }
%ul{ ng: { if: "overFlowSelectors().length > 0 || fitting" } }
%li.more
%a.dropdown{ data: { dropdown: "{{ 'show-more-' + selectorName }}" }, ng: { class: "{active: selectedOverFlowSelectors().length > 0}" } }
%span
{{ 'js.more_items' | t:{ count: overFlowSelectors().length } }}
%i.ofn-i_052-point-down
.f-dropdown.text-right.content{ ng: { attr: { id: "{{ 'show-more-' + selectorName }}" } } }
%ul
%active-selector{ ng: { repeat: "selector in overFlowSelectors()", hide: "selector.fits" } }
%render-svg{path: "{{selector.object.icon}}", ng: { if: "selector.object.icon"}}
%span {{ selector.object.name }}

View File

@@ -0,0 +1,15 @@
# frozen_string_literal: true
class ConfirmModalComponent < ModalComponent
def initialize(id:, confirm_actions: nil, controllers: nil)
super(id: id, close_button: true)
@confirm_actions = confirm_actions
@controllers = controllers
end
private
def close_button_class
"secondary"
end
end

View File

@@ -0,0 +1,8 @@
%div{ id: @id, "data-controller": "modal #{@controllers}", "data-action": "keyup@document->modal#closeIfEscapeKey" }
.reveal-modal-bg.fade{ "data-modal-target": "background", "data-action": "click->modal#close" }
.reveal-modal.fade.tiny.help-modal{ "data-modal-target": "modal" }
= content
.modal-actions
%input{ class: "button icon-plus #{close_button_class}", type: 'button', value: t('js.admin.modals.cancel'), "data-action": "click->modal#close" }
%input{ class: "button icon-plus primary", type: 'button', value: t('js.admin.modals.confirm'), "data-action": @confirm_actions }

View File

@@ -0,0 +1,4 @@
.modal-actions {
display: flex;
justify-content: space-around;
}

View File

@@ -1,26 +1,7 @@
# frozen_string_literal: true
class HelpModalComponent < ViewComponent::Base
class HelpModalComponent < ModalComponent
def initialize(id:, close_button: true)
@id = id
@close_button = close_button
end
private
def close_button_class
if namespace == "admin"
"red"
else
"primary"
end
end
def close_button?
!!@close_button
end
def namespace
helpers.controller_path.split("/").first
super(id: id, close_button: close_button)
end
end

View File

@@ -0,0 +1,26 @@
# frozen_string_literal: true
class ModalComponent < ViewComponent::Base
def initialize(id:, close_button: true)
@id = id
@close_button = close_button
end
private
def close_button_class
if namespace == "admin"
"red"
else
"primary"
end
end
def close_button?
!!@close_button
end
def namespace
helpers.controller_path.split("/").first
end
end

View File

@@ -3,11 +3,16 @@
require "open_food_network/feature_toggle"
class FeatureToggleConstraint
def initialize(feature_name)
def initialize(feature_name, negate: false)
@feature = feature_name
@negate = negate
end
def matches?(request)
enabled?(request) ^ @negate
end
def enabled?(request)
OpenFoodNetwork::FeatureToggle.enabled?(@feature, current_user(request))
end

View File

@@ -31,7 +31,7 @@ module Admin
private
def export_report
send_data @report.render_as(report_format, controller: self), filename: report_filename
send_data @report.render_as(report_format), filename: report_filename
end
def render_report

View File

@@ -1,6 +1,7 @@
# frozen_string_literal: true
module OrderStockCheck
include CablecarResponses
extend ActiveSupport::Concern
def valid_order_line_items?
@@ -29,6 +30,9 @@ module OrderStockCheck
flash[:info] = I18n.t('order_cycle_closed')
respond_to do |format|
format.cable_ready {
render status: :see_other, operations: cable_car.redirect_to(url: main_app.shop_path)
}
format.json { render json: { path: main_app.shop_path }, status: :see_other }
format.html { redirect_to main_app.shop_path, status: :see_other }
end

View File

@@ -31,6 +31,7 @@ class SplitCheckoutController < ::BaseController
if confirm_order || update_order
return if performed?
check_payments_adjustments
clear_invalid_payments
advance_order_state
redirect_to_step
@@ -53,6 +54,10 @@ class SplitCheckoutController < ::BaseController
flash[:error] = I18n.t('split_checkout.errors.no_shipping_methods_available')
end
def check_payments_adjustments
@order.payments.each(&:ensure_correct_adjustment)
end
def clear_invalid_payments
@order.payments.with_state(:invalid).delete_all
end
@@ -65,6 +70,7 @@ class SplitCheckoutController < ::BaseController
return true if redirect_to_payment_gateway
@order.process_payments!
@order.confirm!
order_completion_reset @order
end

View File

@@ -133,7 +133,7 @@ module Spree
event_label = I18n.t("cancel", scope: "actions")
button_link_to(event_label,
fire_admin_order_url(@order, e: "cancel"),
method: :put, icon: "icon-cancel", form_id: "cancel_order_form")
method: :put, icon: "icon-remove", form_id: "cancel_order_form")
end
def resume_event_link

View File

@@ -15,6 +15,7 @@ class Enterprise < ApplicationRecord
medium: { resize_to_fill: [720, 156] },
large: { resize_to_fill: [1200, 260] },
}.freeze
VALID_INSTAGRAM_REGEX = %r{\A[a-zA-Z0-9._]{1,30}([^/-]*)\z}
searchable_attributes :sells, :is_primary_producer
searchable_associations :properties
@@ -99,6 +100,7 @@ class Enterprise < ApplicationRecord
validate :shopfront_taxons
validate :shopfront_producers
validate :enforce_ownership_limit, if: lambda { owner_id_changed? && !owner_id.nil? }
validates :instagram, format: { with: VALID_INSTAGRAM_REGEX, message: Spree.t('errors.messages.invalid_instagram_url') }, allow_blank: true
before_validation :initialize_permalink, if: lambda { permalink.nil? }
before_validation :set_unused_address_fields
@@ -456,7 +458,7 @@ class Enterprise < ApplicationRecord
end
def correct_instagram_url(url)
url && strip_url(url).sub(%r{www.instagram.com/}, '').delete("@")
url && strip_url(url.downcase).sub(%r{www.instagram.com/}, '').sub(%r{instagram.com/}, '').delete("@")
end
def correct_twitter_url(url)

View File

@@ -211,7 +211,7 @@ module ProductImport
reference_entry = all_entries_for_product(entry).first
return if entry.variant_unit_name.to_s == reference_entry.variant_unit_name.to_s
mark_as_not_updatable(entry, "variant_unit_name")
mark_as_values_must_be_same(entry, "variant_unit_name")
end
def producer_validation(entry)
@@ -425,6 +425,11 @@ module ProductImport
error: I18n.t("admin.product_import.model.not_updatable"))
end
def mark_as_values_must_be_same(entry, attribute)
mark_as_invalid(entry, attribute: attribute,
error: I18n.t("admin.product_import.model.values_must_be_same"))
end
def import_into_inventory?
@import_settings.dig(:settings, 'import_into') == 'inventories'
end

View File

@@ -16,4 +16,11 @@ class ApplicationReflex < StimulusReflex::Reflex
#
# For code examples, considerations and caveats, see:
# https://docs.stimulusreflex.com/rtfm/patterns#internationalization
include CanCan::ControllerAdditions
delegate :current_user, to: :connection
def current_ability
Spree::Ability.new(current_user)
end
end

View File

@@ -0,0 +1,13 @@
# frozen_string_literal: true
class ResendConfirmationEmailReflex < ApplicationReflex
def confirm(order_ids)
Spree::Order.where(id: order_ids).find_each do |o|
Spree::OrderMailer.confirm_email_for_customer(o.id, true).deliver_later if can? :resend, o
end
flash[:success] = I18n.t("admin.resend_confirmation_emails_feedback", count: order_ids.count)
cable_ready.dispatch_event(name: "modal:close")
morph "#flashes", render(partial: "shared/flashes", locals: { flashes: flash })
end
end

View File

@@ -102,7 +102,6 @@
%td.actions
%a{ 'ng-click' => "deleteCustomer(customer)", :class => "delete-customer icon-trash no-text" }
-# %show-more.text-center{ data: "filteredCustomers", limit: "customerLimit", increment: "20" }
%div.text-center{ ng: { show: "filteredCustomers.length > customerLimit" } }
%input{ type: 'button', value: t(:show_more), ng: { click: 'customerLimit = customerLimit + 20' } }
%input{ type: 'button', value: t(:show_all_with_more, num: '{{ filteredCustomers.length - customerLimit }}'), ng: { click: 'customerLimit = filteredCustomers.length' } }

View File

@@ -3,4 +3,4 @@
{{ enterprise.name }}
= "{{ enterprise.issues_summary_#{type} ? '('+enterprise.issues_summary_#{type}+')' : '' }}"
= f.submit t(".add_#{type}"), 'ng-click' => "add#{type.capitalize}($event)", 'ng-disabled' => "!new_#{type}_id || !OrderCycle.novel#{type.capitalize}(new_#{type}_id)"
= f.submit t(".add_#{type}"), 'ng-click' => "add#{type.capitalize}($event)", 'ng-disabled' => "!new_#{type}_id || !OrderCycle.novel#{type.capitalize}(new_#{type}_id)", "class": "secondary"

View File

@@ -26,15 +26,16 @@
= f.submit t('.add_fee'), 'ng-click' => 'addExchangeFee($event, exchange)', 'ng-hide' => '!enterprises[exchange.enterprise_id].managed && !order_cycle.viewing_as_coordinator'
%td.actions
%a{'ng-click' => 'removeExchange($event, exchange)', :class => "icon-trash no-text remove-exchange"}
.flex
%a{'ng-click' => 'removeExchange($event, exchange)', :class => "icon-trash no-text remove-exchange"}
- if type == 'supplier'
%tr.panel-row{ object: "exchange",
panels: "{products: 'exchange_products_supplied'}",
locals: "$index,exchangeTotalVariants,order_cycle,exchange,enterprises,setExchangeVariants,selectAllVariants,suppliedVariants,removeDistributionOfVariant,initializeExchangeProductsPanel,loadMoreExchangeProducts,loadAllExchangeProducts,productsLoading",
colspan: 4 }
colspan: if feature?(:admin_style_v2, spree_current_user) then 5 else 4 end }
- if type == 'distributor'
%tr.panel-row{ object: "exchange",
panels: "{products: 'exchange_products_distributed', tags: 'exchange_tags'}",
locals: "$index,exchangeTotalVariants,order_cycle,exchange,enterprises,setExchangeVariants,incomingExchangeVariantsFor,variantSuppliedToOrderCycle,initializeExchangeProductsPanel,loadMoreExchangeProducts,loadAllExchangeProducts,productsLoading",
colspan: 5 }
colspan: if feature?(:admin_style_v2, spree_current_user) then 6 else 5 end }

View File

@@ -1,16 +1,16 @@
%colgroup
%col{ ng: { show: 'columns.name.visible' } }
%col{ ng: { show: 'columns.schedules.visible' } }
%col{ ng: { show: 'columns.open.visible' }, style: 'width: 20%;' }
%col{ ng: { show: 'columns.close.visible' }, style: 'width: 20%;' }
%col{ ng: { show: 'columns.open.visible' } }
%col{ ng: { show: 'columns.close.visible' } }
- unless simple_index
%col{ ng: { show: 'columns.producers.visible' } }
%col{ ng: { show: 'columns.coordinator.visible' } }
%col{ ng: { show: 'columns.shops.visible' } }
%col{ ng: { show: 'columns.products.visible' } }
%col{ style: 'width: 5%;' }
%col{ style: 'width: 5%;' }
%col{ style: 'width: 5%;' }
%col
%col
%col
%thead
%tr
@@ -32,5 +32,3 @@
%th{ ng: { show: 'columns.products.visible' } }
=t :products
%th.actions
%th.actions
%th.actions

View File

@@ -32,8 +32,9 @@
= t('.variants')
%td.actions
%a.edit-order-cycle.icon-edit.no-text{ ng: { href: '{{orderCycle.edit_path}}'}, 'ofn-with-tip' => t(:edit) }
%td.actions{ ng: { if: 'orderCycle.viewing_as_coordinator' } }
%a.clone-order-cycle.icon-copy.no-text{ ng: { href: '{{orderCycle.clone_path}}'}, 'ofn-with-tip' => t(:clone) }
%td.actions{ ng: { if: 'orderCycle.deletable && orderCycle.viewing_as_coordinator' }}
%a.delete-order-cycle.icon-trash.no-text{ ng: { href: '{{orderCycle.delete_path}}'}, data: { method: 'delete', confirm: t(:are_you_sure) }, 'ofn-with-tip' => t(:remove) }
.flex
%a.edit-order-cycle.icon-edit.no-text{ ng: { href: '{{orderCycle.edit_path}}'}, 'ofn-with-tip' => t(:edit) }
%div{ ng: { if: 'orderCycle.viewing_as_coordinator' } }
%a.clone-order-cycle.icon-copy.no-text{ ng: { href: '{{orderCycle.clone_path}}'}, 'ofn-with-tip' => t(:clone) }
%div{ ng: { if: 'orderCycle.deletable && orderCycle.viewing_as_coordinator' }}
%a.delete-order-cycle.icon-trash.no-text{ ng: { href: '{{orderCycle.delete_path}}'}, data: { method: 'delete', confirm: t(:are_you_sure) }, 'ofn-with-tip' => t(:remove) }

View File

@@ -1,5 +1,5 @@
%ul{style: "margin-left: 12pt"}
- report_subtypes.each do |report_subtype|
%li
- url = main_app.admin_report_url(report_type: report_type, report_subtype: report_subtype[1])
- url = main_app.admin_report_path(report_type: report_type, report_subtype: report_subtype[1])
= link_to report_subtype[0], url

View File

@@ -1,7 +1,7 @@
- content_for :page_title do
= @report_title
= form_for @report.search, :url => url_for(only_path: false) do |f|
= form_for @report.search, :url => url_for do |f|
%fieldset.no-border-bottom.print-hidden
%legend{ align: 'center'}= t(:report_filters)
= render partial: "admin/reports/filters/#{@report_type}", locals: { f: f }

View File

@@ -1,4 +1,3 @@
-# %show-more.text-center{ data: "filteredProducts", limit: "productLimit", increment: "10" }
.text-center{ ng: { show: "filteredProducts.length > productLimit" } }
%input{ type: 'button', value: t(:show_more), ng: { click: 'productLimit = productLimit + 10' } }

View File

@@ -3,7 +3,7 @@
.small-12.medium-6.columns.text-right
&nbsp;
.row.animate-show.filter-row{"ng-show" => "filtersActive"}
.row.animate-show{"ng-show" => "filtersActive"}
.small-12.columns
.row.filter-box
.small-12.columns

View File

@@ -2,6 +2,6 @@
- if defined? flashes
- flashes.each do |type, msg|
%alert.animate-show{"data-controller": "flash"}
%div{type: "#{type}", class: "alert-box #{type == 'error' ? 'alert' : type}"}
.flash{type: "#{type}", class: "alert-box #{type == 'error' ? 'alert' : type}"}
%span= msg
%a.small.close{"data-action": "click->flash#close"} ×

View File

@@ -4,7 +4,7 @@
.row
= render 'shared/components/filter_controls'
.row.animate-show.filter-row{"ng-show" => "filtersActive"}
.row.animate-show{"ng-show" => "filtersActive"}
.small-12.columns
.row.filter-box
.small-12.large-9.columns

View File

@@ -3,51 +3,53 @@
%div.checkout-substep
-# YOUR DETAILS
%div.checkout-title
= t("split_checkout.step1.your_details.title")
= t("split_checkout.step1.contact_information.title")
%div.checkout-input
= bill_address.label :firstname, t("split_checkout.step1.your_details.first_name.label")
= bill_address.text_field :firstname, { placeholder: t("split_checkout.step1.your_details.first_name.placeholder") }
= f.error_message_on "bill_address.firstname"
.two-columns-inputs
%div.checkout-input.with-floating-label{ "data-controller": "floating-label" }
= f.label :email, t("split_checkout.step1.contact_information.email.label")
= f.text_field :email, { placeholder: " " }
= f.error_message_on :email
%div.checkout-input
= bill_address.label :lastname, t("split_checkout.step1.your_details.last_name.label")
= bill_address.text_field :lastname, { placeholder: t("split_checkout.step1.your_details.last_name.placeholder") }
= f.error_message_on "bill_address.lastname"
%div.checkout-input
= f.label :email, t("split_checkout.step1.your_details.email.label")
= f.text_field :email, { placeholder: t("split_checkout.step1.your_details.email.placeholder") }
= f.error_message_on :email
%div.checkout-input
= bill_address.label :phone, t("split_checkout.step1.your_details.phone.label")
= bill_address.text_field :phone, { placeholder: t("split_checkout.step1.your_details.phone.placeholder") }
= f.error_message_on "bill_address.phone"
%div.checkout-input.with-floating-label{ "data-controller": "floating-label" }
= bill_address.label :phone, t("split_checkout.step1.contact_information.phone.label")
= bill_address.text_field :phone, { placeholder: " " }
= f.error_message_on "bill_address.phone"
%div.checkout-substep
-# BILLING ADDRESS
%div.checkout-title
= t("split_checkout.step1.billing_address.title")
%div.checkout-input
.two-columns-inputs
%div.checkout-input.with-floating-label{ "data-controller": "floating-label" }
= bill_address.label :firstname, t("split_checkout.step1.billing_address.first_name.label")
= bill_address.text_field :firstname, { placeholder: " " }
= f.error_message_on "bill_address.firstname"
%div.checkout-input.with-floating-label{ "data-controller": "floating-label" }
= bill_address.label :lastname, t("split_checkout.step1.billing_address.last_name.label")
= bill_address.text_field :lastname, { placeholder: " " }
= f.error_message_on "bill_address.lastname"
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= bill_address.label :address1, t("split_checkout.step1.address.address1.label")
= bill_address.text_field :address1, { placeholder: t("split_checkout.step1.address.address1.placeholder") }
= bill_address.text_field :address1, { placeholder: " " }
= f.error_message_on "bill_address.address1"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= bill_address.label :address2, t("split_checkout.step1.address.address2.label")
= bill_address.text_field :address2, { placeholder: t("split_checkout.step1.address.address2.placeholder") }
= bill_address.text_field :address2, { placeholder: " " }
= f.error_message_on "bill_address.address2"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= bill_address.label :city, t("split_checkout.step1.address.city.label")
= bill_address.text_field :city, { placeholder: t("split_checkout.step1.address.city.placeholder") }
= bill_address.text_field :city, { placeholder: " " }
= f.error_message_on "bill_address.city"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= bill_address.label :zipcode, t("split_checkout.step1.address.zipcode.label")
= bill_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
= bill_address.text_field :zipcode, { placeholder: " " }
= f.error_message_on "bill_address.zipcode"
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }
@@ -76,33 +78,30 @@
- selected_shipping_method ||= @shipping_methods[0].id if @shipping_methods.length == 1
- @shipping_methods.each do |shipping_method|
- ship_method_is_selected = shipping_method.id == selected_shipping_method.to_i
%div.checkout-input.checkout-input-radio
= fields_for shipping_method do |shipping_method_form|
= shipping_method_form.radio_button :name, shipping_method.id,
id: "shipping_method_#{shipping_method.id}",
checked: (shipping_method.id == selected_shipping_method.to_i),
checked: ship_method_is_selected,
name: "shipping_method_id",
"data-description": shipping_method.description,
"data-requireAddress": shipping_method.require_ship_address,
"data-action": "toggle#toggle shippingmethod#selectShippingMethod",
"data-toggle-show": shipping_method.require_ship_address
= shipping_method_form.label shipping_method.id, shipping_method.name, {for: "shipping_method_" + shipping_method.id.to_s }
%em.light
= payment_or_shipping_price(shipping_method, @order)
- display_ship_address = display_ship_address || (shipping_method.id == selected_shipping_method.to_i && shipping_method.require_ship_address)
- if shipping_method.id == selected_shipping_method.to_i
- ship_method_description = shipping_method.description
%em= payment_or_shipping_price(shipping_method, @order)
- display_ship_address = display_ship_address || (ship_method_is_selected && shipping_method.require_ship_address)
%div.checkout-input{"data-shippingmethod-target": "shippingMethodDescription", "data-shippingmethodid": shipping_method.id , style: "display: #{ship_method_is_selected ? 'block' : 'none'}" }
#distributor_address.panel
- if shipping_method.description.present?
%span #{shipping_method.description}
%br/
%br/
- if @order.order_cycle.pickup_time_for(@order.distributor)
= t :checkout_ready_for
= @order.order_cycle.pickup_time_for(@order.distributor)
= f.error_message_on :shipping_method, standalone: true
%div.checkout-input{"data-shippingmethod-target": "shippingMethodDescription", style: "display: #{ship_method_description == nil ? 'none' : 'block'}" }
#distributor_address.panel
%span{"data-shippingmethod-target": "shippingMethodDescriptionContent"} #{ship_method_description}
%br/
%br/
- if @order.order_cycle.pickup_time_for(@order.distributor)
= t :checkout_ready_for
= @order.order_cycle.pickup_time_for(@order.distributor)
%div.checkout-input{ "data-toggle-target": "content", style: "display: #{display_ship_address ? 'block' : 'none'}" }
= f.check_box :ship_address_same_as_billing, { id: "ship_address_same_as_billing", name: "ship_address_same_as_billing", "data-action": "shippingmethod#showHideShippingAddress", "data-shippingmethod-target": "shippingAddressCheckbox", checked: shipping_and_billing_match?(@order) }, 1, nil
@@ -110,24 +109,24 @@
%div{"data-shippingmethod-target": "shippingMethodAddress", style: "display: #{!display_ship_address || shipping_and_billing_match?(@order) ? 'none' : 'block'}" }
= f.fields :ship_address, model: @order.ship_address do |ship_address|
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= ship_address.label :address1, t("split_checkout.step1.address.address1.label")
= ship_address.text_field :address1, { placeholder: t("split_checkout.step1.address.address1.placeholder") }
= ship_address.text_field :address1, { placeholder: " " }
= f.error_message_on "ship_address.address1"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= ship_address.label :address2, t("split_checkout.step1.address.address2.label")
= ship_address.text_field :address2, { placeholder: t("split_checkout.step1.address.address2.placeholder") }
= ship_address.text_field :address2, { placeholder: " " }
= f.error_message_on "ship_address.address2"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= ship_address.label :city, t("split_checkout.step1.address.city.label")
= ship_address.text_field :city, { placeholder: t("split_checkout.step1.address.city.placeholder") }
= ship_address.text_field :city, { placeholder: " " }
= f.error_message_on "ship_address.city"
%div.checkout-input
%div.checkout-input.with-floating-label{ "data-controller": "floating-label"}
= ship_address.label :zipcode, t("split_checkout.step1.address.zipcode.label")
= ship_address.text_field :zipcode, { placeholder: t("split_checkout.step1.address.zipcode.placeholder") }
= ship_address.text_field :zipcode, { placeholder: " " }
= f.error_message_on "ship_address.zipcode"
%div{ "data-controller": "dependent-select", "data-dependent-select-options-value": countries_with_states }

View File

@@ -14,19 +14,18 @@
"data-action": "paymentmethod#selectPaymentMethod",
"data-paymentmethod-id": "paymentmethod#{payment_method.id}",
"data-paymentmethod-target": "input"
= f.label :payment_method_id, "#{payment_method.name} (#{payment_or_shipping_price(payment_method, @order)})", for: "payment_method_#{payment_method.id}"
= f.label :payment_method_id, "#{payment_method.name}", for: "payment_method_#{payment_method.id}"
%em=payment_or_shipping_price(payment_method, @order)
= f.error_message_on :payment_method, standalone: true
- available_payment_methods.each do |payment_method|
.paymentmethod-container{id: "paymentmethod#{payment_method.id}", style: "display: #{payment_method.id == selected_payment_method ? "block" : "none"}"}
.paymentmethod-container{"data-paymentmethod-id": "paymentmethod#{payment_method.id}", style: "display: #{payment_method.id == selected_payment_method ? "block" : "none"}"}
- if payment_method.description && !payment_method.description.empty?
.paymentmethod-description.panel
#{payment_method.description}
.paymentmethod-form
= render partial: "split_checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f }
= f.error_message_on :payment_method, standalone: true
%div.checkout-substep
= t("split_checkout.step2.explaination")

View File

@@ -5,25 +5,25 @@
%div.summary
%span.summary-label
= t("split_checkout.step1.your_details.first_name.label")
= t("split_checkout.step1.billing_address.first_name.label")
%span.summary-value
= @order.bill_address.firstname
%div.summary
%span.summary-label
= t("split_checkout.step1.your_details.last_name.label")
= t("split_checkout.step1.billing_address.last_name.label")
%span.summary-value
= @order.bill_address.lastname
%div.summary
%span.summary-label
= t("split_checkout.step1.your_details.email.label")
= t("split_checkout.step1.contact_information.email.label")
%span.summary-value
= @order.user ? @order.user.email : "Change me"
%div.summary
%span.summary-label
= t("split_checkout.step1.your_details.phone.label")
= t("split_checkout.step1.contact_information.phone.label")
%span.summary-value
= @order.bill_address.phone

View File

@@ -20,7 +20,8 @@
= t(".no_note_present")
%td.actions
= link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')
- if @order.note.present?
= link_to '', '', class: 'delete-note icon_link icon-trash no-text with-tip', data: { action: 'remove' }, title: Spree.t('delete')
.flex
= link_to '', '', class: 'edit-note icon_link icon-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('edit')
- if @order.note.present?
= link_to '', '', class: 'delete-note icon_link icon-trash no-text with-tip', data: { action: 'remove' }, title: Spree.t('delete')

View File

@@ -26,7 +26,7 @@
= Spree.t(:price)
%th
= Spree.t(:quantity)
%th
%th.force-rounded-right
= Spree.t(:total)
%th.orders-actions.actions{ "data-hook" => "admin_order_form_line_items_header_actions" }
@@ -57,8 +57,8 @@
%span
= shipment.fee_adjustment.display_amount
- if shipment.fee_adjustment.present? && shipment.can_modify?
%td.actions
%td.actions
- if shipment.fee_adjustment.present? && shipment.can_modify?
- if can? :update, shipment
= link_to '', '', :class => 'edit-method icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
@@ -70,8 +70,9 @@
%td.actions
- if can?(:update, shipment) && !shipment.canceled?
= link_to '', '', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save')
= link_to '', '', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')
.flex
= link_to '', '', :class => 'save-tracking icon_link icon-ok no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'save' }, :title => I18n.t('actions.save')
= link_to '', '', :class => 'cancel-tracking icon_link icon-cancel no-text with-tip', :data => { :action => 'cancel' }, :title => I18n.t('actions.cancel')
%tr.show-tracking.total
%td{ :colspan => "5" }
@@ -84,6 +85,7 @@
%td.actions
- if can?(:update, shipment) && shipment.can_modify?
= link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
- if shipment.tracking.present?
= link_to '', '', :class => 'delete-tracking icon_link icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'remove' }, :title => Spree.t('delete')
.flex
= link_to '', '', :class => 'edit-tracking icon_link icon-edit no-text with-tip', :data => { :action => 'edit' }, :title => Spree.t('edit')
- if shipment.tracking.present?
= link_to '', '', :class => 'delete-tracking icon_link icon-trash no-text with-tip', :data => { 'shipment-number' => shipment.number, :action => 'remove' }, :title => Spree.t('delete')

View File

@@ -19,10 +19,11 @@
%td.cart-item-delete.actions{ "data-hook" => "cart_item_delete" }
- if shipment.can_modify? && can?(:update, shipment)
= link_to '', '#', :class => 'save-item icon_link icon-ok no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'save'}, :title => t('actions.save'), :style => 'display: none'
= link_to '', '#', :class => 'cancel-item icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => t('actions.cancel'), :style => 'display: none'
= link_to '', '#', :class => 'edit-item icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => t('actions.edit')
= link_to '', '#', :class => 'delete-item icon-trash no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'remove'}, :title => t('actions.delete')
.flex
= link_to '', '#', :class => 'save-item icon_link icon-ok no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'save'}, :title => t('actions.save'), :style => 'display: none'
= link_to '', '#', :class => 'cancel-item icon_link icon-cancel no-text with-tip', :data => {:action => 'cancel'}, :title => t('actions.cancel'), :style => 'display: none'
= link_to '', '#', :class => 'edit-item icon_link icon-edit no-text with-tip', :data => {:action => 'edit'}, :title => t('actions.edit')
= link_to '', '#', :class => 'delete-item icon-trash no-text with-tip', :data => {'shipment-number' => shipment.number, 'variant-id' => item.variant.id, :action => 'remove'}, :title => t('actions.delete')
= render 'spree/admin/shared/custom-alert'
= render 'spree/admin/shared/custom-confirm'

View File

@@ -12,39 +12,42 @@
= admin_inject_column_preferences module: 'admin.lineItems'
= admin_inject_available_units
%div{ ng: { controller: 'LineItemsCtrl' } }
%save-bar{ dirty: "bulk_order_form.$dirty", persist: "false" }
%input.red{ type: "button", value: "Save Changes", ng: { click: "submit()", disabled: "!bulk_order_form.$dirty" } }
.filters{ :class => "sixteen columns alpha" }
.date_filter{class: "four columns"}
%label
= t("date_range")
%br
%div{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-default-date": "{{ [startDate, endDate] }}" } }
%input.datepicker.fullwidth{ class: "datepicker", data: { "flatpickr-target": "instance" } }
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;" }
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;" }
.one.column &nbsp;
.filter_select{ :class => "three columns" }
%label{ :for => 'supplier_filter' }
= t("admin.producer")
%br
%input#supplier_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'suppliers', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'supplierFilter', change: 'refreshData()' } }
.filter_select{ :class => "three columns" }
%label{ :for => 'distributor_filter' }
= t("admin.shop")
%br
%input#distributor_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'distributors', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'distributorFilter', change: 'refreshData()' } }
.filter_select{ :class => "three columns" }
%label{ :for => 'order_cycle_filter' }
= t("admin.order_cycle")
%br
%input#order_cycle_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'orderCycles', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'orderCycleFilter', change: 'refreshData()' } }
.filter_clear{ :class => "two columns omega" }
%label{ :for => 'clear_all_filters' }
%br
%input.red.fullwidth{ :type => 'button', :id => 'clear_all_filters', :value => t('admin.clear_all'), 'ng-click' => "resetSelectFilters()" }
%div{ ng: { controller: 'LineItemsCtrl' }, id: "table-filter" }
%fieldset
%save-bar{ dirty: "bulk_order_form.$dirty", persist: "false" }
%input.red{ type: "button", value: "Save Changes", ng: { click: "submit()", disabled: "!bulk_order_form.$dirty" } }
%legend{ align: 'center'}= t(:search)
%div{ :class => "sixteen columns alpha" }
.filter_select{ :class => "four columns" }
%label{ :for => 'supplier_filter' }
= t("admin.producer")
%br
%input#supplier_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'suppliers', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'supplierFilter' } }
.filter_select{ :class => "four columns" }
%label{ :for => 'distributor_filter' }
= t("admin.shop")
%br
%input#distributor_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'distributors', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'distributorFilter' } }
.filter_select{ :class => "four columns" }
%label{ :for => 'order_cycle_filter' }
= t("admin.order_cycle")
%br
%input#order_cycle_filter.ofn-select2.fullwidth{ type: 'number', 'min-search' => 5, data: 'orderCycles', placeholder: "#{t(:all)}", blank: "{ id: '', name: '#{t(:all)}' }", on: { selecting: "confirmRefresh" }, ng: { model: 'orderCycleFilter', change: "setOrderCycleDateRange()" } }
.date_filter{class: "four columns"}
%label
= t("date_range")
%br
%div{ data: { controller: "flatpickr", "flatpickr-mode-value": "range", "flatpickr-default-date": "{{ [startDate, endDate] }}" } }
%input.datepicker.fullwidth{ class: "datepicker", data: { "flatpickr-target": "instance" } }
%input{ type: "text", id: 'start_date_filter', 'ng-model': "startDate", data: { "flatpickr-target": "start" }, style: "display: none;" }
%input{ type: "text", id: 'end_date_filter', 'ng-model': "endDate", data: { "flatpickr-target": "end" }, style: "display: none;" }
.clearfix
.actions.filter-actions
%a.button.icon-search{'ng-click' => 'refreshData()'}
= t(:filter_results)
%a.button{'ng-click' => 'resetSelectFilters()', "id": "clear_filters_button", "class": ("secondary" if feature?(:admin_style_v2, spree_current_user)) }
= t(:clear_filters)
%hr.divider.sixteen.columns.alpha.omega{ ng: { show: 'unitsVariantSelected()' } }

View File

@@ -30,13 +30,15 @@
="#{t('admin.actions')}".html_safe
%span{ 'ng-class' => "expanded && 'icon-caret-up' || !expanded && 'icon-caret-down'" }
%div.menu{ 'ng-show' => "expanded" }
%div.menu_item
%span.name{ "data-controller": "modal-link", "data-action": "click->modal-link#open", "data-modal-link-target-value": "resend_confirmation" }
= t('.resend_confirmation')
%div.menu_item
%span.name.invoices-modal{'ng-controller' => 'bulkInvoiceCtrl', 'ng-click' => 'createBulkInvoice()' }
= t('.print_invoices')
%div.menu_item
%span.name{'ng-controller' => 'bulkCancelCtrl', 'ng-click' => 'cancelSelectedOrders()' }
= t('.cancel_orders')
= render partial: 'per_page_controls', locals: { position: "right" }
@@ -63,7 +65,7 @@
%tbody
%tr{ng: {repeat: 'order in orders track by order.id', class: {even: "'even'", odd: "'odd'"}}, 'ng-class' => "{'state-{{order.state}}': true, 'row-loading': rowStatus[order.id] == 'loading'}"}
%td.align-center
%input{type: 'checkbox', 'ng-model' => 'checkboxes[order.id]', 'ng-change' => 'toggleSelection(order.id)'}
%input{type: 'checkbox', 'ng-model' => 'checkboxes[order.id]', 'ng-change' => 'toggleSelection(order.id)', value: '{{order.id}}', name: 'order_ids[]'}
%td.align-center
{{order.distributor_name}}
%td.align-center
@@ -118,3 +120,7 @@
= t('.no_orders_found')
= render 'spree/admin/shared/custom-confirm'
= render ConfirmModalComponent.new(id: "resend_confirmation", confirm_actions: "click->resend-confirmation-email#confirm", controllers: "resend-confirmation-email") do
.margin-bottom-30
= t('.resend_confirmation_confirm_html')

View File

@@ -15,5 +15,6 @@
%td.align-center
%span{class: "state #{payment.state}"}= t(payment.state, scope: "spree.payment_states", default: payment.state.capitalize)
%td.actions
- payment.actions.each do |action|
= link_to_with_icon "icon-#{action}", Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: {action: action, disable_with: ""}
.flex
- payment.actions.each do |action|
= link_to_with_icon "icon-#{action}", Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: {action: action, disable_with: ""}

View File

@@ -45,12 +45,12 @@
= f.field_container :shipping_categories do
= f.label :shipping_category_id, t(:shipping_categories)
= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => 'None' }, { :class => 'select2' })
= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => t(:none) }, { :class => 'select2' })
= f.error_message_on :shipping_category
= f.field_container :tax_category do
= f.label :tax_category_id, t(:tax_category)
= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => 'None' }, { :class => 'select2' })
= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => t(:none) }, { :class => 'select2' })
= f.error_message_on :tax_category
.clear

View File

@@ -1,5 +1,5 @@
= f.field_container :primary_taxon do
= f.label :primary_taxon_id, t('.product_category')
= f.label :primary_taxon, t('.product_category')
%span.required *
%br
= f.collection_select(:primary_taxon_id, Spree::Taxon.order(:name), :id, :name, {:include_blank => true}, {:class => "select2 fullwidth"})

View File

@@ -9,8 +9,9 @@
.sixteen.columns.alpha
.eight.columns.alpha
= f.field_container :supplier do
= f.label :supplier_id, t(".supplier")
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), {}, { "data-controller": "tom-select", class: "primary" }
= f.label :supplier, t(".supplier")
%span.required *
= f.select :supplier_id, options_from_collection_for_select(@producers, :id, :name, @product.supplier_id), { include_blank: t("spree.admin.products.new.supplier_select_placeholder") }, { "data-controller": "tom-select", class: "primary" }
= f.error_message_on :supplier
.eight.columns.omega
= f.field_container :name do
@@ -22,7 +23,7 @@
.sixteen.columns.alpha
.eight.columns.alpha
= f.field_container :variant_unit do
= f.label :variant_unit_with_scale, t(".units")
= f.label :variant_unit, t(".units")
%span.required *
%select{id: 'product_variant_unit_with_scale', 'ng-model' => 'product.variant_unit_with_scale', 'ng-options' => 'unit[1] as unit[0] for unit in variant_unit_options', "data-controller": "tom-select","data-tom-select-options-value": '{"allowEmptyOption":false}', class: "primary"}
%option{'value' => '', 'ng-hide' => "hasUnit(product)"}
@@ -31,9 +32,9 @@
= f.error_message_on :variant_unit
.two.columns
= f.field_container :unit_value do
= f.label :unit_value_with_description, t(".value"), 'ng-disabled' => "!hasUnit(product)"
= f.label :unit_value, t(".value"), 'ng-disabled' => "!hasUnit(product)"
%span.required *
%input.fullwidth{ id: 'product_unit_value_with_description', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" }
%input.fullwidth{ id: 'product_unit_value', 'ng-model' => 'product.master.unit_value_with_description', :type => 'text', placeholder: "eg. 2", 'ng-disabled' => "!hasUnit(product)" }
%input{ type: 'hidden', 'ng-value': 'product.master.unit_value', "ng-init": "product.master.unit_value='#{@product.master.unit_value}'", name: 'product[unit_value]' }
%input{ type: 'hidden', 'ng-value': 'product.master.unit_description', "ng-init": "product.master.unit_description='#{@product.master.unit_description}'", name: 'product[unit_description]' }
= f.error_message_on :unit_value

View File

@@ -14,7 +14,10 @@
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600,700&subset=latin,cyrillic,greek,vietnamese", :rel => "stylesheet", :type => "text/css"}
= stylesheet_pack_tag 'admin-styles', media: "screen, print"
- if feature?(:admin_style_v2, spree_current_user)
= stylesheet_pack_tag 'admin-styles-v2', media: "screen, print"
- else
= stylesheet_pack_tag 'admin-styles', media: "screen, print"
= render "layouts/bugsnag_js"
= javascript_include_tag 'admin/all'

View File

@@ -11,6 +11,8 @@
- if flash[:success]
.flash.success= flash[:success]
= render partial: "shared/flashes"
= render partial: "spree/layouts/admin/progress_spinner"
%header#header{"data-hook" => ""}

View File

@@ -25,7 +25,7 @@
.sub-header.show-for-medium-down
= render partial: "shopping_shared/order_cycles"
%fieldset.footer-pad
#cart-container
- if @order.line_items.empty?
%div.row{"data-hook" => "empty_cart"}
%p= t(:your_cart_is_empty)

View File

@@ -0,0 +1,30 @@
import { Controller } from "stimulus";
export default class extends Controller {
connect() {
const input = this.element.querySelector("input");
input.addEventListener("focus", this.focus.bind(this));
input.addEventListener("blur", this.blur.bind(this));
if (input.value.length > 0) {
this.focus();
}
const label = this.element.querySelector("label");
// Add transition class to the label and display the label
// after a short delay to avoid flickering
setTimeout(() => {
label.classList.add("with-transition");
label.style.display = "block";
}, 100);
}
focus() {
this.element.classList.add("active");
}
blur(e) {
if (e.target.value.length === 0) {
this.element.classList.remove("active");
}
}
}

View File

@@ -1,33 +1,10 @@
import { Controller } from "stimulus";
import { useOpenAndCloseAsAModal } from "./mixins/useOpenAndCloseAsAModal";
export default class extends Controller {
static targets = ["background", "modal"];
open() {
this.backgroundTarget.style.display = "block";
this.modalTarget.style.display = "block";
setTimeout(() => {
this.modalTarget.classList.add("in");
this.backgroundTarget.classList.add("in");
document.querySelector("body").classList.add("modal-open");
});
}
close() {
this.modalTarget.classList.remove("in");
this.backgroundTarget.classList.remove("in");
document.querySelector("body").classList.remove("modal-open");
setTimeout(() => {
this.backgroundTarget.style.display = "none";
this.modalTarget.style.display = "none";
}, 200);
}
closeIfEscapeKey(e) {
if (e.code == "Escape") {
this.close();
}
connect() {
useOpenAndCloseAsAModal(this);
}
}

View File

@@ -1,15 +1,7 @@
import { Controller } from "stimulus";
import ModalLinkController from "./modal_link_controller";
export default class extends Controller {
static values = { target: String };
open() {
let helpModal = document.getElementById(this.targetValue);
let helpModalController =
this.application.getControllerForElementAndIdentifier(
helpModal,
"help-modal"
);
helpModalController.open();
export default class extends ModalLinkController {
getIdentifier() {
return "help-modal";
}
}

View File

@@ -0,0 +1,31 @@
export const useOpenAndCloseAsAModal = (controller) => {
Object.assign(controller, {
open: function () {
this.backgroundTarget.style.display = "block";
this.modalTarget.style.display = "block";
setTimeout(() => {
this.modalTarget.classList.add("in");
this.backgroundTarget.classList.add("in");
document.querySelector("body").classList.add("modal-open");
});
}.bind(controller),
close: function () {
this.modalTarget.classList.remove("in");
this.backgroundTarget.classList.remove("in");
document.querySelector("body").classList.remove("modal-open");
setTimeout(() => {
this.backgroundTarget.style.display = "none";
this.modalTarget.style.display = "none";
}, 200);
}.bind(controller),
closeIfEscapeKey: function (e) {
if (e.code == "Escape") {
this.close();
}
}.bind(controller),
});
};

View File

@@ -0,0 +1,15 @@
import { Controller } from "stimulus";
import { useOpenAndCloseAsAModal } from "./mixins/useOpenAndCloseAsAModal";
export default class extends Controller {
static targets = ["background", "modal"];
connect() {
useOpenAndCloseAsAModal(this);
window.addEventListener("modal:close", this.close.bind(this));
}
disconnect() {
window.removeEventListener("modal:close", this.close);
}
}

View File

@@ -0,0 +1,18 @@
import { Controller } from "stimulus";
export default class extends Controller {
static values = { target: String };
open() {
let modal = document.getElementById(this.targetValue);
let modalController = this.application.getControllerForElementAndIdentifier(
modal,
this.getIdentifier()
);
modalController.open();
}
getIdentifier() {
return "modal";
}
}

View File

@@ -16,7 +16,9 @@ export default class extends Controller {
const stripeCardSelector =
this.application.getControllerForElementAndIdentifier(
document
.getElementById(event.target.dataset.paymentmethodId)
.querySelector(
`[data-paymentmethod-id="${event.target.dataset.paymentmethodId}"]`
)
.querySelector('[data-controller="stripe-cards"]'),
"stripe-cards"
);
@@ -27,7 +29,8 @@ export default class extends Controller {
Array.from(
document.getElementsByClassName("paymentmethod-container")
).forEach((container) => {
const enabled = container.id === paymentMethodContainerId;
const enabled =
container.dataset.paymentmethodId === paymentMethodContainerId;
if (enabled) {
container.style.display = "block";

View File

@@ -0,0 +1,18 @@
import ApplicationController from "./application_controller";
export default class extends ApplicationController {
connect() {
super.connect();
}
confirm() {
const order_ids = [];
document
.querySelectorAll("#listing_orders input[name='order_ids[]']:checked")
.forEach((checkbox) => {
order_ids.push(checkbox.value);
});
this.stimulate("ResendConfirmationEmailReflex#confirm", order_ids);
}
}

View File

@@ -2,27 +2,24 @@ import { Controller } from "stimulus";
export default class extends Controller {
static targets = [
"shippingMethodDescription",
"shippingMethodDescriptionContent",
"shippingMethodAddress",
"shippingAddressCheckbox",
];
connect() {
// Hide shippingMethodDescription by default
}
connect() {}
selectShippingMethod(event) {
const input = event.target;
if (input.tagName === "INPUT") {
// Shipping method description
if (input.dataset.description.length > 0) {
this.shippingMethodDescriptionTarget.style.display = "block";
this.shippingMethodDescriptionContentTarget.innerText =
input.dataset.description;
} else {
this.shippingMethodDescriptionTarget.style.display = "none";
this.shippingMethodDescriptionContentTarget.innerText = null;
}
// Require a ship address
// -- Shipping method description
// Hide all shipping method descriptions
this.shippingMethodDescriptionTargets.forEach((t) => {
t.style.display = "none";
});
// but not the one we want ie. the one that matches the shipping method id
this.shippingMethodDescriptionTargets.find(
(e) => e.dataset["shippingmethodid"] == input.value
).style.display = "block";
// -- Require a ship address
if (
input.dataset.requireaddress === "true" &&
!this.shippingAddressCheckboxTarget.checked

View File

@@ -127,5 +127,4 @@
@import "app/components/pagination_component/pagination_component";
@import "app/components/table_header_component/table_header_component";
@import "app/components/search_input_component/search_input_component";
@import "v2/main.scss";
@import 'app/components/confirm_modal_component/confirm_modal_component';

View File

@@ -38,6 +38,7 @@
font-size: 120%;
color: $color-1;
font-weight: 600;
margin-top: 0;
&.notice { background-color: rgba($color-notice, 0.8) }
&.success { background-color: rgba($color-success, 0.8) }

View File

@@ -0,0 +1,16 @@
// Basic color palette for admin
$color-1: #FFFFFF !default; // White
$color-2: #9FC820 !default; // Green
$color-3: #5498DA !default; // Light Blue
$color-4: #6788A2 !default; // Dark Blue
$color-5: #C60F13 !default; // Red
$color-6: #FF9300 !default; // Yellow
@mixin basicColorPalette($color1, $color2, $color3, $color4, $color5, $color6) {
$color-1: $color1 !global;
$color-2: $color2 !global;
$color-3: $color3 !global;
$color-4: $color4 !global;
$color-5: $color5 !global;
$color-6: $color6 !global;
}

View File

@@ -9,14 +9,6 @@ $base-font-family: "Open Sans", "Helvetica Neue", "Helvetica", Helvetica, Arial,
// Colors
//--------------------------------------------------------------
// Basic color palette for admin
$color-1: #FFFFFF !default; // White
$color-2: #9FC820 !default; // Green
$color-3: #5498DA !default; // Light Blue
$color-4: #6788A2 !default; // Dark Blue
$color-5: #C60F13 !default; // Red
$color-6: #FF9300 !default; // Yellow
// Body base colors
$color-body-bg: $color-1 !default;
$color-body-text: $color-4 !default;

View File

@@ -11,27 +11,41 @@ select[type="submit"],
input[type="button"],
select[type="button"],
.select2-container-multi [type="button"].select2-choices,
button,
button:not(.no-text),
.button,
.actions a:not([class*="icon-"]),
.actions a:not(.no-text),
fieldset .filter-actions button, // Be more specific to be sure to override the form button style (with a white border)
fieldset .filter-actions .button:hover,
.admin__section-header .ofn-drop-down // Same behavior as the button
{
&.disabled,
&[disabled] {
@include backgroundAndBorder($v2-light-grey);
@include backgroundAndBorder($v2-blue-light);
&:hover {
@include backgroundAndBorder($v2-blue);
box-shadow: $v2-box-shadow;
}
&:not(.disabled):not([disabled]):not(.secondary) {
// Change the color of the button only if it's not disabled
@include backgroundAndBorder($v2-blue-light);
&.disabled,
&[disabled],
&.disabled.secondary,
&[disabled].secondary {
@include backgroundAndBorder($v2-dark-light-grey);
box-shadow: none;
cursor: default;
color: white;
&:hover {
@include backgroundAndBorder($v2-blue);
box-shadow: $v2-box-shadow;
@include backgroundAndBorder($v2-dark-light-grey);
box-shadow: none;
cursor: default;
color: white;
}
}
&.secondary {
&.secondary,
&.cancel,
&.icon-remove,
&#clear_all_filters {
background-color: $white;
border: 2px solid $v2-blue-light;
color: $v2-blue-light;
@@ -60,7 +74,6 @@ button,
}
}
#table-filter fieldset:has(.actions) {
// do not apply border to filter actions as it's drawn by the #table-filter .actions before and after pseudo elements
#table-filter fieldset {
border-bottom: 0;
}

View File

@@ -0,0 +1,9 @@
/* Override app/webpacker/css/admin/dropdown.scss */
.ofn-drop-down,
.ofn-drop-down-with-prepend .ofn-drop-down-prepend {
background-color: white;
&.disabled {
opacity: 0.9;
}
}

View File

@@ -0,0 +1,11 @@
/* Override file app/webpacker/css/admin/components/sidebar.scss */
#sidebar {
border-color: #e7e7e7;
.sidebar-title {
color: $v2-blue;
& > span {
background-color: $v2-body-bg;
}
}
}

View File

@@ -1,5 +1,17 @@
/* Overide tables.scss app/webpacker/css/admin/components/tables.scss */
table {
background-color: white;
}
table thead tr:first-child th:first-child {
border-top-left-radius: 3px;
}
table thead tr:first-child th:last-child,
table thead th.force-rounded-right {
border-top-right-radius: 3px;
}
table thead th {
background-color: $v2-medium-light-grey;
border: none;
@@ -13,28 +25,31 @@ table thead th {
}
}
table tr:not([class*="state"]) {
th:first-child,
td:first-child {
border-left: none;
}
}
table tbody tr {
&:first-child th,
&:first-child td {
border-top: none; // Don't show the top border of the first row
}
td:not(:first-child) {
border-left: none; // Only show left border on the first cells, as it indicates the order state by its color
}
td {
border-bottom: none; // By default, do not show the border of the cells
border-right: none;
border-top: none;
border: none;
border-bottom: 2px solid $v2-medium-light-grey;
&.actions {
border-bottom: 2px solid $v2-medium-light-grey !important; // needs to be important because of already defined with important
}
> .flex {
display: flex;
column-gap: 10px;
}
&.actions > .flex {
justify-content: flex-end;
}
}
&.even,
&.odd {
@@ -44,30 +59,91 @@ table tbody tr {
}
}
table th.actions,
table td.actions {
table thead tr th.actions,
table tbody tr td.actions {
// Special for icons in the actions column
[class*="icon-"].no-text {
border: 2px solid $v2-blue-light;
background-color: $v2-blue-lightest;
[class*="icon-"],
button[class*="icon-"]:not(.disabled):not([disabled]):not(.secondary):not(.cancel) {
color: $v2-blue;
display: flex;
justify-content: center;
align-items: center;
&:hover {
border-color: $v2-blue;
background-color: $v2-blue-light;
box-shadow: $v2-box-shadow;
&:before {
width: auto;
padding: 0;
}
&:before {
color: white;
&.no-text {
border: 2px solid $v2-blue-light;
display: flex; // Be sure that display: flex; is applied
padding-top: 0;
&:hover {
border-color: $v2-blue;
box-shadow: $v2-box-shadow;
&:before {
color: white;
}
}
}
}
.icon-edit:hover,
.icon-capture:hover,
.icon-ok:hover,
.icon-plus:hover,
.icon-road:hover {
background-color: $v2-blue;
color: $color-1;
}
}
table {
thead th.actions,
thead td.actions {
background-color: $v2-medium-light-grey !important;
}
tbody tr td.actions {
background-color: white !important;
}
td {
&.actions {
padding-left: 20px;
border-bottom: 2px solid $v2-medium-light-grey !important; // needs to be important because of already defined with important
}
}
}
table#listing_orders td {
// When the table is the listing of orders, we need to increase the height of the cells
padding: 20px 0;
table tbody tr:hover > td {
background-color: #e9f3fc !important; // needs to be important because of already defined with important
}
&.actions {
padding-left: 20px;
table#listing_orders {
td {
// When the table is the listing of orders, we need to increase the height of the cells
padding: 20px 0;
&:not(:first-child) {
border-left: none; // Only show left border on the first cells, as it indicates the order state by its color
}
}
}
table#listing_order_cycles tr.open td {
background-color: #d9fccb !important; // needs to be important because of already defined with important
}
table#listing_order_cycles tr.closed td {
background-color: #eee !important; // needs to be important because of already defined with important
}
table#listing_order_cycles tr.upcoming td {
background-color: #fbfccb !important; // needs to be important because of already defined with important
}
tbody.panel-ctrl.expanded > tr:not(.panel-row) > td {
border-bottom: 1px solid #6788a2 !important; // needs to be important because of already defined with important
}
tbody.panel-ctrl.expanded > tr:not(.panel-row) > td.selected {
border-bottom: none !important; // it's a bit annoying to always put that important, but it's the only way to override the default style
}

View File

@@ -0,0 +1,10 @@
tags-input .tags li.tag-item {
background-color: $v2-blue-light;
}
tags-input .tags {
box-shadow: none;
&.focused {
box-shadow: none;
}
}

View File

@@ -0,0 +1,47 @@
/* Override app/webpacker/css/admin/components/tom_select.scss */
.ts-wrapper.primary.focus .ts-control,
.ts-wrapper.primary .ts-control {
background-color: white;
border: 1px solid $v2-light-grey;
color: $v2-medium-grey;
&:after {
border-color: $v2-medium-grey transparent transparent transparent;
}
}
.ts-wrapper.dropdown-active.primary .ts-control {
background-color: transparent;
border-color: $v2-light-grey;
color: $v2-medium-grey;
&:after {
border-color: transparent transparent $v2-medium-grey transparent;
}
}
.ts-wrapper.dropdown-active.focus .ts-control {
border-color: $v2-medium-grey;
}
.dropdown-input-wrap {
.dropdown-input {
border: 1px solid $v2-light-grey;
}
}
.ts-dropdown .create:hover,
.ts-dropdown #admin-menu li.selected a.create,
#admin-menu li.selected .ts-dropdown a.create,
.ts-dropdown .option:hover,
.ts-dropdown #admin-menu li.selected a.option,
#admin-menu li.selected .ts-dropdown a.option,
.ts-dropdown .active {
background-color: $v2-blue;
color: $white;
}
.ts-dropdown.single {
border-color: $v2-medium-grey;
}

View File

@@ -0,0 +1,19 @@
ul.wizard-progress li {
a {
color: white;
}
background-color: $v2-dark-light-grey;
&:before,
&:after {
background-color: $v2-dark-light-grey;
}
&.current {
background-color: $v2-blue-light;
&:before,
&:after {
background-color: $v2-blue-light;
}
}
}

View File

@@ -1,13 +1,22 @@
@import "variables.scss";
@import "shared/typography.scss";
body.admin.admin-v2 {
@import "navigation.scss";
@import "plugins/select2.scss";
@import "plugins/powertip.scss";
@import "plugins/flatpickr-customization.scss";
@import "shared/forms.scss";
@import "components/buttons.scss";
@import "components/tables.scss";
@import "components/progress.scss";
@import "navigation.scss";
@import "plugins/select2.scss";
@import "plugins/powertip.scss";
@import "plugins/flatpickr-customization.scss";
@import "shared/forms.scss";
@import "components/buttons.scss";
@import "components/tables.scss";
@import "components/progress.scss";
@import "components/sidebar.scss";
@import "components/tom_select.scss";
@import "components/dropdown.scss";
@import "components/wizard_progress.scss";
@import "components/tags-input.scss";
@import "others.scss";
body {
background-color: $v2-body-bg;
}

View File

@@ -60,3 +60,25 @@
color: $v2-medium-dark-grey;
}
}
nav.menu ul li,
nav.menu ul #admin-menu li,
#admin-menu nav.menu ul li {
&.active {
a {
color: $v2-blue-dark;
border-bottom-color: $v2-blue-dark;
}
}
&.selected a,
a {
&:hover {
color: $v2-blue-dark;
border-bottom-color: $v2-blue-dark;
border-top-color: transparent;
border-right-color: transparent;
border-left-color: transparent;
}
}
}

View File

@@ -0,0 +1,6 @@
/* The aim of this file is to not create a file for each small modification on components */
#advanced_settings {
background-color: $v2-blue-lightest;
border-color: $v2-blue-dark;
}

View File

@@ -28,4 +28,31 @@
&.sw:before {
border-right-color: $v2-blue;
}
&.edit,
&.green,
&.capture,
&.save,
&.add {
background-color: $v2-blue;
&.n:before,
&.ne:before,
&.nw:before {
border-top-color: $v2-blue;
}
&.e:before,
&.nw:before,
&.sw:before {
border-right-color: $v2-blue;
}
&.s:before,
&.se:before,
&.sw:before {
border-bottom-color: $v2-blue;
}
&.w:before {
border-left-color: $v2-blue;
}
}
}

View File

@@ -2,12 +2,12 @@
.select2-container {
.select2-choice {
background-color: transparent;
background-color: white;
border: 1px solid $v2-light-grey !important;
color: $v2-medium-grey !important;
padding-left: 5px;
font-size: 13px;
padding-top: 3px;
height: 35px;
.select2-arrow {
color: $v2-medium-grey;
@@ -17,7 +17,7 @@
&.select2-container-active,
&:hover {
.select2-choice {
background-color: transparent !important;
background-color: white !important;
border-color: $v2-medium-grey !important;
}
}
@@ -37,16 +37,34 @@
}
.select2-container-multi {
&.select2-dropdown-open,
&.select2-container-active {
.select2-choices {
border-color: $v2-medium-grey !important;
}
}
.select2-choices {
border-color: $v2-medium-grey !important;
min-height: 35px;
.select2-search-choice {
background-color: $v2-blue-light;
}
}
&.select2-drop-above {
.select2-choices {
border-top-left-radius: 0;
border-top-right-radius: 0;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
}
}
}
.select2-drop {
border-color: $v2-medium-grey;
&.select2-drop-above.select2-drop-active {
border-color: $v2-medium-grey;
}
}
.select2-search {

View File

@@ -18,18 +18,20 @@ fieldset {
// Change the color of all inputs
color: $v2-medium-grey;
border-color: $v2-light-grey !important;
font-size: 13px;
&:focus {
border-color: $v2-medium-grey;
border-color: $v2-medium-grey !important;
}
}
fieldset label {
color: $v2-medium-grey;
color: $v2-medium-dark-grey;
}
fieldset legend {
color: $v2-blue;
background-color: $v2-body-bg;
}
input[type="checkbox"],

View File

@@ -9,10 +9,10 @@
}
}
body.admin.admin-v2 {
color: $v2-body-grey;
a:not(.button) {
@include v2-link-color();
}
a:not(.button) {
@include v2-link-color();
}
h4 {
color: $v2-medium-dark-grey;
}

View File

@@ -7,8 +7,9 @@ $v2-orange-lightest: #fcdbd4;
$v2-dark-grey: #333333;
$v2-medium-dark-grey: #444444;
$v2-body-grey: #666666;
$v2-body-grey: $color-4;
$v2-medium-grey: #717171;
$v2-dark-light-grey: #d9d9d9;
$v2-medium-light-grey: #e6e6e6;
$v2-light-grey: #e7e7e7;
@@ -21,3 +22,5 @@ $v2-green: #019854;
$v2-green-light: #01cb70;
$v2-box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); // Default box shadow for actions stuff
$v2-body-bg: #f7f9fa;

View File

@@ -161,13 +161,6 @@
}
}
// singleLineSelectors directive provides a drop-down that can overlap
// content. Ensure that the dropdown appears above the content.
.filter-row {
position: relative;
z-index: 90;
}
.sticky-shop-filters-container {
position: sticky;
top: $topbar-height;

View File

@@ -77,3 +77,4 @@ ofn-modal {
@import '../admin/shared/scroll_bar';
@import 'app/components/help_modal_component/help_modal_component';
@import 'app/components/confirm_modal_component/confirm_modal_component';

View File

@@ -1,3 +1,8 @@
#cart-container {
padding: 25px;
padding-bottom: 100px;
}
#update-cart {
#errorExplanation {
display: none;
@@ -6,6 +11,8 @@
#cart-detail {
width: 100%;
display: block;
overflow-x: auto;
.cart-item-delete,
.bought-item-delete {

View File

@@ -34,13 +34,16 @@
span, span > a {
color: $white;
text-decoration: underline;
}
}
&.success {
border-bottom: 5px solid $clr-turquoise-bright;
span {
text-decoration: underline;
}
span.checkout-tab-label {
&:after {
content: '';
@@ -98,7 +101,6 @@
font-size: 1.06rem;
@include headingFont;
font-weight: $font-weight-bold;
text-decoration: underline;
color: $darker-grey;
margin-bottom: 1.5rem;
}
@@ -158,6 +160,18 @@
label {
margin-top: 0.3rem;
& + em {
margin-left: -0.5rem;
font-size: 14px; // same as label
font-weight: bold;
// Add opening and closing parentheses
&:before {
content: "(";
}
&:after {
content: ")";
}
}
}
}
}
@@ -240,8 +254,10 @@
}
&.cancel {
background-color: $grey-100;
color: $black;
background-color: $white;
border: 1px solid $orange-500;
color: $orange-500;
}
}
@@ -306,3 +322,62 @@
}
}
}
#line-items {
display: block;
overflow-x: auto;
}
.two-columns-inputs {
display: flex;
gap: 1rem;
justify-content: space-between;
> .checkout-input {
flex: 1;
}
&:last-child > .checkout-input {
margin-bottom: 0;
}
@media screen and (max-width: 700px) {
flex-direction: column;
gap: 0;
&:last-child > .checkout-input {
margin-bottom: 1.5rem;
}
}
}
// Shows label as a placeholder, inside the input and when the input is focused shows the label above the input
.checkout-input.with-floating-label {
position: relative;
label {
display: none; // Display none by default, and shown by floating_label_controller
position: absolute;
top: 0;
left: 0;
font-size: 0.875rem;
padding: 8px;
padding-left: 9px;
color: $min-accessible-grey;
pointer-events: none;
transform: translateY(0);
transform-origin: top left;
&.with-transition {
transition: all 0.2s ease-in-out;
}
}
&.active {
label {
transform: translateY(-9px) translateX(10px) scale(0.9);
background-color: white;
padding-left: 3px;
padding-right: 3px;
padding-top: 0;
padding-bottom: 0;
}
}
}

View File

@@ -0,0 +1,6 @@
@import '../css/admin/globals/palette';
@include basicColorPalette(#FFFFFF, #69A95D, #14B6CC, #484848, #C1122B, #F27052);
@import "../css/admin/all.scss";
@import "../css/admin/v2/main.scss";

View File

@@ -1 +1,3 @@
@import '../css/admin/globals/palette';
@import "../css/admin/all.scss";

View File

@@ -32,8 +32,6 @@ if defined?(Bundler)
# Bundler.require(:default, :assets, Rails.env)
end
require "view_component/storybook" if Rails.env.development?
module Openfoodnetwork
class Application < Rails::Application
config.middleware.insert_before(
@@ -156,6 +154,7 @@ module Openfoodnetwork
initializer "ofn.reports" do |app|
module ::Reporting; end
Rails.application.reloader.to_prepare do
next if defined?(::Reporting) && defined?(::Reporting::Errors)
loader = Zeitwerk::Loader.new
loader.push_dir("#{Rails.root}/lib/reporting", namespace: ::Reporting)
loader.enable_reloading

View File

@@ -78,6 +78,4 @@ Openfoodnetwork::Application.configure do
config.action_mailer.asset_host = "http://localhost:3000"
config.log_level = ENV.fetch("DEV_LOG_LEVEL", :debug)
config.view_component_storybook.stories_path = Rails.root.join("spec/components/stories")
end

View File

@@ -48,6 +48,9 @@ Openfoodnetwork::Application.configure do
reconnect_attempts: 1
}
config.action_cable.url = "#{ENV['OFN_URL']}/cable"
config.action_cable.allowed_request_origins = [/http:\/\/#{ENV['OFN_URL']}\/*/, /https:\/\/#{ENV['OFN_URL']}\/*/]
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"

View File

@@ -48,6 +48,9 @@ Openfoodnetwork::Application.configure do
reconnect_attempts: 1
}
config.action_cable.url = "#{ENV['OFN_URL']}/cable"
config.action_cable.allowed_request_origins = [/http:\/\/#{ENV['OFN_URL']}\/*/, /https:\/\/#{ENV['OFN_URL']}\/*/]
# Enable serving of images, stylesheets, and JavaScripts from an asset server
# config.action_controller.asset_host = "http://assets.example.com"

View File

@@ -1,15 +0,0 @@
# Adjust headers to allow running Storybook in development.
# Uses iframes and doesn't play nicely with CORS checks
if Rails.env.development?
module PermissiveCORSHeaders
def self.before(response)
response.headers["Access-Control-Allow-Origin"] = "*"
response.headers["Access-Control-Allow-Methods"] = "GET"
end
end
Rails.application.reloader.to_prepare do
ViewComponent::Storybook::StoriesController.before_action(PermissiveCORSHeaders)
end
end

View File

@@ -30,6 +30,7 @@ ar:
shipping_category_id: "نوع الشحن"
variant_unit: "وحدة النوع"
variant_unit_name: "اسم وحدة النوع"
unit_value: "قيمةالوحدة"
spree/credit_card:
base: "بطاقة ائتمان"
number: "رقم "
@@ -180,6 +181,8 @@ ar:
updated_not_active: "تمت إعادة تعيين كلمة المرور الخاصة بك ، ولكن لم يتم تأكيد بريدك الإلكتروني بعد."
updated: "تم تغيير كلمة المرور الخاصة بك بنجاح. انت الآن مسجل دخولك."
send_instructions: "ستتلقى رسالة بريد إلكتروني تحتوي على إرشادات حول كيفية تأكيد حسابك في بضع دقائق."
oidc:
failure: "تعذر تسجيل الدخول: %{error}"
home_page_alert_html: "الصفحة الرئيسية تنبيه HTML"
hub_signup_case_studies_html: "Hub signup case studies HTML"
hub_signup_detail_html: "Hub signup detail HTML"
@@ -401,8 +404,11 @@ ar:
filters:
categories:
title: التصنيفات
selected_categories: "تم تحديد الفئات %{count}"
producers:
title: المنتجين
selected_producers: "تم اختيار المنتجين %{count}"
per_page: "%{count} عنصر في كل صفحة"
colums: أعمدة
columns:
name: الاسم
@@ -643,7 +649,9 @@ ar:
conditional_blank: لا يمكن أن تكون فارغة إذا كانت نوع الوحدة فارغة
no_product: لم يطابق أي منتجات في قاعدة البيانات
not_found: غير موجود في قاعدة البيانات
category_not_found: لا يتطابق مع الفئات المسموح بها. راجع الفئات الصحيحة للاختيار من بينها في صفحة استيراد المنتج ، أو تحقق من عدم وجود أخطاء إملائية.
not_updatable: لا يمكن تحديثه على المنتجات الحالية عبر استيراد المنتج
values_must_be_same: يجب أن تكون هي نفسها بالنسبة للمنتجات التي تحمل الاسم نفسه
blank: لا يمكن أن تكون فارغة
products_no_permission: ليس لديك إذن لإدارة المنتجات لهذه المؤسسة
inventory_no_permission: ليس لديك إذن لإنشاء مخزون لهذا المنتج
@@ -1362,6 +1370,15 @@ ar:
formatted_data: البيانات المنسقة
packing:
name: "تقارير التعبئة"
oidc_settings:
index:
title: "إعدادات OIDC"
connect: "اربط حسابك"
already_connected: "حسابك مرتبط بالفعل بحساب تفويض DFC هذا:"
les_communs_link: "خادم معرف Les Communs"
link_your_account: "تحتاج أولاً إلى ربط حسابك بموفر التفويض الذي تستخدمه DFC (Les Communs Open ID Connect)."
link_account_button: "اربط حسابك في Les Communs OIDC"
view_account: "لعرض حسابك ، راجع:"
subscriptions:
index:
title: "الاشتراكات"
@@ -1783,37 +1800,29 @@ ar:
cart: "سلة التسوق"
message_html: "لديك طلب لدورة الطلب هذه بالفعل. تحقق من %{cart} لرؤية العناصر التي طلبتها من قبل. يمكنك أيضًا إلغاء العناصر طالما كانت دورة الطلب مفتوحة."
step1:
your_details:
title: تفاصيلك
first_name:
label: الاسم الاول
placeholder: على سبيل المثال ، جين
last_name:
label: الكنية
placeholder: على سبيل المثال ، الفلاح
contact_information:
title: معلومات للتواصل
email:
label: البريد الإلكتروني
placeholder: على سبيل المثال Janedoe@email.com
phone:
label: رقم الهاتف
placeholder: مثال 07987654321
billing_address:
title: عنوان وصول الفواتير
first_name:
label: الاسم الاول
last_name:
label: الكنية
address:
address1:
label: العنوان (الشارع + رقم المنزل)
placeholder: على سبيل المثال شقق Flat 1 Elm
address2:
label: معلومات عنوان إضافية (اختياري)
placeholder: على سبيل المثال كافاليير أفينور
city:
label: مدينة
placeholder: على سبيل المثال لندن
state_id:
label: محافظة
zipcode:
label: الرمز البريدي
placeholder: على سبيل المثال SW11 3QN
country_id:
label: بلد
shipping_info:
@@ -2606,7 +2615,17 @@ ar:
report_header_to_hub: 'إلى مركز البيع '
report_header_hub_code: رمز مركز البيع
report_header_hub_id: معرف المحل
report_header_hub_business_number: "رقم العمل لمركز البيع "
report_header_hub_legal_name: "الاسم القانوني لمركز البيع "
report_header_hub_contact_name: "اسم جهة اتصال مركز البيع "
report_header_hub_email: "الايميل العام لمركز البيع "
report_header_hub_owner_email: البريد الإلكتروني لمالك المحل
report_header_hub_phone: "رقم هاتف مركز البيع "
report_header_hub_address_line1: "عنوان مركز البيع 1"
report_header_hub_address_line2: "عنوان مركز البيع 2"
report_header_hub_address_city: "ضاحية مركز البيع "
report_header_hub_address_zipcode: "الرمز البريدي لمركز البيع "
report_header_hub_address_state_name: "دولة مركز البيع "
report_header_code: الشفرة
report_header_paid: دفع؟
report_header_delivery: توصيل؟
@@ -2641,11 +2660,13 @@ ar:
report_header_total_tax: "إجمالي الضريبة (%{currency_symbol})"
report_header_total_excl_tax: "المجموع باستثناء الضريبة (%{currency_symbol})"
report_header_total_incl_tax: "إجمالي مدفوع الضريبة (%{currency_symbol})"
report_header_total_orders: "إجمالي عدد الطلبات"
report_header_enterprise: الشركة
report_header_customer: عميل
report_header_customer_code: كود العميل
report_header_product: المنتج
report_header_product_properties: خصائص المنتج
report_header_product_tax_category: فئة ضريبة المنتج
report_header_quantity: الكمية
report_header_max_quantity: اعلى كمية
report_header_variant: النوع
@@ -2658,6 +2679,7 @@ ar:
report_header_supplier: المورد
report_header_producer: المنتج
report_header_producer_suburb: منتج الضاحية
report_header_producer_charges_sales_tax?: مسجل في ضريبة السلع والخدمات / ضريبة القيمة المضافة
report_header_unit: وحدة
report_header_group_buy_unit_quantity: مجموعة شراء وحدة الكمية
report_header_cost: كلفة
@@ -2677,6 +2699,7 @@ ar:
report_header_delivery_postcode: تسليم الرمز البريدي
report_header_bulk_unit_size: حجم الوحدة بالجملة
report_header_weight: وزن
report_header_final_weight_volume: النهائي (الوزن / الحجم)
report_header_height: الارتفاع
report_header_width: العرض
report_header_depth: العمق
@@ -2853,6 +2876,7 @@ ar:
got_it: "فهمتك"
close: "إغلاق"
continue: "تابع"
cancel: "إلغاء"
invite: "ادعو"
invite_title: "دعوة مستخدم غير مسجل"
tag_rule_help:
@@ -3012,7 +3036,6 @@ ar:
pending: "قيد الانتظار"
resumed: "متابعة"
returned: "العودة"
skrill: "طريقة دفع سكريل"
shipment_states:
backorder: "المؤجل"
partial: "جزئي"
@@ -3675,6 +3698,7 @@ ar:
messages:
included_price_validation: "لا يمكن تحديده إلا إذا قمت بتعيين منطقة ضريبية افتراضية"
blank: "لا يمكن أن تكون فارغة"
invalid_instagram_url: "يجب أن يكون اسم المستخدم فقط على سبيل المثال. the_prof"
layouts:
admin:
login_nav:
@@ -3780,6 +3804,7 @@ ar:
viewing: "عرض %{start} إلى %{end}."
print_invoices: "طباعة الفواتير"
cancel_orders: "إلغاء الطلبات"
resend_confirmation: "أعد إرسال التأكيد"
selected:
zero: "لم يتم اختيار أي طلب"
one: "طلب واحد تم اختياره"
@@ -3928,6 +3953,7 @@ ar:
title: "منتج جديد"
new_product: "منتج جديد"
supplier: "المورد"
supplier_select_placeholder: "حدد المورد"
product_name: "اسم المنتج"
units: "حجم الوحدة"
value: "القيمة"
@@ -3973,6 +3999,9 @@ ar:
select_and_search: "حدد المرشحات وانقر على %{option} للوصول إلى البيانات الخاصة بك."
customer_names_message:
customer_names_tip: "إذا كانت أسماء العملاء مخفية للطلبات التي قدمتها ، فيمكنك الاتصال بالموزع والسؤال عما إذا كان بإمكانهم تحديث تفضيلات متجرهم للسماح لمورديهم بمشاهدة أسماء العملاء."
products_and_inventory:
all_products:
message: "لاحظ أن مستويات المخزون المبلغ عنها هي من قوائم منتجات الموردين فقط. إذا كنت تستخدم المخزون لإدارة كميات مخزونك ، فسيتم تجاهل هذه القيم في هذا التقرير."
users:
index:
listing_users: "قائمة المستخدمين"
@@ -4163,7 +4192,6 @@ ar:
pending: قيد الانتظار
resumed: استأنف
returned: العودة
skrill: طريقة دفع سكريل
subscription_state:
active: نشيط
pending: قيد الانتظار
@@ -4370,9 +4398,12 @@ ar:
title: "تم رفض التغيير الذي أردته (422)"
message_html: "<p style=\";text-align:right;direction:rtl\">تم رفض التغيير الذي تريده. ربما حاولت تغيير شيء لا يمكنك الوصول إليه.<br><h3 style=\";text-align:right;direction:rtl\"> <a href='/' >العودة للصفحة الرئيسية</a></h3></p>"
components:
multiple_checked_select:
filter_placeholder: "خيارات التصفية"
search_input:
placeholder: بحث
selector_with_filter:
selected_items: "%{count} تم تحديد"
search_placeholder: بحث
pagination:
next: التالى

View File

@@ -1766,18 +1766,17 @@ ca:
cart: "cistella"
message_html: "Ja teniu una comanda per a aquest cicle de comanda. Consulteu %{cart} per veure els articles que heu demanat anteriorment. També podeu cancel·lar articles sempre que el cicle de comanda estigui obert."
step1:
your_details:
title: Els teus detalls
first_name:
label: Nom
last_name:
label: Cognoms
contact_information:
email:
label: Correu electrònic
phone:
label: 'Número de telèfon '
billing_address:
title: Adreça de facturació
first_name:
label: Nom
last_name:
label: Cognoms
address:
city:
label: Municipi
@@ -2773,6 +2772,7 @@ ca:
got_it: "Ho tinc"
close: "Tanca"
continue: "Continua"
cancel: "Cancel·lar"
invite: "Convida"
invite_title: "Convida un usuari no registrat"
tag_rule_help:
@@ -2940,7 +2940,6 @@ ca:
pending: "pendents"
resumed: "reprès"
returned: "retornat"
skrill: "habilitat"
shipment_states:
backorder: "per tornar"
partial: "parcial"
@@ -3602,6 +3601,7 @@ ca:
results_found: "%{number} Resultats trobats."
viewing: "Veient %{start} a %{end}."
print_invoices: "Imprimir factures"
resend_confirmation: "Reenviar Confirmació"
sortable_header:
payment_state: "Estat del pagament"
shipment_state: "Estat de la Tramesa"
@@ -3976,7 +3976,6 @@ ca:
pending: pendents
resumed: reprès
returned: retornat
skrill: habilitat
subscription_state:
active: actiu
pending: pendents

View File

@@ -1363,6 +1363,13 @@ cy:
formatted_data: Data wedii Fformatio
packing:
name: "Adroddiadau Pacio"
oidc_settings:
index:
title: "OIDC Settings"
already_connected: "Your account is already linked to this DFC authorization account:"
les_communs_link: "Les Communs Open ID server"
link_your_account: "You need first to link your account with the authorization provider used by DFC (Les Communs Open ID Connect)."
link_account_button: "Link your Les Communs OIDC Account"
subscriptions:
index:
title: "Tanysgrifiadau"
@@ -1784,37 +1791,28 @@ cy:
cart: "basged"
message_html: "Mae gennych chi archeb ar gyfer y cylch archebu hwn eisoes. Gwiriwch y %{cart} i weld yr eitemau a archebwyd o'r blaen. Gallwch hefyd ganslo eitemau cyn belled â bod y cylch archebu ar agor."
step1:
your_details:
title: Eich manylion
first_name:
label: Enw cyntaf
placeholder: e.e. Sian
last_name:
label: Enw olaf
placeholder: e.e. Davies
contact_information:
email:
label: E-bost
placeholder: e.e. siandavies@email.com
phone:
label: Rhif ffôn
placeholder: e.e. 07987654321
billing_address:
title: Cyfeiriad bilio
first_name:
label: Enw cyntaf
last_name:
label: Enw olaf
address:
address1:
label: Cyfeiriad (Stryd a Rhif y Ty)
placeholder: e.e. Fflat 1 Adeilad y Môr
address2:
label: Manylion ychwanegol y Cyfeiriad (dewisol)
placeholder: Fflat Rhif 3
city:
label: Dinas
placeholder: e.e. Caerdydd
state_id:
label: Sir
zipcode:
label: Cod post
placeholder: e.e. CF1 0AA
country_id:
label: Gwlad
shipping_info:
@@ -2856,6 +2854,7 @@ cy:
got_it: "Yn deall"
close: "Cau"
continue: "Parhau"
cancel: "Canslo"
invite: "Gwahodd"
invite_title: "Gwahodd defnyddiwr anghofrestredig"
tag_rule_help:
@@ -3022,7 +3021,6 @@ cy:
pending: "yn yr arfaeth"
resumed: "ailddechrau"
returned: "wedi ei ddychwelyd"
skrill: "skrill"
shipment_states:
backorder: "ôl-archeb"
partial: "rhannol"
@@ -3742,6 +3740,7 @@ cy:
viewing: "Yn edrych ar %{start} i %{end}."
print_invoices: "Argraffu anfonebau"
cancel_orders: "Canslo Archebion"
resend_confirmation: "Ailanfon Cadarnhad "
selected:
zero: "Ni ddewiswyd archeb."
one: "Dewiswyd 1 archeb"
@@ -4123,7 +4122,6 @@ cy:
pending: yn yr arfaeth
resumed: wedi ailddechrau
returned: wedi dychwelyd
skrill: skrill
subscription_state:
active: gweithredol
pending: yn yr arfaeth

View File

@@ -1763,37 +1763,28 @@ de_CH:
cart: "im Warenkorb"
message_html: "Sie haben bereits eine Bestellung für diesen Bestellzyklus. Überprüfen Sie den %{cart}, um die Artikel zu sehen, die Sie zuvor bestellt haben. Sie können Artikel auch stornieren, solange der Bestellzyklus geöffnet ist."
step1:
your_details:
title: Ihre Daten
first_name:
label: Vorname
placeholder: z. B. Max
last_name:
label: Nachname
placeholder: z. B. Mustermann
contact_information:
email:
label: E-Mail-Adresse
placeholder: z. B. Max.Mustermann@beispiel.com
phone:
label: Telefonnummer
placeholder: z. B. +49 40 123 456
label: Telefonnummer (optional)
billing_address:
title: Rechnungsadresse
first_name:
label: Vorname
last_name:
label: Nachname
address:
address1:
label: Strasse + Hausnummer
placeholder: z. B. Gartenstrasse 123
address2:
label: Adresszusatz (optional)
placeholder: z. B. c/o Familie Müller
city:
label: Ort
placeholder: z. B. Nordwestheim
state_id:
label: Bundesland
zipcode:
label: Postleitzahl
placeholder: z. B. 30701
country_id:
label: Land
shipping_info:
@@ -2828,6 +2819,7 @@ de_CH:
got_it: "Verstanden"
close: "Schliessen"
continue: "Weiter"
cancel: "Stornieren"
invite: "Einladen"
invite_title: "Geben Sie die E-Mail-Adresse eines nicht registrierten Benutzers ein, um dieses Unternehmen zu verwalten."
tag_rule_help:
@@ -3000,7 +2992,6 @@ de_CH:
pending: "ausstehend"
resumed: "wiederaufgenommen"
returned: "zurückgegeben"
skrill: "Skrill"
shipment_states:
backorder: "Lieferrückstand"
partial: "Teillieferung"
@@ -3669,6 +3660,7 @@ de_CH:
results_found: "%{number} Ergebnisse gefunden."
viewing: "Angezeigt wird %{start} bis %{end}."
print_invoices: "Rechnungen drucken"
resend_confirmation: "Bestätigung erneut senden"
sortable_header:
payment_state: "Zahlungsstatus"
shipment_state: "Lieferstatus"
@@ -4040,7 +4032,6 @@ de_CH:
pending: ausstehend
resumed: wiederaufgenommen
returned: retourniert
skrill: Skrill
subscription_state:
active: aktiv
pending: ausstehend

View File

@@ -1799,37 +1799,28 @@ de_DE:
cart: "im Warenkorb"
message_html: "Sie haben bereits eine Bestellung für diesen Bestellzyklus. Überprüfen Sie den %{cart}, um die Artikel zu sehen, die Sie zuvor bestellt haben. Sie können Artikel auch stornieren, solange der Bestellzyklus geöffnet ist."
step1:
your_details:
title: Ihre Daten
first_name:
label: Vorname
placeholder: z. B. Max
last_name:
label: Nachname
placeholder: z. B. Mustermann
contact_information:
email:
label: E-Mail-Adresse
placeholder: z. B. Max.Mustermann@beispiel.com
phone:
label: Telefonnummer
placeholder: z. B. +49 40 123 456
billing_address:
title: Rechnungsadresse
first_name:
label: Vorname
last_name:
label: Nachname
address:
address1:
label: Straße + Hausnummer
placeholder: z. B. Gartenstraße 123
address2:
label: Adresszusatz (optional)
placeholder: z. B. c/o Familie Müller
city:
label: Ort
placeholder: z. B. Nordwestheim
state_id:
label: Bundesland
zipcode:
label: Postleitzahl
placeholder: z. B. 30701
country_id:
label: Land
shipping_info:
@@ -2882,6 +2873,7 @@ de_DE:
got_it: "Verstanden"
close: "Schließen"
continue: "Weiter"
cancel: "Stornieren"
invite: "Einladen"
invite_title: "Geben Sie die E-Mail-Adresse eines nicht registrierten Benutzers ein, um dieses Unternehmen zu verwalten."
tag_rule_help:
@@ -3054,7 +3046,6 @@ de_DE:
pending: "ausstehend"
resumed: "wiederaufgenommen"
returned: "zurückgegeben"
skrill: "Skrill"
shipment_states:
backorder: "Lieferrückstand"
partial: "Teillieferung"
@@ -3725,6 +3716,7 @@ de_DE:
viewing: "Angezeigt wird %{start} bis %{end}."
print_invoices: "Rechnungen drucken"
cancel_orders: "Bestellungen stornieren"
resend_confirmation: "Bestätigung erneut senden"
selected:
zero: "Keine Bestellung ausgewählt"
one: "1 Bestellung ausgewählt"
@@ -4107,7 +4099,6 @@ de_DE:
pending: ausstehend
resumed: wiederaufgenommen
returned: retourniert
skrill: Skrill
subscription_state:
active: aktiv
pending: ausstehend

View File

@@ -730,6 +730,7 @@ en:
not_found: not found in database
category_not_found: doesn't match allowed categories. See the correct categories to choose from on the product import page, or check that there's no misspelling.
not_updatable: cannot be updated on existing products via product import
values_must_be_same: must be the same for products with the same name
blank: can't be blank
products_no_permission: you do not have permission to manage products for this enterprise
inventory_no_permission: you do not have permission to create inventory for this producer
@@ -1565,6 +1566,10 @@ en:
stripe_connect_settings:
resource: Stripe Connect configuration
resend_confirmation_emails_feedback:
one: "Confirmation email sent for 1 order."
other: "Confirmation emails sent for %{count} orders."
# API
#
api:
@@ -1914,37 +1919,29 @@ en:
cart: "cart"
message_html: "You have an order for this order cycle already. Check the %{cart} to see the items you ordered before. You can also cancel items as long as the order cycle is open."
step1:
your_details:
title: Your details
first_name:
label: First Name
placeholder: e.g. Jane
last_name:
label: Last Name
placeholder: e.g. Doe
contact_information:
title: Contact information
email:
label: Email
placeholder: e.g. Janedoe@email.com
phone:
label: Phone number
placeholder: e.g. 07987654321
billing_address:
title: Billing address
first_name:
label: First Name
last_name:
label: Last Name
address:
address1:
label: Address (Street + House Number)
placeholder: e.g. Flat 1 Elm apartments
address2:
label: Additional address info (optional)
placeholder: e.g. Cavalier avenur
city:
label: City
placeholder: e.g. London
state_id:
label: State
zipcode:
label: Postcode
placeholder: e.g. SW11 3QN
country_id:
label: Country
shipping_info:
@@ -2865,6 +2862,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
report_header_delivery_postcode: Delivery Postcode
report_header_bulk_unit_size: Bulk Unit Size
report_header_weight: Weight
report_header_final_weight_volume: Final (Weight/Volume)
report_header_height: Height
report_header_width: Width
report_header_depth: Depth
@@ -3042,8 +3040,10 @@ See the %{link} to find out more about %{sitename}'s features and to start using
deleting_item_will_cancel_order: "This operation will result in one or more empty orders, which will be cancelled. Do you wish to proceed?"
modals:
got_it: "Got it"
confirm: "Confirm"
close: "Close"
continue: "Continue"
cancel: "Cancel"
invite: "Invite"
invite_title: "Invite an unregistered user"
tag_rule_help:
@@ -3202,7 +3202,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
pending: "pending"
resumed: "resumed"
returned: "returned"
skrill: "skrill"
shipment_states:
backorder: "backorder"
partial: "partial"
@@ -3804,6 +3803,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
messages:
included_price_validation: "cannot be selected unless you have set a Default Tax Zone"
blank: "can't be blank"
invalid_instagram_url: "Must be user name only eg. the_prof"
layouts:
admin:
login_nav:
@@ -3911,6 +3911,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
viewing: "Viewing %{start} to %{end}."
print_invoices: "Print Invoices"
cancel_orders: "Cancel Orders"
resend_confirmation: "Resend Confirmation"
resend_confirmation_confirm_html: "This will resend the confirmation email to the customer.<br />Are you sure you want to proceed?"
selected:
zero: "No order selected"
one: "1 order selected"
@@ -4059,6 +4061,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
title: "New Product"
new_product: "New Product"
supplier: "Supplier"
supplier_select_placeholder: "Select a supplier"
product_name: "Product Name"
units: "Unit Size"
value: "Value"
@@ -4104,6 +4107,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
select_and_search: "Select filters and click on %{option} to access your data."
customer_names_message:
customer_names_tip: "If customer names are hidden for orders you have supplied, you can contact the distributor and ask if they can update their shop preferences to allow their suppliers to view customer names."
products_and_inventory:
all_products:
message: "Note that stock levels reported are from supplier product lists only. If you are using Inventory to manage your stock quantities these values will be ignored in this report."
users:
index:
listing_users: "Listing Users"
@@ -4294,7 +4300,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
pending: pending
resumed: resumed
returned: returned
skrill: skrill
subscription_state:
active: active
pending: pending

Some files were not shown because too many files have changed in this diff Show More