Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
201 commits
Select commit Hold shift + click to select a range
588182b
scaffolding old proj
ChiaraZuccaro Dec 4, 2025
9a7086f
created new app in angular 21
ChiaraZuccaro Dec 4, 2025
87e3781
added new favicon + updated ReadMe + added license
ChiaraZuccaro Dec 4, 2025
098893e
init routes + pages
ChiaraZuccaro Dec 4, 2025
0978362
components pages
ChiaraZuccaro Dec 4, 2025
13c5a68
created home route + component
ChiaraZuccaro Dec 4, 2025
02968d2
deleted app.html == useless
ChiaraZuccaro Dec 4, 2025
f4ad8c4
feat(): added reset style cross-browser
ChiaraZuccaro Dec 4, 2025
c5fd8ce
feat(): es lint enabled on run server
ChiaraZuccaro Dec 4, 2025
6686bc1
feat(): init hero section
ChiaraZuccaro Dec 4, 2025
1ca7650
feat(): added prefix for eslint error
ChiaraZuccaro Dec 4, 2025
f6f805c
feat(): added logo svg to init animation
ChiaraZuccaro Dec 4, 2025
32db01a
fix(): app-root to opis-root
ChiaraZuccaro Dec 5, 2025
85c26c5
lang it
ChiaraZuccaro Dec 5, 2025
37ac641
feat(): logo substitution
ChiaraZuccaro Dec 8, 2025
ee2b783
feat(): letters logo animated
ChiaraZuccaro Dec 8, 2025
45f574d
format files post run
ChiaraZuccaro Dec 9, 2025
95eeb70
feat(): animated grafic bars
ChiaraZuccaro Dec 9, 2025
868c5c8
format(): logo + completed
ChiaraZuccaro Dec 12, 2025
32483e1
feat(): created env with node
ChiaraZuccaro Dec 12, 2025
c009d93
feat(): recreated original interfaces
ChiaraZuccaro Dec 12, 2025
29d1fea
feat(): no env pushed
ChiaraZuccaro Dec 12, 2025
fd9dde8
feat(): init homepage
ChiaraZuccaro Dec 12, 2025
bf41eba
feat(): mappati i dipartimenti per icone
ChiaraZuccaro Dec 13, 2025
4d594de
feat(): created palette + home btns adapted
ChiaraZuccaro Dec 14, 2025
b462a13
rename(): department page
ChiaraZuccaro Dec 14, 2025
90afdda
feat(): created card department
ChiaraZuccaro Dec 14, 2025
2c68381
new style years section
ChiaraZuccaro Dec 14, 2025
fe8ae00
feat(): add default icon
ChiaraZuccaro Dec 14, 2025
9fc25f7
feat(): added color palette for user selection
ChiaraZuccaro Dec 14, 2025
0476675
feat(): styled departments section
ChiaraZuccaro Dec 14, 2025
0891160
enh(): resource in service
ChiaraZuccaro Dec 14, 2025
e025e48
enh(): years section as component
ChiaraZuccaro Dec 14, 2025
a534af1
fix(): test all components import from vite (it, expect, describe)
ChiaraZuccaro Dec 14, 2025
d718160
test(): implemented home test file
ChiaraZuccaro Dec 14, 2025
f1749bb
formatted files
ChiaraZuccaro Dec 16, 2025
5e87efa
fix(): info department saved on localStorage + fix(): detail url + fe…
ChiaraZuccaro Dec 16, 2025
24d06dd
feat(): department page logic implemented
ChiaraZuccaro Dec 16, 2025
a9e34d1
feat() deleted old_proj directory
ChiaraZuccaro Dec 17, 2025
0618784
style(): title department page
ChiaraZuccaro Dec 17, 2025
2dad4a3
fix(): width of border title department
ChiaraZuccaro Dec 17, 2025
a6f4bb7
changed palette
ChiaraZuccaro Dec 20, 2025
47aa7ee
feat(): added font
ChiaraZuccaro Dec 20, 2025
9acb691
feat(): init cds flow + added loader + delay
ChiaraZuccaro Dec 20, 2025
c75257a
feat(): created icon component
ChiaraZuccaro Dec 26, 2025
3c6adc1
feat(): style on cds list
ChiaraZuccaro Dec 26, 2025
350bcf6
fix(): width list container
ChiaraZuccaro Dec 26, 2025
d369114
feat(): scaffolding for sections, added directory and created cds sel…
ChiaraZuccaro Dec 26, 2025
fd549aa
feat(): added fn that call both api cds schedeOpis and teachings
ChiaraZuccaro Dec 27, 2025
3e68bd1
feat(): ng add ng2-charts
ChiaraZuccaro Dec 27, 2025
6b8443b
test(): cds-selection + department
ChiaraZuccaro Dec 27, 2025
9ae34ee
format with prettier
ChiaraZuccaro Dec 27, 2025
85fcb38
test(): scaffolding for service testing
ChiaraZuccaro Jan 4, 2026
3e7cd45
feat(): added api questions
ChiaraZuccaro Jan 4, 2026
169b7c6
feat(): init cds selected
ChiaraZuccaro Jan 4, 2026
431b704
feat(): introduced statistics calculation for graph
ChiaraZuccaro Jan 4, 2026
2f4f112
feat(): cache on api /domande
ChiaraZuccaro Jan 4, 2026
52873b6
formattati i files
ChiaraZuccaro Jan 8, 2026
8f76761
feat(): centralized duration animation of logo
ChiaraZuccaro Jan 8, 2026
b6e56c6
feat(): animation logo cached
ChiaraZuccaro Jan 8, 2026
b1e13ee
fix(): delay scroll and results
ChiaraZuccaro Jan 8, 2026
2d6d66e
feat(): update ReadMe with version node
ChiaraZuccaro Jan 8, 2026
e3d300a
Update src/app/pages/home/home.html
ChiaraZuccaro Jan 16, 2026
b1de4c9
Update src/app/services/questions/questions.service.ts
ChiaraZuccaro Jan 16, 2026
bdb7ab9
no imports logo-animated
ChiaraZuccaro Jan 16, 2026
050cba9
return type retrieveQuestions
ChiaraZuccaro Jan 16, 2026
ff780a4
Update src/app/ui/sections/cds-selected-section/cds-selected-section.…
ChiaraZuccaro Jan 16, 2026
ae6c96b
Fixed version
ChiaraZuccaro Jan 16, 2026
5976afc
refactor: fixed versions
ChiaraZuccaro Jan 16, 2026
9b282e8
refactor(cds-selected-section.ts + year-section.ts): added changeDete…
ChiaraZuccaro Jan 16, 2026
bdaa246
refactor(department.ts): access modifiers from public to protected + …
ChiaraZuccaro Jan 16, 2026
3b14ae1
refactor(homepage.ts): changeDetection + access modifiers from public…
ChiaraZuccaro Jan 16, 2026
29120ad
refactor: added return type in fns in all services
ChiaraZuccaro Jan 16, 2026
5feb538
refactor(dep-card.ts): access modifiers from public to protected + re…
ChiaraZuccaro Jan 16, 2026
f73c3de
refactor(icon.ts): access modifiers from public to readonly
ChiaraZuccaro Jan 16, 2026
2be446a
refactor(logo-animated.ts): access modifiers + changeDetection + retu…
ChiaraZuccaro Jan 16, 2026
a330e59
refactor(loader.ts): added changeDetection
ChiaraZuccaro Jan 16, 2026
7750bf7
fix(dep-card.ts): removed protected, added readonly on department input
ChiaraZuccaro Jan 16, 2026
ed2ce05
enh(graph.service.ts): used key from destructuring obj
ChiaraZuccaro Jan 16, 2026
31fe57c
fix(department.ts): no empty obj as department interface, used null +…
ChiaraZuccaro Jan 16, 2026
d02920e
refactor(department.ts): access modifier from public to protected for…
ChiaraZuccaro Jan 16, 2026
e59eea3
refactor(department.ts): followed suggestion of access modifier on de…
ChiaraZuccaro Jan 16, 2026
6676481
refactor(home.ts): added readonly as suggestion on PR
ChiaraZuccaro Jan 16, 2026
78aade5
refactor(info.ts): name convention + changeDetection
ChiaraZuccaro Jan 16, 2026
d7194c1
refactor: closing tag for components in home.html, department.html an…
ChiaraZuccaro Jan 16, 2026
7866151
feat: add rule on creating new component, changeDetection
ChiaraZuccaro Jan 16, 2026
60f5f0b
refactor: substitute enums with consts
ChiaraZuccaro Jan 16, 2026
f8bf977
feat: add eslint rules, fix unit-tests, ignore some lint rules, we wi…
Helias Jan 17, 2026
2920adb
Merge branch 'UNICT-DMI:development' into development
ChiaraZuccaro Jan 17, 2026
976932e
refactor: updating ReadMe with info of set-env
ChiaraZuccaro Jan 18, 2026
a97c8ee
refactor: ReadMe
ChiaraZuccaro Jan 18, 2026
24b6ae3
refactor: ReadMe
ChiaraZuccaro Jan 18, 2026
a362b1f
format and lint applied
ChiaraZuccaro Jan 18, 2026
82edd2a
feat: ci workflows
ChiaraZuccaro Jan 18, 2026
755a09d
fix: coverage for test
ChiaraZuccaro Jan 18, 2026
e762c77
fix: coverage for test
ChiaraZuccaro Jan 18, 2026
594e605
scaffolding: created scripts folder
ChiaraZuccaro Jan 18, 2026
8f15bfd
feat: check coverage test in pipeline
ChiaraZuccaro Jan 18, 2026
10a2785
Merge branch 'development' of https://github.com/ChiaraZuccaro/OPIS-M…
ChiaraZuccaro Jan 18, 2026
43c7c37
fix: deploy.yml workflow
ChiaraZuccaro Jan 18, 2026
9589ee9
fix: no branch for lint.yml and tests.yml
ChiaraZuccaro Jan 21, 2026
96ffe95
fix: coverage test from vitest.config file
ChiaraZuccaro Jan 21, 2026
275af69
Merge branch 'cds-graphs' into development
ChiaraZuccaro Jan 21, 2026
5d4671a
feat: logo svg on ReadME
ChiaraZuccaro Jan 21, 2026
084c11d
fix: img logo ReadMe
ChiaraZuccaro Jan 21, 2026
b1193f2
fix: artifacts version for pipeline
ChiaraZuccaro Jan 21, 2026
6a64aa5
Merge branch 'cds-graphs' into development
ChiaraZuccaro Jan 21, 2026
3e4b5a7
fix: type error for file environment
ChiaraZuccaro Jan 21, 2026
5def790
fix: pipeline test
ChiaraZuccaro Jan 21, 2026
7877612
fix: path absolute for environment.ts
ChiaraZuccaro Jan 21, 2026
5a3902b
Merge branch 'cds-graphs' into development
ChiaraZuccaro Jan 21, 2026
0f178ff
test: working thresholds limit
ChiaraZuccaro Jan 21, 2026
f89444b
test: working thresholds limit
ChiaraZuccaro Jan 21, 2026
de441e6
Merge branch 'UNICT-DMI:development' into development
ChiaraZuccaro Jan 24, 2026
0357872
refactor(cds.service.ts): extraction schedules in a side function
ChiaraZuccaro Feb 1, 2026
50f9daa
enh: renaming file type deps-name
ChiaraZuccaro Feb 1, 2026
b93ec01
refactor(cds.service.ts): grouped schede by a side function, feat: co…
ChiaraZuccaro Feb 1, 2026
af5ad03
feat: example graph working
ChiaraZuccaro Feb 1, 2026
cbdcb0b
feat: format data for CDS stats general
ChiaraZuccaro Feb 1, 2026
1ead905
feat: cds general stats working on line chart
ChiaraZuccaro Feb 4, 2026
236c05e
format: run command
ChiaraZuccaro Feb 4, 2026
4fb772e
fix(graph.ts): lint error template
ChiaraZuccaro Feb 4, 2026
6f9ee18
feat: build + deploy pipeline
ChiaraZuccaro Feb 4, 2026
5ddffac
fix: missing return type on graph component
ChiaraZuccaro Feb 5, 2026
f73ec9c
enh: created type for Record means per year + added type on map colors
ChiaraZuccaro Feb 5, 2026
44f7d0f
enh: no cast as AcademicYear thanks to util that help to have typed d…
ChiaraZuccaro Feb 5, 2026
4ae05b8
fix: test job
ChiaraZuccaro Feb 5, 2026
5d49f97
format: npm run format
ChiaraZuccaro Feb 5, 2026
75a5bb9
fix: lint errors on cds-selection.spec
ChiaraZuccaro Feb 5, 2026
fd9f54e
fix: ordered jobs in pipeline
ChiaraZuccaro Feb 5, 2026
b5826fc
fix: workflows
ChiaraZuccaro Feb 5, 2026
8c7ef30
fix: uses alternative method to order workflow on pr
ChiaraZuccaro Feb 5, 2026
b962567
fix: unique workflow for all jobs in order
ChiaraZuccaro Feb 5, 2026
50ca6ba
fix: build failure
ChiaraZuccaro Feb 5, 2026
4d4ecb1
refactor: renaming directory shared components
ChiaraZuccaro Feb 7, 2026
cef6675
enh: dynamic dimension on icon comoponent
ChiaraZuccaro Feb 7, 2026
c01c703
feat: header nav
ChiaraZuccaro Feb 7, 2026
480e9ff
feat: header on app + feat: formula component init
ChiaraZuccaro Feb 7, 2026
199fc18
feat: dynamic contributors on footer
ChiaraZuccaro Feb 7, 2026
954a226
fix: size icon default
ChiaraZuccaro Feb 7, 2026
b9cadb9
feat: mapped real name
ChiaraZuccaro Feb 7, 2026
ba6c1d0
fix: path route
ChiaraZuccaro Feb 7, 2026
03cba1a
feat: footer completed
ChiaraZuccaro Feb 7, 2026
3377240
feat: github icon svg format
ChiaraZuccaro Feb 7, 2026
5c3c35c
fix: now footer always on bottom
ChiaraZuccaro Feb 8, 2026
50fe9fd
feat: top scrolling on change route
ChiaraZuccaro Feb 8, 2026
6646bf3
fix: github icon svg injection take dimension
ChiaraZuccaro Feb 8, 2026
af59c0c
fix: color svg github
ChiaraZuccaro Feb 8, 2026
94d8f45
format pre PR
ChiaraZuccaro Feb 8, 2026
e75bf30
feat: rule on eslint for row template and style on ts file
ChiaraZuccaro Feb 8, 2026
a5957d0
fix: lint errors
ChiaraZuccaro Feb 8, 2026
f723c65
fix: run tests
ChiaraZuccaro Feb 8, 2026
6c6d3c3
feat: login component init
ChiaraZuccaro Feb 8, 2026
7a62446
Merge branch 'development' of https://github.com/ChiaraZuccaro/OPIS-M…
ChiaraZuccaro Feb 10, 2026
8cb8663
feat: btns to switch graph view
ChiaraZuccaro Feb 25, 2026
d62a355
feat: nav items for switch graphs
ChiaraZuccaro Mar 1, 2026
136a88f
enh: created GraphMapper class, adapted services cds/graph
ChiaraZuccaro Mar 15, 2026
5251017
enh: deleted double graph.component
ChiaraZuccaro Mar 15, 2026
7d98728
feat: init computed for graph change
ChiaraZuccaro Mar 15, 2026
711d113
enh: no selection id as variable
ChiaraZuccaro Mar 15, 2026
07a76ed
enh(department): isCdsSelected boolean as computed, removed effect
ChiaraZuccaro Mar 15, 2026
b38a76c
feat: error msg dynamic as computed, added teaching format for graph
ChiaraZuccaro Mar 15, 2026
749ba22
feat: unique loading boolean
ChiaraZuccaro Mar 15, 2026
88f1483
enh: repeated code for means calculation centralized
ChiaraZuccaro Mar 15, 2026
5eb91fb
feat: select component
ChiaraZuccaro Mar 15, 2026
f915bf4
format command
ChiaraZuccaro Mar 15, 2026
eae3b72
fix: style description graph
ChiaraZuccaro Mar 15, 2026
b03b32d
feat: disclaimer card init
ChiaraZuccaro Mar 15, 2026
c10cbdc
feat: disclaimer component
ChiaraZuccaro Mar 17, 2026
ac98a3c
feat: disclaimers opis group implemented with opening logic
ChiaraZuccaro Mar 17, 2026
48bba66
feat: completed opis group disclaimer
ChiaraZuccaro Mar 17, 2026
aa66052
feat: title on graph selection, change description
ChiaraZuccaro Mar 17, 2026
658f173
fix: style select
ChiaraZuccaro Mar 17, 2026
cbb6e3f
fix: no data year, view on graph anyway
ChiaraZuccaro Mar 17, 2026
97ef4f5
feat: better labels for teaching selection
ChiaraZuccaro Mar 17, 2026
96971e6
feat: search on teachings select
ChiaraZuccaro Mar 17, 2026
0de3b8e
feat: reset teaching selection on change graph
ChiaraZuccaro Mar 17, 2026
571c03b
fix: accordion icon
ChiaraZuccaro Mar 17, 2026
6a8a954
feat: test select
ChiaraZuccaro Mar 17, 2026
08d1cb0
format command
ChiaraZuccaro Mar 17, 2026
f9f5530
fix: lint errors in teaching and graph services
ChiaraZuccaro Mar 17, 2026
c6f1801
enh: improved department test + feat: select tests
ChiaraZuccaro Mar 17, 2026
716ebb0
enh(cds-selection): same height for every graph type
ChiaraZuccaro Mar 18, 2026
2dca227
enh: style table
ChiaraZuccaro Mar 18, 2026
f3f5604
enh(cds-selected-section): resolvers on separated file for activeGrap…
ChiaraZuccaro Mar 18, 2026
7e7abd5
feat: graphBtns disabled during loading
ChiaraZuccaro Mar 18, 2026
bd94faa
test(department-page): added
ChiaraZuccaro Mar 18, 2026
cb8a561
lint: files
ChiaraZuccaro Mar 18, 2026
13973a5
test(cds-selected-section): centralized detectChanges
ChiaraZuccaro Mar 18, 2026
52f0dcf
test(cds-selected-section): completed
ChiaraZuccaro Mar 18, 2026
72b964b
test(graph-resolvers.value): implemented and completed
ChiaraZuccaro Mar 18, 2026
11b76d1
test(utils): implemented and completed
ChiaraZuccaro Mar 18, 2026
5ac927e
test(graph.service): implemented and completed
ChiaraZuccaro Mar 18, 2026
94a9ee2
linted files
ChiaraZuccaro Mar 18, 2026
4819a44
feat: add lint rule for spec files
ChiaraZuccaro Mar 18, 2026
f7e9ae9
feat(graphResolvers): return null for cds_year stats
ChiaraZuccaro Mar 18, 2026
79c9277
fix(graph-resolvers): test
ChiaraZuccaro Mar 18, 2026
f31a4ae
enh: removed property standalone:true
ChiaraZuccaro Mar 19, 2026
37abd67
enh: removed public access modifiers
ChiaraZuccaro Mar 19, 2026
ae95c25
fix: missing return type
ChiaraZuccaro Mar 19, 2026
3251dbc
chore: corrected coarse to courses
ChiaraZuccaro Mar 19, 2026
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
6 changes: 6 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@
"plugin:@angular-eslint/template/accessibility"
],
"rules": {}
},
{
"files": ["**/*.spec.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off"
}
}
]
}
9 changes: 8 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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",
Expand Down
2 changes: 2 additions & 0 deletions src/app/custom_types/means-graph.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ import { AcademicYear } from '@values/years';

