From faa72b61abe9c92214dd87ecc983831ef5e1ac27 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 29 Nov 2023 09:38:00 +0100 Subject: [PATCH] MOL-1277: fix wrong syntax in OrderLifeTimeLimitDetectorService.js (#661) --- .../OderLifeTimeLimitDetectorService.js | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-pluginconfig-section-order-lifetime-warning/services/OderLifeTimeLimitDetectorService.js b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-pluginconfig-section-order-lifetime-warning/services/OderLifeTimeLimitDetectorService.js index f842a1264..dab4604a8 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/components/mollie-pluginconfig-section-order-lifetime-warning/services/OderLifeTimeLimitDetectorService.js +++ b/src/Resources/app/administration/src/module/mollie-payments/components/mollie-pluginconfig-section-order-lifetime-warning/services/OderLifeTimeLimitDetectorService.js @@ -1,13 +1,29 @@ export default class OrderLifeTimeLimitsDetector { - maximumOrderLifeTimeKlarna = 28; - maximumOrderLifeTime = 100; + /** + * + */ + constructor() { + this.maximumOrderLifeTimeKlarna = 28; + this.maximumOrderLifeTime = 100; + } + + /** + * + * @param orderLifeTime + * @returns {boolean} + */ isOderLifeTimeLimitReached(orderLifeTime) { return orderLifeTime > this.maximumOrderLifeTime; } + /** + * + * @param orderLifeTime + * @returns {boolean} + */ isKlarnaOrderLifeTimeReached(orderLifeTime) { return orderLifeTime > this.maximumOrderLifeTimeKlarna && orderLifeTime <= this.maximumOrderLifeTime; } -} \ No newline at end of file +}