tybo 0.3.24 → 0.3.26
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: c7906c0580405414c51c923c6e10d03b0f7a257977afd002ed6835ed35b63931
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: fe81a8735e4bb9d37ff679a26d42ee58223cccc7a09dfe4b60496f4e000d649d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 932129fec0007dafc2c3686875d80ba7f012b590811a1e93184f416f051a8fff67c7c307b2d958751a33d23ca51058071346781dc2a4a6cd6aad46e6f12c9b7a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fe6b9339ec93a6825242edc6f2cb770f453188d8b2ece72ccf71b66c0537974923ad411fd6d4f9ad4bab1f31fa9906c942eaf9726d1908964e23d76ff2873fec
         
     | 
| 
         @@ -0,0 +1,6 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            <div class="my-5">
         
     | 
| 
      
 2 
     | 
    
         
            +
              <label class="block text-sm font-medium text-gray-700 string required">
         
     | 
| 
      
 3 
     | 
    
         
            +
                <%= @label %>
         
     | 
| 
      
 4 
     | 
    
         
            +
              </label>
         
     | 
| 
      
 5 
     | 
    
         
            +
              <%= @form.date_field @field, class: "mt-1 block border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-tybo-500 focus:border-tybo-500 sm:text-sm string required", disabled: @disabled %>
         
     | 
| 
      
 6 
     | 
    
         
            +
            </div>
         
     | 
| 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # frozen_string_literal: true
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            module Input
         
     | 
| 
      
 4 
     | 
    
         
            +
              class DateComponent < ViewComponent::Base
         
     | 
| 
      
 5 
     | 
    
         
            +
                def initialize(item:, field:, form:, disabled: false)
         
     | 
| 
      
 6 
     | 
    
         
            +
                  @item = item
         
     | 
| 
      
 7 
     | 
    
         
            +
                  @field = field
         
     | 
| 
      
 8 
     | 
    
         
            +
                  @form = form
         
     | 
| 
      
 9 
     | 
    
         
            +
                  @label = label
         
     | 
| 
      
 10 
     | 
    
         
            +
                  @disabled = disabled
         
     | 
| 
      
 11 
     | 
    
         
            +
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
                def label
         
     | 
| 
      
 14 
     | 
    
         
            +
                  I18n.t("bo.#{@item.class.name.underscore}.attributes.#{@field}")
         
     | 
| 
      
 15 
     | 
    
         
            +
                end
         
     | 
| 
      
 16 
     | 
    
         
            +
              end
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -4,6 +4,8 @@ 
     | 
|
| 
       4 
4 
     | 
    
         
             
              <%- next if excluded_columns.include?(column.name.to_sym) || bo_model.reflect_on_all_associations.map(&:foreign_key).include?(column.name) -%>
         
     | 
| 
       5 
5 
     | 
    
         
             
              <%- if column.type == :datetime -%>
         
     | 
| 
       6 
6 
     | 
    
         
             
              <%%= render(Input::DatetimeComponent.new(item: <%= class_name.underscore %>, field: '<%= column.name %>', form: f)) %>
         
     | 
| 
      
 7 
     | 
    
         
            +
              <%- elsif column.type == :date -%>
         
     | 
| 
      
 8 
     | 
    
         
            +
              <%%= render(Input::DateComponent.new(item: <%= class_name.underscore %>, field: '<%= column.name %>', form: f)) %>
         
     | 
| 
       7 
9 
     | 
    
         
             
              <%- else -%>
         
     | 
| 
       8 
10 
     | 
    
         
             
              <%%= f.input :<%= column.name %>,label: I18n.t('bo.<%= class_name.underscore %>.attributes.<%= column.name %>') %>
         
     | 
| 
       9 
11 
     | 
    
         
             
              <%- end -%>
         
     | 
    
        data/lib/tybo/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: tybo
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.26
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Michel Delpierre
         
     | 
| 
         @@ -183,6 +183,8 @@ files: 
     | 
|
| 
       183 
183 
     | 
    
         
             
            - app/components/index_header_component.rb
         
     | 
| 
       184 
184 
     | 
    
         
             
            - app/components/index_header_export_component.html.erb
         
     | 
| 
       185 
185 
     | 
    
         
             
            - app/components/index_header_export_component.rb
         
     | 
| 
      
 186 
     | 
    
         
            +
            - app/components/input/date_component.html.erb
         
     | 
| 
      
 187 
     | 
    
         
            +
            - app/components/input/date_component.rb
         
     | 
| 
       186 
188 
     | 
    
         
             
            - app/components/input/datetime_component.html.erb
         
     | 
| 
       187 
189 
     | 
    
         
             
            - app/components/input/datetime_component.rb
         
     | 
| 
       188 
190 
     | 
    
         
             
            - app/components/input/file_component.html.erb
         
     |