File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
usr-web/src/routes/(apps)/scheduler Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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
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 ) {
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 ) {
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 }
You can’t perform that action at this time.
0 commit comments