Feature/add prefix to coupon codes (#1562)
* Add prefix * Update changelog
This commit is contained in:
parent
d97fe4da9c
commit
8818e09be8
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added a prefix to the codes of the coupon system
|
||||||
|
|
||||||
## 1.222.0 - 2022-12-29
|
## 1.222.0 - 2022-12-29
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -4,6 +4,7 @@ import { CacheService } from '@ghostfolio/client/services/cache.service';
|
|||||||
import { DataService } from '@ghostfolio/client/services/data.service';
|
import { DataService } from '@ghostfolio/client/services/data.service';
|
||||||
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
import { UserService } from '@ghostfolio/client/services/user/user.service';
|
||||||
import {
|
import {
|
||||||
|
ghostfolioPrefix,
|
||||||
PROPERTY_COUPONS,
|
PROPERTY_COUPONS,
|
||||||
PROPERTY_CURRENCIES,
|
PROPERTY_CURRENCIES,
|
||||||
PROPERTY_IS_READ_ONLY_MODE,
|
PROPERTY_IS_READ_ONLY_MODE,
|
||||||
@ -97,7 +98,10 @@ export class AdminOverviewComponent implements OnDestroy, OnInit {
|
|||||||
public onAddCoupon() {
|
public onAddCoupon() {
|
||||||
const coupons = [
|
const coupons = [
|
||||||
...this.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 });
|
this.putAdminSetting({ key: PROPERTY_COUPONS, value: coupons });
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,8 @@ import ms from 'ms';
|
|||||||
|
|
||||||
export const DEMO_USER_ID = '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f';
|
export const DEMO_USER_ID = '9b112b4d-3b7d-4bad-9bdd-3b0f7b4dac2f';
|
||||||
|
|
||||||
export const ghostfolioScraperApiSymbolPrefix = '_GF_';
|
export const ghostfolioPrefix = 'GF';
|
||||||
|
export const ghostfolioScraperApiSymbolPrefix = `_${ghostfolioPrefix}_`;
|
||||||
export const ghostfolioCashSymbol = `${ghostfolioScraperApiSymbolPrefix}CASH`;
|
export const ghostfolioCashSymbol = `${ghostfolioScraperApiSymbolPrefix}CASH`;
|
||||||
export const ghostfolioFearAndGreedIndexDataSource = DataSource.RAPID_API;
|
export const ghostfolioFearAndGreedIndexDataSource = DataSource.RAPID_API;
|
||||||
export const ghostfolioFearAndGreedIndexSymbol = `${ghostfolioScraperApiSymbolPrefix}FEAR_AND_GREED_INDEX`;
|
export const ghostfolioFearAndGreedIndexSymbol = `${ghostfolioScraperApiSymbolPrefix}FEAR_AND_GREED_INDEX`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user