Skip to content

Commit

Permalink
Subscription length graph prepared
Browse files Browse the repository at this point in the history
  • Loading branch information
strstensky committed May 19, 2020
1 parent af1026b commit e93e837
Show file tree
Hide file tree
Showing 34 changed files with 444 additions and 87 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.idea
/vendor
composer.lock
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Widgets are small reusable components that can be used on different places withi

#### `SubscribersWithMissingAddressWidget`

![Subscribers with missing address widget](src/docs/subscribers_with_missing_address_widget.png)
![Subscribers with missing address widget](docs/subscribers_with_missing_address_widget.png)

Widget displays list of all subscribers with specified content access that don't have specified address type entered in the system. It is placed at the `admin.payments.top` placeholder, above the payments listing.

Expand Down Expand Up @@ -189,7 +189,7 @@ Response:

Admin dashboard stats graph widget.

![alt text](docs/_static/registration_source_active_subscription.png "ActualSubscribersRegistrationSourceStatsWidget")
![alt text](docs/registration_source_active_subscription.png "ActualSubscribersRegistrationSourceStatsWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/ActualSubscribersRegistrationSourceStatsWidget/ActualSubscribersRegistrationSourceStatsWidget.php#L1)

Expand All @@ -199,7 +199,7 @@ Admin dashboard stats graph widget.

Admin dashboard stats widget.

![alt text](docs/_static/active_subscribers.png "ActualSubscribersStatWidget")
![alt text](docs/active_subscribers.png "ActualSubscribersStatWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/ActualSubscribersStatWidget/ActualSubscribersStatWidget.php#L1)

Expand All @@ -209,7 +209,7 @@ Admin dashboard stats widget.

Admin user listing component.

![alt text](docs/_static/actual_subscription.png "ActualSubscriptionLabel")
![alt text](docs/actual_subscription.png "ActualSubscriptionLabel")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/ActualSubscriptionLabel/ActualSubscriptionLabel.php#L1)

Expand All @@ -225,7 +225,7 @@ Admin dashboard actual subscriptions count widget.

Admin user detail stats widget.

![alt text](docs/_static/user_actual_subscriptions.png "ActualUserSubscriptions")
![alt text](docs/user_actual_subscriptions.png "ActualUserSubscriptions")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/ActualUserSubscriptions/ActualUserSubscriptions.php#L1)

Expand All @@ -235,7 +235,7 @@ Admin user detail stats widget.

Admin ending subscriptions listing widget.

![alt text](docs/_static/ending_subscriptions.png "EndingSubscriptionsWidget")
![alt text](docs/ending_subscriptions.png "EndingSubscriptionsWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/EndingSubscriptionsWidget/EndingSubscriptionsWidget.php#L1)

Expand All @@ -245,7 +245,7 @@ Admin ending subscriptions listing widget.

Admin users header graph widget.

![alt text](docs/_static/subscriptions_graph.png "MonthSubscriptionsSmallBarGraphWidget")
![alt text](docs/subscriptions_graph.png "MonthSubscriptionsSmallBarGraphWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/MonthSubscriptionsSmallBarGraphWidget/MonthSubscriptionsSmallBarGraphWidget.php#L1)

Expand All @@ -255,7 +255,7 @@ Admin users header graph widget.

Admin dashboard single stat widget.

![alt text](docs/_static/new_subscriptions.png "MonthSubscriptionStatWidget")
![alt text](docs/new_subscriptions.png "MonthSubscriptionStatWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/MonthSubscriptionStatWidget/MonthSubscriptionsStatWidget.php#L1)

Expand All @@ -269,7 +269,7 @@ Admin dashboard single stat widget.

Admin payments listing header widget.

![alt text](docs/_static/subscribers_with_missing_address.png "PrintSubscribersWithoutPrintAddressWidget")
![alt text](docs/subscribers_with_missing_address.png "PrintSubscribersWithoutPrintAddressWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/PrintSubscribersWithoutPrintAddressWidget/SubscribersWithMissingAddressWidget.php#L1)

Expand All @@ -279,7 +279,7 @@ Admin payments listing header widget.

Admin dashboard stats widget.

![alt text](docs/_static/ending_subscriptions_1.png "RenewedSubscriptionsEndingWithinPeriodWidget")
![alt text](docs/ending_subscriptions_1.png "RenewedSubscriptionsEndingWithinPeriodWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/RenewedSubscriptionsEndingWithinPeriodWidget/RenewedSubscriptionsEndingWithinPeriodWidget.php#L1)

Expand All @@ -289,7 +289,7 @@ Admin dashboard stats widget.

Admin listing edit subscription button widget.

![alt text](docs/_static/edit_subscription_btn.png "SubscriptionButton")
![alt text](docs/edit_subscription_btn.png "SubscriptionButton")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/SubscriptionButton/SubscriptionButton.php#L1)

Expand All @@ -299,7 +299,7 @@ Admin listing edit subscription button widget.

Admin ending subscriptions types and content access listing component.

![alt text](docs/_static/ending_subscriptions_table.png "SubscriptionEndsStats")
![alt text](docs/ending_subscriptions_table.png "SubscriptionEndsStats")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/SubscriptionEndsStats/SubscriptionEndsStats.php#L1)

Expand All @@ -309,7 +309,7 @@ Admin ending subscriptions types and content access listing component.

Admin dashboard ending subscriptions stats widget.

![alt text](docs/_static/ending_within_period.png "SubscriptionsEndingWithinPeriodWidget")
![alt text](docs/ending_within_period.png "SubscriptionsEndingWithinPeriodWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/SubscriptionsEndingWithinPeriodWidget/SubscriptionsEndingWithinPeriodWidget.php#L1)

Expand All @@ -319,7 +319,7 @@ Admin dashboard ending subscriptions stats widget.

Admin dashboard single stat widget.

![alt text](docs/_static/new_subscriptions_today.png "TodaySubscriptionsStatWidget")
![alt text](docs/new_subscriptions_today.png "TodaySubscriptionsStatWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/TodaySubscriptionsStatWidget/TodaySubscriptionsStatWidget.php#L1)

Expand All @@ -329,7 +329,7 @@ Admin dashboard single stat widget.

Admin dashboard single stat widget.

![alt text](docs/_static/total_subscriptions.png "TotalSubscriptionsStatWidget")
![alt text](docs/total_subscriptions.png "TotalSubscriptionsStatWidget")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/TotalSubscriptionsStatWidget/TotalSubscriptionsStatWidget.php#L1)

Expand All @@ -339,7 +339,7 @@ Admin dashboard single stat widget.

Admin user detail subscriptions listing widget.

![alt text](docs/_static/user_subscriptions.png "UserSubscriptions")
![alt text](docs/user_subscriptions.png "UserSubscriptions")

[Source code](https://github.com/remp2020/crm-subscriptions-module/blob/7f5c0f97ad3b0effc0d49326fb35dabcad300d98/src/components/UserSubscriptions/UserSubscriptionsListing.php#L1)

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
<div class="row text-success">
<div class="col-md-2">
<p>
<strong>{_dashboard.time.today}: </strong> {$subscriptionsRenewedToday} ks
<strong>{_dashboard.time.today}: </strong> {$subscriptionsRenewedToday} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.tomorrow}: </strong> {$subscriptionsRenewedTomorow} ks
<strong>{_dashboard.time.tomorrow}: </strong> {$subscriptionsRenewedTomorow} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('tomorrow')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.after_tomorrow}: </strong> {$subscriptionsRenewedAfterTomorow} ks
<strong>{_dashboard.time.after_tomorrow}: </strong> {$subscriptionsRenewedAfterTomorow} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('+2 day')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.seven_days}: </strong> {$subscriptionsRenewedInOneWeek} ks
<strong>{_dashboard.time.seven_days}: </strong> {$subscriptionsRenewedInOneWeek} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+7 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.fourteen_days}: </strong> {$subscriptionsRenewedInTwoWeeks} ks
<strong>{_dashboard.time.fourteen_days}: </strong> {$subscriptionsRenewedInTwoWeeks} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+14 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.thirtyone_days}: </strong> {$subscriptionsRenewedInOneMonth} ks
<strong>{_dashboard.time.thirtyone_days}: </strong> {$subscriptionsRenewedInOneMonth} {_system.pcs}
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.renewed.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+31 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
<div class="row text-warning">
<div class="col-md-2">
<p>
<strong>{_dashboard.time.today}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('today'))}">{$subscriptionsEndToday} ks</a>
<strong>{_dashboard.time.today}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('today'))}">{$subscriptionsEndToday} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.tomorrow}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('tomorrow')), endTime => date('Y-m-d 23:59:59', strtotime('+1 days'))}">{$subscriptionsEndTomorow} ks</a>
<strong>{_dashboard.time.tomorrow}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('tomorrow')), endTime => date('Y-m-d 23:59:59', strtotime('+1 days'))}">{$subscriptionsEndTomorow} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('tomorrow')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.after_tomorrow}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('+2 days')), endTime => date('Y-m-d 23:59:59', strtotime('+2 days'))}">{$subscriptionsEndAfterTomorow} ks</a>
<strong>{_dashboard.time.after_tomorrow}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('+2 days')), endTime => date('Y-m-d 23:59:59', strtotime('+2 days'))}">{$subscriptionsEndAfterTomorow} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('+2 day')) } 00:00:00 - 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.seven_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+7 days'))}">{$subscriptionsEndInOneWeek} ks</a>
<strong>{_dashboard.time.seven_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+7 days'))}">{$subscriptionsEndInOneWeek} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+7 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.fourteen_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+14 days'))}">{$subscriptionsEndInTwoWeeks} ks</a>
<strong>{_dashboard.time.fourteen_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+14 days'))}">{$subscriptionsEndInTwoWeeks} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+14 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>

<div class="col-md-2">
<p>
<strong>{_dashboard.time.thirtyone_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+31 days'))}">{$subscriptionsEndInOneMonth} ks</a>
<strong>{_dashboard.time.thirtyone_days}: </strong> <a class="text-warning" style="text-decoration: underline;" href="{plink :Subscriptions:SubscriptionsEnds:default startTime => date('Y-m-d 00:00:00', strtotime('today')), endTime => date('Y-m-d 23:59:59', strtotime('+31 days'))}">{$subscriptionsEndInOneMonth} {_system.pcs}</a>
<i data-toggle="tooltip" data-placement="top" title="{_dashboard.subscriptions.ending.between.tooltip} {php echo date('d.m.Y', strtotime('today')) } 00:00:00 - {php echo date('d.m.Y', strtotime('+31 days')) } 23:59:59" class="fa fa-question-circle"></i>
</p>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/config/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
- Crm\SubscriptionsModule\Forms\SubscriptionFormFactory
- Crm\SubscriptionsModule\Forms\SubscriptionsGeneratorFormFactory
- Crm\SubscriptionsModule\Forms\SubscriptionTypeItemsFormFactory
- Crm\SubscriptionsModule\Forms\SubscriptionTypeMetaFormFactory
- Crm\SubscriptionsModule\Generator\SubscriptionsGenerator
- Crm\SubscriptionsModule\Components\SubscriptionButton
- Crm\SubscriptionsModule\Components\ActualUserSubscriptions
Expand Down
13 changes: 13 additions & 0 deletions src/dataproviders/SubscriptionTypeFormProviderInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Crm\SubscriptionsModule\DataProvider;

use Crm\ApplicationModule\DataProvider\DataProviderInterface;
use Nette\Application\UI\Form;

interface SubscriptionTypeFormProviderInterface extends DataProviderInterface
{
public function provide(array $params): Form;

public function formSucceeded($form, $values);
}
Loading

0 comments on commit e93e837

Please sign in to comment.