-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sms template and sms component(wip) changes
- Loading branch information
Diamond Khanna (Digital)
authored and
Diamond Khanna (Digital)
committed
Jul 9, 2018
1 parent
c9c64c9
commit 08ba79a
Showing
13 changed files
with
246 additions
and
26 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
Empty file.
34 changes: 34 additions & 0 deletions
34
src/app/common-sms-dialog/common-sms-dialog.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,34 @@ | ||
<div class="successHeaderDiv"> | ||
<h4 class="popupHeader">Success</h4> | ||
</div> | ||
<div class="col-xs-12 col-sm-12"> | ||
<div class="row"> | ||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> | ||
<h4>{{data.statement}}:{{data.generatedID}}</h4> | ||
</div> | ||
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> | ||
<md-checkbox color="primary" name="altNum" [(ngModel)]="altNum"> | ||
Alternate Number | ||
</md-checkbox> | ||
<div *ngIf="altNum"> | ||
<md-input-container myMobileNumber> | ||
<input mdInput autocomplete="off" minlength="10" maxlength="10" (keyup)="mobileNum(mobileNumber)" placeholder="Mobile Number" | ||
required name="mobileNumber" [(ngModel)]="mobileNumber" #phnNum="ngModel"> | ||
<md-hint *ngIf=" phnNum.errors && ( phnNum.touched)" class="errorText"> | ||
<span> | ||
Enter 10 digit mobile number | ||
</span> | ||
</md-hint> | ||
</md-input-container> | ||
</div> | ||
</div> | ||
|
||
<div class="col-xs-12 col-sm-12"> | ||
<button md-raised-button color="primary" class="pull-right font-regular m-t-8" (click)="dialogReff.close('close')">Close</button> | ||
<button md-raised-button color="accent" [disabled]="altNum && !validNumber" class="pull-right font-regular m-t-8 m-r-5" | ||
(click)="dialogReff.close(mobileNumber)">Send SMS | ||
</button> | ||
</div> | ||
</div> | ||
|
||
</div> |
25 changes: 25 additions & 0 deletions
25
src/app/common-sms-dialog/common-sms-dialog.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 { CommonSmsDialogComponent } from './common-sms-dialog.component'; | ||
|
||
describe('CommonSmsDialogComponent', () => { | ||
let component: CommonSmsDialogComponent; | ||
let fixture: ComponentFixture<CommonSmsDialogComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ CommonSmsDialogComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(CommonSmsDialogComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should be created', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,33 @@ | ||
import { Component, OnInit, Inject } from '@angular/core'; | ||
import { MdDialog, MdDialogRef } from '@angular/material'; | ||
import { MD_DIALOG_DATA } from '@angular/material'; | ||
import { dataService } from '../services/dataService/data.service'; | ||
|
||
@Component({ | ||
selector: 'app-common-sms-dialog', | ||
templateUrl: './common-sms-dialog.component.html', | ||
styleUrls: ['./common-sms-dialog.component.css'] | ||
}) | ||
export class CommonSmsDialogComponent implements OnInit { | ||
|
||
altNum = false; | ||
mobileNumber: any; | ||
validNumber = false; | ||
|
||
constructor( @Inject(MD_DIALOG_DATA) public data: any, | ||
public dialog: MdDialog, | ||
public dialogReff: MdDialogRef<CommonSmsDialogComponent>, | ||
public getCommonData: dataService) { } | ||
|
||
ngOnInit() { | ||
} | ||
|
||
mobileNum(value) { | ||
if (value.length == 10) { | ||
this.validNumber = true; | ||
} else { | ||
this.validNumber = false; | ||
} | ||
} | ||
|
||
} |
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
Oops, something went wrong.