Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle no issues #52

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/dist/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/main.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion public/gantt-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StacheElement, type, ObservableObject, stache } from "./can.js";
import { rollupDatesFromRollups } from "./prepare-issues/date-data.js";
import { getQuartersAndMonths } from "./quarter-timeline.js";
import { getCalendarHtml } from "./quarter-timeline.js";
const DAY = 1000*60*60*24;
export class GanttTimeline extends StacheElement {
static view = `
<div style="display: grid; grid-template-columns: repeat({{this.quartersAndMonths.months.length}}, auto); grid-template-rows: auto auto repeat({{this.rows.length}}, auto)"
Expand Down Expand Up @@ -44,8 +45,9 @@ export class GanttTimeline extends StacheElement {
`;

get quartersAndMonths(){
// handle if there are no issues
const {start, due} = rollupDatesFromRollups(this.issues);
return getQuartersAndMonths(new Date(), due);
return getQuartersAndMonths(new Date(), due || new Date( new Date().getTime() + DAY*30));
}
get todayMarginLeft() {
const { firstDay, lastDay } = this.quartersAndMonths;
Expand Down
Loading