send invite
This commit is contained in:
@@ -83,7 +83,7 @@
|
||||
<ion-row>
|
||||
<ion-col style="text-align: center;"> <ion-button shape="round" size="small" color="danger" (click)="cancelInvite()">Cancel</ion-button> </ion-col>
|
||||
<ion-col></ion-col>
|
||||
<ion-col style="text-align: center;"> <ion-button shape="round" size="small" color="primary" >Send Invite</ion-button></ion-col>
|
||||
<ion-col style="text-align: center;"> <ion-button shape="round" size="small" color="primary" (click)="sendInvite()">Send Invite</ion-button></ion-col>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
import {SessionDataProviderService} from "../../store/session-data-provider.service";
|
||||
|
||||
import {SocketToolsService} from "../../services/socket-tools.service";
|
||||
@Component({
|
||||
selector: 'app-family-connect',
|
||||
templateUrl: './family-connect.component.html',
|
||||
@@ -15,7 +15,8 @@ connectStart : number = 0;
|
||||
|
||||
constructor(
|
||||
public sessionDataProviderService: SessionDataProviderService,
|
||||
private wrenchService: WrenchService
|
||||
private wrenchService: WrenchService,
|
||||
public socketToolsService:SocketToolsService
|
||||
) {
|
||||
this.show_connect= true;
|
||||
this.show_invite = false;
|
||||
@@ -35,6 +36,10 @@ connectStart : number = 0;
|
||||
this.currentInvite = item;
|
||||
this.connectStart = 200;
|
||||
}
|
||||
|
||||
sendInvite(){
|
||||
this.socketToolsService.familyInvite(this.currentInvite);
|
||||
}
|
||||
cancelInvite(){
|
||||
this.connectStart = 0;
|
||||
}
|
||||
|
||||
@@ -18,28 +18,14 @@ export class SocketToolsService {
|
||||
private connectionSubject: Subject<boolean>;
|
||||
connected$: Observable<boolean>;
|
||||
setupSocket(authToken: string): void {
|
||||
|
||||
this.socket = io(environment.socketURL,{autoConnect: false ,reconnection: true});
|
||||
this.connected$ = this.monitorConnection();
|
||||
this.socket.connect();
|
||||
|
||||
//this.joinSocketRoom("full-markets-jobs")
|
||||
/*
|
||||
console.log("START JOIN DEFAULT ROOM ********* *** 001");
|
||||
this.joinSocketRoom("received_refreshmarket_jobs");
|
||||
console.log("END JOIN DEFAULT ROOM ********* *** 001");
|
||||
|
||||
|
||||
this.socket.on('receive_message', () => {
|
||||
console.log("app-taskactivities-refresh MOBILE *** 001");
|
||||
});
|
||||
|
||||
this.socket.on('received_refreshmarket_jobs', (data) => {
|
||||
console.log("received_refreshmarket_jobs MOBILE *** 002");
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
public familyInvite(item){
|
||||
|
||||
}
|
||||
public joinSocketRoom(socketRoom){
|
||||
this.socket.emit("join_room", socketRoom);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user