Compare commits

...

60 Commits

Author SHA1 Message Date
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
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
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
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
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
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
44 changed files with 520 additions and 292 deletions

View File

@@ -182,7 +182,7 @@ GEM
bugsnag (6.25.0)
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)
@@ -375,7 +375,7 @@ GEM
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
jwt (2.6.0)
knapsack_pro (3.6.0)
knapsack_pro (3.7.0)
rake
launchy (2.5.0)
addressable (~> 2.7)
@@ -404,7 +404,7 @@ GEM
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)
@@ -599,17 +599,17 @@ GEM
rswag-ui (2.8.0)
actionpack (>= 3.1, < 7.1)
railties (>= 3.1, < 7.1)
rubocop (1.41.1)
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.4)
activesupport (>= 4.2.0)

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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -127,5 +127,3 @@
@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";

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,29 @@ 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
{
@include backgroundAndBorder($v2-blue-light);
&:hover {
@include backgroundAndBorder($v2-blue);
box-shadow: $v2-box-shadow;
}
&.disabled,
&[disabled] {
@include backgroundAndBorder($v2-light-grey);
box-shadow: none;
}
&:not(.disabled):not([disabled]):not(.secondary) {
// Change the color of the button only if it's not disabled
@include backgroundAndBorder($v2-blue-light);
&:hover {
@include backgroundAndBorder($v2-blue);
box-shadow: $v2-box-shadow;
}
}
&.secondary {
&.secondary,
&.cancel,
&.icon-remove {
background-color: $white;
border: 2px solid $v2-blue-light;
color: $v2-blue-light;
@@ -60,7 +62,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,24 +25,23 @@ 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;
@@ -44,30 +55,66 @@ table tbody tr {
}
}
table th.actions,
table td.actions {
table thead tr th.actions,
table tbody tr td.actions {
background-color: $v2-body-bg !important;
// 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;
}
}
}
}
}
table#listing_orders td {
// When the table is the listing of orders, we need to increase the height of the cells
padding: 20px 0;
&.actions {
padding-left: 20px;
.icon-edit:hover,
.icon-capture:hover,
.icon-ok:hover,
.icon-plus:hover,
.icon-road:hover {
background-color: $v2-blue;
color: $color-1;
}
}
table#listing_orders {
thead th.actions,
thead td.actions {
background-color: $v2-medium-light-grey !important;
}
tbody tr td.actions {
background-color: white !important;
}
td {
// When the table is the listing of orders, we need to increase the height of the cells
padding: 20px 0;
&.actions {
padding-left: 20px;
border-bottom: 2px solid $v2-medium-light-grey !important; // needs to be important because of already defined with important
}
&:not(:first-child) {
border-left: none; // Only show left border on the first cells, as it indicates the order state by its color
}
}
}

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

@@ -1,13 +1,18 @@
@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";
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

@@ -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,7 +2,7 @@
.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;
@@ -37,6 +37,12 @@
}
.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;
.select2-search-choice {

View File

@@ -25,11 +25,12 @@ fieldset {
}
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,6 @@
}
}
body.admin.admin-v2 {
color: $v2-body-grey;
a:not(.button) {
@include v2-link-color();
}
a:not(.button) {
@include v2-link-color();
}

View File

@@ -7,7 +7,7 @@ $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-medium-light-grey: #e6e6e6;
$v2-light-grey: #e7e7e7;
@@ -21,3 +21,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

@@ -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

@@ -3196,7 +3196,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"
@@ -4293,7 +4292,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

View File

@@ -404,8 +404,11 @@ en_FR:
filters:
categories:
title: Categories
selected_categories: "%{count} categories selected"
producers:
title: Producers
selected_producers: "%{count} producers selected"
per_page: "%{count} items per page"
colums: Columns
columns:
name: Name
@@ -648,6 +651,7 @@ en_FR:
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
@@ -1798,6 +1802,7 @@ en_FR:
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:
contact_information:
title: Contact information
email:
label: Email
phone:
@@ -2662,6 +2667,7 @@ en_FR:
report_header_customer_code: Customer Code
report_header_product: Product
report_header_product_properties: Product Properties
report_header_product_tax_category: Product Tax Category
report_header_quantity: Quantity
report_header_max_quantity: Max Quantity
report_header_variant: Variant
@@ -2674,6 +2680,7 @@ en_FR:
report_header_supplier: Supplier
report_header_producer: Producer
report_header_producer_suburb: Producer Suburb
report_header_producer_charges_sales_tax?: GST/VAT Registered
report_header_unit: Unit
report_header_group_buy_unit_quantity: Group Buy Unit Quantity
report_header_cost: Cost
@@ -2693,6 +2700,7 @@ en_FR:
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
@@ -3602,6 +3610,7 @@ en_FR:
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:
@@ -3855,6 +3864,7 @@ en_FR:
title: "New Product"
new_product: "New Product"
supplier: "Supplier"
supplier_select_placeholder: "Select a supplier"
product_name: "Product Name"
units: "Unit Size"
value: "Value"
@@ -3900,6 +3910,9 @@ en_FR:
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"
@@ -4250,6 +4263,7 @@ en_FR:
search_input:
placeholder: Search
selector_with_filter:
selected_items: "%{count} selected"
search_placeholder: Search
pagination:
next: Next

View File

@@ -404,8 +404,11 @@ fr:
filters:
categories:
title: Conditions de transport
selected_categories: "%{count} catégories sélectionnées"
producers:
title: Producteurs
selected_producers: "%{count} producteurs sélectionnés"
per_page: "%{count} éléments par page"
colums: Colonnes
columns:
name: Nom
@@ -648,6 +651,7 @@ fr:
not_found: non trouvé dans le base de données
category_not_found: n'est pas conforme aux catégories utilisées. Merci de modifier les catégories en utilisant celles listées sur la page d'import ou vérifier qu'il n'y ait pas de faute de frappe ou d'espace à fin du mot.
not_updatable: ne peut pas être mis à jour pour des produits existants via la fonctionnalité d'import de fichier produits
values_must_be_same: doit être identique pour les produits avec un nom identique
blank: Champ obligatoire
products_no_permission: vous n'avez pas l'autorisation de gérer les produits de cette entreprise
inventory_no_permission: vous n'avez pas l'autorisation d'ajouter les produits de ce producteur à votre catalogue boutique
@@ -1799,6 +1803,7 @@ fr:
message_html: "Vous avez déjà passé une commande pour ce cycle de vente. Vérifiez votre %{cart} pour voir les produits commandés. Vous pouvez annuler ou modifier votre commande jusqu'à la fermeture du cycle de vente."
step1:
contact_information:
title: Contact
email:
label: Email
phone:
@@ -2663,6 +2668,7 @@ fr:
report_header_customer_code: Code acheteur
report_header_product: Produit
report_header_product_properties: Propriétés / labels Produits
report_header_product_tax_category: TVA applicable
report_header_quantity: Quantité
report_header_max_quantity: Quantité Max
report_header_variant: Variante
@@ -2675,6 +2681,7 @@ fr:
report_header_supplier: Fournisseur
report_header_producer: Producteur
report_header_producer_suburb: Ville Producteur
report_header_producer_charges_sales_tax?: Soumis à la TVA
report_header_unit: Unité
report_header_group_buy_unit_quantity: Nb d'unités achetées (vente par lots)
report_header_cost: Coût
@@ -2694,6 +2701,7 @@ fr:
report_header_delivery_postcode: Code Postal Livraison
report_header_bulk_unit_size: Quantité totale du lot
report_header_weight: Poids
report_header_final_weight_volume: Poids ou volume livré
report_header_height: Hauteur
report_header_width: Largeur
report_header_depth: Profondeur
@@ -3654,6 +3662,7 @@ fr:
messages:
included_price_validation: "ne peut pas être sélectionné à moins d'avoir une zone par défaut"
blank: "Champ obligatoire"
invalid_instagram_url: "Uniquement le nom d'utilisateur / identifiant par ex. le_prof"
layouts:
admin:
login_nav:
@@ -3907,6 +3916,7 @@ fr:
title: "Nouveau Produit"
new_product: "Nouveau Produit"
supplier: "Fournisseur"
supplier_select_placeholder: "Sélectionner un producteur"
product_name: "Nom du Produit"
units: "Unité de mesure"
value: "Quantité"
@@ -3952,6 +3962,9 @@ fr:
select_and_search: "Sélectionner les filtres et cliquer sur %{option} pour accéder aux données."
customer_names_message:
customer_names_tip: "Si les noms des acheteurs sont masqués, vous pouvez contacter le gestionnaire de la boutique. Il pourra vous donner accès à cette information."
products_and_inventory:
all_products:
message: "Attention les stocks correspondent aux stocks producteurs et non au stock du catalogue boutique."
users:
index:
listing_users: "Liste des utilisateurs"
@@ -4316,6 +4329,7 @@ fr:
search_input:
placeholder: Rechercher
selector_with_filter:
selected_items: "%{count} sélectionné"
search_placeholder: Rechercher
pagination:
next: Suivant

View File

@@ -30,6 +30,7 @@ it:
shipping_category_id: "Categoria Spedizioni"
variant_unit: "Unità Variante"
variant_unit_name: "Nome Unità Variante"
unit_value: "Valore unità"
spree/credit_card:
base: "Carta di Credito"
number: "Numero"
@@ -180,6 +181,8 @@ it:
updated_not_active: "La tua password è stata resettata, ma la tua email non è ancora stata confermata."
updated: "La tua password è stata modificata con successo.\nOra sei collegato."
send_instructions: "A breve riceverai una email con le istruzioni per la conferma del tuo account."
oidc:
failure: "Non è possibile accedere: %{error}"
home_page_alert_html: "HTML alert Home page"
hub_signup_case_studies_html: "HTML iscrizione hub casi studio"
hub_signup_detail_html: "HTML dettagli iscrizione hub"
@@ -230,7 +233,7 @@ it:
email_userguide_html: "La Guida Utente con supporto dettagliato per l'impostazione del tuo Produttore o Distributore è qui: %{link}"
userguide: "Guida Utente di Open Food Network"
email_admin_html: "Puoi gestire il tuo profilo facendo il log in al link %{link} o cliccando sull'ingranaggio in alto a destra della homepage, e selezionando Amministrazione"
admin_panel: "Panello Amministrativo"
admin_panel: "Panello di Controllo"
email_community_html: "Abbiamo anche un forum per le discussioni comunitarie legate al software di OFN e le sfide uniche legate all'avere un'impresa alimentare. Ti incoraggiamo a farne parte. Siamo in continua evoluzione e il tuo contributo al forum delineerà quello che succederà in futuro. %{link}"
join_community: "Unisciti alla community"
invite_manager:
@@ -401,8 +404,11 @@ it:
filters:
categories:
title: categorie
selected_categories: "%{count} categorie selezionate"
producers:
title: Produttori
selected_producers: "%{count} produttori selezionati"
per_page: "%{count} articoli per pagina"
colums: Colonne
columns:
name: Nome
@@ -643,7 +649,9 @@ it:
conditional_blank: non può essere vuoto se unit_type è vuoto
no_product: Non corrisponde a nessun prodotto nel database
not_found: non trovato nel database
category_not_found: Non corrisponde alle categorie ammesse. Controlla le categorie tra cui scegliere alla pagina di importazione prodotti, o controlla che non ci siano errori di battitura.
not_updatable: non può essere aggiornato sui prodotti esistenti tramite l'importazione dei prodotti
values_must_be_same: deve essere lo stesso per prodotti con lo stesso nome
blank: non può essere lasciato vuoto
products_no_permission: non sei abilitato a gestire i prodotti per questa azienda
inventory_no_permission: non sei abilitato a creare l'inventario per questo produttore
@@ -1364,6 +1372,12 @@ it:
formatted_data: Dati Formattati
packing:
name: "Resoconti smistamento/imballaggio"
oidc_settings:
index:
title: "Impoostazioni"
connect: "Collega il tuo profilo"
already_connected: "Il tuo profilo è già collegato a questo profilo di autorizzazione DFC"
view_account: "Per vedere il tuo profilo, vedi:"
subscriptions:
index:
title: "Abbonamenti"
@@ -1786,6 +1800,7 @@ it:
message_html: "Hai già un ordine per questo ciclo d'ordine. Controlla%{cart} per vedere gli articoli ordinati in precedenza. Puoi anche cancellare gli articoli finché il ciclo dell'ordine è aperto."
step1:
contact_information:
title: Informazioni contatto
email:
label: Email
phone:
@@ -2599,7 +2614,17 @@ it:
report_header_to_hub: Al gruppo
report_header_hub_code: Codice hub
report_header_hub_id: ID Hub
report_header_hub_business_number: "Partita IVA o Codice Fiscale dell'Hub"
report_header_hub_legal_name: "Ragione sociale dell'Hub"
report_header_hub_contact_name: "Nome di contatto dell'Hub"
report_header_hub_email: "Email pubblica"
report_header_hub_owner_email: Email Gestore Hub
report_header_hub_phone: "Numero di Telefono"
report_header_hub_address_line1: "Indirizzo Riga 1"
report_header_hub_address_line2: "Indirizzo Riga 2"
report_header_hub_address_city: "Comune"
report_header_hub_address_zipcode: "CAP"
report_header_hub_address_state_name: "Stato"
report_header_code: Codice
report_header_paid: Pagato?
report_header_delivery: Consegna?
@@ -2634,11 +2659,13 @@ it:
report_header_total_tax: "Oneri totali (%{currency_symbol})"
report_header_total_excl_tax: "Totale imponibile (%{currency_symbol})"
report_header_total_incl_tax: "Totale IVA incl. (%{currency_symbol})"
report_header_total_orders: "Numero totale ordini"
report_header_enterprise: Azienda
report_header_customer: Cliente
report_header_customer_code: Codice Cliente
report_header_product: Prodotto
report_header_product_properties: Proprietà prodotto
report_header_product_tax_category: Categoria d'imposta del prodotto
report_header_quantity: Quantità
report_header_max_quantity: Quantità massima
report_header_variant: Variante
@@ -2651,6 +2678,7 @@ it:
report_header_supplier: Fornitore
report_header_producer: Produttore
report_header_producer_suburb: Comune produttore
report_header_producer_charges_sales_tax?: Partita IVA / Codice fiscale
report_header_unit: Unità
report_header_group_buy_unit_quantity: Raggruppare per quantità di unità
report_header_cost: Costo
@@ -2670,6 +2698,7 @@ it:
report_header_delivery_postcode: CAP consegna
report_header_bulk_unit_size: Quantità minima per Acquisto di Gruppo
report_header_weight: Peso
report_header_final_weight_volume: Peso/Volume
report_header_height: Altezza
report_header_width: Larghezza
report_header_depth: Profondità
@@ -3606,6 +3635,7 @@ it:
messages:
included_price_validation: "Non può essere selezionato se non hai impostato una Zona Fiscale Predefinita "
blank: "non può essere lasciato vuoto"
invalid_instagram_url: "Deve essere solo il nome utente"
layouts:
admin:
login_nav:
@@ -3859,6 +3889,7 @@ it:
title: "Nuovo prodotto"
new_product: "Nuovo prodotto"
supplier: "Fornitore"
supplier_select_placeholder: "Seleziona un fornitore"
product_name: "Nome Prodotto"
units: "Unità di misura"
value: "Valore"
@@ -3904,6 +3935,9 @@ it:
select_and_search: "Seleziona filtri e clicca su %{option} per accedere al tuo dato"
customer_names_message:
customer_names_tip: "Se i nomi dei clienti sono nascosti nelle gentili richieste che hai evaso, puoi contattare il distributore e chiedergli di aggiornare le sue impostazioni per permettere ai suoi fornitori di visualizzare i nomi dei clienti."
products_and_inventory:
all_products:
message: "Considera che le quantità disponibili riguardano solo il listino del fornitore. Se stai usando l'Inventario per gestire le tue quantità disponibili, questi valori saranno ignorati in questo report."
users:
index:
listing_users: "Elenco Utenti"
@@ -4267,6 +4301,7 @@ it:
search_input:
placeholder: Cerca
selector_with_filter:
selected_items: "%{count} selezionato"
search_placeholder: Cerca
pagination:
next: Prossimo

View File

@@ -0,0 +1,16 @@
# frozen_string_literal: true
class DropSpreeSkrillTransactions < ActiveRecord::Migration[6.1]
def change
drop_table "spree_skrill_transactions", id: :serial, force: :cascade do |t|
t.string "email", limit: 255
t.float "amount"
t.string "currency", limit: 255
t.integer "transaction_id"
t.integer "customer_id"
t.string "payment_type", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_12_08_150521) do
ActiveRecord::Schema.define(version: 2023_01_05_000312) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -890,17 +890,6 @@ ActiveRecord::Schema.define(version: 2022_12_08_150521) do
t.index ["shipment_id", "shipping_method_id"], name: "spree_shipping_rates_join_index", unique: true
end
create_table "spree_skrill_transactions", id: :serial, force: :cascade do |t|
t.string "email", limit: 255
t.float "amount"
t.string "currency", limit: 255
t.integer "transaction_id"
t.integer "customer_id"
t.string "payment_type", limit: 255
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "spree_state_changes", id: :serial, force: :cascade do |t|
t.string "name", limit: 255
t.string "previous_state", limit: 255

