%h2.group-title Bokningar
%table.full.wrap
  %thead
    %tr
      %th Plats
      %th Tid
      %th
  %tbody
    - @company.bookings.each do |booking|
      %tr
        %td= link_to booking.place.name, place_path(booking.place)
        %td= date_and_time(booking)
        %td.delete= link_to 'Avboka', booking_path(booking, from_company_view: true),
          method: :delete, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"

%h2.group-title Bokningar
%table.full.wrap
  %thead
    %tr
      %th Plats
      %th Tid
      %th
  %tbody
    - @company.bookings.each do |booking|
      %tr
        %td= link_to booking.place.name, place_path(booking.place)
        %td= date_and_time(booking)
        %td.delete= button_to 'Avboka', cancel_booking_path(booking, from_company_view: true),
          method: :patch, data: { confirm: 'Är du säker på att du vill avboka?' }, class: "btn btn-danger btn-sm"

Patch booking instead of destroy it on cancel from company views
Patch booking instead of destroy it on cancel from company views
