first commit
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from "@angular/router";
|
||||
|
||||
import {LoginComponent} from "../component/login/login.component";
|
||||
import {RegisterComponent} from "../component/register/register.component";
|
||||
import {UserComponent} from "../component/user/user.component";
|
||||
import {AuthenticationGuard} from "../guard/authentication.guard";
|
||||
import {ManagementComponent} from "../component/management/management.component";
|
||||
import {UsersComponent} from "../component/management/users/users.component";
|
||||
import {SettingsComponent} from "../component/management/settings/settings.component";
|
||||
import {ProfileComponent} from "../component/management/profile/profile.component";
|
||||
import {UserEditComponent} from "../component/management/users/user-edit/user-edit.component";
|
||||
import {UserViewComponent} from "../component/management/users/user-view/user-view.component";
|
||||
import {UserResolver} from "../component/management/users/user-resolver.service";
|
||||
import { ProfessorComponent } from '../component/professor/professor.component';
|
||||
import { HomeComponent } from '../component/home/home.component';
|
||||
import { EventComponent } from '../component/event/event.component';
|
||||
import { BlogComponent } from '../component/blog/blog.component';
|
||||
import { EventFormComponent } from '../component/event-form/event-form.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'register', component: RegisterComponent },
|
||||
{ path: 'settings', component: SettingsComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'profile', component: ProfileComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'events', component: EventComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'eventForm', component: EventFormComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'eventForm/:id', component: EventFormComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'blogs', component: BlogComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'userManagement', component: UserComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'professorManagement', component: ProfessorComponent, canActivate: [AuthenticationGuard] },
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'login',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AdminRoutingModule { }
|
||||
82
support-portal-frontend/src/app/admin/admin.module.ts
Normal file
82
support-portal-frontend/src/app/admin/admin.module.ts
Normal file
@ -0,0 +1,82 @@
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
// import {AppComponent} from '../app.component';
|
||||
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
|
||||
import {AuthenticationService} from "../service/authentication.service";
|
||||
import {UserService} from "../service/user.service";
|
||||
import {AuthInterceptor} from "../interceptor/auth.interceptor";
|
||||
import {AuthenticationGuard} from "../guard/authentication.guard";
|
||||
import {LoginComponent} from '../component/login/login.component';
|
||||
import {RegisterComponent} from '../component/register/register.component';
|
||||
import {UserComponent} from '../component/user/user.component';
|
||||
// import {AppRoutingModule} from '../app-routing.module';
|
||||
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
|
||||
import {ManagementComponent} from '../component/management/management.component';
|
||||
import {UsersComponent} from '../component/management/users/users.component';
|
||||
import {SettingsComponent} from '../component/management/settings/settings.component';
|
||||
import {ProfileComponent} from '../component/management/profile/profile.component';
|
||||
import {UsersTableComponent} from '../component/management/users/users-table/users-table.component';
|
||||
import {UserViewComponent} from '../component/management/users/user-view/user-view.component';
|
||||
import {UserEditComponent} from '../component/management/users/user-edit/user-edit.component';
|
||||
import { ProfessorComponent } from '../component/professor/professor.component';
|
||||
import { MenuComponent } from '../component/menu/menu.component';
|
||||
import { HomeComponent } from '../component/home/home.component';
|
||||
import { BlogComponent } from '../component/blog/blog.component';
|
||||
import { EventComponent } from '../component/event/event.component';
|
||||
import { BlogService } from '../service/blog.service';
|
||||
import { AngularEditorModule } from '@josipv/angular-editor-k2';
|
||||
import { NotificationModule } from '../notification/notification.module';
|
||||
import { EventFormComponent } from '../component/event-form/event-form.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { AdminRoutingModule } from './admin-routing.module';
|
||||
// import { PagesModule } from '../pages/pages.module';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
// AppComponent,
|
||||
LoginComponent,
|
||||
RegisterComponent,
|
||||
UserComponent,
|
||||
ManagementComponent,
|
||||
UsersComponent,
|
||||
SettingsComponent,
|
||||
ProfileComponent,
|
||||
UsersTableComponent,
|
||||
UserViewComponent,
|
||||
UserEditComponent,
|
||||
ProfessorComponent,
|
||||
MenuComponent,
|
||||
HomeComponent,
|
||||
BlogComponent,
|
||||
EventComponent,
|
||||
EventFormComponent
|
||||
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
// BrowserModule,
|
||||
// HttpClientModule,
|
||||
NotificationModule,
|
||||
// AppRoutingModule,
|
||||
AdminRoutingModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
AngularEditorModule,
|
||||
|
||||
// PagesModule,
|
||||
|
||||
],
|
||||
// providers: [AuthenticationGuard, AuthenticationService, UserService,BlogService,
|
||||
// {provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true}
|
||||
// ],
|
||||
// bootstrap: [AppComponent]
|
||||
})
|
||||
export class AdminModule { }
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ describe('routes', () => {
|
||||
expect(routes).toContain({path: "register", component: RegisterComponent});
|
||||
});
|
||||
|
||||
it('should contain a route for /user/management', () => {
|
||||
it('should contain a route for /dashboard/userManagement', () => {
|
||||
expect(routes).toContain({path: 'user/management', component: UserComponent, canActivate: [AuthenticationGuard]});
|
||||
});
|
||||
|
||||
|
||||
@ -1,32 +1,81 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from "@angular/router";
|
||||
import {LoginComponent} from "./component/login/login.component";
|
||||
import {RegisterComponent} from "./component/register/register.component";
|
||||
import {UserComponent} from "./component/user/user.component";
|
||||
import {AuthenticationGuard} from "./guard/authentication.guard";
|
||||
import {ManagementComponent} from "./component/management/management.component";
|
||||
import {UsersComponent} from "./component/management/users/users.component";
|
||||
import {SettingsComponent} from "./component/management/settings/settings.component";
|
||||
import {ProfileComponent} from "./component/management/profile/profile.component";
|
||||
import {UserEditComponent} from "./component/management/users/user-edit/user-edit.component";
|
||||
import {UserViewComponent} from "./component/management/users/user-view/user-view.component";
|
||||
import {UserResolver} from "./component/management/users/user-resolver.service";
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { LoginComponent } from './component/login/login.component';
|
||||
import { RegisterComponent } from './component/register/register.component';
|
||||
import { UserComponent } from './component/user/user.component';
|
||||
import { AuthenticationGuard } from './guard/authentication.guard';
|
||||
import { ManagementComponent } from './component/management/management.component';
|
||||
import { UsersComponent } from './component/management/users/users.component';
|
||||
import { SettingsComponent } from './component/management/settings/settings.component';
|
||||
import { ProfileComponent } from './component/management/profile/profile.component';
|
||||
import { UserEditComponent } from './component/management/users/user-edit/user-edit.component';
|
||||
import { UserViewComponent } from './component/management/users/user-view/user-view.component';
|
||||
import { UserResolver } from './component/management/users/user-resolver.service';
|
||||
import { ProfessorComponent } from './component/professor/professor.component';
|
||||
import { HomeComponent } from './component/home/home.component';
|
||||
import { EventComponent } from './component/event/event.component';
|
||||
import { BlogComponent } from './component/blog/blog.component';
|
||||
import { EventFormComponent } from './component/event-form/event-form.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{ path: 'home', component: HomeComponent },
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: 'register', component: RegisterComponent },
|
||||
{ path: 'settings', component: SettingsComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'profile', component: ProfileComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'events', component: EventComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'blogs', component: BlogComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'user/management', component: UserComponent, canActivate: [AuthenticationGuard] },
|
||||
{ path: 'professor/management', component: ProfessorComponent, canActivate: [AuthenticationGuard] },
|
||||
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () =>
|
||||
import('./pages/pages.module').then((m) => m.PagesModule),
|
||||
},
|
||||
|
||||
{
|
||||
path: 'dashboard',
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)
|
||||
},
|
||||
|
||||
{ path: '', redirectTo: '/', pathMatch: 'full' }
|
||||
|
||||
|
||||
// { path: 'home', component: HomeComponent },
|
||||
// { path: 'login', component: LoginComponent },
|
||||
// { path: 'register', component: RegisterComponent },
|
||||
// {
|
||||
// path: 'settings',
|
||||
// component: SettingsComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'profile',
|
||||
// component: ProfileComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'events',
|
||||
// component: EventComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'eventForm',
|
||||
// component: EventFormComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'eventForm/:id',
|
||||
// component: EventFormComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'blogs',
|
||||
// component: BlogComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'user/management',
|
||||
// component: UserComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
// {
|
||||
// path: 'professor/management',
|
||||
// component: ProfessorComponent,
|
||||
// canActivate: [AuthenticationGuard],
|
||||
// },
|
||||
|
||||
// {
|
||||
// path: 'management', component: ManagementComponent, canActivate: [AuthenticationGuard],
|
||||
// children: [
|
||||
@ -41,12 +90,11 @@ export const routes: Routes = [
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{path: '', redirectTo: '/login', pathMatch: 'full'}
|
||||
// { path: '', redirectTo: '/login', pathMatch: 'full' },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes)],
|
||||
exports: [RouterModule]
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {
|
||||
}
|
||||
export class AppRoutingModule {}
|
||||
|
||||
@ -6,5 +6,5 @@ import {Component} from '@angular/core';
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'support-portal-frontend';
|
||||
title = 'cnc - Admin';
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {Compiler, NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
|
||||
import {AppComponent} from './app.component';
|
||||
@ -27,6 +27,8 @@ import { EventComponent } from './component/event/event.component';
|
||||
import { BlogService } from './service/blog.service';
|
||||
import { AngularEditorModule } from '@josipv/angular-editor-k2';
|
||||
import { NotificationModule } from './notification/notification.module';
|
||||
import { EventFormComponent } from './component/event-form/event-form.component';
|
||||
// import { PagesModule } from './pages/pages.module';
|
||||
|
||||
|
||||
|
||||
@ -35,21 +37,22 @@ import { NotificationModule } from './notification/notification.module';
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
LoginComponent,
|
||||
RegisterComponent,
|
||||
UserComponent,
|
||||
ManagementComponent,
|
||||
UsersComponent,
|
||||
SettingsComponent,
|
||||
ProfileComponent,
|
||||
UsersTableComponent,
|
||||
UserViewComponent,
|
||||
UserEditComponent,
|
||||
ProfessorComponent,
|
||||
MenuComponent,
|
||||
HomeComponent,
|
||||
BlogComponent,
|
||||
EventComponent
|
||||
// LoginComponent,
|
||||
// RegisterComponent,
|
||||
// UserComponent,
|
||||
// ManagementComponent,
|
||||
// UsersComponent,
|
||||
// SettingsComponent,
|
||||
// ProfileComponent,
|
||||
// UsersTableComponent,
|
||||
// UserViewComponent,
|
||||
// UserEditComponent,
|
||||
// ProfessorComponent,
|
||||
// MenuComponent,
|
||||
// HomeComponent,
|
||||
// BlogComponent,
|
||||
// EventComponent,
|
||||
// EventFormComponent
|
||||
|
||||
],
|
||||
imports: [
|
||||
@ -57,11 +60,14 @@ import { NotificationModule } from './notification/notification.module';
|
||||
HttpClientModule,
|
||||
NotificationModule,
|
||||
AppRoutingModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
AngularEditorModule
|
||||
// FormsModule,
|
||||
// ReactiveFormsModule,
|
||||
// AngularEditorModule,
|
||||
// PagesModule,
|
||||
|
||||
],
|
||||
providers: [AuthenticationGuard, AuthenticationService, UserService,BlogService,
|
||||
// providers:[],
|
||||
providers: [Compiler,AuthenticationGuard, AuthenticationService, UserService,BlogService,
|
||||
{provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true}
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
|
||||
@ -0,0 +1,145 @@
|
||||
<app-menu></app-menu>
|
||||
|
||||
<div class="container mt-4">
|
||||
<form [formGroup]="eventForm" (ngSubmit)="onSubmit()">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3">
|
||||
<label for="code" class="form-label text-primary">Code</label>
|
||||
<input id="code" formControlName="code" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="year" class="form-label text-primary">Year</label>
|
||||
<input id="year" formControlName="year" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="subject" class="form-label text-primary">Subject</label>
|
||||
<input id="subject" formControlName="subject" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="title" class="form-label text-primary">Title</label>
|
||||
<input id="title" formControlName="title" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="subTitle" class="form-label text-primary">Subtitle</label>
|
||||
<input id="subTitle" formControlName="subTitle" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="date" class="form-label text-primary">Date</label>
|
||||
<input id="date" formControlName="date" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="phone" class="form-label text-primary">Phone</label>
|
||||
<input id="phone" formControlName="phone" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="email" class="form-label text-primary">Email</label>
|
||||
<input id="email" formControlName="email" class="form-control" />
|
||||
</div>
|
||||
<div class="form-group mb-3">
|
||||
<label for="isActive" class="form-label text-primary">Active</label>
|
||||
<input id="isActive" type="checkbox" formControlName="isActive" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group mb-3">
|
||||
<label class="form-label text-primary">Venues</label>
|
||||
<div formArrayName="venues">
|
||||
<div *ngFor="let venue of venues.controls; let i = index" class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div [formGroupName]="i">
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<input formControlName="title" placeholder="Title" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-6">
|
||||
<input formControlName="date" placeholder="Date" class="form-control" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input formControlName="address" placeholder="Address" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-12">
|
||||
<input formControlName="info" placeholder="Info" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-sm float-end" (click)="removeVenue(i)">
|
||||
<!-- <i class="bi bi-trash"></i> -->X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" (click)="addVenue()">
|
||||
<i class="bi bi-plus"></i> Add Venue
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label class="form-label text-primary">Highlights</label>
|
||||
<div formArrayName="highlights">
|
||||
<div *ngFor="let highlight of highlights.controls; let i = index" class="card mb-2">
|
||||
<div class="card-body">
|
||||
<input [formControlName]="i" class="form-control" placeholder="Highlight" />
|
||||
<button type="button" class="btn btn-danger btn-sm float-end mt-2" (click)="removeHighlight(i)">
|
||||
<!-- <i class="bi bi-trash"></i> -->X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" (click)="addHighlight()">
|
||||
<i class="bi bi-plus"></i> Add Highlight
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label class="form-label text-primary">Organisers</label>
|
||||
<div formArrayName="organisers">
|
||||
<div *ngFor="let organiser of organisers.controls; let i = index" class="card mb-2">
|
||||
<div class="card-body">
|
||||
<input [formControlName]="i" class="form-control" placeholder="Organiser" />
|
||||
<button type="button" class="btn btn-danger btn-sm float-end mt-2" (click)="removeOrganiser(i)">
|
||||
<!-- <i class="bi bi-trash"></i> -->X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" (click)="addOrganiser()">
|
||||
<i class="bi bi-plus"></i> Add Organiser
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label class="form-label text-primary">Fees</label>
|
||||
<div formArrayName="fees">
|
||||
<div *ngFor="let fee of fees.controls; let i = index" class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div [formGroupName]="i">
|
||||
<div class="row mb-2">
|
||||
<div class="col-8">
|
||||
<input formControlName="desc" placeholder="Description" class="form-control" />
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input formControlName="cost" placeholder="Cost" type="number" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-danger btn-sm float-end mt-2" (click)="removeFee(i)">
|
||||
<!-- <i class="bi bi-trash"></i> -->X
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn btn-primary" (click)="addFee()">
|
||||
<i class="bi bi-plus"></i> Add Fee
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EventFormComponent } from './event-form.component';
|
||||
|
||||
describe('EventFormComponent', () => {
|
||||
let component: EventFormComponent;
|
||||
let fixture: ComponentFixture<EventFormComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ EventFormComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(EventFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,135 @@
|
||||
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { EventService } from 'src/app/service/event.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event-form',
|
||||
templateUrl: './event-form.component.html',
|
||||
styleUrls: ['./event-form.component.css']
|
||||
})
|
||||
export class EventFormComponent implements OnInit {
|
||||
|
||||
|
||||
|
||||
|
||||
eventForm: FormGroup;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private eventService: EventService,
|
||||
private route: ActivatedRoute,
|
||||
private router: Router
|
||||
|
||||
) {}
|
||||
eventId: number | null;
|
||||
|
||||
ngOnInit() {
|
||||
this.eventForm = this.fb.group({
|
||||
code: ['', Validators.required],
|
||||
year: ['', Validators.required],
|
||||
subject: ['', Validators.required],
|
||||
title: ['', Validators.required],
|
||||
subTitle: [''],
|
||||
date: ['', Validators.required],
|
||||
venues: this.fb.array([]),
|
||||
highlights: this.fb.array([]),
|
||||
organisers: this.fb.array([]),
|
||||
fees: this.fb.array([]),
|
||||
phone: ['', Validators.required],
|
||||
email: ['', [Validators.required, Validators.email]],
|
||||
isActive: [true]
|
||||
});
|
||||
|
||||
this.route.paramMap.subscribe(params => {
|
||||
const idParam = params.get('id');
|
||||
this.eventId = idParam ? +idParam : null;
|
||||
|
||||
if (this.eventId !== null) {
|
||||
this.loadEvent(this.eventId);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
loadEvent(id: number): void {
|
||||
this.eventService.getEvent(id).subscribe(event => {
|
||||
this.eventForm.patchValue(event);
|
||||
this.setArrayValues('venues', event.venues);
|
||||
this.setArrayValues('highlights', event.highlights);
|
||||
this.setArrayValues('organisers', event.organisers);
|
||||
this.setArrayValues('fees', event.fees);
|
||||
});
|
||||
}
|
||||
|
||||
setArrayValues(controlName: string, values: any[]): void {
|
||||
const array = this.eventForm.get(controlName) as FormArray;
|
||||
values.forEach(value => array.push(this.fb.group(value)));
|
||||
}
|
||||
|
||||
get venues(): FormArray {
|
||||
return this.eventForm.get('venues') as FormArray;
|
||||
}
|
||||
|
||||
get highlights(): FormArray {
|
||||
return this.eventForm.get('highlights') as FormArray;
|
||||
}
|
||||
|
||||
get organisers(): FormArray {
|
||||
return this.eventForm.get('organisers') as FormArray;
|
||||
}
|
||||
|
||||
get fees(): FormArray {
|
||||
return this.eventForm.get('fees') as FormArray;
|
||||
}
|
||||
|
||||
addVenue() {
|
||||
this.venues.push(this.fb.group({
|
||||
title: [''],
|
||||
date: [''],
|
||||
address: [''],
|
||||
info: ['']
|
||||
}));
|
||||
}
|
||||
|
||||
removeVenue(index: number) {
|
||||
this.venues.removeAt(index);
|
||||
}
|
||||
|
||||
addHighlight() {
|
||||
this.highlights.push(this.fb.control(''));
|
||||
}
|
||||
|
||||
removeHighlight(index: number) {
|
||||
this.highlights.removeAt(index);
|
||||
}
|
||||
|
||||
addOrganiser() {
|
||||
this.organisers.push(this.fb.control(''));
|
||||
}
|
||||
|
||||
removeOrganiser(index: number) {
|
||||
this.organisers.removeAt(index);
|
||||
}
|
||||
|
||||
addFee() {
|
||||
this.fees.push(this.fb.group({
|
||||
desc: [''],
|
||||
cost: ['']
|
||||
}));
|
||||
}
|
||||
|
||||
removeFee(index: number) {
|
||||
this.fees.removeAt(index);
|
||||
}
|
||||
|
||||
onSubmit(): void {
|
||||
if (this.eventForm.valid) {
|
||||
if (this.eventId) {
|
||||
this.eventService.updateEvent(this.eventId, this.eventForm.value).subscribe(() => this.router.navigate(['/events']));
|
||||
} else {
|
||||
this.eventService.createEvent(this.eventForm.value).subscribe(() => this.router.navigate(['/events']));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,2 +1,47 @@
|
||||
<app-menu></app-menu>
|
||||
|
||||
<div class="container mt-4">
|
||||
<h2 class="mb-4">Events</h2>
|
||||
<div class="mb-3">
|
||||
<a routerLink="/eventForm" class="btn btn-primary">
|
||||
<i class="bi bi-plus"></i> Add New Event
|
||||
</a>
|
||||
</div>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Code</th>
|
||||
<th>Year</th>
|
||||
<th>Subject</th>
|
||||
<th>Title</th>
|
||||
<th>Subtitle</th>
|
||||
<th>Date</th>
|
||||
<th>Phone</th>
|
||||
<th>Email</th>
|
||||
<th>Active</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let event of events">
|
||||
<td>{{ event.code }}</td>
|
||||
<td>{{ event.year }}</td>
|
||||
<td>{{ event.subject }}</td>
|
||||
<td>{{ event.title }}</td>
|
||||
<td>{{ event.subTitle }}</td>
|
||||
<td>{{ event.date }}</td>
|
||||
<td>{{ event.phone }}</td>
|
||||
<td>{{ event.email }}</td>
|
||||
<td>{{ event.isActive ? 'Yes' : 'No' }}</td>
|
||||
<td>
|
||||
<a [routerLink]="['/eventForm', event.id]" class="btn btn-warning btn-sm">
|
||||
<i class="bi bi-pencil"></i> Edit
|
||||
</a>
|
||||
<button (click)="deleteEvent(event.id)" class="btn btn-danger btn-sm">
|
||||
<i class="bi bi-trash"></i> Delete
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, FormArray, Validators } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
import { EventService } from 'src/app/service/event.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-event',
|
||||
@ -6,13 +9,21 @@ import { Component, OnInit } from '@angular/core';
|
||||
styleUrls: ['./event.component.css']
|
||||
})
|
||||
export class EventComponent implements OnInit {
|
||||
events: any[] = []; // Define the type according to your model
|
||||
|
||||
constructor() { }
|
||||
|
||||
htmlContent: string = '';
|
||||
|
||||
constructor(private eventService: EventService, private router: Router) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadEvents();
|
||||
}
|
||||
|
||||
}
|
||||
loadEvents(): void {
|
||||
this.eventService.getEvents().subscribe(events => this.events = events);
|
||||
}
|
||||
|
||||
deleteEvent(id: number): void {
|
||||
if (confirm('Are you sure you want to delete this event?')) {
|
||||
// this.eventService.deleteEvent(id).subscribe(() => this.loadEvents());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +28,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.authenticationService.isUserLoggedIn()) {
|
||||
this.router.navigate(["/user", "management"]);
|
||||
this.router.navigate(["/dashboard", "userManagement"]);
|
||||
// this.router.navigate(["/management", "users"]);
|
||||
this.notificationService.notify(NotificationType.INFO, "You are already logged in");
|
||||
}
|
||||
@ -46,8 +46,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.authenticationService.addUserToLocalStorage(response.body!);
|
||||
|
||||
this.router.navigateByUrl('/home');
|
||||
// this.router.navigateByUrl('/management/users');
|
||||
this.router.navigateByUrl('/dashboard/home');
|
||||
this.showLoading = false;
|
||||
},
|
||||
(errorResponse: HttpErrorResponse) => {
|
||||
|
||||
@ -77,7 +77,7 @@ export class ProfileComponent implements OnInit {
|
||||
|
||||
onLogOut() {
|
||||
this.authenticationService.logout();
|
||||
this.router.navigate(['/login']);
|
||||
this.router.navigate(['/dashboard/login']);
|
||||
this.notificationService.notify(NotificationType.SUCCESS, 'You have been successfully logged out');
|
||||
}
|
||||
|
||||
|
||||
@ -22,5 +22,6 @@
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@ -56,4 +56,5 @@ export class SettingsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -11,38 +11,38 @@
|
||||
<nav class="navbar navbar-expand-md breadcrumb">
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<div class="nav nav-pills">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/home" routerLinkActive="active" (click)="changeTitle('Home')">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/dashboard/home" routerLinkActive="active" (click)="changeTitle('Home')">
|
||||
<i class="fa fa-home"></i>
|
||||
Home
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-1" routerLink="/user/management" routerLinkActive="active" (click)="changeTitle('Users')">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/dashboard/userManagement" routerLinkActive="active" (click)="changeTitle('Users')">
|
||||
<i class="fa fa-users"></i>
|
||||
Users
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-1" routerLink="/professor/management" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/dashboard/professorManagement" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<i class="fa fa-chalkboard-teacher"></i>
|
||||
Professors
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-1" routerLink="/blogs" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/dashboard/blogs" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<i class="fa fa-chalkboard-teacher"></i>
|
||||
Blogs
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-1" routerLink="/events" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<a class="nav-item nav-link ml-1" routerLink="/dashboard/events" routerLinkActive="active" (click)="changeTitle('Professors')">
|
||||
<i class="fa fa-chalkboard-teacher"></i>
|
||||
Events
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-3" routerLink="/settings" routerLinkActive="active" (click)="changeTitle('Settings')">
|
||||
<a class="nav-item nav-link ml-3" routerLink="/dashboard/settings" routerLinkActive="active" (click)="changeTitle('Settings')">
|
||||
<i class="fa fa-cogs"></i>
|
||||
Settings
|
||||
</a>
|
||||
<a class="nav-item nav-link move-right mr-3" routerLink="/profile" routerLinkActive="active" (click)="changeTitle('Profile')">
|
||||
<a class="nav-item nav-link move-right mr-3" routerLink="/dashboard/profile" routerLinkActive="active" (click)="changeTitle('Profile')">
|
||||
Welcome, {{ loggedInUser.firstName }} {{ loggedInUser.lastName }}
|
||||
<i class="fa fa-user"></i>
|
||||
</a>
|
||||
<a class="nav-item nav-link ml-1" (click)="logout()">
|
||||
<!-- <a class="nav-item nav-link ml-1" (click)="logout()">
|
||||
<i class="fa fa-sign-out-alt"></i>
|
||||
Logout
|
||||
</a>
|
||||
</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@ -26,7 +26,7 @@ export class RegisterComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnInit(): void {
|
||||
if (this.authenticationService.isUserLoggedIn()) {
|
||||
this.router.navigateByUrl("/user/management");
|
||||
this.router.navigateByUrl("/dashboard/userManagement");
|
||||
this.notificationService.notify(NotificationType.INFO, "You are already logged in");
|
||||
}
|
||||
}
|
||||
@ -39,7 +39,7 @@ export class RegisterComponent implements OnInit, OnDestroy {
|
||||
.subscribe(user => {
|
||||
this.notificationService.notify(NotificationType.SUCCESS, `A new account was created for ${user.firstName}.
|
||||
Please check your email for password to log in`);
|
||||
this.router.navigateByUrl('/login');
|
||||
this.router.navigateByUrl('/dashboard/login');
|
||||
this.showLoading = false;
|
||||
},
|
||||
(errorResponse: HttpErrorResponse) => {
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<i class="fa fa-users"></i>
|
||||
Users
|
||||
</a>
|
||||
<a class="nav-item nav-link active ml-1" (click)="changeTitle('Professors')" [routerLink]="['/professor/management']" >
|
||||
<a class="nav-item nav-link active ml-1" (click)="changeTitle('Professors')" [routerLink]="['/dashboard/professorManagement']" >
|
||||
<i class="fa fa-users"></i>
|
||||
Professors
|
||||
</a>
|
||||
|
||||
@ -236,7 +236,7 @@ export class UserComponent implements OnInit, OnDestroy {
|
||||
|
||||
onLogOut() {
|
||||
this.authenticationService.logout();
|
||||
this.router.navigate(['/login']);
|
||||
this.router.navigate(['/dashboard/login']);
|
||||
this.sendNotification(NotificationType.SUCCESS, 'You have been successfully logged out');
|
||||
}
|
||||
|
||||
|
||||
16
support-portal-frontend/src/app/data.service.spec.ts
Normal file
16
support-portal-frontend/src/app/data.service.spec.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DataService } from './data.service';
|
||||
|
||||
describe('DataService', () => {
|
||||
let service: DataService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(DataService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
389
support-portal-frontend/src/app/data.service.ts
Normal file
389
support-portal-frontend/src/app/data.service.ts
Normal file
@ -0,0 +1,389 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { HttpClient, HttpHeaders } from "@angular/common/http";
|
||||
import { Observable } from "rxjs";
|
||||
|
||||
@Injectable({
|
||||
providedIn: "root",
|
||||
})
|
||||
export class DataService {
|
||||
private url = "https://api.wrdpwd.com/soap/callWebService";
|
||||
// private url =
|
||||
// "https://clin.CMCVellore.ac.in/newconference/ConferencePay.asmx";
|
||||
prod_cred = {
|
||||
userName: "UMRCETS",
|
||||
password: "us8FaGH5",
|
||||
program: "TSURCME",
|
||||
};
|
||||
|
||||
private test_url =
|
||||
"https://clin.CMCVellore.ac.in/TestConference/ConferencePay.asmx";
|
||||
test_cred = {
|
||||
userName: "UMRESTC",
|
||||
password: "zEVjHc9Y",
|
||||
program: "TSURCME",
|
||||
};
|
||||
|
||||
constructor(private httpClient: HttpClient) {}
|
||||
|
||||
// Method to send the SOAP request
|
||||
sendSOAPRequestForStatus(formData: any): Observable<any> {
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/soap+xml; charset=utf-8",
|
||||
SOAPAction: "http://www.cmch-vellore.edu/CONFONLINEPAYSTATUS",
|
||||
});
|
||||
|
||||
const soapBody = this.generateSOAPBodyForStatus(this.prod_cred, formData);
|
||||
|
||||
console.log(soapBody);
|
||||
|
||||
return this.httpClient.post(this.url, soapBody, {
|
||||
headers,
|
||||
responseType: "text",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Method to send the SOAP request
|
||||
sendSOAPRequest(formData: any): Observable<any> {
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/soap+xml; charset=utf-8",
|
||||
SOAPAction: "http://www.cmch-vellore.edu/NEWCONFONLINEPAYSAVE",
|
||||
});
|
||||
|
||||
const soapBody = this.generateSOAPBody(this.prod_cred, formData);
|
||||
|
||||
console.log(soapBody);
|
||||
|
||||
return this.httpClient.post(this.url, soapBody, {
|
||||
headers,
|
||||
responseType: "text",
|
||||
});
|
||||
}
|
||||
|
||||
// Generate the SOAP body from form data
|
||||
private generateSOAPBodyForStatus(userDetails: any, formData: any): string {
|
||||
|
||||
const soapXML = `
|
||||
<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:www="http://www.cmch-vellore.edu/">
|
||||
<x:Header>
|
||||
<www:UserDetails>
|
||||
<www:userName>${userDetails.userName}</www:userName>
|
||||
<www:password>${userDetails.password}</www:password>
|
||||
<www:program>${userDetails.program}</www:program>
|
||||
</www:UserDetails>
|
||||
</x:Header>
|
||||
<x:Body>
|
||||
<www:CONFONLINEPAYSTATUS>
|
||||
${this.generateFieldsXML(formData)}
|
||||
</www:CONFONLINEPAYSTATUS>
|
||||
</x:Body>
|
||||
</x:Envelope>
|
||||
`;
|
||||
|
||||
return soapXML;
|
||||
}
|
||||
// Generate the SOAP body from form data
|
||||
private generateSOAPBody(userDetails: any, formData: any): string {
|
||||
const soapXML = `
|
||||
<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:www="http://www.cmch-vellore.edu/">
|
||||
<x:Header>
|
||||
<www:UserDetails>
|
||||
<www:userName>${userDetails.userName}</www:userName>
|
||||
<www:password>${userDetails.password}</www:password>
|
||||
<www:program>${userDetails.program}</www:program>
|
||||
</www:UserDetails>
|
||||
</x:Header>
|
||||
<x:Body>
|
||||
<www:NEWCONFONLINEPAYSAVE>
|
||||
${this.generateFieldsXML(formData)}
|
||||
</www:NEWCONFONLINEPAYSAVE>
|
||||
</x:Body>
|
||||
</x:Envelope>
|
||||
`;
|
||||
|
||||
return soapXML;
|
||||
}
|
||||
|
||||
// Generate the fields in SOAP XML format from form data
|
||||
private generateFieldsXML(formData: any): string {
|
||||
let fieldsXML = "";
|
||||
|
||||
// Iterate through form data and generate XML for each field
|
||||
for (const key in formData) {
|
||||
if (formData.hasOwnProperty(key)) {
|
||||
fieldsXML += `<www:${key}>${formData[key]}</www:${key}>`;
|
||||
}
|
||||
}
|
||||
|
||||
return fieldsXML;
|
||||
}
|
||||
|
||||
events = [
|
||||
{
|
||||
id: 1,
|
||||
code: "TSURCME",
|
||||
year: "2023",
|
||||
subject: "CME on ",
|
||||
title: " Advances in Chest Trauma Management ",
|
||||
subTitle : "ACTraM 2023",
|
||||
date: "13 & 14, October - 2023",
|
||||
venue: [
|
||||
{
|
||||
title: "Symposium (Hybrid/ In person) ",
|
||||
date: "13.10.2023",
|
||||
address: "Conference Hall 7th floor, A-Block, CMC Vellore Ranipet Campus",
|
||||
},
|
||||
{
|
||||
title: "Cadaveric Workshop ",
|
||||
date: "14.10.2023",
|
||||
address: "Antomy Dissection Hall, CMC Vellore Bagayam Campus",
|
||||
info: "Limited seats & in person only",
|
||||
},
|
||||
],
|
||||
highlights: [
|
||||
"Keynote lectures by eminent national and international faculty",
|
||||
"Sessions oriented towards understanding the intricacies of multidisciplinary care that is needed in the management of chest trauma patients. ",
|
||||
"Challenging cases discussions ",
|
||||
"Specific focus on intercostal drainage, minimally invasive chest surgery in trauma, thoracic rib fixation, pain relief medications in trauma and critical care management.",
|
||||
"Hands-on cadaveric training on the basic principles of surgical rib fixation",
|
||||
],
|
||||
orgnisers: [
|
||||
"Dr. Sukria Nayak - Organising Chairperson",
|
||||
"Dr. Joses Dany James- Convener ",
|
||||
"Dr. Vijayan P -Convener",
|
||||
"Dr. Srujan Lam Sharma -Convener",
|
||||
"Ms. Nithya.A- Manager",
|
||||
"Mr. Prabhu - Manager",
|
||||
],
|
||||
|
||||
fee: [
|
||||
{ desc: "Online (ISTAC Members only) - ₹500", cost: 500 },
|
||||
{ desc: "Symposium (In-person) - ₹1000", cost: 1000 },
|
||||
{ desc: "Workshop (Only) - ₹3500", cost: 3500 },
|
||||
{ desc: "Symposium & Workshop ₹4500", cost: 5310 },
|
||||
{ desc: "* (+18% GST)", cost: 5310 },
|
||||
|
||||
],
|
||||
|
||||
phone: "04172 – 224627 ",
|
||||
email: "traumasurg.academic@cmcvellore.ac.in",
|
||||
isActive: true,
|
||||
doctors: [
|
||||
{
|
||||
name: "Dr. Amit Gupta",
|
||||
prof: "Professor",
|
||||
at: "Division of Trauma Surgery JPNATC, AIIMS New Delhi",
|
||||
id: 3,
|
||||
image: "3.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Subodh Kumar",
|
||||
prof: "Professor",
|
||||
at: "Division of Trauma Surgery, JPNATC, AIIMS New Delhi",
|
||||
id: 2,
|
||||
image: "2.jpg",
|
||||
},
|
||||
{
|
||||
|
||||
name: "Dr. Kajal Jain ",
|
||||
prof: "Professor",
|
||||
at: "Trauma Anaesthesia PGIMER, Chandigarh.",
|
||||
id: 1,
|
||||
image: "1.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Krishnan Raghavendran ",
|
||||
prof: "Professor",
|
||||
at: " Division of Trauma and Acute Care Surgery, University Hospital, Ann Arbor Hospital Michigan",
|
||||
id: 4,
|
||||
image: "4.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Balasubramoniam",
|
||||
at: "Consultant Thoracic Surgeon, Yashoda group of Hospitals, Hyderabad",
|
||||
id: 5,
|
||||
image: "5.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Niladri Banerjee",
|
||||
prof: "Assistant Professor",
|
||||
at: "Department of Surgery, AIIMS Jodhpur",
|
||||
id: 8,
|
||||
image: "8.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Sukria Nayak",
|
||||
prof: "Professor & Head",
|
||||
at: " Department of Trauma Surgery, CMC Vellore",
|
||||
id: 6,
|
||||
image: "6.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Ekta Rai",
|
||||
prof: "Professor ",
|
||||
at: "Department of Anesthesia,CMC Vellore",
|
||||
id: 16,
|
||||
image: "16.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr.Madhu Andrew Philip",
|
||||
at: "Prof & Head, Department of Cardiothoracic Surgery,CMC Vellore",
|
||||
id: 17,
|
||||
image: "17.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Balasubramani",
|
||||
prof: "Professor ",
|
||||
at: "Department of Surgical ICU, CMC Vellore",
|
||||
id: 18,
|
||||
image: "18.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Susheel Sudheesh",
|
||||
prof: "Assistant Professor",
|
||||
at: "Department of Anaesthesia, CMC Vellore",
|
||||
id: 10,
|
||||
image: "10.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Srujan Lam Sharma",
|
||||
prof: "Assistant Professor",
|
||||
at: "Department of Trauma Surgery, CMC Vellore",
|
||||
id: 12,
|
||||
image: "12.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Vinay M Rao ",
|
||||
prof: "Associate Professor",
|
||||
at: "Department of Cardiothoracic, Surgery CMC Vellore",
|
||||
id: 7,
|
||||
image: "7.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Santhosh R Benjamin",
|
||||
prof: "Associate Professor",
|
||||
at: "Department of Cardiothoracic, Surgery,CMC Vellore",
|
||||
id: 9,
|
||||
image: "9.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Kirthi Sathyakumar ",
|
||||
prof: "Associate Professor",
|
||||
at: "Emergency Radiology, CMC Vellore",
|
||||
id: 11,
|
||||
image: "11.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Joses Dany James",
|
||||
prof: "Assistant Professor",
|
||||
at: "Department of Trauma Surgery, CMC Vellore",
|
||||
id: 14,
|
||||
image: "14.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Vijayan P",
|
||||
prof: "Associate Professor",
|
||||
at: "Department of Trauma Surgery, CMC Vellore",
|
||||
id: 13,
|
||||
image: "13.jpg",
|
||||
},
|
||||
{
|
||||
name: "Dr. Vignesh Kumar",
|
||||
prof: "Associate Professor",
|
||||
at: "Department of General Surgery, PIMS, Puducherry",
|
||||
id: 15,
|
||||
image: "15.jpg",
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
getAllConferenceData(): Observable<any> {
|
||||
const url = "https://api.wrdpwd.com/soap/getAllConferenceData";
|
||||
return this.httpClient.get(url);
|
||||
}
|
||||
|
||||
// Create a method to send data via POST request
|
||||
insertConferenceData(data: any): Observable<any> {
|
||||
const url = "https://api.wrdpwd.com/soap/insertConferenceData";
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.post(url, data, { headers });
|
||||
}
|
||||
|
||||
// Create a method to send data via POST request
|
||||
updateConferenceData(id, data: any): Observable<any> {
|
||||
const url = "https://api.wrdpwd.com/soap/updateConferenceData/" + id;
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.put(url, data, { headers });
|
||||
}
|
||||
|
||||
partialUpdateConferenceData(id, data: any): Observable<any> {
|
||||
const url = "https://api.wrdpwd.com/soap/partialUpdateConferenceData/" + id;
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.patch(url, data, { headers });
|
||||
}
|
||||
|
||||
|
||||
getConferenceDataByRegno(id){
|
||||
const url = "https://api.wrdpwd.com/soap/getConferenceDataByRegno/" + id;
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.get(url, { headers });
|
||||
}
|
||||
|
||||
|
||||
getConferenceDataByPhone(id){
|
||||
const url = "https://api.wrdpwd.com/soap/getConferenceDataByPhone/" + id;
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.get(url, { headers });
|
||||
}
|
||||
|
||||
|
||||
// Create a method to send data via POST request
|
||||
deleteConferenceData(id): Observable<any> {
|
||||
const url = "https://api.wrdpwd.com/soap/deleteConferenceData/" + id;
|
||||
// Define headers if needed (adjust as necessary)
|
||||
const headers = new HttpHeaders({
|
||||
"Content-Type": "application/json",
|
||||
});
|
||||
|
||||
// Send the POST request
|
||||
return this.httpClient.delete(url, { headers });
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
export class PaymentInfo {
|
||||
Registration: string;
|
||||
Transid: string;
|
||||
ResultCode: string;
|
||||
Result: string;
|
||||
URL: string;
|
||||
}
|
||||
@ -28,7 +28,7 @@ export class AuthenticationGuard implements CanActivate {
|
||||
if (this.authenticationService.isUserLoggedIn())
|
||||
return true;
|
||||
else {
|
||||
this.router.navigate(['/login']);
|
||||
this.router.navigate(['/dashboard/login']);
|
||||
|
||||
this.notificationService.notify(NotificationType.ERROR, `You need to log in to access this page`);
|
||||
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
<div class="container mt-4">
|
||||
<h2 class="mb-4">Detail Info</h2>
|
||||
<div *ngIf="rowData" class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="-title">Candidate Information</h5>
|
||||
<!-- Display the labels based on their corresponding inputcaptionX values -->
|
||||
|
||||
<!-- Add the remaining fields here using the same pattern -->
|
||||
<p class="card-text"><strong>ID:</strong> {{ rowData.id || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Conference Code:</strong> {{ rowData.conferencecode || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Conference Year:</strong> {{ rowData.conferenceyear || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Bank Name:</strong> {{ rowData.bankname || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Remote IP:</strong> {{ rowData.remoteip || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Registration Number:</strong> {{ rowData.regno || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Candidate Name:</strong> {{ rowData.candidatename || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Name in Receipt:</strong> {{ rowData.nameinreceipt || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Address 1:</strong> {{ rowData.address1 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Address 2:</strong> {{ rowData.address2 || "-NA-"}}</p>
|
||||
|
||||
<p class="card-text"><strong>Country:</strong> {{ rowData.country || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Pincode:</strong> {{ rowData.pincode || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Phone:</strong> {{ rowData.phone || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Mobile:</strong> {{ rowData.mobile || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Email:</strong> {{ rowData.email || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Food Type:</strong> {{ rowData.foodtype || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Participant Type:</strong> {{ rowData.participanttype || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Practice Type:</strong> {{ rowData.practicetype || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Accompany Members:</strong> {{ rowData.accompanymembers || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>External or CMC Staff: </strong>: {{ rowData.inputvalue5 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Payment Amount:</strong> {{ rowData.paymentamount || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Has GST:</strong> {{ rowData.hasgst || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>GST Number:</strong> {{ rowData.gstnumber || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>GST Mobile Number:</strong> {{ rowData.gstmobileno || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>GST Email ID:</strong> {{ rowData.gstemailid || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>To Wards:</strong> {{ rowData.toWards || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Allow 80G:</strong> {{ rowData.allow80G || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Pan Card Number:</strong> {{ rowData.panCardNo || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>GST Registration:</strong> {{ rowData.gstreg || "-NA-"}}</p>
|
||||
<!-- Add any additional fields as needed -->
|
||||
|
||||
|
||||
<p class="card-text"><strong>CMC MISSION:</strong> {{ rowData.city || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>MISSION ID:</strong> {{ rowData.state || "-NA-"}}</p>
|
||||
|
||||
<p class="card-text"><strong>designation: </strong>: {{ rowData.inputvalue1 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>placeOfWork: </strong>: {{ rowData.inputcaption2 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>medicalCollegeName: </strong>: {{ rowData.inputvalue2 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>hospitalName: </strong>: {{ rowData.inputcaption3 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>istacMember: </strong>: {{ rowData.inputvalue3 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>istacMemberID: </strong>: {{ rowData.inputcaption4 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>registrationType: </strong>: {{ rowData.inputvalue4 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>submitCase: </strong>: {{ rowData.inputcaption5 || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>isPaymentDone: </strong>: {{ rowData.inputcaption1 || "-NA-"}}</p>
|
||||
|
||||
|
||||
|
||||
<p class="card-text"><strong>Response Transaction ID:</strong> {{ rowData.responseTransid || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Response Result Code:</strong> {{ rowData.responseResultCode || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Response Result:</strong> {{ rowData.responseResult || "-NA-"}}</p>
|
||||
<p class="card-text"><strong>Response URL:</strong> {{ rowData.responseURL || "-NA-"}}</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CandidateDetailsComponent } from './candidate-details.component';
|
||||
|
||||
describe('CandidateDetailsComponent', () => {
|
||||
let component: CandidateDetailsComponent;
|
||||
let fixture: ComponentFixture<CandidateDetailsComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ CandidateDetailsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CandidateDetailsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,26 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-candidate-details',
|
||||
templateUrl: './candidate-details.component.html',
|
||||
styleUrls: ['./candidate-details.component.scss']
|
||||
})
|
||||
export class CandidateDetailsComponent implements OnInit {
|
||||
|
||||
rowData: any; // Data for the selected row
|
||||
|
||||
constructor(private route: ActivatedRoute) { }
|
||||
|
||||
ngOnInit() {
|
||||
// Retrieve the data object from the route's state
|
||||
this.route.paramMap.subscribe(params => {
|
||||
const dataString = params.get('data');
|
||||
if (dataString) {
|
||||
this.rowData = JSON.parse(dataString);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
<div class="row p-3">
|
||||
<div class="col-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-header">Registration Info</div>
|
||||
<div class="card-body">
|
||||
<form [formGroup]="detailForm" (ngSubmit)="detailFormSubmit()">
|
||||
<div class="form-group">
|
||||
<label for="phone">Mobile Number</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="phone"
|
||||
formControlName="phone"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" *ngIf="obj.id">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Conference Information</h5>
|
||||
<hr />
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ obj.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Conference Code</th>
|
||||
<td>{{ obj.conferencecode }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Conference Year</th>
|
||||
<td>{{ obj.conferenceyear }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Bank Name</th>
|
||||
<td>{{ obj.bankname }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Registration Number</th>
|
||||
<td>{{ obj.regno }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Response Transaction ID</th>
|
||||
<td>{{ obj.responseTransid }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name </th>
|
||||
<td>{{ obj.nameinreceipt }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<td>{{ obj.address1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Phone</th>
|
||||
<td>{{ obj.phone }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Payment Status</th>
|
||||
<td>{{ obj.inputcaption1 }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
<div class="card">
|
||||
<div class="card-header">Transaction Status</div>
|
||||
<div class="card-body">
|
||||
<form [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<div class="form-group">
|
||||
<label for="regno">Reg No</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="regno"
|
||||
formControlName="regno"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="transid">Transaction ID</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="transid"
|
||||
formControlName="transid"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="conference">Conference</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="conference"
|
||||
formControlName="conference"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="confyear">Conference Year</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="confyear"
|
||||
formControlName="confyear"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="bankname">Bank Name</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="bankname"
|
||||
formControlName="bankname"
|
||||
/>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mt-3" *ngIf="status.Transid">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Transaction Details</h5>
|
||||
<hr />
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<!-- <tr>
|
||||
<th>Property</th>
|
||||
<th>Value</th>
|
||||
</tr> -->
|
||||
<tr *ngFor="let property of status | keyvalue">
|
||||
<th>{{ property.key }}</th>
|
||||
<td>{{ property.value }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CheckStatusComponent } from './check-status.component';
|
||||
|
||||
describe('CheckStatusComponent', () => {
|
||||
let component: CheckStatusComponent;
|
||||
let fixture: ComponentFixture<CheckStatusComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ CheckStatusComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CheckStatusComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,69 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { DataService } from "src/app/data.service";
|
||||
import { XmlParserService } from "src/app/xml-parser.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-check-status",
|
||||
templateUrl: "./check-status.component.html",
|
||||
styleUrls: ["./check-status.component.scss"],
|
||||
})
|
||||
export class CheckStatusComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
detailForm: FormGroup;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private dataService: DataService,
|
||||
private parser: XmlParserService
|
||||
) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.form = this.fb.group({
|
||||
regno: ["", Validators.required],
|
||||
transid: ["", Validators.required],
|
||||
conference: ["", Validators.required],
|
||||
confyear: ["", Validators.required],
|
||||
bankname: ["", Validators.required],
|
||||
});
|
||||
this.detailForm = this.fb.group({
|
||||
phone: ["", Validators.required],
|
||||
});
|
||||
}
|
||||
|
||||
status: any = {};
|
||||
|
||||
onSubmit() {
|
||||
if (this.form.valid) {
|
||||
// Handle form submission here
|
||||
console.log(this.form.value);
|
||||
this.dataService.sendSOAPRequestForStatus(this.form.value).subscribe(
|
||||
(res) => {
|
||||
console.log(res);
|
||||
this.status = this.parser.parseXmlForStatus(res);
|
||||
console.log(this.status);
|
||||
},
|
||||
(error) => alert("something went wrong " + error)
|
||||
);
|
||||
} else {
|
||||
alert("all field values are required");
|
||||
}
|
||||
}
|
||||
|
||||
obj: any = {};
|
||||
|
||||
detailFormSubmit() {
|
||||
if (this.detailForm.valid) {
|
||||
// Handle form submission here
|
||||
console.log(this.form.value);
|
||||
this.dataService
|
||||
.getConferenceDataByPhone(this.detailForm.get("phone").value)
|
||||
.subscribe(
|
||||
(res) => {
|
||||
this.obj = res;
|
||||
},
|
||||
(error) => alert("something went wrong " + error)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
2010
support-portal-frontend/src/app/pages/index/index.component.html
Normal file
2010
support-portal-frontend/src/app/pages/index/index.component.html
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { IndexComponent } from './index.component';
|
||||
|
||||
describe('IndexComponent', () => {
|
||||
let component: IndexComponent;
|
||||
let fixture: ComponentFixture<IndexComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ IndexComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(IndexComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,37 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Injectable, Inject, PLATFORM_ID } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { isPlatformBrowser } from '@angular/common';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-index',
|
||||
templateUrl: './index.component.html',
|
||||
styleUrls: ['./index.component.css']
|
||||
})
|
||||
export class IndexComponent implements OnInit {
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
this.injectTags()
|
||||
}
|
||||
|
||||
private filePath = '/src/extrascripts.html'; // Adjust the path as needed
|
||||
|
||||
constructor(private http: HttpClient, @Inject(PLATFORM_ID) private platformId: Object) {}
|
||||
|
||||
|
||||
|
||||
|
||||
injectTags(): void {
|
||||
if (isPlatformBrowser(this.platformId)) {
|
||||
this.http.get(this.filePath, { responseType: 'text' }).subscribe(data => {
|
||||
const head = document.head || document.getElementsByTagName('head')[0];
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = data;
|
||||
|
||||
Array.from(tempDiv.childNodes).forEach(child => head.appendChild(child));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,113 @@
|
||||
|
||||
|
||||
<!-- STRAT NAVBAR -->
|
||||
<nav class="navbar navbar-expand-lg fixed-top navbar-custom sticky sticky-dark" id="navbar"
|
||||
(window:scroll)="windowScroll()">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="#">CMC Vellore</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse"
|
||||
aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation" (click)="toggleMenu()">
|
||||
<span class="ti-menu"></span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav mx-auto" id="navbar-navlist">
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'home'}">
|
||||
<a [ngxScrollTo]="'#home'" class="nav-link" href="javascript: void(0);">Home</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'features'}">
|
||||
<a [ngxScrollTo]="'#features'" class="nav-link" href="javascript: void(0);">Facility</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'team'}">
|
||||
<a [ngxScrollTo]="'#team'" class="nav-link" href="javascript: void(0);">Faculties</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'pricing'}">
|
||||
<a [ngxScrollTo]="'#pricing'" class="nav-link" href="javascript: void(0);">Events</a>
|
||||
</li>
|
||||
|
||||
|
||||
<!-- <li class="nav-item" [ngClass]="{'active':currentSection === 'testi'}">
|
||||
<a [ngxScrollTo]="'#testi'" class="nav-link" href="javascript: void(0);">Client</a>
|
||||
</li> -->
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'faq'}">
|
||||
<a [ngxScrollTo]="'#faq'" class="nav-link" href="javascript: void(0);">our Focus</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'services'}">
|
||||
<a [ngxScrollTo]="'#services'" class="nav-link" href="javascript: void(0);">About us</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item" [ngClass]="{'active':currentSection === 'contact'}">
|
||||
<a [ngxScrollTo]="'#contact'" class="nav-link" href="javascript: void(0);">Contact</a>
|
||||
</li>
|
||||
<!--
|
||||
<li class="nav-item" >
|
||||
<a routerLink="/check-status" class="nav-link" href="javascript: void(0);">Registration status</a>
|
||||
</li> -->
|
||||
|
||||
</ul>
|
||||
<div>
|
||||
<ul class="text-right list-unstyled list-inline mb-0 nav-social">
|
||||
<li class="list-inline-item text-white nav-number"><i class="ti-mobile"></i> <span> 04172 – 224627 / 224626
|
||||
</span></li>
|
||||
<!-- <li class="list-inline-item"><a href="" class="facebook"><i class="ti-facebook"></i></a></li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<!-- END NAVBAR -->
|
||||
<div appScrollspy [spiedTags]="['SECTION']" (sectionChange)="onSectionChange($event)">
|
||||
<!-- START HOME -->
|
||||
<section class="back-slide" id="home">
|
||||
<img name="silde" class="slide-img" id="isSlideImage" src="assets/images/cmc/drapt2.jpeg">
|
||||
<div class="bg-overlay"></div>
|
||||
<div class="home-center">
|
||||
<div class="home-desc-center">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-10">
|
||||
<div class="text-center">
|
||||
<h1 class="text-white home-title mb-0">Christian Medical College, Vellore</h1>
|
||||
<p class="text-white home-subtitle-center home-subtitle mt-4 mb-0 mx-auto">The Christian Medical College, Vellore, seeks to be a witness to the healing ministry of Christ, through excellence in education, service and research.</p>
|
||||
<!-- <div class="text-center search-form mt-4">
|
||||
<form action="#">
|
||||
<input type="text" placeholder="Email">
|
||||
<button type="submit" class="btn btn-primary">SubCribe</button>
|
||||
</form>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END HOME -->
|
||||
|
||||
|
||||
<app-features></app-features>
|
||||
<app-team></app-team>
|
||||
<app-pricing></app-pricing>
|
||||
|
||||
|
||||
<!-- <app-client></app-client> -->
|
||||
|
||||
|
||||
|
||||
<app-faq></app-faq>
|
||||
|
||||
|
||||
<app-services></app-services>
|
||||
<app-contact></app-contact>
|
||||
<app-footer></app-footer>
|
||||
<!-- <app-switcher></app-switcher> -->
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { Index6Component } from './index6.component';
|
||||
|
||||
describe('Index6Component', () => {
|
||||
let component: Index6Component;
|
||||
let fixture: ComponentFixture<Index6Component>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ Index6Component ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(Index6Component);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
109
support-portal-frontend/src/app/pages/index6/index6.component.ts
Normal file
109
support-portal-frontend/src/app/pages/index6/index6.component.ts
Normal file
@ -0,0 +1,109 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { StudentService } from 'src/app/student.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-index6',
|
||||
templateUrl: './index6.component.html',
|
||||
styleUrls: ['./index6.component.scss']
|
||||
})
|
||||
/**
|
||||
* Index-6 component
|
||||
*/
|
||||
export class Index6Component implements OnInit {
|
||||
|
||||
constructor(private studentService : StudentService) { }
|
||||
|
||||
currentSection = 'home';
|
||||
students
|
||||
student
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
|
||||
// this.students = this.studentService.getAllStudents();
|
||||
// console.log("students : ",this.students);
|
||||
|
||||
// this.student = this.studentService.insertStudent();
|
||||
// console.log("student : ",this.student);
|
||||
|
||||
|
||||
// this.studentService.makeHttpRequest().subscribe(
|
||||
// (response) => {
|
||||
// // Handle the response here
|
||||
// console.log(response);
|
||||
// },
|
||||
// (error) => {
|
||||
// // Handle errors here
|
||||
// console.error(error);
|
||||
// }
|
||||
// );
|
||||
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let i = 1;
|
||||
setInterval(() => {
|
||||
const slideImage = document.querySelector("#isSlideImage") as HTMLImageElement; // Cast to HTMLImageElement
|
||||
if (!slideImage) {
|
||||
return; // Exit if the element is not found
|
||||
}
|
||||
|
||||
if (i === 1) {
|
||||
slideImage.src = 'assets/images/cmc/drapt2.jpeg';
|
||||
} else if (i === 2) {
|
||||
slideImage.src = 'assets/images/cmc/CMCH_Vellore.jpeg';
|
||||
} else {
|
||||
slideImage.src = 'assets/images/cmc/ranipet-Kannigapuram-2022-06-15-main-entrance-signsWA-1.jpeg';
|
||||
}
|
||||
|
||||
if (i >= 3) {
|
||||
i = 0;
|
||||
}
|
||||
i++;
|
||||
}, 2500);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// let i = 1;
|
||||
// setInterval(() => {
|
||||
// if (i === 1) { (<HTMLImageElement>document.querySelector("#isSlideImage")).src = 'assets/images/cmc/drapt2.jpeg'; }
|
||||
// else if (i === 2) { (<HTMLImageElement>document.querySelector("#isSlideImage")).src = 'assets/images/cmc/CMCH_Vellore.jpeg'; }
|
||||
// else { (<HTMLImageElement>document.querySelector("#isSlideImage")).src = 'assets/images/cmc/ranipet-Kannigapuram-2022-06-15-main-entrance-signsWA-1.jpeg'; }
|
||||
// if (i >= 3) { i = 0; }
|
||||
// i++;
|
||||
// }, 2500);
|
||||
}
|
||||
|
||||
/**
|
||||
* Window scroll method
|
||||
*/
|
||||
// tslint:disable-next-line: typedef
|
||||
windowScroll() {
|
||||
const navbar = document.getElementById('navbar');
|
||||
if (document.body.scrollTop > 40 || document.documentElement.scrollTop > 40) {
|
||||
navbar.style.backgroundColor = '#1a1a1a';
|
||||
navbar.style.padding = '15px 0px';
|
||||
}
|
||||
else {
|
||||
navbar.style.backgroundColor = '';
|
||||
navbar.style.padding = '20px';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle navbar
|
||||
*/
|
||||
toggleMenu() {
|
||||
document.getElementById('navbarCollapse').classList.toggle('show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Section changed method
|
||||
* @param sectionId specify the current sectionID
|
||||
*/
|
||||
onSectionChange(sectionId: string) {
|
||||
this.currentSection = sectionId;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
|
||||
import { Index6Component } from './index6/index6.component';
|
||||
|
||||
import { PasswordForgetComponent } from './password-forget/password-forget.component';
|
||||
import { SignupComponent } from './signup/signup.component';
|
||||
import { RegisterComponent } from './register/register.component';
|
||||
import { RegistrationStatusComponent } from './registration-status/registration-status.component';
|
||||
import { RegistedListComponent } from './registed-list/registed-list.component';
|
||||
import { CandidateDetailsComponent } from './candidate-details/candidate-details.component';
|
||||
import { CheckStatusComponent } from './check-status/check-status.component';
|
||||
|
||||
const routes: Routes = [
|
||||
|
||||
{
|
||||
path: 'index',
|
||||
component: Index6Component
|
||||
},
|
||||
{
|
||||
path: 'registrationStatus',
|
||||
component: RegistrationStatusComponent
|
||||
},
|
||||
|
||||
{
|
||||
path: 'check-status',
|
||||
component: CheckStatusComponent
|
||||
},
|
||||
{
|
||||
path: 'admin',
|
||||
component: RegistedListComponent
|
||||
},
|
||||
{ path: 'detail', component: CandidateDetailsComponent },
|
||||
|
||||
{
|
||||
path: 'password_forget',
|
||||
component: PasswordForgetComponent
|
||||
},
|
||||
{
|
||||
path: 'signup',
|
||||
component: SignupComponent
|
||||
},
|
||||
{
|
||||
path: 'register/:id',
|
||||
component: RegisterComponent
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'index',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class PagesRoutingModule { }
|
||||
46
support-portal-frontend/src/app/pages/pages.module.ts
Normal file
46
support-portal-frontend/src/app/pages/pages.module.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
||||
import { NgxTypedJsModule } from 'ngx-typed-js';
|
||||
// import { NgParticlesModule } from 'ng-particles';
|
||||
import { CarouselModule } from 'ngx-owl-carousel-o';
|
||||
|
||||
import { PagesRoutingModule } from './pages-routing.module'
|
||||
|
||||
import { SharedModule } from '../shared/shared.module';
|
||||
|
||||
import { Index6Component } from './index6/index6.component';
|
||||
|
||||
import { PasswordForgetComponent } from './password-forget/password-forget.component';
|
||||
import { SignupComponent } from './signup/signup.component';
|
||||
import { RegisterComponent } from './register/register.component';
|
||||
import { RegistrationStatusComponent } from './registration-status/registration-status.component';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { RegistedListComponent } from './registed-list/registed-list.component';
|
||||
import { CandidateDetailsComponent } from './candidate-details/candidate-details.component';
|
||||
import { CheckStatusComponent } from './check-status/check-status.component';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { IndexComponent } from './index/index.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [Index6Component, PasswordForgetComponent, SignupComponent,RegisterComponent, RegistrationStatusComponent,RegistedListComponent, CandidateDetailsComponent, CheckStatusComponent, IndexComponent],
|
||||
|
||||
imports: [
|
||||
// BrowserModule,
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
PagesRoutingModule,
|
||||
ScrollToModule.forRoot(),
|
||||
NgxTypedJsModule,
|
||||
// NgParticlesModule,
|
||||
CarouselModule,
|
||||
ReactiveFormsModule,
|
||||
// HttpClientModule,
|
||||
FormsModule
|
||||
]
|
||||
|
||||
})
|
||||
export class PagesModule { }
|
||||
@ -0,0 +1,28 @@
|
||||
<section class="bg-login d-flex align-items-center">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center mt-4">
|
||||
<div class="col-lg-4">
|
||||
<div class="bg-white p-4 mt-5 rounded">
|
||||
<div class="text-center">
|
||||
<h4 class="fw-bold mb-3">Globing</h4>
|
||||
</div>
|
||||
<h6 class="text-center text-muted fw-normal forgot-pass-txt">Enter your email address
|
||||
and we'll send you an email with instructions to reset your password.</h6>
|
||||
<form class="login-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mt-3">
|
||||
<input type="email" class="form-control" placeholder="Email" required="">
|
||||
</div>
|
||||
<div class="col-lg-12 mt-4 mb-2">
|
||||
<button class="btn btn-primary w-100">Reset your Password</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-center mt-3">
|
||||
<p><small class="text-white me-2">Already have account?</small> <a routerLink="/login" class="text-white fw-bold">Sign in</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PasswordForgetComponent } from './password-forget.component';
|
||||
|
||||
describe('PasswordForgetComponent', () => {
|
||||
let component: PasswordForgetComponent;
|
||||
let fixture: ComponentFixture<PasswordForgetComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PasswordForgetComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PasswordForgetComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-password-forget',
|
||||
templateUrl: './password-forget.component.html',
|
||||
styleUrls: ['./password-forget.component.scss']
|
||||
})
|
||||
export class PasswordForgetComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,123 @@
|
||||
<div class="container mt-3" *ngIf="!showTable">
|
||||
<!-- Secret key input form -->
|
||||
<div class="form-group">
|
||||
<label for="secretKey">Enter Secret Key:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="password"
|
||||
id="secretKey"
|
||||
[(ngModel)]="secretKey"
|
||||
/>
|
||||
<button (click)="checkSecretKey()">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Table - Display only if showTable is true -->
|
||||
<div class="row p-2" *ngIf="showTable">
|
||||
<button class="btn btn-sm btn-success float-end" (click)="exportToExcel()">
|
||||
Export to Excel
|
||||
</button>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table" id="myTable">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Registration Number</th>
|
||||
<th>Transaction ID</th>
|
||||
<th>Name in Receipt</th>
|
||||
<!-- <th>Conference Code</th> -->
|
||||
<th>Bank Name</th>
|
||||
<th>Phone</th>
|
||||
|
||||
<th>Designation</th>
|
||||
|
||||
<th>Place of work</th>
|
||||
|
||||
<th>Name of the hospital, college</th>
|
||||
|
||||
<th>ISTAC member</th>
|
||||
<th>CMC Mission</th>
|
||||
|
||||
<th>External or CMC staff</th>
|
||||
|
||||
<th>registration type</th>
|
||||
|
||||
<th>submit case</th>
|
||||
|
||||
|
||||
<th>Email</th>
|
||||
|
||||
<th>Payment Amount</th>
|
||||
<th>Payment Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<ng-container *ngFor="let payment of payments">
|
||||
<tr>
|
||||
<td>{{ payment.id || "NA"}}</td>
|
||||
<td>{{ payment.regno || "NA"}}</td>
|
||||
<td>{{ payment.responseTransid || payment.Transid || "NA"}}</td>
|
||||
<td>{{ payment.nameinreceipt || "NA"}}</td>
|
||||
<!-- <td>{{ payment.conferencecode || "NA"}}</td> -->
|
||||
<td>{{ payment.bankname || "NA"}}</td>
|
||||
<td>{{ payment.phone || "NA"}}</td>
|
||||
|
||||
<td>{{ payment.inputvalue1 || "NA"}}</td>
|
||||
|
||||
<td>{{ payment.inputcaption2 || "NA"}}</td>
|
||||
|
||||
<td>
|
||||
<span *ngIf=" payment.inputcaption3">{{ payment.inputcaption3 }}</span
|
||||
><span *ngIf=" payment.inputvalue2">{{ payment.inputvalue2 }}</span>
|
||||
</td>
|
||||
|
||||
<td>{{ payment.inputvalue3 || "NA"}}</td>
|
||||
<td>{{ payment.city || "NA"}}</td>
|
||||
|
||||
<td>{{payment.inputvalue5 == 'No Error' ? "NA" : payment.inputvalue5}}</td>
|
||||
|
||||
|
||||
|
||||
<td>{{payment.inputvalue4 || "NA"}}</td>
|
||||
|
||||
<td>{{ payment.inputcaption5 || "NA"}}</td>
|
||||
|
||||
|
||||
<td>{{ payment.email || "NA"}}</td>
|
||||
<td>{{ payment.paymentamount || "NA"}}</td>
|
||||
<td>
|
||||
<span
|
||||
[ngClass]="{
|
||||
success: payment.inputcaption1 === 'Y',
|
||||
failed: payment.inputcaption1 === 'F',
|
||||
unknown:
|
||||
payment.inputcaption1 !== 'Y' &&
|
||||
payment.inputcaption1 !== 'F'
|
||||
}"
|
||||
>
|
||||
{{
|
||||
payment.inputcaption1 === "Y"
|
||||
? "Success"
|
||||
: payment.inputcaption1 === "F"
|
||||
? "Failed"
|
||||
: "Unknown"
|
||||
}}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <button class="mx-2" (click)="delete(payment.id)">
|
||||
<i class="ti-trash"></i>
|
||||
</button> -->
|
||||
|
||||
<button (click)="viewDetail(payment)">
|
||||
<i class="ti-eye"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,14 @@
|
||||
|
||||
/* CSS file (your-component.component.css) */
|
||||
.success {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.failed {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.unknown {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RegistedListComponent } from './registed-list.component';
|
||||
|
||||
describe('RegistedListComponent', () => {
|
||||
let component: RegistedListComponent;
|
||||
let fixture: ComponentFixture<RegistedListComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ RegistedListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RegistedListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,87 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { DataService } from "src/app/data.service";
|
||||
import * as XLSX from "xlsx";
|
||||
// import * as FileSaver from "file-saver";
|
||||
|
||||
@Component({
|
||||
selector: "app-registed-list",
|
||||
templateUrl: "./registed-list.component.html",
|
||||
styleUrls: ["./registed-list.component.scss"],
|
||||
})
|
||||
export class RegistedListComponent implements OnInit {
|
||||
secretKey: string = ""; // Property to store the secret key
|
||||
showTable: boolean = false; // Flag to determine if the table should be displayed
|
||||
|
||||
payments = [
|
||||
// Add more payment objects here
|
||||
];
|
||||
|
||||
constructor(private dataService: DataService, private router: Router) {}
|
||||
|
||||
exportToExcel() {
|
||||
const element = document.getElementById("myTable"); // Replace 'myTable' with the ID of your HTML table
|
||||
const ws: XLSX.WorkSheet = XLSX.utils.table_to_sheet(element);
|
||||
const wb: XLSX.WorkBook = XLSX.utils.book_new();
|
||||
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
|
||||
const excelBuffer: any = XLSX.write(wb, {
|
||||
bookType: "xlsx",
|
||||
type: "array",
|
||||
});
|
||||
const blob = new Blob([excelBuffer], {
|
||||
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
});
|
||||
// FileSaver.saveAs(blob, "myTable.xlsx"); // Specify the desired file name
|
||||
}
|
||||
|
||||
viewDetail(rowData: any) {
|
||||
this.router.navigate(["detail", { data: JSON.stringify(rowData) }]);
|
||||
}
|
||||
|
||||
delete(id) {
|
||||
if (this.confirmData())
|
||||
this.dataService.deleteConferenceData(id).subscribe((res) => {
|
||||
console.log(res);
|
||||
this.getList()
|
||||
});
|
||||
}
|
||||
|
||||
confirmData(): boolean {
|
||||
return confirm("Are you sure you want to delete?");
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.getList()
|
||||
}
|
||||
|
||||
getList(){
|
||||
this.payments = []
|
||||
this.dataService.getAllConferenceData().subscribe((res) => {
|
||||
this.payments = res;
|
||||
});
|
||||
}
|
||||
|
||||
checkSecretKey() {
|
||||
// Replace 'yourSecretKey' with the actual correct secret key
|
||||
if (this.secretKey === "975312") {
|
||||
this.showTable = true; // Show the table if the key is correct
|
||||
} else {
|
||||
this.showTable = false; // Hide the table if the key is incorrect
|
||||
// Optionally, you can display an error message or take other actions.
|
||||
}
|
||||
}
|
||||
|
||||
updateStatus() {
|
||||
for (const obj of this.payments) {
|
||||
// Call the service method to update the object's status
|
||||
// this.dataService.updateObjectStatus(obj).subscribe(
|
||||
// (response: any) => {
|
||||
// console.log(response)
|
||||
// },
|
||||
// (error) => {
|
||||
// console.error('Error updating object status:', error);
|
||||
// }
|
||||
// );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,959 @@
|
||||
<div *ngIf="paymentInfo.ResultCode != '0'" class="row mt-2">
|
||||
<div class="col-lg">
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Registration Form</h4>
|
||||
<hr />
|
||||
<br />
|
||||
<form [formGroup]="registrationForm" (ngSubmit)="onSubmit()">
|
||||
<!-- Conference Code -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="conferencecode"
|
||||
>Conference Code: *</label
|
||||
>
|
||||
<input
|
||||
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="conferencecode"
|
||||
formControlName="conferencecode"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('conferencecode').hasError('required')
|
||||
"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('conferencecode').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Conference Year -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="conferenceyear"
|
||||
>Conference Year: *</label
|
||||
>
|
||||
<input
|
||||
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="conferenceyear"
|
||||
formControlName="conferenceyear"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('conferenceyear').hasError('required')
|
||||
"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('conferenceyear').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- Client IP Address (Remote IP Address) -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="remoteip">Client IP Address:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="remoteip"
|
||||
formControlName="remoteip"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('remoteip').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Registration Number -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="regno"
|
||||
>Registration Number: *</label
|
||||
>
|
||||
<input
|
||||
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="regno"
|
||||
formControlName="regno"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('regno').hasError('required')"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('regno').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Payee Name (Candidate Name) -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label class="text-primary" for="candidatename"
|
||||
>Payee Name: *</label
|
||||
>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="candidatename"
|
||||
formControlName="candidatename"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('candidatename').hasError('required')
|
||||
"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('candidatename').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Name to be printed in Receipt -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="nameinreceipt"
|
||||
>Name to be printed on the certificate: *</label
|
||||
>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="nameinreceipt"
|
||||
formControlName="nameinreceipt"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('nameinreceipt').hasError('required')
|
||||
"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('nameinreceipt').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label for="designation">Designation:</label>
|
||||
<select
|
||||
class="form-control"
|
||||
id="designation"
|
||||
formControlName="designation"
|
||||
>
|
||||
<option value="Undergraduate">Undergraduate</option>
|
||||
<option value="Postgraduate">Postgraduate</option>
|
||||
<option value="Consultant">Consultant</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label for="placeOfWork">Present place of work:</label>
|
||||
<select
|
||||
class="form-control"
|
||||
id="placeOfWork"
|
||||
formControlName="placeOfWork"
|
||||
>
|
||||
<option value="None">None</option>
|
||||
<option value="PrivatePractice">Private practice</option>
|
||||
<option value="MedicalCollege">Medical College</option>
|
||||
<option value="Hospital">Hospital</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Conditional input field for Medical College -->
|
||||
<div
|
||||
class="form-group mb-3"
|
||||
*ngIf="
|
||||
registrationForm.get('placeOfWork').value === 'MedicalCollege'
|
||||
"
|
||||
>
|
||||
<label for="medicalCollegeName">Name of Medical College:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="medicalCollegeName"
|
||||
formControlName="medicalCollegeName"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Conditional input field for Hospital -->
|
||||
<div
|
||||
class="form-group mb-3"
|
||||
*ngIf="registrationForm.get('placeOfWork').value === 'Hospital'"
|
||||
>
|
||||
<label for="hospitalName">Name of Hospital:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="hospitalName"
|
||||
formControlName="hospitalName"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Address Line 1 -->
|
||||
<div class="form-group mb-3">
|
||||
<label for="address1">Address </label>
|
||||
<textarea
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="address1"
|
||||
formControlName="address1"
|
||||
rows="3"
|
||||
>
|
||||
</textarea>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('address1').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Address Line 2 -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="address2">Address Line 2:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="address2"
|
||||
formControlName="address2"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('address2').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- City -->
|
||||
<!-- <div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="city">City:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="city"
|
||||
formControlName="city"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('city').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<!-- State -->
|
||||
<!-- <div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="state">State:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="state"
|
||||
formControlName="state"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('state').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div> -->
|
||||
|
||||
<!-- Country -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="country">Country:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="country"
|
||||
formControlName="country"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('country').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Pincode -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="pincode">Pincode:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="pincode"
|
||||
formControlName="pincode"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('pincode').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Landline Number (Phone) -->
|
||||
|
||||
<div class="form-group mb-3" >
|
||||
<label class="text-primary" for="phone">Mobile Number:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="phone"
|
||||
formControlName="phone"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('phone').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
|
||||
<small class="form-text text-muted" *ngIf="registrationForm.get('phone').hasError('required')"
|
||||
class="error-message">This field is required.</small>
|
||||
</div>
|
||||
|
||||
<!-- Mobile Number -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="mobile">Mobile Number:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="mobile"
|
||||
formControlName="mobile"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('mobile').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Email ID -->
|
||||
<div class="form-group mb-3">
|
||||
<label for="email">Email ID:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="email"
|
||||
formControlName="email"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('email').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Food Type -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="foodtype">Food Type:</label>
|
||||
<select
|
||||
class="form-control"
|
||||
id="foodtype"
|
||||
formControlName="foodtype"
|
||||
>
|
||||
<option value="">Select Food Type</option>
|
||||
<option value="V">V - Veg</option>
|
||||
<option value="NV">NV - Non-Veg</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Participant Type -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="participanttype">Participant Type:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="participanttype"
|
||||
formControlName="participanttype"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('participanttype').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Practice Type -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="practicetype">Practice Type:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="practicetype"
|
||||
formControlName="practicetype"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('practicetype').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Accompany Persons -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="accompanymembers">Accompany Persons:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="accompanymembers"
|
||||
formControlName="accompanymembers"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('accompanymembers').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Registration Fees (Payment Amount) -->
|
||||
|
||||
<!-- <div class="form-group mb-3">
|
||||
<label class="text-primary" for="paymentamount">Registration Fees: *</label>
|
||||
<select class="form-control" id="paymentamount" formControlName="paymentamount">
|
||||
<option *ngFor="let option of event.fee" [value]="option.cost">
|
||||
{{ option.desc }} - <span class="text-primary"> (Rs. {{ option.cost }}) </span>
|
||||
</option>
|
||||
</select>
|
||||
<small class="form-text text-muted" *ngIf="registrationForm.get('paymentamount').hasError('required')"
|
||||
class="error-message">This field is required.</small>
|
||||
</div> -->
|
||||
|
||||
<div class="card p-2 mb-3">
|
||||
<div class="form-group mb-3">
|
||||
<label>ISTAC Members:</label>
|
||||
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="istacMemberYes"
|
||||
value="Yes"
|
||||
formControlName="istacMember"
|
||||
/>
|
||||
<label class="form-check-label"> Yes </label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="istacMemberNo"
|
||||
value="No"
|
||||
formControlName="istacMember"
|
||||
/>
|
||||
<label class="form-check-label"> No </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="form-group mb-3"
|
||||
*ngIf="registrationForm.get('istacMember').value === 'Yes'"
|
||||
>
|
||||
<label for="istacMemberID">ISTAC Member ID:</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="istacMemberID"
|
||||
formControlName="istacMemberID"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="card p-2 mb-3">
|
||||
<div class="form-group mb-3">
|
||||
<label> CMC Mission:</label>
|
||||
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="cityYes"
|
||||
value="Yes"
|
||||
formControlName="city"
|
||||
/>
|
||||
<label class="form-check-label"> Yes </label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="cityNo"
|
||||
value="No"
|
||||
formControlName="city"
|
||||
/>
|
||||
<label class="form-check-label"> No </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="form-group mb-3"
|
||||
*ngIf="registrationForm.get('city').value === 'Yes'"
|
||||
>
|
||||
<label for="stateID">CMC Mission ID:</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="stateID"
|
||||
formControlName="state"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-group mb-3">
|
||||
<label for="paymentamount">paymentamount:</label>
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="paymentamount"
|
||||
formControlName="paymentamount"
|
||||
/>
|
||||
</div> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="inputvalue5">External or CMC Staff:</label>
|
||||
<select class="form-control" id="inputvalue5" formControlName="inputvalue5" (change)="calculateTotalPrice()">
|
||||
<option value="External">External</option>
|
||||
<option value="CMCStaff">CMC Staff</option>
|
||||
</select>
|
||||
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('inputvalue5').hasError('required')
|
||||
"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group mb-3">
|
||||
<label for="registrationType">Registration Type:</label>
|
||||
<select
|
||||
id="registrationType"
|
||||
class="form-control"
|
||||
formControlName="registrationType"
|
||||
(change)="calculateTotalPrice()"
|
||||
>
|
||||
<!-- <option value="NA">NA</option> -->
|
||||
<option
|
||||
*ngIf="registrationForm.get('istacMember').value === 'Yes'"
|
||||
value="Online"
|
||||
>
|
||||
Online ₹ 500 <span *ngIf="registrationForm.get('inputvalue5').value === 'External'">+ 18% GST</span>
|
||||
</option>
|
||||
|
||||
<option value="Symposium">Symposium ₹ 1000 <span *ngIf="registrationForm.get('inputvalue5').value === 'External'">+ 18% GST</span></option>
|
||||
<option value="Workshop">Workshop ₹ 3500 <span *ngIf="registrationForm.get('inputvalue5').value === 'External'">+ 18% GST</span></option>
|
||||
<option value="SymposiumAndWorkshop">
|
||||
Symposium & Workshop ₹ 4500 <span *ngIf="registrationForm.get('inputvalue5').value === 'External'">+ 18% GST</span>
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- Paying Towards -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="ToWards"
|
||||
>Paying Towards: *</label
|
||||
>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
placeholder="Workshop Fee"
|
||||
id="ToWards"
|
||||
formControlName="ToWards"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('ToWards').hasError('required')"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('ToWards').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Payment Through (Bank Name) -->
|
||||
<div class="form-group mb-3">
|
||||
<label class="text-primary" for="bankname"
|
||||
>Payment Through: *</label
|
||||
>
|
||||
<select
|
||||
id="bankname"
|
||||
formControlName="bankname"
|
||||
class="form-control"
|
||||
>
|
||||
<option value="">Select Payment Method</option>
|
||||
<option value="PAYU">PAYU - Cards, UPI, Wallets, Netbanking</option>
|
||||
<option value="HDFC">HDFC - Cards</option>
|
||||
</select>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('bankname').hasError('required')"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('bankname').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="card p-2 mb-3">
|
||||
<div class="form-group mb-3">
|
||||
<label for="submitCase"
|
||||
>Are you interested in submitting a challenging or interesting
|
||||
case?</label
|
||||
>
|
||||
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="submitCaseYes"
|
||||
value="Yes"
|
||||
formControlName="submitCase"
|
||||
/>
|
||||
<label class="form-check-label" for="flexRadioDefault1">
|
||||
Yes
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
id="submitCaseNo"
|
||||
value="No"
|
||||
formControlName="submitCase"
|
||||
/>
|
||||
<label class="form-check-label" for="flexRadioDefault2">
|
||||
No
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="registrationForm.get('submitCase').value === 'Yes'">
|
||||
<p>
|
||||
Submit your abstract to
|
||||
<a href="mailto:traumasurg.academic@cmcvellore.ac.in"
|
||||
>traumasurg.academic@cmcvellore.ac.in</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- User opt for 80G -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="Allow80G" class="text-primary"
|
||||
>User opt for 80G: *</label
|
||||
>
|
||||
<select
|
||||
class="form-control"
|
||||
id="Allow80G"
|
||||
formControlName="Allow80G"
|
||||
>
|
||||
<option value="Y">Y - Yes</option>
|
||||
<option value="N">N - No</option>
|
||||
</select>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('Allow80G').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- PAN Card No -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="PanCardNo">PAN Card No:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="PanCardNo"
|
||||
formControlName="PanCardNo"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('PanCardNo').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Amount Contains GST (hasgst) -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="hasgst" class="text-primary"
|
||||
>Amount Contains GST:</label
|
||||
>
|
||||
<select class="form-control" id="hasgst" formControlName="hasgst">
|
||||
<option value="Y">Y - Yes</option>
|
||||
<option value="N">N - No</option>
|
||||
</select>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('hasgst').hasError('required')"
|
||||
class="error-message"
|
||||
>This field is required.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- GST Registered / Unregistered -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="GSTReg">GST Registered / Unregistered:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="GSTReg"
|
||||
formControlName="GSTReg"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- GST Number -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="gstnumber">GST Number:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="gstnumber"
|
||||
formControlName="gstnumber"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('gstnumber').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- GST Registered Mobile No -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="gstmobileno">GST Registered Mobile No:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="gstmobileno"
|
||||
formControlName="gstmobileno"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('gstmobileno').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- GST Registered Email ID -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="gstemailid">GST Registered Email ID:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="gstemailid"
|
||||
formControlName="gstemailid"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="registrationForm.get('gstemailid').hasError('maxLength')"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Additional Field Caption 1 -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="inputcaption1">Additional Field Caption 1:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="inputcaption1"
|
||||
formControlName="inputcaption1"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('inputcaption1').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Additional Field Caption 1 Value -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="inputvalue1">Additional Field Caption 1 Value:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="inputvalue1"
|
||||
formControlName="inputvalue1"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('inputvalue1').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Additional Field Caption 2 -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="inputcaption2">Additional Field Caption 2:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="inputcaption2"
|
||||
formControlName="inputcaption2"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('inputcaption2').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<!-- Additional Field Caption 2 Value -->
|
||||
<div class="form-group mb-3" *ngIf="shouldDisplayElement">
|
||||
<label for="inputvalue2">Additional Field Caption 2 Value:</label>
|
||||
<input
|
||||
class="form-control"
|
||||
type="text"
|
||||
id="inputvalue2"
|
||||
formControlName="inputvalue2"
|
||||
/>
|
||||
<small
|
||||
class="form-text text-muted"
|
||||
*ngIf="
|
||||
registrationForm.get('inputvalue2').hasError('maxLength')
|
||||
"
|
||||
class="error-message"
|
||||
>Maximum length exceeded.</small
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<p>Total Price : ₹ {{ totalPrice }}</p>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-danger mb-2" *ngIf="getInvalidFields().length > 0">
|
||||
Please correct the following fields:
|
||||
<ul>
|
||||
<li *ngFor="let field of getInvalidFields()">
|
||||
{{ field == 'inputvalue5' ? 'External or CMC Staff:' : field }}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-3" *ngIf="paymentInfo.ResultCode == '0'">
|
||||
<div class="col-lg">
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h2 class="text-muted text-primary">
|
||||
The payment link has been generated successfully. Kindly jot down
|
||||
the information or capture a screenshot of the details, and then
|
||||
proceed to click the provided link below.
|
||||
</h2>
|
||||
<br />
|
||||
|
||||
<div class="container">
|
||||
<p>Registration: {{ paymentInfo.Registration }}</p>
|
||||
<p>Transaction ID: {{ paymentInfo.Transid }}</p>
|
||||
<p>Result Code: {{ paymentInfo.ResultCode }}</p>
|
||||
<p>Result: {{ paymentInfo.Result }}</p>
|
||||
<a class="btn btn-primary m-2" [href]="paymentInfo.URL">Payment URL</a>
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<p>
|
||||
<!-- <a href="/">Go Home</a> | -->
|
||||
<a href="javascript:void(0);" (click)="printPage()">Print</a> |
|
||||
<!-- <a href="javascript:void(0);" (click)="goBack()">Go Back</a> -->
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RegisterComponent } from './register.component';
|
||||
|
||||
describe('RegisterComponent', () => {
|
||||
let component: RegisterComponent;
|
||||
let fixture: ComponentFixture<RegisterComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ RegisterComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RegisterComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,257 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { FormBuilder, FormGroup, Validators } from "@angular/forms";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { DataService, PaymentInfo } from "src/app/data.service";
|
||||
import { XmlParserService } from "src/app/xml-parser.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-register",
|
||||
templateUrl: "./register.component.html",
|
||||
styleUrls: ["./register.component.scss"],
|
||||
})
|
||||
export class RegisterComponent implements OnInit {
|
||||
registrationForm: FormGroup;
|
||||
shouldDisplayElement = false;
|
||||
totalPrice: number = 0;
|
||||
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private route: ActivatedRoute,
|
||||
private dataService: DataService,
|
||||
private xmlParserService: XmlParserService
|
||||
) {}
|
||||
|
||||
eventId: string;
|
||||
event: any;
|
||||
events = [];
|
||||
paymentInfo: PaymentInfo;
|
||||
|
||||
ngOnInit() {
|
||||
this.events = this.dataService.events;
|
||||
this.paymentInfo = new PaymentInfo(); // Initialize the instance
|
||||
|
||||
this.route.params.subscribe((params) => {
|
||||
this.eventId = params["id"]; // 'id' should match the route parameter name defined in your routing configuration
|
||||
this.event = this.findEventById(this.eventId);
|
||||
});
|
||||
|
||||
this.registrationForm = this.fb.group({
|
||||
conferencecode: ["", [Validators.required, Validators.maxLength(10)]],
|
||||
conferenceyear: ["", [Validators.required, Validators.maxLength(4)]],
|
||||
bankname: ["", [Validators.required, Validators.maxLength(20)]],
|
||||
remoteip: ["", [Validators.maxLength(15)]],
|
||||
regno: ["", [Validators.required, Validators.maxLength(20)]],
|
||||
candidatename: ["", [Validators.required, Validators.maxLength(80)]],
|
||||
nameinreceipt: ["", [Validators.required, Validators.maxLength(150)]],
|
||||
address1: ["", [Validators.maxLength(200)]],
|
||||
address2: ["", [Validators.maxLength(200)]],
|
||||
city: ["", [Validators.maxLength(100)]], // CMC Mission
|
||||
state: ["12345", [Validators.maxLength(100)]], // CMC Mission ID
|
||||
country: ["", [Validators.maxLength(100)]],
|
||||
pincode: ["", [Validators.maxLength(10)]],
|
||||
phone: ["", [Validators.required, Validators.maxLength(20)]],
|
||||
mobile: ["", [Validators.maxLength(20)]],
|
||||
email: ["", [Validators.maxLength(70)]],
|
||||
foodtype: ["", [Validators.maxLength(2)]],
|
||||
participanttype: ["", [Validators.maxLength(30)]],
|
||||
practicetype: ["", [Validators.maxLength(80)]],
|
||||
accompanymembers: ["", [Validators.maxLength(2)]],
|
||||
paymentamount: ["", [Validators.required]],
|
||||
ToWards: ["", [Validators.required, Validators.maxLength(200)]],
|
||||
Allow80G: ["N", [Validators.required]],
|
||||
PanCardNo: ["", [Validators.maxLength(10)]],
|
||||
hasgst: ["N", [Validators.required]],
|
||||
GSTReg: [""],
|
||||
gstnumber: ["", [Validators.maxLength(20)]],
|
||||
|
||||
gstmobileno: ["", [Validators.maxLength(12)]],
|
||||
gstemailid: ["", [Validators.maxLength(100)]],
|
||||
|
||||
inputcaption1: ["", [Validators.maxLength(50)]], // isPaymentDone
|
||||
inputvalue1: ["", [Validators.maxLength(200)]], // designation
|
||||
inputcaption2: ["", [Validators.maxLength(50)]], // placeOfWork
|
||||
inputvalue2: ["", [Validators.maxLength(200)]], // medicalCollegeName
|
||||
inputcaption3: ["", [Validators.maxLength(50)]], // hospitalName
|
||||
inputvalue3: ["", [Validators.maxLength(200)]], // istacMember
|
||||
inputcaption4: ["", [Validators.maxLength(50)]], // istacMemberID
|
||||
inputvalue4: ["", [Validators.maxLength(200)]], // registrationType
|
||||
inputcaption5: ["", [Validators.maxLength(50)]], // submitCase
|
||||
inputvalue5: ["", [Validators.maxLength(200), Validators.required]], // External or CMC staff
|
||||
|
||||
isPaymentDone: ["N", Validators.required],
|
||||
designation: [""],
|
||||
placeOfWork: ["None"],
|
||||
medicalCollegeName: [""],
|
||||
hospitalName: [""],
|
||||
istacMember: ["No"],
|
||||
istacMemberID: [""],
|
||||
registrationType: ["", Validators.required],
|
||||
submitCase: ["No"],
|
||||
});
|
||||
|
||||
// Set initial values for the form
|
||||
this.registrationForm.patchValue({
|
||||
conferencecode: this.event.code,
|
||||
conferenceyear: this.event.year,
|
||||
regno: this.generateRandomHash(9),
|
||||
Allow80G: "N",
|
||||
hasgst: "N",
|
||||
});
|
||||
|
||||
this.registrationForm
|
||||
.get("nameinreceipt")
|
||||
.valueChanges.subscribe((newValue) => {
|
||||
console.log("Input value changed:", newValue);
|
||||
// You can perform actions here based on the new input value
|
||||
|
||||
this.registrationForm.patchValue({
|
||||
candidatename: newValue,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
findEventById(eventId): any {
|
||||
return this.events.find((event) => event.id == eventId);
|
||||
}
|
||||
|
||||
generateRandomHash(length: number): string {
|
||||
const characters = "012345G0VARDHAN6789";
|
||||
let randomHash = "";
|
||||
|
||||
for (let i = 0; i < length; i++) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
randomHash += characters.charAt(randomIndex);
|
||||
}
|
||||
|
||||
return randomHash;
|
||||
}
|
||||
|
||||
calculateTotalPrice() {
|
||||
const registrationType =
|
||||
this.registrationForm.get("registrationType").value;
|
||||
const isCmcStaff = this.registrationForm.get("inputvalue5").value;
|
||||
|
||||
if (isCmcStaff === "CMCStaff") {
|
||||
// Exclude GST for CMC Staff
|
||||
if (registrationType === "Online") {
|
||||
this.totalPrice = 500;
|
||||
} else if (registrationType === "Symposium") {
|
||||
this.totalPrice = 1000;
|
||||
} else if (registrationType === "Workshop") {
|
||||
this.totalPrice = 3500;
|
||||
} else if (registrationType === "SymposiumAndWorkshop") {
|
||||
this.totalPrice = 4500;
|
||||
} else {
|
||||
this.totalPrice = 0;
|
||||
}
|
||||
} else {
|
||||
// Apply GST for External
|
||||
if (registrationType === "Online") {
|
||||
this.totalPrice = 500 + 0.18 * 500; // ₹ 500 + 18% GST
|
||||
} else if (registrationType === "Symposium") {
|
||||
this.totalPrice = 1000 + 0.18 * 1000; // ₹ 1000 + 18% GST
|
||||
} else if (registrationType === "Workshop") {
|
||||
this.totalPrice = 3500 + 0.18 * 3500; // ₹ 3500 + 18% GST
|
||||
} else if (registrationType === "SymposiumAndWorkshop") {
|
||||
this.totalPrice = 4500 + 0.18 * 4500; // ₹ 4500 + 18% GST
|
||||
} else {
|
||||
this.totalPrice = 0;
|
||||
}
|
||||
}
|
||||
|
||||
this.registrationForm.patchValue({
|
||||
paymentamount: this.totalPrice,
|
||||
ToWards: registrationType,
|
||||
});
|
||||
}
|
||||
|
||||
confirmData(): boolean {
|
||||
return confirm("Are you sure you want to proceed with the data?");
|
||||
}
|
||||
|
||||
printPage() {
|
||||
window.print(); // Opens the browser's print dialog
|
||||
}
|
||||
|
||||
getInvalidFields() {
|
||||
const invalidFields = [];
|
||||
|
||||
Object.keys(this.registrationForm.controls).forEach((controlName) => {
|
||||
const control = this.registrationForm.get(controlName);
|
||||
|
||||
if (control.invalid) {
|
||||
invalidFields.push(controlName);
|
||||
}
|
||||
});
|
||||
|
||||
return invalidFields;
|
||||
}
|
||||
|
||||
onSubmit() {
|
||||
const formData = this.registrationForm.value;
|
||||
|
||||
(formData.inputcaption1 = formData.isPaymentDone),
|
||||
(formData.inputvalue1 = formData.designation),
|
||||
(formData.inputcaption2 = formData.placeOfWork),
|
||||
(formData.inputvalue2 = formData.medicalCollegeName),
|
||||
(formData.inputcaption3 = formData.hospitalName),
|
||||
(formData.inputvalue3 = formData.istacMember),
|
||||
(formData.inputcaption4 = formData.istacMemberID),
|
||||
(formData.inputvalue4 = formData.registrationType),
|
||||
(formData.inputcaption5 = formData.submitCase),
|
||||
// (formData.candidatename = formData.nameinreceipt);
|
||||
|
||||
console.log("formData ", formData);
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.registrationForm.valid) {
|
||||
if (this.confirmData()) this.sendSOAPRequest(formData);
|
||||
} else {
|
||||
alert("Please fill out all required fields correctly.");
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
sendSOAPRequest(formData: any) {
|
||||
this.dataService.sendSOAPRequest(formData).subscribe(
|
||||
(res) => {
|
||||
this.handleSOAPResponse(res);
|
||||
},
|
||||
(error) => {
|
||||
this.handleSOAPError(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
handleSOAPResponse(res: any) {
|
||||
console.log(res);
|
||||
this.paymentInfo = this.xmlParserService.parseXml(res);
|
||||
|
||||
if (this.paymentInfo.ResultCode == "0") {
|
||||
const confData = {
|
||||
...this.paymentInfo,
|
||||
...this.registrationForm.value,
|
||||
};
|
||||
console.log("conf Data", confData);
|
||||
this.insertConferenceData(confData);
|
||||
}
|
||||
}
|
||||
|
||||
handleSOAPError(error: any) {
|
||||
alert("Something went wrong " + error);
|
||||
console.error(error);
|
||||
}
|
||||
|
||||
insertConferenceData(confData: any) {
|
||||
this.dataService.insertConferenceData(confData).subscribe(
|
||||
(response) => {
|
||||
console.log("Response from API:", response);
|
||||
// Handle the response from the API as needed
|
||||
},
|
||||
(error) => {
|
||||
console.error("Error:", error);
|
||||
// Handle errors
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
<div class="container" *ngIf="queryParams.inputcaption1">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 offset-md-3 mt-5">
|
||||
<div class="card" *ngIf="confRegObj.id">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Conference Information</h5>
|
||||
<hr />
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<td>{{ confRegObj.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Conference Code</th>
|
||||
<td>{{ confRegObj.conferencecode }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ confRegObj.nameinreceipt }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Address</th>
|
||||
<td>{{ confRegObj.address1 }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Phone</th>
|
||||
<td>{{ confRegObj.phone }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 offset-md-3 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">
|
||||
Payment successful! Your registration for the Symposium is complete.
|
||||
</h5>
|
||||
<p class="card-text">
|
||||
Reg No: {{ queryParams.regno }}
|
||||
<br />
|
||||
Payment status:
|
||||
<span class="text-info">{{
|
||||
queryParams.inputcaption1 == "Y" ? "SUCCESS" : "UNKNOWN"
|
||||
}}</span>
|
||||
<br />
|
||||
Transaction ID: {{ queryParams.responseTransid }}
|
||||
</p>
|
||||
<!-- Add the links here -->
|
||||
<p>
|
||||
<a href="/">Go Home</a> |
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
class="btn btn-primary"
|
||||
(click)="printPage()"
|
||||
>Print</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container" *ngIf="!queryParams.inputcaption1">
|
||||
<div class="row">
|
||||
<div class="col-md-6 offset-md-3 mt-5">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Something went wrong..</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { RegistrationStatusComponent } from './registration-status.component';
|
||||
|
||||
describe('RegistrationStatusComponent', () => {
|
||||
let component: RegistrationStatusComponent;
|
||||
let fixture: ComponentFixture<RegistrationStatusComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ RegistrationStatusComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(RegistrationStatusComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,65 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { ActivatedRoute } from "@angular/router";
|
||||
import { DataService } from "src/app/data.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-registration-status",
|
||||
templateUrl: "./registration-status.component.html",
|
||||
styleUrls: ["./registration-status.component.scss"],
|
||||
})
|
||||
export class RegistrationStatusComponent implements OnInit {
|
||||
queryParams: any = {};
|
||||
confRegObj: any = {};
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
private dataService: DataService
|
||||
) {}
|
||||
|
||||
|
||||
printPage() {
|
||||
window.print(); // Opens the browser's print dialog
|
||||
}
|
||||
|
||||
|
||||
ngOnInit() {
|
||||
// Access the query parameters
|
||||
this.queryParams.regno = this.route.snapshot.queryParamMap.get("regno");
|
||||
this.queryParams.inputcaption1 =
|
||||
this.route.snapshot.queryParamMap.get("status");
|
||||
this.queryParams.responseTransid =
|
||||
this.route.snapshot.queryParamMap.get("transid");
|
||||
// this.queryParams.inputvalue5 =
|
||||
// this.route.snapshot.queryParamMap.get("message");
|
||||
|
||||
if (this.queryParams.inputcaption1 == "Y") {
|
||||
this.dataService
|
||||
.getConferenceDataByRegno(this.queryParams.regno)
|
||||
.subscribe((res: any) => {
|
||||
this.confRegObj = res;
|
||||
console.log(res);
|
||||
this.confRegObj = this.updateObject(
|
||||
this.confRegObj,
|
||||
this.queryParams
|
||||
);
|
||||
setTimeout(() => {
|
||||
this.updateConf(this.confRegObj);
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
updateObject(target: any, updates: Record<string, any>): any {
|
||||
target = { ...target, ...updates };
|
||||
return target;
|
||||
}
|
||||
|
||||
updateConf(data: any) {
|
||||
console.log("data ", data);
|
||||
|
||||
this.dataService.insertConferenceData(data).subscribe((res) => {
|
||||
console.log(res);
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
<section class="bg-login d-flex align-items-center">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center mt-4">
|
||||
<div class="col-lg-4">
|
||||
<div class="bg-white p-4 mt-5 rounded">
|
||||
<div class="text-center">
|
||||
<h4 class="fw-bold mb-3">Globing</h4>
|
||||
</div>
|
||||
<form class="login-form">
|
||||
<div class="row">
|
||||
<div class="col-lg-12 mt-2">
|
||||
<input type="text" class="form-control" placeholder="First Name" required="">
|
||||
</div>
|
||||
<div class="col-lg-12 mt-2">
|
||||
<input type="email" class="form-control" placeholder="Email" required="">
|
||||
</div>
|
||||
<div class="col-lg-12 mt-2">
|
||||
<input type="password" class="form-control" placeholder="Password" required="">
|
||||
</div>
|
||||
<div class="col-lg-12 mt-2">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" value="" id="flexCheckDefault">
|
||||
<label class="form-check-label" for="flexCheckDefault">
|
||||
I Accept <a href="#">Terms And Condition</a>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12 mt-4">
|
||||
<button class="btn btn-primary w-100">Register</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="text-center mt-3">
|
||||
<p><small class="text-white me-2">Already have an account ?</small> <a routerLink="/login" class="text-white fw-bold">Sign in</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SignupComponent } from './signup.component';
|
||||
|
||||
describe('SignupComponent', () => {
|
||||
let component: SignupComponent;
|
||||
let fixture: ComponentFixture<SignupComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ SignupComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SignupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-signup',
|
||||
templateUrl: './signup.component.html',
|
||||
styleUrls: ['./signup.component.scss']
|
||||
})
|
||||
export class SignupComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -44,7 +44,7 @@ export class AuthenticationService {
|
||||
this.storage.removeItem(this.JWT_TOKEN_STORAGE_KEY);
|
||||
this.storage.removeItem(this.USER_STORAGE_KEY);
|
||||
this.storage.removeItem("users");
|
||||
this.router.navigateByUrl('/login');
|
||||
this.router.navigateByUrl('/dashboard/login');
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { EventService } from './event.service';
|
||||
|
||||
describe('EventService', () => {
|
||||
let service: EventService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(EventService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
68
support-portal-frontend/src/app/service/event.service.ts
Normal file
68
support-portal-frontend/src/app/service/event.service.ts
Normal file
@ -0,0 +1,68 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class EventService {
|
||||
private apiUrl = environment.apiUrl+'/api/events'; // Replace with your API endpoint
|
||||
|
||||
constructor(private http: HttpClient) { }
|
||||
|
||||
// Fetch all events
|
||||
getEvents(): Observable<any[]> {
|
||||
return this.http.get<any[]>(this.apiUrl)
|
||||
.pipe(
|
||||
catchError(this.handleError<any[]>('getEvents', []))
|
||||
);
|
||||
}
|
||||
|
||||
// Fetch a single event by id
|
||||
getEvent(id: number): Observable<any> {
|
||||
const url = `${this.apiUrl}/${id}`;
|
||||
return this.http.get<any>(url)
|
||||
.pipe(
|
||||
catchError(this.handleError<any>(`getEvent id=${id}`))
|
||||
);
|
||||
}
|
||||
|
||||
// Create a new event
|
||||
createEvent(event: any): Observable<any> {
|
||||
return this.http.post<any>(this.apiUrl, event, this.httpOptions)
|
||||
.pipe(
|
||||
catchError(this.handleError<any>('createEvent'))
|
||||
);
|
||||
}
|
||||
|
||||
// Update an existing event
|
||||
updateEvent(id: number, event: any): Observable<any> {
|
||||
const url = `${this.apiUrl}/${id}`;
|
||||
return this.http.put<any>(url, event, this.httpOptions)
|
||||
.pipe(
|
||||
catchError(this.handleError<any>('updateEvent'))
|
||||
);
|
||||
}
|
||||
|
||||
// Delete an event by id
|
||||
deleteEvent(id: number): Observable<any> {
|
||||
const url = `${this.apiUrl}/${id}`;
|
||||
return this.http.delete<any>(url)
|
||||
.pipe(
|
||||
catchError(this.handleError<any>('deleteEvent'))
|
||||
);
|
||||
}
|
||||
|
||||
private httpOptions = {
|
||||
headers: new HttpHeaders({ 'Content-Type': 'application/json' })
|
||||
};
|
||||
|
||||
private handleError<T>(operation = 'operation', result?: T) {
|
||||
return (error: any): Observable<T> => {
|
||||
console.error(`${operation} failed: ${error.message}`);
|
||||
return of(result as T);
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
<!-- STRAT TESTIMONIAL -->
|
||||
<section class="section bg-client" id="testi">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center mt-5 mb-5">
|
||||
<div class="col-lg-12">
|
||||
<owl-carousel-o [options]="customOptions">
|
||||
<ng-template carouselSlide>
|
||||
<div class="text-center w-75 mx-auto">
|
||||
<div class="testi-icon text-white">
|
||||
<i class="ti-quote-left"></i>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<p class="user-review text-center">Risus cubilia etiam parturient augue nostra
|
||||
sodales sit aptent venenatis magna sapien
|
||||
ante hendrerit ullamcorper tincidunt urna eget Ante feugiat.</p>
|
||||
<div class="">
|
||||
<img src="assets/images/testi/testi-1.jpg" alt=""
|
||||
class="rounded-circle testi-user mx-auto d-block">
|
||||
</div>
|
||||
<p class="testi-user-name text-center text-white mb-0 mt-4">- John Litts,
|
||||
Globing</p>
|
||||
<p class="text-muted">
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template carouselSlide>
|
||||
<div class="text-center w-75 mx-auto">
|
||||
<div class="testi-icon text-white">
|
||||
<i class="ti-quote-left"></i>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<p class="user-review text-center">Risus cubilia etiam parturient augue nostra
|
||||
sodales sit aptent venenatis ullamcorper tincidunt urna, eget magna sapien
|
||||
ante hendrerit Ante feugiat.</p>
|
||||
<div class="">
|
||||
<img src="assets/images/testi/testi-2.jpg" alt=""
|
||||
class="rounded-circle testi-user mx-auto d-block">
|
||||
</div>
|
||||
<p class="testi-user-name text-center text-white mb-0 mt-4">- John Litts,
|
||||
Globing</p>
|
||||
<p class="text-muted">
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template carouselSlide>
|
||||
<div class="text-center w-75 mx-auto">
|
||||
<div class="testi-icon text-white">
|
||||
<i class="ti-quote-left"></i>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<p class="user-review text-center">Risus cubilia etiam parturient augue nostra
|
||||
sodales sit aptent venenatis magna ullamcorper tincidunt urna, eget sapien
|
||||
ante hendrerit Ante feugiat.</p>
|
||||
<div class="">
|
||||
<img src="assets/images/testi/testi-3.jpg" alt=""
|
||||
class="rounded-circle testi-user mx-auto d-block">
|
||||
</div>
|
||||
<p class="testi-user-name text-center text-white mb-0 mt-4">- John Litts,
|
||||
Globing</p>
|
||||
<p class="text-muted">
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
<span class="ti-star text-warning"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</owl-carousel-o>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END TESTIMONIAL -->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ClientComponent } from './client.component';
|
||||
|
||||
describe('ClientComponent', () => {
|
||||
let component: ClientComponent;
|
||||
let fixture: ComponentFixture<ClientComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ClientComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ClientComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,34 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { OwlOptions } from 'ngx-owl-carousel-o';
|
||||
|
||||
@Component({
|
||||
selector: 'app-client',
|
||||
templateUrl: './client.component.html',
|
||||
styleUrls: ['./client.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Client component
|
||||
*/
|
||||
export class ClientComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
customOptions: OwlOptions = {
|
||||
loop: true,
|
||||
mouseDrag: false,
|
||||
touchDrag: false,
|
||||
pullDrag: false,
|
||||
dots: false,
|
||||
navSpeed: 700,
|
||||
responsive: {
|
||||
0: {
|
||||
items: 1
|
||||
},
|
||||
},
|
||||
nav: true,
|
||||
navText: [ '<div class="test_nav_right"><i class="ti-angle-right"></i></div>', '<div class="test_nav_left"><i class="ti-angle-left"></i></div>' ]
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,72 @@
|
||||
<!-- CONTACT FORM START-->
|
||||
<section class="section " style="background-color: #f8fcffe8;" id="contact">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-headphone-alt title-icon text-muted"></i>
|
||||
<h3 class="title">Get In <span class="fw-bold">Touch</span></h3>
|
||||
<!-- <p class="text-muted mt-3 title-subtitle mx-auto">It is a long established fact that a reader will
|
||||
be of a page when established fact looking at its layout.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-4">
|
||||
<div class="mt-4 pt-4">
|
||||
<p class="text-muted mt-4"> <span class="fw-bold ">Phone No.:</span><br> <span
|
||||
class="d-block mt-2">04172 – 224627 / 224626</span></p>
|
||||
<p class="text-muted mt-4"><span class="fw-bold ">Address:</span><br> <span
|
||||
class="d-block mt-2">Christian Medical College, IDA Scudder Rd, Vellore, Tamil Nadu 632004</span></p>
|
||||
<p class="text-muted mt-4"><span class="fw-bold ">Email Address:</span><br> <span
|
||||
class="d-block mt-2">traumasurg.academic@cmcvellore.ac.in</span></p>
|
||||
<p class="text-muted mt-4"><span class="fw-bold ">Time:</span><br> <span
|
||||
class="d-block mt-2">9:00AM To 6:00PM</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
<div class="custom-form mt-4 pt-4">
|
||||
<form method="post" name="myForm" onsubmit="return validateForm()">
|
||||
<p id="error-msg"></p>
|
||||
<div id="simple-msg"></div>
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group mt-2">
|
||||
<input name="name" id="name" type="text" class="form-control"
|
||||
placeholder="Your name*">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="form-group mt-2">
|
||||
<input name="email" id="email" type="email" class="form-control"
|
||||
placeholder="Your email*">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group mt-2">
|
||||
<input type="text" class="form-control" id="subject" placeholder="Your Subject.." />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-group mt-2">
|
||||
<textarea name="comments" id="comments" rows="4" class="form-control"
|
||||
placeholder="Your message..."></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12 text-right">
|
||||
<input type="submit" id="submit" name="send" class="submitBnt btn btn-primary"
|
||||
value="Send Message">
|
||||
<div id="simple-msg"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- CONTACT FORM END-->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ContactComponent } from './contact.component';
|
||||
|
||||
describe('ContactComponent', () => {
|
||||
let component: ContactComponent;
|
||||
let fixture: ComponentFixture<ContactComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ContactComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ContactComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-contact',
|
||||
templateUrl: './contact.component.html',
|
||||
styleUrls: ['./contact.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Contact component
|
||||
*/
|
||||
export class ContactComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
<!-- START TEAM -->
|
||||
<section class="section" id="faq">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-comments title-icon text-muted"></i>
|
||||
<h3 class="title"><span class="fw-bold">Our</span> focus is:</h3>
|
||||
<!-- <p class="text-muted mt-3 title-subtitle mx-auto">It is a long established fact that a reader will
|
||||
be of a page when established fact looking at its layout.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center mt-2 ">
|
||||
<div class="m-1">
|
||||
<h5 class="mb-0 f-18 font-weight-600">
|
||||
To save lives and improve quality of life for survivors
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="m-1">
|
||||
<h5 class="mb-0 f-18 font-weight-600">
|
||||
To minimise disability and other long-term consequences of traumatic
|
||||
injuries
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="m-1">
|
||||
<h5 class="mb-0 f-18 font-weight-600">
|
||||
To reduce the economic and social impact of injuries
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<div class="m-1">
|
||||
<h5 class="mb-0 f-18 font-weight-600">
|
||||
To advance the trauma care field, enhance outcomes and improve the
|
||||
quality of care at all levels national and international.
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END TEAM -->
|
||||
|
||||
<!-- START CTA -->
|
||||
<!-- <section class="section">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="text-center">
|
||||
<h3 class="mb-4">You have another questions or need help?</h3>
|
||||
<div class="">
|
||||
<a href="#" class="btn btn-round btn-primary">Contact Us</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section> -->
|
||||
<!-- END TEAM -->
|
||||
|
||||
<!-- <ng-template #content>
|
||||
<p class="text-muted">You want customer to your store. Easily publish your coupans and
|
||||
when a user has manage to catch one of your coupens, the coupens wil be deducted
|
||||
from your coupens account at Clooger.</p>
|
||||
</ng-template> -->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FaqComponent } from './faq.component';
|
||||
|
||||
describe('FaqComponent', () => {
|
||||
let component: FaqComponent;
|
||||
let fixture: ComponentFixture<FaqComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FaqComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FaqComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
19
support-portal-frontend/src/app/shared/faq/faq.component.ts
Normal file
19
support-portal-frontend/src/app/shared/faq/faq.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-faq',
|
||||
templateUrl: './faq.component.html',
|
||||
styleUrls: ['./faq.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* FAQ component
|
||||
*/
|
||||
export class FaqComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
<!-- START FETURES -->
|
||||
<section class="section bg-honey" id="features">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-bookmark-alt title-icon text-muted"></i>
|
||||
<h3 class="title text-primary"><span class="fw-bold">Ranipet Campus</span></h3>
|
||||
<p class="text-muted mt-3 title-primary mx-auto">Level 1 Trauma Care Facility at Ranipet Campuss</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mt-5 vertical-content">
|
||||
<div class="col-lg-6 mt-2">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<img src="assets/images/cmc/p1.png" alt="" class="img-fluid mx-auto d-block">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-5 offset-lg-1 mt-2">
|
||||
<div class="features-desc">
|
||||
<!-- <h2>This is Improve Your Marketing <br> business</h2> -->
|
||||
<p class="text-muted mt-3">
|
||||
The Level 1 Trauma Care Facility with dedicated ambulance entry has started functioning at the
|
||||
CMC Vellore Ranipet Campus.The facility is located on the ground floor of Block D, co-located
|
||||
with the Cardiac Care Unit. It includes an Emergency Bay, 6 state-of-the-art trauma operation
|
||||
theatres, a radiology suite and 112 ward & ICU beds.
|
||||
|
||||
</p>
|
||||
<!-- <a href="#" class="btn btn-primary btn-round mt-3">Read more<i
|
||||
class="mdi mdi-chevron-right"></i></a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mt-5 pt-5 vertical-content">
|
||||
<div class="col-lg-5 mt-2">
|
||||
<div class="features-desc">
|
||||
<!-- <h2>This Is Increase Your Marketing Performance</h2> -->
|
||||
<p class="text-muted mt-3">Trauma is an unforeseen incident which is life or limb threatening. The
|
||||
immediate commencement of trauma care is important for life and limb saving. In this Context the
|
||||
Department of trauma surgery commits itself to offer quality services towards Primary assessment
|
||||
and surgical interventions for the Injured Victim in a comprehensive manner. The subsequent
|
||||
review and follow-up as Outpatient services.</p>
|
||||
<!-- <a href="#" class="btn btn-primary btn-round mt-3">Read more<i
|
||||
class="mdi mdi-chevron-right"></i></a> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 offset-lg-1 mt-2">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<img src="assets/images/cmc/ct.jpg" alt="" class="img-fluid mx-auto d-block">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END FEATURES -->
|
||||
@ -0,0 +1,4 @@
|
||||
.bg-honey{
|
||||
background-color: #f5f5f5;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FeaturesComponent } from './features.component';
|
||||
|
||||
describe('FeaturesComponent', () => {
|
||||
let component: FeaturesComponent;
|
||||
let fixture: ComponentFixture<FeaturesComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FeaturesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FeaturesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-features',
|
||||
templateUrl: './features.component.html',
|
||||
styleUrls: ['./features.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Features component
|
||||
*/
|
||||
export class FeaturesComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
<!-- STRT FOOTER -->
|
||||
<section class="section footer">
|
||||
<!-- <div class="bg-overlay"></div> -->
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="text-center">
|
||||
<ul class="list-inline social mb-0">
|
||||
<li class="list-inline-item"><a href="#" class="social-icon text-muted"><i
|
||||
class="ti-facebook"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#" class="social-icon text-muted"><i
|
||||
class="ti-twitter-alt"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#" class="social-icon text-muted"><i
|
||||
class="ti-linkedin"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="footer-terms">
|
||||
<ul class="mb-0 list-inline text-center mt-4 pt-2">
|
||||
<li class="list-inline-item"><a href="#" class="text-muted">Terms & Condition</a></li>
|
||||
<li class="list-inline-item"><a href="#" class="text-muted">Privacy Policy</a></li>
|
||||
<li class="list-inline-item"><a href="#" class="text-muted">Contact Us</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="mt-4 pt-2 text-center">
|
||||
<p class="copy-rights text-muted mb-0">
|
||||
{{year}} © CMC VELLORE. <span class="text-white">Design by UDHAYAM INFOTECH</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END FOOTER -->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FooterComponent } from './footer.component';
|
||||
|
||||
describe('FooterComponent', () => {
|
||||
let component: FooterComponent;
|
||||
let fixture: ComponentFixture<FooterComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FooterComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FooterComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,21 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-footer',
|
||||
templateUrl: './footer.component.html',
|
||||
styleUrls: ['./footer.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Footer component
|
||||
*/
|
||||
export class FooterComponent implements OnInit {
|
||||
|
||||
year = new Date().getFullYear()
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,245 @@
|
||||
<!-- START PRICING -->
|
||||
<section class="section bg-light" id="pricing">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<!-- <img src="assets/images/cmc/logo-1.png" style="max-width:10%;" alt="..." class="img-thumbnail mb-2" > -->
|
||||
<h6 class="title">
|
||||
Events
|
||||
<!-- <span class="fw-bold"> Save the Day! </span> -->
|
||||
</h6>
|
||||
<!-- <p class="text-muted mt-3 title-subtitle mx-auto">It is a long established fact that a reader will
|
||||
be of a page when established fact looking at its layout.</p> -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-2" *ngFor="let event of events">
|
||||
<div class="col-lg-12">
|
||||
<div
|
||||
class="bg-white price-box mt-3"
|
||||
[ngClass]="{ active: event.isActive === true }"
|
||||
>
|
||||
<div class="row" style="align-items: center">
|
||||
<div class="col-2">
|
||||
<img
|
||||
src="assets/images/cmc/logo-1.png"
|
||||
alt="..."
|
||||
class="img-thumbnail mb-2"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="plan-price fw-bold text-center">
|
||||
<h1 class="mb-0 fw-bold">
|
||||
{{ event.subject }}
|
||||
<br />
|
||||
<span class="text-primary">{{ event.title }}</span>
|
||||
<br>
|
||||
<span>{{event.subTitle}}</span>
|
||||
</h1>
|
||||
<!-- <p class="mb-0">(on {{event.date}})</p> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<img
|
||||
src="assets/images/cmc/logo-2.png"
|
||||
alt="..."
|
||||
class="img-thumbnail mb-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid plan-features text-muted mt-5 mb-5">
|
||||
<div class="row mt-2" *ngFor="let event of events">
|
||||
<div class="col-md-6">
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">Venue</h5>
|
||||
<p
|
||||
class="card-text"
|
||||
*ngFor="let v of event.venue"
|
||||
class="mb-0"
|
||||
>
|
||||
<b class="text-primary"
|
||||
>{{ v.title }}
|
||||
<span *ngIf="v.date">on {{ v.date }}</span>
|
||||
</b>
|
||||
<span *ngIf="v.address">, {{ v.address }}</span>
|
||||
<span *ngIf="v.info"> - ({{ v.info }})</span>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">Highlights</h5>
|
||||
<p
|
||||
class="card-text mb-0 mx-2 text-capitalize"
|
||||
*ngFor="let o of event.highlights"
|
||||
>
|
||||
<span class="text-primary">* </span> {{ o }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">Contact Information</h5>
|
||||
<p class="mb-0">Email: {{ event.email }}</p>
|
||||
<p>Phone: {{ event.phone }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">Date</h5>
|
||||
<p>{{ event.date }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">
|
||||
Organizing Committee - Department of Trauma Surgery
|
||||
</h5>
|
||||
<p
|
||||
class="card-text mb-0 mx-2 text-capitalize"
|
||||
*ngFor="let o of event.orgnisers"
|
||||
>
|
||||
<span class="text-primary">* </span>{{ o }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title fw-bolder">Registration</h5>
|
||||
|
||||
<p
|
||||
class="mb-0 font-italic mx-2"
|
||||
*ngFor="let fee of event.fee"
|
||||
>
|
||||
{{ fee.desc }}
|
||||
</p>
|
||||
|
||||
<!-- <p class="mb-0"> Register at <a href="#">www.traumasurg.com</a></p> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<button
|
||||
(click)="register(event)"
|
||||
class="btn btn-success btn-round float-end"
|
||||
>
|
||||
Register
|
||||
</button>
|
||||
|
||||
<button
|
||||
(click)="status(event)"
|
||||
class="btn btn-info btn-round float-end me-3"
|
||||
>
|
||||
Registration Status
|
||||
</button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="container my-2">
|
||||
<h1 class="my-2 fw-bold text-center">
|
||||
<span class="text-primary">Brochure</span>
|
||||
</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<img
|
||||
src="assets/images/cmc/s1.png"
|
||||
alt="..."
|
||||
class="img-thumbnail mb-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<img
|
||||
src="assets/images/cmc/s2.png"
|
||||
alt="..."
|
||||
class="img-thumbnail mb-2"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="container">
|
||||
<!-- <div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-user title-icon text-muted"></i>
|
||||
<h3 class="title">Our <span class="fw-bold">Faculties</span></h3>
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<!-- <i class="ti-user title-icon text-muted"></i> -->
|
||||
<h3 class="title text-primary">
|
||||
meet Our <span class="fw-bold">Faculties</span>
|
||||
</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-container *ngFor="let item of doctors; let i = index">
|
||||
<div class="col-lg-4">
|
||||
<div class="text-center bg-white team-box mt-3 p-5">
|
||||
<div>
|
||||
<img
|
||||
style=" width: 105px; height: 105px;"
|
||||
[src]="
|
||||
item.image
|
||||
? 'assets/images/doctors/' + item.image
|
||||
: 'assets/images/doctor/pro-logo.png'
|
||||
"
|
||||
alt=""
|
||||
class="img-fluid rounded-circle img-thumbnail mx-auto d-block"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="team-name">
|
||||
<p class="fw-bold mb-0 mt-4">{{ item.name }}</p>
|
||||
<p class="mb-0 mt-4">
|
||||
<span *ngIf="item.prof">{{ item.prof }}, </span> {{ item.at }}
|
||||
</p>
|
||||
<!-- <p class="text-muted mt-4">
|
||||
{{ item.dept }}
|
||||
</p> -->
|
||||
</div>
|
||||
<!-- <div class="">
|
||||
<ul class="list-inline team-social mt-4 mb-0">
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-github"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-skype"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-twitter-alt"></i></a></li>
|
||||
</ul>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start a new row after every fourth item -->
|
||||
<div class="w-100" *ngIf="(i + 1) % 6 === 0"></div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- END PRICING -->
|
||||
@ -0,0 +1,14 @@
|
||||
.fw-bolder{
|
||||
font-weight: bolder!important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.im{
|
||||
max-width: 40%;
|
||||
width: 154px;
|
||||
height: 154px;
|
||||
/* background-size: 100% auto; */
|
||||
object-fit: cover;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PricingComponent } from './pricing.component';
|
||||
|
||||
describe('PricingComponent', () => {
|
||||
let component: PricingComponent;
|
||||
let fixture: ComponentFixture<PricingComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PricingComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PricingComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,94 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Router } from "@angular/router";
|
||||
import { DataService } from "src/app/data.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-pricing",
|
||||
templateUrl: "./pricing.component.html",
|
||||
styleUrls: ["./pricing.component.scss"],
|
||||
})
|
||||
|
||||
/**
|
||||
* Pricing component
|
||||
*/
|
||||
export class PricingComponent implements OnInit {
|
||||
constructor(private router: Router, private dataService: DataService) {}
|
||||
|
||||
events = [];
|
||||
doctors = [];
|
||||
ngOnInit(): void {
|
||||
this.events = this.dataService.events;
|
||||
this.doctors = this.events[0].doctors;
|
||||
}
|
||||
|
||||
team = [
|
||||
{
|
||||
image: "sukria.png",
|
||||
name: "Dr. Sukria Nayak",
|
||||
dept: "Professor Head, Department of Trauma Surgery, CMC Vellore",
|
||||
},
|
||||
{
|
||||
image: "amit.png",
|
||||
name: "Dr. Amit Gupta",
|
||||
dept: "Professor, Division of Trauma Surgery, JPNATC, AIIMS, New Delhi",
|
||||
},
|
||||
{
|
||||
name: "Dr. Kirthi Sathyakumar",
|
||||
dept: " Associate Professor, Emergency Radiology, CMC, Vellore",
|
||||
},
|
||||
{
|
||||
image: "subodh.png",
|
||||
name: "Dr. Subodh Kumar",
|
||||
dept: "Professor, Division of Trauma Surgery, JPNATC, AIIMS, New Delhi",
|
||||
},
|
||||
{
|
||||
name: "Dr. Santhosh R Benjamin",
|
||||
dept: " Associate Professor, Department of Cardiothoracic Surgery, CMC Vellore",
|
||||
},
|
||||
{
|
||||
image: "kajal.png",
|
||||
name: "Dr. Kajal Jain",
|
||||
dept: "Professor, Department of Anaesthesia, PGIMER, Chandigarh",
|
||||
},
|
||||
{
|
||||
name: "Dr. Raghu",
|
||||
dept: "Professor, Division of Trauma and Acute Care Surgery, University Hospital, Michigan Medicine, Ann Arbor",
|
||||
},
|
||||
{
|
||||
name: "Dr. Vinay M Rao",
|
||||
dept: " Assistant Professor, Department of Cardiothoracic Surgery, CMC Vellore",
|
||||
},
|
||||
{
|
||||
name: "Dr. Niladri Banerjee",
|
||||
dept: " Assistant Professor, Department of Surgery, AIIMS, Jodhpur",
|
||||
},
|
||||
{
|
||||
name: "Dr. Susheel Sudheesh",
|
||||
dept: " Assistant Professor, Department of Anaesthesia, CMC Vellore",
|
||||
},
|
||||
{
|
||||
image: "srujan.png",
|
||||
name: "Dr. Srujan Lam Sharma",
|
||||
dept: " Assistant Professor, Department of Trauma Surgery, CMC, Vellore",
|
||||
},
|
||||
{
|
||||
image: "vignesh.png",
|
||||
name: "Dr. Vignesh Kumar",
|
||||
dept: " Associate Professor, PIMS, Puducherry ",
|
||||
},
|
||||
{
|
||||
name: "Dr. Joses Dany James",
|
||||
dept: " Assistant Professor, Department of Trauma Surgery, CMC Vellore",
|
||||
},
|
||||
];
|
||||
|
||||
register(event) {
|
||||
console.log(event);
|
||||
this.router.navigate(["/register", event.id]);
|
||||
}
|
||||
|
||||
status(event) {
|
||||
console.log(event);
|
||||
this.router.navigate(["/check-status"]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
import { Directive, Input, EventEmitter, Inject, Output, ElementRef, HostListener } from '@angular/core';
|
||||
import { DOCUMENT } from '@angular/common';
|
||||
|
||||
@Directive({
|
||||
selector: '[appScrollspy]'
|
||||
})
|
||||
export class ScrollspyDirective {
|
||||
|
||||
@Input() public spiedTags = [];
|
||||
@Output() public sectionChange = new EventEmitter<string>();
|
||||
private currentSection: string;
|
||||
|
||||
// tslint:disable-next-line: variable-name
|
||||
constructor(private _el: ElementRef, @Inject(DOCUMENT) private document: Document,) { }
|
||||
|
||||
@HostListener('window:scroll', ['$event'])
|
||||
/**
|
||||
* Window scroll method
|
||||
*/
|
||||
onScroll(event: any) {
|
||||
let currentSection: string;
|
||||
const children = this._el.nativeElement.querySelectorAll('section');
|
||||
const scrollTop = this.document.documentElement.scrollTop;
|
||||
const parentOffset = this.document.documentElement.offsetTop;
|
||||
|
||||
// tslint:disable-next-line: prefer-for-of
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
const element = children[i];
|
||||
if (this.spiedTags.some(spiedTag => spiedTag === element.tagName)) {
|
||||
if ((element.offsetTop - parentOffset) <= scrollTop) {
|
||||
currentSection = element.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentSection !== this.currentSection) {
|
||||
this.currentSection = currentSection;
|
||||
this.sectionChange.emit(this.currentSection);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
<!-- START SERVICES -->
|
||||
<section class="section" id="services">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-ruler-pencil title-icon text-muted"></i>
|
||||
<h3 class="title"> <span class="fw-bold">about us</span></h3>
|
||||
<p class="text-muted mt-3 mx-auto">Christian Medical College Vellore was started as a
|
||||
one-bedded clinic-cum-dispensary in 1900 by Dr. Ida Sophia Scudder, the daughter of
|
||||
second-generation medical missionaries. Today, this healthcare organization of international repute
|
||||
includes a network of primary, secondary, tertiary and quaternary care hospitals, with around 3844
|
||||
beds spread across six campuses in and around Vellore, and in the neighboring state of Andhra
|
||||
Pradesh. The main hospital is situated in the 19-acre Town Campus (earlier referred to as the
|
||||
Thottappalayam Campus) in the heart of Vellore town. The hospital complex is the site for clinical
|
||||
training for all the students. The vast majority of the clinical departments are located on the
|
||||
hospital campus. From April 2016 to March 2017, the hospital, which has close to 2500 beds,
|
||||
received more than 21 lakh outpatients, more than a lakh inpatients and recorded more than 14, 500
|
||||
births.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row mt-5">
|
||||
<div class="col-md-4" *ngFor="let item of servicesData">
|
||||
<div class="services-box">
|
||||
<div class="services-icon">
|
||||
<i :class="{{item.icon}} text-primary"></i>
|
||||
</div>
|
||||
<div class="mt-3">
|
||||
<h5 class="services-title fw-bold mb-3">{{item.title}}</h5>
|
||||
<p class="services-subtitle text-muted"> Ut enim ad minim veniam, quis nostrud exercitation
|
||||
ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- end col -->
|
||||
<!-- end row -->
|
||||
</div>
|
||||
</section>
|
||||
<!-- END SERVICES -->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ServicesComponent } from './services.component';
|
||||
|
||||
describe('ServicesComponent', () => {
|
||||
let component: ServicesComponent;
|
||||
let fixture: ComponentFixture<ServicesComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ServicesComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ServicesComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,46 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-services',
|
||||
templateUrl: './services.component.html',
|
||||
styleUrls: ['./services.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Services component
|
||||
*/
|
||||
export class ServicesComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
servicesData = [
|
||||
{
|
||||
icon: 'ti-settings',
|
||||
title: 'Digital Design'
|
||||
},
|
||||
{
|
||||
icon: 'ti-palette',
|
||||
title: 'Unlimited Colors'
|
||||
},
|
||||
{
|
||||
icon: 'ti-stats-up',
|
||||
title: 'Strategy Solutions'
|
||||
},
|
||||
{
|
||||
icon: 'ti-package',
|
||||
title: 'Awesome Support'
|
||||
},
|
||||
{
|
||||
icon: 'ti-dashboard',
|
||||
title: 'Truly Multipurpose'
|
||||
},
|
||||
{
|
||||
icon: 'ti-headphone',
|
||||
title: 'Easy to customize'
|
||||
}
|
||||
]
|
||||
|
||||
}
|
||||
29
support-portal-frontend/src/app/shared/shared.module.ts
Normal file
29
support-portal-frontend/src/app/shared/shared.module.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CarouselModule } from 'ngx-owl-carousel-o';
|
||||
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
||||
|
||||
import { ServicesComponent } from './services/services.component';
|
||||
import { FeaturesComponent } from './features/features.component';
|
||||
import { ClientComponent } from './client/client.component';
|
||||
import { TeamComponent } from './team/team.component';
|
||||
import { FaqComponent } from './faq/faq.component';
|
||||
import { PricingComponent } from './pricing/pricing.component';
|
||||
import { ContactComponent } from './contact/contact.component';
|
||||
import { FooterComponent } from './footer/footer.component';
|
||||
import { SwitcherComponent } from './switcher/switcher.component';
|
||||
import { ScrollspyDirective } from './scrollspy.directive';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
@NgModule({
|
||||
declarations: [ServicesComponent, FeaturesComponent, ClientComponent, TeamComponent, FaqComponent, PricingComponent, ContactComponent, FooterComponent, SwitcherComponent, ScrollspyDirective],
|
||||
imports: [
|
||||
// BrowserModule,
|
||||
CommonModule,
|
||||
CarouselModule,
|
||||
ScrollToModule.forRoot()
|
||||
],
|
||||
exports: [ServicesComponent, FeaturesComponent, ClientComponent, TeamComponent, FaqComponent, PricingComponent, ContactComponent, FooterComponent, SwitcherComponent, ScrollspyDirective]
|
||||
})
|
||||
export class SharedModule { }
|
||||
@ -0,0 +1,35 @@
|
||||
<!-- Back to top -->
|
||||
<div (window:scroll)="windowScroll()">
|
||||
<a href="javascript:void(0);" [ngxScrollTo]="'#home'" class="back-to-top" id="back-to-top"> <i class="ti-angle-up"> </i> </a>
|
||||
</div>
|
||||
<!-- Style switcher -->
|
||||
<div id="style-switcher" [style]="isVisible ? 'left: 0px' : 'left: -189px'">
|
||||
<div>
|
||||
<h3>Select your color</h3>
|
||||
<ul class="pattern">
|
||||
<li>
|
||||
<a class="color1" href="javascript: void(0);" (click)="setTheme('default')"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="color2" href="javascript: void(0);" (click)="setTheme('pink')"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="color3" href="javascript: void(0);" (click)="setTheme('yellow')"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="color4" href="javascript: void(0);" (click)="setTheme('green')"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="color5" href="javascript: void(0);" (click)="setTheme('purple')"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="color6" href="javascript: void(0);" (click)="setTheme('light-blue')"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<a href="javascript: void(0);" class="settings" (click)="toggleSwitcher()"><i
|
||||
class="ti-settings ti-spin"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end Style switcher -->
|
||||
@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SwitcherComponent } from './switcher.component';
|
||||
|
||||
describe('SwitcherComponent', () => {
|
||||
let component: SwitcherComponent;
|
||||
let fixture: ComponentFixture<SwitcherComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ SwitcherComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SwitcherComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,45 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-switcher',
|
||||
templateUrl: './switcher.component.html',
|
||||
styleUrls: ['./switcher.component.scss']
|
||||
})
|
||||
|
||||
/**
|
||||
* Switcher component
|
||||
*/
|
||||
export class SwitcherComponent implements OnInit {
|
||||
|
||||
isVisible = false;
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
windowScroll() {
|
||||
if (
|
||||
document.body.scrollTop > 100 ||
|
||||
document.documentElement.scrollTop > 100
|
||||
) {
|
||||
document.getElementById("back-to-top").style.display = "inline";
|
||||
} else {
|
||||
document.getElementById("back-to-top").style.display = "none";
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Onclick color change
|
||||
* @param theme theme color
|
||||
*/
|
||||
setTheme(theme) {
|
||||
document
|
||||
.getElementById('color-opt')
|
||||
.setAttribute('href', 'assets/css/colors/' + theme + '.css');
|
||||
}
|
||||
|
||||
toggleSwitcher() {
|
||||
this.isVisible = !this.isVisible;
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
<!-- START TEAM-->
|
||||
|
||||
<section class="section team-bg" id="team">
|
||||
<div class="container">
|
||||
<div class="row justify-content-center text-center">
|
||||
<div class="col-lg-12">
|
||||
<i class="ti-user title-icon text-muted"></i>
|
||||
<h3 class="title">Our <span class="fw-bold">Faculties</span></h3>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mt-5">
|
||||
<ng-container *ngFor="let item of team; let i = index">
|
||||
<div class="col-lg-3">
|
||||
<div class="card border-dark text-center bg-white team-box mt-3 p-5">
|
||||
<div >
|
||||
<img
|
||||
style="width:90px;height: 90px;"
|
||||
[src]="item.image ? 'assets/images/doctors/'+item.image : 'assets/images/doctor/pro-logo.png'"
|
||||
alt=""
|
||||
class="img-fluid rounded-circle img-thumbnail mx-auto d-block"
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="team-name">
|
||||
<p class="fw-bold mb-0 mt-4">{{ item.name }}</p>
|
||||
<p class="text-muted mt-4">
|
||||
{{ item.dept }}
|
||||
</p>
|
||||
</div>
|
||||
<!-- <div class="">
|
||||
<ul class="list-inline team-social mt-4 mb-0">
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-github"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-skype"></i></a></li>
|
||||
<li class="list-inline-item"><a href="#"><i class="ti-twitter-alt"></i></a></li>
|
||||
</ul>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Start a new row after every fourth item -->
|
||||
<div class="w-100" *ngIf="(i + 1) % 6 === 0"></div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- END TEAM -->
|
||||
@ -0,0 +1,3 @@
|
||||
.team-bg{
|
||||
background-color: #fffff8;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user