Giter Club home page Giter Club logo

Comments (3)

jmcameron avatar jmcameron commented on September 23, 2024

I took a quick look at this. It appears that client/src/modules/multiple_payroll_indice/modals/config.modal.html uses bh-input-text for these indexes. There does not seem to be an easy way to prevent negative entries in a text field. So I suggest creating a new controller: bh-input-index or 'bh-input-number' and set it up so that it can prevent negative numbers (based on an argument to the controller). Note that the monetary values on the right are configured not to allow negative numbers.
Also, it was not clear to me why bh-input-text has any code in the controller for dealing with currency data.

from bhima.

jniles avatar jniles commented on September 23, 2024

I would suggest move away from bhInputText entirely in this case and just use an <input type="number" min="0" ng-model=""> unless there is a really good reason to keep bhInputText. Given the name, it sounds like it is built for text input, not numeric. Most of what we would build into the bhInputIndex seems like it is already native to HTML's <input> box anyway.

from bhima.

lomamech avatar lomamech commented on September 23, 2024

I would suggest move away from bhInputText entirely in this case and just use an <input type="number" min="0" ng-model=""> unless there is a really good reason to keep bhInputText. Given the name, it sounds like it is built for text input, not numeric. Most of what we would build into the bhInputIndex seems like it is already native to HTML's <input> box anyway.

I used bhInputText by setting the type parameter to number and adding the min property and it works fine

from bhima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.