This repository has been archived by the owner on Jul 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add challenge participant page(#153)
- Loading branch information
1 parent
3021ce0
commit 4d60082
Showing
19 changed files
with
641 additions
and
270 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
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
17 changes: 12 additions & 5 deletions
17
src/app/components/challenge/challengeparticipate/challengeparticipate.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
13 changes: 0 additions & 13 deletions
13
src/app/components/challenge/challengeparticipate/challengeparticipate.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 |
---|---|---|
@@ -1,13 +0,0 @@ | ||
@import './variables.scss'; | ||
@import './mixins.scss'; | ||
|
||
.challenge-participate-container { | ||
padding:20px; | ||
padding-left:40px; | ||
overflow:auto; | ||
.inactive { | ||
font-size:$fs-18; | ||
color:$gray-darker; | ||
font-weight:$fw-regular; | ||
} | ||
} | ||
28 changes: 28 additions & 0 deletions
28
...challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.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,28 @@ | ||
<div class="modal-container"> | ||
<div class="modal-card"> | ||
<div class="ev-md-container text-center"> | ||
<div class="row row-lr-margin"> | ||
<div class="col-md-12 col-sm-12"> | ||
<div class="ev-card-body"> | ||
<div class="modal-title align-center content"><strong class="fw-semibold">{{title}}</strong></div> | ||
<div class="terms-content content" [innerHTML]="content"></div> | ||
<form name="acceptTermsAndConditionsForm"> | ||
<input type="checkbox" class="filled-in fs-14" [(ngModel)]="termsAndConditions" name="terms_and_conditions" id="terms_and_conditions"> | ||
<label for="terms_and_conditions">{{label}}</label> | ||
<div style="text-align: left !important;"> | ||
<ul class="inline-list pointer"> | ||
<li class="rm-margin"> | ||
<a appClickstop (click)="denied()" class="dark-link pointer"><strong class="fw-semibold">{{deny}}</strong></a> | ||
</li> | ||
<li> | ||
<button [disabled]="!termsAndConditions" appClickstop (click)="confirmed()" class="btn ev-btn-dark btn-waves-effect waves-dark grad-btn grad-btn-dark fs-14">{{confirm}}</button> | ||
</li> | ||
</ul> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
29 changes: 29 additions & 0 deletions
29
...challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.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,29 @@ | ||
@import './variables.scss'; | ||
|
||
.modal-container { | ||
.modal-card { | ||
min-width: 240px; | ||
max-width: 80%; | ||
width: 80%; | ||
max-height: 80%; | ||
padding: 0px; | ||
|
||
.terms-content { | ||
margin-bottom: 15px; | ||
} | ||
|
||
.content { | ||
padding: 0px; | ||
} | ||
} | ||
} | ||
|
||
ul.inline-list { | ||
margin-top: 15px; | ||
} | ||
|
||
.ev-card-body { | ||
.modal-title { | ||
margin-bottom: 30px; | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...llengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.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,29 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { TermsAndConditionsModalComponent } from './terms-and-conditions-modal.component'; | ||
import { GlobalService } from '../../../../services/global.service'; | ||
import { FormsModule } from '@angular/forms'; | ||
|
||
describe('TermsAndConditionsModalComponent', () => { | ||
let component: TermsAndConditionsModalComponent; | ||
let fixture: ComponentFixture<TermsAndConditionsModalComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ FormsModule ], | ||
declarations: [ TermsAndConditionsModalComponent ], | ||
providers: [ GlobalService ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(TermsAndConditionsModalComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
94 changes: 94 additions & 0 deletions
94
...e/challengeparticipate/terms-and-conditions-modal/terms-and-conditions-modal.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,94 @@ | ||
import { Component, OnInit, Input } from '@angular/core'; | ||
import { GlobalService } from '../../../../services/global.service'; | ||
|
||
@Component({ | ||
selector: 'app-terms-and-conditions-modal', | ||
templateUrl: './terms-and-conditions-modal.component.html', | ||
styleUrls: ['./terms-and-conditions-modal.component.scss'] | ||
}) | ||
export class TermsAndConditionsModalComponent implements OnInit { | ||
|
||
/** | ||
* Input parameters object | ||
*/ | ||
@Input() params: any; | ||
|
||
/** | ||
* Modal title | ||
*/ | ||
title = 'Are you sure ?'; | ||
|
||
/** | ||
* Modal field label | ||
*/ | ||
label = ''; | ||
|
||
/** | ||
* Modal body | ||
*/ | ||
content = ''; | ||
|
||
/** | ||
* Modal accept button | ||
*/ | ||
confirm = 'Yes'; | ||
|
||
/** | ||
* Modal deny button | ||
*/ | ||
deny = 'Cancel'; | ||
|
||
/** | ||
* Is checked terms and conditions input | ||
*/ | ||
termsAndConditions: any; | ||
|
||
/** | ||
* Modal confirmed callback | ||
*/ | ||
confirmCallback = () => {}; | ||
|
||
/** | ||
* Modal denied callback | ||
*/ | ||
denyCallback = () => {}; | ||
|
||
constructor(private globalService: GlobalService) { } | ||
|
||
ngOnInit() { | ||
if (this.params) { | ||
if (this.params['title']) { | ||
this.title = this.params['title']; | ||
} | ||
if (this.params['label']) { | ||
this.label = this.params['label']; | ||
} | ||
if (this.params['content']) { | ||
this.content = this.params['content']; | ||
} | ||
if (this.params['confirm']) { | ||
this.confirm = this.params['confirm']; | ||
} | ||
if (this.params['deny']) { | ||
this.deny = this.params['deny']; | ||
} | ||
if (this.params['confirmCallback']) { | ||
this.confirmCallback = this.params['confirmCallback']; | ||
} | ||
if (this.params['denyCallback']) { | ||
this.denyCallback = this.params['denyCallback']; | ||
} | ||
} | ||
} | ||
|
||
confirmed() { | ||
this.globalService.hideTermsAndConditionsModal(); | ||
this.confirmCallback(); | ||
} | ||
|
||
denied() { | ||
this.globalService.hideTermsAndConditionsModal(); | ||
this.denyCallback(); | ||
} | ||
|
||
} |
107 changes: 82 additions & 25 deletions
107
src/app/components/publiclists/teamlist/teamlist.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
Oops, something went wrong.