[CLD-6537] Cloud Annual Renewals - Banners Implementation (#25267)

* Initial implementation of Cloud Annual Renewal flow - system banners for admins and end users

* Actually add the file

* Add AlertBanner to system console billing_subscriptions page

* Fixes for non-admin banner and pipeline

* Updates to coincide with the CWS side of thigns

* Add a feature flag for the 60 day experience to ensure banners don't show accidentally

* Fix tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Nick Misasi
2023-11-29 09:10:17 -05:00
коммит произвёл GitHub
родитель 95670abcea
Коммит 8b07655a65
17 изменённых файлов: 788 добавлений и 105 удалений

Просмотреть файл

@@ -96,20 +96,26 @@ func getSubscription(c *Context, w http.ResponseWriter, r *http.Request) {
ProductID: subscription.ProductID,
IsFreeTrial: subscription.IsFreeTrial,
TrialEndAt: subscription.TrialEndAt,
EndAt: subscription.EndAt,
CancelAt: subscription.CancelAt,
DelinquentSince: subscription.DelinquentSince,
CustomerID: "",
AddOns: []string{},
StartAt: 0,
EndAt: 0,
CreateAt: 0,
Seats: 0,
Status: "",
DNS: "",
LastInvoice: &model.Invoice{},
DelinquentSince: subscription.DelinquentSince,
BillingType: "",
}
}
if !c.App.Config().FeatureFlags.CloudAnnualRenewals {
subscription.WillRenew = ""
subscription.CancelAt = nil
}
json, err := json.Marshal(subscription)
if err != nil {
c.Err = model.NewAppError("Api4.getSubscription", "api.cloud.request_error", nil, "", http.StatusInternalServerError).Wrap(err)

Просмотреть файл

@@ -154,7 +154,7 @@ func Test_GetSubscription(t *testing.T) {
ProductID: "SomeProductId",
AddOns: []string{},
StartAt: 0,
EndAt: 0,
EndAt: 2000000000,
CreateAt: 0,
Seats: 0,
IsFreeTrial: "true",