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 de35f89c authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

Merge branch '148-add-gitlab-pricing-on-comparator' into 'main'

Resolve "add gitlab pricing on comparator"

Closes #148

See merge request !121
parents 757a3a16 8a3c8133
No related branches found
No related tags found
1 merge request!121Resolve "add gitlab pricing on comparator"
Pipeline #46585 passed
...@@ -44,17 +44,20 @@ function getPrices(users, paidAnnually, labCompetitor, chatCompetitor) { ...@@ -44,17 +44,20 @@ function getPrices(users, paidAnnually, labCompetitor, chatCompetitor) {
.reverse() .reverse()
.find(plan => plan.users <= users); .find(plan => plan.users <= users);
let labCompetitorParsed = labCompetitor.plans.find(plan => plan.users <= users);
if (paidAnnually) { if (paidAnnually) {
return { return {
froggit: (plan.paidAnnually * Math.max(plan.users, users)) / users, froggit: (plan.paidAnnually * Math.max(plan.users, users)) / users,
lab: labCompetitor.paidAnnually, lab: labCompetitorParsed.paidAnnually,
chat: chatCompetitor.paidAnnually, chat: chatCompetitor.paidAnnually,
}; };
} }
return { return {
froggit: (plan.paidMonthly * Math.max(plan.users, users)) / users, froggit: (plan.paidMonthly * Math.max(plan.users, users)) / users,
lab: labCompetitor.paidMonthly, lab: labCompetitorParsed.paidMonthly,
chat: chatCompetitor.paidMonthly, chat: chatCompetitor.paidMonthly,
}; };
} }
......
...@@ -2,9 +2,27 @@ export default { ...@@ -2,9 +2,27 @@ export default {
lab: [ lab: [
{ {
name: "GitHub", name: "GitHub",
paidMonthly: 3.62, plans: [{
paidAnnually: 3.62, 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: [ 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