-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from FIRSTIsrael/staging
V1.1.0 Staging to main
- Loading branch information
Showing
75 changed files
with
1,483 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Version Number,2,,,,,,,,,, | ||
Block Format,1,,,,,,,,,, | ||
Number of Teams,16,,,,,,,,,, | ||
3163,קבוצה 1,מקיף,אעבלין,,,,,,,, | ||
3180,קבוצה 2,פלך בנים,ירושלים,,,,,,,, | ||
1042,קבוצה 3,כרמים,בנימינה-גבעת עדה,,,,,,,, | ||
1825,קבוצה 4,אילן רמון,כפר סבא,,,,,,,, | ||
3243,קבוצה 5,לאה גולדברג,נתניה,,,,,,,, | ||
2954,FurryTale,עתידים ,חולון,,,,,,,, | ||
2623,קבוצה 7,גינסבורג,יבנה,,,,,,,, | ||
2978,קבוצה 8,אל-קסטל ,נצרת,,,,,,,, | ||
588,קבוצה 9,אבן סינא ,כפר קרע,,,,,,,, | ||
1371,קבוצה 10,אלזהראוי,אכסאל,,,,,,,, | ||
3139,קבוצה 11,ידלין,ראשון לציון,,,,,,,, | ||
515,קבוצה 12,אשכול פיס ,נס ציונה,,,,,,,, | ||
1720,קבוצה 13,אגרון,ירושלים,,,,,,,, | ||
3179,קבוצה 14,נצח ישראל,בית שמש,,,,,,,, | ||
3146,קבוצה 15,אלבוכארי,עראבה,,,,,,,, | ||
2977,קבוצה 16,הנדסאים ,הרצליה,,,,,,,, | ||
Block Format,2,,,,,,,,,, | ||
Number of Ranking Matches,12,,,,,,,,,, | ||
Number of Tables,4,,,,,,,,,, | ||
Number of Teams Per Table,2,,,,,,,,,, | ||
Number of Simultaneous Tables,2,,,,,,,,,, | ||
Table Names,1 אדום,2 אדום,3 אדום,4 אדום,5 אדום,6 אדום,7 אדום,8 אדום,,, | ||
5,1,10:35,10:38,3163,3243,2623,3139,,,, | ||
6,1,10:40,10:43,,,,,1042,588,1720,3146 | ||
7,1,10:45,10:48,3180,2954,2978,515,,,, | ||
8,1,10:50,10:53,,,,,1825,1371,3179,2977 | ||
9,2,12:20,12:23,1042,3139,588,3163,,,, | ||
10,2,12:25,12:28,,,,,1720,2623,3146,3243 | ||
11,2,12:30,12:33,1825,515,1371,3180,,,, | ||
12,2,12:35,12:38,,,,,3179,2978,2977,2954 | ||
13,3,14:10,14:13,3180,2954,2978,515,,,, | ||
14,3,14:15,14:18,,,,,1825,1371,3179,2977 | ||
15,3,14:20,14:23,3163,3243,2623,3139,,,, | ||
16,3,14:25,14:28,,,,,1042,588,1720,3146 | ||
Block Format,3,,,,,,,,,, | ||
Number of Judged Events,1,,,,,,,,,, | ||
Number of Event Time Slots,4,,,,,,,,,, | ||
Number of Judging Teams,4,,,,,,,,,, | ||
Event Name,חדר שיפוט,,,,,,,,,, | ||
Room Names,1 אדום,2 אדום,3 אדום,4 אדום,,,,,,, | ||
1,08:45,09:12,3180,2954,2978,515,,,,, | ||
2,09:30,09:57,1825,1371,3179,2977,,,,, | ||
3,10:30,10:57,3163,3243,2623,3139,,,,, | ||
4,11:15,11:42,1042,588,1720,3146,,,,, | ||
Block Format,4,,,,,,,,,, | ||
Number of Practice Matches,4,,,,,,,,,, | ||
Number of Tables,4,,,,,,,,,, | ||
Number of Teams Per Table,2,,,,,,,,,, | ||
Number of Simultaneous Tables,2,,,,,,,,,, | ||
Table Names,1 אדום,2 אדום,3 אדום,4 אדום,5 אדום,6 אדום,7 אדום,8 אדום,,, | ||
1,1,08:45,08:48,1042,3139,588,3163,,,, | ||
2,1,08:51,08:54,,,,,1720,2623,3146,3243 | ||
3,1,08:57,09:00,1825,515,1371,3180,,,, | ||
4,1,09:03,09:06,,,,,3179,2978,2977,2954 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import express, { Request, Response } from 'express'; | ||
import * as db from '@lems/database'; | ||
|
||
const router = express.Router({ mergeParams: true }); | ||
|
||
router.get('/validate-csv-readiness', async (req: Request, res: Response) => { | ||
const pipeline = [ | ||
{ | ||
$match: { status: { $ne: 'empty' } } | ||
}, | ||
{ | ||
$project: { | ||
category: true, | ||
teamId: true, | ||
scores: { $objectToArray: '$data.values' } | ||
} | ||
}, | ||
{ | ||
$project: { | ||
category: true, | ||
teamId: true, | ||
unscored: { | ||
$sum: { | ||
$map: { | ||
input: '$scores', | ||
as: 'element', | ||
in: { | ||
$cond: { | ||
if: { $eq: ['$$element.v.value', 0] }, | ||
then: 1, | ||
else: 0 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
$match: { | ||
unscored: { $gt: 0 } | ||
} | ||
}, | ||
{ | ||
$lookup: { | ||
from: 'teams', | ||
localField: 'teamId', | ||
foreignField: '_id', | ||
as: 'team' | ||
} | ||
}, | ||
{ | ||
$unwind: '$team' | ||
}, | ||
{ | ||
$group: { | ||
_id: '$category', | ||
unscoredTeams: { $addToSet: '$team' } | ||
} | ||
} | ||
]; | ||
|
||
const report = await db.db.collection('rubrics').aggregate(pipeline).toArray(); | ||
res.json(report); | ||
}); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/frontend/components/audience-display/audience-display-container.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Box } from '@mui/material'; | ||
import { useWindowSize } from '../../hooks/use-window-size'; | ||
import { useMemo } from 'react'; | ||
|
||
interface AudienceDisplayContainerProps { | ||
children?: React.ReactNode; | ||
} | ||
|
||
const AudienceDisplayContainer: React.FC<AudienceDisplayContainerProps> = ({ children }) => { | ||
const screenSize = useWindowSize(); | ||
|
||
const displayScale = useMemo(() => { | ||
const widthScale = screenSize.width / 1920; | ||
const heightScale = screenSize.height / 1080; | ||
return Math.min(widthScale, heightScale); | ||
}, [screenSize]); | ||
|
||
return ( | ||
<Box sx={{ width: '100vw', height: '100vh', background: 'black' }}> | ||
<Box | ||
sx={{ | ||
width: 1920, | ||
height: 1080, | ||
position: 'absolute', | ||
transformOrigin: 'top left', | ||
transformStyle: 'preserve-3d', | ||
transform: `scale(${displayScale}) translate(-50%,-50%)`, | ||
left: '50%', | ||
top: '50%' | ||
}} | ||
> | ||
{children} | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default AudienceDisplayContainer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Box } from '@mui/material'; | ||
|
||
const Blank: React.FC = () => { | ||
return ( | ||
<Box | ||
sx={{ | ||
background: 'url(/assets/audience-display/blank-screen.webp) center / cover', | ||
width: '100%', | ||
height: '100%', | ||
position: 'fixed', | ||
left: 0, | ||
top: 0 | ||
}} | ||
/> | ||
); | ||
}; | ||
export default Blank; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { Paper, Typography, Box } from '@mui/material'; | ||
import Image from 'next/image'; | ||
import SeasonLogo from '../../public/assets/audience-display/season-logo.svg'; | ||
|
||
interface MessageProps { | ||
message: string; | ||
} | ||
|
||
const Message: React.FC<MessageProps> = ({ message }) => { | ||
return ( | ||
<Box | ||
display="flex" | ||
alignItems="center" | ||
justifyContent="center" | ||
height="100%" | ||
width="100%" | ||
position="absolute" | ||
top={0} | ||
left={0} | ||
sx={{ | ||
backgroundImage: 'url(/assets/audience-display/season-background.webp)', | ||
backgroundRepeat: 'no-repeat', | ||
backgroundSize: 'cover' | ||
}} | ||
> | ||
{message ? ( | ||
<Paper | ||
sx={{ | ||
p: 8, | ||
textAlign: 'center', | ||
mx: '50px', | ||
borderRadius: 8, | ||
border: `1rem solid #d22e92`, | ||
minWidth: '30%' | ||
}} | ||
> | ||
<Typography variant="h1" fontSize="4.5rem"> | ||
{message} | ||
</Typography> | ||
</Paper> | ||
) : ( | ||
<Image | ||
src={SeasonLogo} | ||
width={0} | ||
height={0} | ||
sizes="100vw" | ||
alt="לוגו עונתי" | ||
style={{ | ||
padding: 200, | ||
objectFit: 'cover', | ||
width: '100%', | ||
height: 'auto' | ||
}} | ||
/> | ||
)} | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Message; |
Oops, something went wrong.