Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add reporting feature * Remove nodatime * Add summaries * work... * Add chart title * Fix error * Allow to set hour in the field * UI updates * Fix fake data * ViewDefinitions can be dynamic * Add items sold * Sticky table headers * Update JS and remove jQuery usages * JS click fix * Handle tag all invoices for app * fix dup row in items report * Can cancel invoice request * Add tests * Fake data for items sold * Rename Items to Products, improve navigation F5 * Use bordered table for summaries --------- Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
- Loading branch information
1 parent
845e288
commit dc98695
Showing
31 changed files
with
1,830 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using BTCPayServer.JsonConverters; | ||
using Newtonsoft.Json; | ||
using Newtonsoft.Json.Converters; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace BTCPayServer.Client.Models; | ||
|
||
public class StoreReportRequest | ||
{ | ||
public string ViewName { get; set; } | ||
public TimePeriod TimePeriod { get; set; } | ||
} | ||
public class StoreReportResponse | ||
{ | ||
public class Field | ||
{ | ||
public Field() | ||
{ | ||
|
||
} | ||
public Field(string name, string type) | ||
{ | ||
Name = name; | ||
Type = type; | ||
} | ||
public string Name { get; set; } | ||
public string Type { get; set; } | ||
} | ||
public IList<Field> Fields { get; set; } = new List<Field>(); | ||
public List<JArray> Data { get; set; } | ||
public DateTimeOffset From { get; set; } | ||
public DateTimeOffset To { get; set; } | ||
public List<ChartDefinition> Charts { get; set; } | ||
|
||
public int GetIndex(string fieldName) | ||
{ | ||
return Fields.ToList().FindIndex(f => f.Name == fieldName); | ||
} | ||
} | ||
|
||
public class ChartDefinition | ||
{ | ||
public string Name { get; set; } | ||
|
||
public List<string> Groups { get; set; } = new List<string>(); | ||
public List<string> Totals { get; set; } = new List<string>(); | ||
public bool HasGrandTotal { get; set; } | ||
public List<string> Aggregates { get; set; } = new List<string>(); | ||
public List<string> Filters { get; set; } = new List<string>(); | ||
} | ||
|
||
public class TimePeriod | ||
{ | ||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))] | ||
public DateTimeOffset? From { get; set; } | ||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))] | ||
public DateTimeOffset? To { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace BTCPayServer.Client.Models | ||
{ | ||
public class StoreReportsResponse | ||
{ | ||
public string ViewName { get; set; } | ||
public StoreReportResponse.Field[] Fields | ||
{ | ||
get; | ||
set; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.