-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add special support for enterprise plan
- Loading branch information
1 parent
1dcf34e
commit 7b7c575
Showing
19 changed files
with
120 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
backend/lib/azimutt_web/templates/organization/_subscription_show.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 44 additions & 36 deletions
80
backend/lib/azimutt_web/templates/organization/billing.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,51 @@ | ||
<div class="px-3 py-12"> | ||
<h2 class="text-3xl font-semibold leading-7 text-indigo-600 text-center">Billing</h2> | ||
<p class="mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600"> | ||
Thank you for using Azimutt. | ||
You are currently on <span title={@organization.plan_status}><%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %></span> | ||
<%= if @organization.plan_seats > 1 do %> | ||
with <b><%= @organization.plan_seats %> seats</b>. | ||
<% end %> | ||
<br> | ||
<% max_seats = Azimutt.limits().users[String.to_atom(@organization.plan)] %> | ||
<%= if max_seats == nil || max_seats > 1 do %> | ||
Change you seats using the "Manage your subscription" button. | ||
<% end %> | ||
</p> | ||
<div class="max-w-lg mx-auto"> | ||
<%= if length(@subscriptions) > 1 do %> | ||
<div class="mt-3 rounded-md bg-yellow-50 p-4"> | ||
<div class="flex"> | ||
<div class="flex-shrink-0"> | ||
<Icon.exclamation_triangle kind="mini" class="h-5 w-5 text-yellow-400" /> | ||
</div> | ||
<div class="ml-3"> | ||
<h3 class="my-0 text-sm font-medium text-yellow-800">You have <%= length(@subscriptions) %> subscriptions.</h3> | ||
<div class="mt-2 text-sm text-yellow-700"> | ||
Having several subscriptions is not expected.<br> | ||
Click on "Manage your subscription" below and cancel the bad one. | ||
<%= if @organization.plan == "enterprise" do %> | ||
<p class="mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600"> | ||
Thank you for using Azimutt. | ||
You are currently on <span title={@organization.plan_status}><%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %></span><br> | ||
For any change or question, please contact <a href={"mailto:#{Azimutt.config(:enterprise_support_email)}"} class="underline text-indigo-600 hover:text-indigo-900"><%= Azimutt.config(:enterprise_support_email) %></a>. | ||
</p> | ||
<% else %> | ||
<p class="mx-auto mt-6 max-w-2xl text-center text-lg leading-8 text-gray-600"> | ||
Thank you for using Azimutt. | ||
You are currently on <span title={@organization.plan_status}><%= AzimuttWeb.LayoutView.plan_badge(@organization.plan) %></span> | ||
<%= if @organization.plan_seats > 1 do %> | ||
with <b><%= @organization.plan_seats %> seats</b>. | ||
<% end %> | ||
<br> | ||
<% max_seats = Azimutt.limits().users[String.to_atom(@organization.plan)] %> | ||
<%= if max_seats == nil || max_seats > 1 do %> | ||
Change you seats using the "Manage your subscription" button. | ||
<% end %> | ||
</p> | ||
<div class="max-w-lg mx-auto"> | ||
<%= if length(@subscriptions) > 1 do %> | ||
<div class="mt-3 rounded-md bg-yellow-50 p-4"> | ||
<div class="flex"> | ||
<div class="flex-shrink-0"> | ||
<Icon.exclamation_triangle kind="mini" class="h-5 w-5 text-yellow-400" /> | ||
</div> | ||
<div class="mt-2 text-sm text-yellow-700"> | ||
Your subscriptions: | ||
<ul role="list" class="list-disc space-y-1 pl-5"> | ||
<%= for subscription <- @subscriptions do %> | ||
<li><%= render "_subscription_show.html", subscription: subscription %></li> | ||
<% end %> | ||
</ul> | ||
<div class="ml-3"> | ||
<h3 class="my-0 text-sm font-medium text-yellow-800">You have <%= length(@subscriptions) %> subscriptions.</h3> | ||
<div class="mt-2 text-sm text-yellow-700"> | ||
Having several subscriptions is not expected.<br> | ||
Click on "Manage your subscription" below and cancel the bad one. | ||
</div> | ||
<div class="mt-2 text-sm text-yellow-700"> | ||
Your subscriptions: | ||
<ul role="list" class="list-disc space-y-1 pl-5"> | ||
<%= for subscription <- @subscriptions do %> | ||
<li><%= render "_subscription_show.html", subscription: subscription %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
<%= link "Manage your subscription", to: Routes.organization_billing_path(@conn, :edit, @organization.id), method: :post, class: "mt-6 inline-flex items-center px-4 py-2 border border-transparent shadow-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm" %> | ||
<%= link "Refresh plan", to: Routes.organization_billing_path(@conn, :refresh, @organization.id), method: :post, title: "If your plan is out of sync, you can manually refresh it by clicking here.", class: "mt-3 block text-sm underline" %> | ||
</div> | ||
<% end %> | ||
<%= link "Manage your subscription", to: Routes.organization_billing_path(@conn, :edit, @organization.id), method: :post, class: "mt-6 inline-flex items-center px-4 py-2 border border-transparent shadow-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:text-sm" %> | ||
<%= link "Refresh plan", to: Routes.organization_billing_path(@conn, :refresh, @organization.id), method: :post, title: "If your plan is out of sync, you can manually refresh it by clicking here.", class: "mt-3 block text-sm underline" %> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.