Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
A
Aqbits Trace Code
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mai Thanh Cong
Aqbits Trace Code
Commits
850d7b56
Commit
850d7b56
authored
Jun 30, 2021
by
Vinh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
create detail profile page
parent
75165956
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1000 additions
and
35 deletions
+1000
-35
src/index.js
src/index.js
+7
-0
src/reoutes.js
src/reoutes.js
+4
-0
src/views/Index.js
src/views/Index.js
+1
-0
src/views/IndexSections/Inputs.js
src/views/IndexSections/Inputs.js
+70
-35
src/views/examples/DetailProfile.js
src/views/examples/DetailProfile.js
+918
-0
No files found.
src/index.js
View file @
850d7b56
...
@@ -29,6 +29,8 @@ import Login from "views/examples/Login.js";
...
@@ -29,6 +29,8 @@ import Login from "views/examples/Login.js";
import
Profile
from
"
views/examples/Profile.js
"
;
import
Profile
from
"
views/examples/Profile.js
"
;
import
Register
from
"
views/examples/Register.js
"
;
import
Register
from
"
views/examples/Register.js
"
;
import
Tracecode
from
"
views/examples/Tracecode.js
"
import
Tracecode
from
"
views/examples/Tracecode.js
"
import
DetailProfile
from
"
views/examples/DetailProfile.js
"
import
{
Routes
}
from
"
./reoutes
"
;
ReactDOM
.
render
(
ReactDOM
.
render
(
<
BrowserRouter
>
<
BrowserRouter
>
...
@@ -39,6 +41,11 @@ ReactDOM.render(
...
@@ -39,6 +41,11 @@ ReactDOM.render(
exact
exact
render
=
{
props
=>
<
Tracecode
{...
props
}
/>
}
render
=
{
props
=>
<
Tracecode
{...
props
}
/>
}
/>
/>
<
Route
path
=
{
'
/profile/detail
'
}
exact
render
=
{
props
=>
<
DetailProfile
{...
props
}
/>
}
/>
<
Route
<
Route
path
=
"
/landing-page
"
path
=
"
/landing-page
"
exact
exact
...
...
src/reoutes.js
0 → 100644
View file @
850d7b56
export
const
Routes
=
{
SearchDetail
:
{
path
:
"
./profile
"
},
TraceCode
:
{
path
:
"
./trace-code
"
}
}
\ No newline at end of file
src/views/Index.js
View file @
850d7b56
...
@@ -60,6 +60,7 @@ class Index extends React.Component {
...
@@ -60,6 +60,7 @@ class Index extends React.Component {
<
Hero
/>
<
Hero
/>
<
section
className
=
"
section
"
>
<
section
className
=
"
section
"
>
<
Container
>
<
Container
>
<
Inputs
/>
<
/Container
>
<
/Container
>
<
/section
>
<
/section
>
<
/main
>
<
/main
>
...
...
src/views/IndexSections/Inputs.js
View file @
850d7b56
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
*/
import
React
from
"
react
"
;
import
React
,
{
useState
,
useEffect
}
from
"
react
"
;
// nodejs library that concatenates classes
// nodejs library that concatenates classes
import
classnames
from
"
classnames
"
;
import
classnames
from
"
classnames
"
;
// reactstrap components
// reactstrap components
...
@@ -27,32 +27,61 @@ import {
...
@@ -27,32 +27,61 @@ import {
InputGroup
,
InputGroup
,
Container
,
Container
,
Row
,
Row
,
Col
Col
,
Button
,
Form
}
from
"
reactstrap
"
;
}
from
"
reactstrap
"
;
import
{
useHistory
}
from
'
react-router-dom
'
;
import
dummyData
from
"
../../data/index.json
"
;
import
{
Routes
}
from
"
../../reoutes
"
;
const
Inputs
=
()
=>
{
const
[
searchProfile
,
setSearchProfile
]
=
useState
();
const
history
=
useHistory
();
const
handleChangeSearch
=
(
event
)
=>
{
console
.
log
(
"
change change
"
);
setSearchProfile
(
event
.
target
.
value
);
}
const
onHandleSearch
=
()
=>
{
console
.
log
(
"
dummyData.data
"
,
dummyData
.
data
);
const
nameCode
=
dummyData
.
data
.
map
(
item
=>
item
.
code
);
console
.
log
(
"
nameCode
"
,
nameCode
);
if
(
searchProfile
===
nameCode
){
history
.
push
({
pathname
:
Routes
.
SearchProfile
.
path
+
`
${
searchProfile
}
`
,
state
:
{
code_name
:
searchProfile
}
});
}
else
{
history
.
push
(
""
);
}
console
.
log
(
"
this.state.searchProfile
"
,
searchProfile
);
}
class
Inputs
extends
React
.
Component
{
state
=
{};
render
()
{
return
(
return
(
<>
<>
<
section
className
=
"
section pb-0 section-components
"
>
<
section
className
=
"
section pb-0 section-components
"
>
<
Container
className
=
"
mb-5
"
>
<
Container
className
=
"
mb-5
"
>
{
/* Inputs */
}
{
/* Inputs */
}
<
h3
className
=
"
h4 text-success font-weight-bold mb-4
"
>
Inputs
<
/h3
>
<
h3
className
=
"
h4 text-success font-weight-bold mb-4
"
>
Search
profile
<
/h3
>
<
div
className
=
"
mb-3
"
>
{
/*
<div className="mb-3">
<small className="text-uppercase font-weight-bold">
<small className="text-uppercase font-weight-bold">
Form controls
Form controls
</small>
</small>
<
/div
>
</div>
*/
}
<
Row
>
<
Row
>
<
Col
lg
=
"
4
"
sm
=
"
6
"
>
<
Col
lg
=
"
4
"
sm
=
"
6
"
>
<
FormGroup
>
{
/*
<FormGroup>
<Input placeholder="Regular" type="text" />
<Input placeholder="Regular" type="text" />
<
/FormGroup
>
</FormGroup> */
}
<
FormGroup
<
FormGroup
className
=
{
classnames
({
//
className={classnames({
focused
:
this
.
state
.
searchFocused
//
focused: this.state.searchFocused
})}
//
})}
>
>
<
InputGroup
className
=
"
mb-4
"
>
<
InputGroup
className
=
"
mb-4
"
>
<
InputGroupAddon
addonType
=
"
prepend
"
>
<
InputGroupAddon
addonType
=
"
prepend
"
>
...
@@ -63,13 +92,20 @@ class Inputs extends React.Component {
...
@@ -63,13 +92,20 @@ class Inputs extends React.Component {
<
Input
<
Input
placeholder
=
"
Search
"
placeholder
=
"
Search
"
type
=
"
text
"
type
=
"
text
"
onFocus
=
{
e
=>
this
.
setState
({
searchFocused
:
true
})}
// onFocus={e => this.setState({ searchFocused: true })}
onBlur
=
{
e
=>
this
.
setState
({
searchFocused
:
false
})}
// onBlur={e => this.setState({ searchFocused: false })}
value
=
{
searchProfile
}
onChange
=
{
handleChangeSearch
}
/
>
/
>
<
/InputGroup
>
<
/InputGroup
>
<
/FormGroup
>
<
/FormGroup
>
<
Button
className
=
"
btn-1
"
color
=
"
primary
"
type
=
"
button
"
onClick
=
{
onHandleSearch
}
>
Search
<
/Button
>
<
/Col
>
<
/Col
>
<
Col
lg
=
"
4
"
sm
=
"
6
"
>
{
/* <Col lg="4" sm="6">
<FormGroup>
<FormGroup>
<Input disabled placeholder="Regular" type="text" />
<Input disabled placeholder="Regular" type="text" />
</FormGroup>
</FormGroup>
...
@@ -108,12 +144,12 @@ class Inputs extends React.Component {
...
@@ -108,12 +144,12 @@ class Inputs extends React.Component {
type="email"
type="email"
/>
/>
</FormGroup>
</FormGroup>
<
/Col
>
</Col>
*/
}
<
/Row
>
<
/Row
>
<
/Container
>
<
/Container
>
<
div
className
=
"
py-5 bg-secondary
"
>
{
/*
<div className="py-5 bg-secondary">
<Container>
<Container>
{
/* Inputs (alternative) */
}
Inputs (alternative)
<div className="mb-3">
<div className="mb-3">
<small className="text-uppercase font-weight-bold">
<small className="text-uppercase font-weight-bold">
Form controls (alternative)
Form controls (alternative)
...
@@ -199,11 +235,10 @@ class Inputs extends React.Component {
...
@@ -199,11 +235,10 @@ class Inputs extends React.Component {
</Col>
</Col>
</Row>
</Row>
</Container>
</Container>
<
/div
>
</div>
*/
}
<
/section
>
<
/section
>
<
/
>
<
/
>
);
);
}
}
}
export
default
Inputs
;
export
default
Inputs
;
src/views/examples/DetailProfile.js
0 → 100644
View file @
850d7b56
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment