rao-service_chain 0.0.34.pre → 0.0.35.pre

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: 3e136c090a0e55d9a9db674f6d43e8af4be71090e2519c2e83c2d27f7f706ea6
4
- data.tar.gz: bee885349401fa6bcaf61fe0c1ce7376eae9f205a42d7b739bffdeb7fe1a3a95
3
+ metadata.gz: d4d800775f94e7e872362dc399f00a1fa23b7bd58db861da47bd0b75408713fc
4
+ data.tar.gz: bcec8c28b254d3facc8ce791d8bb0a3154147eb33a353f7b1f992bd438557241
5
5
  SHA512:
6
- metadata.gz: f927c9d0172d7aa2d0d3de99cdb2fd1ea4b418b25f06fd210517d5b03301e83a48a2b5f0a868d9c7e62343b323fc53b86c43cfa843bab420e9d1e13f77530fa4
7
- data.tar.gz: e37db80ff94e19fdbc413bf3fd188bfef7ac53b885c1d6ce800ca2d8d3a5681abb0d1d639ce783dd6ad7272d10bc7c36e57d86435d5e5e9b4a7fc1fefe97bafc
6
+ metadata.gz: 89ec547822e2e0b6428e08b28d0d0ab6a3792f10dfcd677f58718dac964549bc63f3d058060d8023339a26808e83df05c5e23a9d649c83479d72e4506a42b766
7
+ data.tar.gz: ccad0e54e37a21348e05ad42a131ddbe792cb25a0f2c92fd7f0b6401892f45ad46b873ab146b93ff0751c35da051567e01dfab38e6c38011ffc1eb661b783bba
@@ -8,6 +8,7 @@ module Rao
8
8
  @service = options.delete(:service)
9
9
  @chain = options.delete(:chain)
10
10
  @completed_if = options.delete(:completed_if)
11
+ @display = options.delete(:display) || ->() { true }
11
12
  @service_name = @service.try(:name)
12
13
  @label = service.try(:model_name).try(:human)
13
14
  @url = options.delete(:url)
@@ -49,6 +50,10 @@ module Rao
49
50
  url: url(context)
50
51
  }
51
52
  end
53
+
54
+ def display?
55
+ !!@display.call
56
+ end
52
57
  end
53
58
  end
54
59
  end
@@ -2,16 +2,17 @@
2
2
  .wizard
3
3
  .wizard-track.bg-light
4
4
  - service_chain.steps.each_with_index do |step, index|
5
- .wizard-step{ class: [step.completion_status, (step.actual? ? :actual : nil)].compact.join(" "), id: "step#{index + 1}" }
6
- - if step.actual?
7
- %span.wizard-step-marker.rounded-circle.bg-primary.text-white
8
- %i.fas.fa-play
9
- = step.label
10
- - else
11
- - if step.completed?
12
- %span.wizard-step-marker.rounded-circle.bg-success.text-white
13
- %i.fas.fa-check
5
+ - if step.display?
6
+ .wizard-step{ class: [step.completion_status, (step.actual? ? :actual : nil)].compact.join(" "), id: "step#{index + 1}" }
7
+ - if step.actual?
8
+ %span.wizard-step-marker.rounded-circle.bg-primary.text-white
9
+ %i.fas.fa-play
10
+ = step.label
14
11
  - else
15
- %span.wizard-step-marker.rounded-circle.bg-secondary.text-white
16
- %i.fas.fa-circle
17
- = link_to(step.label, step.url(self))
12
+ - if step.completed?
13
+ %span.wizard-step-marker.rounded-circle.bg-success.text-white
14
+ %i.fas.fa-check
15
+ - else
16
+ %span.wizard-step-marker.rounded-circle.bg-secondary.text-white
17
+ %i.fas.fa-circle
18
+ = link_to(step.label, step.url(self))
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-service_chain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.34.pre
4
+ version: 0.0.35.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-08 00:00:00.000000000 Z
11
+ date: 2019-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails