Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-reporting-dashboard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-reporting-dashboard
Commits
2f8623b7
Commit
2f8623b7
authored
Apr 11, 2019
by
aecres
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Working on details report for revenue-by-dept
parent
7f9fb9c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
revenue-by-dept.adp
lib/revenue-by-dept.adp
+2
-0
revenue-by-dept.tcl
lib/revenue-by-dept.tcl
+17
-0
intranet-reporting-dashboard-create.sql
sql/postgresql/intranet-reporting-dashboard-create.sql
+1
-0
No files found.
lib/revenue-by-dept.adp
View file @
2f8623b7
...
...
@@ -57,6 +57,8 @@ Ext.onReady(function () {
dateFormat: 'j M y',
constraint: false,
step: [Ext.Date.MONTH, 1],
// fromDate: new Date('2019-01-01'),
toDate: new Date('@axis_to_date@'),
label: {rotate: {degrees: 315}}
}],
series: @series_list_json;noquote@
...
...
lib/revenue-by-dept.tcl
View file @
2f8623b7
...
...
@@ -64,9 +64,26 @@ foreach dept $dept_list {
xField: 'Date', yField: '$dept',
axis: 'left',
highlight:
{
size: 7, radius: 7
}
,
listeners:
{
'itemclick': function
(
item, event
)
{
var date = item.value
\[
0
\]
.toISOString
()
.substring
(
0,10
);
var value = item.value
\[
1
\]
;
var dept = item.series.yField
;
var url = '/intranet-reporting-dashboard/revenue-by-dept-details'
;
url = url + '?date='+date
;
url = url +'&dept='+dept +'&dept_sql=
[
im_quotejson
$diagram
_dept_sql
]
'
;
window.open
(
url, '_blank'
);
}
}
,
tips:
{
width: 200, renderer: function
(
storeItem, item
)
{
this.setTitle
(
'$dept:<br>Date: '+storeItem.get
(
'Date'
)
.toISOString
()
.substring
(
0,10
)
+',<br> Revenues: '+storeItem.get
(
'$dept'
));
}}
}
"
}
set series_list_json "
\[\n
[
join
$series
_list
",
\n
"
]
\n
\]
"
# Show Axis only until 1st of current month.
# Everything within the current month is vague,
# because invoices are probably not yet written...
set axis_to_date
[
db_string to_date
"select to_char(now(), 'YYYY-MM-01')"
]
sql/postgresql/intranet-reporting-dashboard-create.sql
View file @
2f8623b7
...
...
@@ -549,3 +549,4 @@ SELECT acs_permission__grant_permission(
(
select
group_id
from
groups
where
group_name
=
'Senior Managers'
),
'read'
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment