text: app.controller('priceShow', ['$scope', '$http', '$rootScope', '$timeout', function($scope, $http, $rootScope, $timeout) {
      $scope.title = 'Detail Tarif';
      $scope.formData = {}
      var path = window.location.pathname
      id = path.replace(/.+\/(\d+)/, '$1');
      var pathhead = path.replace(id, '')
      $timeout(function () {
            editUrl = baseUrl + pathhead  + 'edit/' + id 
            $('#editButton').attr('href', editUrl)
      }, 500)
      $http.get(baseUrl + '/controller/user/price/' + id).then(function(data) {
              $scope.formData = data.data
              var unit, li
              var laboratory_treatment_list = $('#laboratory_treatment_list') 
  
              for(x in $scope.formData.laboratory_treatment) {
                  unit = $scope.formData.laboratory_treatment[x]
                  li = $('<li>' + unit.laboratory_type.name + '</li>')
                  $('#laboratory_treatment_list').append(li)
              }
          }, function(error) {
            $rootScope.disBtn=false;
            if (error.status==422) {
              var det="";
              angular.forEach(error.data.errors,function(val,i) {
                det+="- "+val+"<br>";
              });
              toastr.warning(det,error.data.message);
            } else {
              toastr.error(error.data.message,"Error Has Found !");
            }
      });
  
      $scope.delete = function(id) {
      is_delete = confirm('Apakah anda ingin menon-aktifkan data ini ?');
        if(is_delete)
            $http.delete(baseUrl + '/controller/user/price/' + id).then(function(data) {
                toastr.success("Data Berhasil dinon-aktifkan !");
                setTimeout(function () {
                    location.reload();
                }, 1500)
            }, function(error) {
              if (error.status==422) {
                var det="";
                angular.forEach(error.data.errors,function(val,i) {
                  det+="- "+val+"<br>";
                });
                toastr.warning(det,error.data.message);
              } else {
                toastr.error(error.data.message,"Error Has Found !");
              }
            });
      }
  
      $scope.activate = function(id) {
      is_activate = confirm('Apakah anda ingin mengaktifkan data ini ?');
        if(is_activate)
            $http.put(baseUrl + '/controller/user/price/activate/' + id).then(function(data) {
                toastr.success("Data Berhasil diaktifkan !");
                setTimeout(function () {
                    location.reload();
                }, 1500)
            }, function(error) {
              if (error.status==422) {
                var det="";
                angular.forEach(error.data.errors,function(val,i) {
                  det+="- "+val+"<br>";
                });
                toastr.warning(det,error.data.message);
              } else {
                toastr.error(error.data.message,"Error Has Found !");
              }
            });
      }
      
  }]);