caboose-rets 0.1.189 → 0.1.192
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc2ec5dc5eb53231ac2e68313a01f68253d8912893a0aa8c29c4e2885001113b
|
4
|
+
data.tar.gz: 9b5a14bcd98c6518f036dde59d159f364e51966077a80e7697471dddea77b112
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b81c17cea7ebd2d5be1049327fd9495d3c19712df9cf92c6a44f8d8a5c4e6f11aeec34715d7dd5e34bd14d550b0ee7daa5e796d934fc20170a09fe5b7e646bce
|
7
|
+
data.tar.gz: 6831b3e5c8bc6599ac89b6591b175fd650935b7524ccd32874d9e60c175bade2b433f5130cd61bcf58c350935f32481b914382e579d633153ffeec03c8ac80df
|
@@ -454,7 +454,7 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
454
454
|
ids_to_remove = local_ids - ids
|
455
455
|
self.log3(class_type,nil,"Found #{ids_to_remove.count} #{class_type} records in the local database that are not in the remote database.")
|
456
456
|
|
457
|
-
# Delete all RetsMedia and CabooseMedia for the deleted property listings (except keep the first image)
|
457
|
+
# Delete all RetsMedia and CabooseMedia for the deleted property listings (except keep the first image)
|
458
458
|
if class_type == 'Property' && ids_to_remove && ids_to_remove.count > 0
|
459
459
|
self.log3(class_type,nil,"Deleting Media objects that shouldn't be there...")
|
460
460
|
muis = CabooseRets::Property.where("#{k} in (?)", ids_to_remove).pluck(:matrix_unique_id)
|
@@ -472,6 +472,10 @@ class CabooseRets::RetsImporter # < ActiveRecord::Base
|
|
472
472
|
self.log3(class_type,nil,"Deleting #{class_type} records in the local database that shouldn't be there...")
|
473
473
|
query = ["delete from #{t} where #{k} in (?)", ids_to_remove]
|
474
474
|
ActiveRecord::Base.connection.execute(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
475
|
+
else # mark deleted properties as Deleted status
|
476
|
+
self.log3(class_type,nil,"Setting deleted properties as Deleted status...")
|
477
|
+
query = ["update #{t} set status = ? where #{k} in (?)", "Deleted", ids_to_remove]
|
478
|
+
ActiveRecord::Base.connection.execute(ActiveRecord::Base.send(:sanitize_sql_array, query))
|
475
479
|
end
|
476
480
|
|
477
481
|
# Find any ids in the remote database that should be in the local database
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class CabooseRets::RetsPlugin < Caboose::CaboosePlugin
|
2
2
|
|
3
|
-
def self.admin_nav(nav, user = nil, page = nil, site)
|
3
|
+
def self.admin_nav(nav, user = nil, page = nil, site, is_superadmin)
|
4
4
|
return nav if user.nil?
|
5
5
|
return nav if !site.use_rets
|
6
6
|
return nav if !user.is_allowed('rets_properties', 'view')
|
@@ -11,10 +11,10 @@ class CabooseRets::RetsPlugin < Caboose::CaboosePlugin
|
|
11
11
|
'children' => [],
|
12
12
|
'modal' => true
|
13
13
|
}
|
14
|
-
item['children'] << { 'id' => 'agents', 'icon' => 'users', 'href' => '/admin/agents' , 'text' => 'Agents' , 'modal' => false } if user.is_allowed('rets_agents','view')
|
14
|
+
item['children'] << { 'id' => 'agents', 'icon' => 'users', 'href' => '/admin/agents' , 'text' => 'Agents' , 'modal' => false } if user.is_allowed('rets_agents','view', is_superadmin)
|
15
15
|
# item['children'] << { 'id' => 'offices' , 'href' => '/admin/offices' , 'text' => 'Offices' , 'modal' => false }
|
16
|
-
item['children'] << { 'id' => 'open-houses', 'icon' => 'calendars', 'href' => '/admin/open-houses' , 'text' => 'Open Houses' , 'modal' => false } if user.is_allowed('rets_open_houses','view')
|
17
|
-
item['children'] << { 'id' => 'properties' , 'icon' => 'rets', 'href' => '/admin/properties' , 'text' => 'Properties' , 'modal' => false } if user.is_allowed('rets_properties','view')
|
16
|
+
item['children'] << { 'id' => 'open-houses', 'icon' => 'calendars', 'href' => '/admin/open-houses' , 'text' => 'Open Houses' , 'modal' => false } if user.is_allowed('rets_open_houses','view',is_superadmin)
|
17
|
+
item['children'] << { 'id' => 'properties' , 'icon' => 'rets', 'href' => '/admin/properties' , 'text' => 'Properties' , 'modal' => false } if user.is_allowed('rets_properties','view',is_superadmin)
|
18
18
|
# item['children'] << { 'id' => 'commercial' , 'href' => '/admin/commercial' , 'text' => 'Commercial Property' , 'modal' => false }
|
19
19
|
# item['children'] << { 'id' => 'commercial' , 'href' => '/admin/multi-family' , 'text' => 'Multi-Family Property' , 'modal' => false }
|
20
20
|
# item['children'] << { 'id' => 'land' , 'href' => '/admin/land' , 'text' => 'Land Property' , 'modal' => false }
|
data/lib/caboose_rets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-rets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.192
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: caboose-cms
|