@@ -1175,9 +1141,9 @@
if (!params) {
params = { category: 'all' }
}
- const categories = [html`
All`];
+ const categories = [html`
All`];
for (const categoryID in floGlobals.taskCategories) {
- categories.push(html`
${floGlobals.taskCategories[categoryID]}`)
+ categories.push(html`
${floGlobals.taskCategories[categoryID]}`)
}
renderElem(getRef('task_category_selector'), html`${categories}`)
render.displayTasks(params.category)
@@ -1237,6 +1203,48 @@
getRef('generated_private_key').value = privKey
break;
case 'dashboard_page':
+ renderElem(getRef('dashboard_page'), html`
+
+ ${typeOfUser === 'intern' ? html`My tasks` : ''}
+ ${typeOfUser !== 'admin' ? html`All tasks` : ''}
+ Projects
+ Leaderboard
+
+
+
+ Pinned
+
+
+
There are no pinned projects
+
+ You can pin projects for easier monitoring by clicking on the 'pin' icon on project card.
+
+
+
+
+
+
+
+
+
+
+
There are no interns
+
+
+ `)
render.dashProjects(getRef('pinned_projects'), pinnedProjects);
// displays recent projects
const unpinnedProjects = RIBC.getProjectList().filter(project => !pinnedProjects.includes(project)).reverse()
@@ -1246,6 +1254,15 @@
getRef('project_list_container').classList.add('hidden')
}
render.dashProjects(getRef('project_list'), unpinnedProjects)
+ delegate(getRef('top_interns'), 'click', '.intern-card', e => {
+ showInternInfo(e.delegateTarget.dataset.internFloId)
+ })
+ //creates cards for highest performing interns
+ //sort interns earned points
+ const highPerformingInterns = Object.keys(RIBC.getInternList()).sort((a, b) => {
+ return RIBC.getInternRating(b) - RIBC.getInternRating(a)
+ });
+ renderElem(getRef('top_interns'), html`${highPerformingInterns.slice(0, 8).map(floId => render.internCard(floId))}`);
break;
case 'updates_page': {
if (!getRef('updates_page__project_selector').children.length) {
@@ -1324,6 +1341,7 @@
switch (appState.lastPage) {
case 'task_details':
case 'project_explorer':
+ case 'all_interns_page':
routingAnimation.in = slideInRight;
routingAnimation.out = slideOutRight;
break;
@@ -1331,6 +1349,7 @@
switch (pageId) {
case 'task_details':
case 'project_explorer':
+ case 'all_interns_page':
routingAnimation.in = slideInLeft;
routingAnimation.out = slideOutLeft;
break;
@@ -1748,7 +1767,9 @@
return html`
@@ -1757,7 +1778,29 @@
${applyButton}
${assignedInternsCards.length ? html`
${assignedInternsCards}
` : ''}
- ${linkifyDescription}
+
+ Task details
+ ${linkifyDescription}
+
+
+ ${duration ? html`
+
+ Duration:
+ ${duration} ${durationType}
+
+ `: ''}
+ ${maxSlots ? html`
+
+ Slots:
+ ${maxSlots}
+
+ `: ''}
+ ${reward ? html`
+
+ Reward:
+ ₹${reward}
+
+ `: ''}
${branchesButtons.length ? html`
${branchesButtons}
` : ''}
@@ -1960,7 +2003,10 @@
${projectName}
${title}
- ${linkifyDescription}
+
+ View description
+ ${linkifyDescription}
+