start pages styles
This commit is contained in:
@@ -3,98 +3,53 @@
|
||||
<ion-button size="small" shape="round" (click)="addStart()">Invite</ion-button>
|
||||
</div>
|
||||
<div *ngIf="isModalOpenBackdrop==true">
|
||||
<div style="background-color: aliceblue; border-radius: 10px; padding: 10px; margin-top: 10px;">
|
||||
<ion-item lines="none">
|
||||
<div class="head-title">Invite a Family</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Firstname"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='firstname' ></ion-input>
|
||||
</ion-item>
|
||||
<div style="background-color: aliceblue; border-radius: 10px; padding: 10px 10px 20px 10px; margin-top: 10px;">
|
||||
<div style=" padding: 5px 5px 10px 5px; background-color: #3dc2ff">
|
||||
<ion-item lines="none">
|
||||
<div class="head-title">Invite a Family</div>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Firstname"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='firstname' ></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Lastname"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='lastname' ></ion-input>
|
||||
</ion-item>
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="15"
|
||||
placeholder="Lastname"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='lastname' ></ion-input>
|
||||
</ion-item>
|
||||
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="55"
|
||||
placeholder="Email"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='email' ></ion-input>
|
||||
</ion-item>
|
||||
<!-- <ion-item lines="none">-->
|
||||
<!-- <ion-label>Birthday(Year/Month)</ion-label>-->
|
||||
<!-- </ion-item>-->
|
||||
<ion-item lines="none">
|
||||
<ion-input type="text"
|
||||
maxlength="55"
|
||||
placeholder="Email"
|
||||
class="input-item"
|
||||
(ionChange)="verifyEntry()"
|
||||
[(ngModel)]='email' ></ion-input>
|
||||
</ion-item>
|
||||
<ion-item>
|
||||
|
||||
<!-- <ion-item lines="none">-->
|
||||
<ion-select
|
||||
(ionChange)="verifyEntry()"
|
||||
class="input-item"
|
||||
style="width: 100%;"
|
||||
label="Select Type"
|
||||
placeholder="Select Type"
|
||||
[(ngModel)]='family_type'>
|
||||
<ion-select-option *ngFor="let item of familyTypeData"
|
||||
value="{{item.id}}">{{item.ty}}</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- <ion-grid>-->
|
||||
<!-- <ion-row style="margin: 0px; padding: 0px;">-->
|
||||
<!-- <ion-col style="margin: 0px; padding: 4px;">-->
|
||||
<!-- <div style="width: 100%; background-color: #8b198e;">-->
|
||||
<!-- <div style="width: 30%; float: left;">-->
|
||||
|
||||
<!-- Year-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div style="width: 70%; float: right;">-->
|
||||
|
||||
<!-- <ion-select aria-label="Year"-->
|
||||
<!-- (ionChange)="verifyEntry()"-->
|
||||
<!-- [(ngModel)]='year'-->
|
||||
<!-- style="background-color: aliceblue; border-radius: 10px; font-size: 12px; width:100%;">-->
|
||||
<!-- <ion-select-option *ngFor="let item1 of regYear" value="{{item1}}">{{item1}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
<!-- <ion-row style="margin: 0px; padding: 0px;">-->
|
||||
<!-- <ion-col style="margin: 0px; padding: 4px; ">-->
|
||||
<!-- <div style="width: 100%; background-color: #8b198e;">-->
|
||||
<!-- <div style="width: 30%; float: left;">-->
|
||||
<!-- Month-->
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- <div style="width: 70%; float: right;">-->
|
||||
<!-- <ion-select aria-label="Month"-->
|
||||
<!-- (ionChange)="verifyEntry()"-->
|
||||
<!-- [(ngModel)]='month'-->
|
||||
<!-- expand="block"-->
|
||||
<!-- style="background-color: aliceblue; border-radius: 10px; width: 100%; font-size: 12px;">-->
|
||||
<!-- <ion-select-option *ngFor="let item of regMonth;" value="{{item[0]}}">{{item[1]}}</ion-select-option>-->
|
||||
<!-- </ion-select>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </div>-->
|
||||
|
||||
<!-- </ion-col>-->
|
||||
<!-- </ion-row>-->
|
||||
|
||||
|
||||
<!-- </ion-grid>-->
|
||||
|
||||
|
||||
<!-- </ion-item>-->
|
||||
<ion-grid>
|
||||
<ion-grid style="margin-top: 10px;">
|
||||
<ion-row>
|
||||
<ion-col style="text-align: left">
|
||||
<ion-button (click)="setCloseModal()" size="small" shape="round" color="danger">
|
||||
|
||||
@@ -16,18 +16,19 @@ export class AddRelativesComponent implements OnInit {
|
||||
@ViewChild('firstname') firstname;
|
||||
@ViewChild('lastname') lastname;
|
||||
@ViewChild('email') email;
|
||||
@ViewChild('family_type') family_type;
|
||||
// @ViewChild('year') year;
|
||||
|
||||
@ViewChild('month') month;
|
||||
@ViewChild('year') year;
|
||||
addFamilyResult:string='';
|
||||
|
||||
familyTypeData:any;
|
||||
|
||||
constructor(
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService,
|
||||
private loadingCtrl: LoadingController,
|
||||
private commonfuncService: CommonfuncService
|
||||
) { }
|
||||
) {
|
||||
this.familyTypeData= this.sessionDataProviderService.family_types;
|
||||
}
|
||||
|
||||
regMonth:any;
|
||||
regYear:any;
|
||||
@@ -55,7 +56,10 @@ export class AddRelativesComponent implements OnInit {
|
||||
isDisabled:boolean= true;
|
||||
verifyEntry(){
|
||||
this.isDisabled= true;
|
||||
if ( this.firstname.length> 1 && this.lastname.length> 1 && this.commonfuncService.validateEmail(this.email)== true ){
|
||||
if ( this.firstname.length> 1
|
||||
&& this.lastname.length> 1
|
||||
&& this.family_type.length > 2
|
||||
&& this.commonfuncService.validateEmail(this.email)== true ){
|
||||
this.isDisabled= false;
|
||||
}
|
||||
}
|
||||
@@ -77,9 +81,11 @@ export class AddRelativesComponent implements OnInit {
|
||||
firstname:string,
|
||||
lastname: string,
|
||||
email: number,
|
||||
family_type: string
|
||||
};
|
||||
|
||||
createFamilyResult:any;
|
||||
addFamilyResult:any;
|
||||
addFamilyResultText:string='';
|
||||
|
||||
async inviteFamily(){
|
||||
const loading = await this.loadingCtrl.create({
|
||||
@@ -95,20 +101,21 @@ export class AddRelativesComponent implements OnInit {
|
||||
firstname: this.firstname,
|
||||
lastname: this.lastname,
|
||||
email: this.email,
|
||||
family_type: this.family_type
|
||||
}
|
||||
loading.present();
|
||||
this.wrenchService.familyInvite(this.reqData).subscribe(
|
||||
createFamilyResult => {
|
||||
addFamilyResult => {
|
||||
loading.dismiss();
|
||||
this.createFamilyResult = createFamilyResult;
|
||||
console.log("this.wrenchService.createFamilyResult RETURN DATA->", this.createFamilyResult);
|
||||
if (this.createFamilyResult.internal_return> 0){
|
||||
this.addFamilyResult = addFamilyResult;
|
||||
console.log("this.wrenchService.createFamilyResult RETURN DATA->", this.addFamilyResult);
|
||||
if (this.addFamilyResult.internal_return> 0){
|
||||
this.firstname='';
|
||||
this.lastname='';
|
||||
this.email='';
|
||||
this.createFamilyResult = "Invite Sent.";
|
||||
this.addFamilyResultText = "Invite Sent.";
|
||||
setTimeout(()=>{
|
||||
this.createFamilyResult="";
|
||||
this.addFamilyResultText="";
|
||||
this.setCloseModal();
|
||||
},3000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user