Skip to content

Commit ddc8682

Browse files
committed
extended meeting duration
1 parent b242d39 commit ddc8682

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

usr-backend/src/scheduler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async fn get_schedule(State(state): State<Arc<UsrState>>) -> Response {
141141

142142
Json(Schedule {
143143
availabilities: {
144-
let mut out: Box<[Vec<String>]> = std::iter::from_fn(|| Some(Vec::default())).take(7 * 8 * 4).collect();
144+
let mut out: Box<[Vec<String>]> = std::iter::from_fn(|| Some(Vec::default())).take(7 * 10 * 4).collect();
145145
for model in availabilities {
146146
out[model.time as usize].push(model.name);
147147
}

usr-web/src/routes/(apps)/scheduler/+page.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
168168
for (let y = Math.min(dragStartY, dragEndY); y <= Math.max(dragStartY, dragEndY); y++) {
169169
for (let x = Math.min(dragStartX, dragEndX); x <= Math.max(dragStartX, dragEndX); x++) {
170-
times.push(y + x * 32);
170+
times.push(y + x * 10 * 4);
171171
}
172172
}
173173
@@ -229,7 +229,7 @@
229229
}
230230
231231
function isPositionInsideAvailabilities(x: number, y: number, name: string) {
232-
return availabilities[y + x * 32]?.includes(name) ?? false;
232+
return availabilities[y + x * 10 * 4]?.includes(name) ?? false;
233233
}
234234
235235
function isUpdateCellGreen(x: number, y: number) {
@@ -275,7 +275,7 @@
275275
276276
for (const [team, names] of Object.entries(teams)) {
277277
const newSubteam = names.filter(
278-
(name) => availabilities[y + x * 32]?.includes(name) ?? false
278+
(name) => availabilities[y + x * 10 * 4]?.includes(name) ?? false
279279
);
280280
newTeams[team] = newSubteam;
281281
for (const name of newSubteam) {
@@ -442,7 +442,7 @@
442442
</tr>
443443
</thead>
444444
<tbody>
445-
{#each { length: 32 } as _, y}
445+
{#each { length: 40 } as _, y}
446446
<tr>
447447
<td>{timeString(y)}</td>
448448
{#each DAYS as _, x}

0 commit comments

Comments
 (0)