Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Money amount input field required #86

Closed
4 tasks
shonhor22 opened this issue Mar 28, 2018 · 7 comments
Closed
4 tasks

Money amount input field required #86

shonhor22 opened this issue Mar 28, 2018 · 7 comments
Assignees
Labels

Comments

@shonhor22
Copy link

This is a feature request.

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository? (enso is made up of many specialized packages: https://github.com/laravel-enso)
  • Did you check the documentation?
  • Did you perform a cursory search?

Description

input number not used for money amount field.

Steps to Reproduce

formbuilder input field

Expected behavior

input must shown as 120,000,000 $

Actual behavior

such as 1200000000

@aocneanu
Copy link
Member

you can define a custom input and add any icon / format you need.

@aocneanu
Copy link
Member

On a second though I think that this will be a great addition, so now we have a new input for money.
The input uses accounting-js so make sure you install it.

In your template.json add a column like this

{
            "label": "Price",
            "name": "price",
            "value": 12321.12,
            "meta": {
                "type": "input",
                "content": "money"
            }
 }

Optional meta attributes are: symbol, precision, thousand, positive, negative, zero

Format of the meta attributes can be seen on the accounting-js documentation.

@gandesc please update the docs

@aocneanu
Copy link
Member

closed with laravel-enso/forms@797fa24

@mauthi
Copy link
Contributor

mauthi commented Mar 29, 2018

can you help me do install accounting-js?
added "accounting": "^0.4.1", to package.json and called npm i accounting - but system doesn't compile:

Module not found: Error: Can't resolve 'accounting-js' in '/Users/mauthi/coding/Enso/resources/assets/js/components/enso/vuedatatable'

@mauthi
Copy link
Contributor

mauthi commented Mar 29, 2018

I think problem is import accounting from 'accounting-js';
Should be import accounting from 'accounting';

@aocneanu
Copy link
Member

@mauthi npm install --save accounting-js

@mauthi
Copy link
Contributor

mauthi commented Mar 29, 2018

thx, done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants