admin UX improvements
-- added active tasks to dashboard for easier management
This commit is contained in:
parent
73abed668d
commit
eaca2bebbc
15
css/main.css
15
css/main.css
@ -1057,9 +1057,9 @@ ul {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
height: 100%;
|
||||
width: 2px;
|
||||
width: 0.15rem;
|
||||
transform: translateX(-50%) scaleY(1);
|
||||
background-color: rgba(var(--text-color), 0.4);
|
||||
border-left: 0.15rem dotted rgba(var(--text-color), 0.4);
|
||||
}
|
||||
.task .right {
|
||||
margin-left: 1rem;
|
||||
@ -1098,6 +1098,17 @@ ul {
|
||||
background-color: #00c853 !important;
|
||||
}
|
||||
|
||||
.active-task {
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
border: solid 1px rgba(var(--text-color), 0.2);
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
}
|
||||
.active-task .assigned-intern {
|
||||
background-color: rgba(var(--text-color), 0.03);
|
||||
border: solid 1px rgba(var(--text-color), 0.2);
|
||||
}
|
||||
|
||||
.padding {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -1025,9 +1025,9 @@ ul {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
height: 100%;
|
||||
width: 2px;
|
||||
width: 0.15rem;
|
||||
transform: translateX(-50%) scaleY(1);
|
||||
background-color: rgba(var(--text-color), 0.4);
|
||||
border-left: 0.15rem dotted rgba(var(--text-color), 0.4);
|
||||
}
|
||||
}
|
||||
.right {
|
||||
@ -1067,6 +1067,16 @@ ul {
|
||||
.completed .left .line {
|
||||
background-color: #00c853 !important;
|
||||
}
|
||||
.active-task {
|
||||
border-radius: 0.5rem;
|
||||
padding: 1rem;
|
||||
border: solid 1px rgba(var(--text-color), 0.2);
|
||||
background-color: rgba(var(--foreground-color), 1);
|
||||
.assigned-intern {
|
||||
background-color: rgba(var(--text-color), 0.03);
|
||||
border: solid 1px rgba(var(--text-color), 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
.padding {
|
||||
padding: 1rem;
|
||||
|
||||
94
index.html
94
index.html
@ -1205,7 +1205,7 @@
|
||||
if (userType === 'intern')
|
||||
subPageId1 = 'my_tasks'
|
||||
else if (userType === 'admin')
|
||||
subPageId1 = 'projects'
|
||||
subPageId1 = 'active_tasks'
|
||||
else
|
||||
subPageId1 = 'all_tasks'
|
||||
}
|
||||
@ -1214,6 +1214,7 @@
|
||||
<sm-chips id="dashboard_view_selector" class="margin-right-auto" onchange=${handleDashboardViewChange}>
|
||||
${userType === 'intern' ? html`<sm-chip value="intern_view" ?selected=${subPageId1 === 'my_tasks'}>My tasks</sm-chip>` : ''}
|
||||
${userType !== 'admin' ? html`<sm-chip value="dashboard_tasks_wrapper" ?selected=${subPageId1 === 'all_tasks'}>All tasks</sm-chip>` : ''}
|
||||
${userType === 'admin' ? html`<sm-chip value="active_tasks_wrapper" ?selected=${subPageId1 === 'active_tasks'}>Active tasks</sm-chip>` : ''}
|
||||
<sm-chip value="projects_wrapper" ?selected=${subPageId1 === 'projects'}>Projects</sm-chip>
|
||||
${floGlobals.isMobileView ? html`<sm-chip value="intern_leaderboard_container">Leaderboard</sm-chip>` : ''}
|
||||
</sm-chips>
|
||||
@ -1223,6 +1224,7 @@
|
||||
</section>
|
||||
` : ''}
|
||||
${userType !== 'admin' ? html`<div id="dashboard_tasks_wrapper" class=${`flex flex-direction-column justify-content-center dashboard-view__item ${userType === 'intern' ? 'hidden' : ''}`}>${render.displayTasks(params?.category, params?.search)}</div>` : ''}
|
||||
${userType === 'admin' ? html`<div id="active_tasks_wrapper" class=${`flex flex-direction-column gap-0-5 justify-content-center dashboard-view__item`}>${render.activeTasks()}</div>` : ''}
|
||||
<div id="projects_wrapper" class="grid gap-2 align-items-start align-content-start dashboard-view__item hidden">${render.dashProjects()}</div>
|
||||
<div id="intern_leaderboard_container" class="dashboard-view__item hide-on-mobile">
|
||||
<div class="container-header">
|
||||
@ -1800,18 +1802,19 @@
|
||||
}
|
||||
const render = {
|
||||
displayTaskCard(projectCode, branch, task) {
|
||||
const { title, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const assignedInterns = RIBC.getAssignedInterns(projectCode, branch, task);
|
||||
const taskId = `${projectCode}_${branch}_${task}`;
|
||||
const { title, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(taskId)
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId);
|
||||
return html`
|
||||
<li class=${`display-task`}>
|
||||
<div class="flex align-center space-between">
|
||||
<a class="display-task__category" href=${`#/landing?category=${category}`} title=${`See all ${floGlobals.taskCategories[category]} tasks`}>${floGlobals.taskCategories[category]}</a>
|
||||
<a href=${`${location.hash.split('?')[0]}?taskId=${projectCode}_${branch}_${task}`} class="display-task__link button button--small button--colored">
|
||||
<a href=${`${location.hash.split('?')[0]}?taskId=${taskId}`} class="display-task__link button button--small button--colored">
|
||||
View details
|
||||
<svg class="icon" style="margin-right: -0.5rem" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"/></svg>
|
||||
</a>
|
||||
</div>
|
||||
<a href=${`${location.hash.split('?')[0]}?taskId=${projectCode}_${branch}_${task}`} class="display-task__link flex flex-direction-column gap-1">
|
||||
<a href=${`${location.hash.split('?')[0]}?taskId=${taskId}`} class="display-task__link flex flex-direction-column gap-1">
|
||||
<h4 class="display-task__title">${title}</h4>
|
||||
<div class="display-task__details flex flex-wrap gap-0-3">
|
||||
${duration ? html`
|
||||
@ -1847,7 +1850,7 @@
|
||||
const availableCategories = new Set();
|
||||
for (const taskId of displayedTasks) {
|
||||
const [projectCode, branch, task] = taskId.split('_')
|
||||
const assignedInterns = RIBC.getAssignedInterns(projectCode, branch, task);
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId);
|
||||
if (assignedInterns.length >= allTasks[taskId].maxSlots) continue;
|
||||
availableCategories.add(allTasks[taskId].category)
|
||||
if (userType && userType === 'intern' && floGlobals.myFloID && assignedInterns.includes(floGlobals.myFloID)) continue;
|
||||
@ -1902,7 +1905,8 @@
|
||||
return html.for(ref, projectCode)`<a class="project-card flex align-center interactive" title="Project information" href=${projectLink}>${projectName}</a>`
|
||||
},
|
||||
taskCard(task) {
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(appState.params.id, appState.params.branch, task)
|
||||
const taskId = `${appState.params.id}_${appState.params.branch}_${task}`;
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(taskId)
|
||||
const branches = getAllBranches(appState.params.id)
|
||||
const branchesButtons = filterMap(branches, (branch) => {
|
||||
const { branchName, parentBranch, startPoint, endPoint } = branch
|
||||
@ -1914,9 +1918,9 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
const assignedInterns = RIBC.getAssignedInterns(appState.params.id, appState.params.branch, task)
|
||||
const assignedInternsCards = assignedInterns.map(internFloId => render.assignedInternCard(internFloId, `${appState.params.id}_${appState.params.branch}_${task}`));
|
||||
const status = RIBC.getTaskStatus(appState.params.id, appState.params.branch, task)
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId)
|
||||
const assignedInternsCards = assignedInterns.map(internFloId => render.assignedInternCard(internFloId, taskId));
|
||||
const status = RIBC.getTaskStatus(taskId)
|
||||
const linkifyDescription = createElement('p', {
|
||||
innerHTML: DOMPurify.sanitize(linkify(description)),
|
||||
className: `timeline-task__description ws-pre-line wrap-around`
|
||||
@ -1959,6 +1963,23 @@
|
||||
</div>
|
||||
`;
|
||||
},
|
||||
activeTasks() {
|
||||
return Object.keys(RIBC.getAllTasks())
|
||||
.filter(task => RIBC.getTaskStatus(task) === 'incomplete')
|
||||
.map(task => render.activeTaskCard(task))
|
||||
},
|
||||
activeTaskCard(taskId) {
|
||||
const { title } = RIBC.getTaskDetails(taskId)
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId).map(internFloId => render.assignedInternCard(internFloId, taskId))
|
||||
return html`
|
||||
<div class="active-task grid align-center gap-0-5">
|
||||
<h4 class="active-task-card__title">${title}</h4>
|
||||
<div class="active-task-card__interns flex align-center gap-0-5">
|
||||
${assignedInterns.length ? assignedInterns : html`<p class="active-task-card__no-interns">No Interns Assigned</p>`}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
},
|
||||
internCard(internFloId, options = {}) {
|
||||
const { selectable } = options
|
||||
const internName = RIBC.getInternList()[internFloId]
|
||||
@ -2004,7 +2025,7 @@
|
||||
},
|
||||
internUpdateCard(update) {
|
||||
const { floID, time, note, update: { projectCode, branch, task, description, link }, tag } = update
|
||||
let topic = `${RIBC.getProjectDetails(projectCode).projectName} / ${RIBC.getTaskDetails(projectCode, branch, task).title}`
|
||||
let topic = `${RIBC.getProjectDetails(projectCode).projectName} / ${RIBC.getTaskDetails(`${projectCode}_${branch}_${task}`).title}`
|
||||
const internName = RIBC.getInternList()[floID]
|
||||
const updateMessage = createElement('p', {
|
||||
className: 'update__message ws-pre-line wrap-around',
|
||||
@ -2121,10 +2142,11 @@
|
||||
</div>`})
|
||||
},
|
||||
adminTask(task) {
|
||||
const assignedInterns = RIBC.getAssignedInterns(appState.params.id, appState.params.branch, task)
|
||||
const status = RIBC.getTaskStatus(appState.params.id, appState.params.branch, task)
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(appState.params.id, appState.params.branch, task)
|
||||
let assignedInternsCards = assignedInterns.map(internFloId => render.assignedInternCard(internFloId, `${appState.params.id}_${appState.params.branch}_${task}`, { showOptions: true }))
|
||||
const taskId = `${appState.params.id}_${appState.params.branch}_${task}`
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId)
|
||||
const status = RIBC.getTaskStatus(taskId)
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(taskId)
|
||||
let assignedInternsCards = assignedInterns.map(internFloId => render.assignedInternCard(internFloId, taskId, { showOptions: true }))
|
||||
const branches = getAllBranches(appState.params.id)
|
||||
const branchesButtons = filterMap(branches, (branch) => {
|
||||
const { branchName, parentBranch, startPoint, endPoint } = branch
|
||||
@ -2252,8 +2274,7 @@
|
||||
taskRequestCard(request) {
|
||||
const { details: { taskId, name, brief, contact, portfolioLink }, floID, vectorClock } = request
|
||||
const internName = RIBC.getInternList()[floID];
|
||||
const [projectCode, branch, task] = taskId.split('_');
|
||||
const { category } = RIBC.getTaskDetails(projectCode, branch, task);
|
||||
const { category } = RIBC.getTaskDetails(taskId);
|
||||
return html`
|
||||
<li class="request-card" .dataset=${{ vectorClock, type: 'task' }}>
|
||||
<div class="flex align-center space-between">
|
||||
@ -2262,7 +2283,7 @@
|
||||
</div>
|
||||
<p class="request-card__description">
|
||||
<b>${internName || name}</b> applied for
|
||||
<b>${RIBC.getTaskDetails(projectCode, branch, task).title}</b>
|
||||
<b>${RIBC.getTaskDetails(taskId).title}</b>
|
||||
</p>
|
||||
${!internName ? html`
|
||||
<div class="request-card__details grid gap-0-5 margin-top-1">
|
||||
@ -2301,7 +2322,7 @@
|
||||
},
|
||||
internTaskCard(taskId) {
|
||||
const [projectCode, branch, task] = taskId.split('_');
|
||||
const { title, description, duration, durationType } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const { title, description, duration, durationType } = RIBC.getTaskDetails(taskId)
|
||||
const projectName = RIBC.getProjectDetails(projectCode).projectName
|
||||
const { assignedTasks } = RIBC.getInternRecord(floGlobals.myFloID)
|
||||
const linkifyDescription = createElement('p', {
|
||||
@ -2455,7 +2476,7 @@
|
||||
const projectTasks = []
|
||||
RIBC.getProjectBranches(projectCode).forEach(branch => {
|
||||
projectMap[branch].slice(4).forEach((task) => {
|
||||
projectTasks.push(RIBC.getTaskStatus(projectCode, branch, task))
|
||||
projectTasks.push(RIBC.getTaskStatus(`${projectCode}_${branch}_${task}`))
|
||||
})
|
||||
})
|
||||
const completedTasks = projectTasks.filter(task => task === 'completed').length
|
||||
@ -2518,9 +2539,9 @@
|
||||
const requestCards = filterMap(RIBC.getTaskRequests().reverse(), (request) => {
|
||||
if (Array.isArray(request.details) || !request.details.taskId) return;
|
||||
const [projectCode, branch, task] = request.details.taskId.split('_')
|
||||
const taskDetails = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const taskDetails = RIBC.getTaskDetails(request.details.taskId)
|
||||
if (!taskDetails) return;
|
||||
requestCategories.add(RIBC.getTaskDetails(projectCode, branch, task).category)
|
||||
requestCategories.add(RIBC.getTaskDetails(request.details.taskId).category)
|
||||
requestProjects.add(projectCode)
|
||||
if (shouldFilterByCategory && taskDetails.category !== shouldFilterByCategory) return;
|
||||
if (shouldFilterByProject && projectCode !== shouldFilterByProject) return;
|
||||
@ -2548,7 +2569,7 @@
|
||||
if (Array.isArray(request.details) || !request.details.taskId) return
|
||||
const { details: { taskId }, status, vectorClock } = request;
|
||||
const [projectCode, branch, task] = taskId.split('_');
|
||||
if (!RIBC.getTaskDetails(projectCode, branch, task)) return
|
||||
if (!RIBC.getTaskDetails(taskId)) return
|
||||
const timestamp = parseInt(vectorClock.split('_')[0])
|
||||
let icon = ''
|
||||
if (status === 'Accepted') {
|
||||
@ -2562,7 +2583,7 @@
|
||||
<li class=${`status-card ${status?.toLowerCase() || 'pending'}`}>
|
||||
<time class="status-card__time capitalize">${getFormattedTime(timestamp, 'relative')}</time>
|
||||
<p class="status-card__details">
|
||||
You applied for <a href=${`${location.hash.split('?')[0]}?taskId=${taskId}`}>${RIBC.getTaskDetails(projectCode, branch, task).title}</a>
|
||||
You applied for <a href=${`${location.hash.split('?')[0]}?taskId=${taskId}`}>${RIBC.getTaskDetails(taskId).title}</a>
|
||||
</p>
|
||||
<div class="flex align-center status-card__status">
|
||||
${icon}
|
||||
@ -2584,8 +2605,7 @@
|
||||
const allTasks = RIBC.getAllTasks()
|
||||
const availableToDisplay = []
|
||||
for (const taskId in allTasks) {
|
||||
const [projectCode, branch, task] = taskId.split('_')
|
||||
if (displayedTasks.includes(taskId) || RIBC.getTaskStatus(projectCode, branch, task) === 'completed') continue;
|
||||
if (displayedTasks.includes(taskId) || RIBC.getTaskStatus(taskId) === 'completed') continue;
|
||||
availableToDisplay.push(render.draggableTask(taskId))
|
||||
}
|
||||
getRef('all_tasks').innerHTML = '';
|
||||
@ -2601,7 +2621,7 @@
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
|
||||
</div>
|
||||
<p class="displayable-task__project">${RIBC.getProjectDetails(projectCode).projectName}</p>
|
||||
<h4>${RIBC.getTaskDetails(projectCode, branch, task).title}</h4>
|
||||
<h4>${RIBC.getTaskDetails(taskId).title}</h4>
|
||||
</li>
|
||||
`;
|
||||
},
|
||||
@ -2684,7 +2704,7 @@
|
||||
}
|
||||
function getTaskDeadline(taskId, internId = floGlobals.myFloID) {
|
||||
const [projectCode, branch, task] = taskId.split('_');
|
||||
const { title, description, duration, durationType } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const { title, description, duration, durationType } = RIBC.getTaskDetails(taskId)
|
||||
const { assignedTasks } = RIBC.getInternRecord(internId)
|
||||
const assignedOn = assignedTasks[taskId].assignedOn || assignedTasks[taskId]
|
||||
const durationMilliseconds = durationType === 'days' ? duration * 24 * 60 * 60 * 1000 : duration * 60 * 60 * 1000
|
||||
@ -2706,8 +2726,8 @@
|
||||
|
||||
function showTaskDetails(taskId) {
|
||||
const [projectCode, branch, task] = taskId.split('_')
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const assignedInterns = RIBC.getAssignedInterns(projectCode, branch, task);
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(taskId)
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId);
|
||||
let hasApplied = false
|
||||
try {
|
||||
floDapps.user.id
|
||||
@ -2810,6 +2830,7 @@
|
||||
'dashboard_tasks_wrapper': 'all_tasks',
|
||||
'projects_wrapper': 'projects',
|
||||
'intern_leaderboard_container': 'leaderboard',
|
||||
'active_tasks_wrapper': 'active_tasks',
|
||||
}
|
||||
// find key of the object by value
|
||||
function getKeyByValue(object, value) {
|
||||
@ -2988,7 +3009,7 @@
|
||||
}
|
||||
function renderInternRatingUI() {
|
||||
const taskId = `${appState.params.id}_${appState.params.branch}_${currentTask.dataset.taskId}`;
|
||||
const assignedInterns = RIBC.getAssignedInterns(appState.params.id, appState.params.branch, currentTask.dataset.taskId);
|
||||
const assignedInterns = RIBC.getAssignedInterns(taskId);
|
||||
const completionPoints = 30;
|
||||
const taskScoreElems = assignedInterns.map((internId, index) => {
|
||||
const { completedTasks, failedTasks } = RIBC.getInternRecord(internId)
|
||||
@ -3099,7 +3120,7 @@
|
||||
maxSlots: parseInt(getRef('edit_task_max_slots').value),
|
||||
reward: parseInt(getRef('edit_task_reward').value)
|
||||
}
|
||||
const ogTaskDetails = RIBC.getTaskDetails(appState.params.id, appState.params.branch, currentTask.dataset.taskId)
|
||||
const ogTaskDetails = RIBC.getTaskDetails(`${appState.params.id}_${appState.params.branch}_${currentTask.dataset.taskId}`)
|
||||
const changedKeys = Object.keys(changedDetails).filter(key => ogTaskDetails[key] !== changedDetails[key])
|
||||
if (changedKeys.length) {
|
||||
RIBC.admin.editTaskDetails(changedDetails, appState.params.id, appState.params.branch, currentTask.dataset.taskId)
|
||||
@ -3330,7 +3351,7 @@
|
||||
}
|
||||
function openTaskEditingPopup(e) {
|
||||
const taskNo = e.target.closest('.admin-task').dataset.taskId
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(appState.params.id, appState.params.branch, taskNo)
|
||||
const { title, description, category, maxSlots, duration, durationType, reward } = RIBC.getTaskDetails(`${appState.params.id}_${appState.params.branch}_${taskNo}`)
|
||||
if (!getRef('edit_task_category').firstElementChild) {
|
||||
const categories = objMap(floGlobals.taskCategories, (categoryName, categoryID) => {
|
||||
return html`<sm-option value=${categoryID} ?selected=${category === categoryID}>${categoryName}</sm-option>`
|
||||
@ -3545,8 +3566,7 @@
|
||||
return notify('You have already completed this task', 'error');
|
||||
else if (failedTasks[taskId])
|
||||
return notify('You have already failed this task', 'error');
|
||||
const [projectCode, branch, task] = taskId.split('_')
|
||||
const { title } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||
const { title } = RIBC.getTaskDetails(taskId)
|
||||
getConfirmation(`Do you want to apply for "${title}"`, { confirmText: 'Apply' }).then((result) => {
|
||||
if (result) {
|
||||
if (btn) {
|
||||
@ -3679,7 +3699,7 @@
|
||||
currentTaskId = taskCard.dataset.uniqueId
|
||||
const [projectCode, branch, task] = currentTaskId.split('_')
|
||||
getRef('update_of_project').textContent = RIBC.getProjectDetails(projectCode).projectName
|
||||
getRef('update_of_task').textContent = RIBC.getTaskDetails(projectCode, branch, task).title
|
||||
getRef('update_of_task').textContent = RIBC.getTaskDetails(currentTaskId).title
|
||||
openPopup('post_update_popup')
|
||||
}
|
||||
|
||||
@ -3723,7 +3743,7 @@
|
||||
else
|
||||
arrayOfInterns = Object.keys(allInterns)
|
||||
if (availableInternsOnly) {
|
||||
arrayOfInterns = arrayOfInterns.filter(intern => !RIBC.getAssignedInterns(appState.params.id, appState.params.branch, currentTask.dataset.taskId)?.includes(intern))
|
||||
arrayOfInterns = arrayOfInterns.filter(intern => !RIBC.getAssignedInterns(`${appState.params.id}_${appState.params.branch}_${currentTask.dataset.taskId}`)?.includes(intern))
|
||||
}
|
||||
if (activeOnly) {
|
||||
arrayOfInterns = arrayOfInterns.filter(intern => {
|
||||
|
||||
@ -100,12 +100,12 @@
|
||||
Ribc.getProjectDetails = (project) => _.projectDetails[project];
|
||||
Ribc.getProjectMap = (project) => _.projectMap[project];
|
||||
Ribc.getProjectBranches = (project) => findAllBranches(project);
|
||||
Ribc.getTaskDetails = (project, branch, task) => _.projectTaskDetails[project + "_" + branch + "_" + task];
|
||||
Ribc.getTaskStatus = (project, branch, task) => _.projectTaskStatus[project + "_" + branch + "_" + task];
|
||||
Ribc.getTaskDetails = (taskId) => _.projectTaskDetails[taskId];
|
||||
Ribc.getTaskStatus = (taskId) => _.projectTaskStatus[taskId];
|
||||
Ribc.getInternList = () => _.internList;
|
||||
Ribc.getInternRating = (floID) => _.internRating[floID] || 0;
|
||||
Ribc.getInternRecord = (floID) => _.internRecord[floID] || {};
|
||||
Ribc.getAssignedInterns = (projectCode, branch, taskNumber) => _.internsAssigned[projectCode + "_" + branch + "_" + taskNumber] || [];
|
||||
Ribc.getAssignedInterns = (taskId) => _.internsAssigned[taskId] || [];
|
||||
Ribc.getAllTasks = () => _.projectTaskDetails
|
||||
Ribc.getDisplayedTasks = () => floGlobals.appObjects.RIBC.displayedTasks || [];
|
||||
|
||||
|
||||
2
scripts/ribc.min.js
vendored
2
scripts/ribc.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user