View File

@@ -417,6 +417,7 @@ describe '
let!(:distributor) { create(:distributor_enterprise) }
let!(:oc1) { create(:simple_order_cycle, distributors: [distributor]) }
let!(:oc2) { create(:simple_order_cycle, distributors: [distributor]) }
let!(:oc3) { create(:simple_order_cycle, distributors: [distributor]) }
let!(:o1) {
create(:order_with_distributor, state: 'complete', shipment_state: 'ready', completed_at: Time.zone.now,
order_cycle: oc1 )
@@ -425,16 +426,27 @@ describe '
create(:order_with_distributor, state: 'complete', shipment_state: 'ready', completed_at: Time.zone.now,
order_cycle: oc2 )
}
let!(:o3) {
create(:order_with_distributor, state: 'complete', shipment_state: 'ready', completed_at: Time.zone.now + 1.week,
order_cycle: oc3 )
}
let!(:o4) {
create(:order_with_distributor, state: 'complete', shipment_state: 'ready', completed_at: Time.zone.now + 2.weeks,
order_cycle: oc3 )
}
let!(:li1) { create(:line_item_with_shipment, order: o1 ) }
let!(:li2) { create(:line_item_with_shipment, order: o2 ) }
let!(:li3) { create(:line_item_with_shipment, order: o3 ) }
let!(:li4) { create(:line_item_with_shipment, order: o4 ) }
before do
oc3.update!(orders_close_at: Time.zone.now + 2.weeks)
oc3.update!(orders_open_at: Time.zone.now + 1.week)
visit_bulk_order_management
end
it "displays a select box for order cycles, which filters line items by the selected order cycle", retry: 3 do
expect(page).to have_selector "tr#li_#{li1.id}"
expect(page).to have_selector "tr#li_#{li2.id}"
displays_default_orders
expect(page).to have_select2 'order_cycle_filter',
with_options: OrderCycle.pluck(:name).unshift("All")
select2_select oc1.name, from: "order_cycle_filter"
@@ -445,16 +457,45 @@ describe '
end
it "displays all line items when 'All' is selected from order_cycle filter", retry: 3 do
expect(page).to have_selector "tr#li_#{li1.id}"
expect(page).to have_selector "tr#li_#{li2.id}"
displays_default_orders
select2_select oc1.name, from: "order_cycle_filter"
page.find('.filter-actions .button.icon-search').click
expect(page).to have_selector "tr#li_#{li1.id}"
expect(page).to have_no_selector "tr#li_#{li2.id}"
select2_select "All", from: "order_cycle_filter"
page.find('.filter-actions .button.icon-search').click
displays_default_orders
end
it "selecting an OC pre-selects the date range from that OC" do
displays_default_orders
click_on_select2 oc3.name, from: "order_cycle_filter"
expect(find("input.datepicker").value).to eq "#{oc3.orders_open_at.strftime('%F')} to #{oc3.orders_close_at.strftime('%F')}"
displays_default_orders
click_on_select2 oc1.name, from: "order_cycle_filter"
displays_default_orders
expect(find("input.datepicker").value).to eq "#{oc1.orders_open_at.strftime('%F')} to #{oc1.orders_close_at.strftime('%F')}"
# only filters results after clicking the 'Filter Results' button
displays_default_orders
page.find('.filter-actions .button.icon-search').click
expect(page).to have_selector "tr#li_#{li1.id}"
expect(page).to have_selector "tr#li_#{li2.id}"
expect(page).to_not have_selector "tr#li_#{li2.id}"
# only filters results after clicking the 'Clear Filters' button resets to display the default results
page.find("#clear_filters_button").click
displays_default_orders
end
it "allows combining the order cycle and the pre-selected date with a custom date" do
click_on_select2 oc3.name, from: "order_cycle_filter"
expect(find("input.datepicker").value).to eq "#{oc3.orders_open_at.strftime('%F')} to #{oc3.orders_close_at.strftime('%F')}"
page.find('.filter-actions .button.icon-search').click
expect(page).to have_selector "tr#li_#{li3.id}"
expect(page).to have_selector "tr#li_#{li4.id}"
find("input.datepicker").click # selecting a date range, within oc3
select_dates_from_daterangepicker(o4.completed_at - 1.day, o4.completed_at + 1.day)
page.find('.filter-actions .button.icon-search').click
expect(page).to have_selector "tr#li_#{li4.id}"
expect(page).to_not have_selector "tr#li_#{li3.id}"
end
end
@@ -992,4 +1033,9 @@ describe '
visit spree.admin_bulk_order_management_path
expect(page).to have_no_text 'Loading orders'
end
def displays_default_orders
expect(page).to have_selector "tr#li_#{li1.id}"
expect(page).to have_selector "tr#li_#{li2.id}"
end
end

