mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-24 06:28:34 +01:00
feat: use native date picker + align date formats (#251)
* use native date picker * use YYYY-MM-DD for date formats
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { BaseAPI, route } from "../base";
|
||||
import { GroupStatistics, TotalsByOrganizer, ValueOverTime } from "../types/data-contracts";
|
||||
|
||||
function YYYY_DD_MM(date?: Date): string {
|
||||
function YYYY_MM_DD(date?: Date): string {
|
||||
if (!date) {
|
||||
return "";
|
||||
}
|
||||
@@ -14,7 +14,7 @@ function YYYY_DD_MM(date?: Date): string {
|
||||
export class StatsAPI extends BaseAPI {
|
||||
totalPriceOverTime(start?: Date, end?: Date) {
|
||||
return this.http.get<ValueOverTime>({
|
||||
url: route("/groups/statistics/purchase-price", { start: YYYY_DD_MM(start), end: YYYY_DD_MM(end) }),
|
||||
url: route("/groups/statistics/purchase-price", { start: YYYY_MM_DD(start), end: YYYY_MM_DD(end) }),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user