Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 8a3c8133 authored by Celeste Robert's avatar Celeste Robert
Browse files

feat: price ranges for competitors

parent 757a3a16
No related branches found
No related tags found
1 merge request!121Resolve "add gitlab pricing on comparator"
Pipeline #46578 passed
......@@ -44,17 +44,20 @@ function getPrices(users, paidAnnually, labCompetitor, chatCompetitor) {
.reverse()
.find(plan => plan.users <= users);
let labCompetitorParsed = labCompetitor.plans.find(plan => plan.users <= users);
if (paidAnnually) {
return {
froggit: (plan.paidAnnually * Math.max(plan.users, users)) / users,
lab: labCompetitor.paidAnnually,
lab: labCompetitorParsed.paidAnnually,
chat: chatCompetitor.paidAnnually,
};
}
return {
froggit: (plan.paidMonthly * Math.max(plan.users, users)) / users,
lab: labCompetitor.paidMonthly,
lab: labCompetitorParsed.paidMonthly,
chat: chatCompetitor.paidMonthly,
};
}
......
......@@ -2,9 +2,27 @@ export default {
lab: [
{
name: "GitHub",
paidMonthly: 3.62,
paidAnnually: 3.62,
plans: [{
users: 0,
paidMonthly: 3.62,
paidAnnually: 3.62
}]
},
{
name: "GitLab",
plans: [
{
users: 5,
paidMonthly: 29.0,
paidAnnually: 29.0,
},
{
users: 0,
paidMonthly: 0,
paidAnnually: 0,
},
]
}
],
chat: [
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment