-
Notifications
You must be signed in to change notification settings - Fork 10
feat: rewrite Teaching Stats #89
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
Merged
Helias
merged 201 commits into
UNICT-DMI:development
from
ChiaraZuccaro:years-cds-teaching
Mar 20, 2026
Merged
Changes from all commits
Commits
Show all changes
201 commits
Select commit
Hold shift + click to select a range
588182b
scaffolding old proj
ChiaraZuccaro 9a7086f
created new app in angular 21
ChiaraZuccaro 87e3781
added new favicon + updated ReadMe + added license
ChiaraZuccaro 098893e
init routes + pages
ChiaraZuccaro 0978362
components pages
ChiaraZuccaro 13c5a68
created home route + component
ChiaraZuccaro 02968d2
deleted app.html == useless
ChiaraZuccaro f4ad8c4
feat(): added reset style cross-browser
ChiaraZuccaro c5fd8ce
feat(): es lint enabled on run server
ChiaraZuccaro 6686bc1
feat(): init hero section
ChiaraZuccaro 1ca7650
feat(): added prefix for eslint error
ChiaraZuccaro f6f805c
feat(): added logo svg to init animation
ChiaraZuccaro 32db01a
fix(): app-root to opis-root
ChiaraZuccaro 85c26c5
lang it
ChiaraZuccaro 37ac641
feat(): logo substitution
ChiaraZuccaro ee2b783
feat(): letters logo animated
ChiaraZuccaro 45f574d
format files post run
ChiaraZuccaro 95eeb70
feat(): animated grafic bars
ChiaraZuccaro 868c5c8
format(): logo + completed
ChiaraZuccaro 32483e1
feat(): created env with node
ChiaraZuccaro c009d93
feat(): recreated original interfaces
ChiaraZuccaro 29d1fea
feat(): no env pushed
ChiaraZuccaro fd9dde8
feat(): init homepage
ChiaraZuccaro bf41eba
feat(): mappati i dipartimenti per icone
ChiaraZuccaro 4d594de
feat(): created palette + home btns adapted
ChiaraZuccaro b462a13
rename(): department page
ChiaraZuccaro 90afdda
feat(): created card department
ChiaraZuccaro 2c68381
new style years section
ChiaraZuccaro fe8ae00
feat(): add default icon
ChiaraZuccaro 9fc25f7
feat(): added color palette for user selection
ChiaraZuccaro 0476675
feat(): styled departments section
ChiaraZuccaro 0891160
enh(): resource in service
ChiaraZuccaro e025e48
enh(): years section as component
ChiaraZuccaro a534af1
fix(): test all components import from vite (it, expect, describe)
ChiaraZuccaro d718160
test(): implemented home test file
ChiaraZuccaro f1749bb
formatted files
ChiaraZuccaro 5e87efa
fix(): info department saved on localStorage + fix(): detail url + fe…
ChiaraZuccaro 24d06dd
feat(): department page logic implemented
ChiaraZuccaro a9e34d1
feat() deleted old_proj directory
ChiaraZuccaro 0618784
style(): title department page
ChiaraZuccaro 2dad4a3
fix(): width of border title department
ChiaraZuccaro a6f4bb7
changed palette
ChiaraZuccaro 47aa7ee
feat(): added font
ChiaraZuccaro 9acb691
feat(): init cds flow + added loader + delay
ChiaraZuccaro c75257a
feat(): created icon component
ChiaraZuccaro 3c6adc1
feat(): style on cds list
ChiaraZuccaro 350bcf6
fix(): width list container
ChiaraZuccaro d369114
feat(): scaffolding for sections, added directory and created cds sel…
ChiaraZuccaro fd549aa
feat(): added fn that call both api cds schedeOpis and teachings
ChiaraZuccaro 3e68bd1
feat(): ng add ng2-charts
ChiaraZuccaro 6b8443b
test(): cds-selection + department
ChiaraZuccaro 9ae34ee
format with prettier
ChiaraZuccaro 85fcb38
test(): scaffolding for service testing
ChiaraZuccaro 3e7cd45
feat(): added api questions
ChiaraZuccaro 169b7c6
feat(): init cds selected
ChiaraZuccaro 431b704
feat(): introduced statistics calculation for graph
ChiaraZuccaro 2f4f112
feat(): cache on api /domande
ChiaraZuccaro 52873b6
formattati i files
ChiaraZuccaro 8f76761
feat(): centralized duration animation of logo
ChiaraZuccaro b6e56c6
feat(): animation logo cached
ChiaraZuccaro b1e13ee
fix(): delay scroll and results
ChiaraZuccaro 2d6d66e
feat(): update ReadMe with version node
ChiaraZuccaro e3d300a
Update src/app/pages/home/home.html
ChiaraZuccaro b1de4c9
Update src/app/services/questions/questions.service.ts
ChiaraZuccaro bdb7ab9
no imports logo-animated
ChiaraZuccaro 050cba9
return type retrieveQuestions
ChiaraZuccaro ff780a4
Update src/app/ui/sections/cds-selected-section/cds-selected-section.…
ChiaraZuccaro ae6c96b
Fixed version
ChiaraZuccaro 5976afc
refactor: fixed versions
ChiaraZuccaro 9b282e8
refactor(cds-selected-section.ts + year-section.ts): added changeDete…
ChiaraZuccaro bdaa246
refactor(department.ts): access modifiers from public to protected + …
ChiaraZuccaro 3b14ae1
refactor(homepage.ts): changeDetection + access modifiers from public…
ChiaraZuccaro 29120ad
refactor: added return type in fns in all services
ChiaraZuccaro 5feb538
refactor(dep-card.ts): access modifiers from public to protected + re…
ChiaraZuccaro f73c3de
refactor(icon.ts): access modifiers from public to readonly
ChiaraZuccaro 2be446a
refactor(logo-animated.ts): access modifiers + changeDetection + retu…
ChiaraZuccaro a330e59
refactor(loader.ts): added changeDetection
ChiaraZuccaro 7750bf7
fix(dep-card.ts): removed protected, added readonly on department input
ChiaraZuccaro ed2ce05
enh(graph.service.ts): used key from destructuring obj
ChiaraZuccaro 31fe57c
fix(department.ts): no empty obj as department interface, used null +…
ChiaraZuccaro d02920e
refactor(department.ts): access modifier from public to protected for…
ChiaraZuccaro e59eea3
refactor(department.ts): followed suggestion of access modifier on de…
ChiaraZuccaro 6676481
refactor(home.ts): added readonly as suggestion on PR
ChiaraZuccaro 78aade5
refactor(info.ts): name convention + changeDetection
ChiaraZuccaro d7194c1
refactor: closing tag for components in home.html, department.html an…
ChiaraZuccaro 7866151
feat: add rule on creating new component, changeDetection
ChiaraZuccaro 60f5f0b
refactor: substitute enums with consts
ChiaraZuccaro f8bf977
feat: add eslint rules, fix unit-tests, ignore some lint rules, we wi…
Helias 2920adb
Merge branch 'UNICT-DMI:development' into development
ChiaraZuccaro 976932e
refactor: updating ReadMe with info of set-env
ChiaraZuccaro a97c8ee
refactor: ReadMe
ChiaraZuccaro 24b6ae3
refactor: ReadMe
ChiaraZuccaro a362b1f
format and lint applied
ChiaraZuccaro 82edd2a
feat: ci workflows
ChiaraZuccaro 755a09d
fix: coverage for test
ChiaraZuccaro e762c77
fix: coverage for test
ChiaraZuccaro 594e605
scaffolding: created scripts folder
ChiaraZuccaro 8f15bfd
feat: check coverage test in pipeline
ChiaraZuccaro 10a2785
Merge branch 'development' of https://github.com/ChiaraZuccaro/OPIS-M…
ChiaraZuccaro 43c7c37
fix: deploy.yml workflow
ChiaraZuccaro 9589ee9
fix: no branch for lint.yml and tests.yml
ChiaraZuccaro 96ffe95
fix: coverage test from vitest.config file
ChiaraZuccaro 275af69
Merge branch 'cds-graphs' into development
ChiaraZuccaro 5d4671a
feat: logo svg on ReadME
ChiaraZuccaro 084c11d
fix: img logo ReadMe
ChiaraZuccaro b1193f2
fix: artifacts version for pipeline
ChiaraZuccaro 6a64aa5
Merge branch 'cds-graphs' into development
ChiaraZuccaro 3e4b5a7
fix: type error for file environment
ChiaraZuccaro 5def790
fix: pipeline test
ChiaraZuccaro 7877612
fix: path absolute for environment.ts
ChiaraZuccaro 5a3902b
Merge branch 'cds-graphs' into development
ChiaraZuccaro 0f178ff
test: working thresholds limit
ChiaraZuccaro f89444b
test: working thresholds limit
ChiaraZuccaro de441e6
Merge branch 'UNICT-DMI:development' into development
ChiaraZuccaro 0357872
refactor(cds.service.ts): extraction schedules in a side function
ChiaraZuccaro 50f9daa
enh: renaming file type deps-name
ChiaraZuccaro b93ec01
refactor(cds.service.ts): grouped schede by a side function, feat: co…
ChiaraZuccaro af5ad03
feat: example graph working
ChiaraZuccaro cbdcb0b
feat: format data for CDS stats general
ChiaraZuccaro 1ead905
feat: cds general stats working on line chart
ChiaraZuccaro 236c05e
format: run command
ChiaraZuccaro 4fb772e
fix(graph.ts): lint error template
ChiaraZuccaro 6f9ee18
feat: build + deploy pipeline
ChiaraZuccaro 5ddffac
fix: missing return type on graph component
ChiaraZuccaro f73ec9c
enh: created type for Record means per year + added type on map colors
ChiaraZuccaro 44f7d0f
enh: no cast as AcademicYear thanks to util that help to have typed d…
ChiaraZuccaro 4ae05b8
fix: test job
ChiaraZuccaro 5d49f97
format: npm run format
ChiaraZuccaro 75a5bb9
fix: lint errors on cds-selection.spec
ChiaraZuccaro fd9f54e
fix: ordered jobs in pipeline
ChiaraZuccaro b5826fc
fix: workflows
ChiaraZuccaro 8c7ef30
fix: uses alternative method to order workflow on pr
ChiaraZuccaro b962567
fix: unique workflow for all jobs in order
ChiaraZuccaro 50ca6ba
fix: build failure
ChiaraZuccaro 4d4ecb1
refactor: renaming directory shared components
ChiaraZuccaro cef6675
enh: dynamic dimension on icon comoponent
ChiaraZuccaro c01c703
feat: header nav
ChiaraZuccaro 480e9ff
feat: header on app + feat: formula component init
ChiaraZuccaro 199fc18
feat: dynamic contributors on footer
ChiaraZuccaro 954a226
fix: size icon default
ChiaraZuccaro b9cadb9
feat: mapped real name
ChiaraZuccaro ba6c1d0
fix: path route
ChiaraZuccaro 03cba1a
feat: footer completed
ChiaraZuccaro 3377240
feat: github icon svg format
ChiaraZuccaro 5c3c35c
fix: now footer always on bottom
ChiaraZuccaro 50fe9fd
feat: top scrolling on change route
ChiaraZuccaro 6646bf3
fix: github icon svg injection take dimension
ChiaraZuccaro af59c0c
fix: color svg github
ChiaraZuccaro 94d8f45
format pre PR
ChiaraZuccaro e75bf30
feat: rule on eslint for row template and style on ts file
ChiaraZuccaro a5957d0
fix: lint errors
ChiaraZuccaro f723c65
fix: run tests
ChiaraZuccaro 6c6d3c3
feat: login component init
ChiaraZuccaro 7a62446
Merge branch 'development' of https://github.com/ChiaraZuccaro/OPIS-M…
ChiaraZuccaro 8cb8663
feat: btns to switch graph view
ChiaraZuccaro d62a355
feat: nav items for switch graphs
ChiaraZuccaro 136a88f
enh: created GraphMapper class, adapted services cds/graph
ChiaraZuccaro 5251017
enh: deleted double graph.component
ChiaraZuccaro 7d98728
feat: init computed for graph change
ChiaraZuccaro 711d113
enh: no selection id as variable
ChiaraZuccaro 07a76ed
enh(department): isCdsSelected boolean as computed, removed effect
ChiaraZuccaro b38a76c
feat: error msg dynamic as computed, added teaching format for graph
ChiaraZuccaro 749ba22
feat: unique loading boolean
ChiaraZuccaro 88f1483
enh: repeated code for means calculation centralized
ChiaraZuccaro 5eb91fb
feat: select component
ChiaraZuccaro f915bf4
format command
ChiaraZuccaro eae3b72
fix: style description graph
ChiaraZuccaro b03b32d
feat: disclaimer card init
ChiaraZuccaro c10cbdc
feat: disclaimer component
ChiaraZuccaro ac98a3c
feat: disclaimers opis group implemented with opening logic
ChiaraZuccaro 48bba66
feat: completed opis group disclaimer
ChiaraZuccaro aa66052
feat: title on graph selection, change description
ChiaraZuccaro 658f173
fix: style select
ChiaraZuccaro cbb6e3f
fix: no data year, view on graph anyway
ChiaraZuccaro 97ef4f5
feat: better labels for teaching selection
ChiaraZuccaro 96971e6
feat: search on teachings select
ChiaraZuccaro 0de3b8e
feat: reset teaching selection on change graph
ChiaraZuccaro 571c03b
fix: accordion icon
ChiaraZuccaro 6a8a954
feat: test select
ChiaraZuccaro 08d1cb0
format command
ChiaraZuccaro f9f5530
fix: lint errors in teaching and graph services
ChiaraZuccaro c6f1801
enh: improved department test + feat: select tests
ChiaraZuccaro 716ebb0
enh(cds-selection): same height for every graph type
ChiaraZuccaro 2dca227
enh: style table
ChiaraZuccaro f3f5604
enh(cds-selected-section): resolvers on separated file for activeGrap…
ChiaraZuccaro 7e7abd5
feat: graphBtns disabled during loading
ChiaraZuccaro bd94faa
test(department-page): added
ChiaraZuccaro cb8a561
lint: files
ChiaraZuccaro 13973a5
test(cds-selected-section): centralized detectChanges
ChiaraZuccaro 52f0dcf
test(cds-selected-section): completed
ChiaraZuccaro 72b964b
test(graph-resolvers.value): implemented and completed
ChiaraZuccaro 11b76d1
test(utils): implemented and completed
ChiaraZuccaro 5ac927e
test(graph.service): implemented and completed
ChiaraZuccaro 94a9ee2
linted files
ChiaraZuccaro 4819a44
feat: add lint rule for spec files
ChiaraZuccaro f7e9ae9
feat(graphResolvers): return null for cds_year stats
ChiaraZuccaro 79c9277
fix(graph-resolvers): test
ChiaraZuccaro f31a4ae
enh: removed property standalone:true
ChiaraZuccaro 37abd67
enh: removed public access modifiers
ChiaraZuccaro ae95c25
fix: missing return type
ChiaraZuccaro 3251dbc
chore: corrected coarse to courses
ChiaraZuccaro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,14 @@ | |
| "defaultConfiguration": "development" | ||
| }, | ||
| "test": { | ||
| "builder": "@angular/build:unit-test" | ||
| "builder": "@angular/build:unit-test", | ||
| "options": { | ||
| "tsConfig": "tsconfig.spec.json", | ||
| "coverage": true, | ||
| "coverageExclude": [ | ||
| "**/*.html" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if it makes sense to exclude the *.html files |
||
| ] | ||
| } | ||
| }, | ||
| "lint": { | ||
| "builder": "@angular-eslint/builder:lint", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| export const GraphSelection = { | ||
| CDS_GENERAL: 'cds_general', | ||
| TEACHINGS_CDS: 'teaching_cds', | ||
| YEAR: 'cds_year', | ||
| } as const; | ||
|
|
||
| export type GraphSelectionType = (typeof GraphSelection)[keyof typeof GraphSelection]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,30 @@ | ||
| import { DisclaimerType } from '@c_types/means-graph.type'; | ||
| import { GraphSelectionType } from '@enums/chart-typology.enum'; | ||
| import { ChartData, ChartType } from 'chart.js'; | ||
|
|
||
| export interface GraphView { | ||
| type: ChartType; | ||
| data: ChartData; | ||
| } | ||
|
|
||
| export interface GraphSelectionBtn { | ||
| value: GraphSelectionType; | ||
| active: boolean; | ||
| description: string; | ||
| label: string; | ||
| icon: string; | ||
| } | ||
|
|
||
| export interface SelectOption { | ||
| value: string | number; | ||
| label: string; | ||
| } | ||
|
|
||
| export interface DisclaimerInfo { | ||
| title: string; | ||
| description: string; | ||
| type: DisclaimerType; | ||
| icon: string; | ||
| isAccordion: boolean; | ||
| isOpen: boolean; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| import { MeansPerYear } from '@c_types/means-graph.type'; | ||
| import { GraphView } from '@interfaces/graph-config.interface'; | ||
| import { SchedaOpis } from '@interfaces/opis-record.interface'; | ||
| import { typedKeys } from '@utils/object-helpers.utils'; | ||
| import { ACADEMIC_YEARS, AcademicYear } from '@values/years'; | ||
|
|
||
| /** | ||
| * Pure mapping class: transforms pre-computed data into GraphView objects | ||
| * compatible with ng-chart. No injected dependencies, no state. | ||
| * Use static methods directly wherever needed (service, component, resolver). | ||
| */ | ||
| export class GraphMapper { | ||
| private static buildLineGraph(means: MeansPerYear): GraphView { | ||
| const labels: AcademicYear[] = []; | ||
| const v1: number[] = []; | ||
| const v2: number[] = []; | ||
| const v3: number[] = []; | ||
|
|
||
| for (const year of typedKeys(means)) { | ||
| const [yearMeans] = means[year]; | ||
| labels.push(year); | ||
| v1.push(yearMeans[0]); | ||
| v2.push(yearMeans[1]); | ||
| v3.push(yearMeans[2]); | ||
| } | ||
|
|
||
| return { | ||
| type: 'line', | ||
| data: { | ||
| labels, | ||
| datasets: [ | ||
| { label: 'V1', data: [...v1] }, | ||
| { label: 'V2', data: [...v2] }, | ||
| { label: 'V3', data: [...v3] }, | ||
| ], | ||
| }, | ||
| }; | ||
| } | ||
|
|
||
| static groupByYear<T extends { anno_accademico: string }>( | ||
| items: T[], | ||
| getScheda: (item: T) => SchedaOpis, | ||
| ): Record<AcademicYear, SchedaOpis[]> { | ||
| const initial = Object.fromEntries( | ||
| ACADEMIC_YEARS.map((year) => [year, []]), | ||
| ) as unknown as Record<AcademicYear, SchedaOpis[]>; | ||
|
|
||
| return items.reduce((acc, item) => { | ||
| const year = item.anno_accademico as AcademicYear; | ||
| acc[year]?.push(getScheda(item)); | ||
| return acc; | ||
| }, initial); | ||
| } | ||
| static toCdsGeneralGraph = GraphMapper.buildLineGraph; | ||
| static toTeachingGraph = GraphMapper.buildLineGraph; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import { SchedaOpis } from "@interfaces/opis-record.interface"; | ||
|
|
||
| export const exampleSchedaOpis: SchedaOpis = { | ||
| id: 1, | ||
| anno_accademico: '2023/2024', | ||
| totale_schede: 10, | ||
| totale_schede_nf: 0, | ||
| femmine: 0, | ||
| femmine_nf: 0, | ||
| fc: 0, | ||
| inatt: 0, | ||
| inatt_nf: 0, | ||
| eta: null, | ||
| anno_iscr: null, | ||
| num_studenti: null, | ||
| ragg_uni: null, | ||
| studio_gg: null, | ||
| studio_tot: null, | ||
| domande: [ | ||
| [10, 0, 0, 0], // Q1 → d=10, V1 += (10/10)*1 = 1 | ||
| [0, 10, 0, 0], // Q2 → d=40, V2 += (40/10)*1 = 4 | ||
| [0, 0, 10, 0], // Q3 → d=70, V3 += (70/10)*1 = 7 | ||
| ], | ||
| domande_nf: null, | ||
| motivo_nf: null, | ||
| sugg: null, | ||
| sugg_nf: null, | ||
| id_insegnamento: 1, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.