- `,
+ templateUrl: './app.component.html',
})
+
export class AppComponent {
constructor(
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index d9d768ca..cc6beaea 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -5,12 +5,12 @@ import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
-import { ChatComponent } from './chat.component';
-import { LoginComponent } from './login.component';
-import { ProfileComponent } from './profile.component';
-import { SettingsComponent } from './settings.component';
-import { DirectoryComponent } from './directory.component';
-import { buyPRNComponent } from './buyPRN.component';
+import { ChatComponent } from './chat/chat.component';
+import { LoginComponent } from './login/login.component';
+import { ProfileComponent } from './profile/profile.component';
+import { SettingsComponent } from './settings/settings.component';
+import { DirectoryComponent } from './directory/directory.component';
+import { buyPRNComponent } from './buyPRN/buyPRN.component';
import { LinkyModule } from 'angular-linky';
import { PipeModule } from './pipes.module';
diff --git a/src/app/buyPRN.component.ts b/src/app/buyPRN.component.ts
deleted file mode 100644
index e8e39c23..00000000
--- a/src/app/buyPRN.component.ts
+++ /dev/null
@@ -1,363 +0,0 @@
-import {
- AfterViewInit,
- ChangeDetectorRef,
- ElementRef,
- Inject,
- OnDestroy,
- ViewChild,
-} from "@angular/core";
-import { Component, NgZone } from "@angular/core";
-import { HttpClient } from "@angular/common/http";
-import { Observable } from "rxjs";
-import { map } from "rxjs/operators";
-import { Router } from "@angular/router";
-import { UserInterfaceService } from "./userInterface.service";
-import {
- AngularFirestore,
- AngularFirestoreCollection,
-} from "@angular/fire/compat/firestore";
-import { AngularFireAuth } from "@angular/fire/compat/auth";
-import firebase from "firebase/compat/app";
-import { environment } from "environments/environment.prod";
-import { AgChartOptions } from 'ag-charts-community';
-
-@Component({
- selector: "buyPRN",
- template: `
-
-
-
-
-
-
-
-
-
- PRN tokens represent ownership of the PERRINN network.
-
- {{UI.PERRINNAdminLastMessageObj?.statistics?.emailsContributorsAuth?.length}} members own {{UI.formatSharesToPRNCurrency(currencySelected,UI.PERRINNAdminLastMessageObj?.statistics?.wallet?.shareBalance)}}.
-
- You can follow the impact of your investment live on PERRINN.com
-
PRN holders directory
-
-
- Your PRN amount grows at a rate of {{UI.appSettingsCosts?.interestRateYear | percent : "0.0"}} a year
-
-
-
- encrypted
-
- Your tokens are stored in your wallet on PERRINN.com
-
- Soon you will be able to sell or exchange your tokens with other members here.
-
-
-
-
-
-
-
- The capital raised from token sales goes towards
-
- You will pay {{UI.formatSharesToCurrency(currencySelected,creditList[creditSelected]*UI.appSettingsPayment.currencyList[currencySelected].toCOIN)}} and recieve {{UI.formatSharesToPRNCurrency(currencySelected,creditList[creditSelected]*UI.appSettingsPayment.currencyList[currencySelected].toCOIN)}}.
-
+ PRN tokens represent ownership of the PERRINN team.
+
+ {{UI.PERRINNAdminLastMessageObj?.statistics?.emailsContributorsAuth?.length}} members own {{UI.formatSharesToPRNCurrency(currencySelected,UI.PERRINNAdminLastMessageObj?.statistics?.wallet?.balance)}}.
+
+ You can follow the impact of your investment live on PERRINN.com
+
PRN holders directory
+
+
+ Your PRN amount grows at a rate of {{UI.appSettingsCosts?.interestRateYear | percent : "0.0"}} a year
+
+
+
+ encrypted
+
+ Your tokens are stored in your wallet on PERRINN.com
+
+ Soon you will be able to sell or exchange your tokens with other members here.
+
+
+
+
+
+
+
+ The capital raised from token sales goes towards
+
+ You will pay {{UI.formatSharesToCurrency(currencySelected,creditList[creditSelected]*UI.appSettingsPayment.currencyList[currencySelected].toCOIN)}} and recieve {{UI.formatSharesToPRNCurrency(currencySelected,creditList[creditSelected]*UI.appSettingsPayment.currencyList[currencySelected].toCOIN)}}.
+
{{UI.formatSharesToCurrency(null,message.payload?.statistics?.stripeBalance?.available[0]?.amount/100*UI.appSettingsPayment.currencyList["gbp"].toCOIN)}} available in the PERRINN fund
{{UI.formatSharesToCurrency(null,message.payload?.statistics?.stripeBalance?.available[0]?.amount/100*UI.appSettingsPayment.currencyList["gbp"].toCOIN)}} available in the PERRINN fund
- {{UI.PERRINNAdminLastMessageObj?.statistics?.emailsContributorsAuth?.length}} members own {{UI.formatSharesToPRNCurrency(null,UI.PERRINNAdminLastMessageObj?.statistics?.wallet?.shareBalance)}}.
-
+ {{UI.PERRINNAdminLastMessageObj?.statistics?.emailsContributorsAuth?.length}} members own {{UI.formatSharesToPRNCurrency(null,UI.PERRINNAdminLastMessageObj?.statistics?.wallet?.balance)}}.
+
+
+
+
+
+
+
+
+
+
{{message.values?.name}}
+ link
+ {{message.values?.userPresentation}}
+ Level {{message.values?.contract?.levelTimeAdjusted|number:'1.1-1'}}.
+
\ No newline at end of file
diff --git a/src/app/directory/directory.component.ts b/src/app/directory/directory.component.ts
new file mode 100644
index 00000000..f4f4688c
--- /dev/null
+++ b/src/app/directory/directory.component.ts
@@ -0,0 +1,45 @@
+import { Component } from '@angular/core';
+import { Observable } from 'rxjs';
+import { map } from 'rxjs/operators';
+import { Router } from '@angular/router';
+import { UserInterfaceService } from './../userInterface.service';
+import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/compat/firestore';
+import { AngularFireAuth } from '@angular/fire/compat/auth'
+import firebase from 'firebase/compat/app';
+
+@Component({
+ selector:'directory',
+ templateUrl:'./directory.component.html',
+})
+
+export class DirectoryComponent {
+
+ messages:Observable;
+
+ constructor(
+ public afAuth:AngularFireAuth,
+ public afs:AngularFirestore,
+ public router:Router,
+ public UI:UserInterfaceService
+ ){}
+
+ ngOnInit() {
+ this.refreshMembersList()
+ }
+
+ refreshMembersList() {
+ this.messages = this.afs.collection('PERRINNMessages', ref => ref
+ .where('userChain.nextMessage','==','none')
+ .where('verified','==',true)
+ .where('wallet.balance','>',0)
+ .orderBy('wallet.balance',"desc")
+ .limit(200))
+ .snapshotChanges().pipe(map(changes => {
+ return changes.map(c => ({
+ key:c.payload.doc.id,
+ values:c.payload.doc.data(),
+ }));
+ }));
+ }
+
+}
diff --git a/src/app/login/login.component.html b/src/app/login/login.component.html
new file mode 100644
index 00000000..c82ef2cd
--- /dev/null
+++ b/src/app/login/login.component.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/login.component.ts b/src/app/login/login.component.ts
similarity index 67%
rename from src/app/login.component.ts
rename to src/app/login/login.component.ts
index aaae95b4..209ad01f 100644
--- a/src/app/login.component.ts
+++ b/src/app/login/login.component.ts
@@ -2,37 +2,12 @@ import { Component } from '@angular/core';
import { Router } from '@angular/router';
import firebase from 'firebase/compat/app';
import { AngularFireAuth } from '@angular/fire/compat/auth';
-import { UserInterfaceService } from './userInterface.service';
+import { UserInterfaceService } from './../userInterface.service';
import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/compat/firestore';
@Component({
selector:'login',
- template:`
-
-
-
-
-
-
-
- `,
+ templateUrl:'./login.component.html',
})
export class LoginComponent {
diff --git a/src/app/profile.component.ts b/src/app/profile/profile.component.html
similarity index 65%
rename from src/app/profile.component.ts
rename to src/app/profile/profile.component.html
index b54fa61f..2bf7d030 100644
--- a/src/app/profile.component.ts
+++ b/src/app/profile/profile.component.html
@@ -1,521 +1,225 @@
-import { Component } from '@angular/core'
-import { AngularFirestore, AngularFirestoreCollection } from '@angular/fire/compat/firestore'
-import { Observable } from 'rxjs'
-import { map } from 'rxjs/operators'
-import { Router, ActivatedRoute } from '@angular/router'
-import { UserInterfaceService } from './userInterface.service'
-import { AngularFireAuth } from '@angular/fire/compat/auth'
-import firebase from 'firebase/compat/app'
-
-@Component({
- selector:'profile',
- template:`
-
-
-
-
-
-
-
-
-
-
-
-
- {{focusUserLastMessageObj?.name}}
- {{UI.formatSharesToPRNCurrency(null,focusUserLastMessageObj?.wallet?.shareBalance||0)}}
- link
-
- {{focusUserLastMessageObj?.userPresentation}}
- Level {{focusUserLastMessageObj?.contract?.levelTimeAdjusted|number:'1.1-1'}}
- Waiting for contract signature (Level {{focusUserLastMessageObj?.contract?.level|number:'1.1-1'}})
-
Sign contract
-
-
settings
-
-
Created {{focusUserLastMessageObj?.createdTimestamp|date:'MMMM yyyy'}}, {{focusUserLastMessageObj?.userChain?.index}} Messages, Verified {{((UI.nowSeconds-focusUserLastMessageObj?.verifiedTimestamp?.seconds)/3600/24)|number:'1.2-2'}} days ago
+ {{focusUserLastMessageObj?.name}}
+ {{UI.formatSharesToPRNCurrency(null,focusUserLastMessageObj?.wallet?.balance||0)}}
+ link
+
+ {{focusUserLastMessageObj?.userPresentation}}
+ Level {{focusUserLastMessageObj?.contract?.levelTimeAdjusted|number:'1.1-1'}}
+ Waiting for contract signature (Level {{focusUserLastMessageObj?.contract?.level|number:'1.1-1'}})
+
Sign contract
+
+
settings
+
+
Created {{focusUserLastMessageObj?.createdTimestamp|date:'MMMM yyyy'}}, {{focusUserLastMessageObj?.userChain?.index}} Messages, Verified {{((UI.nowSeconds-focusUserLastMessageObj?.verifiedTimestamp?.seconds)/3600/24)|number:'1.2-2'}} days ago
Your short presentation helps other members get to know you.
-
I am someone who is:
-
-
Update my presentation
-
-
Your public link
-
Add view only public link so other members can view your documents, website, code and more.
-
-
Update my link
-
-
Your email address
-
Authentication address.
-
-
Update my email address
-
-
Your PERRINN contract
-
This contract is between you and PERRINN team. When these settings are updated, they will need to be approved before taking effect. You or PERRINN can cancel this contract at any time.
-
Level [1-10] defines the level of experience / capacity to resolve problems independently. Level 1 is university student with no experience, 10 is expert (10+ years experience in the field). After signature your level will increase automatically with time at a rate of +1 per year.
-
-
No contract registered.
-
Contract number {{UI.currentUserLastMessageObj?.contract?.createdTimestamp}}
-
Signature valid for level {{UI.currentUserLastMessageObj?.contract?.levelTimeAdjusted|number:'1.1-1'}}, you will receive {{UI.formatSharesToPRNCurrency(null,UI.appSettingsContract.hourlyRateLevel1*UI.currentUserLastMessageObj?.contract?.levelTimeAdjusted)}} per hour when you declare working hours.
Your short presentation helps other members get to know you.
+
I am someone who is:
+
+
Update my presentation
+
+
Your public link
+
Add view only public link so other members can view your documents, website, code and more.
+
+
Update my link
+
+
Your email address
+
Authentication address.
+
+
Update my email address
+
+
Your PERRINN contract
+
This contract is between you and PERRINN team. When these settings are updated, they will need to be approved before taking effect. You or PERRINN can cancel this contract at any time.
+
Level [1-10] defines the level of experience / capacity to resolve problems independently. Level 1 is university student with no experience, 10 is expert (10+ years experience in the field). After signature your level will increase automatically with time at a rate of +1 per year.
+
+
No contract registered.
+
Contract number {{UI.currentUserLastMessageObj?.contract?.createdTimestamp}}
+
Signature valid for level {{UI.currentUserLastMessageObj?.contract?.levelTimeAdjusted|number:'1.1-1'}}, you will receive {{UI.formatSharesToPRNCurrency(null,UI.appSettingsContract.hourlyRateLevel1*UI.currentUserLastMessageObj?.contract?.levelTimeAdjusted)}} per hour when you declare working hours.