Skip to content

Commit

Permalink
Merge branch 'develop' into feat/change-subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
naumovski-filip committed Jul 18, 2023
2 parents 1cfcf45 + 511848a commit d6b369d
Show file tree
Hide file tree
Showing 22 changed files with 623 additions and 301 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ APP_PLAYER_ID=M4qoGvUk
APP_DEFAULT_LANGUAGE=en

# a comma separated list of languages that are enabled (this only works for languages that are enabled in the app)
APP_ENABLED_LANGUAGES=en,es
APP_ENABLED_LANGUAGES=en,es
47 changes: 47 additions & 0 deletions .github/workflows/create-release-candidate-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create Release Candidate Branch

# Triggered manually
on:
workflow_dispatch:

permissions:
contents: write
jobs:
create-release-branch:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3
with:
token: ${{ secrets.ACTION_TOKEN }}
ref: release
# It would be easier to create the branch from develop,
# but unfortunately the script that creates the PR's only considers commits added during the action run
- name: Merge latest from develop
run: |
git config --global user.name 'Release Script'
git config --global user.email 'ott-release-script@jwplayer.com'
git fetch origin develop
git merge origin/develop
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}

- name: Generate changelog
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.ACTION_TOKEN }}
release-count: 0
skip-tag: true
git-push: false

- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.ACTION_TOKEN }}
title: ${{ steps.changelog.outputs.tag }} Release Candidate
base: release
branch: release-candidate
body: ${{ steps.changelog.outputs.clean_changelog }}
labels: release-candidate
2 changes: 1 addition & 1 deletion .github/workflows/firebase-live.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Firebase Live'

on:
push:
branches: ['develop']
branches: ['release']

jobs:
deploy_live_website:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Firebase Preview'

on:
pull_request:
branches: [ 'develop', 'feat/*', 'feature/*' ]
branches: [ 'develop', 'feat/*', 'feature/*', 'release' ]

jobs:
build_and_preview:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Release
on:
# Triggers the workflow on push or pull request events but only for the "develop" branch
push:
branches: ['develop']
branches: ['release']

jobs:
create-new-release-version:
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## [4.23.2](https://github.com/jwplayer/ott-web-app/compare/v4.23.1...v4.23.2) (2023-07-06)


### Bug Fixes

