contacts
This commit is contained in:
@@ -4,13 +4,16 @@ import { Plugin} from "@capacitor/core";
|
||||
//const { Contacts } = Plugins;
|
||||
|
||||
import { isPlatform } from "@ionic/angular";
|
||||
import {SessionDataProviderService} from "./session-data-provider.service";
|
||||
import {WrenchService} from "../services/wrench.service";
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ContactsDataService {
|
||||
|
||||
constructor() { }
|
||||
constructor(public sessionDataProviderService:SessionDataProviderService,
|
||||
private wrenchService: WrenchService) { }
|
||||
|
||||
|
||||
async refeshContacts(){
|
||||
@@ -28,6 +31,40 @@ export class ContactsDataService {
|
||||
emails: true
|
||||
}}).then( result=>{
|
||||
console.log(result);
|
||||
this.cacheContactsForAccount(result);
|
||||
});
|
||||
}
|
||||
|
||||
usrData: {
|
||||
action:number,
|
||||
member_id: number,
|
||||
uid: string,
|
||||
sessionid: string,
|
||||
raw_contacts : string
|
||||
};
|
||||
pPesult:any;
|
||||
async cacheContactsForAccount(contactResult){
|
||||
this.usrData = {action:22010,
|
||||
member_id: this.sessionDataProviderService.member_id,
|
||||
uid: this.sessionDataProviderService.member_uid,
|
||||
sessionid: this.sessionDataProviderService.session ,
|
||||
raw_contacts: contactResult.toString()}
|
||||
|
||||
this.wrenchService.processUsersContacts(this.usrData).subscribe(
|
||||
pPesult => {
|
||||
this.pPesult = pPesult;
|
||||
console.log("pPesult RETURN->", this.pPesult);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
suggestionTotal:number = 0;
|
||||
familyPendingTotalData:any;
|
||||
familyPendingData: [];
|
||||
|
||||
|
||||
// async getFamilyPeningData(){
|
||||
//
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user