diff --git a/src/components/Card.js b/src/components/Card.js
deleted file mode 100644
index 2374c2cb1..000000000
--- a/src/components/Card.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-import styled from 'styled-components';
-
-export default function Card({ className, children }) {
- return {children};
-}
-
-const CardRoot = styled.div`
- padding: 15px;
- margin: 15px;
- background: #fff;
- border: 1px solid #d2dce2;
-`;
diff --git a/src/components/Card/index.js b/src/components/Card/index.js
new file mode 100644
index 000000000..598085686
--- /dev/null
+++ b/src/components/Card/index.js
@@ -0,0 +1,27 @@
+import React from 'react';
+import styled from 'styled-components';
+
+export function Card({ className, children }) {
+ return {children};
+}
+
+const CardRoot = styled.div`
+ padding: 15px;
+ margin: 15px;
+ background: #fff;
+ border: 1px solid #d2dce2;
+`;
+
+export const CardFooterActions = styled.div`
+ padding-top: 16px;
+ border-top: 1px solid #e0e7ea;
+ margin-top: 30px;
+
+ .bp3-button {
+ min-width: 70px;
+
+ + .bp3-button {
+ margin-left: 10px;
+ }
+ }
+`;
diff --git a/src/components/CommercialDoc/index.js b/src/components/CommercialDoc/index.js
index fc2d191c4..c8e2c593b 100644
--- a/src/components/CommercialDoc/index.js
+++ b/src/components/CommercialDoc/index.js
@@ -1,5 +1,5 @@
import styled from 'styled-components';
-import Card from '../Card';
+import { Card } from '../Card';
import DataTable from '../DataTable';
export const CommercialDocBox = styled(Card)`
@@ -22,4 +22,4 @@ export const CommercialDocEntriesTable = styled(DataTable)`
export const CommercialDocFooter = styled.div`
margin-top: 25px;
-`
\ No newline at end of file
+`;
diff --git a/src/components/index.js b/src/components/index.js
index ba9c0b162..feb3f934c 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -54,7 +54,6 @@ import Postbox from './Postbox';
import AccountsSuggestField from './AccountsSuggestField';
import MaterialProgressBar from './MaterialProgressBar';
import { MoneyFieldCell } from './DataTableCells';
-import Card from './Card';
import AvaterCell from './AvaterCell';
import { ItemsMultiSelect } from './Items';
@@ -92,6 +91,7 @@ export * from './Typo';
export * from './TextStatus';
export * from './Tags';
export * from './CommercialDoc';
+export * from './Card';
const Hint = FieldHint;
@@ -158,7 +158,6 @@ export {
MaterialProgressBar,
MoneyFieldCell,
ItemsMultiSelect,
- Card,
AvaterCell,
MoreMenuItems,
};
diff --git a/src/containers/Drawers/AccountDrawer/AccountDrawerTable.js b/src/containers/Drawers/AccountDrawer/AccountDrawerTable.js
index 7027dd8bf..649f01a86 100644
--- a/src/containers/Drawers/AccountDrawer/AccountDrawerTable.js
+++ b/src/containers/Drawers/AccountDrawer/AccountDrawerTable.js
@@ -12,6 +12,7 @@ import { useAccountReadEntriesColumns } from './utils';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { TableStyle } from '../../../common';
+import { useAppIntlContext } from 'components/AppIntlProvider';
/**
* account drawer table.
@@ -26,6 +27,8 @@ function AccountDrawerTable({ closeDrawer }) {
const handleLinkClick = () => {
closeDrawer(drawerName);
};
+ // Application intl context.
+ const { isRTL } = useAppIntlContext();
return (
@@ -42,7 +45,7 @@ function AccountDrawerTable({ closeDrawer }) {
to={`/financial-reports/general-ledger`}
onClick={handleLinkClick}
>
- ← {intl.get('view_more_transactions')}
+ {isRTL ? '→' : '←'} {intl.get('view_more_transactions')}
diff --git a/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetail.js b/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetail.js
index 1e9176bbf..b432a4db2 100644
--- a/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetail.js
+++ b/src/containers/Drawers/InvoiceDetailDrawer/InvoiceDetail.js
@@ -3,7 +3,8 @@ import { Tab } from '@blueprintjs/core';
import styled from 'styled-components';
import intl from 'react-intl-universal';
-import { Can, DrawerMainTabs } from 'components';
+import { useAbilityContext } from 'hooks/utils';
+import { DrawerMainTabs } from 'components';
import {
PaymentReceiveAction,
AbilitySubject,
@@ -18,6 +19,8 @@ import InvoiceDetailTab from './InvoiceDetailTab';
* @returns {React.JSX}
*/
function InvoiceDetailsTabs() {
+ const ability = useAbilityContext();
+
return (
}
/>
- {/* */}
- }
- />
- {/* */}
+ {ability.can(
+ PaymentReceiveAction.View,
+ AbilitySubject.PaymentReceive,
+ ) && (
+ }
+ />
+ )}
);
}
diff --git a/src/containers/InventoryAdjustments/InventoryAdjustmentList.js b/src/containers/InventoryAdjustments/InventoryAdjustmentList.js
index dddb4e756..99ba1c7d8 100644
--- a/src/containers/InventoryAdjustments/InventoryAdjustmentList.js
+++ b/src/containers/InventoryAdjustments/InventoryAdjustmentList.js
@@ -26,8 +26,6 @@ function InventoryAdjustmentList({
-
-
);
diff --git a/src/containers/Preferences/Accountant/AccountantForm.js b/src/containers/Preferences/Accountant/AccountantForm.js
index 474ac29b0..fc5e1c233 100644
--- a/src/containers/Preferences/Accountant/AccountantForm.js
+++ b/src/containers/Preferences/Accountant/AccountantForm.js
@@ -15,6 +15,7 @@ import {
FormattedMessage as T,
AccountsSelectList,
FieldRequiredHint,
+ CardFooterActions,
} from 'components';
import { handleStringChange, inputIntent } from 'utils';
import { ACCOUNT_TYPE } from 'common/accountTypes';
@@ -229,14 +230,14 @@ export default function AccountantForm() {
)}
-
+
-
+
);
}
diff --git a/src/containers/Preferences/General/GeneralForm.js b/src/containers/Preferences/General/GeneralForm.js
index 2fc72621d..7925d5279 100644
--- a/src/containers/Preferences/General/GeneralForm.js
+++ b/src/containers/Preferences/General/GeneralForm.js
@@ -5,6 +5,7 @@ import classNames from 'classnames';
import { TimezonePicker } from '@blueprintjs/timezone';
import { ErrorMessage, FastField } from 'formik';
import { useHistory } from 'react-router-dom';
+import styled from 'styled-components';
import { FormattedMessage as T } from 'components';
import { ListSelect, FieldRequiredHint } from 'components';
@@ -242,14 +243,28 @@ export default function PreferencesGeneralForm({ isSubmitting }) {
)}
-
+
-
+
);
}
+
+const CardFooterActions = styled.div`
+ padding-top: 16px;
+ border-top: 1px solid #e0e7ea;
+ margin-top: 30px;
+
+ .bp3-button {
+ min-width: 70px;
+
+ + .bp3-button{
+ margin-left: 10px;
+ }
+ }
+`;
\ No newline at end of file
diff --git a/src/containers/Preferences/General/GeneralFormPage.js b/src/containers/Preferences/General/GeneralFormPage.js
index ae0bdf605..190a55215 100644
--- a/src/containers/Preferences/General/GeneralFormPage.js
+++ b/src/containers/Preferences/General/GeneralFormPage.js
@@ -42,7 +42,7 @@ function GeneralFormPage({
const initialValues = {
...transformToForm(organization.metadata, defaultValues),
};
-
+ // Handle the form submit.
const handleFormSubmit = (values, { setSubmitting, resetForm }) => {
// Handle request success.
const onSuccess = (response) => {
diff --git a/src/containers/Preferences/Item/ItemPreferencesForm.js b/src/containers/Preferences/Item/ItemPreferencesForm.js
index 4f82fcf95..1dc6f0415 100644
--- a/src/containers/Preferences/Item/ItemPreferencesForm.js
+++ b/src/containers/Preferences/Item/ItemPreferencesForm.js
@@ -6,6 +6,7 @@ import {
AccountsSelectList,
FieldRequiredHint,
FormattedMessage as T,
+ CardFooterActions
} from 'components';
import { inputIntent } from 'utils';
import { ACCOUNT_PARENT_TYPE, ACCOUNT_TYPE } from 'common/accountTypes';
@@ -135,14 +136,14 @@ export default function ItemForm() {
)}
-
+
-
+
);
}
diff --git a/src/containers/TransactionsLocking/TransactionsLockingBody.js b/src/containers/TransactionsLocking/TransactionsLockingBody.js
index a47fbef99..2190907fd 100644
--- a/src/containers/TransactionsLocking/TransactionsLockingBody.js
+++ b/src/containers/TransactionsLocking/TransactionsLockingBody.js
@@ -41,7 +41,7 @@ function TransactionsLockingBodyJsx({
const handleUnlockingPartial = (module) => {
openDialog('unlocking-partial-transactions', { module: module });
};
- // Handle cancel.
+ // Handle cancel partial unlocking.
const handleCancelUnlockingPartail = (module) => {
openAlert('cancel-unlocking-partail', { module: module });
};
diff --git a/src/lang/ar/index.json b/src/lang/ar/index.json
index e990087bf..fcb77558b 100644
--- a/src/lang/ar/index.json
+++ b/src/lang/ar/index.json
@@ -1645,9 +1645,9 @@
"unlocking_partial_transactions.alert.cancel_message": "تم إلغاء فتح المعاملات الجزئي بنجاح.",
"unlocking_partial_transactions.alert.message": "هل أنت متأكد تريد إلغاء قفل الجزئي لهذه الوحدة؟ ",
"yes": "نعم",
- "transactions_locking.lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة →",
- "transactions_locking.lock_modules_individually": "قفل الوحدات بشكل فردي →",
- "transactions_locking_lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة .",
+ "transactions_locking.lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة ←",
+ "transactions_locking.lock_modules_individually": "قفل الوحدات بشكل فردي ←",
+ "transactions_locking_lock_all_transactions_at_once": "قفل جميع المعاملات دفعة واحدة.",
"transactions_locking.lock": "قفل",
"transactions_locking.unlock": "الغاء القفل",
"transactions_locking.full_unlock": "إلغاء القفل الكامل",
diff --git a/src/style/pages/Preferences/GeneralForm.scss b/src/style/pages/Preferences/GeneralForm.scss
index 2a5bec102..283ea9fae 100644
--- a/src/style/pages/Preferences/GeneralForm.scss
+++ b/src/style/pages/Preferences/GeneralForm.scss
@@ -3,23 +3,6 @@
// General page
//---------------------------------
.preferences-page__inside-content--general {
- .card {
- padding: 25px;
-
- .card__footer {
- padding-top: 16px;
- border-top: 1px solid #e0e7ea;
- margin-top: 30px;
-
- .bp3-button {
- min-width: 70px;
-
- + .bp3-button{
- margin-left: 10px;
- }
- }
- }
- }
.bp3-form-group {
max-width: 650px;