View File

@@ -136,6 +136,29 @@ describe "Product Import", js: true do
expect(page).to have_no_selector 'input[type=submit][value="Save"]'
end
it "displays info about inconsistent variant unit names, within the same product" do
csv_data = CSV.generate do |csv|
csv << ["name", "producer", "category", "on_hand", "price", "units", "unit_type", "variant_unit_name",
"shipping_category_id"]
csv << ["Carrots", "User Enterprise", "Vegetables", "50", "3.20", "250", "", "Bag", shipping_category_id_str]
csv << ["Carrots", "User Enterprise", "Vegetables", "50", "6.40", "500", "", "Big-Bag", shipping_category_id_str]
end
File.write('/tmp/test.csv', csv_data)
visit main_app.admin_product_import_path
expect(page).to have_content "Select a spreadsheet to upload"
attach_file 'file', '/tmp/test.csv'
click_button 'Upload'
proceed_to_validation
find('div.header-description', text: 'Items contain errors').click
expect(page).to have_content "Variant_unit_name must be the same for products with the same name"
expect(page).to have_content "Imported file contains invalid entries"
expect(page).to have_no_selector 'input[type=submit][value="Save"]'
end
it "handles saving of named tax and shipping categories" do
csv_data = CSV.generate do |csv|
csv << ["name", "producer", "category", "on_hand", "price", "units", "unit_type",
@@ -382,36 +405,67 @@ describe "Product Import", js: true do
with: "3.2"
end
it "handles the Items unit for inventory import" do
product = create(:simple_product, supplier: enterprise, on_hand: nil, name: 'Aubergine',
unit_value: '1', variant_unit_scale: nil, variant_unit: "items", variant_unit_name: "Bag")
csv_data = CSV.generate do |csv|
csv << ["name", "distributor", "producer", "category", "on_hand", "price", "unit_type",
"units", "on_demand", "variant_unit_name"]
csv << ["Aubergine", "Another Enterprise", "User Enterprise", "Vegetables", "", "3.3",
"kg", "1", "true", "Bag"]
describe "Item type products" do
let!(:product) {
create(:simple_product, supplier: enterprise, on_hand: nil, name: 'Aubergine',
unit_value: '1', variant_unit_scale: nil, variant_unit: "items", variant_unit_name: "Bag")
}
it "are sucessfully imported to inventory" do
csv_data = CSV.generate do |csv|
csv << ["name", "distributor", "producer", "category", "on_hand", "price", "unit_type",
"units", "on_demand", "variant_unit_name"]
csv << ["Aubergine", "Another Enterprise", "User Enterprise", "Vegetables", "", "3.3",
"kg", "1", "true", "Bag"]
end
File.write('/tmp/test.csv', csv_data)
visit main_app.admin_product_import_path
select I18n.t('admin.product_import.index.inventories'), from: "settings_import_into"
attach_file 'file', '/tmp/test.csv'
click_button 'Upload'
proceed_to_validation
expect(page).to have_selector '.item-count', text: "1"
expect(page).to have_no_selector '.invalid-count'
expect(page).to have_selector '.inv-create-count', text: '1'
save_data
expect(page).to have_selector '.inv-created-count', text: '1'
visit main_app.admin_inventory_path
expect(page).to have_content "Aubergine"
expect(page).to have_select "variant-overrides-#{Spree::Product.find_by(name: 'Aubergine').variants.first.id}-on_demand",
selected: "Yes"
expect(page).to have_input "variant-overrides-#{Spree::Product.find_by(name: 'Aubergine').variants.first.id}-price",
with: "3.3"
end
File.write('/tmp/test.csv', csv_data)
visit main_app.admin_product_import_path
select I18n.t('admin.product_import.index.inventories'), from: "settings_import_into"
attach_file 'file', '/tmp/test.csv'
click_button 'Upload'
proceed_to_validation
expect(page).to have_selector '.item-count', text: "1"
expect(page).to have_no_selector '.invalid-count'
expect(page).to have_selector '.inv-create-count', text: '1'
save_data
it "displays the appropriate error message, when variant unit names are inconsistent" do
csv_data = CSV.generate do |csv|
csv << ["name", "distributor", "producer", "category", "on_hand", "price", "unit_type",
"units", "on_demand", "variant_unit_name"]
csv << ["Aubergine", "Another Enterprise", "User Enterprise", "Vegetables", "", "3.3",
"kg", "1", "true", "Bag"]
csv << ["Aubergine", "Another Enterprise", "User Enterprise", "Vegetables", "", "6.6",
"kg", "1", "true", "Big-Bag"]
end
expect(page).to have_selector '.inv-created-count', text: '1'
File.write('/tmp/test.csv', csv_data)
visit main_app.admin_product_import_path
select I18n.t('admin.product_import.index.inventories'), from: "settings_import_into"
attach_file 'file', '/tmp/test.csv'
click_button 'Upload'
proceed_to_validation
visit main_app.admin_inventory_path
find('div.header-description', text: 'Items contain errors').click
expect(page).to have_content "Variant_unit_name must be the same for products with the same name"
expect(page).to have_content "Imported file contains invalid entries"
expect(page).to have_no_selector 'input[type=submit][value="Save"]'
expect(page).to have_content "Aubergine"
expect(page).to have_select "variant-overrides-#{Spree::Product.find_by(name: 'Aubergine').variants.first.id}-on_demand",
selected: "Yes"
expect(page).to have_input "variant-overrides-#{Spree::Product.find_by(name: 'Aubergine').variants.first.id}-price",
with: "3.3"
visit main_app.admin_inventory_path
expect(page).not_to have_content "Aubergine"
end
end
it "handles on_demand and on_hand validations with inventory" do

View File

@@ -47,7 +47,7 @@ describe "Darkswarm data caching", js: true, caching: true do
toggle_filters
within "#hubs .filter-row" do
within "#hubs .filter-box" do
expect(page).to have_content taxon.name
expect(page).to have_content property.presentation
end
@@ -64,7 +64,7 @@ describe "Darkswarm data caching", js: true, caching: true do
visit shops_path
# Wait for /shops page to load properly before checking for new timestamps
expect(page).to_not have_selector ".row.filter-row"
expect(page).to_not have_selector ".row.filter-box"
taxon_timestamp2 = CacheService.latest_timestamp_by_class(Spree::Taxon)
expect_cached "views/#{CacheService::FragmentCaching.ams_all_taxons[0]}"
@@ -77,7 +77,7 @@ describe "Darkswarm data caching", js: true, caching: true do
toggle_filters
within "#hubs .filter-row" do
within "#hubs .filter-box" do
expect(page).to have_content "Changed Taxon"
expect(page).to have_content "Changed Property"
end

View File

@@ -4833,9 +4833,9 @@ human-signals@^2.1.0:
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
husky@^8.0.0:
version "8.0.2"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236"
integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
iconv-lite@0.4.24:
version "0.4.24"
@@ -5799,9 +5799,9 @@ jquery-ui@1.13.0:
integrity sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==
js-big-decimal@^1.3.5:
version "1.3.13"
resolved "https://registry.yarnpkg.com/js-big-decimal/-/js-big-decimal-1.3.13.tgz#dc41fdda66ecebdc28e145ce82966b8974633b53"
integrity sha512-8kCyYBYRG1Olt8AArrCE/f7h5CdOf4+CIx/AwSEiR7fUoR6rdPQreEuZuAEBiRBYozbfhMXTTexW0/BROsqOOA==
version "1.3.15"
resolved "https://registry.yarnpkg.com/js-big-decimal/-/js-big-decimal-1.3.15.tgz#bb7a3597028cbcd1f0c657c867a287ec8a5f6236"
integrity sha512-M2fwKfclwyz8pjz3Gw7GOoZVChLUhbcdsJs+d6dz8jW1WMydKVGFeBaVfh/yX4+8N6BI9IHZxfNAM+piLhYz/w==
js-tokens@^4.0.0:
version "4.0.0"
@@ -5880,9 +5880,9 @@ json3@^3.3.3:
integrity sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==
json5@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==
version "1.0.2"
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593"
integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==
dependencies:
minimist "^1.2.0"
@@ -6317,16 +6317,11 @@ minimatch@^3.0.4:
dependencies:
brace-expansion "^1.1.7"
minimist@^1.2.0:
minimist@^1.2.0, minimist@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18"
integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==
minimist@^1.2.5:
version "1.2.6"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
minipass-collect@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617"