|
|
|
@ -4,6 +4,7 @@ import { CacheService } from '@ghostfolio/client/services/cache.service';
|
|
|
|
|
import { DataService } from '@ghostfolio/client/services/data.service';
|
|
|
|
|
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
|
|
|
|
import {
|
|
|
|
|
ghostfolioPrefix,
|
|
|
|
|
PROPERTY_COUPONS,
|
|
|
|
|
PROPERTY_CURRENCIES,
|
|
|
|
|
PROPERTY_IS_READ_ONLY_MODE,
|
|
|
|
@ -97,7 +98,10 @@ export class AdminOverviewComponent implements OnDestroy, OnInit {
|
|
|
|
|
public onAddCoupon() {
|
|
|
|
|
const coupons = [
|
|
|
|
|
...this.coupons,
|
|
|
|
|
{ code: this.generateCouponCode(16), duration: this.couponDuration }
|
|
|
|
|
{
|
|
|
|
|
code: `${ghostfolioPrefix}${this.generateCouponCode(14)}`,
|
|
|
|
|
duration: this.couponDuration
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
this.putAdminSetting({ key: PROPERTY_COUPONS, value: coupons });
|
|
|
|
|
}
|
|
|
|
|