Refactoring and layout update
-- added separate page for all intern updates -- removed notification panel
This commit is contained in:
parent
3b7c020ad7
commit
708d6889a5
@ -30,7 +30,7 @@ smButton.innerHTML = `
|
||||
color: var(--accent-color);
|
||||
}
|
||||
:host([variant='no-outline']) .button{
|
||||
background: rgba(var(--background-color), 1);
|
||||
background: inherit;
|
||||
color: var(--accent-color);
|
||||
}
|
||||
:host([disabled]){
|
||||
|
||||
167
css/main.css
167
css/main.css
@ -351,8 +351,8 @@ ul {
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
padding: 0.5rem 1.5rem;
|
||||
background: rgba(var(--background-color), 1);
|
||||
padding: 1rem 1.5rem;
|
||||
background: var(--foreground-color);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@ -361,6 +361,7 @@ ul {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.nav-list__item {
|
||||
@ -368,6 +369,8 @@ ul {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0.5rem 0;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
@ -392,7 +395,7 @@ ul {
|
||||
.container-card {
|
||||
position: relative;
|
||||
background: var(--foreground-color);
|
||||
border-radius: 0.4rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.solid-background {
|
||||
@ -509,7 +512,6 @@ a {
|
||||
gap: 1rem;
|
||||
display: grid;
|
||||
position: relative;
|
||||
margin: 1rem;
|
||||
animation: fadein 0.4s ease;
|
||||
}
|
||||
|
||||
@ -542,7 +544,7 @@ a {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#dashboard {
|
||||
#dashboard_page {
|
||||
padding-bottom: 5rem;
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
@ -574,8 +576,6 @@ a {
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@ -616,8 +616,9 @@ a {
|
||||
|
||||
.project-card {
|
||||
padding: 1rem;
|
||||
text-transform: capitalize;
|
||||
font-weight: 500;
|
||||
line-height: 1.5;
|
||||
text-transform: capitalize;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
|
||||
@ -726,31 +727,26 @@ a {
|
||||
}
|
||||
|
||||
#intern_updates .container-header {
|
||||
padding-right: 0;
|
||||
padding: 0 1rem;
|
||||
border-bottom: 1px solid rgba(var(--text-color), 0.1);
|
||||
}
|
||||
|
||||
#intern_updates .container-header button {
|
||||
padding: 1rem 0;
|
||||
border-bottom: 0.2rem solid transparent;
|
||||
border-radius: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#intern_updates .container-header button:first-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
#intern_updates .container-header button:last-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
#intern_updates .container-header .active {
|
||||
color: rgba(var(--text-color), 1);
|
||||
border-bottom: 0.2rem solid var(--accent-color);
|
||||
}
|
||||
|
||||
#update_container,
|
||||
#requests_container {
|
||||
display: flex;
|
||||
max-height: 80vh;
|
||||
@ -763,10 +759,16 @@ a {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.update {
|
||||
#updates_page {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.intern-update {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
|
||||
.update__topic {
|
||||
@ -796,7 +798,7 @@ a {
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
padding: 0 1rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.container-header h3 {
|
||||
@ -837,20 +839,6 @@ a {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
|
||||
#textCopied {
|
||||
padding: 1rem;
|
||||
border-radius: 2rem;
|
||||
background: var(--sec-color);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
margin: 2rem 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
transition: 0.3s opacity ease;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#intern_info {
|
||||
flex-direction: column;
|
||||
}
|
||||
@ -977,12 +965,13 @@ a {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.task-list-item p {
|
||||
.task-description {
|
||||
grid-area: description;
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.assigned-interns {
|
||||
@ -1036,7 +1025,6 @@ a {
|
||||
padding: 0.8rem 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
#task_context li .icon {
|
||||
margin-right: 0.5rem;
|
||||
@ -1064,11 +1052,6 @@ a {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#best_interns_container .container-header,
|
||||
#project_list_container .container-header {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#best_interns_container .container-header .icon,
|
||||
#project_list_container .container-header .icon {
|
||||
margin-right: 0.5rem;
|
||||
@ -1149,27 +1132,11 @@ a {
|
||||
#status_map_container {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #B9F6CA;
|
||||
}
|
||||
|
||||
#status_map_container .branch-btn {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
#status_map_container p {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
#status_map_container .active-branch {
|
||||
color: white;
|
||||
background: rgba(0, 200, 83, 0.6);
|
||||
}
|
||||
|
||||
#status_map_container #status_map {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 1rem;
|
||||
color: #000;
|
||||
padding: 0 1rem 1rem 1rem;
|
||||
}
|
||||
|
||||
#status_map_container #status_map h2 {
|
||||
@ -1177,37 +1144,15 @@ a {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
#status_map_container #status_map .circle {
|
||||
background: #B9F6CA;
|
||||
border: 2px solid rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#status_map_container #status_map .line {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#status_map_container #status_map .assigned-intern {
|
||||
border: rgba(0, 0, 0, 0.4) 1px solid;
|
||||
}
|
||||
|
||||
#status_map_container #status_map .apply-btn {
|
||||
color: #1B5E20;
|
||||
background: rgba(0, 200, 83, 0.2);
|
||||
}
|
||||
|
||||
.apply-btn {
|
||||
padding: 0.3rem 0.6rem;
|
||||
}
|
||||
|
||||
.watching {
|
||||
position: relative;
|
||||
padding-left: 1rem;
|
||||
padding-top: 1rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 1rem;
|
||||
align-items: center;
|
||||
color: #000;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.watching h4 {
|
||||
@ -1216,19 +1161,14 @@ a {
|
||||
}
|
||||
|
||||
.watching button {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.watching button svg {
|
||||
fill: none !important;
|
||||
fill: none;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
stroke-width: 6;
|
||||
overflow: visible;
|
||||
stroke: #000;
|
||||
cursor: pointer;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
#right {
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
@ -1259,9 +1199,9 @@ a {
|
||||
}
|
||||
|
||||
#admin_page {
|
||||
padding: 0 1.5rem;
|
||||
padding: 1.5rem;
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
gap: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
#admin_page__header {
|
||||
@ -1298,6 +1238,7 @@ a {
|
||||
}
|
||||
|
||||
#main_nav {
|
||||
padding: 0.5rem;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
@ -1305,7 +1246,9 @@ a {
|
||||
.nav-list__item {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 0.5rem 0.8rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.8rem;
|
||||
margin-bottom: 0.25rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.nav-list__item--active {
|
||||
@ -1330,22 +1273,15 @@ a {
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
|
||||
#dashboard {
|
||||
#dashboard_page {
|
||||
padding: 1rem;
|
||||
grid-template-columns: 3fr 1fr;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container {
|
||||
#dashboard_page #status_map_container {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container .watching {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container #status_map {
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
.task .apply-btn {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.3s ease;
|
||||
@ -1357,7 +1293,7 @@ a {
|
||||
}
|
||||
|
||||
#admin_page {
|
||||
grid-template-columns: 16rem 1fr;
|
||||
grid-template-columns: 18rem 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
grid-template-areas: "admin-header admin-header" ". .";
|
||||
}
|
||||
@ -1381,22 +1317,18 @@ a {
|
||||
|
||||
#project_explorer {
|
||||
display: grid;
|
||||
align-items: flex-start;
|
||||
grid-template-columns: 1fr 3fr;
|
||||
grid-template-areas: "header header" "left right";
|
||||
}
|
||||
|
||||
#project_explorer .header {
|
||||
border-radius: 0.4rem 0.4rem 0 0;
|
||||
grid-area: header;
|
||||
height: 100%;
|
||||
grid-template-columns: 16rem 3fr;
|
||||
grid-template-areas: "left right";
|
||||
}
|
||||
|
||||
#project_explorer #left {
|
||||
position: sticky;
|
||||
top: 4.8rem;
|
||||
grid-area: left;
|
||||
align-self: flex-start;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 1.5rem;
|
||||
border-right: 1px solid rgba(var(--text-color), 0.06);
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
|
||||
#project_explorer #left h4 {
|
||||
@ -1408,10 +1340,12 @@ a {
|
||||
|
||||
#project_explorer #right {
|
||||
grid-area: right;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#main_page {
|
||||
grid-template-columns: 10rem minmax(0, 1fr);
|
||||
grid-template-columns: 12rem minmax(0, 1fr);
|
||||
grid-template-areas: "main-header main-header" "main-nav sub-pages";
|
||||
}
|
||||
}
|
||||
@ -1431,13 +1365,16 @@ ul {
|
||||
|
||||
#assigned_task_list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
align-content: flex-start;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
display: grid;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.task__header {
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
215
css/main.scss
215
css/main.scss
@ -366,8 +366,8 @@ ul {
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
position: sticky;
|
||||
padding: 0.5rem 1.5rem;
|
||||
background: rgba(var(--background-color), 1);
|
||||
padding: 1rem 1.5rem;
|
||||
background: var(--foreground-color);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
@ -376,6 +376,7 @@ ul {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.nav-list__item {
|
||||
@ -384,6 +385,8 @@ ul {
|
||||
align-items: center;
|
||||
|
||||
width: 100%;
|
||||
padding: 0.5rem 0;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
@ -413,7 +416,7 @@ ul {
|
||||
.container-card {
|
||||
position: relative;
|
||||
background: var(--foreground-color);
|
||||
border-radius: 0.4rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.solid-background {
|
||||
@ -531,7 +534,6 @@ a {
|
||||
gap: 1rem;
|
||||
display: grid;
|
||||
position: relative;
|
||||
margin: 1rem;
|
||||
animation: fadein 0.4s ease;
|
||||
}
|
||||
|
||||
@ -568,7 +570,7 @@ a {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#dashboard {
|
||||
#dashboard_page {
|
||||
padding-bottom: 5rem;
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
@ -600,8 +602,6 @@ a {
|
||||
}
|
||||
|
||||
.spacer {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@ -642,8 +642,9 @@ a {
|
||||
|
||||
.project-card {
|
||||
padding: 1rem;
|
||||
text-transform: capitalize;
|
||||
font-weight: 500;
|
||||
line-height: 1.5;
|
||||
text-transform: capitalize;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
|
||||
@ -751,32 +752,29 @@ a {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
#intern_updates .container-header {
|
||||
padding-right: 0;
|
||||
border-bottom: 1px solid rgba(var(--text-color), 0.1);
|
||||
#intern_updates{
|
||||
.container-header {
|
||||
padding: 0 1rem;
|
||||
border-bottom: 1px solid rgba(var(--text-color), 0.1);
|
||||
}
|
||||
.container-header button {
|
||||
padding: 1rem 0;
|
||||
border-bottom: 0.2rem solid transparent;
|
||||
border-radius: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.container-header button:first-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.container-header button:last-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
.container-header .active {
|
||||
color: rgba(var(--text-color), 1);
|
||||
border-bottom: 0.2rem solid var(--accent-color);
|
||||
}
|
||||
}
|
||||
|
||||
#intern_updates .container-header button {
|
||||
padding: 1rem 0;
|
||||
border-bottom: 0.2rem solid transparent;
|
||||
border-radius: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#intern_updates .container-header button:first-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
#intern_updates .container-header button:last-of-type {
|
||||
margin-right: 1rem;
|
||||
}
|
||||
|
||||
#intern_updates .container-header .active {
|
||||
color: rgba(var(--text-color), 1);
|
||||
border-bottom: 0.2rem solid var(--accent-color);
|
||||
}
|
||||
|
||||
#update_container,
|
||||
#requests_container {
|
||||
display: flex;
|
||||
max-height: 80vh;
|
||||
@ -789,10 +787,18 @@ a {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
.update {
|
||||
#updates_page{
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
#all_updates_list{
|
||||
|
||||
}
|
||||
.intern-update {
|
||||
display: grid;
|
||||
gap: 0.5rem;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
|
||||
.update__topic {
|
||||
@ -822,7 +828,7 @@ a {
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
padding: 0 1rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.container-header h3 {
|
||||
@ -863,20 +869,6 @@ a {
|
||||
padding: 0.6rem;
|
||||
}
|
||||
|
||||
#textCopied {
|
||||
padding: 1rem;
|
||||
border-radius: 2rem;
|
||||
background: var(--sec-color);
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
pointer-events: none;
|
||||
margin: 2rem 0;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
transition: 0.3s opacity ease;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#intern_info {
|
||||
flex-direction: column;
|
||||
}
|
||||
@ -1005,12 +997,13 @@ a {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.task-list-item p {
|
||||
.task-description{
|
||||
grid-area: description;
|
||||
margin: 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
max-width: 100%;
|
||||
text-overflow: ellipsis;
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.assigned-interns {
|
||||
@ -1064,8 +1057,7 @@ a {
|
||||
padding: 0.8rem 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
|
||||
.icon {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
@ -1096,11 +1088,6 @@ a {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#best_interns_container .container-header,
|
||||
#project_list_container .container-header {
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#best_interns_container .container-header .icon,
|
||||
#project_list_container .container-header .icon {
|
||||
margin-right: 0.5rem;
|
||||
@ -1182,27 +1169,11 @@ a {
|
||||
#status_map_container {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background: #B9F6CA;
|
||||
}
|
||||
|
||||
#status_map_container .branch-btn {
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
#status_map_container p {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
}
|
||||
|
||||
#status_map_container .active-branch {
|
||||
color: white;
|
||||
background: rgba(0, 200, 83, 0.6);
|
||||
}
|
||||
|
||||
#status_map_container #status_map {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 1rem;
|
||||
color: #000;
|
||||
padding: 0 1rem 1rem 1rem;
|
||||
}
|
||||
|
||||
#status_map_container #status_map h2 {
|
||||
@ -1210,37 +1181,15 @@ a {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
#status_map_container #status_map .circle {
|
||||
background: #B9F6CA;
|
||||
border: 2px solid rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#status_map_container #status_map .line {
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
#status_map_container #status_map .assigned-intern {
|
||||
border: rgba(0, 0, 0, 0.4) 1px solid;
|
||||
}
|
||||
|
||||
#status_map_container #status_map .apply-btn {
|
||||
color: #1B5E20;
|
||||
background: rgba(0, 200, 83, 0.2);
|
||||
}
|
||||
|
||||
.apply-btn {
|
||||
padding: 0.3rem 0.6rem;
|
||||
}
|
||||
|
||||
.watching {
|
||||
position: relative;
|
||||
padding-left: 1rem;
|
||||
padding-top: 1rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 1rem;
|
||||
align-items: center;
|
||||
color: #000;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.watching h4 {
|
||||
@ -1249,19 +1198,13 @@ a {
|
||||
}
|
||||
|
||||
.watching button {
|
||||
padding: 1rem;
|
||||
cursor: pointer;
|
||||
padding: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
.watching button svg {
|
||||
fill: none !important;
|
||||
fill: none;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
stroke-width: 6;
|
||||
overflow: visible;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
#right {
|
||||
align-items: flex-start;
|
||||
align-content: flex-start;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
@ -1292,9 +1235,9 @@ a {
|
||||
}
|
||||
|
||||
#admin_page {
|
||||
padding: 0 1.5rem;
|
||||
padding: 1.5rem;
|
||||
display: grid;
|
||||
gap: 1.5rem;
|
||||
gap: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
#admin_page__header {
|
||||
@ -1331,6 +1274,7 @@ a {
|
||||
}
|
||||
|
||||
#main_nav {
|
||||
padding: 0.5rem;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
@ -1339,7 +1283,9 @@ a {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
padding: 0.5rem 0.8rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.8rem;
|
||||
margin-bottom: 0.25rem;
|
||||
|
||||
font-size: 1rem;
|
||||
|
||||
@ -1368,22 +1314,15 @@ a {
|
||||
border-radius: 0.4rem;
|
||||
}
|
||||
|
||||
#dashboard {
|
||||
#dashboard_page {
|
||||
padding: 1rem;
|
||||
grid-template-columns: 3fr 1fr;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container {
|
||||
#dashboard_page #status_map_container {
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container .watching {
|
||||
padding-left: 2rem;
|
||||
}
|
||||
|
||||
#dashboard #status_map_container #status_map {
|
||||
padding: 1rem 2rem;
|
||||
}
|
||||
|
||||
.task .apply-btn {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.3s ease;
|
||||
@ -1395,7 +1334,7 @@ a {
|
||||
}
|
||||
|
||||
#admin_page {
|
||||
grid-template-columns: 16rem 1fr;
|
||||
grid-template-columns: 18rem 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
grid-template-areas: 'admin-header admin-header''. .';
|
||||
}
|
||||
@ -1419,23 +1358,17 @@ a {
|
||||
|
||||
#project_explorer {
|
||||
display: grid;
|
||||
align-items: flex-start;
|
||||
grid-template-columns: 1fr 3fr;
|
||||
grid-template-areas: 'header header'
|
||||
'left right';
|
||||
height: 100%;
|
||||
grid-template-columns: 16rem 3fr;
|
||||
grid-template-areas: 'left right';
|
||||
}
|
||||
|
||||
#project_explorer .header {
|
||||
border-radius: 0.4rem 0.4rem 0 0;
|
||||
grid-area: header;
|
||||
}
|
||||
|
||||
#project_explorer #left {
|
||||
position: sticky;
|
||||
top: 4.8rem;
|
||||
grid-area: left;
|
||||
align-self: flex-start;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 1.5rem;
|
||||
border-right: 1px solid rgba(var(--text-color), 0.06);
|
||||
background-color: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
|
||||
#project_explorer #left h4 {
|
||||
@ -1447,13 +1380,16 @@ a {
|
||||
|
||||
#project_explorer #right {
|
||||
grid-area: right;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
// Newer styles
|
||||
|
||||
#main_page {
|
||||
grid-template-columns: 10rem minmax(0, 1fr);
|
||||
// gap: 0 1.5rem;
|
||||
grid-template-columns: 12rem minmax(0, 1fr);
|
||||
grid-template-areas: 'main-header main-header''main-nav sub-pages';
|
||||
}
|
||||
}
|
||||
@ -1474,16 +1410,21 @@ ul {
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
#intern_view{
|
||||
}
|
||||
|
||||
#assigned_task_list {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
align-content: flex-start;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.task-card {
|
||||
display: grid;
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
background-color: var(--foreground-color);
|
||||
}
|
||||
|
||||
.task__header {
|
||||
|
||||
440
new.html
440
new.html
@ -75,91 +75,13 @@
|
||||
<main id="main_page" class="grid">
|
||||
<header id="main_header">
|
||||
<div id="logo" class="logo svg-margin-right">
|
||||
<svg viewBox="0 0 118.35 118.35">
|
||||
<title>RanchiMall logo</title>
|
||||
<style type="text/css">
|
||||
.outer-layer {
|
||||
fill: #CB1F1F;
|
||||
}
|
||||
|
||||
.inner-layer {
|
||||
fill: #FF4E4E;
|
||||
}
|
||||
|
||||
.logo-layer {
|
||||
fill: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
<g id="Group_329_1_" transform="translate(-1783.76 -17.542)">
|
||||
<g id="Group_330_1_" transform="matrix(0.966, 0.259, -0.259, 0.966, 1814.879, 17.541)">
|
||||
<path id="Path_180_1_" class="outer-layer" d="M63.89-1.96c-10.68-4.42-9.91-8.27-21.47-8.27s-10.8,3.85-21.48,8.27S8.08-0.8-0.09,7.37
|
||||
S-5,17.73-9.43,28.41s-8.27,9.92-8.27,21.47s3.85,10.8,8.27,21.48s1.16,12.86,9.34,21.03s10.35,4.91,21.03,9.33
|
||||
S30.86,110,42.42,110s10.79-3.85,21.47-8.27s12.86-1.16,21.04-9.33s4.91-10.36,9.33-21.04s8.27-9.92,8.27-21.47
|
||||
s-3.85-10.79-8.27-21.47s-1.23-12.71-9.29-21C77.3-0.46,74.57,2.47,63.89-1.96z" />
|
||||
</g>
|
||||
<g id="Group_326_1_" transform="translate(1810.58 44.362)">
|
||||
<path id="Path_180-2_1_" class="inner-layer" d="M49.08-8.03c-8.31-3.44-7.72-6.44-16.72-6.44s-8.41,3-16.72,6.44S5.62-7.13-0.74-0.76
|
||||
S-4.56,7.3-8.01,15.61s-6.44,7.72-6.44,16.72s3,8.4,6.44,16.72s0.9,10.01,7.27,16.38s8.06,3.82,16.38,7.27s7.72,6.44,16.72,6.44
|
||||
s8.4-3,16.72-6.44s10.01-0.9,16.38-7.27s3.82-8.06,7.27-16.38s6.44-7.72,6.44-16.72s-3-8.4-6.44-16.72s-0.96-9.9-7.24-16.35
|
||||
C59.52-6.86,57.39-4.59,49.08-8.03z" />
|
||||
</g>
|
||||
<path id="Path_5_2_" class="logo-layer" d="M1864.51,98.2c-1.11-3.75-4.48-6.58-12.45-10.48c-2.26-0.99-4.39-2.26-6.34-3.76
|
||||
c-0.78-0.72-1.42-1.57-1.9-2.52c-0.32-1.12-0.33-2.3-0.02-3.42c0.57-1.64,1.2-2.37,5.88-6.87c2.81-2.7,4.23-4.69,5.05-7.06
|
||||
c0.34-1.4,0.37-2.86,0.08-4.27c-1.04-2.81-3.22-5.18-6.88-7.5c-1.35-0.85-1.95-0.97-1.96-0.37c-0.1,0.39-0.25,0.76-0.45,1.1
|
||||
l-0.45,0.83l-1.27-0.88c-0.7-0.49-1.54-1.02-1.86-1.19c-0.59-0.3-1.09-0.28-1.09,0.07c-0.25,0.7-0.56,1.37-0.92,2.01
|
||||
c-0.02,0.03-0.2-0.05-0.4-0.2c-2.77-1.98-3.97-2.52-3.97-1.77c-0.47,1.26-1.08,2.46-1.81,3.59c-2.94,4.94-5.94,7.38-9.05,7.38
|
||||
c-1.35,0-1.33-0.03-0.93,1.53c0.33,1.28,0.5,1.39,1.65,1.04c0.96-0.27,1.85-0.71,2.65-1.31c0.35-0.25,0.69-0.43,0.75-0.39
|
||||
c0.16,0.3,0.27,0.62,0.32,0.95c0.05,0.36,0.2,0.69,0.43,0.96c1.22-0.18,2.39-0.62,3.42-1.31l1.04-0.66l0.21,0.83
|
||||
c0.28,1.11,0.48,1.24,1.48,0.98c2.09-0.67,3.92-1.97,5.24-3.73l0.91-1.07l-0.1,0.96c-0.26,2.46-1.95,5.16-5.12,8.18l-2.95,2.81
|
||||
c-4.85,4.63-4.57,8.45,0.91,12.07c2.25,1.34,4.57,2.56,6.95,3.64c0.43,0.19,1.51,0.79,2.41,1.31c5,2.96,7.48,5.93,7.48,8.96
|
||||
c-0.03,0.39,0.01,0.78,0.1,1.16l0,0c0.14,0.14,0.05,0.15,1.37-0.21c0.44-0.09,0.87-0.26,1.26-0.49c-0.03-0.98-0.32-1.93-0.84-2.76
|
||||
c-1.09-1.65-2.46-3.1-4.05-4.29c-2.44-1.68-5.02-3.15-7.71-4.39c-3.88-1.9-5.38-2.83-6.67-4.13c-1.08-0.95-1.72-2.3-1.78-3.73
|
||||
c-0.01-2.09,1.06-3.91,3.77-6.4c4.29-3.93,5.92-5.9,7.06-8.53c0.5-0.94,0.72-2,0.63-3.06c0.09-0.93-0.07-1.87-0.48-2.71l-0.48-1.11
|
||||
l0.44-0.73c0.24-0.4,0.55-0.94,0.68-1.2l0.24-0.47l0.66,0.97c0.84,1.27,1.35,2.73,1.47,4.25c-0.05,1-0.26,1.99-0.64,2.93
|
||||
c-0.08,0.18-0.18,0.45-0.23,0.6c-0.3,0.58-0.64,1.13-1.01,1.67c-0.89,1.36-2.37,2.93-6.09,6.47c-2.59,2.47-3.45,3.9-3.56,5.93
|
||||
c-0.14,1.58,0.48,3.13,1.68,4.17c1.44,1.55,3.13,2.63,7.93,5.02c5.5,2.75,7.88,4.37,9.68,6.61c1.04,1.18,1.67,2.66,1.79,4.23
|
||||
c0.01,0.47,0.08,0.93,0.21,1.39c0.22,0.02,0.45,0,0.66-0.08c0.3-0.08,0.86-0.23,1.25-0.33l0.7-0.18l-0.09-0.69
|
||||
c-0.32-2.32-2.45-4.92-5.96-7.25c-1.99-1.33-2.66-1.69-7.88-4.27c-1.96-0.87-3.77-2.04-5.36-3.47c-1.87-1.55-2.38-4.2-1.21-6.33
|
||||
c0.62-1.28,1.25-1.98,5.69-6.26c3.62-3.5,5.18-6.24,5.19-9.12c-0.08-2.51-1.22-4.87-3.15-6.49c-0.34-0.31-0.67-0.64-0.98-0.99
|
||||
c0.12-0.66,0.42-1.27,0.86-1.77c0.55,0,3.56,2.88,4.4,4.2c0.84,1.18,1.25,2.61,1.16,4.06c0.06,1.59-0.4,3.17-1.31,4.48
|
||||
c-1.08,1.84-1.91,2.75-6.45,7.06c-1.27,1.11-2.33,2.45-3.13,3.93c-0.64,1.44-0.66,3.08-0.06,4.54c0.86,1.83,3.37,3.85,7.02,5.64
|
||||
c5.68,2.79,6.85,3.44,8.8,4.89c3.26,2.42,4.83,4.78,4.83,7.25c-0.03,0.39,0.01,0.78,0.13,1.16c0.87-0.05,1.72-0.25,2.51-0.6
|
||||
C1864.74,99.06,1864.74,98.98,1864.51,98.2z M1832.73,62.18L1832.73,62.18c-0.68,0.38-1.43,0.61-2.2,0.68l-0.97,0.07l1.03-1.26
|
||||
c1.79-2.24,3.32-4.69,4.55-7.28c0.42-0.84,0.82-1.58,0.89-1.66c0.17-0.18,1.17,0.48,2.32,1.53l0.95,0.87l-0.86,1.27
|
||||
C1836.33,59.53,1834.65,61.23,1832.73,62.18L1832.73,62.18z M1841.36,59.49c-1.12,1.19-2.44,2.18-3.89,2.94l0,0
|
||||
c-0.57,0.21-1.16,0.35-1.77,0.42l-0.87,0.08l0.97-1.18c1.2-1.47,2.26-3.05,3.18-4.71c0.34-0.62,0.63-1.15,0.66-1.19
|
||||
c0.15-0.18,0.75,0.64,1.35,1.86l0.67,1.36L1841.36,59.49z M1843.78,56.14c-0.18,0.35-0.41,0.68-0.68,0.96
|
||||
c-0.49-0.43-0.94-0.88-1.37-1.37l-1.27-1.36l0.29-0.68c0.51-1.19,0.59-1.22,1.55-0.47c0.75,0.55,1.44,1.18,2.06,1.87
|
||||
C1844.18,55.46,1843.99,55.8,1843.78,56.14L1843.78,56.14z" />
|
||||
</g>
|
||||
</svg>
|
||||
<h4>RIBC</h4>
|
||||
</div>
|
||||
<div class="spacer"></div>
|
||||
<div class="dropdown hide-on-mobile" id="intern_updates">
|
||||
<button id="update_panel_btn" title="show updates">
|
||||
<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="M18 10a6 6 0 1 0-12 0v8h12v-8zm2 8.667l.4.533a.5.5 0 0 1-.4.8H4a.5.5 0 0 1-.4-.8l.4-.533V10a8 8 0 1 1 16 0v8.667zM9.5 21h5a2.5 2.5 0 1 1-5 0z"/></svg>
|
||||
</button>
|
||||
<div class="dropdown-content hide" id="updates">
|
||||
<div class="container-header">
|
||||
<button id="show_updates" class="feed-btn active"
|
||||
onclick="showThisFeed('update_container', 'updates', this)">Feed</button>
|
||||
<button id="show_requests" class="feed-btn admin-options"
|
||||
onclick="showThisFeed('requests_container', 'requests', this)">Requests</button>
|
||||
<div class="spacer"></div>
|
||||
<sm-button id="top_update_btn" variant="no-outline" title="show all the updates">See all
|
||||
</sm-button>
|
||||
</div>
|
||||
<div id="update_container" class="feed-item">
|
||||
</div>
|
||||
<div id="requests_container" class="feed-item hide-completely">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<theme-toggle></theme-toggle>
|
||||
</header>
|
||||
<nav id="main_nav">
|
||||
<a id="dashboard_btn" href="#dashboard_page" class="nav-list__item nav-list__item--active"
|
||||
<a id="dashboard_btn" href="#dashboard_page" class="nav-list__item nav-list__item--active interact"
|
||||
title="open dashboard page">
|
||||
<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" />
|
||||
@ -168,11 +90,15 @@
|
||||
</svg>
|
||||
Dashboard
|
||||
</a>
|
||||
<a id="admin_page_btn" href="#admin_page" class="admin-options nav-list__item" title="open admin panel">
|
||||
<a id="update_panel_btn" href="#updates_page" class="nav-list__item interact" title="show updates">
|
||||
<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="M18 10a6 6 0 1 0-12 0v8h12v-8zm2 8.667l.4.533a.5.5 0 0 1-.4.8H4a.5.5 0 0 1-.4-.8l.4-.533V10a8 8 0 1 1 16 0v8.667zM9.5 21h5a2.5 2.5 0 1 1-5 0z"/></svg>
|
||||
Updates
|
||||
</a>
|
||||
<a id="admin_page_btn" href="#admin_page" class="admin-options nav-list__item interact" title="open admin panel">
|
||||
<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 14v2a6 6 0 0 0-6 6H4a8 8 0 0 1 8-8zm0-1c-3.315 0-6-2.685-6-6s2.685-6 6-6 6 2.685 6 6-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm2.595 7.812a3.51 3.51 0 0 1 0-1.623l-.992-.573 1-1.732.992.573A3.496 3.496 0 0 1 17 14.645V13.5h2v1.145c.532.158 1.012.44 1.405.812l.992-.573 1 1.732-.992.573a3.51 3.51 0 0 1 0 1.622l.992.573-1 1.732-.992-.573a3.496 3.496 0 0 1-1.405.812V22.5h-2v-1.145a3.496 3.496 0 0 1-1.405-.812l-.992.573-1-1.732.992-.572zM18 19.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z"/></svg>
|
||||
Manage
|
||||
</a>
|
||||
<a id="settings_btn" href="#settings_page" class="nav-list__item" title="open settings page">
|
||||
<a id="settings_btn" href="#settings_page" class="nav-list__item interact" title="open settings page">
|
||||
<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
|
||||
@ -188,20 +114,16 @@
|
||||
<h4>Projects you are watching</h4>
|
||||
<button id="prev_proj" onclick="changeProject(-1)" class="watch-list-button"
|
||||
title="show next project" disabled>
|
||||
<svg viewBox="0 0 40.24 74.83">
|
||||
<polyline points="38.83,1.41 2.83,37.41 38.83,73.41 " />
|
||||
</svg>
|
||||
<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="M10.828 12l4.95 4.95-1.414 1.414L8 12l6.364-6.364 1.414 1.414z"/></svg>
|
||||
</button>
|
||||
<button id="next_proj" onclick="changeProject(1)" class="watch-list-button"
|
||||
title="show previous project">
|
||||
<svg viewBox="0 0 40.24 74.83">
|
||||
<polyline points="1.41,73.41 37.41,37.41 1.41,1.41 " />
|
||||
</svg>
|
||||
<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="M13.172 12l-4.95-4.95 1.414-1.414L16 12l-6.364 6.364-1.414-1.414z"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
<div id="status_map"></div>
|
||||
</div>
|
||||
<section id="intern_view" class="container-card hide-completely intern-option">
|
||||
<section id="intern_view" class="hide-completely intern-option">
|
||||
<h2>My tasks</h2>
|
||||
<ul id="assigned_task_list"></ul>
|
||||
</section>
|
||||
@ -215,7 +137,7 @@
|
||||
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>
|
||||
<h3>Leaderboard</h3>
|
||||
<button id="all_interns_btn">All</button>
|
||||
<sm-button id="all_interns_btn">All</sm-button>
|
||||
</div>
|
||||
<div id="best_interns"></div>
|
||||
</div>
|
||||
@ -228,17 +150,17 @@
|
||||
d="M6 7V4a1 1 0 0 1 1-1h6.414l2 2H21a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-3v3a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3zm0 2H4v10h12v-2H6V9z" />
|
||||
</svg>
|
||||
<h3>Projects</h3>
|
||||
<button id="all_projects_btn">All</button>
|
||||
<sm-button id="all_projects_btn">All</sm-button>
|
||||
</div>
|
||||
<div id="project_list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="settings_page" class="page hide-completely container-card">
|
||||
<section>
|
||||
<h3>Account</h3>
|
||||
<h4 id="username" class="capitalise"></h4>
|
||||
<sm-button id="logout" variant="primary" class="svg-margin-right" onclick="logout()">
|
||||
<section class="grid gap-0-5">
|
||||
<h2 id="username" class="capitalise"></h2>
|
||||
<sm-copy id="user_flo_id"></sm-copy>
|
||||
<sm-button id="logout" variant="primary" class="svg-margin-right justify-self-start" onclick="logout()">
|
||||
<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
|
||||
@ -261,13 +183,14 @@
|
||||
<sm-button id="update_project_info_btn" variant="primary" onclick="commitToChanges()"
|
||||
title="commit to changes">Commit</sm-button>
|
||||
</header>
|
||||
<section class="flex direction-column">
|
||||
<section class="flex direction-column container-card">
|
||||
<sm-tab-header target="admin_tabs">
|
||||
<sm-tab>Projects</sm-tab>
|
||||
<sm-tab>Interns</sm-tab>
|
||||
<sm-tab>Requests</sm-tab>
|
||||
</sm-tab-header>
|
||||
<sm-tab-panels id="admin_tabs">
|
||||
<div id="projects_container" class="container-card list-container">
|
||||
<div id="projects_container" class="list-container">
|
||||
<div class="container-header">
|
||||
<h3>Add project</h3>
|
||||
<button onclick="showPopup('add_project_popup')">
|
||||
@ -280,7 +203,7 @@
|
||||
</div>
|
||||
<div id="projects"></div>
|
||||
</div>
|
||||
<div id="interns_container" class="container-card list-container">
|
||||
<div id="interns_container" class="list-container">
|
||||
<div class="container-header">
|
||||
<h3>Add Intern</h3>
|
||||
<button onclick="showPopup('add_intern_popup')">
|
||||
@ -293,28 +216,25 @@
|
||||
</div>
|
||||
<div id="interns"></div>
|
||||
</div>
|
||||
<div id="requests_container" class="feed-item"></div>
|
||||
</sm-tab-panels>
|
||||
</section>
|
||||
<div id="project_editing_panel" class="inner-page container-card hide-completely">
|
||||
<div>
|
||||
<h2>Project Name</h2>
|
||||
</div>
|
||||
<p id="admin_project_description">
|
||||
|
||||
</p>
|
||||
<div id="project_editing_panel" class="inner-page container-card">
|
||||
<h2 id="editing_panel__title"></h2>
|
||||
<p id="editing_panel__description"></p>
|
||||
<div id="branch_container">
|
||||
</div>
|
||||
<h4>Tasks</h4>
|
||||
<div id="task_list"></div>
|
||||
<sm-button id="add_task" class="svg-margin-right" title="show element to add new task">
|
||||
<sm-button id="add_task" class="svg-margin-right" title="show element to add new task" onclick="addPlaceholderTask()">
|
||||
<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="M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z" />
|
||||
</svg>
|
||||
Add task
|
||||
</sm-button>
|
||||
<ul id="task_context" class="hide">
|
||||
<li id="assign_intern" onclick="showPopup('interns_list')">
|
||||
<ul id="task_context" class="hide-completely">
|
||||
<li id="assign_intern" tabindex="0" class="interact" onclick="showPopup('interns_list')">
|
||||
<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" />
|
||||
@ -323,7 +243,7 @@
|
||||
</svg>
|
||||
Assign an intern
|
||||
</li>
|
||||
<li onclick="addNewBranch()">
|
||||
<li onclick="addNewBranch()" tabindex="0" class="interact">
|
||||
<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" />
|
||||
@ -332,7 +252,7 @@
|
||||
</svg>
|
||||
Create new Branch
|
||||
</li>
|
||||
<li onclick="removeThisTask()">
|
||||
<li onclick="removeThisTask()" tabindex="0" class="interact">
|
||||
<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" />
|
||||
@ -344,6 +264,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<section id="updates_page" class="page hide-completely container-card">
|
||||
<ul id="all_updates_list" class="grid gap-1"></ul>
|
||||
</section>
|
||||
<section id="show_all" class="page hide-completely container-card">
|
||||
<header class="header">
|
||||
<svg onclick="history.back()" viewBox="0 0 31.24 56.83">
|
||||
@ -355,20 +278,13 @@
|
||||
<div></div>
|
||||
</section>
|
||||
<section id="project_explorer" class="page hide-completely container-card">
|
||||
<header class="header">
|
||||
<svg onclick="history.back()" viewBox="0 0 31.24 56.83">
|
||||
<title>Go back to previous page</title>
|
||||
<polyline points="29.83,1.41 2.83,28.41 29.83,55.41 " />
|
||||
</svg>
|
||||
<h3>Projects</h3>
|
||||
</header>
|
||||
<div id="left" class="list-container">
|
||||
<h4 class="padding intern-option hide-completely">My projects</h4>
|
||||
<div></div>
|
||||
<h4 class="padding intern-option hide-completely">Other projects</h4>
|
||||
<div></div>
|
||||
</div>
|
||||
<section id="right" class="hide-page-on-mobile content-page">
|
||||
<section id="right" class="grid gap-0-5 hide-page-on-mobile content-page">
|
||||
<header class="flex space-between align-center">
|
||||
<h2></h2>
|
||||
<button id="watch_project_btn" title="add this project to your watch list"
|
||||
@ -531,7 +447,7 @@
|
||||
<sm-form>
|
||||
<sm-textarea id="update_description" placeholder="Type the update" required></sm-textarea>
|
||||
<sm-button id="post_update_btn" title="post this update" variant="primary" disabled>
|
||||
<svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<svg class="icon button__icon--left" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">
|
||||
<path fill="none" d="M0 0h24v24H0z" />
|
||||
<path
|
||||
d="M1.923 9.37c-.51-.205-.504-.51.034-.689l19.086-6.362c.529-.176.832.12.684.638l-5.454 19.086c-.15.529-.475.553-.717.07L11 13 1.923 9.37zm4.89-.2l5.636 2.255 3.04 6.082 3.546-12.41L6.812 9.17z" />
|
||||
@ -611,7 +527,7 @@
|
||||
<!-- Templates -->
|
||||
|
||||
<template id="update_card_template">
|
||||
<li class="update">
|
||||
<li class="intern-update">
|
||||
<div class="flex align-center space-between">
|
||||
<h5 class="update__sender"></h5>
|
||||
<span class="update__time"></span>
|
||||
@ -9954,7 +9870,7 @@
|
||||
</script>
|
||||
<script id="default_ui_library">
|
||||
// Global variables
|
||||
const appPages = ['dashboard_page', 'admin_page', 'settings_page', 'project_explorer'];
|
||||
const appPages = ['dashboard_page', 'admin_page', 'settings_page', 'project_explorer', 'updates_page'];
|
||||
const domRefs = {};
|
||||
let timerId;
|
||||
let zIndex = 10;
|
||||
@ -10273,12 +10189,28 @@
|
||||
const targetListItem = document.querySelector(`.nav-list__item[href="#${pageId}"]`)
|
||||
targetListItem?.classList.add('nav-list__item--active')
|
||||
|
||||
let params
|
||||
if(searchParams){
|
||||
const urlSearchParams = new URLSearchParams('?'+ searchParams);
|
||||
params = Object.fromEntries(urlSearchParams.entries());
|
||||
}
|
||||
switch(pageId){
|
||||
case 'dashboard_page':
|
||||
if (JSON.parse(localStorage.getItem('watchList')).length){
|
||||
showProjectMap(JSON.parse(localStorage.getItem('watchList'))[0], 'status_map')
|
||||
}
|
||||
break;
|
||||
case 'updates_page':
|
||||
updateFeed(getRef('all_updates_list'))
|
||||
break;
|
||||
case 'project_explorer':
|
||||
const urlSearchParams = new URLSearchParams('?'+ searchParams);
|
||||
const params = Object.fromEntries(urlSearchParams.entries());
|
||||
showProjectInfo(params.projectId)
|
||||
break;
|
||||
case 'admin_page':
|
||||
if(params){
|
||||
editProjectInfo(params.projectId)
|
||||
}
|
||||
break;
|
||||
}
|
||||
getRef(pageId).classList.remove('hide-completely')
|
||||
}
|
||||
@ -10288,12 +10220,13 @@
|
||||
|
||||
// Method object for creating various UI elements
|
||||
const render = {
|
||||
projectCard: function (projectName, projectCode) { // creates cards containing project information
|
||||
projectCard(projectName, projectCode, isAdmin = false) { // creates cards containing project information
|
||||
const page = isAdmin ? 'admin_page' : 'project_explorer'
|
||||
return createElement('a', {
|
||||
className: 'project-card flex align-center interact',
|
||||
attributes: {
|
||||
'title': "Project information",
|
||||
href: `#project_explorer?projectId=${projectCode}`
|
||||
href: `#${page}?projectId=${projectCode}`
|
||||
},
|
||||
textContent: projectName
|
||||
});
|
||||
@ -10468,16 +10401,11 @@
|
||||
<b class="capitalise">${RIBC.getProjectDetails(projectCode).projectName}</b>
|
||||
</p>
|
||||
<button class="hover reject-app">
|
||||
<svg class="close-svg" viewBox="0 0 50.71 50.71">
|
||||
<line x1="50.35" y1="0.35" x2="0.36" y2="50.35"/>
|
||||
<line x1="0.35" y1="0.35" x2="50.35" y2="50.35"/>
|
||||
</svg>
|
||||
<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 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z"/></svg>
|
||||
Reject
|
||||
</button>
|
||||
<button class="hover accept-app" data-flo-id="${floId}" data-project-code="${projectCode}" data-branch="${branch}" data-task-no="${taskNo}">
|
||||
<svg class="tick-mark" viewBox="0 0 100 100">
|
||||
<polyline points="25.5,53.5 39.5,67.5 72.5,34.5 "/>
|
||||
</svg>
|
||||
<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="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"/></svg>
|
||||
Accept
|
||||
</button>`;
|
||||
return card;
|
||||
@ -10519,20 +10447,20 @@
|
||||
let internInfo = [];
|
||||
if (Array.isArray(floId))
|
||||
floId.forEach((id) => {
|
||||
Object.keys(iList).forEach((key) => {
|
||||
Object.keys(allInternsList).forEach((key) => {
|
||||
if (id === key)
|
||||
internInfo.push(`${key}:${iList[key]}`)
|
||||
internInfo.push(`${key}:${allInternsList[key]}`)
|
||||
})
|
||||
})
|
||||
else
|
||||
Object.keys(iList).forEach((key) => {
|
||||
Object.keys(allInternsList).forEach((key) => {
|
||||
if (floId === key)
|
||||
internInfo.push(`${key}:${iList[key]}`)
|
||||
internInfo.push(`${key}:${allInternsList[key]}`)
|
||||
})
|
||||
return internInfo;
|
||||
}
|
||||
|
||||
let i = currentProgress = projectIndex = 0, prevProject = '', iList = [], newIList = [], lastState,
|
||||
let i = currentProgress = projectIndex = 0, prevProject = '', allInternsList = [], newInternList = [], lastState,
|
||||
frag = document.createDocumentFragment(), watchList = [], currentIntern, dashboardProject, currentTaskId,
|
||||
typeOfUser = 'general';
|
||||
|
||||
@ -10565,7 +10493,7 @@
|
||||
projectCode = `${date.getFullYear()}_project_${RIBC.getProjectList().length + 1}`;
|
||||
RIBC.manage.createProject(projectCode)
|
||||
RIBC.manage.addProjectDetails(projectCode, { projectName: projectName, projectDescription: projectDescription })
|
||||
document.getElementById('projects').appendChild(render.projectCard(projectName, projectCode))
|
||||
document.getElementById('projects').append(render.projectCard(projectName, projectCode, true))
|
||||
hidePopup();
|
||||
}
|
||||
|
||||
@ -10579,11 +10507,9 @@
|
||||
|
||||
// opens a popup containing various project information
|
||||
function showProjectInfo(projectId) {
|
||||
let allProjects = document.getElementById('left').querySelectorAll('.project-card');
|
||||
allProjects.forEach((proj) => {
|
||||
proj.classList.remove('project-card--active')
|
||||
})
|
||||
Array.from(allProjects).find(project => project.getAttribute('href').includes(projectId)).classList.add('project-card--active')
|
||||
const allProjects = document.getElementById('left').querySelectorAll('.project-card');
|
||||
Array.from(allProjects).find(project => project.classList.contains('project-card--active'))?.classList.remove('project-card--active')
|
||||
Array.from(allProjects).find(project => project.getAttribute('href').includes(projectId))?.classList.add('project-card--active')
|
||||
if (window.innerWidth < 640) {
|
||||
document.querySelectorAll('.list-container').forEach((item) => {
|
||||
item.classList.add('hide-page-on-mobile')
|
||||
@ -10611,27 +10537,26 @@
|
||||
currentProject = '',
|
||||
currentTask = '',
|
||||
lastProject;
|
||||
function editProjectInfo(project) {
|
||||
let thisContainer = document.getElementById('project_editing_panel'),
|
||||
container = document.getElementById('branch_container'),
|
||||
branchList = document.querySelectorAll('.branch-btn'),
|
||||
frag = document.createDocumentFragment();
|
||||
container.innerHTML = '',
|
||||
getRef('task_list').innerHTML = '';
|
||||
currentProject = project.dataset.projectCode;
|
||||
function editProjectInfo(projectId) {
|
||||
const allProjects = getRef('projects').querySelectorAll('.project-card');
|
||||
const branchList = document.querySelectorAll('.branch-btn');
|
||||
const frag = document.createDocumentFragment();
|
||||
Array.from(allProjects).find(project => project.classList.contains('project-card--active'))?.classList.remove('project-card--active')
|
||||
Array.from(allProjects).find(project => project.getAttribute('href').includes(projectId))?.classList.add('project-card--active')
|
||||
getRef('branch_container').innerHTML = '',
|
||||
getRef('task_list').innerHTML = '';
|
||||
currentProject = projectId;
|
||||
branchList.forEach((branch) => {
|
||||
branch.classList.remove('active-branch')
|
||||
})
|
||||
thisContainer.firstElementChild.firstElementChild.textContent = project.children[0].textContent;
|
||||
document.getElementById('admin_project_description').textContent = RIBC.getProjectDetails(currentProject).projectDescription;
|
||||
const {projectName, projectDescription} = RIBC.getProjectDetails(projectId);
|
||||
getRef('editing_panel__title').textContent = projectName;
|
||||
getRef('editing_panel__description').textContent = projectDescription;
|
||||
RIBC.getProjectBranches(currentProject).forEach((branch) => {
|
||||
frag.appendChild(render.branchBtn(currentProject, branch))
|
||||
})
|
||||
container.appendChild(frag)
|
||||
container.firstElementChild.click()
|
||||
document.getElementById('add_task').onclick = function () {
|
||||
addPlaceholderTask()
|
||||
}
|
||||
getRef('branch_container').appendChild(frag)
|
||||
getRef('branch_container').firstElementChild.click()
|
||||
}
|
||||
function showTasksOfBranch(btn, destination, taskListContainer) {
|
||||
currentProject = btn.dataset.projectCode;
|
||||
@ -10669,10 +10594,11 @@
|
||||
}
|
||||
if (e.target.closest('.task-option')) {
|
||||
getRef('task_context').setAttribute('style', `top: ${e.target.closest('.task-option').offsetTop}px`)
|
||||
getRef('task_context').classList.toggle('hide')
|
||||
getRef('task_context').classList.toggle('hide-completely')
|
||||
getRef('task_context').firstElementChild.focus()
|
||||
let y = document.addEventListener("click", function (e) {
|
||||
if (e.target.closest('#context_menu') || e.target.closest('.task-option')) return;
|
||||
getRef('task_context').classList.add('hide')
|
||||
getRef('task_context').classList.add('hide-completely')
|
||||
document.removeEventListener('click', y);
|
||||
});
|
||||
}
|
||||
@ -10752,17 +10678,6 @@
|
||||
btn.disabled = true;
|
||||
}
|
||||
/* function showPage(elem, page, offsprings, type) {
|
||||
let thisPage = document.getElementById(page),
|
||||
element = document.getElementById(elem),
|
||||
allTabs = document.querySelectorAll('.tabs'),
|
||||
allPages = document.querySelectorAll('.page')
|
||||
allPages.forEach((pages) => {
|
||||
pages.classList.add('hide-completely');
|
||||
});
|
||||
thisPage.classList.remove('hide-completely');
|
||||
allTabs.forEach((tab) => {
|
||||
tab.classList.remove('active');
|
||||
});
|
||||
if (page === 'lastPage') {
|
||||
history.back()
|
||||
}
|
||||
@ -10776,10 +10691,8 @@
|
||||
updateFeed(thisPage.children[1])
|
||||
}
|
||||
else if (offsprings === 'interns') {
|
||||
thisPage.children[1].innerHTML = '';
|
||||
thisPage.children[0].children[1].textContent = 'Interns'
|
||||
for (let p = 0; p < newIList.length; p++) {
|
||||
frag.appendChild(render.internCard(newIList[p][1], newIList[p][0], newIList[p][2], 'interns'))
|
||||
for (let p = 0; p < newInternList.length; p++) {
|
||||
frag.appendChild(render.internCard(newInternList[p][1], newInternList[p][0], newInternList[p][2], 'interns'))
|
||||
}
|
||||
thisPage.children[1].appendChild(frag)
|
||||
}
|
||||
@ -10837,10 +10750,10 @@
|
||||
}
|
||||
|
||||
function populateIntens() {
|
||||
iList = RIBC.getInternList();
|
||||
allInternsList = RIBC.getInternList();
|
||||
let internsPopup = document.getElementById('interns_list_container');
|
||||
for (intern in iList) {
|
||||
frag.appendChild(render.internCard(iList[intern], intern, RIBC.getInternRating(intern)))
|
||||
for (intern in allInternsList) {
|
||||
frag.appendChild(render.internCard(allInternsList[intern], intern, RIBC.getInternRating(intern)))
|
||||
}
|
||||
internsPopup.innerHTML = ''
|
||||
internsPopup.appendChild(frag)
|
||||
@ -10874,24 +10787,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
function showUpdatePanel() {
|
||||
let container = document.getElementById('updates'),
|
||||
updateContainer = document.getElementById('update_container');
|
||||
updateFeed(updateContainer, 8)
|
||||
container.classList.toggle('hide')
|
||||
let y = document.addEventListener("mousedown", function (event) {
|
||||
if (event.target.closest('#intern_updates')) return;
|
||||
container.classList.add('hide')
|
||||
document.removeEventListener('click', y);
|
||||
});
|
||||
}
|
||||
|
||||
function updateFeed(container, limit) {
|
||||
let updateContainer = container;
|
||||
if (typeof container === "string")
|
||||
updateContainer = document.getElementById(container);
|
||||
updateContainer.innerHTML = ``;
|
||||
let updates = RIBC.getInternUpdates(limit);
|
||||
const updates = RIBC.getInternUpdates(limit);
|
||||
updates.forEach((entry) => {
|
||||
const { floID, time, update: { topic, description } } = entry
|
||||
const updateObj = {
|
||||
@ -11049,34 +10950,28 @@
|
||||
if (event.target.closest('.intern-card'))
|
||||
showInternInfo(event.target.closest('.intern-card'))
|
||||
})
|
||||
document.getElementById('projects').addEventListener('click', (event) => {
|
||||
if (event.target.closest('.project-card'))
|
||||
editProjectInfo(event.target.closest('.project-card'))
|
||||
})
|
||||
|
||||
const internAssignedTasks = {}
|
||||
|
||||
function renderAllElements() {
|
||||
|
||||
let frag = document.createDocumentFragment(),
|
||||
pList = RIBC.getProjectList();
|
||||
allProjectsList = RIBC.getProjectList();
|
||||
//creates cards for highest performing interns
|
||||
//sort interns earned points
|
||||
|
||||
|
||||
iList = RIBC.getInternList();
|
||||
newIList = [];
|
||||
for (let intern in iList) {
|
||||
newIList.push([intern, iList[intern], RIBC.getInternRating(intern)])
|
||||
allInternsList = RIBC.getInternList();
|
||||
newInternList = [];
|
||||
for (let intern in allInternsList) {
|
||||
newInternList.push([intern, allInternsList[intern], RIBC.getInternRating(intern)])
|
||||
}
|
||||
newIList.sort(function (a, b) {
|
||||
return a[2] - b[2];
|
||||
});
|
||||
newInternList.sort((a, b) => a[2] - b[2]);
|
||||
|
||||
// Intern's view
|
||||
|
||||
let assignedProjectsList = [], x;
|
||||
if (Object.keys(iList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
if (Object.keys(allInternsList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
typeOfUser = 'intern';
|
||||
document.querySelectorAll('.intern-option').forEach((option) => {
|
||||
option.classList.remove('hide-completely')
|
||||
@ -11084,13 +10979,13 @@
|
||||
document.getElementById('status_map_container').classList.add('hide-completely')
|
||||
|
||||
// store all the projects assinged to interns in array
|
||||
for (let i = 0; i < pList.length; i++) {
|
||||
for (let i = 0; i < allProjectsList.length; i++) {
|
||||
nextProject:
|
||||
for (branch in RIBC.getProjectMap(pList[i])) {
|
||||
x = RIBC.getProjectMap(pList[i])[branch].slice(4);
|
||||
for (branch in RIBC.getProjectMap(allProjectsList[i])) {
|
||||
x = RIBC.getProjectMap(allProjectsList[i])[branch].slice(4);
|
||||
for (let j = 0; j < x.length; j++)
|
||||
if (Array.isArray(RIBC.getAssignedInterns(pList[i], branch, x[j])) && RIBC.getAssignedInterns(pList[i], branch, x[j]).includes(myFloID)) {
|
||||
assignedProjectsList.push(pList[i])
|
||||
if (Array.isArray(RIBC.getAssignedInterns(allProjectsList[i], branch, x[j])) && RIBC.getAssignedInterns(allProjectsList[i], branch, x[j]).includes(myFloID)) {
|
||||
assignedProjectsList.push(allProjectsList[i])
|
||||
break nextProject;
|
||||
}
|
||||
}
|
||||
@ -11140,7 +11035,7 @@
|
||||
const { projectId, projectName, projectBranch, task } = internAssignedTasks[currentTaskId]
|
||||
getRef('update_of_project').textContent = projectName
|
||||
getRef('update_of_task').textContent = RIBC.getTaskDetails(projectId, projectBranch, task).taskTitle
|
||||
getRef('post_update_popup').show()
|
||||
showPopup('post_update_popup')
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -11155,7 +11050,6 @@
|
||||
// admin view
|
||||
if (floGlobals.subAdmins.includes(myFloID)) {
|
||||
typeOfUser = 'admin'
|
||||
let requestsContainer = document.getElementById('requests_container');
|
||||
RIBC.manage.getTaskRequests().forEach((app) => {
|
||||
try {
|
||||
if (!Array.isArray(RIBC.getAssignedInterns(app.projectCode, app.branch, app.task)) && typeof RIBC.getTaskDetails(app.projectCode, app.branch, app.task) !== 'undefined')
|
||||
@ -11165,10 +11059,10 @@
|
||||
console.error(error)
|
||||
}
|
||||
})
|
||||
requestsContainer.appendChild(frag)
|
||||
if (requestsContainer.children.length === 0)
|
||||
requestsContainer.innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
requestsContainer.addEventListener('click', (e) => {
|
||||
getRef('requests_container').appendChild(frag)
|
||||
if (getRef('requests_container').children.length === 0)
|
||||
getRef('requests_container').innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
getRef('requests_container').addEventListener('click', (e) => {
|
||||
if (e.target.closest('.accept-app')) {
|
||||
let btn = e.target.closest('.accept-app'),
|
||||
parent = e.target.closest('.request-card');
|
||||
@ -11178,8 +11072,8 @@
|
||||
setTimeout(() => {
|
||||
parent.remove()
|
||||
}, 600)
|
||||
if (requestsContainer.children.length === 0)
|
||||
requestsContainer.innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
if (getRef('requests_container').children.length === 0)
|
||||
getRef('requests_container').innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
}
|
||||
else {
|
||||
notify('Intern already assinged.', 'error')
|
||||
@ -11191,8 +11085,8 @@
|
||||
setTimeout(() => {
|
||||
parent.remove()
|
||||
}, 400)
|
||||
if (requestsContainer.children.length === 0)
|
||||
requestsContainer.innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
if (getRef('requests_container').children.length === 0)
|
||||
getRef('requests_container').innerHTML = '<h4 class="padding">Nothing to see here.</h4>'
|
||||
}
|
||||
})
|
||||
|
||||
@ -11202,15 +11096,15 @@
|
||||
|
||||
//show interns
|
||||
document.getElementById('interns').innerHTML = ``;
|
||||
for (intern in iList) {
|
||||
frag.appendChild(render.internCard(iList[intern], intern, RIBC.getInternRating(intern), 'interns'))
|
||||
for (intern in allInternsList) {
|
||||
frag.appendChild(render.internCard(allInternsList[intern], intern, RIBC.getInternRating(intern), 'interns'))
|
||||
}
|
||||
document.getElementById('interns').appendChild(frag)
|
||||
|
||||
//show project
|
||||
document.getElementById('projects').innerHTML = ``;
|
||||
for (i = 0; i < pList.length; i++) {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(pList[i]).projectName, pList[i]))
|
||||
for (i = 0; i < allProjectsList.length; i++) {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(allProjectsList[i]).projectName, allProjectsList[i], true))
|
||||
}
|
||||
document.getElementById('projects').appendChild(frag)
|
||||
}
|
||||
@ -11222,9 +11116,9 @@
|
||||
|
||||
document.getElementById('best_interns').innerHTML = ``;
|
||||
let limit = 4;
|
||||
newIList.reverse()
|
||||
for (let p = 0; p < newIList.length; p++) {
|
||||
frag.appendChild(render.internCard(newIList[p][1], newIList[p][0], newIList[p][2], 'best_interns'))
|
||||
newInternList.reverse()
|
||||
for (let p = 0; p < newInternList.length; p++) {
|
||||
frag.appendChild(render.internCard(newInternList[p][1], newInternList[p][0], newInternList[p][2], 'best_interns'))
|
||||
limit--;
|
||||
if (!limit)
|
||||
break;
|
||||
@ -11234,13 +11128,13 @@
|
||||
// displays recent projects
|
||||
|
||||
document.getElementById('project_list').innerHTML = '';
|
||||
if (Object.keys(iList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
if (Object.keys(allInternsList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
assignedProjectsList.forEach((project) => {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(project).projectName, project))
|
||||
})
|
||||
}
|
||||
else {
|
||||
pList.forEach((project) => {
|
||||
allProjectsList.forEach((project) => {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(project).projectName, project))
|
||||
})
|
||||
}
|
||||
@ -11287,7 +11181,6 @@
|
||||
if (topic !== '' && description !== '') {
|
||||
RIBC.postInternUpdate({ topic, description })
|
||||
.then((result) => {
|
||||
updateFeed(getRef('update_container'), 8)
|
||||
notify('Update posted', 'success')
|
||||
hidePopup()
|
||||
})
|
||||
@ -11300,23 +11193,21 @@
|
||||
}
|
||||
})
|
||||
|
||||
document.getElementById('update_panel_btn').addEventListener('click', showUpdatePanel)
|
||||
|
||||
getRef('project_explorer').children[1].children[1].innerHTML = ``;
|
||||
getRef('project_explorer').children[1].children[3].innerHTML = ``;
|
||||
if (Object.keys(iList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
getRef('project_explorer').children[0].children[1].innerHTML = ``;
|
||||
getRef('project_explorer').children[0].children[3].innerHTML = ``;
|
||||
if (Object.keys(allInternsList).includes(myFloID) && !floGlobals.subAdmins.includes(myFloID)) {
|
||||
for (i = 0; i < assignedProjectsList.length; i++) {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(assignedProjectsList[i]).projectName, assignedProjectsList[i]))
|
||||
}
|
||||
getRef('project_explorer').children[1].children[1].appendChild(frag)
|
||||
pList = pList.filter(val => !assignedProjectsList.includes(val));
|
||||
getRef('project_explorer').children[0].children[1].appendChild(frag)
|
||||
allProjectsList = allProjectsList.filter(val => !assignedProjectsList.includes(val));
|
||||
}
|
||||
for (i = 0; i < pList.length; i++) {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(pList[i]).projectName, pList[i]))
|
||||
for (i = 0; i < allProjectsList.length; i++) {
|
||||
frag.appendChild(render.projectCard(RIBC.getProjectDetails(allProjectsList[i]).projectName, allProjectsList[i]))
|
||||
}
|
||||
getRef('project_explorer').children[1].children[3].appendChild(frag)
|
||||
getRef('project_explorer').children[0].children[3].appendChild(frag)
|
||||
|
||||
getRef('project_explorer').children[2].addEventListener('click', (event) => {
|
||||
getRef('project_explorer').children[1].addEventListener('click', (event) => {
|
||||
if (event.target.closest('.branch-btn'))
|
||||
showTasksOfBranch(event.target.closest('.branch-btn'), 'project_explorer', 'explorer_task_list')
|
||||
if (event.target.closest('.apply-btn')) {
|
||||
@ -11338,74 +11229,9 @@
|
||||
document.getElementById('all_projects_btn').addEventListener('click', () => {
|
||||
showPage('', 'project_explorer', 'explorer', 'innerPage')
|
||||
})
|
||||
/* document.getElementById('main_nav').addEventListener('click', (event) => {
|
||||
let trgt = event.target.closest('.nav-btn');
|
||||
if (trgt) {
|
||||
appState.btn = trgt.id;
|
||||
appState.offsprings = '';
|
||||
appState.type = '';
|
||||
if (trgt.id === 'dashboard_btn') {
|
||||
showPage(trgt.id, 'dashboard')
|
||||
appState.page = 'dashboard';
|
||||
currentProject = dashboardProject;
|
||||
if (JSON.parse(localStorage.getItem('watchList')).length)
|
||||
showProjectMap(JSON.parse(localStorage.getItem('watchList'))[0], 'status_map')
|
||||
}
|
||||
else if (trgt.id === 'admin_page_btn') {
|
||||
showPage(trgt.id, 'admin_page')
|
||||
appState.page = 'admin_page';
|
||||
|
||||
}
|
||||
else if (trgt.id === 'settings_btn') {
|
||||
showPage(trgt.id, 'settings_page')
|
||||
appState.page = 'settings_page';
|
||||
}
|
||||
else if (trgt.id === 'top_update_btn') {
|
||||
appState.btn = '';
|
||||
showPage('', 'show_all', 'updates', 'innerPage')
|
||||
appState.page = 'show_all';
|
||||
appState.offsprings = 'updates';
|
||||
appState.type = 'innerPage';
|
||||
}
|
||||
if (lastState !== appState.page)
|
||||
history.pushState(appState, null, null)
|
||||
lastState = appState.page;
|
||||
}
|
||||
})
|
||||
document.getElementById('bottom_nav').addEventListener('click', (event) => {
|
||||
let trgt = event.target.closest('.nav-btn');
|
||||
if (trgt) {
|
||||
appState.btn = trgt.id;
|
||||
appState.offsprings = '';
|
||||
appState.type = '';
|
||||
if (trgt.id === 'bottom_dashboard_btn') {
|
||||
showPage(trgt.id, 'dashboard')
|
||||
appState.page = 'dashboard';
|
||||
currentProject = dashboardProject;
|
||||
if (JSON.parse(localStorage.getItem('watchList')).length)
|
||||
showProjectMap(JSON.parse(localStorage.getItem('watchList'))[0], 'status_map')
|
||||
}
|
||||
else if (trgt.id === 'bottom_admin_btn') {
|
||||
showPage(trgt.id, 'admin_page')
|
||||
appState.page = 'admin_page';
|
||||
}
|
||||
else if (trgt.id === 'bottom_update_btn') {
|
||||
showPage(trgt.id, 'show_all', 'updates', 'innerPage')
|
||||
appState.page = 'show_all';
|
||||
appState.offsprings = 'updates';
|
||||
appState.type = 'innerPage';
|
||||
}
|
||||
else if (trgt.id === 'bottom_setting_btn') {
|
||||
showPage(trgt.id, 'settings_page')
|
||||
appState.page = 'settings_page';
|
||||
}
|
||||
if (lastState !== appState.page)
|
||||
history.pushState(appState, null, null)
|
||||
lastState = appState.page;
|
||||
}
|
||||
}) */
|
||||
let greetings = getInternDetails(myFloID)[0] !== undefined ? `Hi, ${getInternDetails(myFloID)[0].split(':')[1]}.<br><p>${myFloID}</p>` : `Hi, there! <br><p>${myFloID}</p>`
|
||||
document.getElementById('username').innerHTML = greetings;
|
||||
let greetings = getInternDetails(myFloID)[0] !== undefined ? `Hi, ${getInternDetails(myFloID)[0].split(':')[1]}` : `Hi, there!`
|
||||
getRef('username').textContent = greetings;
|
||||
getRef('user_flo_id').value = myFloID;
|
||||
|
||||
console.log(typeOfUser)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user