feat: manual journal drawer & paper footer RLT.

This commit is contained in:
elforjani3
2021-06-27 14:08:32 +02:00
parent c42a134b76
commit a6770c145b
4 changed files with 13 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import React, { lazy } from 'react'; import React, { lazy } from 'react';
import { Drawer, DrawerSuspense } from 'components'; import { Drawer, DrawerSuspense } from 'components';
import withDrawers from 'containers/Drawer/withDrawers'; import withDrawers from 'containers/Drawer/withDrawers';
import intl from 'react-intl-universal';
import { compose } from 'utils'; import { compose } from 'utils';
@@ -17,7 +18,7 @@ function ExpenseDrawer({
payload: { expenseId, title }, payload: { expenseId, title },
}) { }) {
return ( return (
<Drawer isOpen={isOpen} name={name} title={'Expense'}> <Drawer isOpen={isOpen} name={name} title={intl.get('expense')}>
<DrawerSuspense> <DrawerSuspense>
<ExpenseDrawerContent expenseId={expenseId} /> <ExpenseDrawerContent expenseId={expenseId} />
</DrawerSuspense> </DrawerSuspense>

View File

@@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import { useJournal } from 'hooks/query'; import { useJournal } from 'hooks/query';
import { DashboardInsider, DrawerHeaderContent } from 'components'; import { DashboardInsider, DrawerHeaderContent } from 'components';
import intl from 'react-intl-universal';
const ManualJournalDrawerContext = React.createContext(); const ManualJournalDrawerContext = React.createContext();
@@ -25,7 +26,9 @@ function ManualJournalDrawerProvider({ manualJournalId, ...props }) {
<DashboardInsider loading={isJournalLoading}> <DashboardInsider loading={isJournalLoading}>
<DrawerHeaderContent <DrawerHeaderContent
name={'journal-drawer'} name={'journal-drawer'}
title={`Manual Journal ${manualJournal?.journal_number}`} title={intl.get('manual_journal_number', {
number: manualJournal?.journal_number,
})}
/> />
<ManualJournalDrawerContext.Provider value={provider} {...props} /> <ManualJournalDrawerContext.Provider value={provider} {...props} />
</DashboardInsider> </DashboardInsider>

View File

@@ -1,5 +1,6 @@
import React from 'react'; import React from 'react';
import { If } from 'components'; import { If } from 'components';
import intl from 'react-intl-universal';
export default function PaperTemplateFooter({ export default function PaperTemplateFooter({
footerData: { terms_conditions }, footerData: { terms_conditions },
@@ -8,7 +9,7 @@ export default function PaperTemplateFooter({
<div className="template__terms"> <div className="template__terms">
<If condition={terms_conditions}> <If condition={terms_conditions}>
<div className="template__terms__title"> <div className="template__terms__title">
<h4>Conditions and terms</h4> <h4>{intl.get('conditions_and_terms')}</h4>
</div> </div>
<ul> <ul>

View File

@@ -1122,5 +1122,7 @@
"please_refresh_the_page": "Please refresh the page", "please_refresh_the_page": "Please refresh the page",
"waiting_to_redirect": "Waiting to redirect", "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." "payment_has_been_done_successfully": "Payment has been done successfully.",
"manual_journal_number": "Manual journal {number}",
"conditions_and_terms":"Conditions and terms"
} }