Skip to content

Commit

Permalink
fixed chart loading on selection and prediction changed. added forgot…
Browse files Browse the repository at this point in the history
…ten translation (#321)
  • Loading branch information
wolfgangroese authored Aug 12, 2024
1 parent 9277e06 commit 38f7f48
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ <h4 class="appointment-title">
[legend]="true"
*ngIf="predictionsChartValues?.length"
></arpa-chart>
<strong *ngIf="!predictionsChartValues?.length">{{ 'appointments.NO_PREDICTIONS_AVAILABLE' | translate }}</strong>
<p class="no-predictions-yet" *ngIf="!predictionsChartValues?.length">
{{ 'appointments.NO_PREDICTIONS_AVAILABLE' | translate }}
</p>
</div>
</div>
<div class="right-column" *ngIf="!isNew">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ th {
align-items: center;
height: 100%;
}
.no-predictions-yet {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}

/* Media query for screens smaller than 768px (like most mobile devices) */
@media screen and (max-width: 768px) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,11 @@ export class EditAppointmentComponent implements OnInit {
}

public prepareDonutChartData() {
this.predictionChartKeys = [];
this.predictionsChartValues = [];
this.acceptedSectionName = [];
this.accpetedSectionCount = [];

const predictionCounts: { [key: string]: number } = {};
const sectionCounts: { [key: string]: number } = {};

Expand Down Expand Up @@ -528,6 +533,7 @@ export class EditAppointmentComponent implements OnInit {
.subscribe((_) => {
this.notificationsService.success('appointments.PREDICTION_SET');
});
this.prepareDonutChartData();
}

onAllDayChanged(isAllDay: boolean) {
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"LEVEL": "Qualifikation",
"NEW_APPOINTMENT_CONFIRMATION": "Möchtest du einen neuen Termin anlegen für {{value}}?",
"NO_ACCEPTANCES_YET": "Noch keine Zusagen vorhanden",
"NO_PREDICTIONS_AVAILABLE": "Keine Vorhersagen verfügbar",
"NO_PREDICTION": "Deine Prognose?",
"NORECORDS": "Keine Datensätze gefunden",
"NOTIFICATION_SENT": "Die E-Mail-Benachrichtigungen wurde gesendet",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"LEVEL": "(Semi-)Professional",
"NEW_APPOINTMENT_CONFIRMATION": "Do you want to create a new appointment for {{value}}?",
"NO_ACCEPTANCES_YET": "No acceptances yet",
"NO_PREDICTIONS_AVAILABLE": "No predictions available",
"NO_PREDICTION": "Your prediction?",
"NORECORDS": "No records found",
"NOTIFICATION_SENT": "The e-mail notifications have been sent",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"LEVEL": "qualification",
"NEW_APPOINTMENT_CONFIRMATION": "Aimerais -tu fixer un nouveau rendez-vous pour {{value}}?",
"NO_ACCEPTANCES_YET": "Aucune acceptation pour le moment",
"NO_PREDICTIONS_AVAILABLE": "Aucune prédiction disponible",
"NO_PREDICTION": "Aucune prédiction",
"NORECORDS": "Aucun enregistrement n'a été trouvée",
"NOTIFICATION_SENT": "Les notifications par e-mail ont été envoyées",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"NEW_APPOINTMENT_CONFIRMATION": "Deseja (re)agendar para {{value}}?",
"NO_ACCEPTANCES_YET": "Ainda sem aceitações",
"NO_PREDICTION": "Sem previsão",
"NO_PREDICTIONS_AVAILABLE": "Sem previsões disponíveis",
"NORECORDS": "Nenhum registo encontrado",
"NOTIFICATION_SENT": "As notificações por correio eletrónico foram enviadas",
"PAGE_TITLE": "Calendário",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"LEVEL": "Квалификация",
"NEW_APPOINTMENT_CONFIRMATION": "Вы хотите создать новую встречу для {{value}}?",
"NO_ACCEPTANCES_YET": "Пока нет подтверждений",
"NO_PREDICTIONS_AVAILABLE": "Прогнозы недоступны",
"NO_PREDICTION": "Ваш прогноз?",
"NORECORDS": "Записи данных не найдены",
"NOTIFICATION_SENT": "Уведомления по электронной почте отправлены",
Expand Down
1 change: 1 addition & 0 deletions src/assets/i18n/appointments/ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"LEVEL": "Кваліфікація",
"NEW_APPOINTMENT_CONFIRMATION": "Ви хочете створити нову зустріч для {{value}}?",
"NO_ACCEPTANCES_YET": "Ще немає підтверджень",
"NO_PREDICTIONS_AVAILABLE": "Прогнози недоступні",
"NO_PREDICTION": "Ваш прогноз?",
"NORECORDS": "Не знайдено жодного запису даних",
"NOTIFICATION_SENT": "Сповіщення на електронну пошту надіслано",
Expand Down

0 comments on commit 38f7f48

Please sign in to comment.