Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit 696a7b2

Browse files
authored
Merge pull request #798 from derrabauke/fix-customer-statistics-criteria
fix(customer-statistics): require fromDate param
2 parents 55bc87c + 3ebee3f commit 696a7b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/statistics/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const deserializeMoment = (momentString) =>
2020
const TYPES = {
2121
year: { include: "", requiredParams: [] },
2222
month: { include: "", requiredParams: [] },
23-
customer: { include: "", requiredParams: [] },
23+
customer: { include: "", requiredParams: ["fromDate"] },
2424
project: {
2525
include: "customer",
2626
requiredParams: ["customer"],

tests/acceptance/statistics-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module("Acceptance | statistics", function (hooks) {
4040
});
4141

4242
test("can view statistics by customer", async function (assert) {
43-
await visit("/statistics?type=customer");
43+
await visit("/statistics?type=customer&fromDate=1900-01-01");
4444

4545
assert.dom("thead > tr > th").exists({ count: 3 });
4646
assert.dom("tbody > tr").exists({ count: 5 });

0 commit comments

Comments
 (0)