stay_commerce 0.1.12 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/stay/admin/properties_controller.rb +1 -9
- data/app/controllers/stay/admin/rooms_controller.rb +2 -2
- data/app/controllers/stay/api/v1/amenities_controller.rb +38 -6
- data/app/controllers/stay/api/v1/features_controller.rb +32 -6
- data/app/controllers/stay/api/v1/property_categories_controller.rb +43 -5
- data/app/controllers/stay/api/v1/property_types_controller.rb +32 -9
- data/app/controllers/stay/users/registrations_controller.rb +7 -0
- data/app/controllers/stay/users/sessions_controller.rb +7 -0
- data/app/helpers/stay/application_helper.rb +44 -14
- data/app/models/stay/amenity.rb +0 -2
- data/app/models/stay/feature.rb +0 -1
- data/app/models/stay/property.rb +1 -1
- data/app/models/stay/room_type.rb +3 -2
- data/app/serializers/feature_serializer.rb +3 -0
- data/app/serializers/property_listing_serializer.rb +1 -1
- data/app/serializers/property_serializer.rb +1 -1
- data/app/serializers/room_serializer.rb +2 -2
- data/app/views/stay/admin/amenities/index.html.erb +2 -2
- data/app/views/stay/admin/features/index.html.erb +2 -2
- data/app/views/stay/admin/properties/_description.html.erb +12 -53
- data/app/views/stay/admin/properties/_details.html.erb +2 -26
- data/app/views/stay/admin/properties/_form.html.erb +2 -34
- data/app/views/stay/admin/properties/_location.html.erb +6 -6
- data/app/views/stay/admin/properties/_sidebar.html.erb +7 -7
- data/app/views/stay/admin/properties/index.html.erb +56 -60
- data/app/views/stay/admin/properties/show.html.erb +0 -78
- data/app/views/stay/admin/rooms/_form.html.erb +42 -34
- data/app/views/stay/admin/rooms/index.html.erb +59 -60
- data/app/views/stay/admin/rooms/show.html.erb +15 -5
- data/app/views/stay/admin/users/show.html.erb +6 -3
- data/lib/stay/version.rb +1 -2
- metadata +3 -3
- data/app/serializers/property_feature_serializer.rb +0 -5
@@ -1,69 +1,68 @@
|
|
1
1
|
<div class="card mb-7">
|
2
|
-
|
2
|
+
<div class="card-header">
|
3
3
|
<div class="row align-items-center">
|
4
4
|
<div class="col-sm-6 col-12 mb-4 mb-sm-0">
|
5
|
-
|
6
|
-
<h1 class="h3 mb-0 ls-tight">Rooms</h1>
|
5
|
+
<h1 class="h3 mb-0 ls-tight">Rooms</h1>
|
7
6
|
</div>
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
7
|
+
<div class="col-sm-6 col-12 text-sm-end mb-4">
|
8
|
+
<div class="d-inline-flex gap-2">
|
9
|
+
<%= link_to new_admin_property_room_path(@property), class: "btn btn-sm btn-primary" do %>
|
10
|
+
<span class="pe-2"><i class="bi bi-plus"></i></span>
|
11
|
+
<span>Add Room</span>
|
12
|
+
<% end %>
|
13
|
+
<%= link_to edit_admin_property_path(@property), class: "btn btn-sm btn-secondary" do %>
|
14
|
+
<span class="pe-2"><i class="bi bi-arrow-right"></i></span>
|
15
|
+
<span>Go to Property</span>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
18
18
|
</div>
|
19
|
-
</div>
|
19
|
+
</div>
|
20
20
|
</div>
|
21
21
|
<div class="table-responsive">
|
22
|
-
<table class="table table-hover table-nowrap">
|
22
|
+
<table class="table table-hover table-nowrap text-center align-middle">
|
23
23
|
<thead class="table-light">
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</table>
|
64
|
-
</div>
|
65
|
-
|
66
|
-
<div class="card-footer border-0 py-5">
|
67
|
-
<span class="text-muted text-sm">Showing 10 items out of 250 results found</span>
|
24
|
+
<tr>
|
25
|
+
<th scope="col">Image</th>
|
26
|
+
<th scope="col">Max Guests</th>
|
27
|
+
<th scope="col">Price Per Night</th>
|
28
|
+
<th scope="col">Room Type</th>
|
29
|
+
<th scope="col">Booking Start</th>
|
30
|
+
<th scope="col">Booking End</th>
|
31
|
+
<th scope="col">Status</th>
|
32
|
+
<th scope="col">Action</th>
|
33
|
+
<th></th>
|
34
|
+
</tr>
|
35
|
+
</thead>
|
36
|
+
<tbody>
|
37
|
+
<% @rooms.each do |room| %>
|
38
|
+
<tr>
|
39
|
+
<td>
|
40
|
+
<%= image_tag main_app.url_for(room.room_images.first.url), size: "25x25" if room.room_images.attached? %>
|
41
|
+
</td>
|
42
|
+
<td><%= room.max_guests %></td>
|
43
|
+
<td><%= currency_symbol(current_currency) %> <%= room.price_per_month %></td>
|
44
|
+
<td><%= room.room_type&.name %></td>
|
45
|
+
<td><%= room.booking_start&.strftime("%b %d, %Y")%></td>
|
46
|
+
<td><%= room.booking_end&.strftime("%b %d, %Y")%></td>
|
47
|
+
<td><%= room.status&.humanize%></td>
|
48
|
+
<td class="text-end d-flex justify-content-end">
|
49
|
+
<%= link_to edit_admin_property_room_path(@property, room), class: 'btn d-inline-flex btn-sm btn-neutral mx-1' do %>
|
50
|
+
<i class="bi bi-pencil">Edit</i>
|
51
|
+
<% end %>
|
52
|
+
<%= link_to admin_property_room_path(@property, room), class: 'btn d-inline-flex btn-sm btn-neutral mx-1' do %>
|
53
|
+
<i class="bi bi-eye">View</i>
|
54
|
+
<% end %>
|
55
|
+
<%= button_to admin_property_room_path(@property, room), method: :delete, data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' }, class: 'btn btn-sm btn-neutral mx-1 text-danger-hover' do %>
|
56
|
+
<i class="bi bi-trash">Destroy</i>
|
57
|
+
<% end %>
|
58
|
+
</td>
|
59
|
+
</tr>
|
60
|
+
<% end %>
|
61
|
+
</tbody>
|
62
|
+
</table>
|
68
63
|
</div>
|
69
|
-
</div>
|
64
|
+
</div>
|
65
|
+
<div class="d-flex justify-content-center">
|
66
|
+
<%= paginate @rooms %>
|
67
|
+
</div>
|
68
|
+
|
@@ -6,13 +6,23 @@
|
|
6
6
|
<h2 class="text-xl font-semibold mb-0">Room Details</h2>
|
7
7
|
</div>
|
8
8
|
<div class="card-body">
|
9
|
-
|
9
|
+
<p><strong>Images:</strong></p>
|
10
|
+
<% if @room.room_images.attached? %>
|
11
|
+
<div class="d-flex flex-wrap gap-2">
|
12
|
+
<% @room.room_images.each do |image| %>
|
13
|
+
<%= image_tag main_app.url_for(image.url), size: "60x60", class: "img-thumbnail" %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
16
|
+
<% else %>
|
17
|
+
<p class="text-muted">No Images Found</p>
|
18
|
+
<% end %>
|
19
|
+
<p><strong>Name: </strong><%= @room&.name %></p>
|
10
20
|
<p><strong>Max Guests: </strong><%= @room.max_guests %></p>
|
11
21
|
<p><strong>Price Per Night: </strong><%= currency_symbol(current_currency)%> <%= @room.price_per_month %></p>
|
12
|
-
<p><strong>Room Type: </strong><%= @room.room_type
|
13
|
-
<p><strong>Booking Start: </strong><%= @room.booking_start%></p>
|
14
|
-
<p><strong>Booking End: </strong><%= @room.booking_end%></p>
|
15
|
-
<p><strong>Status: </strong><%= @room.status%></p>
|
22
|
+
<p><strong>Room Type: </strong><%= @room.room_type&.name%></p>
|
23
|
+
<p><strong>Booking Start: </strong><%= @room.booking_start&.strftime("%b %d, %Y")%></p>
|
24
|
+
<p><strong>Booking End: </strong><%= @room.booking_end&.strftime("%b %d, %Y")%></p>
|
25
|
+
<p><strong>Status: </strong><%= @room.status&.humanize%></p>
|
16
26
|
|
17
27
|
<div class="d-flex mt-4 p-4 justify-content-center">
|
18
28
|
<%= link_to 'Edit', edit_admin_property_room_path(@property, @room), class: 'btn btn-warning me-3' %>
|
@@ -6,12 +6,15 @@
|
|
6
6
|
<h2 class="text-xl font-semibold mb-0">User Details</h2>
|
7
7
|
</div>
|
8
8
|
<div class="card-body">
|
9
|
-
|
9
|
+
<%if @user.profile_image.attached?%>
|
10
|
+
<p><strong>Profile Image: </strong><%= image_tag main_app.url_for(@user.profile_image), size: "100x100", class: "mt-2" %></p>
|
11
|
+
<%end%>
|
12
|
+
<p><strong>Full Name: </strong><%= @user.full_name %></p>
|
10
13
|
<p><strong>Email: </strong><%= @user.email %></p>
|
11
14
|
<p><strong>Phone: </strong><%= @user.phone %></p>
|
12
|
-
<p><strong>Date of Birth: </strong><%= @user.date_of_birth %></p>
|
15
|
+
<p><strong>Date of Birth: </strong><%= @user.date_of_birth&.strftime("%b %d, %Y") %></p>
|
13
16
|
<p><strong>Gender: </strong><%= @user.gender %></p>
|
14
|
-
<p><strong>
|
17
|
+
<p><strong>Role: </strong><%= @user.stay_roles.map(&:name).join(", ").capitalize %></p>
|
15
18
|
<div class="d-flex mt-4 p-4 justify-content-center">
|
16
19
|
<%= link_to 'Edit', edit_admin_user_path(@user), class: 'btn btn-warning me-3' %>
|
17
20
|
<%= link_to 'Back', admin_users_path, class: 'btn btn-secondary' %>
|
data/lib/stay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stay_commerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- w3villa-vikaspal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -611,13 +611,13 @@ files:
|
|
611
611
|
- app/serializers/cancellation_policy_serializer.rb
|
612
612
|
- app/serializers/chat_serializer.rb
|
613
613
|
- app/serializers/credit_card_serializer.rb
|
614
|
+
- app/serializers/feature_serializer.rb
|
614
615
|
- app/serializers/house_rules_serializer.rb
|
615
616
|
- app/serializers/invoice_serializer.rb
|
616
617
|
- app/serializers/last_5_messages_serializer.rb
|
617
618
|
- app/serializers/line_item_serializer.rb
|
618
619
|
- app/serializers/message_serializer.rb
|
619
620
|
- app/serializers/property_category_serializer.rb
|
620
|
-
- app/serializers/property_feature_serializer.rb
|
621
621
|
- app/serializers/property_listing_serializer.rb
|
622
622
|
- app/serializers/property_serializer.rb
|
623
623
|
- app/serializers/property_type_serializer.rb
|