-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added view * Base for react integration and dummy graph * Added two test views and graph controls. * Chart with dynamic loading! * Added script for db dump import * Added dataset working members, renamed a few service files. * Added dataset purchasing members. * Added dataset frozen members. * Formatting. * Added view number of long-term frozen members. * Added view number of shift partners. * Added view number of co purchasers * Added view number of flying members * Added view number of abcd members * Added view number of investing and paused members * Added view number of resignations * Standardization of reference dates. * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * WIP generic absolute / relative views * Graph styling * Graph styling * Fixed jumpy graph using refs. * Moved dataset definition to a separate file. * Use formatDate from utils * Moved dataset picker to its own component. * Moved date range picker to its own component. * Moved ChartJS.register outside of the component * Added download data button. * Added view for exempted members. * Translation files. * Conflict solve translation file from master. * Added a description * Shift partner only from working members. * Added caching system for datapoint views. * Missing file for previous commit. * Datapicker on the side and expandable. * Date range picker in the graph header
- Loading branch information
1 parent
afa7ba1
commit 62cad3a
Showing
22 changed files
with
183 additions
and
51 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
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,56 @@ | ||
import React from "react"; | ||
import { FloatingLabel, Form } from "react-bootstrap"; | ||
import { getFirstOfMonth } from "../utils.tsx"; | ||
|
||
declare let gettext: (english_text: string) => string; | ||
|
||
interface DateRangePickerProps { | ||
dateFrom: Date; | ||
setDateFrom: (date: Date) => void; | ||
dateTo: Date; | ||
setDateTo: (date: Date) => void; | ||
} | ||
|
||
const DateRangePicker: React.FC<DateRangePickerProps> = ({ | ||
dateFrom, | ||
setDateFrom, | ||
dateTo, | ||
setDateTo, | ||
}) => { | ||
return ( | ||
<> | ||
<Form.Group> | ||
<FloatingLabel label={"Date from"}> | ||
<Form.Control | ||
type={"date"} | ||
value={ | ||
!isNaN(dateFrom.getTime()) | ||
? dateFrom.toISOString().substring(0, 10) | ||
: undefined | ||
} | ||
onChange={(event) => { | ||
setDateFrom(getFirstOfMonth(new Date(event.target.value))); | ||
}} | ||
/> | ||
</FloatingLabel> | ||
</Form.Group> | ||
<Form.Group> | ||
<FloatingLabel label={"Date from"}> | ||
<Form.Control | ||
type={"date"} | ||
value={ | ||
!isNaN(dateTo.getTime()) | ||
? dateTo.toISOString().substring(0, 10) | ||
: undefined | ||
} | ||
onChange={(event) => { | ||
setDateTo(getFirstOfMonth(new Date(event.target.value))); | ||
}} | ||
/> | ||
</FloatingLabel> | ||
</Form.Group> | ||
</> | ||
); | ||
}; | ||
|
||
export default DateRangePicker; |
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,30 @@ | ||
# Generated by Django 5.1.3 on 2024-12-06 11:02 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("statistics", "0003_alter_purchasebasket_tapir_user"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="FancyGraphCache", | ||
fields=[ | ||
( | ||
"id", | ||
models.BigAutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
("view_name", models.CharField(max_length=255)), | ||
("date", models.DateField()), | ||
("value", models.IntegerField()), | ||
], | ||
), | ||
] |
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
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.