| Lines 26-31
          export default {
      
      
        Link Here | 
        
          | 26 |         const AVStore = inject("AVStore") | 26 |         const AVStore = inject("AVStore") | 
        
          | 27 |         const { get_lib_from_av, map_av_dt_filter } = AVStore | 27 |         const { get_lib_from_av, map_av_dt_filter } = AVStore | 
        
          | 28 |  | 28 |  | 
            
              |  |  | 29 |         const { setConfirmationDialog, setMessage } = inject("mainStore") | 
            
              | 30 |  | 
        
          | 29 |         const table_id = "license_list" | 31 |         const table_id = "license_list" | 
        
          | 30 |         useDataTable(table_id) | 32 |         useDataTable(table_id) | 
        
          | 31 |  | 33 |  | 
  
    | Lines 34-39
          export default {
      
      
        Link Here | 
        
          | 34 |             get_lib_from_av, | 36 |             get_lib_from_av, | 
        
          | 35 |             map_av_dt_filter, | 37 |             map_av_dt_filter, | 
        
          | 36 |             table_id, | 38 |             table_id, | 
            
              |  |  | 39 |             setConfirmationDialog, | 
            
              | 40 |             setMessage, | 
        
          | 37 |         } | 41 |         } | 
        
          | 38 |     }, | 42 |     }, | 
        
          | 39 |     data: function () { | 43 |     data: function () { | 
  
    | Lines 64-71
          export default {
      
      
        Link Here | 
        
          | 64 |         edit_license: function (license_id) { | 68 |         edit_license: function (license_id) { | 
        
          | 65 |             this.$router.push("/cgi-bin/koha/erm/licenses/edit/" + license_id) | 69 |             this.$router.push("/cgi-bin/koha/erm/licenses/edit/" + license_id) | 
        
          | 66 |         }, | 70 |         }, | 
          
            
              | 67 |         delete_license: function (license_id) { | 71 |         delete_license: function (license_id, license_name) { | 
            
              | 68 |             this.$router.push("/cgi-bin/koha/erm/licenses/delete/" + license_id) | 72 |             this.setConfirmationDialog( | 
            
              |  |  | 73 |                 { | 
            
              | 74 |                     title: this.$__( | 
            
              | 75 |                         "Are you sure you want to remove this license?" | 
            
              | 76 |                     ), | 
            
              | 77 |                     message: license_name, | 
            
              | 78 |                     accept_label: this.$__("Yes, delete"), | 
            
              | 79 |                     cancel_label: this.$__("No, do not delete"), | 
            
              | 80 |                 }, | 
            
              | 81 |                 () => { | 
            
              | 82 |                     const client = APIClient.erm | 
            
              | 83 |                     client.licenses.delete(license_id).then( | 
            
              | 84 |                         success => { | 
            
              | 85 |                             this.setMessage(this.$__("License deleted")) | 
            
              | 86 |                             $("#" + this.table_id) | 
            
              | 87 |                                 .DataTable() | 
            
              | 88 |                                 .ajax.url("/api/v1/erm/licenses") | 
            
              | 89 |                                 .draw() | 
            
              | 90 |                         }, | 
            
              | 91 |                         error => {} | 
            
              | 92 |                     ) | 
            
              | 93 |                 } | 
            
              | 94 |             ) | 
        
          | 69 |         }, | 95 |         }, | 
        
          | 70 |         build_datatable: function () { | 96 |         build_datatable: function () { | 
        
          | 71 |             let show_license = this.show_license | 97 |             let show_license = this.show_license | 
  
    | Lines 203-208
          export default {
      
      
        Link Here | 
        
          | 203 |                             function (index, e) { | 229 |                             function (index, e) { | 
        
          | 204 |                                 let tr = $(this).parent().parent() | 230 |                                 let tr = $(this).parent().parent() | 
        
          | 205 |                                 let license_id = api.row(tr).data().license_id | 231 |                                 let license_id = api.row(tr).data().license_id | 
            
              |  |  | 232 |                                 let license_name = api.row(tr).data().name | 
        
          | 206 |                                 let editButton = createVNode( | 233 |                                 let editButton = createVNode( | 
        
          | 207 |                                     "a", | 234 |                                     "a", | 
        
          | 208 |                                     { | 235 |                                     { | 
  
    | Lines 227-233
          export default {
      
      
        Link Here | 
        
          | 227 |                                         class: "btn btn-default btn-xs", | 254 |                                         class: "btn btn-default btn-xs", | 
        
          | 228 |                                         role: "button", | 255 |                                         role: "button", | 
        
          | 229 |                                         onClick: () => { | 256 |                                         onClick: () => { | 
          
            
              | 230 |                                             delete_license(license_id) | 257 |                                             delete_license( | 
            
              |  |  | 258 |                                                 license_id, | 
            
              | 259 |                                                 license_name | 
            
              | 260 |                                             ) | 
        
          | 231 |                                         }, | 261 |                                         }, | 
        
          | 232 |                                     }, | 262 |                                     }, | 
        
          | 233 |                                     [ | 263 |                                     [ | 
            
              | 234 | -  |  |  |