From 162b3d5188230e026c91c65a326b9bfb52bbe9d5 Mon Sep 17 00:00:00 2001 From: B Harsha Vardhan <cb.en.u4cse16207@cb.students.amrita.edu> Date: Sun, 21 Jul 2019 21:32:34 +0530 Subject: [PATCH] Added event page --- src/app/add-event/add-event.component.html | 83 +++++++++++- src/app/add-event/add-event.component.scss | 140 +++++++++++++++++++++ src/app/add-event/add-event.component.ts | 5 +- src/app/app.component.html | 1 + src/app/app.module.ts | 12 +- src/app/contracts/eventDetails.ts | 1 + 6 files changed, 238 insertions(+), 4 deletions(-) diff --git a/src/app/add-event/add-event.component.html b/src/app/add-event/add-event.component.html index 8dfdaad..b854181 100644 --- a/src/app/add-event/add-event.component.html +++ b/src/app/add-event/add-event.component.html @@ -1 +1,82 @@ -<p>add-event works!</p> +<div class="registerPage"> + <div class="content"> + <div class="title"> + <div class=vertical></div> + <div>Event Submission</div> + </div> + <mat-tab-group class="event"> + <mat-tab label="Workshop"> + <div class="inputs"> + <form class="example-form"> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Event Name</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Description</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Conducted By</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Domain</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="number"> + <mat-placeholder class="placeholder">Cost</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="date"> + <mat-placeholder class="placeholder">Date</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="number"> + <mat-placeholder class="placeholder">Capacity</mat-placeholder> + + </mat-form-field> + </form> + </div> + </mat-tab> + <mat-tab label="Conference"> + <div class="inputs"> + <form class="example-form"> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Name</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Reg. No.</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="password"> + <mat-placeholder class="placeholder">Password</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="password"> + <mat-placeholder class="placeholder">Confirm Password</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput> + <mat-placeholder class="placeholder">Program</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="email"> + <mat-placeholder class="placeholder">Email</mat-placeholder> + </mat-form-field> + <mat-form-field class="example-full-width"> + <input matInput type="number"> + <mat-placeholder class="placeholder">Phone no.</mat-placeholder> + </mat-form-field> + </form> + </div> + </mat-tab> + </mat-tab-group> + <div class="register"> + <button class="controlButton">Submit for Approval</button> + </div> + </div> +</div> \ No newline at end of file diff --git a/src/app/add-event/add-event.component.scss b/src/app/add-event/add-event.component.scss index e69de29..f3541c0 100644 --- a/src/app/add-event/add-event.component.scss +++ b/src/app/add-event/add-event.component.scss @@ -0,0 +1,140 @@ +.registerPage { + background-image: url("../../assets/images/register_bgimg.jpg"); + background-repeat: no-repeat; + background-size: cover; + background-position: center; + width: 100%; + height: 60rem; + display: flex; + flex-direction: row; + justify-content: space-around; +} + +.content { + display: flex; + flex-direction: column; +} + +.title { + margin-bottom: 1.5rem; + margin-top: 30%; + display: flex; + flex-direction: row; + justify-content: flex-start; + font-family: "Raleway", sans-serif; + -webkit-text-stroke: 0.5px white; + letter-spacing: 0.1rem; + color: white; + font-weight: 500; + font-size: 2.5rem; +} + +.horizontal { + display: flex; + color: white; + flex-direction: row; + justify-content: flex-start; +} + +.inputs { + color: white; + width: 30rem; +} + +.example-form { + min-width: 150px; + max-width: 500px; + width: 100%; + padding: 2rem; + +} + +.example-full-width { + width: 100%; +} + +.example-form { + min-width: 150px; + max-width: 500px; + width: 100%; +} + +.example-full-width { + width: 100%; +} + +::ng-deep .mat-focused .mat-form-field-label { + color: white !important; +} + +::ng-deep.mat-form-field-underline { + background-color: white !important; +} + +::ng-deep.mat-form-field-ripple { + background-color: white !important; +} + +.controlButton { + padding: 0rem; + width: 12rem; + font-family: "Raleway", sans-serif; + background-color: rgb(178, 83, 216); + color: white; + padding: 0.5rem 1rem; + border-radius: 1rem; + border: none; +} + +.register { + width: 100%; + display: flex; + flex-direction: row; + justify-content: space-around; + margin-top: 2rem; +} + +.placeholder { + color: white; +} + +.vertical { + height: auto; + width: 0.2rem; + background-color: white; + margin-right: 1rem; +} + +.example-radio-group { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 15px 0; +} + +.example-radio-button { + margin: 5px; +} + +#mat-tab-label-0-0 { + color: white; +} + +.event { + background: rgba(19, 17, 17, 0.555); +color: white; +border-radius: 1rem; + border: 5px solid white; +} + + +::ng-deep .mat-tab-label-active .mat-tab-label-content { + color: white !important; +} + +::ng-deep.mat-tab-group.mat-primary .mat-ink-bar, ::ng-deep.mat-tab-nav-bar.mat-primary .mat-ink-bar{ + background-color: white !important; + +} + + diff --git a/src/app/add-event/add-event.component.ts b/src/app/add-event/add-event.component.ts index 3f157cb..b0cb4e8 100644 --- a/src/app/add-event/add-event.component.ts +++ b/src/app/add-event/add-event.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { userInfo } from '../contracts/userInfo'; @Component({ selector: 'app-add-event', @@ -6,7 +7,9 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./add-event.component.scss'] }) export class AddEventComponent implements OnInit { - + eventType=1; + harsha:userInfo; + value=""; constructor() { } ngOnInit() { diff --git a/src/app/app.component.html b/src/app/app.component.html index 7d3a07f..42df503 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -2,3 +2,4 @@ <app-register></app-register> <app-login></app-login> <app-listing></app-listing> +<app-add-event></app-add-event> diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 3c6310e..806ffe8 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,12 +5,15 @@ import { AppComponent } from './app.component'; import { HomePageComponent } from './home-page/home-page.component'; import { LoginComponent } from './login/login.component'; import { RegisterComponent } from './register/register.component'; -import { MatCardModule, MatButtonModule } from '@angular/material'; +import { MatCardModule, MatButtonModule, MatDatepickerModule, MatNativeDateModule } from '@angular/material'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { MatInputModule, MatFormFieldModule } from '@angular/material'; +import { MatInputModule, MatFormFieldModule,MatRadioModule,MatTabsModule } from '@angular/material'; import { ListingComponent } from './listing/listing.component'; import { AddEventComponent } from './add-event/add-event.component'; + +import { FormsModule } from '@angular/forms'; + @NgModule({ declarations: [ AppComponent, @@ -27,6 +30,11 @@ import { AddEventComponent } from './add-event/add-event.component'; BrowserAnimationsModule, MatCardModule, MatButtonModule, + MatRadioModule, + FormsModule, + MatTabsModule, + MatDatepickerModule, + MatNativeDateModule, ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/contracts/eventDetails.ts b/src/app/contracts/eventDetails.ts index 3e01afb..6d2f22f 100644 --- a/src/app/contracts/eventDetails.ts +++ b/src/app/contracts/eventDetails.ts @@ -10,5 +10,6 @@ export interface eventDetails{ time?: Date; description?:string; isRegistrationAllowed:boolean; + createdBy?:number; } \ No newline at end of file -- GitLab