add spentBalance
This commit is contained in:
@@ -98,6 +98,7 @@ export async function getViolationFilesArray() {
|
||||
|
||||
if (response.ok) {
|
||||
let parsed = await response.json();
|
||||
|
||||
if (parsed.length) {
|
||||
return parsed;
|
||||
} else {
|
||||
@@ -150,6 +151,15 @@ export async function fetchViolationStats() {
|
||||
export async function getFileViolations(fileId: string, page: number, status?: string) {
|
||||
const token = await getSessionData('token');
|
||||
|
||||
console.log({
|
||||
file_id: fileId,
|
||||
page: page,
|
||||
size: 5,
|
||||
sort_direction: "desc",
|
||||
token: token,
|
||||
status: status
|
||||
})
|
||||
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/api/v1/data`, {
|
||||
method: 'POST',
|
||||
@@ -173,6 +183,8 @@ export async function getFileViolations(fileId: string, page: number, status?: s
|
||||
|
||||
if (response.ok) {
|
||||
let parsed = await response.json();
|
||||
console.log(parsed);
|
||||
|
||||
if (parsed.message_body) {
|
||||
return parsed.message_body;
|
||||
} else {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function IncomeAndPayments() {
|
||||
<div className="earning-card warning">
|
||||
<h4>Выплачено</h4>
|
||||
<p>
|
||||
{/* {activeInvites?.totalIncome - activeInvites?.availableIncome + activeInvites?.holdBalance} */}
|
||||
{activeInvites?.spentBalance}
|
||||
</p>
|
||||
<small>Успешно выплачено на ваши счета</small>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user