feat(planner): implement cancellation for planning calculations
- Refactor leave-planner.worker.ts to support cancellation of ongoing calculations. - Introduce `calculatePlanningAsyncInternal` for asynchronous planning calculations. - Add cancellation handling in the worker message event. - Update planning-date.ts with new utility functions for date manipulation. - Extend translation-service.ts and translation files (en.json, de.json, es.json, fr.json) to include new strings related to planning horizon and cancellation. - Create documentation for the cancellation feature in planner-cancellation.md. - Add unit tests for cancellation functionality in leave-planner-cancellation.spec.ts and leave-planner.worker.spec.ts. #57 #58
This commit is contained in:
1 parent
5c35a59805
commit
2edf2004f5
31 files changed
+2275
-304
No files matched your search
+12
-1
@@ -48,7 +48,14 @@
|
||||
"selectLanguage": "Sprache auswählen",
|
||||
"selectTheme": "Design",
|
||||
"themeOptions": { "system": "System", "light": "Hell", "dark": "Dunkel" },
|
||||
"systemAppearance": "Aktuelles Systemdesign"
|
||||
"systemAppearance": "Aktuelles Systemdesign",
|
||||
"planningHorizon": "Planungszeitraum",
|
||||
"planningStart": "Startdatum (einschließlich)",
|
||||
"lastPlanningDate": "Letzter Planungstag (einschließlich)",
|
||||
"planningDatesHelp": "Wählen Sie beliebige Daten, auch vergangene. Der Kalender wird aktualisiert, wenn Sie Plan berechnen auswählen.",
|
||||
"invalidDate": "Geben Sie zwei gültige Kalenderdaten ein.",
|
||||
"horizonOrder": "Der letzte Planungstag muss am oder nach dem Startdatum liegen.",
|
||||
"invalidHorizon": "Korrigieren Sie die Planungsdaten in den Einstellungen vor der Berechnung."
|
||||
},
|
||||
"rules": {
|
||||
"title": "Planungsregeln",
|
||||
@@ -109,6 +116,10 @@
|
||||
"invalidInput": "Die Planungsdaten sind ungültig.",
|
||||
"conflict": "Die Verpflichtungen können nicht gemeinsam erfüllt werden.",
|
||||
"incomplete": "Die Berechnung wurde vor Abschluss aller Qualitätsstufen beendet.",
|
||||
"cancel": "Abbrechen",
|
||||
"cancelling": "Berechnung wird abgebrochen…",
|
||||
"cancelled": "Berechnung abgebrochen",
|
||||
"cancelledPartial": "Berechnung abgebrochen — Teilplan",
|
||||
"error": "Bei der Planung ist ein unerwarteter Fehler aufgetreten.",
|
||||
"complete": "Plan berechnet.",
|
||||
"whyPlacement": "Ihre Urlaubstage verstehen",
|
||||
|
||||
+12
-1
@@ -48,7 +48,14 @@
|
||||
"selectLanguage": "Language",
|
||||
"selectTheme": "Theme",
|
||||
"themeOptions": { "system": "System", "light": "Light", "dark": "Dark" },
|
||||
"systemAppearance": "Current system appearance"
|
||||
"systemAppearance": "Current system appearance",
|
||||
"planningHorizon": "Planning horizon",
|
||||
"planningStart": "Start date (inclusive)",
|
||||
"lastPlanningDate": "Last planning date (inclusive)",
|
||||
"planningDatesHelp": "Choose any dates, including past dates. Your calendar updates when you select Calculate plan.",
|
||||
"invalidDate": "Enter two valid calendar dates.",
|
||||
"horizonOrder": "The last planning date must be on or after the start date.",
|
||||
"invalidHorizon": "Correct the planning dates in Settings before calculating."
|
||||
},
|
||||
"rules": {
|
||||
"title": "Planning rules",
|
||||
@@ -109,6 +116,10 @@
|
||||
"invalidInput": "The planning input is invalid.",
|
||||
"conflict": "The obligations cannot be satisfied together.",
|
||||
"incomplete": "Calculation stopped before all quality stages completed.",
|
||||
"cancel": "Cancel",
|
||||
"cancelling": "Cancelling…",
|
||||
"cancelled": "Calculation cancelled",
|
||||
"cancelledPartial": "Calculation cancelled — partial plan",
|
||||
"error": "The planner encountered an unexpected error.",
|
||||
"complete": "Plan calculated.",
|
||||
"whyPlacement": "Understand your leave days",
|
||||
|
||||
+12
-1
@@ -48,7 +48,14 @@
|
||||
"selectLanguage": "Idioma",
|
||||
"selectTheme": "Tema",
|
||||
"themeOptions": { "system": "Sistema", "light": "Claro", "dark": "Oscuro" },
|
||||
"systemAppearance": "Apariencia actual del sistema"
|
||||
"systemAppearance": "Apariencia actual del sistema",
|
||||
"planningHorizon": "Horizonte de planificación",
|
||||
"planningStart": "Fecha de inicio (incluida)",
|
||||
"lastPlanningDate": "Última fecha de planificación (incluida)",
|
||||
"planningDatesHelp": "Elige cualquier fecha, incluso pasada. El calendario se actualiza al seleccionar Calcular plan.",
|
||||
"invalidDate": "Introduce dos fechas válidas.",
|
||||
"horizonOrder": "La última fecha de planificación debe ser igual o posterior a la fecha de inicio.",
|
||||
"invalidHorizon": "Corrige las fechas de planificación en Ajustes antes de calcular."
|
||||
},
|
||||
"rules": {
|
||||
"title": "Reglas de planificación",
|
||||
@@ -109,6 +116,10 @@
|
||||
"invalidInput": "Los datos de planificación no son válidos.",
|
||||
"conflict": "Las obligaciones no se pueden satisfacer juntas.",
|
||||
"incomplete": "El cálculo se detuvo antes de completar todas las etapas de calidad.",
|
||||
"cancel": "Cancelar",
|
||||
"cancelling": "Cancelando…",
|
||||
"cancelled": "Cálculo cancelado",
|
||||
"cancelledPartial": "Cálculo cancelado — plan parcial",
|
||||
"error": "El planificador encontró un error inesperado.",
|
||||
"complete": "Plan calculado.",
|
||||
"whyPlacement": "Entender tus días de permiso",
|
||||
|
||||
+12
-1
@@ -48,7 +48,14 @@
|
||||
"selectLanguage": "Langue",
|
||||
"selectTheme": "Thème",
|
||||
"themeOptions": { "system": "Système", "light": "Clair", "dark": "Sombre" },
|
||||
"systemAppearance": "Apparence actuelle du système"
|
||||
"systemAppearance": "Apparence actuelle du système",
|
||||
"planningHorizon": "Horizon de planification",
|
||||
"planningStart": "Date de début (incluse)",
|
||||
"lastPlanningDate": "Dernière date de planification (incluse)",
|
||||
"planningDatesHelp": "Choisissez vos dates, même passées. Le calendrier est mis à jour lorsque vous cliquez sur Calculer le planning.",
|
||||
"invalidDate": "Saisissez deux dates calendaires valides.",
|
||||
"horizonOrder": "La dernière date de planification doit être égale ou postérieure à la date de début.",
|
||||
"invalidHorizon": "Corrigez les dates de planification dans les paramètres avant de calculer."
|
||||
},
|
||||
"rules": {
|
||||
"title": "Règles de planification",
|
||||
@@ -109,6 +116,10 @@
|
||||
"invalidInput": "Les données de planification sont invalides.",
|
||||
"conflict": "Les obligations ne peuvent pas être satisfaites ensemble.",
|
||||
"incomplete": "Le calcul s’est arrêté avant la fin des critères de qualité.",
|
||||
"cancel": "Annuler",
|
||||
"cancelling": "Annulation en cours…",
|
||||
"cancelled": "Calcul annulé",
|
||||
"cancelledPartial": "Calcul annulé — plan partiel",
|
||||
"error": "Le planificateur a rencontré une erreur inattendue.",
|
||||
"complete": "Plan calculé.",
|
||||
"whyPlacement": "Comprendre vos jours de congé",
|
||||
|
||||
Reference in new issue
Block a user