UI bug fixes
This commit is contained in:
parent
18a477fbcd
commit
7da461307e
16
index.html
16
index.html
@ -417,7 +417,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap align-items-start">
|
<div class="flex flex-wrap align-items-start">
|
||||||
<p id="editing_panel__description" data-editable></p>
|
<p id="editing_panel__description" class="ws-pre-line" data-editable></p>
|
||||||
<button class="button button--small button--transparent admin-option"
|
<button class="button button--small button--transparent admin-option"
|
||||||
title="Edit this description"
|
title="Edit this description"
|
||||||
onclick="makeEditable(this.previousElementSibling)">
|
onclick="makeEditable(this.previousElementSibling)">
|
||||||
@ -563,7 +563,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<h2 id="project_explorer__project_title"></h2>
|
<h2 id="project_explorer__project_title"></h2>
|
||||||
</header>
|
</header>
|
||||||
<p id="project_explorer__project_description"></p>
|
<p id="project_explorer__project_description" class="ws-pre-line"></p>
|
||||||
<a href="" id="project_explorer__project_updates"
|
<a href="" id="project_explorer__project_updates"
|
||||||
class="button button--small margin-right-auto">Check
|
class="button button--small margin-right-auto">Check
|
||||||
related updates</a>
|
related updates</a>
|
||||||
@ -1087,11 +1087,7 @@
|
|||||||
case 'time-only':
|
case 'time-only':
|
||||||
return finalHours;
|
return finalHours;
|
||||||
case 'relative':
|
case 'relative':
|
||||||
// check if timestamp is older than a day
|
return relativeTime.from(timestamp)
|
||||||
if (Date.now() - new Date(timestamp) < 60 * 60 * 24 * 1000)
|
|
||||||
return `${finalHours}`;
|
|
||||||
else
|
|
||||||
return relativeTime.from(timestamp)
|
|
||||||
default:
|
default:
|
||||||
return `${month} ${date}, ${year} at ${finalHours}`;
|
return `${month} ${date}, ${year} at ${finalHours}`;
|
||||||
}
|
}
|
||||||
@ -1923,7 +1919,7 @@
|
|||||||
`;
|
`;
|
||||||
},
|
},
|
||||||
internTaskCard(uniqueId) {
|
internTaskCard(uniqueId) {
|
||||||
const { projectCode, branch, task } = RIBC.getAllTasks()[uniqueId]
|
const [projectCode, branch, task] = uniqueId.split('_');
|
||||||
const { title, description } = RIBC.getTaskDetails(projectCode, branch, task)
|
const { title, description } = RIBC.getTaskDetails(projectCode, branch, task)
|
||||||
const projectName = RIBC.getProjectDetails(projectCode).projectName
|
const projectName = RIBC.getProjectDetails(projectCode).projectName
|
||||||
return html`
|
return html`
|
||||||
@ -1950,7 +1946,7 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
const completedTasks = projectTasks.filter(task => task === 'completed').length
|
const completedTasks = projectTasks.filter(task => task === 'completed').length
|
||||||
let completePercent = parseFloat(((completedTasks / projectTasks.length) * 100).toFixed(2))
|
let completePercent = parseFloat(((completedTasks / (projectTasks.length || 1)) * 100).toFixed(2))
|
||||||
const isPinned = pinnedProjects.includes(projectCode);
|
const isPinned = pinnedProjects.includes(projectCode);
|
||||||
let pinIcon = ''
|
let pinIcon = ''
|
||||||
if (isPinned) {
|
if (isPinned) {
|
||||||
@ -2713,7 +2709,7 @@
|
|||||||
|
|
||||||
// Render assigned task cards
|
// Render assigned task cards
|
||||||
if (floGlobals.assignedTasks.size) {
|
if (floGlobals.assignedTasks.size) {
|
||||||
const taskCards = floGlobals.assignedTasks.map(id => render.internTaskCard(task))
|
const taskCards = filterMap(floGlobals.assignedTasks, id => render.internTaskCard(id))
|
||||||
renderElem(getRef('assigned_task_list'), html`${taskCards}`)
|
renderElem(getRef('assigned_task_list'), html`${taskCards}`)
|
||||||
} else {
|
} else {
|
||||||
getRef('assigned_task_list').textContent = 'No task assigned yet.';
|
getRef('assigned_task_list').textContent = 'No task assigned yet.';
|
||||||
|
|||||||
@ -184,12 +184,12 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
//filter only requests for logged in intern
|
//filter only requests for logged in intern
|
||||||
try {
|
// try {
|
||||||
if (floDapps.user.id)
|
// if (floDapps.user.id)
|
||||||
taskRequests = taskRequests.filter(data => data.floID === floDapps.user.id)
|
// taskRequests = taskRequests.filter(data => data.floID === floDapps.user.id)
|
||||||
} catch (err) {
|
// } catch (err) {
|
||||||
return [];
|
// return [];
|
||||||
}
|
// }
|
||||||
//filter processed requests
|
//filter processed requests
|
||||||
if (ignoreProcessed)
|
if (ignoreProcessed)
|
||||||
taskRequests = taskRequests.filter(data => !data.status)
|
taskRequests = taskRequests.filter(data => !data.status)
|
||||||
@ -208,7 +208,7 @@
|
|||||||
status = "Accepted";
|
status = "Accepted";
|
||||||
else
|
else
|
||||||
status = "Rejected";
|
status = "Rejected";
|
||||||
floCloudAPI.noteApplicationData(vectorClock, status).then(_ => null).catch(e => console.error(e))
|
// floCloudAPI.noteApplicationData(vectorClock, status).then(_ => null).catch(e => console.error(e))
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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