update services index

This commit is contained in:
Celina Lopez
2024-10-02 12:12:30 -07:00
parent 013c0845a7
commit 70b6bc584c
2 changed files with 46 additions and 17 deletions

View File

@@ -10,23 +10,49 @@
<% end %>
</div>
<div class="overflow-x-auto mt-2">
<table class="w-full table-auto">
<thead class="">
<tr>
<th class="px-4 py-2 text-left">Name</th>
<th class="px-4 py-2 text-left">Service Type</th>
<th class="px-4 py-2 text-left">Command</th>
</tr>
</thead>
<tbody>
<% @project.project_services.each do |service| %>
<tr class="border-b">
<td class="px-4 py-2"><%= service.name %></td>
<td class="px-4 py-2"><%= service.service_type.titleize %></td>
<td class="px-4 py-2"><%= service.command %></td>
<% if @project.project_services.empty? %>
<div>
<p class="text-gray-500">No services yet</p>
</div>
<% else %>
<table class="table mt-2 rounded-box" id="order_table" data-component="table">
<thead>
<tr>
<th>
<span class="text-sm font-medium text-base-content/80">Name</span>
</th>
<th>
<span class="text-sm font-medium text-base-content/80">Type</span>
</th>
<th>
<span class="text-sm font-medium text-base-content/80">
Command
</span>
</th>
</tr>
<% end %>
</tbody>
</table>
</thead>
<tbody>
<% @project.project_services.each do |service| %>
<tr class="cursor-pointer hover:bg-base-200/40">
<td>
<div class="flex items-center space-x-3 truncate">
<div class="font-medium">
<%= service.name %>
</div>
</div>
</td>
<td>
<div class="font-medium">
<%= service.service_type.titleize %>
</div>
</td>
<td>
<code><%= service.command %> </code>
</td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</div>
<% end %>

View File

@@ -107,4 +107,7 @@ module.exports = {
},
],
},
safelist: [
'bg-success/10', 'text-success'
]
}