bookingsync_portal 0.9.0 → 1.0.0
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/assets/javascripts/bookingsync_portal/admin/lib/list-filter.js.coffee +4 -4
- data/app/controllers/bookingsync_portal/admin/base_controller.rb +2 -2
- data/app/controllers/bookingsync_portal/admin/remote_accounts_controller.rb +1 -1
- data/app/controllers/bookingsync_portal/admin/rentals_controller.rb +1 -1
- data/app/models/bookingsync_portal/connection.rb +1 -1
- data/app/views/bookingsync_portal/admin/help/index.html.erb +1 -1
- data/app/views/bookingsync_portal/admin/rentals/_connected_rental.html.erb +1 -1
- data/app/views/bookingsync_portal/admin/rentals/index.html.erb +2 -2
- data/app/views/bookingsync_portal/admin/rentals/show.js.erb +1 -1
- data/app/views/layouts/bookingsync_portal/_menu.html.erb +1 -1
- data/db/migrate/20150222172825_create_accounts.rb +1 -1
- data/db/migrate/20150222173413_create_rentals.rb +1 -1
- data/db/migrate/20150222173711_create_remote_accounts.rb +1 -1
- data/db/migrate/20150222174023_create_remote_rentals.rb +1 -1
- data/db/migrate/20150222174234_create_connections.rb +1 -1
- data/db/migrate/20150520134912_create_photos.rb +1 -1
- data/db/migrate/20150521091056_create_rates.rb +1 -1
- data/db/migrate/20151210164752_add_synced_source_id_to_account.rb +1 -1
- data/db/migrate/20160301141356_create_bookings.rb +1 -1
- data/lib/bookingsync_portal/version.rb +1 -1
- data/lib/bookingsync_portal.rb +0 -11
- metadata +27 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76cbb051fc7aaba60b8e4f24a45fe3ce20ba88eb
|
4
|
+
data.tar.gz: 34a4dd0a99cace843610a4f38f8eaaf857d7a709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3134493e31826cefecb45e6f73264728511ad230e0c4f438f4834d61fe9e6912915fedd627eefe99d1d5a982ac710680dde20c7ca39e41a218ad3bcb5f1ec61b
|
7
|
+
data.tar.gz: 086aeb339da7eeaed6eecbaf65243392bfaa81d4b6aa1493907add52b254a0a540748e6163dc01cd09118debc50ebbe3c7e3e135fbfd4a62bf5576662d7fddc2
|
@@ -14,15 +14,15 @@ class @ListFilter
|
|
14
14
|
observeInputChanges: ->
|
15
15
|
@input.change( =>
|
16
16
|
filter = $(event.target).val()
|
17
|
-
@
|
18
|
-
@
|
17
|
+
@hideElements @listFilterable + ":not(:Contains(" + filter + "))"
|
18
|
+
@showElements @listFilterable + ":Contains(" + filter + ")"
|
19
19
|
false
|
20
20
|
).keyup =>
|
21
21
|
# fire the above change event after every letter
|
22
22
|
@input.change()
|
23
23
|
|
24
24
|
showElements: (elements) ->
|
25
|
-
@list.find(elements).parents(@listElement).
|
25
|
+
@list.find(elements).parents(@listElement).show()
|
26
26
|
|
27
27
|
hideElements: (elements) ->
|
28
|
-
@list.find(elements).parents(@listElement).
|
28
|
+
@list.find(elements).parents(@listElement).hide()
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require 'bookingsync_application/
|
1
|
+
require 'bookingsync_application/controllers/common_base'
|
2
2
|
|
3
3
|
module BookingsyncPortal
|
4
4
|
module Admin
|
@@ -6,7 +6,7 @@ module BookingsyncPortal
|
|
6
6
|
helper BookingsyncPortal::Admin::ApplicationHelper
|
7
7
|
layout 'bookingsync_portal/admin'
|
8
8
|
respond_to :html
|
9
|
-
include BookingsyncApplication::
|
9
|
+
include BookingsyncApplication::Controllers::CommonBase
|
10
10
|
|
11
11
|
before_action :enforce_remote_account!
|
12
12
|
|
@@ -10,7 +10,7 @@ module BookingsyncPortal
|
|
10
10
|
def create
|
11
11
|
BookingsyncPortal::Write::EnsureSourceExists.new(current_account).call
|
12
12
|
@remote_account = scope.create(params_remote_account)
|
13
|
-
respond_with @remote_account, location:
|
13
|
+
respond_with @remote_account, location: admin_rentals_path
|
14
14
|
end
|
15
15
|
|
16
16
|
private
|
@@ -9,7 +9,7 @@ module BookingsyncPortal
|
|
9
9
|
@visible_rentals = current_account.rentals.visible
|
10
10
|
@remote_accounts = current_account.remote_accounts
|
11
11
|
@remote_rentals_by_account = current_account.remote_rentals.ordered
|
12
|
-
.includes(:remote_account).group_by(&:remote_account)
|
12
|
+
.includes(:remote_account, :rental).group_by(&:remote_account)
|
13
13
|
end
|
14
14
|
|
15
15
|
def show
|
@@ -14,7 +14,7 @@ class BookingsyncPortal::Connection < ActiveRecord::Base
|
|
14
14
|
|
15
15
|
def notify_via_message_bus
|
16
16
|
MessageBus.publish "/account-#{rental.account_id}", { refresh_from:
|
17
|
-
BookingsyncPortal::
|
17
|
+
BookingsyncPortal::Engine.routes.url_helpers.admin_rental_path(rental, format: :js)
|
18
18
|
}
|
19
19
|
end
|
20
20
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<small><%= remote_rental.display_name %></small>
|
14
14
|
</h4>
|
15
15
|
<div class="status">
|
16
|
-
<%= link_to
|
16
|
+
<%= link_to BookingsyncPortal::Engine.routes.url_helpers.admin_connection_path(rental.connection),
|
17
17
|
class: ["btn", "btn-xs", "remove-connection", rental.remote_rental.synchronized? ? "btn-success" : "btn-warning"],
|
18
18
|
data: { disable_with: t('.disconnecting_rental') }, method: :delete, remote: true do %>
|
19
19
|
<% unless rental.remote_rental.synchronized? %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%- content_for :navbar_right do -%>
|
2
2
|
<ul class="nav navbar-nav">
|
3
|
-
<li><%= link_to icon("life-ring", t('.help')),
|
3
|
+
<li><%= link_to icon("life-ring", t('.help')), admin_help_path %></li>
|
4
4
|
</ul>
|
5
5
|
<%- end -%>
|
6
6
|
<div class="rentals-container row">
|
@@ -17,7 +17,7 @@
|
|
17
17
|
</div>
|
18
18
|
<div class="col-xs-6">
|
19
19
|
<div class="remote-rentals-list rentals-list"
|
20
|
-
data-connect-url="<%=
|
20
|
+
data-connect-url="<%= BookingsyncPortal::Engine.routes.url_helpers.admin_connections_path %>">
|
21
21
|
<div class="rentals-list-header">
|
22
22
|
<legend class="text-center">
|
23
23
|
<%= image_tag("#{BookingsyncPortal.portal_name.parameterize}.png",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
$("#<%= dom_id @rental %>").replaceWith(
|
2
2
|
<%- if @rental.connected? %>
|
3
3
|
"<%=j render 'connected_rental', rental: @rental, remote_rental: @rental.remote_rental,
|
4
|
-
disconnect_url:
|
4
|
+
disconnect_url: BookingsyncPortal::Engine.routes.url_helpers.admin_connection_path(@rental.connection) %>");
|
5
5
|
<%- else %>
|
6
6
|
"<%=j render 'rental', rental: @rental %>");
|
7
7
|
<%- end %>
|
@@ -13,7 +13,7 @@
|
|
13
13
|
</button>
|
14
14
|
<%- end -%>
|
15
15
|
<div>
|
16
|
-
<%= link_to icon("globe", BookingsyncPortal.portal_name),
|
16
|
+
<%= link_to icon("globe", BookingsyncPortal.portal_name), admin_root_path,
|
17
17
|
class: "navbar-brand h1",
|
18
18
|
data: { toggle: "dropdown" } %>
|
19
19
|
</a>
|
data/lib/bookingsync_portal.rb
CHANGED
@@ -74,15 +74,4 @@ module BookingsyncPortal
|
|
74
74
|
message_bus_channel_scope
|
75
75
|
end
|
76
76
|
end
|
77
|
-
|
78
|
-
# use this until migrated to ruby 2.3, https://bugs.ruby-lang.org/issues/10871, https://github.com/puma/puma/issues/647
|
79
|
-
module Routes
|
80
|
-
module UrlHelpers
|
81
|
-
include BookingsyncPortal::Engine.routes.url_helpers
|
82
|
-
end
|
83
|
-
extend UrlHelpers
|
84
|
-
def self.default_url_options
|
85
|
-
{}
|
86
|
-
end
|
87
|
-
end
|
88
77
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookingsync_portal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Marciniak
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-07-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -58,16 +58,22 @@ dependencies:
|
|
58
58
|
name: bookingsync_application
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
|
-
- - "
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '1'
|
64
|
+
- - "<"
|
62
65
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
66
|
+
version: '3'
|
64
67
|
type: :runtime
|
65
68
|
prerelease: false
|
66
69
|
version_requirements: !ruby/object:Gem::Requirement
|
67
70
|
requirements:
|
68
|
-
- - "
|
71
|
+
- - ">="
|
69
72
|
- !ruby/object:Gem::Version
|
70
|
-
version:
|
73
|
+
version: '1'
|
74
|
+
- - "<"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '3'
|
71
77
|
- !ruby/object:Gem::Dependency
|
72
78
|
name: redis
|
73
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -362,6 +368,20 @@ dependencies:
|
|
362
368
|
- - ">="
|
363
369
|
- !ruby/object:Gem::Version
|
364
370
|
version: '0'
|
371
|
+
- !ruby/object:Gem::Dependency
|
372
|
+
name: rails-controller-testing
|
373
|
+
requirement: !ruby/object:Gem::Requirement
|
374
|
+
requirements:
|
375
|
+
- - ">="
|
376
|
+
- !ruby/object:Gem::Version
|
377
|
+
version: '0'
|
378
|
+
type: :development
|
379
|
+
prerelease: false
|
380
|
+
version_requirements: !ruby/object:Gem::Requirement
|
381
|
+
requirements:
|
382
|
+
- - ">="
|
383
|
+
- !ruby/object:Gem::Version
|
384
|
+
version: '0'
|
365
385
|
description: A common base for creating BookingSync portal applications.
|
366
386
|
email:
|
367
387
|
- mandaryyyn@gmail.com
|
@@ -466,7 +486,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
466
486
|
version: '0'
|
467
487
|
requirements: []
|
468
488
|
rubyforge_project:
|
469
|
-
rubygems_version: 2.
|
489
|
+
rubygems_version: 2.6.10
|
470
490
|
signing_key:
|
471
491
|
specification_version: 4
|
472
492
|
summary: A common base for creating BookingSync portal applications.
|