dscf-core 0.3.2 → 0.3.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 442564f7e8acce4f8eae9f074f58b03f8f026189660334c5c58cb2f67cce461c
|
|
4
|
+
data.tar.gz: 1c283579ec50ad95225bf1f6f9fd76d71decedf6387289ce99c314fefdae5d8f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8d13fd5bb155bc6b292bcbe46c28e35d5e3be4b070cb95183b30cc7da0abaef0f955b000af3a2282138b5272f98a181569e45ae322c047e695cf229daba194ec
|
|
7
|
+
data.tar.gz: 56540f927754630b63a813a573e81f7c84cc2d94f462851536dc04b59cf6ecb1c85ee32e3156d43263e0de6256cd986dedc160d7d13da0f123cf8818a3b6df7e
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
module Dscf
|
|
2
2
|
module Core
|
|
3
3
|
class Address < ApplicationRecord
|
|
4
|
-
belongs_to :user, class_name: "Dscf::Core::User"
|
|
4
|
+
belongs_to :user, class_name: "Dscf::Core::User", optional: true
|
|
5
|
+
belongs_to :supplier, class_name: "Dscf::Marketplace::Supplier", optional: true
|
|
5
6
|
|
|
6
|
-
enum :address_type, {
|
|
7
|
+
enum :address_type, {
|
|
8
|
+
shipping: 0,
|
|
9
|
+
residence: 1,
|
|
10
|
+
current: 2,
|
|
11
|
+
branch: 3,
|
|
12
|
+
warehouse: 4,
|
|
13
|
+
business_hq: 5,
|
|
14
|
+
pickup_point: 6
|
|
15
|
+
}
|
|
7
16
|
|
|
8
17
|
validates :country, presence: true
|
|
18
|
+
|
|
19
|
+
def self.ransackable_attributes(_auth_object = nil)
|
|
20
|
+
%w[id user_id supplier_id address_type country city sub_city woreda kebele house_numbers po_box created_at updated_at]
|
|
21
|
+
end
|
|
9
22
|
end
|
|
10
23
|
end
|
|
11
24
|
end
|
|
@@ -20,7 +20,7 @@ module Dscf
|
|
|
20
20
|
|
|
21
21
|
def self.ransackable_attributes(_auth_object = nil)
|
|
22
22
|
%w[business_type_id contact_email contact_phone created_at description id id_value name tin_number
|
|
23
|
-
|
|
23
|
+
updated_at user_id is_system]
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def self.ransackable_associations(_auth_object = nil)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module Dscf
|
|
2
2
|
module Core
|
|
3
3
|
class BusinessSerializer < ActiveModel::Serializer
|
|
4
|
-
attributes :id, :name, :description, :contact_email, :contact_phone, :tin_number, :created_at, :updated_at
|
|
4
|
+
attributes :id, :name, :description, :contact_email, :contact_phone, :tin_number, :created_at, :updated_at, :is_system
|
|
5
5
|
|
|
6
6
|
belongs_to :user, serializer: Dscf::Core::UserSerializer
|
|
7
7
|
belongs_to :business_type, serializer: Dscf::Core::BusinessTypeSerializer
|
data/lib/dscf/core/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dscf-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Asrat
|
|
@@ -515,6 +515,7 @@ files:
|
|
|
515
515
|
- db/migrate/20260128000000_create_dscf_core_file_attachments.rb
|
|
516
516
|
- db/migrate/20260304000001_create_dscf_core_permissions.rb
|
|
517
517
|
- db/migrate/20260304000002_create_dscf_core_role_permissions.rb
|
|
518
|
+
- db/migrate/20260501000001_add_is_system_to_dscf_core_businesses.rb
|
|
518
519
|
- lib/dscf/core.rb
|
|
519
520
|
- lib/dscf/core/engine.rb
|
|
520
521
|
- lib/dscf/core/permission_registry.rb
|