fix: stiching API profile and last history
This commit is contained in:
parent
28c42b3453
commit
2cc6dc53c0
|
@ -57,32 +57,32 @@ export const Profile = observer(() => {
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<div>
|
<div>
|
||||||
<Title strong>Profile</Title>
|
<Title strong>Profile</Title>
|
||||||
{/*<Row>*/}
|
<Row>
|
||||||
{/* <Col span={10}>*/}
|
<Col span={10}>
|
||||||
{/* <Text strong>Name</Text>*/}
|
<Text strong>Name</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={14}>*/}
|
<Col span={14}>
|
||||||
{/* <Text>{store.authentication.profileData.username}</Text>*/}
|
<Text>{store.authentication.profileData?.username}</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={10}>*/}
|
<Col span={10}>
|
||||||
{/* <Text strong>Role</Text>*/}
|
<Text strong>Role</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={14}>*/}
|
<Col span={14}>
|
||||||
{/* <Text>{store.authentication.profileData.roles.name}</Text>*/}
|
<Text>{store.authentication.profileData.roles?.name}</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={10}>*/}
|
<Col span={10}>
|
||||||
{/* <Text strong>Superior</Text>*/}
|
<Text strong>Superior</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={14}>*/}
|
<Col span={14}>
|
||||||
{/* <Text>{store.authentication.profileData.superior.username}</Text>*/}
|
<Text>{store.authentication.profileData.superior?.username}</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={10}>*/}
|
<Col span={10}>
|
||||||
{/* <Text strong>Wallet</Text>*/}
|
<Text strong>Wallet</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/* <Col span={14}>*/}
|
<Col span={14}>
|
||||||
{/* <Text>{store.authentication.profileData.wallet}</Text>*/}
|
<Text>{store.authentication.profileData.wallet}</Text>
|
||||||
{/* </Col>*/}
|
</Col>
|
||||||
{/*</Row>*/}
|
</Row>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
|
@ -53,7 +53,7 @@ export class Authentication {
|
||||||
async getProfile() {
|
async getProfile() {
|
||||||
try {
|
try {
|
||||||
const response = await http.get('/auth/profile');
|
const response = await http.get('/auth/profile');
|
||||||
this.profileData = response.body.data;
|
this.profileData = response.body;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
throw e;
|
throw e;
|
||||||
|
|
|
@ -20,7 +20,7 @@ export class Transaction {
|
||||||
total_dataSubCategories = 0;
|
total_dataSubCategories = 0;
|
||||||
|
|
||||||
pageHistoryTransaction = 0;
|
pageHistoryTransaction = 0;
|
||||||
pageSizeHistoryTransaction = 10
|
// pageSizeHistoryTransaction = 10
|
||||||
dataHistoryTransaction = [];
|
dataHistoryTransaction = [];
|
||||||
total_dataHistoryTransaction = 0;
|
total_dataHistoryTransaction = 0;
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ export class Transaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getDataHistoryTransaction() {
|
async getDataHistoryTransaction() {
|
||||||
const response = await http.get(`/transaction/history?page=${this.pageHistoryTransaction}&pageSize=${this.pageSizeHistoryTransaction}`);
|
const response = await http.get(`/transaction/history?page=${this.pageHistoryTransaction}`);
|
||||||
|
|
||||||
this.dataHistoryTransaction = response.body.data ?? []
|
this.dataHistoryTransaction = response.body.data ?? []
|
||||||
this.total_dataHistoryTransaction = response.body.total_data ?? 0
|
this.total_dataHistoryTransaction = response.body.total_data ?? 0
|
||||||
|
|
Loading…
Reference in New Issue
Block a user