diff --git a/src/css/tailwind.config.js b/src/css/tailwind.config.js
index 4d79d5f..ca30b85 100644
--- a/src/css/tailwind.config.js
+++ b/src/css/tailwind.config.js
@@ -20,6 +20,7 @@ module.exports = {
inter: ['Inter', 'sans-serif'],
},
fontSize: {
+ descriptionSize: ['0.75rem', { lineHeight: '1.25' }],
xxs: ['0.625rem', { lineHeight: '0.75' }],
xs: ['0.75rem', { lineHeight: '1.5' }],
sm: ['0.875rem', { lineHeight: '1.5715' }],
diff --git a/src/pages/digitalId/ProfileId.jsx b/src/pages/digitalId/ProfileId.jsx
index cc9898d..8a17a34 100644
--- a/src/pages/digitalId/ProfileId.jsx
+++ b/src/pages/digitalId/ProfileId.jsx
@@ -6,17 +6,49 @@ import ProfileTable from '../../partials/digitalId/ProfileTable';
import Image from '../../images/transactions-image-04.svg';
function Profile () {
- const [sidebarOpen, setSidebarOpen] = useState(false);
+ const [leftSidebarOpen, setLeftSidebarOpen] = useState(false);
+ const [rightSidebarOpen, setRightSidebarOpen] = useState(true);
+ const [removeFormOpen, setRemoveFormOpen] = useState(false);
+ const [changeFormOpen, setChangeFormOpen] = useState(false);
const [toggle, setToggle] = useState(true);
+ const [formOpen, setFormOpen] = useState(false);
+ const [selectedItems, setSelectedItems] = useState([]);
+ const handleSelectedItems = (selectedItems) => {
+ setSelectedItems([...selectedItems]);
+ if (selectedItems.length > 0) {
+ setRightSidebarOpen(false);
+ setChangeFormOpen(true);
+ }
+ };
+
+ const openAddForm = () => {
+ setFormOpen(true);
+ setRightSidebarOpen(false);
+ }
+
+ const cancelAddForm = () => {
+ setFormOpen(false);
+ setRightSidebarOpen(true);
+ }
+
+ const openRemoveForm = () => {
+ setRemoveFormOpen(true);
+ setChangeFormOpen(false);
+ }
+
+ const canselRemoveForm = () => {
+ setRemoveFormOpen(false);
+ setRightSidebarOpen(true);
+ }
return (
{/* Sidebar */}
-
+
{/* Content area */}
{/* Site header */}
-
+
@@ -43,78 +75,203 @@ function Profile () {
{/* Table */}
-
+
- {/* Sidebar */}
+ {/* left Sidebar */}
- {/* Form */}
-
-
-
-
-
+ {/* Form with button*/}
+
+
+
+
+
+ {/* Add Form */}
+
+
+
-
-
-
+
+
Store data on blockchain
+
+
+ setToggle(!toggle)} />
+
+
+
-
-
-
+ {/* Buttons */}
+
+
+
-
-
Store data on blockchain
-
-
-
setToggle(!toggle)} />
-
+ {/* Details */}
+
+ {/* Top */}
+
+
+

+
+
0.012 IDN
+
Total amount fee
+
+ {/* Divider */}
+
+
+
+
+ Validator:
+ IT17 2207 1010 0504 0006 88
+
+
+ Recipient:
+ IT17 2207 1010 0504 0006 88
+
+
+ Transacion::
+ 145 bytes
- {/* Buttons */}
-
-
-
+
+ {/* Field change form */}
+
+
+
+
+
- {/* Details */}
-
- {/* Top */}
-
-
-

+ {/* Remove form */}
+
+
+
Summary
+
+ Second name
+ Birthday
+
+
+
On blockchain too
+
+
+ setToggle(!toggle)} />
+
+
+
+
+ {/* Buttons */}
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do Terms.
-
0.012 IDN
-
Total amount fee
- {/* Divider */}
-
-
-
-
+ {/* Details */}
+
+ {/* Top */}
+
+
+

+
+
0.012 IDN
+
Total amount fee
-
-
-
-
-
-
Validator:
-
IT17 2207 1010 0504 0006 88
+ {/* Divider */}
+
-
- Recipient:
- IT17 2207 1010 0504 0006 88
-
-
-
Transacion::
-
145 bytes
+
+
+ Validator:
+ IT17 2207 1010 0504 0006 88
+
+
+ Recipient:
+ IT17 2207 1010 0504 0006 88
+
+
+ Transacion::
+ 145 bytes
+
diff --git a/src/partials/digitalId/ProfileTable.jsx b/src/partials/digitalId/ProfileTable.jsx
index 095d624..c2d1da1 100644
--- a/src/partials/digitalId/ProfileTable.jsx
+++ b/src/partials/digitalId/ProfileTable.jsx
@@ -1,11 +1,28 @@
-import React from 'react';
+import React, {useState, useEffect} from 'react';
import ProfileTableItem from './ProfileTableItem';
import ProfileIcon from '../../images/profile-icon.svg';
import Avatar01 from '../../images/avatar-01.jpg';
import Avatar02 from '../../images/avatar-02.jpg';
import Avatar03 from '../../images/avatar-03.jpg';
-function ProfileTable() {
+function ProfileTable({
+ selectedItems
+}) {
+
+ const [isCheck, setIsCheck] = useState([]);
+
+ useEffect(() => {
+ selectedItems(isCheck);
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, [isCheck]);
+
+ const handleClick = e => {
+ const { id, checked } = e.target;
+ setIsCheck([...isCheck, id]);
+ if (!checked) {
+ setIsCheck(isCheck.filter(item => item !== id));
+ }
+ };
const userData = [
{
@@ -160,6 +177,8 @@ function ProfileTable() {
status={data.status}
transactions={data.transactions}
avatars={data.avatars}
+ handleClick={handleClick}
+ isChecked={isCheck.includes(data.id)}
/>
)
})
@@ -184,6 +203,8 @@ function ProfileTable() {
status={data.status}
transactions={data.transactions}
avatars={data.avatars}
+ handleClick={handleClick}
+ isChecked={isCheck.includes(data.id)}
/>
)
})
@@ -208,6 +229,8 @@ function ProfileTable() {
status={data.status}
transactions={data.transactions}
avatars={data.avatars}
+ handleClick={handleClick}
+ isChecked={isCheck.includes(data.id)}
/>
)
})
diff --git a/src/partials/digitalId/ProfileTableItem.jsx b/src/partials/digitalId/ProfileTableItem.jsx
index ccc8faa..d6e9168 100644
--- a/src/partials/digitalId/ProfileTableItem.jsx
+++ b/src/partials/digitalId/ProfileTableItem.jsx
@@ -28,20 +28,20 @@ function ProfileTableItem(props) {
{(props.status === 'Progress') ? (
-
- {props.status}
- ) :
- (props.status === 'Stored') ? (
-
- {props.status}
- ) :
- (props.status === 'Completed') ? (
-
- {props.status}
- ) : (
-
- {props.status}
- )
+
+ {props.status}
+ ) :
+ (props.status === 'Stored') ? (
+
+ {props.status}
+ ) :
+ (props.status === 'Completed') ? (
+
+ {props.status}
+ ) : (
+
+ {props.status}
+ )
}
|