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

Commit

Permalink
Merge pull request #798 from derrabauke/fix-customer-statistics-criteria
Browse files Browse the repository at this point in the history
fix(customer-statistics): require fromDate param
  • Loading branch information
derrabauke authored Feb 9, 2023
2 parents 55bc87c + 3ebee3f commit 696a7b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/statistics/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const deserializeMoment = (momentString) =>
const TYPES = {
year: { include: "", requiredParams: [] },
month: { include: "", requiredParams: [] },
customer: { include: "", requiredParams: [] },
customer: { include: "", requiredParams: ["fromDate"] },
project: {
include: "customer",
requiredParams: ["customer"],
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/statistics-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module("Acceptance | statistics", function (hooks) {
});

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

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

0 comments on commit 696a7b2

Please sign in to comment.