mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2024-11-19 01:40:29 +01:00
Changed Filters date pipe to match view format
This commit is contained in:
parent
c4c98fdf13
commit
7f275be31e
@ -159,7 +159,7 @@ export class CLNLiquidityAdsListComponent implements OnInit, OnDestroy {
|
||||
break;
|
||||
|
||||
case 'last_timestamp':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.last_timestamp || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.last_timestamp || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'compact_lease':
|
||||
|
@ -141,7 +141,7 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = (rowData.received_time ? this.datePipe.transform(new Date(rowData.received_time * 1000), 'dd/MMM/YYYY HH:mm')!.toLowerCase() : '') +
|
||||
(rowData.resolved_time ? this.datePipe.transform(new Date(rowData.resolved_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') +
|
||||
(rowData.resolved_time ? this.datePipe.transform(new Date(rowData.resolved_time * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') +
|
||||
(rowData.payment_hash ? rowData.payment_hash.toLowerCase() : '') +
|
||||
(rowData.in_channel ? rowData.in_channel.toLowerCase() : '') + (rowData.out_channel ? rowData.out_channel.toLowerCase() : '') +
|
||||
(rowData.in_channel_alias ? rowData.in_channel_alias.toLowerCase() : '') + (rowData.out_channel_alias ? rowData.out_channel_alias.toLowerCase() : '') +
|
||||
@ -150,7 +150,7 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On
|
||||
|
||||
case 'received_time':
|
||||
case 'resolved_time':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'in_msatoshi':
|
||||
|
@ -164,8 +164,8 @@ export class CLNForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = (rowData.received_time ? this.datePipe.transform(new Date(rowData.received_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() + ' ' : '') +
|
||||
(rowData.resolved_time ? this.datePipe.transform(new Date(rowData.resolved_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() + ' ' : '') +
|
||||
rowToFilter = (rowData.received_time ? this.datePipe.transform(new Date(rowData.received_time * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() + ' ' : '') +
|
||||
(rowData.resolved_time ? this.datePipe.transform(new Date(rowData.resolved_time * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() + ' ' : '') +
|
||||
(rowData.in_channel ? rowData.in_channel.toLowerCase() + ' ' : '') + (rowData.out_channel ? rowData.out_channel.toLowerCase() + ' ' : '') +
|
||||
(rowData.in_channel_alias ? rowData.in_channel_alias.toLowerCase() + ' ' : '') + (rowData.out_channel_alias ? rowData.out_channel_alias.toLowerCase() + ' ' : '') +
|
||||
(rowData.in_msatoshi ? (rowData.in_msatoshi / 1000) + ' ' : '') + (rowData.out_msatoshi ? (rowData.out_msatoshi / 1000) + ' ' : '') + (rowData.fee ? rowData.fee + ' ' : '');
|
||||
@ -173,7 +173,7 @@ export class CLNForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
|
||||
|
||||
case 'received_time':
|
||||
case 'resolved_time':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'in_msatoshi':
|
||||
|
@ -135,14 +135,14 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = (rowData.received_time ? this.datePipe.transform(new Date(rowData.received_time * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') +
|
||||
rowToFilter = (rowData.received_time ? this.datePipe.transform(new Date(rowData.received_time * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') +
|
||||
(rowData.in_channel_alias ? rowData.in_channel_alias.toLowerCase() : '') +
|
||||
((rowData.failreason && this.CLNFailReason[rowData.failreason]) ? this.CLNFailReason[rowData.failreason].toLowerCase() : '') +
|
||||
(rowData.in_msatoshi ? (rowData.in_msatoshi / 1000) : '');
|
||||
break;
|
||||
|
||||
case 'received_time':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.received_time || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.received_time || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'in_msatoshi':
|
||||
|
@ -216,8 +216,8 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.paid_at || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase()! +
|
||||
(this.datePipe.transform(new Date((rowData.expires_at || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase()) +
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.paid_at || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase()! +
|
||||
(this.datePipe.transform(new Date((rowData.expires_at || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase()) +
|
||||
((rowData.bolt12) ? 'bolt12' : (rowData.bolt11) ? 'bolt11' : 'keysend') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
@ -227,7 +227,7 @@ export class CLNLightningInvoicesTableComponent implements OnInit, AfterViewInit
|
||||
|
||||
case 'expires_at':
|
||||
case 'paid_at':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'type':
|
||||
|
@ -161,7 +161,7 @@ export class CLNOfferBookmarksTableComponent implements OnInit, AfterViewInit, O
|
||||
break;
|
||||
|
||||
case 'lastUpdatedAt':
|
||||
rowToFilter = this.datePipe.transform(new Date(rowData.lastUpdatedAt || 0), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date(rowData.lastUpdatedAt || 0), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'amountMSat':
|
||||
|
@ -323,7 +323,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.created_at) ? this.datePipe.transform(new Date(rowData.created_at * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + ((rowData.bolt12) ? 'bolt12' : (rowData.bolt11) ? 'bolt11' : 'keysend') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.created_at) ? this.datePipe.transform(new Date(rowData.created_at * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + ((rowData.bolt12) ? 'bolt12' : (rowData.bolt11) ? 'bolt11' : 'keysend') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
@ -331,7 +331,7 @@ export class CLNLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
break;
|
||||
|
||||
case 'created_at':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'msatoshi_sent':
|
||||
|
@ -103,11 +103,11 @@ export class ECLOnChainTransactionHistoryComponent implements OnInit, OnDestroy
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'timestamp':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -155,11 +155,11 @@ export class ECLForwardingHistoryComponent implements OnInit, OnChanges, AfterVi
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'timestamp':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.timestamp || 0)), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData.timestamp || 0)), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'fee':
|
||||
|
@ -191,7 +191,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
@ -201,7 +201,7 @@ export class ECLLightningInvoicesComponent implements OnInit, AfterViewInit, OnD
|
||||
case 'timestamp':
|
||||
case 'expiresAt':
|
||||
case 'receivedAt':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'amount':
|
||||
|
@ -135,11 +135,11 @@ export class ECLLightningPaymentsComponent implements OnInit, AfterViewInit, OnD
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.firstPartTimestamp) ? this.datePipe.transform(new Date(rowData.firstPartTimestamp), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.firstPartTimestamp) ? this.datePipe.transform(new Date(rowData.firstPartTimestamp), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'firstPartTimestamp':
|
||||
rowToFilter = this.datePipe.transform(new Date(rowData.firstPartTimestamp || 0), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date(rowData.firstPartTimestamp || 0), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -133,7 +133,7 @@ export class OnChainTransactionHistoryComponent implements OnInit, OnChanges, On
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.time_stamp) ? this.datePipe.transform(new Date(rowData.time_stamp * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.time_stamp) ? this.datePipe.transform(new Date(rowData.time_stamp * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'time_stamp':
|
||||
|
@ -150,11 +150,11 @@ export class ForwardingHistoryComponent implements OnInit, AfterViewInit, OnChan
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.timestamp) ? this.datePipe.transform(new Date(rowData.timestamp * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'timestamp':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -187,13 +187,13 @@ export class LightningInvoicesComponent implements OnInit, AfterViewInit, OnDest
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = (rowData.creation_date ? this.datePipe.transform(new Date(rowData.creation_date * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '')! +
|
||||
(rowData.settle_date ? this.datePipe.transform(new Date(rowData.settle_date * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = (rowData.creation_date ? this.datePipe.transform(new Date(rowData.creation_date * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '')! +
|
||||
(rowData.settle_date ? this.datePipe.transform(new Date(rowData.settle_date * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'creation_date':
|
||||
case 'settle_date':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'private':
|
||||
|
@ -444,7 +444,7 @@ export class LightningPaymentsComponent implements OnInit, AfterViewInit, OnDest
|
||||
let rowToFilter = '';
|
||||
switch (this.selFilterBy) {
|
||||
case 'all':
|
||||
rowToFilter = ((rowData.creation_date) ? this.datePipe.transform(new Date(rowData.creation_date * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
rowToFilter = ((rowData.creation_date) ? this.datePipe.transform(new Date(rowData.creation_date * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() : '') + JSON.stringify(rowData).toLowerCase();
|
||||
break;
|
||||
|
||||
case 'status':
|
||||
@ -453,7 +453,7 @@ export class LightningPaymentsComponent implements OnInit, AfterViewInit, OnDest
|
||||
break;
|
||||
|
||||
case 'creation_date':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) * 1000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
case 'failure_reason':
|
||||
|
@ -111,7 +111,7 @@ export class SwapsComponent implements OnInit, AfterViewInit, OnChanges, OnDestr
|
||||
|
||||
case 'initiation_time':
|
||||
case 'last_update_time':
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) / 1000000), 'dd/MMM/YYYY HH:mm')?.toLowerCase() || '';
|
||||
rowToFilter = this.datePipe.transform(new Date((rowData[this.selFilterBy] || 0) / 1000000), 'dd/MMM/y HH:mm')?.toLowerCase() || '';
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user