Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
commerce
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
commerce
Commits
592c5ffd
Commit
592c5ffd
authored
1 year ago
by
Jonathan Sacksick
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3447901
by nsalves: Dashboard metrics form returns wrong date for "This week" filter.
parent
83f462eb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Pipeline
#176877
passed with warnings
1 year ago
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
css/commerce.form-layout.css
+2
-2
2 additions, 2 deletions
css/commerce.form-layout.css
modules/order/src/Form/DashboardMetricsForm.php
+5
-0
5 additions, 0 deletions
modules/order/src/Form/DashboardMetricsForm.php
with
7 additions
and
2 deletions
css/commerce.form-layout.css
+
2
−
2
View file @
592c5ffd
...
...
@@ -3,8 +3,8 @@
*/
:root
{
--commerce--layout-sidebar-width
:
22.5rem
;
--commerce--layout-content-max-width
:
52rem
;
--commerce--layout-sidebar-width
:
min
(
960px
,
100%
)
;
--commerce--layout-content-max-width
:
min
(
1088px
,
100%
)
;
}
.layout-region
{
...
...
This diff is collapsed.
Click to expand it.
modules/order/src/Form/DashboardMetricsForm.php
+
5
−
0
View file @
592c5ffd
...
...
@@ -140,6 +140,11 @@ class DashboardMetricsForm extends FormBase {
'month'
=>
new
DrupalDateTime
(
'first day of this month'
),
'year'
=>
new
DrupalDateTime
(
'first day of january this year'
),
];
// In case the first day of the week is sunday, the "week" date time object
// can be instantiated for the wrong week.
if
(
$periods
[
'week'
]
>
$periods
[
'day'
]){
$periods
[
'week'
]
=
new
DrupalDateTime
(
sprintf
(
'%s last week'
,
$first_day_of_week
));
}
$periods
=
array_map
(
function
(
DrupalDateTime
$date
)
use
(
$active_store
)
{
$date
->
setTime
(
0
,
0
,
0
);
if
(
$active_store
instanceof
StoreInterface
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment