diff --git a/addons/lunch/__manifest__.py b/addons/lunch/__manifest__.py index 1142e121292..3d4c5589bc9 100644 --- a/addons/lunch/__manifest__.py +++ b/addons/lunch/__manifest__.py @@ -48,7 +48,6 @@ If you want to save your employees' time and avoid them to always have coins in 'lunch/static/src/views/*.js', 'lunch/static/src/scss/lunch_view.scss', 'lunch/static/src/scss/lunch_kanban.scss', - 'lunch/static/src/scss/lunch_list.scss', ], 'web.assets_tests': [ 'lunch/static/tests/tours/*.js', diff --git a/addons/lunch/static/src/components/lunch_dashboard.js b/addons/lunch/static/src/components/lunch_dashboard.js index b748c7b0082..307c9002bf2 100644 --- a/addons/lunch/static/src/components/lunch_dashboard.js +++ b/addons/lunch/static/src/components/lunch_dashboard.js @@ -29,7 +29,7 @@ export class LunchOrderLine extends Component { } get badgeClass() { - const mapping = {'new': 'bg-warning', 'confirmed': 'bg-success', 'sent': 'bg-info', 'ordered': 'bg-danger'}; + const mapping = {'new': 'warning', 'confirmed': 'success', 'sent': 'info', 'ordered': 'danger'}; return mapping[this.line.raw_state]; } diff --git a/addons/lunch/static/src/components/lunch_dashboard.xml b/addons/lunch/static/src/components/lunch_dashboard.xml index 7778036efc2..c4040c4712f 100644 --- a/addons/lunch/static/src/components/lunch_dashboard.xml +++ b/addons/lunch/static/src/components/lunch_dashboard.xml @@ -9,23 +9,23 @@ -
-
+
+
- + - +
    -
  • +
  • @@ -42,7 +42,7 @@ -
    +
    -
    +
    -
    +
    @@ -87,26 +87,26 @@ location="location" onUpdateLunchLocation.bind="onUpdateLunchLocation"/> -
    +
    Your Account
    -
    -

    +
    +

    Your Order

    -
      +
    -
    -

    +
    +

    Total diff --git a/addons/lunch/static/src/scss/lunch_kanban.scss b/addons/lunch/static/src/scss/lunch_kanban.scss index ca1aa4eb3cc..403c962da12 100644 --- a/addons/lunch/static/src/scss/lunch_kanban.scss +++ b/addons/lunch/static/src/scss/lunch_kanban.scss @@ -1,7 +1,6 @@ .o_lunch_content { .o_kanban_renderer { - flex: 1 1 100%; - &.o_kanban_grouped { + &.o_kanban_grouped, &.o_kanban_ungrouped { min-height: auto; // override min-height: 100% } } diff --git a/addons/lunch/static/src/scss/lunch_list.scss b/addons/lunch/static/src/scss/lunch_list.scss deleted file mode 100644 index b0afa58aeaf..00000000000 --- a/addons/lunch/static/src/scss/lunch_list.scss +++ /dev/null @@ -1,11 +0,0 @@ -.o_lunch_content { - .o_list_button { - width: 1px; - } - - .o_lunch_list_view { - td:last-child { - padding-right: 16px; - } - } -} \ No newline at end of file diff --git a/addons/lunch/static/src/scss/lunch_view.scss b/addons/lunch/static/src/scss/lunch_view.scss index 3e91f7b0795..987bd28dd3a 100644 --- a/addons/lunch/static/src/scss/lunch_view.scss +++ b/addons/lunch/static/src/scss/lunch_view.scss @@ -1,77 +1,5 @@ -.o_lunch_content { - display: flex; - flex-direction: column; // display lunch widget above kanban renderer - flex: 1 1 100%; // displayed to the right of the searchPanel - min-width: 0; // prevent grouped kanban from horizontally overflowing - max-width: 100%; - height: 100%; - .o_lunch_banner { - flex: 0 0 auto; - border-bottom: 1px solid #CED4DA; - background-color: white; - } - - .o_flex_basis_0 { - flex-basis: 0; - } - - .o_lunch_widget { - min-height: 90px; - max-height: 33vh; - overflow-y: auto; - - .o_lunch_widget_info.card { - &, .card-title, .card-body { - color: $o-main-text-color; - background-color: inherit !important; - } - - .card-title { - font-weight: bold; - margin-bottom: 0; - } - - .card-body { - padding: 0.5rem 1rem; - } - - .btn-link { - padding: 0; - &.o_lunch_open_wizard { - color: $o-main-text-color; - font-weight: normal; - } - } - } - } -} - -.o_lunch_image { - img { - max-width: 128px; - max-height: 128px !important; - } -} - -@include media-breakpoint-down(md) { - .o_lunch_content { - details summary { - // Hide the caret. For details see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary - list-style-type: none; - &::-webkit-details-marker { - display: none - } - } - .o_lunch_widget { - max-height: 100% - } - } -} - -.o_lunch_wizard { - .col-10 { - .o_form_label { - font-weight: normal !important; - } - } +.o_lunch_widget_lines{ + //calculation to display the number of lines to show before scrolling + $-entry-height: calc(#{$font-size-base * $line-height-base} + (#{map-get($spacers, 1)} * 2)); + max-height: calc(#{$-entry-height} * 4.5); // if we want 4 entries with the 5th row visible } diff --git a/addons/lunch/static/src/views/kanban.xml b/addons/lunch/static/src/views/kanban.xml index d4b7f837f5a..200f8520a7e 100644 --- a/addons/lunch/static/src/views/kanban.xml +++ b/addons/lunch/static/src/views/kanban.xml @@ -1,7 +1,7 @@ -
    +
    diff --git a/addons/lunch/static/tests/lunch_list_tests.js b/addons/lunch/static/tests/lunch_list_tests.js index 8200013f829..5577440d036 100644 --- a/addons/lunch/static/tests/lunch_list_tests.js +++ b/addons/lunch/static/tests/lunch_list_tests.js @@ -109,7 +109,7 @@ QUnit.module('LunchListView', { "should have a 'classical list view' column"); assert.hasClass(list.$('.o_legacy_list_view'), 'o_lunch_list_view', "should have classname 'o_lunch_list_view'"); - assert.containsOnce(list, '.o_lunch_content > span > .o_lunch_banner', + assert.containsOnce(list, '.o_lunch_content > .o_lunch_banner', "should have a 'lunch' banner"); const $alertMessage = list.$('.alert > *'); diff --git a/addons/lunch/views/lunch_orders_views.xml b/addons/lunch/views/lunch_orders_views.xml index a6b05af3ebd..e3586b44ae3 100644 --- a/addons/lunch/views/lunch_orders_views.xml +++ b/addons/lunch/views/lunch_orders_views.xml @@ -224,49 +224,49 @@
    -
    -
    - +
    +
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    - +
    +
    -
    -