Commit Graph

207 Commits

Author SHA1 Message Date
Lauryn Menard 916892e437 templates: Move support templates to /templates/corporate/support.
Also, makes small updates to `next_plan_forms_support.html`.
Removes unneeded "btn" and "btn-default" classes, and updates
the placeholder text for the input as not marked for translation.
2024-01-30 10:06:48 -08:00
Lauryn Menard efd0d689fc templates: Move activity templates to /templates/corporate/activity.
Also, renames `ad_hoc_query.html` to `activity_table.html`,
`realm_summary_table.html` to `installation_activity_table.html`,
and `activity_details_template.html` to `activity.html`.

Removes the style attribute in the installation activity template
and uses a CSS class, "installation-activity-header", to center the
h3 and p tags instead. This removes an exception from the custom
lint check.
2024-01-30 10:06:48 -08:00
Prakhar Pratyush edec29e0b6 support: Add support to configure fixed_price plan. 2024-01-29 11:23:20 -08:00
Lauryn Menard 15ba9cf8ec bootstrap: Remove bootstrap.btn classes from support view buttons.
Moves CSS styles for support view buttons to
`web/styles/portico.activity.css`.

Also removed the "sea-green" and "small" classes from a few buttons
as no CSS rules were being applied and most of those buttons will
be removed when these forms are refactored to use a modal.
2024-01-29 10:59:33 -08:00
Lauryn Menard bfd9eec4b3 activity: Add totals row as sticky footer to activity charts.
Updates the total row for the installation and remote activity
charts to be in the table footer. Makes the footer class sticky
to the bottom of the view so that it is always visible on the
chart.

Also, updates the installation activity column for revenue to
be formatted as a dollar string, since this formatting was being
applied in the updated total row.
2024-01-26 09:04:39 -08:00
Lauryn Menard fca9ff1ae7 support: Show date for start of next billing cycle for current plan.
Instead of showing the next invoice date for the plan, show the
date for the next billing cycle start (e.g. the next plan renewal
charge date), except for plans currently on a free trial.

For plans on a free trial, the next plan renewal date will be when
the free trial ends, which is stored as the next invoice date on
the plan.
2024-01-22 10:09:00 -08:00
Lauryn Menard 536aef854c remote-activity: Display rows for remote realms.
Adds columns for remote realm ID, name and organization type. If
a remote server has remote realms attached that are not marked
as deactivated by the remote server, then there will be a row in
the chart for each remote realm (which duplicates some remote
server data).

Updates the plan data, revenue and user counts to be for the realm
if present and otherwise for the server.

Updates the user counts to be total users and guest users, instead
of non guest and guest users.

The total row for mobile data (users and pushes forwarded) sums
each remote server's data once, so while the column duplicates
data, the total row should be an accurate total for the installation.

Adds 5 queries to the remote activity page test. One is for the
additional query for the remote realm plans. The other four are
getting the remote realm object and then the user count data for
the two remote realms in the test.
2024-01-19 11:46:13 -08:00
Lauryn Menard 030f899195 realm-activity: Merge chart for human and bot users.
Merges the two charts remaining to have just one chart for the
realm activity view.

Removes the columns for different clients and adds a column to
show/sort by the user type (human or bot type).

Deletes templates/analytics/activity.html because it is no
longer used for any activity pages/views.
2024-01-16 09:43:42 -08:00
Lauryn Menard a5f2883a75 remote-support: Add ability to set a required plan tier for customer. 2024-01-15 03:10:04 -08:00
Lauryn Menard 787d64e327 support: Update validation for adding or updating a discount.
Updates the HTML input field to have a min of 0, max of 99.99 and
allow increments of 0.01.

Also, use format_discount_percentage for displaying the customer
default discount in the support form.
2024-01-11 09:20:41 -08:00
Lauryn Menard 2994685399 support: Add admin support for updating end date of active plan.
This currently will only apply to tier.SELF_HOSTED_LEGACY plans.
2024-01-09 10:13:21 -08:00
Lauryn Menard 63dd057298 support: Include mobile users and mobile push data.
Adds the count for mobile users and mobile pushes forwarded to
the remote support view for both servers and realms.
2024-01-05 16:55:38 -08:00
Lauryn Menard 92ebeb7baa support: Add a link to remote server's installation analytics page. 2024-01-05 16:55:38 -08:00
Lauryn Menard fb29a35262 support: Add updating minimum licenses requirement after discount.
Adds a support action for updating the minimum licenses on a
customer object once a default discount has also been set.

