Skip to content

Commit

Permalink
chore: Convert some leaf nodes to TS (#4073)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamareebjamal authored Feb 13, 2020
1 parent b62eb5e commit cb6d177
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 4 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/**
* Using a lean list of countries instead of an external dependency.
* All the libraries have a lot of extra data which is of no use to us at this point and unnecessarily takes up more space.
*
* @type {[*]}
*/
export const countries = [
{
Expand Down
File renamed without changes.
36 changes: 36 additions & 0 deletions app/utils/dictionary/filters.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export const getDateRanges = function(this: any) {
return [
{
name : this.l10n.t('All Dates'),
key : 'all_dates'
},
{
name : this.l10n.t('Today'),
key : 'today'
},
{
name : this.l10n.t('Tomorrow'),
key : 'tomorrow'
},
{
name : this.l10n.t('This week'),
key : 'this_week'
},
{
name : this.l10n.t('This Weekend'),
key : 'this_weekend'
},
{
name : this.l10n.t('Next week'),
key : 'next_week'
},
{
name : this.l10n.t('This Month'),
key : 'this_month'
},
{
name : this.l10n.t('Custom dates'),
key : 'custom_dates'
}
];
};
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export const licenses = [
export interface License {
name: string,
link: string,
imageSrc: string,
logoUrl: string | null
}

export const licenses: License[] = [
{
name : 'Attribution-NonCommercial-NoDerivs',
link : 'https://creativecommons.org/licenses/by-nc-nd/4.0',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
export const paymentCountries = ['US', 'AL', 'AR', 'AU', 'AT', 'BE', 'BR', 'CA', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HK', 'HU', 'IE', 'IL', 'IN', 'IT', 'JP', 'LV', 'LT', 'LU', 'MY', 'MT', 'MX', 'NL', 'NZ', 'NO', 'PH', 'PL', 'PT', 'SG', 'SK', 'SI', 'ES', 'SE', 'CH', 'TW', 'GB'];

export const paymentCurrencies = [
export interface PaymentCurrency {
code: string,
symbol: string,
name: string,
paypal: boolean,
stripe: boolean,
alipay: boolean,
omise: boolean,
paytm: boolean
}

export const paymentCurrencies: PaymentCurrency[] = [
{
paypal : true,
code : 'PLN',
Expand Down

0 comments on commit cb6d177

Please sign in to comment.