mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Refactored funnel report. Made BarChart more generic.
This commit is contained in:
parent
050cd2f5d9
commit
fb4dd75e18
24 changed files with 327 additions and 367 deletions
|
|
@ -15,8 +15,6 @@ const store = create(() => ({ ...initialState }));
|
|||
export function updateReport(id, data) {
|
||||
const report = store.getState()[id];
|
||||
|
||||
console.log('UPDATE STORE START', id, report);
|
||||
|
||||
if (report) {
|
||||
store.setState(
|
||||
produce(state => {
|
||||
|
|
@ -37,9 +35,9 @@ export function updateReport(id, data) {
|
|||
}
|
||||
}
|
||||
|
||||
export function createReport() {
|
||||
export function createReport(parameters) {
|
||||
const id = `new_${getRandomChars(16)}`;
|
||||
const report = { ...emptyReport, id };
|
||||
const report = { ...emptyReport, id, parameters };
|
||||
|
||||
store.setState(
|
||||
produce(state => {
|
||||
|
|
@ -49,8 +47,6 @@ export function createReport() {
|
|||
}),
|
||||
);
|
||||
|
||||
console.log('CREATE STORE', report);
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue