-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update fixed all the deletion backend issues and the contacts page po…
…pover issue
- Loading branch information
1 parent
47e5afa
commit 7011934
Showing
16 changed files
with
775 additions
and
48 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<ion-content> | ||
<ion-card> | ||
<ion-card-title>{{type}}</ion-card-title> | ||
<ion-list *ngIf="!none"> | ||
<ion-item-sliding *ngFor="let account of socialAccounts"> | ||
<ion-item> | ||
<ion-label>{{account.user}}</ion-label> | ||
</ion-item> | ||
<ion-item-options side="end"> | ||
<ion-item-option color="danger" (click)="deleteAccount(account)"> | ||
<ion-icon color="dark" style="font-size: 150%;" name="trash"></ion-icon> | ||
</ion-item-option> | ||
</ion-item-options> | ||
</ion-item-sliding> | ||
</ion-list> | ||
</ion-card> | ||
</ion-content> |
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,7 @@ | ||
ion-content { | ||
padding: 0px; | ||
} | ||
ion-card { | ||
padding: 0px; | ||
text-align: center; | ||
} |
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,27 @@ | ||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { PopoverOtherPage } from './popover-other.page'; | ||
|
||
describe('PopoverOtherPage', () => { | ||
let component: PopoverOtherPage; | ||
let fixture: ComponentFixture<PopoverOtherPage>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ PopoverOtherPage ], | ||
schemas: [CUSTOM_ELEMENTS_SCHEMA], | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(PopoverOtherPage); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
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,52 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Router } from '@angular/router' | ||
import * as backend from '../backendClasses'; | ||
import { FirebaseBackendService } from '../firebase-backend.service'; | ||
import * as firebase from 'firebase'; | ||
import { NavParams } from '@ionic/angular'; | ||
|
||
@Component({ | ||
selector: 'app-popover-other', | ||
templateUrl: './popover-other.page.html', | ||
styleUrls: ['./popover-other.page.scss'], | ||
}) | ||
export class PopoverOtherPage implements OnInit { | ||
private firebase: FirebaseBackendService; | ||
private type: string; | ||
private username: string; | ||
private socialAccounts: backend.socialAccount[]; | ||
private none: boolean; | ||
constructor(private router: Router, private navParam: NavParams) { | ||
this.none = false; | ||
firebase.auth().onAuthStateChanged(firebaseUser => { | ||
if(!firebaseUser) | ||
{ | ||
this.router.navigate(['login']); | ||
} | ||
else | ||
{ | ||
this.firebase = new FirebaseBackendService(firebase.auth().currentUser.uid); | ||
this.type = this.navParam.get('type'); | ||
this.username = this.navParam.get('username'); | ||
this.firebase.getSocialAccountsTypeContact(this.type, this.username).then(socialsArr => { | ||
this.socialAccounts = socialsArr; | ||
if(this.socialAccounts.length == 1 | ||
&& this.socialAccounts[0].getId == "N/A" | ||
&& this.socialAccounts[0].getUrl == "N/A" | ||
&& this.socialAccounts[0].getUser == "N/A") { | ||
this.socialAccounts = []; | ||
this.none = true; | ||
} | ||
console.log(socialsArr); | ||
}); | ||
} | ||
}); | ||
} | ||
|
||
ngOnInit() { | ||
} | ||
|
||
goToHome() { | ||
this.router.navigate(['home']); | ||
} | ||
} |
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