update [3]

This commit is contained in:
2022-01-14 23:10:52 +07:00
parent 9931eb70aa
commit b521a6e774
9 changed files with 30 additions and 37 deletions

View File

@@ -16,9 +16,9 @@ import { useSelector } from 'react-redux';
const initialDataPost = {
index: 1,
item_per_page: 5,
item_per_page: 10,
search_data: "",
is_deleted: -1,
is_deleted: 0,
}
export default function User() {
@@ -48,7 +48,7 @@ export default function User() {
const [offset, setOffset] = useState(0)
const [dataPost, setDataPost] = useState(initialDataPost)
const itemsPerPage = 5
const itemsPerPage = 10
const location = useLocation();
@@ -191,7 +191,7 @@ export default function User() {
<td>{gender}</td>
<td>{value.birthday !== "" ? momment(value.birthday).format("DD-MM-YYYY") : ""}</td>
<td>{value.phone_number}</td>
<td>
{/* <td>
{
value.is_deleted === 1
?
@@ -199,7 +199,7 @@ export default function User() {
:
<span className="m-badge m-badge--accent m-badge--wide">Hoạt động</span>
}
</td>
</td> */}
{(dataRole?.indexOf('user:edit') === -1 && dataRole?.indexOf('user:delete') === -1) ? "" :
<td>
{dataRole?.indexOf('user:edit') !== -1 ?
@@ -284,10 +284,11 @@ export default function User() {
<div className="m-portlet__head-caption pl-3">
<div className="m-portlet__head-title">
<h3 className="m-portlet__head-text">
Quản lí người dùng
Quản lý người dùng
</h3>
</div>
</div>
{dataRole?.indexOf('user:edit') !== -1 ?
<div className="m-portlet__head-tools pr-3">
<ul className="m-portlet__nav">
<li className="m-portlet__nav-item">
@@ -320,7 +321,7 @@ export default function User() {
} */}
</li>
</ul>
</div>
</div> : "" }
</div>
<div className="m-portlet__body m-portlet__body--no-padding">
<div className="row m-row--no-padding m-row--col-separator-xl">
@@ -339,13 +340,13 @@ export default function User() {
placeholder="Tên đăng nhập/Họ tên..."
data-col-index={0} />
</div>
<div className="form-group m-form__group col-xl-2">
{/* <div className="form-group m-form__group col-xl-2">
<Select
value={valueSelected}
onChange={changeHandleFilter}
options={optionSelect}
/>
</div>
</div> */}
<div className="pl-3">
<button
onClick={() => {
@@ -383,7 +384,7 @@ export default function User() {
<th style={{ 'verticalAlign': 'middle' }}>Giới tính</th>
<th style={{ 'verticalAlign': 'middle' }}>Ngày sinh</th>
<th style={{ 'verticalAlign': 'middle' }}>Số điện thoại</th>
<th style={{ 'verticalAlign': 'middle' }}>Trạng thái</th>
{/* <th style={{ 'verticalAlign': 'middle' }}>Trạng thái</th> */}
{(dataRole?.indexOf('user:edit') === -1 && dataRole?.indexOf('user:delete') === -1) ? "" : <th style={{ 'verticalAlign': 'middle', 'width': '150px' }}>Thao tác</th>}
</tr>
</thead>