{ "CI_job_history_included": false, "approvals": [], "diff_versions": [ { "commits": [ { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 204, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 0, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 205, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 1, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 206, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 2, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 207, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 3, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 208, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 4, "sha": null, "trailers": {} }, { "authored_date": null, "commit_author_id": null, "committed_date": null, "committer_id": null, "merge_request_commits_metadata_id": 209, "merge_request_diff_id": 107, "message": null, "project_id": null, "relative_order": 5, "sha": null, "trailers": {} } ], "files": [ { "a_mode": "100644", "b_mode": "100644", "binary": false, "deleted_file": false, "diff": "@@ -2,7 +2,10 @@\n \t@if (isLoading()) {\n \t\t
\n", "encoded_file_path": false, "external_diff_offset": null, "external_diff_size": null, "generated": false, "merge_request_diff_id": 107, "new_file": false, "new_path": null, "old_path": "src/app/components/calendar-year/calendar-year.html", "project_id": 35, "relative_order": 0, "renamed_file": false, "too_large": false }, { "a_mode": "100644", "b_mode": "100644", "binary": false, "deleted_file": false, "diff": "@@ -51,25 +51,32 @@\n \t}\n }\n \n-.card {\n-\tmargin: 16px;\n-}\n+.spinner-container {\n+\tposition: relative;\n+\tdisplay: inline-block;\n \n-@keyframes spin {\n-\t0% {\n-\t\ttransform: rotate(0deg);\n+\t::ng-deep .mat-mdc-progress-spinner {\n+\t\t// Override Material spinner size\n+\t\twidth: 100px;\n+\t\theight: 100px;\n \t}\n \n-\t100% {\n-\t\ttransform: rotate(360deg);\n+\t.spinner-text {\n+\t\tposition: absolute;\n+\t\ttop: 50%;\n+\t\tleft: 50%;\n+\t\ttransform: translate(-50%, -50%);\n+\t\tfont-size: 20px;\n+\t\tfont-weight: bold;\n+\t\tcolor: #333;\n+\t\tpointer-events: none;\n+\n+\t\t@media (prefers-color-scheme: dark) {\n+\t\t\tcolor: #ddd;\n+\t\t}\n \t}\n }\n \n-:root {\n-\t@include mat.progress-spinner-overrides(\n-\t\t(\n-\t\t\tsize: 0.5rem,\n-\t\t\tactive-indicator-width: 0.25rem,\n-\t\t)\n-\t);\n+.card {\n+\tmargin: 16px;\n }\n", "encoded_file_path": false, "external_diff_offset": null, "external_diff_size": null, "generated": false, "merge_request_diff_id": 107, "new_file": false, "new_path": null, "old_path": "src/app/components/calendar-year/calendar-year.scss", "project_id": 35, "relative_order": 1, "renamed_file": false, "too_large": false }, { "a_mode": "100644", "b_mode": "100644", "binary": false, "deleted_file": false, "diff": "@@ -21,6 +21,7 @@ export class CalendarYear {\n \tprivate calendarSettingsService = inject(CalendarSettingsService);\n \n \tprotected isLoading = signal(true);\n+\tprotected loadingProgress = signal(0);\n \n \t// Use DateCacheService instead of creating Date objects\n \tprivate get currentMonth() {\n@@ -39,18 +40,26 @@ export class CalendarYear {\n \t\t\tconsole.log('Samedi Malin setting:', c);\n \t\t\tconsole.log('Optimizing vacations with data:', vacationData);\n \t\t\tthis.isLoading.set(true);\n-\t\t\t// Simulate server-side calculation with a small delay\n-\t\t\tsetTimeout(() => {\n-\t\t\t\tif (this.selectedDates) {\n-\t\t\t\t\t// Create a copy to avoid mutating the original signal data\n-\t\t\t\t\tthis.selectedDates.optimizeVacations(\n-\t\t\t\t\t\t{ ...vacationData },\n-\t\t\t\t\t\tthis.calendarSettingsService,\n-\t\t\t\t\t\tthis.calendarService,\n-\t\t\t\t\t);\n-\t\t\t\t}\n-\t\t\t\tthis.isLoading.set(false);\n-\t\t\t}, 1);\n+\t\t\tthis.loadingProgress.set(0);\n+\t\t\t// Defer execution to allow UI to update\n+\t\t\tqueueMicrotask(() => {\n+\t\t\t\tvoid (async () => {\n+\t\t\t\t\tif (this.selectedDates) {\n+\t\t\t\t\t\t// Create a copy to avoid mutating the original signal data\n+\t\t\t\t\t\tconst remainingDays = await this.selectedDates.optimizeVacations(\n+\t\t\t\t\t\t\t{ ...vacationData },\n+\t\t\t\t\t\t\tthis.calendarSettingsService,\n+\t\t\t\t\t\t\tthis.calendarService,\n+\t\t\t\t\t\t\t(progress: number) => {\n+\t\t\t\t\t\t\t\tthis.loadingProgress.set(progress);\n+\t\t\t\t\t\t\t},\n+\t\t\t\t\t\t);\n+\t\t\t\t\t\t// Update the remaining vacation days signal\n+\t\t\t\t\t\tthis.userInput.remainingVacationDaysSignal.set(remainingDays);\n+\t\t\t\t\t}\n+\t\t\t\t\tthis.isLoading.set(false);\n+\t\t\t\t})();\n+\t\t\t});\n \t\t});\n \t}\n \n", "encoded_file_path": false, "external_diff_offset": null, "external_diff_size": null, "generated": false, "merge_request_diff_id": 107, "new_file": false, "new_path": null, "old_path": "src/app/components/calendar-year/calendar-year.ts", "project_id": 35, "relative_order": 2, "renamed_file": false, "too_large": false }, { "a_mode": "100644", "b_mode": "100644", "binary": false, "deleted_file": false, "diff": "@@ -14,5 +14,16 @@\n \t\t\t\n \t\t\n \t\n+\t@if (hasRemainingDays()) {\n+\t\t