-
Notifications
You must be signed in to change notification settings - Fork 117
[IMP] website_sale: design ecommerce dashboard #4833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ldau-odoo
wants to merge
1
commit into
master-awesome-ecommerce-dashboard-nipl
Choose a base branch
from
master-awesome-ecommerce-dashboard-ldau
base: master-awesome-ecommerce-dashboard-nipl
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+209
−121
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...bsite_sale/static/src/js/website_sale_dashboard/date_filter_button/date_filter_button.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
addons/website_sale/static/src/js/website_sale_dashboard/website_sale_dashboard.dark.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| .o_dashboard_card { | ||
| --DashboardCard__purple-bg-color: #{$purple-200}; | ||
| --DashboardCard__purple-bg-color--active: #{$purple-300}; | ||
| --DashboardCard__orange-bg-color: #{$orange-200}; | ||
| --DashboardCard__orange-bg-color--active: #{$orange-300}; | ||
| --DashboardCard__cyan-bg-color: #{$cyan-200}; | ||
| --DashboardCard__cyan-bg-color--active: #{$cyan-300}; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
131 changes: 75 additions & 56 deletions
131
addons/website_sale/static/src/js/website_sale_dashboard/website_sale_dashboard.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,73 +1,92 @@ | ||
| .o_dashboard_card { | ||
| min-width: 120px; | ||
| min-height: 90px; | ||
| align-content: center; | ||
| } | ||
| // flex-basis: 33%; | ||
|
|
||
| .o_purple_card { | ||
| background-color: $purple-300; | ||
| } | ||
| // @include media-breakpoint-up(md) { | ||
| // max-width: 8rem; | ||
| // } | ||
|
|
||
| .o_orange_card { | ||
| background-color: $orange-300; | ||
| } | ||
| $dashboard-colors: ( | ||
| purple: ( | ||
| bg: var(--DashboardCard__purple-bg-color, #{$purple-100}), | ||
| bg-active: var(--DashboardCard__purple-bg-color--active, #{$purple-200}), | ||
| color: var(--DashboardCard__purple-color, #{$purple-600}), | ||
| color-active: var(--DashboardCard__purple-color--active, #{$purple-800}), | ||
| ), | ||
| cyan: ( | ||
| bg: var(--DashboardCard__cyan-bg-color, #{$cyan-100}), | ||
| bg-active: var(--DashboardCard__cyan-bg-color--active, #{$cyan-200}), | ||
| color: var(--DashboardCard__cyan-color, #{$cyan-700}), | ||
| color-active: var(--DashboardCard__cyan-color--active, #{$cyan-800}), | ||
| ), | ||
| orange: ( | ||
| bg: var(--DashboardCard__orange-bg-color, #{$orange-100}), | ||
| bg-active: var(--DashboardCard__orange-bg-color--active, #{$orange-200}), | ||
| color: var(--DashboardCard__orange-color, #{$orange-700}), | ||
| color-active: var(--DashboardCard__orange-color--active, #{$orange-800}), | ||
| ), | ||
| ); | ||
|
|
||
| .o_blue_card { | ||
| background-color: $blue-300; | ||
| } | ||
| @each $name, $states in $dashboard-colors { | ||
| &.o_dashboard_card_#{$name} { | ||
| --btn-bg: #{map-get($states, bg)}; | ||
| --btn-hover-bg: #{map-get($states, bg-active)}; | ||
| --btn-active-bg: #{map-get($states, bg-active)}; | ||
| --btn-active-border-color: transparent; | ||
|
|
||
| @media (max-width: 768px) { | ||
| .o_website_sale_dashboard { | ||
| flex-direction: column !important; | ||
| align-items: center !important; | ||
| justify-content: center !important; | ||
| gap: 1.5rem !important; | ||
| } | ||
| .o_dashboard_card_data { | ||
| color: #{map-get($states, color)}; | ||
| } | ||
|
|
||
| /* Left Section: 3 cards in one row */ | ||
| .o_left_section { | ||
| flex-direction: row !important; | ||
| justify-content: center !important; | ||
| flex-wrap: wrap !important; | ||
| gap: 1rem !important; | ||
| } | ||
| &.active { | ||
| outline: $border-width $border-style #{map-get($states, color-active)}; | ||
| outline-offset: $border-width; | ||
|
|
||
| /* Right Section: DateFilterButton first, then metrics in one row */ | ||
| .o_right_section { | ||
| flex-direction: column !important; | ||
| align-items: center !important; | ||
| justify-content: center !important; | ||
| gap: 1rem !important; | ||
| .o_dashboard_card_data { | ||
| color: #{map-get($states, color-active)}; | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| .o_date_filter_wrapper { | ||
| order: -1; | ||
| justify-content: center !important; | ||
| width: 100% !important; | ||
| margin-bottom: 0.5rem !important; | ||
| } | ||
| .o_dashboard_card_evolution { | ||
| font-size: .75rem; | ||
| } | ||
|
|
||
| .o_cards_container { | ||
| flex-direction: row !important; | ||
| justify-content: center !important; | ||
| flex-wrap: wrap !important; | ||
| gap: 0.8rem !important; | ||
| .o_date_filter_wrapper { | ||
| @include media-breakpoint-up(md) { | ||
| border-right: $border-width $border-style $border-color; | ||
| background: transparent !important; | ||
| } | ||
| } | ||
|
|
||
| /* Card Sizing */ | ||
| .o_dashboard_card { | ||
| width: 90px !important; | ||
| max-width: 130px !important; | ||
| text-align: center !important; | ||
| } | ||
| .o_website_sale_dashboard { | ||
| background-color: $o-control-panel-background-color; | ||
|
|
||
| /* Font Adjustments */ | ||
| .o_dashboard_card_data { | ||
| font-size: 1.1rem !important; | ||
| @include media-breakpoint-up(md) { | ||
| border-bottom: $border-width $border-style $border-color; | ||
| } | ||
|
|
||
| .o_dashboard_card_text { | ||
| margin-top: 4px; | ||
| font-size: 0.7rem !important; | ||
| .o_kanban_renderer { | ||
| &.o_kanban_grouped, &.o_kanban_ungrouped { | ||
| min-height: auto; // override min-height: 100% | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // html .o_web_client > .o_action_manager > [class*="o_website_sale_dashboard"] { | ||
| // .o_content { | ||
| // height: calc(100% - 4rem); | ||
| // } | ||
|
|
||
| // .o_renderer { | ||
| // @include media-breakpoint-up(lg) { | ||
| // height: calc(100% - 6.75rem); | ||
| // min-height: calc(100% - 6.75rem); | ||
| // } | ||
|
|
||
| // height: calc(100% - 6rem); | ||
| // min-height: calc(100% - 6rem); | ||
| // overflow: auto; | ||
| // } | ||
| // } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of comparing with the searchModel's filters, maybe you can properly maintain the state variable and compare it.
So basically state variable will contain a subset of searchModel items (only with type filters), and you use that state variable to compare with the
filtersarray in here.