Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/cts2 #32

Merged
merged 22 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
20463aa
Web service to retrieve evaluatees by instance and indicate whether t…
bsedwards Aug 22, 2024
15d0605
Creating student app in VueApp
bsedwards Sep 4, 2024
d8855ee
Class Year import
bsedwards Sep 5, 2024
2dea492
Merge branch 'feature/StudentClassYear' into feature/CTS2
bsedwards Sep 12, 2024
aa8c72e
Adding remaining CTS db classes
bsedwards Sep 12, 2024
ff57e3b
Student results view
bsedwards Sep 16, 2024
918016e
Competencies/Roles/Bundles work in progress
bsedwards Sep 17, 2024
18fde74
Working on bundles
bsedwards Sep 19, 2024
c864745
temp fix
bsedwards Sep 19, 2024
f5b70e3
Assessment bubble click dialog. Bundle Comps role and order.
bsedwards Sep 20, 2024
41ff6ff
Fixing assessments header and entered by text
bsedwards Sep 20, 2024
3514a8d
Manage competencies page
bsedwards Sep 24, 2024
6759238
Adding ManageMilestones page. Fixing minor issues with Bundles and Co…
bsedwards Sep 26, 2024
116551b
Building vueapp with build-test on test server
bsedwards Sep 27, 2024
b92ce25
Adding service to my assessments. Restricting view all assessments to…
bsedwards Oct 1, 2024
d006900
Beginning course competency management and legacy competency mapping
bsedwards Oct 7, 2024
44ca628
Session Competencies management
bsedwards Oct 10, 2024
f575573
Fixing some competency validation
bsedwards Oct 14, 2024
71c4e44
Adding order column for competencies
bsedwards Oct 14, 2024
9ac6ca0
Better front end permission validation
bsedwards Oct 14, 2024
0e63e79
Using more specific permissions
bsedwards Oct 15, 2024
25e66ae
Merge branch 'main' into feature/CTS2
bsedwards Oct 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions JenkinsFile
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,17 @@ pipeline {
}
}
stage('Clean Previous Build') {
steps {
bat '"C:\\Program Files\\dotnet\\dotnet" clean Viper.sln'
}
}
stage('Build Vue App') {
steps {
bat 'pushd VueApp && npm install && popd'
bat 'npm run --prefix VueApp build'
bat '"C:\\Program Files\\dotnet\\dotnet" clean Viper.sln'
}
}
stage('Build for test') {
when {
expression { params.Branch == 'development' }
}
steps {
bat 'pushd VueApp && npm install && popd'
bat 'npm run --prefix VueApp build-test'
bat '"C:\\Program Files\\dotnet\\dotnet" publish ./web/Viper.csproj -c "Release" /p:EnvironmentName=Test'
}
}
Expand All @@ -57,6 +53,8 @@ pipeline {
expression { params.Branch == 'master' || params.Branch == "main" }
}
steps {
bat 'pushd VueApp && npm install && popd'
bat 'npm run --prefix VueApp build'
bat '"C:\\Program Files\\dotnet\\dotnet" publish ./web/Viper.csproj -c "Release" /p:EnvironmentName=Production'
}
}
Expand Down
5 changes: 3 additions & 2 deletions VueApp/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_URL="/api/"
VITE_API_URL = "/api/"
VITE_VIPER_HOME = "/"
VITE_ENVIRONMENT="DEVELOPMENT"
VITE_ENVIRONMENT = "DEVELOPMENT"
VITE_VIPER_1_HOME = "http://localhost/"
5 changes: 3 additions & 2 deletions VueApp/.env.production
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_URL="/2/api/"
VITE_API_URL = "/2/api/"
VITE_VIPER_HOME = "/2/"
VITE_ENVIRONMENT="PRODUCTION"
VITE_ENVIRONMENT = "PRODUCTION"
VITE_VIPER_1_HOME = "/"
5 changes: 3 additions & 2 deletions VueApp/.env.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_URL="/2/api/"
VITE_API_URL = "/2/api/"
VITE_VIPER_HOME = "/2/"
VITE_ENVIRONMENT="TEST"
VITE_ENVIRONMENT = "TEST"
VITE_VIPER_1_HOME = "/"
872 changes: 475 additions & 397 deletions VueApp/package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions VueApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
"build-only-test": "vite build --mode test"
},
"dependencies": {
"@quasar/extras": "^1.16.11",
"@quasar/extras": "^1.16.12",
"@vueuse/core": "^11.1.0",
"chart.js": "^4.4.3",
"pinia": "^2.1.7",
"quasar": "^2.16.4",
"quasar": "^2.16.11",
"vue": "^3.4.21",
"vue-chartjs": "^5.3.1",
"vue-router": "^4.3.3",
Expand Down
110 changes: 110 additions & 0 deletions VueApp/src/CTS/assets/cts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
.assessmentGroup {
border-top: 1px solid silver;
}
/*
.assessmentbubble {
width: 15px;
height: 15px;
margin-left: 5px;
margin-right: 5px;
border-radius: 50%;
display: inline-block;
}

.assessmentbubble.ab5_1 {
background-color: rgba(174,235,255,1);
}

.assessmentbubble.ab5_2 {
background-color: rgba(134,198,255,1);
}

.assessmentbubble.ab5_3 {
background-color: rgba(62,127,238,1);
}

.assessmentbubble.ab5_4 {
background-color: rgba(0,44,219,1);
}

.assessmentbubble.ab5_5 {
background-color: rgba(11,3,139,1);
}

.assessmentIcon.ab5_1 {
color: rgba(174,235,255,1);
}

.assessmentIcon.ab5_2 {
color: rgba(134,198,255,1);
}

.assessmentIcon.ab5_3 {
color: rgba(62,127,238,1);
}

.assessmentIcon.ab5_4 {
color: rgba(0,44,219,1);
}

.assessmentIcon.ab5_5 {
color: rgba(11,3,139,1);
}
*/
.assessmentBubble5_1 {
color: rgba(62,127,238,.3);
}

.assessmentBubble5_2 {
color: rgba(62,127,238,.7);
}

.assessmentBubble5_3 {
color: rgba(62,127,238,1);
}

.assessmentBubble5_4 {
color: rgba(0,44,175,.8);
}

.assessmentBubble5_5 {
color: rgba(11,3,139,1);
}

.assessmentBubbleCloser5_1 {
color: rgba(2,40,150,.7);
}

.assessmentBubbleCloser5_2 {
color: rgba(2,40,150,.8);
}

.assessmentBubbleCloser5_3 {
color: rgba(2,40,150,.9);
}

.assessmentBubbleCloser5_4 {
color: rgba(2,40,150,.95);
}

.assessmentBubbleCloser5_5 {
color: rgba(2,40,150,1);
}

/*
.assessmentbubble.ab5_1 {
background-color: rgb(169, 208, 255)
}
.assessmentbubble.ab5_2 {
background-color: rgb(121, 158, 223)
}
.assessmentbubble.ab5_3 {
background-color: rgb(78, 108, 189)
}
.assessmentbubble.ab5_4 {
background-color: rgb(42, 60, 152)
}
.assessmentbubble.ab5_5 {
background-color: rgb(0, 11, 113)
}
*/
71 changes: 71 additions & 0 deletions VueApp/src/CTS/components/AssessmentBubble.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<script setup lang="ts">
import { defineProps, defineEmits, ref, watch } from 'vue'

const props = defineProps({
maxValue: {
type: Number,
required: true
},
value: {
type: Number,
required: true
},
text: {
type: String
},
type: {
type: String,
default: "bubble"
},
id: {
type: Number,
required: false
},
})

const emit = defineEmits(["bubbleClick"])

const classes5 = ["assessmentBubble5_1", "assessmentBubble5_2", "assessmentBubble5_3", "assessmentBubble5_4", "assessmentBubble5_5"]
const classes5_closer = ["assessmentBubbleCloser5_1", "assessmentBubbleCloser5_2", "assessmentBubbleCloser5_3", "assessmentBubbleCloser5_4", "assessmentBubbleCloser5_5"]
const clockIcons5 = ["sym_o_clock_loader_10", "sym_o_clock_loader_40", "sym_o_clock_loader_60", "sym_o_clock_loader_80", "circle"]
const barIcons5 = ["horizontal_rule", "density_large", "density_medium", "desnity_small", "format_align_justify"]

const bubbleClass = ref("")
const bubbleIcon = ref("")

watch(props, () => {
setBubbleAttrs()
})

function clickBubble() {
if (props.id !== undefined) {
emit("bubbleClick", props.id)
}
}

function setBubbleAttrs() {
if (props.maxValue == 5 && props.value <= 5 && props.value > 0) {
switch(props.type) {
case "clock":
bubbleIcon.value = clockIcons5[props.value - 1]
bubbleClass.value = classes5_closer[props.value - 1]
break;
case "bar":
bubbleIcon.value = barIcons5[props.value - 1]
bubbleClass.value = classes5_closer[props.value - 1]
break;
case "bubble":
default:
bubbleIcon.value = "circle"
bubbleClass.value = classes5[props.value - 1]
break;

}
}
}

setBubbleAttrs()
</script>
<template>
<q-icon :name="bubbleIcon" size="sm" :class="'assessmentIcon ' + bubbleClass" :title="props?.text" @click="clickBubble"></q-icon>
</template>
4 changes: 4 additions & 0 deletions VueApp/src/CTS/cts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ import App from './App.vue'
import { Quasar, Loading, QSpinnerOval } from 'quasar'
// Import icon libraries
import '@quasar/extras/material-icons/material-icons.css'
import '@quasar/extras/material-symbols-outlined/material-symbols-outlined.css'
import IconSet from 'quasar/icon-set/material-symbols-outlined.js'

// Import Quasar css
import 'quasar/dist/quasar.css'
import { useQuasarConfig } from '@/composables/QuasarConfig'

//import our css
import '@/assets/site.css'
import '@/cts/assets/cts.css'

const { quasarConfig } = useQuasarConfig()
const pinia = createPinia()
const app = createApp(App)
Quasar.iconSet.set(IconSet)
app.provide("apiURL", import.meta.env.VITE_API_URL)

app.use(pinia)
Expand Down
18 changes: 16 additions & 2 deletions VueApp/src/CTS/pages/AssessmentList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
const assessmentTypes = [{ label: "EPA", value: "EPA" }]
const paging = ref({ page: 1, sortBy: "enteredOn", descending: true, rowsPerPage: 25, rowsNumber: 100 }) as Ref<any>
const loading = ref(false)
const canViewAll = ref(null) as Ref<boolean | null>

const searchForm = ref({
service: null as Service | null,
Expand Down Expand Up @@ -59,7 +60,15 @@
await loadAssessments(1, paging.value.rowsPerPage, paging.value.sortBy, paging.value.descending)
}

async function getCanViewAllAssessments() {
let result = await get(baseUrl + "permissions?access=ViewAllAssessments")
canViewAll.value = result.result
}

async function loadAssessments(page: number, perPage: number, sortBy: string, descending: boolean) {
if (canViewAll.value == null) {
await getCanViewAllAssessments()
}
const p = createUrlSearchParams({
"serviceId": searchForm.value.service?.serviceId,
"enteredById": searchForm.value.enteredBy?.personId,
Expand All @@ -68,6 +77,10 @@
"dateTo": searchForm.value.dateTo,
})

if (!canViewAll.value) {
p.set("enteredById", userStore.userInfo.userId != null ? userStore.userInfo.userId.toString() : "")
}

switch (assessmentType.value) {
case "EPA":
p.append("type", "1")
Expand Down Expand Up @@ -134,7 +147,7 @@
</template>
</q-select>
</div>
<div class="col-12 col-md-6 col-lg-3">
<div class="col-12 col-md-6 col-lg-3" v-if="canViewAll">
<q-select outlined dense options-dense label="Entered By" v-model="searchForm.enteredBy" :options="assessors"
option-label="fullNameLastFirst" option-value="personId" clearable></q-select>
</div>
Expand Down Expand Up @@ -186,7 +199,8 @@
</template>
<template v-slot:body-cell-studentName="props">
<q-td :props="props">
<RouterLink :to="'MyAssessments?student=' + props.row.studentUserId">{{ props.row.studentName }}</RouterLink>
<RouterLink :to="'MyAssessments?student=' + props.row.studentUserId" v-if="canViewAll">{{ props.row.studentName }}</RouterLink>
<span v-else>{{ props.row.studentName }}</span>
</q-td>
</template>
<template v-slot:body-cell-level="props">
Expand Down
6 changes: 6 additions & 0 deletions VueApp/src/CTS/pages/CourseList.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script setup lang="ts">

</script>
<template>

</template>
Loading
Loading