export type Means = [number[], number[][]];
export type MeansPerYear = Record<AcademicYear, Means>;

export type DisclaimerType = 'info' | 'warning';
7 changes: 7 additions & 0 deletions src/app/enums/chart-typology.enum.ts
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];
8 changes: 1 addition & 7 deletions src/app/interfaces/cds.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Teaching } from './teaching.interface';
import { GraphView } from './graph-config.interface';
import { MeansPerYear } from '@c_types/means-graph.type';

export interface CDS {
Expand All @@ -18,10 +17,5 @@ export interface CDS {

export interface AllCdsInfoResp {
teachings: Teaching[];
coarse: MeansPerYear;
graphs: {
cds_stats: GraphView;
// cds_stats_by_year: ChartData,
// cds_techings: ChartData
};
courses: MeansPerYear;
}
24 changes: 24 additions & 0 deletions src/app/interfaces/graph-config.interface.ts
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;
}
56 changes: 56 additions & 0 deletions src/app/mappers/graph.mapper.ts
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;
}
29 changes: 29 additions & 0 deletions src/app/mocks/scheda-mock.ts
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,
};
42 changes: 31 additions & 11 deletions src/app/pages/department/department.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
<section id="department-page">
@if (department() !== null) {
<div class="department-title">
<div class="department-title-top">
<div class="department-title-top wrapper">
<a routerLink="/home">
<opis-icon iconName="arrow_circle_left" />
<span class="text"> Torna indietro </span>
</a>
<h1>{{ department()?.anno_accademico }}</h1>
</div>
<div class="department-title-bottom" [attr.data-icon]="department()?.icon">
<div class="department-title-bottom wrapper" [attr.data-icon]="department()?.icon">
<h2>{{ department()?.nome }}</h2>
</div>
</div>

<section id="cds" [class.loading]="cdsList.isLoading()">
<section id="cds" class="wrapper" [class.loading]="cdsList.isLoading()">
@if (cdsList.isLoading()) {
<opis-loader />
} @else {
<div class="cds-title">
@if (isCdsSelected) {
<button (click)="selectCds(NO_CHOICE_VALUE)">
<opis-icon iconName="backspace" />
</button>
<div class="cds-title-name">
@if (isCdsSelected()) {
<button (click)="selectCds(NO_CHOICE_VALUE)">
<opis-icon iconName="backspace" />
</button>
}
<h3>( {{ cds().classe }} ) {{ cds().nome }}</h3>
</div>

@if (isCdsSelected()) {
<div class="cds-title-graph btn-nav">
@for (graphBtn of graphBtns(); track $index) {
<button
[disabled]="isLoading()"
class="btn-nav-item"
[class.active]="graphBtn.active"
type="button"
(click)="selectGraphType(graphBtn.value)"
>
<opis-icon [iconName]="graphBtn.icon" />
<span class="btn-nav-item-text">{{ graphBtn.label }}</span>
</button>
}
</div>
}
<h3>( {{ cds().classe }} ) {{ cds().nome }}</h3>
</div>

@if (!isCdsSelected) {
@if (!isCdsSelected()) {
<ul class="cds-list">
@let allCds = cdsList.value();

Expand All @@ -43,8 +62,9 @@ <h3>( {{ cds().classe }} ) {{ cds().nome }}</h3>
}
</section>

@if (isCdsSelected) {
<opis-cds-selected-section />
@if (isCdsSelected()) {
<opis-disclaimers class="wrapper" [disclaimers]="GroupsDisclaimers" />
<opis-cds-selected-section class="wrapper" />
}
}
</section>
35 changes: 20 additions & 15 deletions src/app/pages/department/department.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
display: inline-flex;
align-items: center;
justify-content: space-between;
width: 100%;

a {
margin-bottom: 1rem;
Expand Down Expand Up @@ -43,10 +42,6 @@
padding-right: 1.5rem;
}
}

@media (min-width: 1300px) {
width: 70%;
}
}

&-bottom {
Expand Down Expand Up @@ -85,7 +80,6 @@
}

@media (min-width: 1300px) {
width: 70%;
padding: 3rem 1rem;
}
}
Expand All @@ -96,7 +90,6 @@
display: flex;
flex-direction: column;
align-items: start;
width: 90%;
margin: 0 auto;

h3 {
Expand All @@ -111,12 +104,28 @@

.cds {
&-title {
display: inline-flex;
align-items: start;
justify-content: start;
gap: 1rem;
display: flex;
flex-direction: column;
gap: 1.7rem;
width: 100%;
margin-top: 1rem;
margin-bottom: 1.2rem;

&-name {
display: inline-flex;
align-items: start;
gap: 1rem;
}

&-graph {
display: inline-flex;
align-items: center;
justify-content: space-between;

@media (min-width: 800px) {
justify-content: space-evenly;
}
}
}

&-list {
Expand Down Expand Up @@ -159,9 +168,5 @@
}
}
}

@media (min-width: 1300px) {
width: 70%;
}
}
}
Loading
Loading