mirror of
https://github.com/fspc/bike-database.git
synced 2026-09-16 08:31:39 -04:00
Louis | Adds client waiting list to client list
This commit is contained in:
@@ -1,24 +1,53 @@
|
||||
.container
|
||||
%h1 Clients
|
||||
.row
|
||||
= link_to ' + New Client', new_client_path, class: "btn btn-default"
|
||||
.row
|
||||
%h1 Client Waiting List
|
||||
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Agency
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @clients.each do |client|
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.agency.agency_name if client.agency
|
||||
%td= link_to 'Show', client
|
||||
%td= link_to 'Edit', edit_client_path(client)
|
||||
%td= link_to 'Destroy', client, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
%br
|
||||
= link_to ' + New Client', new_client_path, class: "btn btn-default"
|
||||
%th Number
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Application Date
|
||||
%th Agency
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @waiting_list.each_with_index do |client, index|
|
||||
%tr
|
||||
%td= index + 1
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.application_date
|
||||
%td= client.agency.agency_name if client.agency
|
||||
%td= link_to 'Show', client
|
||||
%td= link_to 'Edit', edit_client_path(client)
|
||||
%td= link_to 'Destroy', client, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
%br
|
||||
.row
|
||||
%h1 All Clients
|
||||
|
||||
%table.table.table-striped.table-bordered.table-hover
|
||||
%thead
|
||||
%tr
|
||||
%th First Name
|
||||
%th Last Name
|
||||
%th Agency
|
||||
%th
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
- @clients.each do |client|
|
||||
%tr
|
||||
%td= client.first_name
|
||||
%td= client.last_name
|
||||
%td= client.agency.agency_name if client.agency
|
||||
%td= link_to 'Show', client
|
||||
%td= link_to 'Edit', edit_client_path(client)
|
||||
%td= link_to 'Destroy', client, method: :delete, data: { confirm: 'Are you sure?' }
|
||||
|
||||
%br
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
.container
|
||||
%h1 Bike & Client Tracker
|
||||
- if current_user
|
||||
= link_to "Sign out", destroy_user_session_path, method: :delete
|
||||
- else
|
||||
= link_to "Sign in", new_user_session_path
|
||||
%br
|
||||
= link_to "View All Bikes", bikes_path
|
||||
%br
|
||||
|
||||
Reference in New Issue
Block a user