Skip to content

Latest commit

 

History

History
54 lines (47 loc) · 1.72 KB

README.md

File metadata and controls

54 lines (47 loc) · 1.72 KB

NurtureLife

most important attributes to display of a user 1.User ID

  1. Name
  2. Email
  3. status
  4. contact_no
  5. role
<script> //TODO: consider currently logged-in user's postal code and display notifications accordingly //var volunteer_zip = user->getZip()?>//; //var local_user_data = getUsersByZip(volunteer_zip)?>//; // var postData = $post_model->getPosts(); function displayPosts() { var postBox = document.getElementById('myBox'); postBox.innerHTML = ''; for (var i = 0; i < postData.length; i++) { var post = postData[i]; var newPost = document.createElement('div'); newPost.className = 'post'; newPost.innerHTML = `
${post.userName} - ${post.roleName}
${post.description}
${post.created_at} ${post.updated_at}
${post.status}
Attend
`; postBox.appendChild(newPost); } } // Call the function to display the posts displayPosts(); </script>