Commit Graph

6 Commits

Author SHA1 Message Date
c21e12e82a Fix ranges for displaying colors in stats email
The specs for [MAILPOET-3324] had a minor error that is fixed by this
commit. The ranges for displaying different colors for the percentage of
clicks should be < 1%, 1-3% and > 3% instead of < 10%, 10-30% and > 30%.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
ee6f081ab2 Add helper function to format the numbers differently in the stats email
This commit adds a helper function that will return a number with two
decimal digits if the number is smaller than 0.1 and will return a
number with one decimal digit if the number is equal to or greater than
0.1. It is used to format the numbers in the stats notification email.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
3700af261f Remove duplication of methods to get stats color
The criteria used to determine the color used for clicked and opened
stats is the same, but we had one method to get the color of each stats.
This commit combines both methods into one to avoid duplication.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
d359c048e3 Fix a bug in clickedStatsColor()
The method clickedStatsColor() should return different color codes
depending on the percentage of clicks (> 30%, < 30% and > 10%, < 10%).
It receives the percentage value as an absolute number. There was a bug
in this method where it was checking for values greater than 3, between
3 and 1, and smaller than 1 instead of greater than 30, between 30 and
  10, and smaller than 10.

[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
509d97c2c0 Change the colors and text used when displaying clicked stats
[MAILPOET-3324]
2022-02-09 15:07:41 +01:00
9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00