Skip to content

Commit

Permalink
feat: remove erpt from deep link redirection page and clean up report…
Browse files Browse the repository at this point in the history
… code (#3037)
  • Loading branch information
bistaastha authored Jun 5, 2024
1 parent 8efd2cf commit 3862c7d
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 2,053 deletions.
732 changes: 0 additions & 732 deletions src/app/core/mock-data/api-reports.data.ts

Large diffs are not rendered by default.

328 changes: 1 addition & 327 deletions src/app/core/mock-data/stats-response.data.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import deepFreeze from 'deep-freeze-strict';

import { Datum, StatsResponse } from '../models/v2/stats-response.model';
import { StatsResponse } from '../models/v2/stats-response.model';
// type StatsResponse = {
// data: {
// dimensions: string[];
Expand All @@ -15,192 +13,6 @@ import { Datum, StatsResponse } from '../models/v2/stats-response.model';
// aggregates?: string;
// };

export const apiReportStatsRes = new StatsResponse({
data: [
{
dimensions: ['rp_state'],
name: '1',
value: [
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 28758273650702.816,
},
{
function_name: 'count(rp_id)',
function_value: 56,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'APPROVED',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 642147.297922,
},
{
function_name: 'count(rp_id)',
function_value: 2,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'APPROVER_INQUIRY',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 5177243929.65219,
},
{
function_name: 'count(rp_id)',
function_value: 45,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'APPROVER_PENDING',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 93165.91,
},
{
function_name: 'count(rp_id)',
function_value: 6,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'DRAFT',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 1221297040.1711,
},
{
function_name: 'count(rp_id)',
function_value: 33,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'PAID',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 501602.12,
},
{
function_name: 'count(rp_id)',
function_value: 4,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'PAYMENT_PENDING',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 5012.12,
},
{
function_name: 'count(rp_id)',
function_value: 7,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'PAYMENT_PROCESSING',
},
],
},
],
},
],
url: '/v2/reports/stats',
});

export const apiReportStatsEmptyRes = new StatsResponse({
data: [
{
dimensions: ['rp_state'],
name: '1',
value: [
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 642147.297922,
},
{
function_name: 'count(rp_id)',
function_value: 2,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'APPROVER_INQUIRY',
},
],
},
{
aggregates: [
{
function_name: 'sum(rp_amount)',
function_value: 1221297040.1711,
},
{
function_name: 'count(rp_id)',
function_value: 33,
},
],
key: [
{
column_name: 'rp_state',
column_value: 'PAID',
},
],
},
],
},
],
url: '/v2/reports/stats',
});

export const apiAssignedCardDetailsRes = new StatsResponse({
data: [
{
Expand Down Expand Up @@ -278,141 +90,3 @@ export const apiAssignedCardDetailsRes = new StatsResponse({
],
url: '/v2/expenses_and_ccce/stats',
});

export const apiReportStatsRawRes = new StatsResponse({
data: [
{
aggregates: [
{
function_name: 'count(rp_id)',
function_value: 3,
},
{
function_name: 'sum(rp_amount)',
function_value: 2804.2892810000003,
},
],
dimensions: [],
name: 'scalar_stat',
},
],
url: '/v2/reports/stats',
});

export const txnStats = new StatsResponse({
data: [
{
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 8,
},
{
function_name: 'sum(tx_amount)',
function_value: 10583.73,
},
],
dimensions: [],
name: 'scalar_stat',
},
],
url: '/v2/expenses/stats',
});

export const transactionDatum1: Datum[] = deepFreeze([
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 4,
},
{
function_name: 'sum(tx_amount)',
function_value: 3494,
},
],
},
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 964,
},
{
function_name: 'sum(tx_amount)',
function_value: 568437,
},
],
},
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 5,
},
{
function_name: 'sum(tx_amount)',
function_value: 371.87,
},
],
},
]);

export const transactionDatum2: Datum[] = deepFreeze([
{
name: '',
dimensions: [],
aggregates: [],
},
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 964,
},
{
function_name: 'sum(tx_amount)',
function_value: 568437,
},
],
},
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 5,
},
{
function_name: 'sum(tx_amount)',
function_value: 371.87,
},
],
},
]);

export const transactionDatum3: Datum[] = deepFreeze([
{
name: '',
dimensions: [],
aggregates: [
{
function_name: 'count(tx_id)',
function_value: 4,
},
{
function_name: 'sum(tx_amount)',
function_value: null,
},
],
},
]);
Loading

0 comments on commit 3862c7d

Please sign in to comment.