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