socket channel
This commit is contained in:
@@ -59,39 +59,58 @@
|
||||
<!-- </ion-card>-->
|
||||
</div>
|
||||
|
||||
<div *ngIf="connectStart== 100" style="background-color: aliceblue; border-radius: 10px; padding: 10px; height: 200px;">
|
||||
<div>
|
||||
<ion-label>
|
||||
<ion-icon name="arrow-back-circle-outline" (click)="cancelInvite()" size="large" style="font-size: 22px; margin: 5px 5px 0px 0px; color: red;"></ion-icon>
|
||||
<span style="font-size: 18px; font-weight: bolder; color: darkblue;">Select to Invite</span></ion-label>
|
||||
</div>
|
||||
<ion-list [inset]="true" style="padding: 0px; margin: 0px 0px 10px 0px;">
|
||||
<div *ngIf="connectStart== 100" style="background-color: aliceblue; border-radius: 10px; padding: 10px; ">
|
||||
|
||||
<ion-list>
|
||||
<ion-list-header>
|
||||
|
||||
|
||||
<ion-button size="medium" (click)="cancelInvite()" > Return </ion-button>
|
||||
<!-- <ion-icon name="arrow-back-circle-outline" (click)="cancelInvite()" ></ion-icon>-->
|
||||
<ion-label>Select to Invite</ion-label>
|
||||
</ion-list-header>
|
||||
<ion-item [button]="true" detail="false" *ngFor="let item of familyData; let i = index" (click)="startInvite(item)">
|
||||
<!-- <div class="unread-indicator-wrapper" slot="start">-->
|
||||
<!-- <div class="unread-indicator">ss</div>-->
|
||||
<!-- </div>-->
|
||||
<ion-item *ngFor="let item of familyData; let i = index" (click)="startInvite(item)" style="background-color: transparent;">
|
||||
<ion-avatar aria-hidden="true" slot="start">
|
||||
<img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
|
||||
</ion-avatar>
|
||||
<ion-label>
|
||||
<strong style="font-size: 14px;">{{ item.firstname }} {{ item.lastname }}</strong>
|
||||
<!-- <ion-text>Never Gonna Give You Up</ion-text>-->
|
||||
<br />
|
||||
<ion-note color="medium" class="ion-text-wrap" style="font-size: 10px;">
|
||||
Last seen : {{ item.last_login | date }}
|
||||
</ion-note>
|
||||
</ion-label>
|
||||
<ion-label>{{ item.firstname }} {{ item.lastname }}</ion-label>
|
||||
<div class="metadata-end-wrapper" slot="end">
|
||||
<!-- <ion-note color="medium">06:11</ion-note>-->
|
||||
<ion-icon color="medium" name="chevron-forward"></ion-icon>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<!-- <div>-->
|
||||
<!-- <ion-label>-->
|
||||
<!-- <ion-icon name="arrow-back-circle-outline" (click)="cancelInvite()" size="large" style="font-size: 22px; margin: 5px 5px 0px 0px; color: red;"></ion-icon>-->
|
||||
<!-- <span style="font-size: 18px; font-weight: bolder; color: darkblue;">Select to Invite</span></ion-label>-->
|
||||
<!-- </div>-->
|
||||
<!-- -->
|
||||
<!-- <ion-list [inset]="true" style="padding: 0px; margin: 0px 0px 10px 0px;">-->
|
||||
<!-- <ion-list-header>-->
|
||||
|
||||
|
||||
<!-- </ion-list-header>-->
|
||||
<!-- <ion-item [button]="true" detail="false" *ngFor="let item of familyData; let i = index" (click)="startInvite(item)">-->
|
||||
<!--<!– <div class="unread-indicator-wrapper" slot="start">–>-->
|
||||
<!--<!– <div class="unread-indicator">ss</div>–>-->
|
||||
<!--<!– </div>–>-->
|
||||
<!-- <ion-avatar aria-hidden="true" slot="start">-->
|
||||
<!-- <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />-->
|
||||
<!-- </ion-avatar>-->
|
||||
<!-- <ion-label>-->
|
||||
<!-- <strong style="font-size: 14px;">{{ item.firstname }} {{ item.lastname }}</strong>-->
|
||||
<!--<!– <ion-text>Never Gonna Give You Up</ion-text>–>-->
|
||||
<!-- <br />-->
|
||||
<!-- <ion-note color="medium" class="ion-text-wrap" style="font-size: 10px;">-->
|
||||
<!-- Last seen : {{ item.last_login | date }}-->
|
||||
<!-- </ion-note>-->
|
||||
<!-- </ion-label>-->
|
||||
<!-- <div class="metadata-end-wrapper" slot="end">-->
|
||||
<!--<!– <ion-note color="medium">06:11</ion-note>–>-->
|
||||
<!-- <ion-icon color="medium" name="chevron-forward"></ion-icon>-->
|
||||
<!-- </div>-->
|
||||
<!-- </ion-item>-->
|
||||
<!-- </ion-list>-->
|
||||
|
||||
<!-- <ion-list>-->
|
||||
<!-- <ion-item *ngFor="let item of items; let index">-->
|
||||
<!-- <ion-avatar slot="start">-->
|
||||
|
||||
@@ -57,14 +57,18 @@ export class FamilyloginPage implements OnInit {
|
||||
}
|
||||
|
||||
childJoinRoom:string = '';
|
||||
privateFamilyChannel:string = '';
|
||||
async joinLoginSockets(){
|
||||
this.childJoinRoom = "FAMILY-" + this.sessionDataProviderService.parent_uid;
|
||||
// debugger;
|
||||
//this.childJoinRoom = "FAMILY-" + this.sessionDataProviderService.parent_uid;
|
||||
this.childJoinRoom = this.sessionDataProviderService.getFamilyRoom();
|
||||
this.privateFamilyChannel = this.sessionDataProviderService.getFamilyPrivateChannel();
|
||||
|
||||
this.socketToolsService.stop();
|
||||
setTimeout(()=>{
|
||||
this.socketToolsService.setupSocket("NO-NEED-SEND");
|
||||
this.socketToolsService.joinSocketRoom("full-markets-jobs" );
|
||||
this.socketToolsService.joinSocketRoom(this.childJoinRoom)
|
||||
this.socketToolsService.joinSocketRoom(this.childJoinRoom);
|
||||
this.socketToolsService.joinSocketRoom(this.privateFamilyChannel);
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,12 +3,13 @@ import { io, Socket } from 'socket.io-client';
|
||||
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { MarketDataService } from '../store/market-data.service'
|
||||
import {SessionDataProviderService} from "../store/session-data-provider.service";
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SocketToolsService {
|
||||
|
||||
constructor(public marketDataService: MarketDataService ) {
|
||||
constructor(public marketDataService: MarketDataService , public sessionDataProviderService:SessionDataProviderService) {
|
||||
// this.setup('NO-NEED-FOR-NOW');
|
||||
}
|
||||
private socket: Socket;
|
||||
@@ -24,7 +25,9 @@ export class SocketToolsService {
|
||||
}
|
||||
|
||||
public familyInvite(item){
|
||||
|
||||
console.log(item);
|
||||
let Vv = this.sessionDataProviderService.getFamilyRoom()+"-"+item.uid;
|
||||
this.emmitSocketEvent("send_message",item, Vv);
|
||||
}
|
||||
public joinSocketRoom(socketRoom){
|
||||
this.socket.emit("join_room", socketRoom);
|
||||
|
||||
@@ -144,6 +144,14 @@ export class SessionDataProviderService {
|
||||
return arrY;
|
||||
}
|
||||
|
||||
getFamilyRoom(){
|
||||
return "FAMILY-" + this.parent_uid;
|
||||
}
|
||||
|
||||
getFamilyPrivateChannel(){
|
||||
return this.getFamilyRoom()+"-"+this.family_uid;
|
||||
}
|
||||
|
||||
RefreshGlobalSessionData(loginResult: any){
|
||||
this.account_type = loginResult.account_type;
|
||||
this.firstname = loginResult.firstname;
|
||||
|
||||
Reference in New Issue
Block a user