Skip to content

Commit

Permalink
Merge branch 'main' of github.com:avo-hq/avodocs
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed May 30, 2024
2 parents 845a10a + 5939e84 commit 0314f7a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/3.0/fields/money.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ The `Money` field is used to display a monetary value.
```ruby
field :price, as: :money, currencies: %w[EUR USD RON PEN]
```
## Money Field Example

You can explore the implementation of the money field in [avodemo](https://main.avodemo.com/avo/resources/products/new) and it's corresponding code on GitHub [here](https://github.com/avo-hq/main.avodemo.com/blob/main/app/avo/resources/product.rb)

### Example on new

<img :src="('/assets/img/money-field.png')" class="border mb-4" />

<img :src="('/assets/img/money-field2.png')" class="border mb-4" />

### Example on show with currencies USD

<img :src="('/assets/img/money-field-show.png')" class="border mb-4" />

### Example on show with currencies RON

<img :src="('/assets/img/money-field-show-lei.png')" class="border mb-4" />

### Example on index

<img :src="('/assets/img/money-field-index.png')" class="border mb-4" />

## Installation

Expand Down
8 changes: 8 additions & 0 deletions docs/3.0/views.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ The page where you can edit one resource.
The page where you can create a new resource.
:::

:::option `Display`
`:display` is an alias for the the `Index` and `Show` views where you can display records and their details.
:::

:::option `Form`
`:form` is an alias for the `Edit` and `New` views for creating and editing records.
:::

## Preview

The fields marked with `show_on :preview`, will be show in the [preview field](./fields/preview) popup.
Expand Down
Binary file added docs/public/assets/img/money-field-index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field-show-lei.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field-show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/public/assets/img/money-field2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0314f7a

Please sign in to comment.