The current user settings for the contact page has been attempted to be fixed, still have 1 issue with listing & the sidemenu

This commit is contained in:
Aqeeb Imtiaz Harun
2018-07-07 17:30:55 +08:00
parent 7d9e4a3c0f
commit b337af1b7c
+16 -4
View File
@@ -170,15 +170,27 @@
//console.log(entry.company_name);
if(entry.status === 0)
{
if(entry.is_me === 0){
f
if(entry.is_me === 0) //to display recieving requests
{
$('#sent-req').append('<a href="#" class="list-item" onclick="displaydetails(' + "'" + entry.sender_company_name + "'" + ',' + "'" + entry.sender_tel_no + "'" + ',' + "'" + entry.sender_contact_pers + "'" + ',' + "'" + entry.contact_id + "'" + ')"><i class="fa fa-user"></i> <em class="seperate-contact"></em> <span class="list-item-title-contact" style="color:#667f97">' + entry.sender_company_name + '</span> <br /> <span class="list-item-title-contact" style="margin-top:-23px; color:#069"> Request Pending </span> <span class="list-item-title-role" style="margin-top:-23px; color:#667f97">'+ entry.sender_contact_pers + '<br /> ' + entry.sender_tel_no+ '</span></a>')
}
$('#sent-req').append('<a href="#" class="list-item" onclick="displaydetails(' + "'" + entry.sender_company_name + "'" + ',' + "'" + entry.sender_tel_no + "'" + ',' + "'" + entry.sender_contact_pers + "'" + ',' + "'" + entry.contact_id + "'" + ')"><i class="fa fa-user"></i> <em class="seperate-contact"></em> <span class="list-item-title-contact" style="color:#667f97">' + entry.sender_company_name + '</span> <br /> <span class="list-item-title-contact" style="margin-top:-23px; color:#069"> Request sent </span> <span class="list-item-title-role" style="margin-top:-23px; color:#667f97">'+ entry.sender_contact_pers + '<br /> ' + entry.sender_tel_no+ '</span></a>')
else //to display sent requests
{
//sent requwsts code go here
}
//$('#sent-req').append('<a href="#" class="list-item" onclick="displaydetails(' + "'" + entry.sender_company_name + "'" + ',' + "'" + entry.sender_tel_no + "'" + ',' + "'" + entry.sender_contact_pers + "'" + ',' + "'" + entry.contact_id + "'" + ')"><i class="fa fa-user"></i> <em class="seperate-contact"></em> <span class="list-item-title-contact" style="color:#667f97">' + entry.sender_company_name + '</span> <br /> <span class="list-item-title-contact" style="margin-top:-23px; color:#069"> Request sent </span> <span class="list-item-title-role" style="margin-top:-23px; color:#667f97">'+ entry.sender_contact_pers + '<br /> ' + entry.sender_tel_no+ '</span></a>')
}
else
{
$('#sent-req').append('<a href="#" class="list-item" onclick="displayApproved(' + "'" + entry.sender_company_name + "'" + ',' + "'" + entry.sender_tel_no + "'" + ',' + "'" + entry.sender_contact_pers + "'" + ',' + "'" + entry.contact_id + "'" + ')"><i class="fa fa-user"></i> <em class="seperate-contact"></em> <span class="list-item-title-contact" style="color:#667f97">' + entry.sender_company_name + '</span> <br /> <span class="list-item-title-contact" style="margin-top:-23px; color:#069"> Friend </span> <span class="list-item-title-role" style="margin-top:-23px; color:#667f97">'+ entry.sender_contact_pers + '<br /> ' + entry.sender_tel_no+ '</span></a>')
if (entry.is_me === 0) //friends where the requests were sent to the current user
{
$('#sent-req').append('<a href="#" class="list-item" onclick="displayApproved(' + "'" + entry.sender_company_name + "'" + ',' + "'" + entry.sender_tel_no + "'" + ',' + "'" + entry.sender_contact_pers + "'" + ',' + "'" + entry.contact_id + "'" + ')"><i class="fa fa-user"></i> <em class="seperate-contact"></em> <span class="list-item-title-contact" style="color:#667f97">' + entry.sender_company_name + '</span> <br /> <span class="list-item-title-contact" style="margin-top:-23px; color:#069"> Friend </span> <span class="list-item-title-role" style="margin-top:-23px; color:#667f97">'+ entry.sender_contact_pers + '<br /> ' + entry.sender_tel_no+ '</span></a>')
}
else{
//friends which the current user has added should be here
}
}
});