diff --git a/src/pages/digitalId/Verify.jsx b/src/pages/digitalId/Verify.jsx
index 8510b51..34cd9e4 100644
--- a/src/pages/digitalId/Verify.jsx
+++ b/src/pages/digitalId/Verify.jsx
@@ -32,4 +32,4 @@ function Verify () {
)
}
-export default Verify;
\ No newline at end of file
+export default Verify;
diff --git a/src/pages/finance/TransactionDetails.jsx b/src/pages/finance/TransactionDetails.jsx
index 6a6a84c..a002889 100644
--- a/src/pages/finance/TransactionDetails.jsx
+++ b/src/pages/finance/TransactionDetails.jsx
@@ -104,4 +104,4 @@ function TransactionDetails() {
);
}
-export default TransactionDetails;
\ No newline at end of file
+export default TransactionDetails;
diff --git a/src/partials/validate/ValidateItem.jsx b/src/partials/validate/ValidateItem.jsx
new file mode 100644
index 0000000..13b013e
--- /dev/null
+++ b/src/partials/validate/ValidateItem.jsx
@@ -0,0 +1,57 @@
+import React from 'react';
+
+function ValidateTableItem(props) {
+
+ const statusColor = (status) => {
+ switch (status) {
+ case 'Correct':
+ return 'bg-emerald-100 text-emerald-600';
+ case 'Incorrect':
+ return 'bg-rose-100 text-rose-500';
+ default:
+ return 'bg-slate-100 text-slate-500';
+ }
+ };
+
+ return (
+
{ e.stopPropagation(); props.setValidatePanelOpen(true); }}>
+ |
+
+
+
+ |
+
+
+ |
+
+ {props.data}
+ |
+
+ {props.seed}
+ |
+
+
+ |
+
+ {/* Menu button */}
+
+ |
+
+ );
+}
+
+export default ValidateTableItem;
diff --git a/src/partials/validate/ValidatePanel.jsx b/src/partials/validate/ValidatePanel.jsx
new file mode 100644
index 0000000..57bd629
--- /dev/null
+++ b/src/partials/validate/ValidatePanel.jsx
@@ -0,0 +1,136 @@
+import React, { useEffect, useRef } from 'react';
+
+import Image from '../../images/transactions-image-04.svg';
+
+function TransactionPanel({
+ validatePanelOpen,
+ setValidatePanelOpen
+}) {
+
+ const closeBtn = useRef(null);
+ const panelContent = useRef(null);
+
+ // close on click outside
+ useEffect(() => {
+ const clickHandler = ({ target }) => {
+ if (!validatePanelOpen || panelContent.current.contains(target) || closeBtn.current.contains(target)) return;
+ setValidatePanelOpen(false);
+ };
+ document.addEventListener('click', clickHandler);
+ return () => document.removeEventListener('click', clickHandler);
+ });
+
+ // close if the esc key is pressed
+ useEffect(() => {
+ const keyHandler = ({ keyCode }) => {
+ if (!validatePanelOpen || keyCode !== 27) return;
+ setValidatePanelOpen(false);
+ };
+ document.addEventListener('keydown', keyHandler);
+ return () => document.removeEventListener('keydown', keyHandler);
+ });
+
+ return (
+
+
+
+
+
+
Bank Transfer
+
22/01/2022, 8:56 PM
+ {/* Details */}
+
+ {/* Top */}
+
+
+

+
+
0.012 IDN
+
Total amount fee
+
+ {/* Divider */}
+
+ {/* Bottom */}
+
+
+ Validator:
+ IT17 2207 1010 0504 0006 88
+
+
+ Recipient:
+ IT17 2207 1010 0504 0006 88
+
+
+ Transacion::
+ 145 bytes
+
+
+
+ {/* Receipts */}
+
+ {/* Notes */}
+
+ {/* Download / Report */}
+
+
+
+
+
+ );
+}
+
+export default TransactionPanel;
diff --git a/src/partials/validate/ValidateTable.jsx b/src/partials/validate/ValidateTable.jsx
new file mode 100644
index 0000000..838c276
--- /dev/null
+++ b/src/partials/validate/ValidateTable.jsx
@@ -0,0 +1,135 @@
+import React, {useEffect, useState} from "react";
+import ValidateTableItem from "./ValidateItem";
+
+function ValidateTable({
+ setValidatePanelOpen
+}) {
+
+ const validateData = [
+ {
+ id: '10',
+ check: true,
+ filed: 'Second name',
+ data: 'Pavel',
+ status: 'Correct',
+ seed: '1234 ... 1234',
+ },
+ {
+ id: '11',
+ check: true,
+ filed: 'First name',
+ data: 'Thownetc',
+ status: 'Correct',
+ seed: '4567 ... 0987',
+ },
+ {
+ id: '12',
+ check: false,
+ filed: 'Gender',
+ data: 'Female',
+ status: 'Incorrect',
+ seed: '4567 ... 0987',
+ },
+ {
+ id: '13',
+ check: false,
+ filed: 'Document',
+ data: 'Passport',
+ status: 'Missed',
+ seed: '4567 ... 0987',
+ },
+ {
+ id: '14',
+ check: true,
+ filed: 'Document ID',
+ data: '1233425345',
+ status: 'Correct',
+ seed: '1234 ... 1234',
+ },
+ ];
+
+ const [selectAll, setSelectAll] = useState(false);
+ const [isCheck, setIsCheck] = useState([]);
+ const [list, setList] = useState([]);
+
+ useEffect(() => {
+ setList(validateData);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ const handleSelectAll = () => {
+ setSelectAll(!selectAll);
+ setIsCheck(list.map(li => li.id));
+ if (selectAll) {
+ setIsCheck([]);
+ }
+ };
+
+ const handleClick = e => {
+ const { id, checked } = e.target;
+ setSelectAll(false);
+ setIsCheck([...isCheck, id]);
+ if (!checked) {
+ setIsCheck(isCheck.filter(item => item !== id));
+ }
+ };
+
+ return (
+
+
+ {/* Table */}
+
+
+ {/* Table header */}
+
+
+ |
+
+
+
+ |
+
+ FIELD
+ |
+
+ DATA
+ |
+
+ SEED
+ |
+
+ STATUS
+ |
+ |
+
+
+ {/* Table body */}
+
+ {list.map((data) => {
+ return (
+
+ );
+ })}
+
+
+
+
+
+ );
+}
+
+export default ValidateTable;
diff --git a/src/partials/validationlog/ValidateRoadMap.jsx b/src/partials/validationlog/ValidateRoadMap.jsx
new file mode 100644
index 0000000..79339b2
--- /dev/null
+++ b/src/partials/validationlog/ValidateRoadMap.jsx
@@ -0,0 +1,39 @@
+import React from "react";
+
+import ValidationSeasonItem from "./ValidationSeasonItem";
+import ValidationUsersImg from "./ValidationUsersImg";
+
+function ValidateRoadMap({ trunsSeason }) {
+
+ return (
+
+
+
+
{trunsSeason.name}
+
+
+
+ {/* List */}
+
+ {/* List item(s) */}
+ {trunsSeason.items.map((item, index) => {
+ return
+ })}
+
+
+
+
+ )
+}
+
+export default ValidateRoadMap;
diff --git a/src/partials/validationlog/ValidationSeasonItem.jsx b/src/partials/validationlog/ValidationSeasonItem.jsx
new file mode 100644
index 0000000..2b150db
--- /dev/null
+++ b/src/partials/validationlog/ValidationSeasonItem.jsx
@@ -0,0 +1,30 @@
+import React from "react";
+
+function ValidationSeasonItem({ length, item, index }) {
+ return (
+
+
+ {length-1!==index &&
}
+
+
+
+
+
{`0x${item.seasonId}`}
+
Transactions ID
+
+
+
{item.seasonId}
+
Validated data
+
+ Explore ->
+
+ );
+}
+
+export default ValidationSeasonItem
diff --git a/src/partials/validationlog/ValidationUsersImg.jsx b/src/partials/validationlog/ValidationUsersImg.jsx
new file mode 100644
index 0000000..d77bdc8
--- /dev/null
+++ b/src/partials/validationlog/ValidationUsersImg.jsx
@@ -0,0 +1,11 @@
+import React from "react";
+
+function ValidationUsersImg({ image }) {
+ return (
+
+
+
+ );
+}
+
+export default ValidationUsersImg
diff --git a/src/utils/TransactionID.js b/src/utils/TransactionID.js
index 9f24e8f..ab9527a 100644
--- a/src/utils/TransactionID.js
+++ b/src/utils/TransactionID.js
@@ -1,6 +1,10 @@
-export var TransactionID = (function(){
+export var TransactionID = (function(ID){
return function () {
- localStorage.setItem('transID', '7234ABC342342352345')
+ if(ID) {
+ localStorage.setItem('transID', ID)
+ } else {
+ localStorage.setItem('transID', '7234ABC342342352345')
+ }
return localStorage.getItem('transID')
}
-})
+})()