Skip to content

Commit cf0b778

Browse files
authored
Merge pull request #528 from Rithish-2914/feat/school-field
Add school information to papers
2 parents 256a338 + a00b9a8 commit cf0b778

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

src/components/Card.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ const Card = ({ paper, onSelect, isSelected, isShow=true }: CardProps) => {
100100
<Capsule>{paper.slot}</Capsule>
101101
<Capsule>{paper.year}</Capsule>
102102
<Capsule>{paper.semester}</Capsule>
103+
{paper.school && <Capsule>{paper.school}</Capsule>}
103104
</div>
104105
</div>
105106
</div>

src/db/papers.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const adminSchema = new Schema<IAdminPaper>({
3131
"Mauritius",
3232
],
3333
},
34+
school: {
35+
type: String || null,
36+
enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST","SCORE"],
37+
},
3438
answer_key_included: { type: Boolean || null, default: false },
3539
is_selected: { type: Boolean, default: false },
3640
ambiguous_tags: { type: [String], default: [] },
@@ -69,6 +73,10 @@ const paperSchema = new Schema<IPaper>({
6973
],
7074
required: true,
7175
},
76+
school: {
77+
type: String,
78+
enum: ["SCOPE","SITE","SENSE","SMEC","SCE","SELECT","SAS","SSL","VITBS","SBST","SCORE","SCHEME","SHINE","V-SIGN","V-SMART","V-SPARC","VAIAL","HOT"],
79+
},
7280
answer_key_included: { type: Boolean, default: false },
7381
});
7482

src/interface.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export interface PaperResponse {
1717
year: string;
1818
slot: string;
1919
exam: string;
20+
school?: string;
2021
}
2122

2223
export interface IAdminPaper {
@@ -40,6 +41,18 @@ export interface IAdminPaper {
4041
| "Bangalore"
4142
| "Mauritius"
4243
| null;
44+
school?:
45+
| "SCOPE"
46+
| "SITE"
47+
| "SENSE"
48+
| "SMEC"
49+
| "SCE"
50+
| "SELECT"
51+
| "SAS"
52+
| "SSL"
53+
| "VITBS"
54+
| "SBST"
55+
| null;
4356
answer_key_included?: boolean | null;
4457
is_selected?: boolean;
4558
ambiguous_tags: string[];
@@ -94,6 +107,17 @@ export interface IPaper {
94107
| "Bhopal"
95108
| "Bangalore"
96109
| "Mauritius";
110+
school?:
111+
| "SCOPE"
112+
| "SITE"
113+
| "SENSE"
114+
| "SMEC"
115+
| "SCE"
116+
| "SELECT"
117+
| "SAS"
118+
| "SSL"
119+
| "VITBS"
120+
| "SBST";
97121
slot: string;
98122
subject: string;
99123
year: string;

0 commit comments

Comments
 (0)