Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const Card = ({ paper, onSelect, isSelected, isShow=true }: CardProps) => {
<Capsule>{paper.slot}</Capsule>
<Capsule>{paper.year}</Capsule>
<Capsule>{paper.semester}</Capsule>
{paper.school && <Capsule>{paper.school}</Capsule>}
</div>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions src/db/papers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const adminSchema = new Schema<IAdminPaper>({
"Mauritius",
],
},
school: {
type: String || null,
enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST","SCORE"],
},
answer_key_included: { type: Boolean || null, default: false },
is_selected: { type: Boolean, default: false },
ambiguous_tags: { type: [String], default: [] },
Expand Down Expand Up @@ -69,6 +73,10 @@ const paperSchema = new Schema<IPaper>({
],
required: true,
},
school: {
type: String,
enum: ["SCOPE", "SITE", "SENSE", "SMEC", "SCE", "SELECT", "SAS", "SSL", "VITBS", "SBST"],
},
answer_key_included: { type: Boolean, default: false },
});

Expand Down
26 changes: 24 additions & 2 deletions src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { type mongo } from "mongoose";

export interface IUpcomingSlot {
slot: string;
lastSyncedDate?: string;
syncMode?: "CAT" | "FAT";
}

export interface IUpcomingSubject {
Expand All @@ -17,6 +15,7 @@ export interface PaperResponse {
year: string;
slot: string;
exam: string;
school?: string;
}

export interface IAdminPaper {
Expand All @@ -40,6 +39,18 @@ export interface IAdminPaper {
| "Bangalore"
| "Mauritius"
| null;
school?:
| "SCOPE"
| "SITE"
| "SENSE"
| "SMEC"
| "SCE"
| "SELECT"
| "SAS"
| "SSL"
| "VITBS"
| "SBST"
| null;
answer_key_included?: boolean | null;
is_selected?: boolean;
ambiguous_tags: string[];
Expand Down Expand Up @@ -94,6 +105,17 @@ export interface IPaper {
| "Bhopal"
| "Bangalore"
| "Mauritius";
school?:
| "SCOPE"
| "SITE"
| "SENSE"
| "SMEC"
| "SCE"
| "SELECT"
| "SAS"
| "SSL"
| "VITBS"
| "SBST";
slot: string;
subject: string;
year: string;
Expand Down
Loading