<commit_before>﻿module Kitos.DataProcessing.Agreement.Edit {
    "use strict";

    export class SubNavDataProcessingAgreementController {
        static $inject: Array<string> = [
            "$scope",
            "$rootScope",
            "$state",
            "notify"
        ];

        constructor(
            private readonly $scope,
            $rootScope,
            $state: angular.ui.IStateService,
            notify,
            dataProcessingAgreementService: Services.DataProcessing.IDataProcessingAgreementService) {

            this.$scope.page.title = "Databehandleraftaler";
 
            $rootScope.page.subnav = [
                { state: "data-processing.overview", text: "Databehandleraftaler"}
            ];
            $rootScope.page.subnav.buttons = [
                { func: remove, text: "Slet Databehandleraftale", style: "btn-danger", showWhen: "data-processing.edit-agreement", dataElementType: 'removeDataProcessingAgreementButton' }
            ];

            $rootScope.subnavPositionCenter = false;

            $scope.$on("$viewContentLoaded", () => {
                $rootScope.positionSubnav();
            });

            function remove() {
                if (!confirm("Er du sikker på du vil slette Databehandleraftale?")) {
                    return;
                }
                const dataProcessingAgreementId = $state.params["id"];
                var msg = notify.addInfoMessage("Sletter Databehandleraftale...", false);

                dataProcessingAgreementService.delete(dataProcessingAgreementId).then(
                    deleteResponse => {
                        msg.toSuccessMessage("Databehandleraftale slettet!");
                            $state.go("data-processing.overview");
                        },
                    (errorResponse: Models.Api.ApiResponseErrorCategory) => {
                        switch (errorResponse) {
                        case Models.Api.ApiResponseErrorCategory.NotFound:
                                msg.toErrorMessage("Fejl! Kunne ikke finde og slette den valgte databehandleraftale!");
                            break;
                        default:<commit_msg>Menu highlight fix for dba<commit_after>﻿module Kitos.DataProcessing.Agreement.Edit {
    "use strict";

    export class SubNavDataProcessingAgreementController {
        static $inject: Array<string> = [
            "$scope",
            "$rootScope",
            "$state",
            "notify"
        ];

        constructor(
            private readonly $scope,
            $rootScope,
            $state: angular.ui.IStateService,
            notify,
            dataProcessingAgreementService: Services.DataProcessing.IDataProcessingAgreementService) {

            this.$scope.page.title = "Databehandleraftaler";
 
            $rootScope.page.subnav = [
                { state: "data-processing.overview", substate: "data-processing.edit-agreement", text: "Databehandleraftaler" }
            ];
            $rootScope.page.subnav.buttons = [
                { func: remove, text: "Slet Databehandleraftale", style: "btn-danger", showWhen: "data-processing.edit-agreement", dataElementType: 'removeDataProcessingAgreementButton' }
            ];

            $rootScope.subnavPositionCenter = false;

            $scope.$on("$viewContentLoaded", () => {
                $rootScope.positionSubnav();
            });

            function remove() {
                if (!confirm("Er du sikker på du vil slette Databehandleraftale?")) {
                    return;
                }
                const dataProcessingAgreementId = $state.params["id"];
                var msg = notify.addInfoMessage("Sletter Databehandleraftale...", false);

                dataProcessingAgreementService.delete(dataProcessingAgreementId).then(
                    deleteResponse => {
                        msg.toSuccessMessage("Databehandleraftale slettet!");
                            $state.go("data-processing.overview");
                        },
                    (errorResponse: Models.Api.ApiResponseErrorCategory) => {
                        switch (errorResponse) {
                        case Models.Api.ApiResponseErrorCategory.NotFound:
                                msg.toErrorMessage("Fejl! Kunne ikke finde og slette den valgte databehandleraftale!");
                            break;
                        default:
{'fraction_non_alphanumeric': 0.09927634554500227, 'fraction_numerical': 0.0, 'mean_word_length': 1.6985967053081148, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4157865', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1028, 'n_words': 183}