Created
February 26, 2019 22:58
-
-
Save zazapeta/772cfdd8d14cef630e0f0659f9c2caa4 to your computer and use it in GitHub Desktop.
OMG !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getAllOffres() { | |
var partner = { | |
user_taskaction_partner_online: new Array(), | |
user_taskaction_partner_company: this.service.service_company, | |
user_taskaction_partner_xpto: new Array(), | |
} | |
for (let partenerindex in partner.user_taskaction_partner_company) { | |
partner.user_taskaction_partner_company[partenerindex].PRD_TITLE = partner.user_taskaction_partner_company[partenerindex].CMP_NAME; | |
partner.user_taskaction_partner_company[partenerindex].PRD_ICON = partner.user_taskaction_partner_company[partenerindex].CMP_LOGO | |
partner.user_taskaction_partner_company[partenerindex].PRD_DESCRIPTION = partner.user_taskaction_partner_company[partenerindex].CMP_DESCRIPTION | |
partner.user_taskaction_partner_company[partenerindex].THE_GUID = "" | |
partner.user_taskaction_partner_company[partenerindex].partner_contact = []; | |
if (partner.user_taskaction_partner_company[partenerindex].SMC_TYPE == "COMPANY") { | |
partner.user_taskaction_partner_company[partenerindex].PRD_SUBTITLE = partner.user_taskaction_partner_company[partenerindex].CMP_TITLE; | |
} | |
else { | |
partner.user_taskaction_partner_company[partenerindex].PRD_SUBTITLE = partner.user_taskaction_partner_company[partenerindex].SMC_DESCRIPTION; | |
} | |
for (let contact in partner.user_taskaction_partner_company[partenerindex].service_company_user) { | |
var user = { | |
PAC_FIRSTNAME: partner.user_taskaction_partner_company[partenerindex].service_company_user[contact].USR_FIRSTNAME, | |
PAC_LASTNAME: partner.user_taskaction_partner_company[partenerindex].service_company_user[contact].USR_LASTNAME, | |
PAC_PHONE: partner.user_taskaction_partner_company[partenerindex].service_company_user[contact].USR_PHONE, | |
PAC_EMAIL: partner.user_taskaction_partner_company[partenerindex].service_company_user[contact].USR_EMAIL | |
} | |
partner.user_taskaction_partner_company[partenerindex].partner_contact.push(user) | |
} | |
} | |
return partner | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment