Skip to content

Commit

Permalink
Merge branch 'release/33.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
einpraegsam committed Sep 7, 2023
2 parents 8bf9ec7 + f038a6e commit a0bf207
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 16 deletions.
17 changes: 11 additions & 6 deletions Classes/Domain/DataProvider/LeadsPerTimeDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ class LeadsPerTimeDataProvider extends AbstractDynamicFilterDataProvider
/**
* Set values like:
* [
* 'amounts' => [
* 50,
* 88,
* 33
* 'amounts' => [ // new visitors
* 3,
* 5,
* 9,
* ],
* 'amounts2' => [ // existing visitors
* 10,
* 8,
* 14,
* ],
* 'titles' => [
* 'January',
Expand All @@ -41,8 +46,8 @@ public function prepareData(): void
$interval['end']
);

// Any visitors
$this->data['amounts2'][] = $visitorRepository->findAmountOfVisitorsInTimeFrame(
// Existing visitors
$this->data['amounts2'][] = $visitorRepository->findAmountOfExistingVisitorsInTimeFrame(
$interval['start'],
$interval['end']
);
Expand Down
7 changes: 7 additions & 0 deletions Classes/Domain/Repository/VisitorRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ public function findAmountOfVisitorsInTimeFrame(DateTime $start, DateTime $end):
return count($rows);
}

public function findAmountOfExistingVisitorsInTimeFrame(DateTime $start, DateTime $end): int
{
$newVisitors = $this->findAmountOfNewVisitorsInTimeFrame($start, $end);
$allVisitors = $this->findAmountOfVisitorsInTimeFrame($start, $end);
return $allVisitors - $newVisitors;
}

public function findAmountOfNewVisitorsInTimeFrame(DateTime $start, DateTime $end): int
{
$sql = 'select count(uid) from ' . Visitor::TABLE_NAME
Expand Down
1 change: 1 addition & 0 deletions Documentation/Technical/Changelog/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

| Version | Date | State | TYPO3 | Description |
|------------|------------|----------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 33.3.0 | 2023-09-07 | Feature | `11.5 + 12.4` | Update diagram of existing leads to a double bar chart diagram for better readability |
| 33.2.1 | 2023-08-20 | Bugfix | `11.5 + 12.4` | Toggle page overview diagrams: Should also save status when clicking on the small arrow icon |
| 33.2.0 | 2023-08-20 | Feature | `11.5 + 12.4` | Make toggle function in backend more generic, so it can be used for more functions in future |
| 33.1.1 | 2023-08-20 | Bugfix | `11.5 + 12.4` | Show pagetree in link wizard for LinkListeners, to select a page if storage PID != 0, allow to store LinkListener records on normal pages |
Expand Down
28 changes: 25 additions & 3 deletions Resources/Private/Build/JavaScript/Backend/Diagram.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,37 @@ define(['jquery', 'TYPO3/CMS/Lux/Vendor/Chart.min'], function($) {
data: element.getAttribute('data-chart-databottom').split(','),
backgroundColor: [
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)'
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
'rgba(2, 122, 202, 1)',
]
},
{
label: element.getAttribute('data-chart-labeltop'),
data: element.getAttribute('data-chart-datatop').split(','),
backgroundColor: [
'rgba(221, 221, 221, 1)',
'rgba(221, 221, 221, 1)'
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
'rgba(242, 182, 2, 1)',
]
}
],
Expand Down
4 changes: 4 additions & 0 deletions Resources/Private/Language/de.locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1851,6 +1851,10 @@
<source>New leads</source>
<target state="translated">Neue Leads</target>
</trans-unit>
<trans-unit id="module.leadlist.box.timeframes.label.existing">
<source>Recurring leads</source>
<target state="translated">Wiederkehrende Leads</target>
</trans-unit>
<trans-unit id="module.leadlist.box.timeframes.label.any">
<source>Any leads</source>
<target state="translated">Alle Leads</target>
Expand Down
3 changes: 3 additions & 0 deletions Resources/Private/Language/locallang_db.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,9 @@
<trans-unit id="module.leadlist.box.timeframes.label.new">
<source>New leads</source>
</trans-unit>
<trans-unit id="module.leadlist.box.timeframes.label.existing">
<source>Recurring leads</source>
</trans-unit>
<trans-unit id="module.leadlist.box.timeframes.label.any">
<source>Any leads</source>
</trans-unit>
Expand Down
10 changes: 5 additions & 5 deletions Resources/Private/Partials/Box/Leads/TimeFrames.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ <h3 class="panel-title">
<div>
<canvas width="750"
height="350"
data-chart="line"
data-chart-data="{visitorsPerTimeData.amountsList}"
data-chart-data2="{visitorsPerTimeData.amounts2List}"
data-chart-label="{f:translate(key:'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:module.leadlist.box.timeframes.label.new')}"
data-chart-label2="{f:translate(key:'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:module.leadlist.box.timeframes.label.any')}"
data-chart="bardouble"
data-chart-databottom="{visitorsPerTimeData.amountsList}"
data-chart-datatop="{visitorsPerTimeData.amounts2List}"
data-chart-labelbottom="{f:translate(key:'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:module.leadlist.box.timeframes.label.new')}"
data-chart-labeltop="{f:translate(key:'LLL:EXT:lux/Resources/Private/Language/locallang_db.xlf:module.leadlist.box.timeframes.label.existing')}"
data-chart-labels="{visitorsPerTimeData.titlesList}"></canvas>
</div>
</f:then>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Public/JavaScript/Lux/Diagram.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
'description' => 'Living User Experience - LUX - the Marketing Automation tool for TYPO3.
Turn your visitors to leads. Identification and profiling of your visitors within your TYPO3 website.',
'category' => 'plugin',
'version' => '33.2.1',
'version' => '33.3.0',
'author' => 'Alex Kellner',
'author_email' => '[email protected]',
'author_company' => 'in2code.de',
Expand Down

0 comments on commit a0bf207

Please sign in to comment.