Bug fixes

This commit is contained in:
sairaj mote 2022-11-19 15:29:10 +05:30
parent f63ab27408
commit 4579b876b5

View File

@ -1170,7 +1170,7 @@
<div id="projects_wrapper" class="grid gap-2 align-items-start dashboard-view__item hidden">${render.dashProjects()}</div>
<div id="intern_leaderboard_container" class="container-card dashboard-view__item hide-on-mobile">
<div class="container-header">
<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"> <path fill="none" d="M0 0h24v24H0z" /> <path d="M12 7a8 8 0 1 1 0 16 8 8 0 0 1 0-16zm0 3.5l-1.323 2.68-2.957.43 2.14 2.085-.505 2.946L12 17.25l2.645 1.39-.505-2.945 2.14-2.086-2.957-.43L12 10.5zm1-8.501L18 2v3l-1.363 1.138A9.935 9.935 0 0 0 13 5.049L13 2zm-2 0v3.05a9.935 9.935 0 0 0-3.636 1.088L6 5V2l5-.001z" /> </svg>
<svg class="icon margin-right-0-5" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><rect fill="none" height="24" width="24"/><g><path d="M7.5,21H2V9h5.5V21z M14.75,3h-5.5v18h5.5V3z M22,11h-5.5v10H22V11z"/></g></svg>
<h4>Leaderboard</h4>
<a id="all_interns_btn" href="#/all_interns_page" class="button">All</a>
</div>
@ -1785,10 +1785,10 @@
const filtered = []
const availableCategories = new Set();
for (const taskId of displayedTasks) {
availableCategories.add(allTasks[taskId].category)
const [projectCode, branch, task] = taskId.split('_')
const assignedInterns = RIBC.getAssignedInterns(projectCode, branch, task);
if (getObjLength(assignedInterns) >= allTasks[taskId].maxSlots) continue;
availableCategories.add(allTasks[taskId].category)
if (userType && userType === 'intern' && floDapps.user.id && assignedInterns.hasOwnProperty(floDapps.user.id)) continue;
if (filterCategory && allTasks[taskId].category !== filterCategory) continue;
if (searchQuery && searchQuery !== '') {
@ -2404,7 +2404,7 @@
}
const filterTasks = debounce((e) => {
const searchQuery = getRef('task_search_input').value.trim();
const searchQuery = getRef('task_search_input')?.value.trim() || '';
const category = getRef('task_category_selector')?.value || 'all';
window.location.hash = `#/${appState.currentPage}?category=${category}${searchQuery !== '' ? `&search=${searchQuery}` : ''}`;
}, 100)