Skip to content

Commit

Permalink
fix problem send invitatio
Browse files Browse the repository at this point in the history
  • Loading branch information
j.gonzalez committed Oct 21, 2019
1 parent 34821bf commit 0cd07d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions js/views/app_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,19 @@
async openModalImport(typeUser){
const companyNumber = textsecure.storage.get('companyNumber', null);
const xml = await getXmlFile(companyNumber);
const InvitationList = await getClientAdminCompany(companyNumber);
console.log(InvitationList.admins, "55555555555555")
if(xml && InvitationList){
localStorage.setItem('InvitationList',JSON.stringify(InvitationList));
if(typeUser === 'admin'){
xml.InvitationList = InvitationList.admins
}
if(typeUser === 'kunde'){
xml.InvitationList = InvitationList.clients
}
xml.type = typeUser;
}
const dialog = new Whisper.ModalImport({contact_data: xml});
// const InvitationList = await getClientAdminCompany(companyNumber);
// console.log(InvitationList.admins, "55555555555555")
// if(xml && InvitationList){
// localStorage.setItem('InvitationList',JSON.stringify(InvitationList));
// if(typeUser === 'admin'){
// xml.InvitationList = InvitationList.admins
// }
// if(typeUser === 'kunde'){
// xml.InvitationList = InvitationList.clients
// }
// xml.type = typeUser;
// }
const dialog = new Whisper.ModalImport({contact_data: xml, type: typeUser});
dialog.$el.insertBefore(document.getElementsByClassName('network-status-container')[0]);
},
});
Expand Down
2 changes: 1 addition & 1 deletion js/views/import_contact_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,6 @@

initialize(options) {
if(options){
console.log(options.contact_data, options, "contactsssssssssssssssss")
if(options.contact_data !== undefined){

this.contactListXml = prepareDataXml(options.contact_data);
Expand All @@ -1430,6 +1429,7 @@
}
this.objectContact.push(tmpObj)
}
console.log(options, "optionsssssssssssssssssssssssssssssssssssssssssssssssssss")
this.type = options.type;
if ( options.type == 'kunde' ){
this.typeAdmin = true;
Expand Down

0 comments on commit 0cd07d1

Please sign in to comment.