New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@bigbinary/neeto-fields-frontend

Package Overview
Dependencies
Maintainers
12
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bigbinary/neeto-fields-frontend

A repo acts as the source of truth for the new nano's structure, configs, data etc.

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
12
Weekly downloads
 
Created
Source

neeto-fields-nano

Build Status

neeto-fields-nano enables the management of dynamically added fields (often referred as custom fields) for the resources across neeto products.

Installation instructions

Engine installation

  1. Add this line to your application's Gemfile:

     source "NEETO_GEM_SERVER_URL" do
       # ..existing gems
    
       gem 'neeto-fields-engine'
     end
    
  2. And then execute:

    bundle install
    
  3. Add this line to your application's config/routes.rb file

     mount NeetoFieldsEngine::Engine => "/neeto_fields_engine"
    
  4. Add required migrations in the db/migrate folder. Run the following commands to generate the migrations.

rails g neeto_fields_engine:install

This will generate the migration to create the neeto_fields_engine_fields table (which holds the fields) and neeto_fields_engine_field_values table (which holds the value for the fields).

  1. Run the following command to create the tables.
  rails db:migrate
  1. Generate the required associations between models using the following command:
rails g neeto_fields_engine:associations

This will prompt the user to enter 2 things:

  1. Name of Owner model.
  2. Names of Resource models.
  • Owner: It is the ultimate owner of the fields being added. It can be Organization, Project, etc depending on the business logic. The field will belongs_to Owner.

  • Resource: These are the models, to which we want the dynamic fields to be attached with. This case be anything like Ticket, Deal, etc depending on the business logic. The field_value belongs_to each Resource.

Once you enter the appropriate entries for the prompts asked. It will create an initializer file, which is required for the functioning of the engine.

It will also add necessary associations to respective models, which were considered as Owner and Resources.

Note: You might need to re-arrange the associations statements which are normally inserted to top most lines of the file, to satisfy the Rails standards.

Once you have completed these steps, you are ready to use the neeto-fields-engine.

Frontend package installation

Install the latest neetoFields nano package using the below command:

yarn add @bigbinary/neeto-fields-frontend

Customizability

Engine customizability

In order to customize the engine's default behavior, we have several ways.

  • For improving the customizability, we've made every actions' duties into separate services, which can be overridden from the host apps as and when required.
  • If you wish to perform anything before or after the core logic of an action, we have provision to do it as a single transaction.
  • Every action has before_{action}_process method invoked before the core action logic and after_{action}_process method invoked after the core action logic.
  • These methods can be overridden by defining them in the concern NeetoFieldsEngine::Fields::Customizable or NeetoFieldsEngine::FieldValues::Customizable depending on the context.

Eg: If you want to do something before update action of FieldsController, then define it in before_update_process method inside the NeetoFieldsEngine::Fields::Customizable concern.

Development instructions

Engine development

  1. Add this line to your application's Gemfile (replace the path to the local copy of neeto-fields-engine):

    gem 'neeto-fields-engine', path: '../neeto-fields-engine'
    
  2. And then execute:

    bundle install
    
  3. Refer engine installation steps 3 and onwards.

Frontend package development

The usage of yalc is explained in this video: https://www.youtube.com/watch?v=QBiYGP0Rhe0

  1. See the changes in the host app by executing the following command

    Use this command if releasing package for the first time.

    yarn build && yalc publish
    

    Use this command to see changes after the initial publish.

    yarn release
    

Setup dummy host app

Setup Instructions.

Visit http://spinkart.lvh.me:9100 and login with email oliver@example.com and password welcome.

Additional instructions

  • Run yarn build to bundle the app.

Read about building and releasing

FAQs

Package last updated on 14 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc