Merge pull request #10438 from overleaf/ii-offer-personal-plan-on-cancellation

[web] Offer personal plan on subscription cancellation

GitOrigin-RevId: a7845fb3f7edc2f169ba237d8b822ff958a5c6a5
This commit is contained in:
ilkin-overleaf 2022-11-15 16:36:46 +02:00 committed by Copybot
parent 98e168a0af
commit 87b844aa15
16 changed files with 14 additions and 30 deletions

View file

@ -100,11 +100,11 @@ div(ng-controller="RecurlySubscriptionController")
p
a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")}
div(ng-show="showDowngradeToStudent")
div(ng-show="showDowngrade")
div(ng-controller="ChangePlanFormController")
p !{translate("interested_in_cheaper_plan",{price:'{{studentDisplayPrice}}'})}
p !{translate("interested_in_cheaper_personal_plan",{price:'{{personalDisplayPrice}}'})}
p
button(type="submit", ng-click="downgradeToStudent()", ng-disabled='inflight').btn.btn-success #{translate("yes_move_me_to_student_plan")}
button(type="submit", ng-click="downgradeToPaidPersonal()", ng-disabled='inflight').btn.btn-success #{translate("yes_move_me_to_personal_plan")}
p
a(href, ng-click="cancelSubscription()", ng-disabled='inflight') #{translate("no_thanks_cancel_now")}

View file

