UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Launchboard
launchboard-fe
Commits
6ca2d61c
Commit
6ca2d61c
authored
Feb 24, 2021
by
hunter.congress
Browse files
adding updating teams teams
parents
ac0325ef
89d22398
Changes
39
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
111 additions
and
81 deletions
+111
-81
package-lock.json
package-lock.json
+15
-22
src/api/http-common.js
src/api/http-common.js
+1
-3
src/api/services/training.js
src/api/services/training.js
+2
-2
src/components/AddCourse.vue
src/components/AddCourse.vue
+2
-2
src/components/EditableInput.vue
src/components/EditableInput.vue
+0
-2
src/components/PersonnelTable.vue
src/components/PersonnelTable.vue
+5
-3
src/components/ProjectsSummary.vue
src/components/ProjectsSummary.vue
+19
-13
src/components/UserSelect.vue
src/components/UserSelect.vue
+0
-1
src/store/action-types.js
src/store/action-types.js
+1
-1
src/utils/tableHelpers.js
src/utils/tableHelpers.js
+3
-3
src/views/Launchboard.vue
src/views/Launchboard.vue
+12
-6
src/views/Projects.vue
src/views/Projects.vue
+1
-1
src/views/Resources.vue
src/views/Resources.vue
+3
-3
src/views/Settings.vue
src/views/Settings.vue
+3
-1
src/views/Team.vue
src/views/Team.vue
+5
-3
src/views/TrainingDetails.vue
src/views/TrainingDetails.vue
+0
-4
src/views/super-admin/Training.vue
src/views/super-admin/Training.vue
+5
-5
tests/unit/App.spec.js
tests/unit/App.spec.js
+2
-0
tests/unit/InitialLoadingApp.spec.js
tests/unit/InitialLoadingApp.spec.js
+1
-1
tests/unit/api/http-common.spec.js
tests/unit/api/http-common.spec.js
+31
-5
No files found.
package-lock.json
View file @
6ca2d61c
...
@@ -176,12 +176,6 @@
...
@@ -176,12 +176,6 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
"dev": true
},
},
"semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true
},
"source-map": {
"source-map": {
"version": "0.5.7",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
...
@@ -561,16 +555,10 @@
...
@@ -561,16 +555,10 @@
}
}
}
}
},
},
"semver": {
"lodash": {
"version": "6.3.0",
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true
"dev": true
}
}
}
}
...
@@ -1584,6 +1572,12 @@
...
@@ -1584,6 +1572,12 @@
}
}
}
}
},
},
"lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true
},
"source-map": {
"source-map": {
"version": "0.5.7",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
...
@@ -3871,6 +3865,11 @@
...
@@ -3871,6 +3865,11 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
},
"minimist": {
"version": "1.2.5",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"punycode": {
"punycode": {
"version": "1.4.1",
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
...
@@ -13042,12 +13041,6 @@
...
@@ -13042,12 +13041,6 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
},
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true
},
"lodash.defaultsdeep": {
"lodash.defaultsdeep": {
"version": "4.6.1",
"version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
...
...
src/api/http-common.js
View file @
6ca2d61c
...
@@ -5,6 +5,4 @@ export const HTTP = axios.create({
...
@@ -5,6 +5,4 @@ export const HTTP = axios.create({
// add headers or common stuff here
// add headers or common stuff here
});
});
HTTP
.
interceptors
.
response
.
use
(
function
(
response
)
{
HTTP
.
interceptors
.
response
.
use
((
response
)
=>
response
?.
data
?.
result
);
return
response
?.
data
?.
result
;
});
src/api/services/training.js
View file @
6ca2d61c
...
@@ -11,7 +11,7 @@ export default {
...
@@ -11,7 +11,7 @@ export default {
return
await
HTTP
.
delete
(
`/courses/
${
courseId
}
`
);
return
await
HTTP
.
delete
(
`/courses/
${
courseId
}
`
);
},
},
async
addInstructor
(
courseId
,
instructor
)
{
async
addInstructor
(
courseId
,
instructor
)
{
return
await
HTTP
.
post
(
`/courses/
${
courseId
}
/instructor`
,
instructor
);
return
await
HTTP
.
post
(
`/courses/
${
courseId
}
/instructor
s
`
,
instructor
);
},
},
async
addCourse
(
course
)
{
async
addCourse
(
course
)
{
return
await
HTTP
.
post
(
"
/courses
"
,
course
);
return
await
HTTP
.
post
(
"
/courses
"
,
course
);
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
return
await
HTTP
.
put
(
`/courses/
${
courseId
}
`
,
course
);
return
await
HTTP
.
put
(
`/courses/
${
courseId
}
`
,
course
);
},
},
async
addStudent
(
courseId
,
student
)
{
async
addStudent
(
courseId
,
student
)
{
return
await
HTTP
.
post
(
`/courses/
${
courseId
}
/registration`
,
student
);
return
await
HTTP
.
post
(
`/courses/
${
courseId
}
/registration
s
`
,
student
);
},
},
async
addStudents
(
courseId
,
students
)
{
async
addStudents
(
courseId
,
students
)
{
for
(
const
student
of
students
)
{
for
(
const
student
of
students
)
{
...
...
src/components/AddC
lass
.vue
→
src/components/AddC
ourse
.vue
View file @
6ca2d61c
...
@@ -158,7 +158,7 @@
...
@@ -158,7 +158,7 @@
:disabled=
"!valid"
:disabled=
"!valid"
color=
"primary"
color=
"primary"
:loading=
"addBusy"
:loading=
"addBusy"
@
click=
"addC
lass
()"
@
click=
"addC
ourse
()"
>
>
Add Class
Add Class
</v-btn>
</v-btn>
...
@@ -197,7 +197,7 @@ export default {
...
@@ -197,7 +197,7 @@ export default {
this
.
$emit
(
"
cancel
"
);
this
.
$emit
(
"
cancel
"
);
this
.
init
();
this
.
init
();
},
},
addC
lass
()
{
addC
ourse
()
{
this
.
$emit
(
"
add
"
,
this
.
toAdd
);
this
.
$emit
(
"
add
"
,
this
.
toAdd
);
this
.
init
();
this
.
init
();
},
},
...
...
src/components/EditableInput.vue
View file @
6ca2d61c
...
@@ -115,8 +115,6 @@ export default {
...
@@ -115,8 +115,6 @@ export default {
.
getComputedStyle
(
this
.
$refs
.
defaultSlot
)
.
getComputedStyle
(
this
.
$refs
.
defaultSlot
)
.
getPropertyValue
(
"
font-size
"
);
.
getPropertyValue
(
"
font-size
"
);
console
.
log
(
"
+++ startEditing
"
,
width
,
fontSize
);
// set focus to the input element
// set focus to the input element
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
const
editInput
=
this
.
getEditingInput
();
const
editInput
=
this
.
getEditingInput
();
...
...
src/components/PersonnelTable.vue
View file @
6ca2d61c
...
@@ -89,7 +89,7 @@ export default {
...
@@ -89,7 +89,7 @@ export default {
return
{
return
{
inputRules
,
inputRules
,
loading
:
true
,
loading
:
true
,
initialLoad
:
fals
e
,
initialLoad
:
tru
e
,
total
:
0
,
total
:
0
,
footerProps
:
DEFAULT_FOOTER_PROPS
,
footerProps
:
DEFAULT_FOOTER_PROPS
,
params
:
{
params
:
{
...
@@ -174,7 +174,8 @@ export default {
...
@@ -174,7 +174,8 @@ export default {
this
.
personnel
.
listItems
=
data
;
this
.
personnel
.
listItems
=
data
;
this
.
total
=
response
.
meta
.
total
;
this
.
total
=
response
.
meta
.
total
;
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
"
!teams error!
"
,
error
);
// TODO: no error messages to the user?!
console
.
error
(
"
!personnel error!
"
,
error
);
}
finally
{
}
finally
{
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
fetchingData
=
false
;
this
.
fetchingData
=
false
;
...
@@ -186,6 +187,7 @@ export default {
...
@@ -186,6 +187,7 @@ export default {
user
.
personnelType
=
null
;
user
.
personnelType
=
null
;
return
user
;
return
user
;
});
});
// TODO: this should be wrapped in a try/catch
await
UserService
.
updateUserPersonnelType
(
selectedPersonnel
);
await
UserService
.
updateUserPersonnelType
(
selectedPersonnel
);
const
removeStudentIds
=
this
.
personnel
.
selectedPersonnel
.
map
(
const
removeStudentIds
=
this
.
personnel
.
selectedPersonnel
.
map
(
({
id
})
=>
id
({
id
})
=>
id
...
@@ -211,7 +213,7 @@ export default {
...
@@ -211,7 +213,7 @@ export default {
return
this
.
personnel
.
listItems
;
return
this
.
personnel
.
listItems
;
},
},
async
updateUserPermissions
(
userData
)
{
async
updateUserPermissions
(
userData
)
{
await
UserService
.
updateUserPermission
([
userData
]);
UserService
.
updateUserPermission
([
userData
]);
},
},
},
},
watch
:
{
watch
:
{
...
...
src/components/ProjectsSummary.vue
View file @
6ca2d61c
...
@@ -5,7 +5,11 @@
...
@@ -5,7 +5,11 @@
class=
"background-transparent"
class=
"background-transparent"
type=
"list-item@3"
type=
"list-item@3"
>
>
<v-card
v-if=
"emptyString"
>
<v-card
v-if=
"error"
>
<v-card-title>
Something went wrong...
</v-card-title>
<v-card-text>
Use the refresh button in panel to try again.
</v-card-text>
</v-card>
<v-card
v-else-if=
"emptyString"
>
<v-card-title>
You currently don't have any projects!
</v-card-title>
<v-card-title>
You currently don't have any projects!
</v-card-title>
<v-card-text
<v-card-text
>
Your starred GitLab projects will appear here. Go to
>
Your starred GitLab projects will appear here. Go to
...
@@ -241,6 +245,7 @@ export default {
...
@@ -241,6 +245,7 @@ export default {
data
:
()
=>
({
data
:
()
=>
({
loading
:
false
,
loading
:
false
,
emptyString
:
false
,
emptyString
:
false
,
error
:
false
,
}),
}),
async
mounted
()
{
async
mounted
()
{
try
{
try
{
...
@@ -248,12 +253,8 @@ export default {
...
@@ -248,12 +253,8 @@ export default {
await
this
.
refreshProjects
();
await
this
.
refreshProjects
();
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
error
(
error
);
console
.
error
(
error
);
}
finally
{
// TODO: remove fake wait
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
2000
);
}
}
this
.
loading
=
false
;
},
},
methods
:
{
methods
:
{
...
mapMutations
({
...
mapMutations
({
...
@@ -263,13 +264,18 @@ export default {
...
@@ -263,13 +264,18 @@ export default {
if
(
this
.
setProjectLoading
)
{
if
(
this
.
setProjectLoading
)
{
this
.
setProjectLoading
(
true
);
this
.
setProjectLoading
(
true
);
}
}
const
projects
=
await
ProjectService
.
getProjectsSummary
();
this
.
error
=
false
;
if
(
projects
)
{
this
.
emptyString
=
false
;
this
.
setProjects
(
projects
);
try
{
this
.
emptyString
=
false
;
const
projects
=
await
ProjectService
.
getProjectsSummary
();
}
if
(
projects
)
{
if
(
projects
.
length
===
0
)
{
this
.
setProjects
(
projects
);
this
.
emptyString
=
true
;
}
if
(
projects
.
length
===
0
)
{
this
.
emptyString
=
true
;
}
}
catch
(
e
)
{
this
.
error
=
true
;
}
}
if
(
this
.
setProjectLoading
)
{
if
(
this
.
setProjectLoading
)
{
this
.
setProjectLoading
(
false
);
this
.
setProjectLoading
(
false
);
...
...
src/components/UserSelect.vue
View file @
6ca2d61c
...
@@ -153,7 +153,6 @@ export default {
...
@@ -153,7 +153,6 @@ export default {
},
},
async
query
(
val
)
{
async
query
(
val
)
{
try
{
try
{
console
.
log
(
"
val:
"
,
val
);
const
newItems
=
await
UserService
.
search
({
q
:
val
});
const
newItems
=
await
UserService
.
search
({
q
:
val
});
if
(
this
.
model
)
{
if
(
this
.
model
)
{
if
(
Array
.
isArray
(
this
.
model
))
{
if
(
Array
.
isArray
(
this
.
model
))
{
...
...
src/store/action-types.js
View file @
6ca2d61c
export
const
CALL_SET_USER_PREFERENCE
=
"
user_preferences/callSetUserProjects
"
;
export
const
CALL_SET_USER_PREFERENCE
=
"
user_preferences/callSetUserProjects
"
;
src/utils/tableHelpers.js
View file @
6ca2d61c
export
const
createDefaultPaginationParams
=
(
options
,
additional
=
{})
=>
{
export
const
createDefaultPaginationParams
=
(
options
,
additional
=
{})
=>
{
const
{
overwrite
}
=
additional
;
const
{
overwrite
}
=
additional
;
let
sortBy
=
options
.
sortBy
[
0
];
let
sortBy
=
options
.
sortBy
?.
[
0
];
const
sortDesc
=
options
.
sortDesc
[
0
];
const
sortDesc
=
options
.
sortDesc
?.
[
0
];
const
page
=
options
.
page
;
const
page
=
options
.
page
;
const
pageSize
=
options
.
itemsPerPage
===
-
1
?
50
0
:
options
.
itemsPerPage
;
const
pageSize
=
options
.
itemsPerPage
===
-
1
?
2
0
:
options
.
itemsPerPage
;
if
(
overwrite
?.
sortBy
&&
sortBy
===
overwrite
?.
sortBy
?.
from
)
{
if
(
overwrite
?.
sortBy
&&
sortBy
===
overwrite
?.
sortBy
?.
from
)
{
sortBy
=
overwrite
.
sortBy
.
to
;
sortBy
=
overwrite
.
sortBy
.
to
;
...
...
src/views/Launchboard.vue
View file @
6ca2d61c
...
@@ -11,23 +11,29 @@
...
@@ -11,23 +11,29 @@
/>
/>
<ErrorMessage
/>
<ErrorMessage
/>
<Section
class=
"mt-6"
v-if=
"showWelcomeMessage"
>
<Section
class=
"mt-6"
v-if=
"showWelcomeMessage"
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
Welcome to Platform One
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5 text-left"
>
Welcome to Platform One
</h4>
<WelcomeSummary
slot=
"content"
/>
<WelcomeSummary
slot=
"content"
/>
</Section>
</Section>
<Section
class=
"mt-6"
>
<Section
class=
"mt-6"
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
My Curriculum Schedule
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5 text-left"
>
My Curriculum Schedule
</h4>
<CurriculumSchedule
slot=
"content"
/>
<CurriculumSchedule
slot=
"content"
/>
</Section>
</Section>
<Section
class=
"mt-6"
>
<Section
class=
"mt-6"
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
System Status
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5
text-left
"
>
System Status
</h4>
<SystemStatusSummary
slot=
"content"
/>
<SystemStatusSummary
slot=
"content"
/>
</Section>
</Section>
</v-col>
</v-col>
<v-col
cols=
"12"
lg=
"6"
class=
"d-flex flex-column py-0 pt-lg-3"
>
<v-col
cols=
"12"
lg=
"6"
class=
"d-flex flex-column py-0 pt-lg-3"
>
<Section>
<Section>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
My Project Summary
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5 text-left"
>
My Project Summary
</h4>
<span
slot=
"header-right"
>
<span
slot=
"header-right"
>
<v-tooltip
top
>
<v-tooltip
top
>
<template
v-slot:activator=
"
{ on, attrs }">
<template
v-slot:activator=
"
{ on, attrs }">
...
@@ -52,11 +58,11 @@
...
@@ -52,11 +58,11 @@
/>
/>
</Section>
</Section>
<Section
class=
"mt-6"
>
<Section
class=
"mt-6"
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
Help Desk
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5
text-left
"
>
Help Desk
</h4>
<HelpDeskSummary
slot=
"content"
/>
<HelpDeskSummary
slot=
"content"
/>
</Section>
</Section>
<Section
class=
"mt-6"
>
<Section
class=
"mt-6"
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
Tools
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5
text-left
"
>
Tools
</h4>
<ToolsSummary
slot=
"content"
/>
<ToolsSummary
slot=
"content"
/>
</Section>
</Section>
</v-col>
</v-col>
...
...
src/views/Projects.vue
View file @
6ca2d61c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<v-row>
<v-row>
<v-col
cols=
"12"
class=
"d-flex flex-column pb-0 pb-lg-3"
>
<v-col
cols=
"12"
class=
"d-flex flex-column pb-0 pb-lg-3"
>
<Section
class=
"mt-6"
hideCollapseButton
>
<Section
class=
"mt-6"
hideCollapseButton
>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
My Projects
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5
text-left
"
>
My Projects
</h4>
<span
slot=
"header-right"
>
<span
slot=
"header-right"
>
<v-tooltip
top
>
<v-tooltip
top
>
<template
v-slot:activator=
"
{ on, attrs }">
<template
v-slot:activator=
"
{ on, attrs }">
...
...
src/views/Resources.vue
View file @
6ca2d61c
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<v-row
class=
"justify-content-left"
>
<v-row
class=
"justify-content-left"
>
<v-col
cols=
"12"
lg=
"4"
md=
"6"
sm=
"12"
class=
"py-0 pt-lg-3"
>
<v-col
cols=
"12"
lg=
"4"
md=
"6"
sm=
"12"
class=
"py-0 pt-lg-3"
>
<Section
hideCollapseButton
>
<Section
hideCollapseButton
>
<h4
slot=
"header"
class=
"mt-4 w-100"
>
<h4
slot=
"header"
class=
"mt-4 w-100
text-left
"
>
ABMS ADCE Party Bus Survival Guide
ABMS ADCE Party Bus Survival Guide
</h4>
</h4>
<div
slot=
"content"
>
<div
slot=
"content"
>
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<v-row>
<v-row>
<v-col>
<v-col>
<Section
hide-collapse-button
>
<Section
hide-collapse-button
>
<h4
slot=
"header"
>
Training Resources
</h4>
<h4
slot=
"header"
class=
"text-left"
>
Training Resources
</h4>
<div
slot=
"content"
class=
"d-flex flex-column"
>
<div
slot=
"content"
class=
"d-flex flex-column"
>
<div
class=
"text-left pl-10 link-column"
>
<div
class=
"text-left pl-10 link-column"
>
<a
<a
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
<v-row>
<v-row>
<v-col>
<v-col>
<Section
hide-collapse-button
>
<Section
hide-collapse-button
>
<h4
slot=
"header"
>
Self-Learning Videos
</h4>
<h4
slot=
"header"
class=
"text-left"
>
Self-Learning Videos
</h4>
<div
slot=
"content"
class=
"d-flex flex-column"
>
<div
slot=
"content"
class=
"d-flex flex-column"
>
<div
class=
"text-left pl-10 link-column"
>
<div
class=
"text-left pl-10 link-column"
>
Kubernetes -
Kubernetes -
...
...
src/views/Settings.vue
View file @
6ca2d61c
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
<v-row>
<v-row>
<v-col
cols=
"12"
lg=
"6"
class=
"d-flex flex-column pb-0 pb-lg-3"
>
<v-col
cols=
"12"
lg=
"6"
class=
"d-flex flex-column pb-0 pb-lg-3"
>
<Section>
<Section>
<h4
slot=
"header"
class=
"ma-0 pl-5"
>
Launchboard Settings
</h4>
<h4
slot=
"header"
class=
"ma-0 pl-5 text-left"
>
Launchboard Settings
</h4>
<LaunchboardSettings
slot=
"content"
/>
<LaunchboardSettings
slot=
"content"
/>
</Section>
</Section>
</v-col>
</v-col>
...
...
src/views/Team.vue
View file @
6ca2d61c
...
@@ -229,7 +229,7 @@ import UserSelect from "@/components/UserSelect";
...
@@ -229,7 +229,7 @@ import UserSelect from "@/components/UserSelect";
import
AddTeam
from
"
@/components/AddTeam
"
;
import
AddTeam
from
"
@/components/AddTeam
"
;
import
{
defaultSnackbarTimeout
}
from
"
@/config/config
"
;
import
{
defaultSnackbarTimeout
}
from
"
@/config/config
"
;
import
inputRules
from
"
@/utils/inputRules
"
;
import
inputRules
from
"
@/utils/inputRules
"
;
import
Roles
from
"
@/config/user-permissions
"
;
import
Permission
from
"
@/config/user-permissions
"
;
export
default
{
export
default
{
components
:
{
UserSelect
,
AddTeam
},
components
:
{
UserSelect
,
AddTeam
},
...
@@ -281,12 +281,12 @@ export default {
...
@@ -281,12 +281,12 @@ export default {
// Admin and Dojo Master don't have a team, so redirect them since
// Admin and Dojo Master don't have a team, so redirect them since
// they don't have a reason to be on this page without a specific id
// they don't have a reason to be on this page without a specific id
this
.
user
=
this
.
$store
.
state
.
user
.
user
;
this
.
user
=
this
.
$store
.
state
.
user
.
user
;
if
(
this
.
user
.
role
!==
Roles
.
USER
)
{
if
(
this
.
user
.
permission
!==
Permission
.
USER
)
{
console
.
warn
(
"
redirecting privileged user to /teams
"
);
console
.
warn
(
"
redirecting privileged user to /teams
"
);
this
.
$router
.
push
(
"
/teams
"
);
this
.
$router
.
push
(
"
/teams
"
);
}
else
{
}
else
{
// get the current user's team
// get the current user's team
this
.
team
=
await
TeamService
.
getTeam
ForUser
();
this
.
team
=
await
TeamService
.
get
My
Team
();
}
}
}
else
{
}
else
{
console
.
log
(
"
THIS CANNOT BE ME
"
);
console
.
log
(
"
THIS CANNOT BE ME
"
);
...
@@ -410,6 +410,7 @@ export default {
...
@@ -410,6 +410,7 @@ export default {
);
);
this
.
snackbars
.
delete
=
true
;
this
.
snackbars
.
delete
=
true
;
}
catch
(
e
)
{
}
catch
(
e
)
{
// TODO: no user notification of the error???
console
.
error
(
"
error deleting member:
"
,
e
);
console
.
error
(
"
error deleting member:
"
,
e
);
}
finally
{
}
finally
{
this
.
deletingMembers
.
forEach
((
m
)
=>
Vue
.
set
(
m
,
"
isDeleting
"
,
false
));
this
.
deletingMembers
.
forEach
((
m
)
=>
Vue
.
set
(
m
,
"
isDeleting
"
,
false
));
...
@@ -428,6 +429,7 @@ export default {
...
@@ -428,6 +429,7 @@ export default {
this
.
$route
.
params
.
teamId
this
.
$route
.
params
.
teamId
);
);
}
catch
(
e
)
{
}
catch
(
e
)
{
//TODO: error message to the user???
console
.
error
(
"
error restoring member:
"
,
e
);
console
.
error
(
"
error restoring member:
"
,
e
);
}
finally
{
}
finally
{
await
this
.
getTeams
();
await
this
.
getTeams
();
...
...
src/views/TrainingDetails.vue
View file @
6ca2d61c
...
@@ -363,11 +363,9 @@ export default {
...
@@ -363,11 +363,9 @@ export default {
}),
}),
computed
:
{
computed
:
{
getSelectedPocs
()
{
getSelectedPocs
()
{
console
.
log
(
this
.
selectedPocs
);
return
this
.
selectedPocs
;
return
this
.
selectedPocs
;
},
},
getSelectedStudents
()
{
getSelectedStudents
()
{
console
.
log
(
this
.
selectedStudents
);
return
this
.
selectedStudents
;
return
this
.
selectedStudents
;
},
},
},
},
...
@@ -376,12 +374,10 @@ export default {
...
@@ -376,12 +374,10 @@ export default {
this
.
trainingCourse
=
await
TrainingService
.
getCourse
(
this
.
trainingCourse
=
await
TrainingService
.
getCourse
(
this
.
$route
.
params
.
trainingId
this
.
$route
.
params
.
trainingId
);
);
console
.
log
(
this
.
trainingCourse
);
this
.
loading
=
false
;
this
.
loading
=
false
;
},
},
methods
:
{
methods
:
{
removeSelectedStudent
()
{
removeSelectedStudent
()
{
console
.
log
(
this
.
getSelectedStudents
);
const
removeStudentIds
=
this
.
getSelectedStudents
.
map
(
const
removeStudentIds
=
this
.
getSelectedStudents
.
map
(
(
student
)
=>
student
.
id
(
student
)
=>
student
.
id
);
);
...
...
src/views/super-admin/Training.vue
View file @
6ca2d61c
...
@@ -109,10 +109,10 @@
...
@@ -109,10 +109,10 @@
</v-row>
</v-row>
</v-container>
</v-container>
<AddC
lass
<AddC
ourse
v-if=
"state.isAdding"
v-if=
"state.isAdding"
@
cancel=
"state.isAdding = false"
@
cancel=
"state.isAdding = false"
@
add=
"addC
lass
"
@
add=
"addC
ourse
"
:add-busy=
"state.isAddingBusy"
:add-busy=
"state.isAddingBusy"
/>
/>
</template>
</template>
...
@@ -269,7 +269,7 @@
...
@@ -269,7 +269,7 @@
<
script
>
<
script
>
import
Vue
from
"
vue
"
;
import
Vue
from
"
vue
"
;
import
TrainingService
from
"
@/api/services/training
"
;
import
TrainingService
from
"
@/api/services/training
"
;
import
AddC
lass
from
"
@/components/AddC
lass
"
;
import
AddC
ourse
from
"
@/components/AddC
ourse
"
;
import
{
defaultSnackbarTimeout
,
debounceTimeout
}
from
"
@/config/config
"
;
import
{
defaultSnackbarTimeout
,
debounceTimeout
}
from
"
@/config/config
"
;
import
{
trainingTypes
}
from
"
@/config/reference-data
"
;
import
{
trainingTypes
}
from
"
@/config/reference-data
"
;
import
isEqual
from
"
lodash/isEqual
"
;
import
isEqual
from
"
lodash/isEqual
"
;
...
@@ -283,7 +283,7 @@ import { createDefaultPaginationParams } from "@/utils/tableHelpers";
...
@@ -283,7 +283,7 @@ import { createDefaultPaginationParams } from "@/utils/tableHelpers";
export
default
{
export
default
{
components
:
{
components
:
{
AddC
lass
,
AddC
ourse
,
},
},
data
:
()
=>
({
data
:
()
=>
({
initialLoad
:
true
,
initialLoad
:
true
,
...
@@ -387,7 +387,7 @@ export default {
...
@@ -387,7 +387,7 @@ export default {
}
}
},
},
async
addC
lass
(
toAdd
)
{
async
addC
ourse
(
toAdd
)
{
this
.
state
.
isAddingBusy
=
true
;
this
.
state
.
isAddingBusy
=
true
;
toAdd
.
seats
=
{
toAdd
.
seats
=
{
...
...
tests/unit/App.spec.js
View file @
6ca2d61c
...
@@ -38,6 +38,7 @@ describe("Launchboard InitialLoadingApp", () => {
...
@@ -38,6 +38,7 @@ describe("Launchboard InitialLoadingApp", () => {
},
},
},
},
},
},
stubs
:
[
"
router-view
"
],
localVue
,
localVue
,
vuetify
,
vuetify
,
});
});
...
@@ -58,6 +59,7 @@ describe("Launchboard InitialLoadingApp", () => {
...
@@ -58,6 +59,7 @@ describe("Launchboard InitialLoadingApp", () => {
},
},
},
},
},
},
stubs
:
[
"
router-view
"
],
localVue
,
localVue
,
vuetify
,
vuetify
,
});
});
...
...
tests/unit/InitialLoadingApp.spec.js
View file @
6ca2d61c
...
@@ -41,7 +41,7 @@ describe("Launchboard InitialLoadingApp", () => {
...
@@ -41,7 +41,7 @@ describe("Launchboard InitialLoadingApp", () => {
it
(
"
should show launch state
"
,
async
()
=>
{
it
(
"
should show launch state
"
,
async
()
=>
{
const
wrapper
=
shallowMount
(
InitialLoadingApp
);
const
wrapper
=
shallowMount
(
InitialLoadingApp
);
wrapper
.
vm
.
$commit
=
jest
.
fn
();
wrapper
.
vm
.
$destroy
=
jest
.
fn
();
wrapper
.
vm
.
$destroy
=
jest
.
fn
();
wrapper
.
vm
.
showLaunch
();
wrapper
.
vm
.
showLaunch
();
...
...
tests/unit/api/http-common.spec.js
View file @
6ca2d61c
import
{
HTTP
}
from
"
@/api/http-common
"
;
import
{
HTTP
}
from
"
@/api/http-common
"
;
import
axios
from
"
axios
"
;
describe
(
"
api/services
"
,
()
=>
{
describe
(
"
api/services
"
,
()
=>
{
describe
(
"
should call HTTP
"
,
()
=>
{
it
(
"
HTTP should be instance of axios
"
,
()
=>
{
test
(
"
HTTP
"
,
async
()
=>
{
const
shouldEqualInstance
=
axios
.
create
({});
const
res
=
await
HTTP
.
get
(
"
test
"
);
expect
(
HTTP
.
constructor
.
name
).
toEqual
(
shouldEqualInstance
.
constructor
.
name
);
expect
(
res
).
toEqual
(
undefined
);
});
});
it
(
"
HTTP.get should be function
"
,
()
=>
{
expect
(
typeof
HTTP
.
get
).
toEqual
(
"
function
"
);
});
it
(
"
HTTP.delete should be function
"
,
()
=>
{
expect
(
typeof
HTTP
.
delete
).
toEqual
(
"
function
"
);
});
it
(
"
HTTP.put should be function
"
,
()
=>
{
expect
(
typeof
HTTP
.
put
).
toEqual
(
"
function
"
);
});
it
(
"
HTTP.post should be function
"
,
()
=>
{
expect
(
typeof
HTTP
.
post
).
toEqual
(
"
function
"
);
});
it
(
"
should test interceptor
"
,
()
=>
{
expect
(
HTTP
.
interceptors
.
response
.
handlers
[
0
].
fulfilled
({
data
:
{
result
:
"
mock result
"
},
})
).
toEqual
(
"
mock result
"
);
expect
(
HTTP
.
interceptors
.
response
.
handlers
[
0
].
fulfilled
({
data
:
{},
})
).
toBeUndefined
();
expect
(
HTTP
.
interceptors
.
response
.
handlers
[
0
].
fulfilled
({})
).
toBeUndefined
();
});
});
});
});
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment