dscf-marketplace 0.8.2 → 0.8.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: 2ba92567e3cf0c48228c8e2e4f163a9125728b4bea281fc043bd82c346921bb2
|
|
4
|
+
data.tar.gz: 0b404765e8874d3c2a7b80f5e090c12afc84179b0223fd51e02d39fc91e80970
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 91d1c4eacb55a8cf3f2c084d4e37f18f48f14d84d5b2e7b35eb2fe59e0d031b5a67fef01e0ccf39f40a0c4a0a174e93246b94016377a3a3ca6cb20410a9a898b
|
|
7
|
+
data.tar.gz: 07d58a461e9d548e7a2081ed62c343b72ec084276ef8aac68b38c561d6b7cda47f1501a056c9097b04b80eea40d1c9d72276f298608eb6440c3f156d2bd683e2
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module Dscf
|
|
2
|
+
module Marketplace
|
|
3
|
+
class DashboardController < ApplicationController
|
|
4
|
+
def summary
|
|
5
|
+
authorize :dashboard, :summary?
|
|
6
|
+
|
|
7
|
+
render_success(
|
|
8
|
+
"dashboard.success.summary",
|
|
9
|
+
data: {
|
|
10
|
+
total_listings: Dscf::Marketplace::Listing.count,
|
|
11
|
+
total_suppliers: Dscf::Marketplace::Supplier.count,
|
|
12
|
+
total_businesses: Dscf::Core::Business.count,
|
|
13
|
+
total_products: Dscf::Marketplace::Product.count,
|
|
14
|
+
pending_supplier_products: Dscf::Marketplace::SupplierProduct.inactive.count,
|
|
15
|
+
active_listings: Dscf::Marketplace::Listing.active.count,
|
|
16
|
+
promoted_listings: Dscf::Marketplace::Listing.orchestrator_promoted.count
|
|
17
|
+
}
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
data/config/locales/en.yml
CHANGED
|
@@ -400,7 +400,14 @@ en:
|
|
|
400
400
|
operation_failed: "Operation failed"
|
|
401
401
|
record_not_found: "Record not found"
|
|
402
402
|
supplier_not_found: "Supplier not found"
|
|
403
|
-
|
|
403
|
+
|
|
404
|
+
dashboard:
|
|
405
|
+
success:
|
|
406
|
+
summary: "Dashboard summary retrieved successfully"
|
|
407
|
+
errors:
|
|
408
|
+
summary: "Failed to retrieve dashboard summary"
|
|
409
|
+
|
|
410
|
+
activerecord:
|
|
404
411
|
errors:
|
|
405
412
|
messages:
|
|
406
413
|
record_invalid: "Validation failed: %{errors}"
|
data/config/routes.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dscf-marketplace
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Asrat
|
|
@@ -420,6 +420,7 @@ files:
|
|
|
420
420
|
- app/controllers/dscf/marketplace/aggregator_listings_controller.rb
|
|
421
421
|
- app/controllers/dscf/marketplace/application_controller.rb
|
|
422
422
|
- app/controllers/dscf/marketplace/categories_controller.rb
|
|
423
|
+
- app/controllers/dscf/marketplace/dashboard_controller.rb
|
|
423
424
|
- app/controllers/dscf/marketplace/delivery_order_items_controller.rb
|
|
424
425
|
- app/controllers/dscf/marketplace/delivery_orders_controller.rb
|
|
425
426
|
- app/controllers/dscf/marketplace/delivery_stops_controller.rb
|
|
@@ -461,6 +462,7 @@ files:
|
|
|
461
462
|
- app/models/dscf/marketplace/unit_conversion.rb
|
|
462
463
|
- app/policies/dscf/marketplace/aggregator_listing_policy.rb
|
|
463
464
|
- app/policies/dscf/marketplace/category_policy.rb
|
|
465
|
+
- app/policies/dscf/marketplace/dashboard_policy.rb
|
|
464
466
|
- app/policies/dscf/marketplace/delivery_order_item_policy.rb
|
|
465
467
|
- app/policies/dscf/marketplace/delivery_order_policy.rb
|
|
466
468
|
- app/policies/dscf/marketplace/delivery_stop_policy.rb
|