diff --git a/src/components/Alert/style.module.scss b/src/components/Alert/style.module.scss deleted file mode 100644 index 74b4e9a5a..000000000 --- a/src/components/Alert/style.module.scss +++ /dev/null @@ -1,26 +0,0 @@ -.root { - - - &_danger { - - - - } - - &__primary{ - - - .title{ - color: #1a3bd4; - } - } -} - - -.title { - -} - -.description { - -} \ No newline at end of file diff --git a/src/components/Typo/Paragraph.js b/src/components/Typo/Paragraph.js new file mode 100644 index 000000000..526425de3 --- /dev/null +++ b/src/components/Typo/Paragraph.js @@ -0,0 +1,6 @@ +import React from 'react'; +import clsx from 'classnames'; + +export function Paragraph({ className, children }) { + return

{children}

; +} \ No newline at end of file diff --git a/src/components/Typo/index.js b/src/components/Typo/index.js new file mode 100644 index 000000000..6d06a82b4 --- /dev/null +++ b/src/components/Typo/index.js @@ -0,0 +1,2 @@ + +export * from './Paragraph'; \ No newline at end of file diff --git a/src/components/index.js b/src/components/index.js index 068947018..4617b6fb2 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -88,6 +88,7 @@ export * from './IntersectionObserver'; export * from './SMSPreview'; export * from './Contacts'; export * from './Utils/Join'; +export * from './Typo'; const Hint = FieldHint; diff --git a/src/containers/Alerts/TransactionLocking/cancelUnlockingPartialAlert.js b/src/containers/Alerts/TransactionLocking/cancelUnlockingPartialAlert.js index 487cb2805..39395029f 100644 --- a/src/containers/Alerts/TransactionLocking/cancelUnlockingPartialAlert.js +++ b/src/containers/Alerts/TransactionLocking/cancelUnlockingPartialAlert.js @@ -1,6 +1,6 @@ import React from 'react'; import intl from 'react-intl-universal'; -import { FormattedMessage as T, FormattedHTMLMessage } from 'components'; +import { FormattedMessage as T } from 'components'; import { Intent, Alert } from '@blueprintjs/core'; import { AppToaster } from 'components'; @@ -61,9 +61,8 @@ function CancelUnlockingPartialTarnsactions({ return ( } - confirmButtonText={} - icon="trash" - intent={Intent.WARNING} + confirmButtonText={} + intent={Intent.DANGER} isOpen={isOpen} onCancel={handleCancel} onConfirm={handleConfirm} diff --git a/src/containers/GlobalErrors/GlobalErrors.js b/src/containers/GlobalErrors/GlobalErrors.js index 20ae7dae9..f3df0ea00 100644 --- a/src/containers/GlobalErrors/GlobalErrors.js +++ b/src/containers/GlobalErrors/GlobalErrors.js @@ -52,6 +52,16 @@ function GlobalErrors({ toastKeySomethingWrong, ); } + if (globalErrors.transactionsLocked) { + AppToaster.show({ + message: + 'Transactions before 13 Dec 2021 has been locked. Hence action cannot be performed.', + intent: Intent.DANGER, + onDismiss: () => { + globalErrorsSet({ transactionsLocked: false }); + }, + }); + } return null; } diff --git a/src/containers/TransactionsLocking/TransactionsLockingList.js b/src/containers/TransactionsLocking/TransactionsLockingList.js index 933f66171..08f403ea5 100644 --- a/src/containers/TransactionsLocking/TransactionsLockingList.js +++ b/src/containers/TransactionsLocking/TransactionsLockingList.js @@ -1,10 +1,9 @@ import React from 'react'; -import clsx from 'classnames'; import { Intent } from '@blueprintjs/core'; import styled from 'styled-components'; import * as R from 'ramda'; -import { Alert, ButtonLink, AppToaster, Join } from 'components'; +import { Alert, ButtonLink, AppToaster, Join, Paragraph } from 'components'; import { TransactionsLockingProvider } from './TransactionsLockingProvider'; import { TransactionLockingContent, @@ -19,10 +18,6 @@ import { validateMoveToPartialLocking, } from './utils'; -function Paragraph({ className, children }) { - return

{children}

; -} - function TransactionsLockingList({ items, onLock, @@ -37,6 +32,7 @@ function TransactionsLockingList({ module, formatted_module, description, + ...item }) => ( ), ); diff --git a/src/containers/TransactionsLocking/components.js b/src/containers/TransactionsLocking/components.js index 9f78ace72..6d23875d7 100644 --- a/src/containers/TransactionsLocking/components.js +++ b/src/containers/TransactionsLocking/components.js @@ -40,8 +40,17 @@ export const TransactionLockingContent = ({ name, description, module, + isEnabled, + lockToDate, + lockReason, + + // Unlock props. isPartialUnlock, + unlockToDate, + unlockFromDate, + unlockReason, + onLock, onEditLock, onUnlockFull, @@ -76,16 +85,43 @@ export const TransactionLockingContent = ({ {name} - - {isPartialUnlock && ( - - Partial unlocked - - )} - - Lorem ipsum dolor sit amet, consectetur adipisicing elit. - + + + + Lorem ipsum dolor sit amet, consectetur adipisicing elit. + + + + + + + Transactions of the module locked to{' '} + {lockToDate}. + + + + + Lock Reason: {lockReason} + + + + + + + + + Partial unlocked from {unlockFromDate} to{' '} + {unlockToDate}. + + + + + Unlock Reason: {unlockReason} + + + + @@ -208,4 +244,31 @@ export const TransLockingContent = styled.div` flex: 1 1 0; margin-left: 20px; width: 100%; + padding-right: 10px; +`; + +export const TransLockingReason = styled.div` + font-size: 13px; + + strong { + color: #777; + } +`; + +const TransUnlockWrap = styled.div` + padding-top: 12px; + border-top: 1px solid #ddd; + margin-top: 12px; + + ${TransLockingReason} { + margin-top: 8px; + } + ${TransLockingItemDesc} { + font-size: 13px; + } +`; +const TransLockWrap = styled.div` + ${TransLockingReason} { + margin-top: 10px; + } `; diff --git a/src/lang/en/index.json b/src/lang/en/index.json index 006dba940..80dbb7944 100644 --- a/src/lang/en/index.json +++ b/src/lang/en/index.json @@ -1619,7 +1619,6 @@ "unlocking_full_transactions.dialog.label": "Full unlocking transactions", "unlocking_full_transactions.dialog.reason": "Unlocking reason", "unlocking_partial_transactions.alert.success_message": "Partial transaction unlocking has been canceled successfully.", - "unlocking_partial_transactions.alert.message": "Are you sure you want to cancel this ?" - - + "unlocking_partial_transactions.alert.message": "Are you sure you want to cancel partial unlock of this module?", + "yes": "Yes" } \ No newline at end of file