In the case that the current billing entity has a current active
plan or a scheduled upgrade to a new plan, then the minimum
licenses will not be updated.
2024-01-04 18:42:07 -08:00
Alya Abbott 2a57aa6cea billing: Improve display of sponsorship requests. 2024-01-04 12:25:30 -08:00
Lauryn Menard b4b44e5558 support: Display remote realm is deactivated fields.
Also updates populate_billing_realms to not locally deactivate
test remote realms when generating them.
2024-01-03 14:40:11 -08:00
Lauryn Menard 4143101637 remote-activity: Display latest audit log update for remote server.
Since the latest end time for reported active users on a remote
server is not used to determine if a remote server has current
data for billing purposes, we instead display the last audit log
update datetime for the remote server object.

Removes the note in the remote activity key about the Zulip
version.

Also adds a sum in the total row for mobile push notifications
sent.
2024-01-03 12:15:35 -08:00
Lauryn Menard ea1da738d6 support: Update how remote server information is organized.
Changes the emoji that highlights when a remote realm or server has
an active discount.

Adds a remote server UUID field to the remote server information.

Moves the 'has remote realms' field to be after the Zulip version
information, and adds an extra break there to visually highlight
that field as well as the following 'max monthly messages' field.
2024-01-02 13:16:35 -08:00
Lauryn Menard b9ca60ab9e support: Add date created field to remove server information.
Removes the last updated field and replaces it with the date the
remote server was created based on the audit log data.
2024-01-02 13:16:35 -08:00
Lauryn Menard ffd708ecaf support: Display next plan data on remote support view.
Currently, this will only be the case for legacy self-managed plans
that have scheduled a switch to either the Basic or Business plan.
2023-12-30 11:22:02 -08:00
Lauryn Menard 22e035d8e2 support: Fix description for remote realm host field. 2023-12-19 14:44:26 -08:00
Lauryn Menard ad8daffb62 support: Add Zulip version to remote server information.
In the remote server information displayed in the remote support
view, show the Zulip version currently on the RemoteZulipServer
object as last_version.
2023-12-19 14:44:26 -08:00
Lauryn Menard 9e9fec68a1 support: Add plan's estimated annual revenue to remote support view.
Also fixes formatting for per license price and moves the billing
schedule to be above this line so that it's clearer the per license
price is based on the billing schedule.
2023-12-19 14:44:26 -08:00
Lauryn Menard fb3bd0cde1 support: Add user count data to remote support view. 2023-12-19 14:44:26 -08:00
Lauryn Menard a8172591ca support: Show current discount for current plan.
This should match any discount information shown for the remote
realm or server.
2023-12-19 14:44:26 -08:00
Lauryn Menard be6c90f608 support: Move and highlight current sponsorship information.
Moves the note about being on the sponsored Community plan to be
under the remote server or realm name.

Adds a note about a remote server or realm with a partial discount
set, which is another type of sponsorship.

Highlights these notes visually with emojis for support admin.
2023-12-19 14:44:26 -08:00
Aman Agrawal b2faa5c5bb stripe: Add a CustomerPlan for self hosted sponsored customers. 2023-12-18 12:55:34 -08:00
Lauryn Menard 83d6481f6f support: Add the remote realm's plan type to the support view.
The plan type for the remote realm is useful to compare to any
current plan attached to the same remote realm.
2023-12-14 11:38:02 -08:00
Lauryn Menard a897d68d93 support: Add active plan information to remote server activity.
Adds three columns to the remote server activity chart and updates
the chart key for the third of those columns.

The first is the plan name. If there are multiple plans with a
status under the live threshhold, then we send "See support view".

The second is the plan status. If there are multiple plans, then
we send "Multiple plans".

The third is the estimated annual revenue for the plan. Note that
for free trials, this will be calculated as if the plan was paid
for 12 months (so a full year).

If there is no plan for the server under the live threshold or at
all then "---" is inserted into the table row. Note that 100%
sponsored servers/realms would fall into this category.
2023-12-13 13:43:00 -08:00
Lauryn Menard 68d117e60a support: Add sponsorship request information to remote support view. 2023-12-13 10:28:11 -08:00
Lauryn Menard e8500fbdb0 support: Include sponsorship request for remote server support view.
Preparation for updating the sponsorship forms template to include
information about the latest sponsorship request if sponsorship is
pending.
2023-12-13 10:28:11 -08:00
Lauryn Menard 89c2740342 support: Fix references to remote server in `remote_realm_details.html`. 2023-12-12 08:04:02 -08:00
Lauryn Menard 144b2a9988 support: Add forms for current plan actions to remote realms.
Pulls the forms for updating the billing collection method and
generally modifying the current plan to a separate template.

Uses the shared template to render these forms for both the
remote server and any attached remote realms.
2023-12-11 10:33:50 -08:00
Lauryn Menard 6f3e1cf653 support: Add remote realm current plan data to support view. 2023-12-11 10:33:50 -08:00
Lauryn Menard 7186f75b58 support: Add sponsorship/discount support forms to remote realms.
If there are remote realms attached to the remote server, adds
the forms to be able to update sponsorship requests, approve
sponsorship and update a discount.
2023-12-11 10:33:50 -08:00
Lauryn Menard 2684c21cca support: Create separate template for remote sponsorship/discounts.
Creates a separate template for the forms related to sponsorship
and discounts on the remote support view.
2023-12-11 10:33:50 -08:00
Lauryn Menard c2a76ccb3e support: Clean up template variables for remote server support. 2023-12-11 10:33:50 -08:00
Lauryn Menard ea725aaaf3 support: Handle missing current licenses data for support views. 2023-12-06 11:01:26 -08:00
Lauryn Menard d079a13760 support: Use shared template for current plan details on support views.
Moves the section in support views for any current plan details
to a new template: `templates/analytics/current_plan_details.html`.

Also, updates the PlanData dataclass to have a boolean that checks
if the current plan tier is the self-hosted legacy plan.
2023-12-06 11:01:26 -08:00
Lauryn Menard ba3279e959 support: Add remote realm stub to remote server information.
Adds a small section for any remote realms attached to the remote
server in the support view.
2023-12-05 12:48:42 -08:00
Lauryn Menard cfd61669e0 support: Add plan type to remote server information.
Updates `get_plan_type_string` for RemoteZulipServer plan types and
capitalizes the strings used for Realm plan types.

Also changes the string for Realm.PLAN_TYPE_STANDARD_FREE to be
"Standard free" instead of "open source" as that is used for any
100% sponsored organization, which is not restricted to open-source
projects.
2023-12-05 12:48:42 -08:00
Lauryn Menard 6c5b419267 support: Add downgrade current plan actions to remote servers. 2023-12-05 12:48:42 -08:00
Lauryn Menard f5ab9419d2 support: Update billing modality for remote server current plan. 2023-12-05 12:48:42 -08:00
Lauryn Menard 9f8fe7989a support: Add current plan information for remote servers.
For remote servers with a current legacy customer plan,
only the plan name, status and end date are displayed.
2023-12-05 12:48:42 -08:00
Lauryn Menard c457ef2a07 support: Remove discount/sponsorship actions if remote server sponsored.
Removes the support actions for changing a remote server's default
discount and sponsorship pending states if the remote server is on
the sponsored plan type.
2023-12-03 14:27:07 -08:00
Lauryn Menard 69f6d3dcb1 support: Approve sponsorship for remote server customer.
Adds ability to approve a sponsorship request for a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 2218e667a6 support: Update remote server customer sponsorship pending status.
Adds ability to update the sponsorship pending status of a customer
attached to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 4250e9c1c9 support: Update remote server customer default discount.
Adds ability to update the default discount for a customer attached
to a remote server via the remote server support view.
2023-12-03 14:27:07 -08:00
Lauryn Menard 1d685bd198 support: Add success message to remote servers support view context. 2023-12-03 14:27:07 -08:00
Lauryn Menard 8d992405a6 analytics: Get customer discount for support views. 2023-12-03 14:27:07 -08:00