* **deps:** bump @sideway/formula from 3.0.0 to 3.0.1 ([#309](https://github.com/jwplayer/ott-web-app/issues/309)) ([8dbb314](https://github.com/jwplayer/ott-web-app/commit/8dbb3145a866237b9cb07e2e61caf69bac2a1d55))



## [4.23.1](https://github.com/jwplayer/ott-web-app/compare/v4.23.0...v4.23.1) (2023-07-06)


### Bug Fixes

* **project:** add meta tag for GA ([#330](https://github.com/jwplayer/ott-web-app/issues/330)) ([87db5f9](https://github.com/jwplayer/ott-web-app/commit/87db5f9a5dc2ab42117267933b5a914825a756bb))



# [4.23.0](https://github.com/jwplayer/ott-web-app/compare/v4.22.0...v4.23.0) (2023-07-06)


Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jw-ott-webapp",
"version": "4.23.0",
"version": "4.23.2",
"main": "index.js",
"repository": "https://github.com/jwplayer/ott-web-app.git",
"author": "JW Player",
Expand Down Expand Up @@ -87,7 +87,7 @@
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@vitejs/plugin-react": "^1.0.7",
"@vitest/coverage-c8": "^0.25.7",
"@vitest/coverage-c8": "^0.32.4",
"allure-commandline": "^2.17.2",
"codeceptjs": "3.4.1",
"confusing-browser-globals": "^1.0.10",
Expand Down Expand Up @@ -122,13 +122,13 @@
"tsconfig-paths": "^4.1.0",
"typescript": "^4.3.4",
"vi-fetch": "^0.8.0",
"vite": "^4.0.0",
"vite": "^4.4.0",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.14.0",
"vite-plugin-static-copy": "^0.13.0",
"vite-plugin-stylelint": "^4.0.1",
"vitest": "^0.25.7",
"vitest": "^0.32.3",
"workbox-build": "^6.5.4",
"workbox-window": "^6.5.4"
},
Expand Down
1 change: 1 addition & 0 deletions public/locales/en/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"field_required": "This field is required",
"monthly": "Monthly",
"monthly_subscription": "Monthly subscription",
"no_pricing_available": "There are no pricing options available at the moment.",
"offer_not_found": "Offer not found, please try reloading the page",
"one_time_only": "This video",
"subscription": "Subscription",
Expand Down
6 changes: 3 additions & 3 deletions public/locales/en/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"access_granted": "access granted",
"add_card_details": "Add card details",
"annual_subscription": "Annual subscription",
"billing_history": "Billing history",
"cancel_subscription": "Cancel subscription",
"card_number": "Card number",
"change_plan": "Change Plan",
Expand All @@ -91,15 +92,14 @@
"payment_method": "Payment method",
"pending_downgrade": "Pending downgrade",
"pending_offer_switch": "Will update to a \"{{title}}\" after the next billing date",
"price_payed_with": "{{price}} payed with {{method}}",
"price_payed_with_card": "Price payed with card",
"price_paid_with": "{{price}} paid with {{method}}",
"price_paid_with_card": "Price paid with card",
"renew_subscription": "Renew subscription",
"security_code": "Security code",
"show_all": "Show all",
"show_receipt": "Show receipt",
"subscription_details": "Subscription details",
"subscription_expires_on": "This plan will expire on {{date}}",
"transactions": "Transactions",
"update_payment_details": "Update payment details",
"upgrade_plan_success": "You've successfully changed the subscription plan. You can enjoy your additional benefits immediately.",
"weekly_subscription": "Weekly subscription"
Expand Down
1 change: 1 addition & 0 deletions public/locales/es/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
"field_required": "Este campo es obligatorio",
"monthly": "Mensual",
"monthly_subscription": "Suscripción mensual",
"no_pricing_available": "No hay opciones de precios disponibles en este momento.",
"offer_not_found": "Oferta no encontrada, por favor intenta volver a cargar la página",
"one_time_only": "Este video",
"subscription": "Suscripción",
Expand Down
6 changes: 3 additions & 3 deletions public/locales/es/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"access_granted": "acceso concedido",
"add_card_details": "Agregar detalles de la tarjeta",
"annual_subscription": "Suscripción anual",
"billing_history": "Historial de facturación",
"cancel_subscription": "Cancelar suscripción",
"card_number": "Número de tarjeta",
"change_plan": "",
Expand All @@ -92,15 +93,14 @@
"payment_method": "Método de pago",
"pending_downgrade": "",
"pending_offer_switch": "Se actualizará a \"{{title}}\" después de la próxima fecha de facturación",
"price_payed_with": "{{price}} pagado con {{method}}",
"price_payed_with_card": "Precio pagado con tarjeta",
"price_paid_with": "{{price}} pagado con {{method}}",
"price_paid_with_card": "Precio pagado con tarjeta",
"renew_subscription": "Renovar suscripción",
"security_code": "Código de seguridad",
"show_all": "Mostrar todo",
"show_receipt": "Mostrar recibo",
"subscription_details": "Detalles de la suscripción",
"subscription_expires_on": "Este plan expirará el {{date}}",
"transactions": "Transacciones",
"update_payment_details": "Actualizar detalles de pago",
"upgrade_plan_success": "",
"weekly_subscription": "Suscripción semanal"
Expand Down
18 changes: 5 additions & 13 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useEffect, useState } from 'react';
import { BrowserRouter } from 'react-router-dom';
import { Helmet } from 'react-helmet';

import QueryProvider from '#src/containers/QueryProvider/QueryProvider';
import '#src/screenMapping';
Expand Down Expand Up @@ -40,17 +39,10 @@ export default function App() {
}

return (
<>
{import.meta.env.APP_GOOGLE_SITE_VERIFICATION_ID && (
<Helmet>
<meta name="google-site-verification" content={import.meta.env.APP_GOOGLE_SITE_VERIFICATION_ID} />
</Helmet>
)}
<QueryProvider>
<BrowserRouter>
<Root />
</BrowserRouter>
</QueryProvider>
</>
<QueryProvider>
<BrowserRouter>
<Root />
</BrowserRouter>
</QueryProvider>
);
}
4 changes: 2 additions & 2 deletions src/components/ChooseOfferForm/ChooseOfferForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ const ChooseOfferForm: React.FC<Props> = ({
</label>
</div>
)}
<div className={styles.offers}>{offers.map(renderOfferBox)}</div>
{<div className={styles.offers}>{!offers.length ? <p>{t('choose_offer.no_pricing_available')}</p> : offers.map(renderOfferBox)}</div>}
{submitting && <LoadingOverlay transparentBackground inline />}
<Button label={t('choose_offer.continue')} disabled={submitting} variant="contained" color="primary" type="submit" fullWidth />
<Button label={t('choose_offer.continue')} disabled={submitting || !offers.length} variant="contained" color="primary" type="submit" fullWidth />
</form>
);
};
Expand Down
14 changes: 14 additions & 0 deletions src/components/Payment/Payment.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
}
}

.transactionItem {
display: flex;
flex-direction: column;
gap: 0.25em;

> span {
color: variables.$gray-light;
}
}

.pendingSwitch {
display: inline-block;
margin-top: variables.$base-spacing;
Expand All @@ -34,6 +44,10 @@
}
}

.transationPrice {
font-size: 1.25em;
}

.price {
font-size: 14px;
line-height: 18px;
Expand Down
25 changes: 12 additions & 13 deletions src/components/Payment/Payment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,26 +305,25 @@ const Payment = ({
</div>
<div className={panelClassName}>
<div className={panelHeaderClassName}>
<h3>{t('user:payment.transactions')}</h3>
<h3>{t('user:payment.billing_history')}</h3>
</div>
{transactions?.length ? (
<React.Fragment>
{transactions?.slice(0, showAllTransactions ? 9999 : VISIBLE_TRANSACTIONS).map((transaction) => (
<div className={styles.infoBox} key={transaction.transactionId}>
<p className="transactionItem">
<strong>{transaction.offerTitle}</strong> <br />
{!isGrantedSubscription &&
t('user:payment.price_payed_with', {
price: formatPrice(parseFloat(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
method: transaction.paymentMethod,
})}
<p className={styles.transactionItem}>
<strong>{formatLocalizedDate(new Date(transaction.transactionDate * 1000), i18n.language)}</strong>
<span>{transaction.offerTitle}</span>
<span>{transaction.transactionId}</span>
</p>
<div className={styles.transactionDetails}>
<p>
{transaction.transactionId}
<br />
{formatLocalizedDate(new Date(transaction.transactionDate * 1000), i18n.language)}
</p>
<div className={styles.transationPrice}>
{!isGrantedSubscription &&
t('user:payment.price_paid_with', {
price: formatPrice(parseFloat(transaction.transactionPriceInclTax), transaction.transactionCurrency, transaction.customerCountry),
method: transaction.paymentMethod,
})}
</div>
{canShowReceipts && (
<IconButton aria-label={t('user:payment.show_receipt')} onClick={() => !isLoading && onShowReceiptClick(transaction.transactionId)}>
<ExternalLink />
Expand Down
Loading

0 comments on commit d6b369d

Please sign in to comment.