<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= business.fullName %></title>
<%- include('./partials/csslinks') %>
</head>
<body>
<%- include('./partials/header') %>
<section class="dashboard-main-section">
<div class="container">
<div class="dashboard-main-setting profile-info mx-auto">
<div class="profile-history">
<div class="profile-person-history">
<img src="<%= business.profilePic ? business.profilePic : '/assets/img/business-icon.jpg' %>" alt="">
<div class="px-3">
<h6><%= business.fullName ? business.fullName : 'Company Name Here' %></h6>
<span><%= business.subHeading ? business.subHeading : 'Enter Sub Heading' %></span>
</div>
</div>
<div class="d-flex align-items-center flex-wrap justify-content-center">
<a href="/edit/profile" class="dash-btn"> <i class="bi bi-pencil-square text-white px-1"></i> Edit</a>
<a class="chat-btn" href="/chat"><i class="bi bi-chat"></i></a>
<div class="dropdown-wrapper">
<% const unreadNotificationCount = business.notifications.filter(notification => !notification.isRead).length; %>
<button type="button" class="dropdown-toggler logout-btn">
<i class="bi bi-bell"></i>
<% if(unreadNotificationCount > 0) { %>
<span class="count"><%= unreadNotificationCount %></span>
<% } %>
</button>
<div class="dropdown">
<% if(business.notifications?.length > 0) { %>
<ul>
<% business.notifications.forEach((notification)=>{ %>
<li>
<a href="<%= notification.url %>">
<span class="icon"><i class="bi bi-check-circle"></i></span>
<span class="text"><%= notification.message %></span>
</a>
</li>
<% }) %>
</ul>
<% } else { %>
<p>No Notifications Found!</p>
<% } %>
</div>
</div>
</div>
</div>
<div class="row justify-content-between my-4">
<div class="col-lg-4 col-12">
<div class="history-btn-design">
<a href="/business-dashboard" class="dash-btn">
Dashboard</a>
<!-- <button type="button" class="dash-btn">
Show History</button> -->
</div>
</div>
</div>
<h5 class="fw-bold text-center fw-head">Business Portfolio</h5>
<div class="profile-banner">
<div class="banner-cover">
<img class="img-fluid" src="<%= business.coverPhoto ? business.coverPhoto : '/assets/img/cover.png' %>" alt="">
</div>
<div class="banner-info">
<div class="profile-person-history large-img">
<img src="<%= business.profilePic ? business.profilePic : '/assets/img/business-icon.jpg' %>" alt="">
<div class="px-3 pb-2">
<h5><%= business.fullName ? business.fullName : 'Company Name Here' %><span> (<%= business.industry ? business.industry : 'Industry Here' %>)</span></h5>
<span><%= business['subHeading'] ? business['subHeading'] : 'Enter Sub Heading' %></span>
</div>
</div>
<span class="profile-badge"><%= business.businessYears ? business.businessYears : '0' %>+ Years in Business</span>
</div>
</div>
<ul class="other-info">
<!-- <li>@edwardjj53</li> -->
<% if (business.industry) { %>
<li>Industry: <%= business.industry %></li>
<% } %>
<% if (business.companySize) { %>
<li>Company Size: <%= business.companySize %></li>
<% } %>
<% if (business.foundedDate) { %>
<li>Founded on: <%= new Date(business.foundedDate).toLocaleDateString('en-US', { year: 'numeric', month: 'long', day: 'numeric' }) %></li>
<% } %>
<!-- If no information is provided, show a default message -->
<% if (!business.industry && !business.companySize && !business.foundedDate) { %>
<li>No company information provided</li>
<% } %>
</ul>
<div class="additional-info">
<div class="row g-0">
<div class="col-lg-8 col-12 panel">
<div class="info-item-l h-100">
<h6 class="fw-bold">About</h6>
<% if(business.about){ %>
<p><%= business.about %></p>
<% } else { %>
<p class="text-muted">No About...</p>
<% } %>
<% if(business.profileVideo){ %>
<div class="profile-video">
<!-- <a href="javascript:;">
<i class="bi bi-play-fill"></i>
</a> -->
<!-- <img src="/assets/img/video-poster.png"> -->
<video controls>
<source src="<%= business.profileVideo %>">
</video>
</div>
<% } %>
</div>
</div>
<div class="col-lg-4 col-12 panel">
<div class="info-item-r h-100">
<h6 class="fw-bold">Contact Info</h6>
<ul class="contact-links">
<% if(business.primaryEmail?.email){ %>
<li>
<span>Email Address</span>
<a href="mailto:<%= business.primaryEmail?.email %>"><%= business.primaryEmail?.email %></a>
</li>
<% } %>
<% if(business.phone){ %>
<li>
<span>Phone #</span>
<a href="tel:<%= business.phone %>"><%= business.phone %></a>
</li>
<% } %>
<% if(business.portfolio){ %>
<li>
<span>Portfolio</span>
<a href="<%= business.portfolio %>" target="_blank"><%= business.portfolio %></a>
</li>
<% } %>
</ul>
<div class="position-details">
<!-- <span>UI/UX</span>
<span>Branding</span>
<span>Logo</span> -->
<!-- <span>skills</span> -->
</div>
<img class="img-fluid mt-3" src="/assets/img/social.png" alt="">
<div class="follow-more">
<% if(business.socialLinks?.length > 0) { %>
<h6>Follow To Know More About Me!
</h6>
<ul>
<% business.socialLinks?.forEach((item) => { %>
<li>
<a href="<%= item.baseUrl %><%= item.username %>" target="_blank">
<img src="/assets/img/social-icons/<%= item.platform %>.png" alt="">
</a>
</li>
<% }) %>
</ul>
<% } %>
</div>
</div>
</div>
</div>
</div>
<div class="portfolio-showcase">
<ul class="user-academic">
<li>
<div class="item-head">
<h6 class="fw-bold">Why work with us?</h6>
</div>
<P><%= business.workWithUs %></P>
</li>
<li class="photos-wrap">
<div class="item-head">
<h6 class="fw-bold">Photos</h6>
</div>
<!-- Check if there are any images in the businessImages array -->
<% if(business.businessImages?.length > 0) { %>
<div class="row g-4">
<% business.businessImages.forEach((item) => { %>
<div class="col-lg-4 col-12">
<!-- Display each uploaded image -->
<a href="<%= item %>" class="business-image d-block">
<img class="w-100" src="<%= item %>" alt="Business Image">
</a>
</div>
<% }) %>
</div>
<% } else { %>
<!-- If no images are uploaded, show a message or an empty state -->
<p>No photos uploaded yet.</p>
<% } %>
</li>
<li>
<div class="item-head">
<h6 class="fw-bold mb-3">Positions</h6>
</div>
<% if(jobs.length > 0) { %>
<div class="row">
<% jobs.forEach((item) => { %>
<div class="col-lg-4 col-md-6 col-12">
<div class="job-card">
<h5><a href="/jobdetails/<%= item._id %>"><%= item.title %></a></h5>
<ul>
<li><%= item.jobType %></li>
<li><%= item.position %></li>
<li><%= item.industry %></li>
</ul>
<p><%= item.summary %></p>
<p><%= item.additionalInfo %></p>
<a href="/jobdetails/<%= item._id %>">View More</a>
</div>
</div>
<% }) %>
</div>
<% } %>
</li>
</ul>
</div>
</div>
</div>
</section>
<%- include('./partials/query') %>
<%- include('./partials/footer') %>
<%- include('./partials/scriptlinks') %>
<script>
$(".show-all-btn").click(function() {
$(this).parent().find('.listing .hidden').removeClass('hidden')
$(this).remove()
debugger
})
</script>
</body>
</html>