Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define currency buckets consistently #406

Open
jace opened this issue Oct 25, 2017 · 0 comments
Open

Define currency buckets consistently #406

jace opened this issue Oct 25, 2017 · 0 comments

Comments

@jace
Copy link
Member

jace commented Oct 25, 2017

Hasjob currently defines currency buckets in two places. These two are out of sync. They should either be rewritten to match, or they should be generated from a single source of truth.

pay_graph_buckets = {
'INR': (
range(0, 200000, 25000) +
range(200000, 2000000, 50000) +
range(2000000, 10000000, 100000) +
range(10000000, 100000000, 1000000) +
[100000000]),
'USD': (
range(0, 200000, 5000) +
range(200000, 1000000, 50000) +
range(1000000, 10000000, 100000) +
[10000000])
}
pay_graph_buckets['EUR'] = pay_graph_buckets['USD']
pay_graph_buckets['SGD'] = pay_graph_buckets['USD']
pay_graph_buckets['GBP'] = pay_graph_buckets['USD']

window.Hasjob.PaySlider.range = function(currency){
if (currency === 'INR') {
return {
'min': [0, 5000],
'15%': [100000, 10000],
'30%': [200000, 50000],
'70%': [2000000, 100000],
'85%': [10000000, 1000000],
'max': [100000000]
}
} else {
return {
'min': [0, 5000],
'2%': [200000, 50000],
'10%': [1000000, 100000],
'max': [10000000, 100000]
}
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant