Merge branch 'feature/TKA-29-' of gitea.beetai.com:huyt/fsi_project into feature/TKA-29-

This commit is contained in:
bi 2022-12-20 17:15:23 +07:00
commit cf41426c51
11 changed files with 57 additions and 44 deletions

View File

@ -39,9 +39,9 @@
.text-navbar {
/* font-family: inherit; */
font-family: 'Roboto Condensed Bold', ;
font-weight: 900;
font-size: 15;
font-family: 'Roboto Condensed', ;
font-weight: 600;
font-size: 25;
color: #fff;
}

View File

@ -282,7 +282,7 @@ class ImportImage extends Component {
activePage: 1
})
}}
className="btn btn-accent m-btn m-btn--icon" id="m_search">
className="btn btn-primary m-btn m-btn--icon" style={{backgroundColor: '#2673b4'}} id="m_search">
<span>
<i className="la la-search" />
<span className="font-family-text">Tìm kiếm</span>
@ -310,10 +310,11 @@ class ImportImage extends Component {
modalUploadShow: true,
})
}}
className="btn btn-accent m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
style={{backgroundColor: '#2673b4'}}
className="btn btn-primary m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
<span>
<i className="la la-plus" />
<span>Tải ảnh lên</span>
<span className="font-family-text">Tải ảnh lên</span>
</span>
</button>
</div>
@ -321,8 +322,9 @@ class ImportImage extends Component {
</div>
{/*begin: Datatable */}
<table className="table table-striped- table-bordered table-hover table-checkable font-family-text" id="m_table_1">
<thead>
<tr>
<thead className='k-grid-header' role='rowgroup' style={{backgroundColor: '#2673b4'}}>
<tr className='font-family-text color' style={{color: 'white', fontWeight: 600, fontSize: 16,}}>
<th style={{width: "50px"}}>STT</th>
<th>Ảnh</th>
<th>Tên ảnh</th>

View File

@ -264,7 +264,7 @@ export default function LabelImage() {
setActivePage(1)
getData(dataPost)
}}
className="btn btn-accent m-btn m-btn--icon" id="m_search">
className="btn btn-primary m-btn m-btn--icon" id="m_search" style={{backgroundColor: '#2673b4'}}>
<span>
<i className="la la-search" />
<span className='font-family-text'>Tìm kiếm</span>
@ -300,7 +300,7 @@ export default function LabelImage() {
setDataEdit(dataEdit)
setShowModal(true)
}}
className="btn btn-accent m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
className="btn btn-primary m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air" style={{backgroundColor: '#2673b4'}}>
<span>
<i className="la la-plus" />
<span>Thêm mới</span>
@ -310,8 +310,9 @@ export default function LabelImage() {
</div>
{/*begin: Datatable */}
<table className="table table-striped- font-family-text color table-bordered table-hover table-checkable" id="m_table_1">
<thead>
<tr>
<thead className='k-grid-header' role='rowgroup' style={{backgroundColor: '#2673b4'}}>
<tr className='font-family-text color' style={{color: 'white', fontWeight: 600, fontSize: 16,}}>
<th>Ảnh</th>
<th>Họ tên</th>
<th>FacebookID</th>

View File

@ -258,7 +258,7 @@ export default function ListItem() {
setActivePage(1)
getData(dataPost)
}}
className="btn btn-accent m-btn m-btn--icon" id="m_search">
className="btn btn-primary m-btn m-btn--icon" id="m_search" style={{backgroundColor: '#2673b4'}}>
<span>
<i className="la la-search" />
<span className='font-family-text'>Tìm kiếm</span>
@ -294,7 +294,8 @@ export default function ListItem() {
setDataEdit(dataEdit)
setShowModal(true)
}}
className="btn btn-accent m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
style={{backgroundColor: '#2673b4'}}
className="btn btn-primary m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
<span>
<i className="la la-plus" />
<span className='font-family-text'>Thêm mới</span>
@ -304,8 +305,8 @@ export default function ListItem() {
</div>
{/*begin: Datatable */}
<table className="table table-striped- table-bordered table-hover table-checkable" id="m_table_1">
<thead>
<tr className='font-family-text color'>
<thead className='k-grid-header' role='rowgroup' style={{backgroundColor: '#2673b4'}}>
<tr className='font-family-text color' style={{color: 'white', fontWeight: 600, fontSize: 16,}}>
<th >Ảnh</th>
<th>Họ tên</th>
<th>Giới tính</th>

View File

@ -5,6 +5,7 @@ import React from 'react';
import { Button, Modal } from 'react-bootstrap';
import swal from 'sweetalert';
import { HOST } from '../../config/index';
import Store from '../../store';
const ModalPassword = (props) => {
const { show, onHide, obj_id } = props;
@ -14,7 +15,11 @@ const ModalPassword = (props) => {
const click_handle = async () => {
let dataPost = {password: form.getFieldValue('password')}
console.log(dataPost, obj_id)
const result = await axios.patch(`${HOST}/api/users/${obj_id}/password`, { password: form.getFieldValue('password') })
const headers = {
'Content-Type': 'application/json',
'Authorization': Store.getState().isLogin.access_token,
}
const result = await axios.patch(`${HOST}/api/users/${obj_id}/password`,{headers} ,{ password: form.getFieldValue('password') })
if (result.data.status === 10000) {
swal({
icon: 'success',

View File

@ -53,7 +53,11 @@ const ModalUser = (props) => {
const getLevel = async () => {
let result = await axios.get(`${HOST}/api/levels/company/1`)
const headers = {
'Content-Type': 'application/json',
'Authorization': Store.getState().isLogin.access_token,
}
let result = await axios.get(`${HOST}/api/levels/company/1`, {headers} )
if (result.data.status === 10000) {
var listOptions = []
for (let i = 0; i < result.data.data.length; i++) {

View File

@ -233,7 +233,7 @@ class Role extends Component {
},
modalRole: true,
});
}} className="btn btn-accent m-btn m-btn--custom m-btn--icon m-btn--pill m-btn--air">
}} className="btn btn-primary m-btn--custom m-btn--icon" style={{backgroundColor:'#2673b4'}}>
<span>
<i className="la la-plus" />
<span className='font-family-text'>Thêm mới</span>
@ -249,12 +249,12 @@ class Role extends Component {
<div className="m-widget1 col-xl-8 mx-auto">
<div className="table-responsive text-nowrap">
<table className="table table-bordered font-family-text color table-hover table-checkable dataTable no-footer dtr-inline collapsed">
<thead>
<thead className='k-grid-header' role='rowgroup' style={{color: 'white', fontWeight: 600, fontSize: 16, backgroundColor: '#2673b4'}}>
<tr>
<th style={{ 'verticalAlign': 'middle', 'width': '100px' }}>STT</th>
<th style={{ 'verticalAlign': 'middle' }}>Tên</th>
{/* <th style={{ 'verticalAlign': 'middle', 'width': '200px' }}>Trạng thái</th> */}
{(this.state.dataRole?.indexOf('level:edit') === -1 && this.state.dataRole?.indexOf('level:delete') === -1) ? "" : <th style={{ 'verticalAlign': 'middle', 'width': '150px' }}>Thao tác</th>}
{(this.state.dataRole?.indexOf('level:edit') === -1 && this.state.dataRole?.indexOf('level:delete') === -1) ? "" : <th style={{ 'verticalAlign': 'middle', 'width': '150px'}}>Thao tác</th>}
</tr>
</thead>
<tbody>

View File

@ -482,10 +482,10 @@ class SearchImage extends Component {
this.getPerson();
})
}}
className="btn btn-accent m-btn m-btn--icon">
className="btn btn-sm btn-primary m-btn--icon" style={{backgroundColor: '#2673b4'}}>
<span>
<i className="la la-search" />
<span>Tìm kiếm</span>
<span className='font-family-text'>Tìm kiếm</span>
</span>
</button>
</div>

View File

@ -53,7 +53,7 @@ export default function Test() {
</div>
<div className="m-portlet__body pt-2">
<div className="pb-4 pt-4">
<button type="button" onClick={() => test()} className="btn font-family-text btn-success">Test</button>
<button type="button" onClick={() => test()} className="btn font-family-text btn-primary" style={{backgroundColor: '#2673b4'}}>Test</button>
</div>
<PulseLoader
// css={override}

View File

@ -354,7 +354,7 @@ export default function User() {
setActivePage(1)
getData(dataPost)
}}
className="btn btn-accent m-btn m-btn--icon" id="m_search">
className="btn btn-primary m-btn m-btn--icon" style={{backgroundColor: '#2673b4'}} id="m_search">
<span>
<i className="la la-search" />
<span className='font-family-text'>Tìm kiếm</span>

View File

@ -48,10 +48,10 @@ class MenuBar extends Component {
{this.state.dataRole?.indexOf('search:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/search-image" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-search-1" />
<i className="text-navbar m-menu__link-icon fa fa-search" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Tìm kiếm</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Tìm kiếm</span>
</span>
</span>
</NavLink>
@ -64,7 +64,7 @@ class MenuBar extends Component {
<i className="text-navbar m-menu__link-icon flaticon-tabs" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Kho ảnh</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Kho ảnh</span>
</span>
</span>
</NavLink>
@ -74,10 +74,10 @@ class MenuBar extends Component {
{this.state.dataRole?.indexOf('famous:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/list-famous" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-avatar" />
<i className="text-navbar m-menu__link-icon fa fa-user-tie mr-2" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Người nổi tiếng</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Người nổi tiếng</span>
</span>
</span>
</NavLink>
@ -87,54 +87,54 @@ class MenuBar extends Component {
{this.state.dataRole?.indexOf('person:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/label-image" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-delete" />
<i className="text-navbar m-menu__link-icon fa fa-tags" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Gán nhãn</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Gán nhãn</span>
</span>
</span>
</NavLink>
</li>
: ""}
{this.state.dataRole?.indexOf('user:view') !== -1 ?
{/* {this.state.dataRole?.indexOf('user:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/user" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-users" />
<i className="text-navbar m-menu__link-icon fas fa-user-cog mr-2" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Quản người dùng</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Quản người dùng</span>
</span>
</span>
</NavLink>
</li>
: ""}
: ""} */}
{this.state.dataRole?.indexOf('level:view') !== -1 ?
{/* {this.state.dataRole?.indexOf('level:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/role" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-map" />
<i className="text-navbar m-menu__link-icon fa fa-sitemap" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Thiết lập quyền</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Thiết lập quyền</span>
</span>
</span>
</NavLink>
</li>
: ""}
: ""} */}
{this.state.dataRole?.indexOf('level:view') !== -1 ?
{/* {this.state.dataRole?.indexOf('level:view') !== -1 ?
<li className="m-menu__item m-menu__item--submenu" aria-haspopup="true" m-menu-submenu-toggle="hover">
<NavLink to="/test" className={"m-menu__link " + active} activeClassName="m-menu__item--active" onClick={() => this.onClickClose()}>
<i className="text-navbar m-menu__link-icon flaticon-edit" />
<i className="text-navbar m-menu__link-icon fa fa-user-check" />
<span className="m-menu__link-title">
<span className="m-menu__link-wrap">
<span className="text-navbar">Độ chính xác</span>
<span className="text-navbar" style={{fontSize: 20, fontFamily: 'Roboto'}}>Độ chính xác</span>
</span>
</span>
</NavLink>
</li>
: ""}
: ""} */}
</ul>
</div>
{/* END: Aside Menu */}