fix avatar show
This commit is contained in:
parent
208a6b4e26
commit
3c714fc8c5
|
@ -30,7 +30,7 @@ class AutoLogin extends Component {
|
|||
headers: {
|
||||
'Accept': 'application/json',
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': this.props.match.params.token,
|
||||
'Authorization': "Bearer " + this.props.match.params.token,
|
||||
// 'Authorization': token,
|
||||
},
|
||||
}).then((response) => {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { Card, Image as ImageAntd } from 'antd';
|
||||
import Header from 'components/layouts/Header';
|
||||
import Parser from 'html-react-parser';
|
||||
import $ from 'jquery';
|
||||
import React, { Component } from 'react';
|
||||
|
@ -407,130 +408,130 @@ class SearchImage extends Component {
|
|||
|
||||
return (
|
||||
<div className="m-portlet m-portlet--mobile pb-3">
|
||||
<div className="m-portlet__head">
|
||||
<div className="m-portlet__head-caption">
|
||||
<div className="m-portlet__head-title">
|
||||
<h3 className="font-family-text color">
|
||||
Tìm kiếm ảnh
|
||||
</h3>
|
||||
<div className="m-portlet__head">
|
||||
<div className="m-portlet__head-caption">
|
||||
<div className="m-portlet__head-title">
|
||||
<h3 className="font-family-text color">
|
||||
Tìm kiếm ảnh
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="m-portlet__body pt-2">
|
||||
<div className="m-grid__item m-grid__item--fluid m-wrapper" style={{ backgroundColor: 'white' }}>
|
||||
<div className="m-content mt-3-phone pd_phone_0 p-3">
|
||||
<div className="m-form m-form--fit m-form--label-align-right">
|
||||
<div className="row m-0">
|
||||
<div className="col-md-2 px-0">
|
||||
<img src="./img/photo-placeholder.png" id="previewImagePerson" className="text-center" style={{width: '100%', height: 'auto'}} alt="" />
|
||||
<div className="text-center p-8">
|
||||
<ReactFileReader fileTypes={['image/png', 'image/jpg', 'image/jpeg']} base64={true} multipleFiles={false} handleFiles={this.onFilesChangeImagePerson} >
|
||||
<button style={{ marginTop: '10px' }} className={'btn m-btn--icon m-btn btn-default m-loader--success m-loader--right'}>
|
||||
<span >
|
||||
<i className="la la-cloud-upload"></i>
|
||||
<span>Chọn ảnh</span>
|
||||
</span>
|
||||
</button>
|
||||
</ReactFileReader>
|
||||
<div className="m-portlet__body pt-2">
|
||||
<div className="m-grid__item m-grid__item--fluid m-wrapper" style={{ backgroundColor: 'white' }}>
|
||||
<div className="m-content mt-3-phone pd_phone_0 p-3">
|
||||
<div className="m-form m-form--fit m-form--label-align-right">
|
||||
<div className="row m-0">
|
||||
<div className="col-md-2 px-0">
|
||||
<img src="./img/photo-placeholder.png" id="previewImagePerson" className="text-center" style={{width: '100%', height: 'auto'}} alt="" />
|
||||
<div className="text-center p-8">
|
||||
<ReactFileReader fileTypes={['image/png', 'image/jpg', 'image/jpeg']} base64={true} multipleFiles={false} handleFiles={this.onFilesChangeImagePerson} >
|
||||
<button style={{ marginTop: '10px' }} className={'btn m-btn--icon m-btn btn-default m-loader--success m-loader--right'}>
|
||||
<span >
|
||||
<i className="la la-cloud-upload"></i>
|
||||
<span>Chọn ảnh</span>
|
||||
</span>
|
||||
</button>
|
||||
</ReactFileReader>
|
||||
|
||||
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner" data-interval="false">
|
||||
{rsImages}
|
||||
<div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
|
||||
<div class="carousel-inner" data-interval="false">
|
||||
{rsImages}
|
||||
</div>
|
||||
<a className={`carousel-control-prev ${rsImages.length <= 1 ? "d-none" : ""}`} href="#carouselExampleControls" role="button" data-slide="prev" onClick={() => this.handlePrevChange()}>
|
||||
<span class="carousel-control-prev-icon fa fa-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a className={`carousel-control-next ${rsImages.length <= 1 ? "d-none" : ""}`} href="#carouselExampleControls" role="button" data-slide="next" onClick={() => this.handleNextChange()}>
|
||||
<span class="carousel-control-next-icon fa fa-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
<a className={`carousel-control-prev ${rsImages.length <= 1 ? "d-none" : ""}`} href="#carouselExampleControls" role="button" data-slide="prev" onClick={() => this.handlePrevChange()}>
|
||||
<span class="carousel-control-prev-icon fa fa-chevron-left" aria-hidden="true"></span>
|
||||
<span class="sr-only">Previous</span>
|
||||
</a>
|
||||
<a className={`carousel-control-next ${rsImages.length <= 1 ? "d-none" : ""}`} href="#carouselExampleControls" role="button" data-slide="next" onClick={() => this.handleNextChange()}>
|
||||
<span class="carousel-control-next-icon fa fa-chevron-right" aria-hidden="true"></span>
|
||||
<span class="sr-only">Next</span>
|
||||
</a>
|
||||
</div>
|
||||
<div style={{ marginTop: '10px', textAlign: 'left' }}>
|
||||
<table>
|
||||
<tbody className='font-family-text'>
|
||||
<tr>
|
||||
<td>
|
||||
<span>Số kết quả: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input className="form-control form-control-sm" type="number" step="1" min="1" name="m_table_1_length" value={this.state.valueRes} onChange={(event) => this.isChangeRes(event)} aria-controls="m_table_1" />
|
||||
<div style={{ marginTop: '10px', textAlign: 'left' }}>
|
||||
<table>
|
||||
<tbody className='font-family-text'>
|
||||
<tr>
|
||||
<td>
|
||||
<span>Số kết quả: </span>
|
||||
</td>
|
||||
<td>
|
||||
<input className="form-control form-control-sm" type="number" step="1" min="1" name="m_table_1_length" value={this.state.valueRes} onChange={(event) => this.isChangeRes(event)} aria-controls="m_table_1" />
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>Tỷ lệ giống:</span>
|
||||
</td>
|
||||
<td>
|
||||
<label className="percent-simular" data-input="%">
|
||||
<input className="input-percent form-control form-control-sm" type="number" min="1" max="100" step="1" name="m_table_1_length" value={this.state.threshold} onChange={(event) => this.isChangeThreshold(event)} aria-controls="m_table_1" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>Tỷ lệ giống:</span>
|
||||
</td>
|
||||
<td>
|
||||
<label className="percent-simular" data-input="%">
|
||||
<input className="input-percent form-control form-control-sm" type="number" min="1" max="100" step="1" name="m_table_1_length" value={this.state.threshold} onChange={(event) => this.isChangeThreshold(event)} aria-controls="m_table_1" />
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div style={{ marginTop: '10px' }} className="ml-2 mb-mobile-10">
|
||||
<button
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
page_num: 1,
|
||||
listHistory: []
|
||||
}, () => {
|
||||
this.getPerson();
|
||||
})
|
||||
}}
|
||||
className="btn btn-sm btn-primary m-btn--icon" style={{backgroundColor: '#2673b4'}}>
|
||||
<span>
|
||||
<i className="la la-search" />
|
||||
<span className='font-family-text'>Tìm kiếm</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div style={{ marginTop: '10px' }} className="ml-2 mb-mobile-10">
|
||||
<button
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
page_num: 1,
|
||||
listHistory: []
|
||||
}, () => {
|
||||
this.getPerson();
|
||||
})
|
||||
}}
|
||||
className="btn btn-sm btn-primary m-btn--icon" style={{backgroundColor: '#2673b4'}}>
|
||||
<span>
|
||||
<i className="la la-search" />
|
||||
<span className='font-family-text'>Tìm kiếm</span>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div className="col-md-10">
|
||||
<div className="pl-2 row d-flex justify-content-between">
|
||||
<div>
|
||||
<Pagination
|
||||
prevPageText='Trang trước'
|
||||
nextPageText='Trang sau'
|
||||
firstPageText='Trang đầu'
|
||||
lastPageText='Trang cuối'
|
||||
activePage={this.state.page_num}
|
||||
itemsCountPerPage={this.itemsPerPage}
|
||||
totalItemsCount={this.state.totalLength}
|
||||
pageRangeDisplayed={5}
|
||||
onChange={this.handlePageChange}
|
||||
/>
|
||||
<div className="col-md-10">
|
||||
<div className="pl-2 row d-flex justify-content-between">
|
||||
<div>
|
||||
<Pagination
|
||||
prevPageText='Trang trước'
|
||||
nextPageText='Trang sau'
|
||||
firstPageText='Trang đầu'
|
||||
lastPageText='Trang cuối'
|
||||
activePage={this.state.page_num}
|
||||
itemsCountPerPage={this.itemsPerPage}
|
||||
totalItemsCount={this.state.totalLength}
|
||||
pageRangeDisplayed={5}
|
||||
onChange={this.handlePageChange}
|
||||
/>
|
||||
</div>
|
||||
<div className="pull-right">
|
||||
<div className='font-family-text'>Tổng kết quả <b>{this.state.totalLength}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="pull-right">
|
||||
<div className='font-family-text'>Tổng kết quả <b>{this.state.totalLength}</b></div>
|
||||
|
||||
<div className='row-sm row pl-3 pr-3 pb-3'>
|
||||
{bulletedImg}
|
||||
<PulseLoader
|
||||
// css={override}
|
||||
sizeUnit={"px"}
|
||||
size={12}
|
||||
margin={'2px'}
|
||||
color={'#36D7B7'}
|
||||
loading={this.state.loading}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='row-sm row pl-3 pr-3 pb-3'>
|
||||
{bulletedImg}
|
||||
<PulseLoader
|
||||
// css={override}
|
||||
sizeUnit={"px"}
|
||||
size={12}
|
||||
margin={'2px'}
|
||||
color={'#36D7B7'}
|
||||
loading={this.state.loading}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ class Header extends Component {
|
|||
username : localStorage.getItem('username'),
|
||||
obj_id : localStorage.getItem('obj_id'),
|
||||
isLogin: Store.getState().isLogin.isLogin,
|
||||
role: Store.getState().role.role,
|
||||
role: JSON.parse(localStorage.getItem('roles')),
|
||||
access_token: Store.getState().isLogin.access_token,
|
||||
full_name: ""
|
||||
};
|
||||
|
@ -40,7 +40,9 @@ class Header extends Component {
|
|||
Store.dispatch(setbox(data.data.company_id));
|
||||
localStorage.setItem("roles", JSON.stringify(data.data.roles));
|
||||
Store.dispatch(role(data.data.roles));
|
||||
|
||||
this.setState({
|
||||
role: data.data.roles,
|
||||
full_name: data.data.full_name
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user