@ -403,27 +403,28 @@ App.controller(
if (isMonthlyCollab && stillInFreeTrial) {
$scope.showExtendFreeTrial = true
} else if (isMonthlyCollab && !stillInFreeTrial) {
$scope.showDowngradeToStudent = true
$scope.showDowngrade = true
} else {
$scope.showBasicCancel = true
}
const planCode = 'paid-personal'
const { currency, taxRate } = subscription.recurly
$scope.studentDisplayPrice = '...' // Placeholder while we talk to recurly
RecurlyPricing.loadDisplayPriceWithTax('student', currency, taxRate).then(
$scope.personalDisplayPrice = '...' // Placeholder while we talk to recurly
RecurlyPricing.loadDisplayPriceWithTax(planCode, currency, taxRate).then(
price => {
$scope.studentDisplayPrice = price.total
$scope.personalDisplayPrice = price.total
}
)
$scope.downgradeToStudent = function () {
$scope.downgradeToPaidPersonal = function () {
const body = {
plan_code: 'student',
plan_code: planCode,
_csrf: window.csrfToken,
}
$scope.inflight = true
return $http
.post(`${SUBSCRIPTION_URL}?origin=downgradeToStudent`, body)
.post(`${SUBSCRIPTION_URL}?origin=downgradeToPaidPersonal`, body)
.then(() => location.reload())
.catch(() => console.log('something went wrong changing plan'))
}

View file

@ -78,7 +78,6 @@
"find_out_more_about_the_file_outline": "Få mere at vide om dispositionen",
"invalid_institutional_email": "Din institutions SSOtjeneste returnerede __email__ som din emailadresse, hvilket ligger under et domæne, som vi ikke forventede, og ikke kan se tilhører den institution. Du kan muligvis ændre din primære emailadresse via din brugerprofil hos din institution til én, som ligger under din institutions domæne. Hvis du har spørgsmål er det bedst, hvis du kontakter din institutions ITafdeling.",
"wed_love_you_to_stay": "Wed love you to stay",
"yes_move_me_to_student_plan": "Ja, flyt mig til et studenterabonnement",
"last_login": "Sidste logind",
"last_active": "Senest Aktiv",
"last_active_description": "Seneste tidspunkt, et projekt blev åbnet.",
@ -713,7 +712,6 @@
"sure_you_want_to_cancel": "Er du sikker på, at du ønsker at ophæve?",
"i_want_to_stay": "Jeg ønsker at blive",
"have_more_days_to_try": "Få ydereligere <strong>__days__ dage</strong> på din prøveperiode!",
"interested_in_cheaper_plan": "Ville du være interesseret i en billigere <strong>__price__</strong> løsning for studerende?",
"session_expired_redirecting_to_login": "Session udløbet. Du omdirigeres til login siden om __seconds__ sekunder",
"maximum_files_uploaded_together": "Maksimalt __max__ filer uploaded sammen",
"too_many_files_uploaded_throttled_short_period": "For mange filer uploadet; dine uploads er blevet begrænset i en kort periode. Vent helst 15 minutter, før du prøver igen.",

View file

@ -228,7 +228,6 @@
"sure_you_want_to_cancel": "Willst du wirklich abbrechen?",
"i_want_to_stay": "Ich möchte bleiben",
"have_more_days_to_try": "Hol dir weitere <strong>__days__ Tage</strong> auf deiner Testversion!",
"interested_in_cheaper_plan": "Hättest du Interesse an einem billigeren <strong>__price__</strong> Studentenplan?",
"session_expired_redirecting_to_login": "Sitzung abgelaufen. Du wirst in __seconds__ Sekunden auf die Anmeldungsseite umgeleitet",
"maximum_files_uploaded_together": "Maximal __max__ Dateien zusammen hochgeladen",
"too_many_files_uploaded_throttled_short_period": "Zu viele Dateien hochgeladen, deine Uploads wurden für kurze Zeit gedrosselt.",

View file

@ -81,7 +81,7 @@
"find_out_more_about_the_file_outline": "Find out more about the file outline",
"invalid_institutional_email": "Your institutions SSO service returned your email address as __email__, which is at an unexpected domain that we do not recognise as belonging to it. You may be able to change your primary email address via your user profile at your institution to one at your institutions domain. Please contact your IT department if you have any questions.",
"wed_love_you_to_stay": "Wed love you to stay",
"yes_move_me_to_student_plan": "Yes, move me to the student plan",
"yes_move_me_to_personal_plan": "Yes, move me to the personal plan",
"last_login": "Last Login",
"last_active": "Last Active",
"last_active_description": "Last time a project was opened.",
@ -880,7 +880,7 @@
"sure_you_want_to_cancel": "Are you sure you want to cancel?",
"i_want_to_stay": "I want to stay",
"have_more_days_to_try": "Have another <strong>__days__ days</strong> on your Trial!",
"interested_in_cheaper_plan": "Would you be interested in the cheaper <strong>__price__</strong> student plan?",
"interested_in_cheaper_personal_plan": "Would you be interested in the cheaper <strong>__price__</strong> personal plan?",
"session_expired_redirecting_to_login": "Session Expired. Redirecting to login page in __seconds__ seconds",
"maximum_files_uploaded_together": "Maximum __max__ files uploaded together",
"too_many_files_uploaded_throttled_short_period": "Too many files uploaded, your uploads have been throttled for a short period. Please wait 15 minutes and try again.",

View file

@ -74,7 +74,6 @@
"sure_you_want_to_cancel": "¿Seguro que quieres cancelar?",
"i_want_to_stay": "Quiero seguir",
"have_more_days_to_try": "¡Aquí tienes <strong>__days__ días</strong> más de prueba!",
"interested_in_cheaper_plan": "¿Te interesaría el plan de estudiante más barato por <strong>__price__</strong>?",
"session_expired_redirecting_to_login": "La sesión ha caducado. Se te redirigirá a la página de inicio de sesión en __seconds__ segundos",
"maximum_files_uploaded_together": "Máximo de archivos que se pueden subir a la vez: __max__",
"too_many_files_uploaded_throttled_short_period": "Estás intentando subir demasiados archivos. Se te han limitado las subidas por un corto período de tiempo.",

View file

@ -58,7 +58,6 @@
"find_out_more_about_the_file_outline": "En savoir plus sur la structure du fichier",
"invalid_institutional_email": "Le service dauthentification central de votre établissement a indiqué que votre adresse courriel était __email__, mais le domaine de cette adresse nappartient pas à ceux que nous reconnaissons pour cet établissement. Il est peut-être possible de modifier votre adresse courriel principale depuis le profil utilisateur de votre établissement pour quelle soit dans un domaine reconnu. Veuillez contacter votre département informatique si vous avez des questions.",
"wed_love_you_to_stay": "Nous aimerions beaucoup que vous restiez",
"yes_move_me_to_student_plan": "Oui, migrer vers loffre étudiante",
"last_login": "Dernière connexion",
"thank_you_for_being_part_of_our_beta_program": "Merci de votre participation au programme de bêta, qui vous permet daccéder en avant-première aux nouvelles fonctionnalités et de nous aider à mieux comprendre vos besoins",
"you_will_be_able_to_contact_us_any_time_to_share_your_feedback": "Vous pourrez nous contacter à tout moment pour donner votre avis",
@ -760,7 +759,6 @@
"sure_you_want_to_cancel": "Voulez-vous vraiment annuler ?",
"i_want_to_stay": "Je veux rester",
"have_more_days_to_try": "Voici <strong>__days__ days</strong> dessai en plus !",
"interested_in_cheaper_plan": "Seriez-vous intéressé·e par loffre étudiant à <strong>__price__</strong> ?",
"session_expired_redirecting_to_login": "Session expirée. Redirection vers la page de connexion dans __seconds__ s",
"maximum_files_uploaded_together": "__max__ fichiers téléversés simultanément. Valeur maximale atteinte.",
"too_many_files_uploaded_throttled_short_period": "Trop de fichiers téléversés, vos envois ont été mis en attente pour un court instant. Merci dattendre 15 minutes avant de réessayer.",

View file

@ -11,7 +11,6 @@
"sure_you_want_to_cancel": "Sei sicuro di voler eliminare?",
"i_want_to_stay": "Voglio rimanere",
"have_more_days_to_try": "Hai altri <strong>__days__ giorni</strong> nel tuo Trial!",
"interested_in_cheaper_plan": "Saresti interessato nel piano economico da <strong>__price__</strong> per studenti?",
"session_expired_redirecting_to_login": "Sessione scaduta. Redirezione alla pagina di login fra __seconds__ secondi",
"maximum_files_uploaded_together": "Massimo __max__ file caricati insieme",
"too_many_files_uploaded_throttled_short_period": "Troppi file caricati, i tuoi caricamenti sono stati limitati per un breve periodo.",

View file

@ -168,7 +168,6 @@
"sure_you_want_to_cancel": "キャンセルしてもよろしいですか?",
"i_want_to_stay": "留まります",
"have_more_days_to_try": "トライアルがまだ<strong>__days__ 日</strong>残っています!",
"interested_in_cheaper_plan": "よりお手頃な<strong>__price__</strong>生徒プランに興味がありますか?",
"session_expired_redirecting_to_login": "セッション期限切れ。__seconds__秒後にログインぺージにリダイレクトします",
"maximum_files_uploaded_together": "最大 __max__ファイルを一緒にアップロード",
"too_many_files_uploaded_throttled_short_period": "あまりにも多くのファイルがアップロードされました。アップロードがしばらく調整されます。",

View file

@ -304,7 +304,6 @@
"sure_you_want_to_cancel": "정말 취소 하시겠습니까?",
"i_want_to_stay": "계속하겠습니다.",
"have_more_days_to_try": "<strong>__days__ days</strong>일 더 사용해 보십시오!",
"interested_in_cheaper_plan": "저 저렴한 <strong>__price__</strong> student plan에 관심이 있습니까?",
"session_expired_redirecting_to_login": "세션 종료. __seconds__ seconds 초 후 다시 로그인",
"maximum_files_uploaded_together": "최대 __max__ 파일 업로드됨",
"too_many_files_uploaded_throttled_short_period": "너무 많은 파일이 업로드되어 잠시 보류되었습니다.",

View file

@ -272,7 +272,6 @@
"sure_you_want_to_cancel": "Weet je zeker dat je wilt annuleren?",
"i_want_to_stay": "Ik wil blijven",
"have_more_days_to_try": "Hier zijn <strong>__days__ dagen</strong> extra Proefperiode!",
"interested_in_cheaper_plan": "Zou je geïnteresseerd zijn in de goedkopere <strong>__price__</strong> studentenaanbieding?",
"session_expired_redirecting_to_login": "Sessie verlopen. Doorsturen naar de inlog pagina in __seconds__ seconden.",
"maximum_files_uploaded_together": "Maximum __max__ bestanden tegelijk geüplaod",
"too_many_files_uploaded_throttled_short_period": "Teveel bestanden geüpload, je uploads zijn afgeknepen voor een korte periode.",

View file

@ -477,7 +477,6 @@
"sure_you_want_to_cancel": "Você tem certeza que deseja cancelar?",
"i_want_to_stay": "Quero ficar",
"have_more_days_to_try": "Ganhe mais <strong>__days__ dias</strong> na sua Experimentação!",
"interested_in_cheaper_plan": "Você estaria interessado em um plano de estudante com <strong>__price__</strong> mais barato?",
"session_expired_redirecting_to_login": "Sessão Expirada. Redirecionando para a página de login em __seconds__ segundos",
"maximum_files_uploaded_together": "Máximo de __max__ arquivos enviados juntos",
"too_many_files_uploaded_throttled_short_period": "Excesso de arquivos enviados, seus envios foram suprimidos por um curto tempo.",

View file

@ -107,7 +107,6 @@
"sure_you_want_to_cancel": "Вы уверены, что хотите отменить подписку?",
"i_want_to_stay": "Я хочу остаться",
"have_more_days_to_try": "Продлите тестовый период ещё на <strong>__days__ дней</strong>!",
"interested_in_cheaper_plan": "Вас интересует более дешевый студенческий тариф: <strong>__price__</strong>?",
"session_expired_redirecting_to_login": "Срок сессии истёк. Перенаправление на страницу входа через __seconds__ секунд(ы)",
"maximum_files_uploaded_together": "Совместная загрузка до максимум __max__ файлов",
"too_many_files_uploaded_throttled_short_period": "Слишком много файлов загружено за раз - на короткое время загрузка была приостановлена.",

View file

@ -71,7 +71,6 @@
"we_cant_find_any_sections_or_subsections_in_this_file": "Vi kan ej finna några avsnitt eller underavsnitt i denna fil",
"find_out_more_about_the_file_outline": "Läs mer om filöversikten",
"wed_love_you_to_stay": "Vi önskar att du stannar",
"yes_move_me_to_student_plan": "Ja, flytta mig till studentplanen",
"last_login": "Senaste inloggning",
"last_active": "Senast aktiv",
"last_active_description": "Senaste gången ett projekt öppnades.",
@ -782,7 +781,6 @@
"sure_you_want_to_cancel": "Är du säker på att du vill avsluta?",
"i_want_to_stay": "Jag vill stanna",
"have_more_days_to_try": "Få ytterligare <strong>__days__ dagar</strong> till dit test konto!",
"interested_in_cheaper_plan": "Är du intresserad av den billigare <strong>__price__</strong> student prenumerationen?",
"session_expired_redirecting_to_login": "Sessionen har utgått. Dirigerar om till login sidan om __seconds__ sekunder",
"maximum_files_uploaded_together": "Högst __max__ filer laddas upp samtidigt",
"too_many_files_uploaded_throttled_short_period": "För många filer har laddats upp, dina uppladdningar har tillfälligt begränsats.",

View file

@ -16,7 +16,6 @@
"sure_you_want_to_cancel": "İptal etmek istediğinizden emin misiniz?",
"i_want_to_stay": "Kalmak istiyorum",
"have_more_days_to_try": "Deneme sürenize <strong>__days__ gün</strong> daha ekleyin!",
"interested_in_cheaper_plan": "Öğrenci planı ile daha ucuz, <strong>__price__</strong>, bir teklifle ilgilenir misiniz?",
"new_group": "Yeni Grup",
"about_to_delete_groups": "Şu projeleri silmek üzeresiniz:",
"removing": "Kaldırılıyor",

View file

@ -57,7 +57,6 @@
"find_out_more_about_the_file_outline": "了解有关文件大纲的更多信息",
"invalid_institutional_email": "您机构的SSO服务返回的您的电子邮件地址是 __email__但该域名并没有在我们这里注册。您可以通过您的机构将您的主要电子邮件地址更改为您所在机构域的电子邮件地址。如果您有任何问题请联系您的IT部门。",
"wed_love_you_to_stay": "我们希望你留下来",
"yes_move_me_to_student_plan": "是的,把我转到学生计划",
"last_login": "最后登录",
"thank_you_for_being_part_of_our_beta_program": "感谢您参与我们的测试计划,您可以尽早体验新功能,并帮助我们更好地了解您的需求",
"you_will_be_able_to_contact_us_any_time_to_share_your_feedback": "您可以随时联系我们分享您的反馈",
@ -758,7 +757,6 @@
"sure_you_want_to_cancel": "您确认要取消订购吗?",
"i_want_to_stay": "我要留下",
"have_more_days_to_try": "试用期增加<strong>__days__ days</strong>",
"interested_in_cheaper_plan": "您是否对便宜点的<strong>__price__</strong>学生方案感兴趣?",
"session_expired_redirecting_to_login": "会话过期。将在__seconds__秒后重定向至登录页面",
"maximum_files_uploaded_together": "最多可同时上传__max__个文件",
"too_many_files_uploaded_throttled_short_period": "上传的文件太多您的上传将暂停一会儿。请等待15分钟然后重试。",