Commit 5646e9e3 authored by Mai Thanh Cong's avatar Mai Thanh Cong

display image in table list profile

parent 95103dd7
...@@ -20,7 +20,7 @@ const AddProfile = () => { ...@@ -20,7 +20,7 @@ const AddProfile = () => {
console.log("list data", detailProfile); console.log("list data", detailProfile);
const [profileName, setProfileName] = useState(profileId ? detailProfile.name : ""); const [profileName, setProfileName] = useState(profileId ? detailProfile.name : "");
const [profileCode, setProfileCode] = useState(profileId ? detailProfile.code : {}); const [profileCode, setProfileCode] = useState(profileId ? detailProfile.code : "");
const [logo, setLogo] = useState(profileId ? detailProfile.logo : {}); const [logo, setLogo] = useState(profileId ? detailProfile.logo : {});
const [phoneNumber, setPhoneNumber] = useState(profileId ? detailProfile.phone_number : ""); const [phoneNumber, setPhoneNumber] = useState(profileId ? detailProfile.phone_number : "");
const [profileAddress, setProfileAddress] = useState(profileId ? detailProfile.address : ""); const [profileAddress, setProfileAddress] = useState(profileId ? detailProfile.address : "");
......
...@@ -54,8 +54,8 @@ import AmazingTeam from "components/Footers/AmazingTeam.js"; ...@@ -54,8 +54,8 @@ import AmazingTeam from "components/Footers/AmazingTeam.js";
// index page sections // index page sections
import Download from "../IndexSections/Download.js"; import Download from "../../views/IndexSections/Download.js";
import Tabs from "../IndexSections/Tabs.js"; import Tabs from "../../views/IndexSections/Tabs.js";
const Tracecode = () => { const Tracecode = () => {
const [plainTabs, setPlainTabs] = useState(1); const [plainTabs, setPlainTabs] = useState(1);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"name": "Công ty TNHH sáng tạo KIS", "name": "Công ty TNHH sáng tạo KIS",
"logo": "/image/logo/kis-academy.jpg", "logo": "/image/logo/kis-academy.jpg",
"address": "Tầng 5 - Technosoft Số 8 ngõ 15 Duy Tân, Dịch Vọng Hậu, Cầu Giấy, Hà Nội", "address": "Tầng 5 - Technosoft Số 8 ngõ 15 Duy Tân, Dịch Vọng Hậu, Cầu Giấy, Hà Nội",
"phone_number": "024 3795 5218", "phone_number": "024 3795 521",
"qr_code": "/image/qrcode/qr-code.png", "qr_code": "/image/qrcode/qr-code.png",
"created_at": 1624870109921, "created_at": 1624870109921,
"profile_product": [ "profile_product": [
......
...@@ -30,10 +30,10 @@ import Landing from "views/examples/Landing.js"; ...@@ -30,10 +30,10 @@ import Landing from "views/examples/Landing.js";
import Login from "views/examples/Login.js"; 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 NotFound from "views/examples/NotFound.js" import NotFound from "views/examples/NotFound.js"
import DetailProfile from "./components/Profile/DetailProfile.js" import DetailProfile from "./components/Profile/DetailProfile.js"
import SearchProfile from "./components/Profile/SearchProfile.js"; import SearchProfile from "./components/Profile/SearchProfile.js";
import Tracecode from "./components/Profile/Tracecode.js"
// import { Routes } from "./reoutes"; // import { Routes } from "./reoutes";
ReactDOM.render( ReactDOM.render(
......
...@@ -69,12 +69,12 @@ export const ProfileTable = (props) => { ...@@ -69,12 +69,12 @@ export const ProfileTable = (props) => {
<tr> <tr>
<th scope="row">{""}</th> <th scope="row">{""}</th>
<td>{name}</td> <td>{name}</td>
<td>{logo}</td> <td><img src={window.location.origin + logo} alt="logo" width={50} height={50} /></td>
<td>{phone_number}</td> <td>{phone_number}</td>
<td>{address}</td> <td>{address}</td>
<td>{productName}</td> <td>{productName}</td>
<td>{created_at ? profileFormatDateTime(created_at) : ""}</td> <td>{created_at ? profileFormatDateTime(created_at) : ""}</td>
<td>{qr_code}</td> <td><img src={window.location.origin + qr_code} alt="qr-code" width={50} height={50} /></td>
<td key={id}> <td key={id}>
<Dropdown size="sm" isOpen={dropdownOpen} toggle={toggle}> <Dropdown size="sm" isOpen={dropdownOpen} toggle={toggle}>
<DropdownToggle caret> <DropdownToggle caret>
...@@ -112,7 +112,7 @@ export const ProfileTable = (props) => { ...@@ -112,7 +112,7 @@ export const ProfileTable = (props) => {
<h5>{"Thông tin doanh nghiệp"}</h5> <h5>{"Thông tin doanh nghiệp"}</h5>
</Col> </Col>
<Col className="text-right"> <Col className="text-right">
<Button className="btn-1 ml-1" color="success" type="button" onClick={() => onHandleClickAdd()}>{"Tạo mới doanh nghiệp"}</Button> <Button className="btn-1 ml-1" color="success" size="sm" type="button" onClick={() => onHandleClickAdd()}>{"Tạo mới doanh nghiệp"}</Button>
</Col> </Col>
</Row> </Row>
</CardHeader> </CardHeader>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment