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