-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4da6bd
commit 767dee0
Showing
21 changed files
with
1,122 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
FewaTelemedicine/ClientApp/src/app/patient/intro-mobile/intro-mobile.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> --> | ||
<div class="patient-intro"> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-12 col-xs-6"> | ||
<div class="previewVideo"> | ||
<test-audio-video></test-audio-video> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="row"> | ||
<div class="col-12 col-xs-6"> | ||
<div class="card"> | ||
<div class="card-body"> | ||
<div class="welcomeNote"> | ||
<h2>Welcome,</h2> | ||
<p>Please check in here to join your provider if you consent for | ||
this secure video visit.</p> | ||
<h6>Please check in below to let <b>{{global.currentProvider}}</b> know you are here</h6> | ||
<form action="" class="user" [formGroup]="patRegForm"> | ||
<div class="form-group"> | ||
<input class="form-control post-invitation" name="name" | ||
formControlName="patientName" type="text" placeholder="Enter your name"> | ||
<small style="color: red;" *ngIf="isControlHasError('patientName','required')">Enter | ||
your name</small> | ||
</div> | ||
<div class="custom-control custom-checkbox "> | ||
<input type="checkbox" id="customCheck" name="customCheck" | ||
class="custom-control-input" style="z-index: 2;" formControlName="acceptTerms" /> | ||
<label class="custom-control-label" for="customRadioInline1">By clicking you will | ||
accept our <a>Terms and Conditions</a></label> | ||
</div> | ||
<br> | ||
<div class="submitButton"> | ||
<button type="submit" [disabled]="!disableCheckInBtn" class="submitBtn" | ||
(click)="loginPatient()" href="javascript:;">Submit</button> | ||
</div> | ||
<div class="errorMessage" *ngIf="this.loadConfigMsg">Can not load configuration please talk with admin</div> | ||
<div class="errorMessage" *ngIf="this.userLoggedMsg">User already logged in</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
95 changes: 95 additions & 0 deletions
95
FewaTelemedicine/ClientApp/src/app/patient/intro-mobile/intro-mobile.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
@import '../../../global.scss'; | ||
|
||
.patient-intro{ | ||
background: url(../../../assets/img/patient-bg.png) center right; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
min-height: 105vh; | ||
padding: 5% 0; | ||
.previewVideo{ | ||
border-radius: 5px; | ||
overflow: hidden; | ||
box-shadow: 0px 5px 20px 15px rgba($black,0.05); | ||
} | ||
.card{ | ||
border:none; | ||
box-shadow: 0px 5px 20px 15px rgba($black,0.05); | ||
.card-body{ | ||
.welcomeNote{ | ||
width: 85%; | ||
margin: 0 auto; | ||
padding: 16% 0; | ||
h2{ | ||
color: $black; | ||
font-size: 24px; | ||
} | ||
p{ | ||
color: $light-gray; | ||
} | ||
h6{ | ||
font-size: 16px; | ||
color: $gray; | ||
b{ | ||
font-size: 17px; | ||
color: $black; | ||
} | ||
} | ||
.custom-control{ | ||
label{ | ||
font-size: 15px; | ||
color: $light-gray; | ||
a{ | ||
color: var(--primary); | ||
} | ||
} | ||
} | ||
.submitButton{ | ||
.submitBtn{ | ||
background: var(--primary); | ||
color: $white; | ||
width: 100%; | ||
display: inline-block; | ||
padding: 8px 20px; | ||
margin: 20px 0; | ||
text-align: center; | ||
border-radius: 5px; | ||
border: none; | ||
} | ||
button:disabled { | ||
cursor: not-allowed; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 600px) { | ||
.patient-intro{ | ||
padding: 5% 0; | ||
.card{ | ||
margin-bottom: 15px; | ||
.card-body{ | ||
.welcomeNote{ | ||
width: 99%; | ||
margin: 0 auto; | ||
padding: 1% 0; | ||
h2{ | ||
color: $black; | ||
font-size: 20px; | ||
} | ||
.submitButton{ | ||
.submitBtn{ | ||
margin: 10px 0; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
.errorMessage{ | ||
color: red; | ||
text-align: center; | ||
padding: 5px; | ||
} |
25 changes: 25 additions & 0 deletions
25
FewaTelemedicine/ClientApp/src/app/patient/intro-mobile/intro-mobile.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { IntroMobileComponent } from './intro-mobile.component'; | ||
|
||
|
||
describe('IntroMobileComponent', () => { | ||
let component: IntroMobileComponent; | ||
let fixture: ComponentFixture<IntroMobileComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ IntroMobileComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(IntroMobileComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
107 changes: 107 additions & 0 deletions
107
FewaTelemedicine/ClientApp/src/app/patient/intro-mobile/intro-mobile.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// Login Patient ,Validationa nd | ||
import { Component, OnInit } from '@angular/core'; | ||
import { HttpClient } from '@angular/common/http'; | ||
import { Router } from '@angular/router'; | ||
import { Global } from 'src/app/_helpers/common/global.model'; | ||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; | ||
import { Practice, Patient, Provider } from '../../_helpers/models/domain-model'; | ||
import { Observable } from 'rxjs'; | ||
import { NotificationService } from 'src/app/_helpers/common/notification.service'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-intro', | ||
templateUrl: './intro-mobile.component.html', | ||
styleUrls: ['./intro-mobile.component.scss'] | ||
}) | ||
export class IntroMobileComponent implements OnInit { | ||
practiceObj: Practice = new Practice(); | ||
patRegForm: FormGroup; | ||
disableCheckInBtn = true; | ||
loadConfigMsg : boolean = false; | ||
userLoggedMsg : boolean = false; | ||
constructor(public httpClient: HttpClient, | ||
public routing: Router, | ||
public global: Global, | ||
private formBuilder: FormBuilder, | ||
private notificationService: NotificationService) { | ||
this.initializeForm(); | ||
} | ||
|
||
private initializeForm() { | ||
this.patRegForm = this.formBuilder.group({ | ||
patientName: ['', Validators.required], | ||
acceptTerms: new FormControl({ value: true }, Validators.required) | ||
}); | ||
this.patRegForm.get('acceptTerms').valueChanges.subscribe(x => { | ||
this.disableCheckInBtn = x; | ||
}); | ||
} | ||
|
||
ngOnInit(): void { | ||
this.global.isProvider = false; | ||
this.global.isPatient = true; | ||
this.getPractice(); | ||
} | ||
|
||
private getPractice() { | ||
var key="73l3M3D"; //hardcoded | ||
this.httpClient.get<any>(this.global.practiceUrl + 'GetPracticeConfiguration?practice=' + this.global.currentPractice + "&" + "key=" + key) | ||
.subscribe(res => { | ||
this.global.practiceObj = res; | ||
if (!this.global.practiceObj.logoPath) { | ||
this.global.practiceObj.logoPath = '/assets/img/logo.png'; | ||
} | ||
this.practiceObj = this.global.practiceObj; | ||
}, err => { | ||
//'Can not load configuration please talk with admin. | ||
this.loadConfigMsg = true; | ||
setTimeout(() => { | ||
this.loadConfigMsg = false; | ||
}, 5000); | ||
}); | ||
} | ||
|
||
isControlHasError(contolName, validator): boolean { | ||
const control = this.patRegForm.controls[contolName]; | ||
if (!control) { | ||
return; | ||
} | ||
return control.touched && control.hasError(validator); | ||
} | ||
|
||
loginPatient() { | ||
if (this.patRegForm.invalid) { | ||
this.patRegForm.get('patientName').markAsTouched(); | ||
return; | ||
} | ||
var patient = new Patient(); | ||
patient.name = this.patRegForm.controls.patientName.value; | ||
patient.url = this.global.currentProvider; | ||
patient.practice=this.global.currentPractice.replace(/\s/g, "").toLowerCase(); | ||
patient.providerNameAttending=this.global.currentProvider.replace(/\s/g, "").toLowerCase(); | ||
this.global.practiceObj.url = this.global.currentPractice; | ||
this.httpClient. | ||
post<any>(this.global.practiceUrl + "LoginPatient", patient) | ||
.subscribe(res => { | ||
this.global.token = res.Token; | ||
this.global.patientObj = res.User; | ||
sessionStorage.setItem('PatientName', this.global.patientObj.name); | ||
var url: string = this.global.config.videourl.replace("PROVIDERNAME", this.global.currentProvider); | ||
this.global.config.videourl = url; | ||
// if(this.global.isMobile = true){ | ||
this.routing.navigateByUrl('/patient/liveMobile'); | ||
// } | ||
// else{ | ||
//this.routing.navigateByUrl('/patient/live'); | ||
// } | ||
}, | ||
res => { | ||
//alert('User already logged in'); | ||
this.userLoggedMsg = true; | ||
setTimeout(() => { | ||
this.userLoggedMsg = false; | ||
}, 5000); | ||
}); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
FewaTelemedicine/ClientApp/src/app/patient/live-mobilevideo/mobilelive-video.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<div class="liveChatSection"> | ||
<div class="row"> | ||
<div class="col-12 col-xs-6"> | ||
<div class="position-relative"> | ||
<div class="videoLive"> | ||
<jitsi-call *ngIf="isMeetStart" [roomName]="roomName" [remoteUserDisplayName]="remoteUserDisplayName"></jitsi-call> | ||
|
||
<test-audio-video *ngIf="isWaiting"></test-audio-video> | ||
</div> | ||
<div class="VideoUserName"> | ||
<h2 *ngIf="!isWaiting">{{global.currentProvider}}</h2> | ||
<h2 *ngIf="isWaiting">Please wait <strong>{{global.currentProvider}}</strong> will start this secure video visit.</h2> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
Oops, something went wrong.