From de2cf8e8f3ff7a5a840d220e21f007f53b01cec3 Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Tue, 15 Jun 2021 15:33:22 +0200 Subject: [PATCH] fix: payment viaVoucherDialog lang. --- .../PaymentViaVoucherDialogContent.js | 7 +-- client/src/lang/en/index.json | 3 +- client/src/store/plans/plans.reducer.js | 47 +++++++++++++------ .../style/pages/Subscription/PlanRadio.scss | 2 +- 4 files changed, 37 insertions(+), 22 deletions(-) diff --git a/client/src/containers/Dialogs/PaymentViaVoucherDialog/PaymentViaVoucherDialogContent.js b/client/src/containers/Dialogs/PaymentViaVoucherDialog/PaymentViaVoucherDialogContent.js index 58cf04831..2a2202422 100644 --- a/client/src/containers/Dialogs/PaymentViaVoucherDialog/PaymentViaVoucherDialogContent.js +++ b/client/src/containers/Dialogs/PaymentViaVoucherDialog/PaymentViaVoucherDialogContent.js @@ -26,13 +26,10 @@ function PaymentViaLicenseDialogContent({ // #withDialog closeDialog, }) { - const history = useHistory(); // Payment via voucher - const { - mutateAsync: paymentViaVoucherMutate, - } = usePaymentByVoucher(); + const { mutateAsync: paymentViaVoucherMutate } = usePaymentByVoucher(); // Handle submit. const handleSubmit = (values, { setSubmitting, setErrors }) => { @@ -41,7 +38,7 @@ function PaymentViaLicenseDialogContent({ paymentViaVoucherMutate({ ...values }) .then(() => { Toaster.show({ - message: 'Payment has been done successfully.', + message: intl.get('payment_has_been_done_successfully'), intent: Intent.SUCCESS, }); return closeDialog('payment-via-voucher'); diff --git a/client/src/lang/en/index.json b/client/src/lang/en/index.json index 49af9e971..793b102b0 100644 --- a/client/src/lang/en/index.json +++ b/client/src/lang/en/index.json @@ -1121,5 +1121,6 @@ "something_went_wrong": "Something went wrong!", "please_refresh_the_page": "Please refresh the page", "waiting_to_redirect": "Waiting to redirect", - "refresh_the_page_if_redirect_not_worked": "Refresh the page if redirect not worked." + "refresh_the_page_if_redirect_not_worked": "Refresh the page if redirect not worked.", + "payment_has_been_done_successfully":"Payment has been done successfully." } \ No newline at end of file diff --git a/client/src/store/plans/plans.reducer.js b/client/src/store/plans/plans.reducer.js index 5f661231a..db0f1951f 100644 --- a/client/src/store/plans/plans.reducer.js +++ b/client/src/store/plans/plans.reducer.js @@ -1,4 +1,6 @@ +import React from 'react'; import { createReducer } from '@reduxjs/toolkit'; +import { FormattedMessage as T } from 'components'; const initialState = { plans: [ @@ -6,11 +8,12 @@ const initialState = { name: 'Free', slug: 'free', description: [ - 'Sales/purchases module.', - 'Expense module.', - 'Inventory module.', - 'Unlimited status pages.', - 'Unlimited status pages.', + , + , + , + , + , + , ], price: { month: '100', @@ -19,14 +22,15 @@ const initialState = { currencyCode: 'LYD', }, { - name: 'Pro', - slug: 'pro', + name: 'Plus', + slug: 'plus', description: [ - 'Sales/purchases module.', - 'Expense module.', - 'Inventory module.', - 'Unlimited status pages.', - 'Unlimited status pages.', + , + , + , + , + , + , ], price: { month: '200', @@ -34,6 +38,21 @@ const initialState = { }, currencyCode: 'LYD', }, + { + name: 'Enterprise', + slug: 'enterprise', + description: [ + , + , + , + , + ], + price: { + month: '300', + year: '3,400', + }, + currencyCode: 'LYD', + }, ], periods: [ { @@ -47,6 +66,4 @@ const initialState = { ], }; -export default createReducer(initialState, { - -}); +export default createReducer(initialState, {}); diff --git a/client/src/style/pages/Subscription/PlanRadio.scss b/client/src/style/pages/Subscription/PlanRadio.scss index ba8c85d45..87e8783f0 100644 --- a/client/src/style/pages/Subscription/PlanRadio.scss +++ b/client/src/style/pages/Subscription/PlanRadio.scss @@ -9,7 +9,7 @@ display: flex; flex-direction: column; width: 215px; - height: 267px; + height: 277px; border-radius: 5px; padding: 15px; border: 1px solid #dcdcdc;