Skip to content

Commit

Permalink
extended meeting duration
Browse files Browse the repository at this point in the history
  • Loading branch information
manglemix committed Jan 14, 2025
1 parent b242d39 commit ddc8682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion usr-backend/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ async fn get_schedule(State(state): State<Arc<UsrState>>) -> Response {

Json(Schedule {
availabilities: {
let mut out: Box<[Vec<String>]> = std::iter::from_fn(|| Some(Vec::default())).take(7 * 8 * 4).collect();
let mut out: Box<[Vec<String>]> = std::iter::from_fn(|| Some(Vec::default())).take(7 * 10 * 4).collect();
for model in availabilities {
out[model.time as usize].push(model.name);
}
Expand Down
8 changes: 4 additions & 4 deletions usr-web/src/routes/(apps)/scheduler/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
for (let y = Math.min(dragStartY, dragEndY); y <= Math.max(dragStartY, dragEndY); y++) {
for (let x = Math.min(dragStartX, dragEndX); x <= Math.max(dragStartX, dragEndX); x++) {
times.push(y + x * 32);
times.push(y + x * 10 * 4);
}
}
Expand Down Expand Up @@ -229,7 +229,7 @@
}
function isPositionInsideAvailabilities(x: number, y: number, name: string) {
return availabilities[y + x * 32]?.includes(name) ?? false;
return availabilities[y + x * 10 * 4]?.includes(name) ?? false;
}
function isUpdateCellGreen(x: number, y: number) {
Expand Down Expand Up @@ -275,7 +275,7 @@
for (const [team, names] of Object.entries(teams)) {
const newSubteam = names.filter(
(name) => availabilities[y + x * 32]?.includes(name) ?? false
(name) => availabilities[y + x * 10 * 4]?.includes(name) ?? false
);
newTeams[team] = newSubteam;
for (const name of newSubteam) {
Expand Down Expand Up @@ -442,7 +442,7 @@
</tr>
</thead>
<tbody>
{#each { length: 32 } as _, y}
{#each { length: 40 } as _, y}
<tr>
<td>{timeString(y)}</td>
{#each DAYS as _, x}
Expand Down

0 comments on commit ddc8682

Please sign in to comment.