Commit 32f958af authored by Roopashree L's avatar Roopashree L
Browse files

resolved merge conflicts

3 merge requests!107Feature/candidate portal,!17Development,!16Login and roles integration
Showing with 288 additions and 5 deletions
+288 -5
......@@ -42,6 +42,19 @@ export class HomeComponent {
url: '/fee-management/admin',
visibility: 'exams_admin'
},
{
title: 'Register Student to Exam Cycles and Exams',
type: 'registerStudentInstitute',
url: '/register-student/institute',
visibility: 'exams_institute'
},
{
title: 'Download Question Papers',
type: 'downloadQuestionPapers',
url: 'manage-question-papers/institute',
visibility: 'exams_institute'
},
{
title: 'Fee Management',
type: 'feeManagementInstitute',
......
......@@ -77,4 +77,18 @@ export interface GrievancesTableData {
resolved: string,
responseNotNeeded: string,
duplicate: string
}
export interface QuestionPaper {
courseName: string,
examDate: string,
examStartTime: string,
marks: string,
examName: string,
questionPaperList: QuestionPaperList[]
}
export interface QuestionPaperList{
id: number,
name: string
}
\ No newline at end of file
<div class="full-container">
<div class="certificate-container">
<div class="certificate-header">
<h2>Download Question Papers</h2>
</div>
<span>
Exam cycle
</span>
<div>
<mat-form-field appearance="outline">
<mat-label>Select here</mat-label>
<!-- <input matInput placeholder="" formControlName="state"> -->
<mat-select (selectionChange)="examCycleSelected($event)">
<span *ngFor='let examCycle of examCycleList;'>
<mat-option [value]="examCycle">{{examCycle}}</mat-option>
</span>
</mat-select>
<!-- <mat-error *ngIf="newRegCertDetailsformGroup.controls['credType'].invalid">
</mat-error> -->
</mat-form-field>
</div>
<mat-card style="margin-top: 38px;" class="example-card " *ngFor="let exam of examDetails">
<mat-card-header>
<mat-card-subtitle>Exam Name</mat-card-subtitle>
<mat-card-title> {{ exam.examName | uppercase }}</mat-card-title>
</mat-card-header>
<mat-divider></mat-divider>
<p>
<mat-grid-list cols="4" rowHeight="20px">
<mat-grid-tile>
<mat-card-subtitle> Course Name</mat-card-subtitle>
</mat-grid-tile>
<mat-grid-tile>
<mat-card-subtitle> Exam Date</mat-card-subtitle>
</mat-grid-tile>
<mat-grid-tile>
<mat-card-subtitle> Exam Start Time </mat-card-subtitle>
</mat-grid-tile>
<mat-grid-tile>
<mat-card-subtitle> Maximum Marks</mat-card-subtitle>
</mat-grid-tile>
</mat-grid-list>
<mat-grid-list cols="4" rowHeight="20px">
<mat-grid-tile>
<div> {{exam.courseName}}</div>
</mat-grid-tile>
<mat-grid-tile>
<div> {{exam.examDate}} </div>
</mat-grid-tile>
<mat-grid-tile>
<div> {{exam.examStartTime}} </div>
</mat-grid-tile>
<mat-grid-tile>
<div> {{exam.marks}} Marks</div>
</mat-grid-tile>
</mat-grid-list>
</p>
<mat-card-content>
<p>
<mat-list role="list" *ngIf="exam.examStartTime !=='12.00 A.M.'; else notYetexamTime">
<mat-list-item style="background-color: lightgray;" role="listitem"
*ngFor="let qp of exam.questionPaperList">
{{qp.name}}
<mat-divider></mat-divider>
<span class="button-group ">
<button type="button" class="cancel-button" mat-stroked-button
color="primary">View</button>
<button class="next-button" mat-raised-button color="primary"
(click)="downloadQuesPpr(qp.id)">Download</button>
</span>
</mat-list-item>
<mat-divider></mat-divider>
</mat-list>
<ng-template #notYetexamTime>
<p>
<mat-hint style="color: red;"> *Question Paper will appear 30 mins before exam for download</mat-hint>
</p>
</ng-template>
</p>
</mat-card-content>
</mat-card>
</div>
</div>
\ No newline at end of file
.full-container{
width:100%;
height:fit-content;
background-color:#F0F3F4;
}
.certificate-container{
padding: 4rem;
margin-left: 4rem;
}
.certificate-header{
display: flex;
justify-content: space-between;
margin-bottom: 2rem;
}
.buttons{
display: flex;
justify-content: space-between;
background-color: #F0F3F4;
height: 4rem;
padding-top: 2rem;
}
.download-buttons{
justify-content: end;
align-items: end !important;
}
\ No newline at end of file
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DownloadQuesPapersComponent } from './download-ques-papers.component';
describe('DownloadQuesPapersComponent', () => {
let component: DownloadQuesPapersComponent;
let fixture: ComponentFixture<DownloadQuesPapersComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ DownloadQuesPapersComponent ]
})
.compileComponents();
fixture = TestBed.createComponent(DownloadQuesPapersComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component } from '@angular/core';
import { QuestionPaper } from 'src/app/interfaces/interfaces';
@Component({
selector: 'app-download-ques-papers',
templateUrl: './download-ques-papers.component.html',
styleUrls: ['./download-ques-papers.component.scss']
})
export class DownloadQuesPapersComponent {
examCycleList: string[] = ['examCycle1', 'examCycle2', 'examCycle3'];
examDetails: QuestionPaper[] = [
{
courseName: 'One',
examDate: 'One',
examStartTime: '10.00 A.M.',
marks: '100',
examName: 'msc Nursing (Exam 1)',
questionPaperList: [
{
id: 1234,
name: 'Question paper set 1'
},
{
id: 1234,
name: 'Question paper set 2'
}
]
},
{
courseName: 'Two',
examDate: 'Some date',
marks: '100',
examStartTime: '12.00 A.M.',
examName: 'msc Nursing (Exam 2)',
questionPaperList: [
{
id: 1234,
name: 'Question paper set 1'
},
{
id: 1234,
name: 'Question paper set 2'
}
]
},
{
courseName: 'Three',
examDate: 'Some date',
examStartTime: '10.00 A.M.',
marks: '100',
examName: 'msc Nursing (Exam 3)',
questionPaperList: [
{
id: 1234,
name: 'Question paper set 1'
},
{
id: 1234,
name: 'Question paper set 2'
}
]
},
{
courseName: 'Four',
examDate: 'Some date',
examStartTime: '10.00 A.M.',
marks: '100',
examName: 'msc Nursing (Exam 4)',
questionPaperList: [
{
id: 1234,
name: 'Question paper set 1'
},
{
id: 1234,
name: 'Question paper set 2'
}
]
},
]
examCycleSelected(e: Event) {
}
downloadQuesPpr(e: any) {
console.log(e)
}
}
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DownloadQuesPapersComponent } from './download-ques-papers/download-ques-papers.component';
const routes: Routes = [];
const routes: Routes = [
{
path: 'institute', component: DownloadQuesPapersComponent, pathMatch: 'full',
},
];
@NgModule({
declarations: [],
imports: [
RouterModule.forRoot(routes)
],
imports: [RouterModule.forChild(routes)],
exports: [
RouterModule
]
......
......@@ -8,6 +8,7 @@ import { CommonModule } from '@angular/common';
//#region (created modules && components)
import { ManageQuestionPapersRoutingModule } from './manage-question-papers-routing.module';
import { MaterialModule } from 'src/material/material.module';
import { DownloadQuesPapersComponent } from './download-ques-papers/download-ques-papers.component';
//#endregion
//#endregion
......@@ -15,7 +16,9 @@ import { MaterialModule } from 'src/material/material.module';
@NgModule({
declarations: [],
declarations: [
DownloadQuesPapersComponent
],
imports: [
CommonModule,
ManageQuestionPapersRoutingModule,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment