Skip to content

Commit 8962f0d

Browse files
committed
Iterate on getByDate
1 parent c33b0f0 commit 8962f0d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/periodic-report/periodic-report.gel.repository.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,19 @@ export class PeriodicReportGelRepository
5656
);
5757
const resource = e.cast(enhancedResource.db, e.uuid(parentId));
5858

59-
const report = e.select(e.PeriodicReport, (report) => ({
59+
const report = e.select(resource, (report) => ({
6060
filter: e.all(
6161
e.set(
6262
e.op(resource.id, '=', report.container.id),
6363
e.op(report.start, '<=', date),
6464
e.op(report.end, '>=', date),
6565
),
6666
),
67-
...report.is(resolveReportType(reportType)),
6867
}));
6968

70-
return this.db.run(report);
69+
const query = e.select(report, this.hydrate);
70+
71+
return await this.db.run(query);
7172
}
7273

7374
getCurrentDue(

0 commit comments

Comments
 (0)