Skip to content

Commit

Permalink
fix(docs): Build errors because of broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
dlhck committed Jun 14, 2024
1 parent 79bfdb9 commit 14c6eb4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/docs/guides/core-concepts/money/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This is a common practice in financial applications, as it avoids the rounding e

For example, here's the response from a query for a product's variant prices:



```json
{
"data": {
Expand Down Expand Up @@ -120,7 +122,7 @@ then you should also use the `Money` scalar for any monetary values.

## The `@Money()` decorator

When [defining new database entities](/guides/developer-guide/database-entity//), if you need to store a monetary value, then rather than using the TypeORM `@Column()`
When [defining new database entities](/guides/developer-guide/database-entity), if you need to store a monetary value, then rather than using the TypeORM `@Column()`
decorator, you should use Vendure's [`@Money()` decorator](/reference/typescript-api/money/money-decorator).

Using this decorator allows Vendure to correctly store the value in the database according to the configured `MoneyStrategy` (see below).
Expand Down Expand Up @@ -234,4 +236,4 @@ export function formatCurrency(value: number, currencyCode: string, locale?: str
return majorUnits.toFixed(3);
}
}
```
```
2 changes: 1 addition & 1 deletion docs/docs/guides/core-concepts/payment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ The `metadata` field is used to store the specific data required by the payment
The `metadata` field is required, so if your payment provider does not require any additional data, you can simply pass an empty object: `metadata: {}`.
:::

3. This mutation internally invokes the [PaymentMethodHandler's `createPayment()` function](/reference/typescript-api/payment/payment-method-config-options/#createpayment). This function returns a [CreatePaymentResult object](/reference/typescript-api/payment/payment-method-types#createpaymentfn) which is used to create a new [Payment](reference/typescript-api/entities/payment). If the Payment amount equals the order total, then the Order is transitioned to either the `PaymentAuthorized` or `PaymentSettled` state and the customer checkout flow is complete.
3. This mutation internally invokes the [PaymentMethodHandler's `createPayment()` function](/reference/typescript-api/payment/payment-method-config-options/#createpayment). This function returns a [CreatePaymentResult object](/reference/typescript-api/payment/payment-method-types#createpaymentfn) which is used to create a new [Payment](/reference/typescript-api/entities/payment). If the Payment amount equals the order total, then the Order is transitioned to either the `PaymentAuthorized` or `PaymentSettled` state and the customer checkout flow is complete.

### Single-step

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/developer-guide/events/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class ProductReviewService {

### Entity events

There is a special event class [`VendureEntityEvent`](/reference/typescript-api/events/vendure-entity-event) for events relating to the creation, update or deletion of entities. Let's say you have a custom entity (see [defining a database entity](/guides/developer-guide/database-entity//)) `BlogPost` and you want to trigger an event whenever a new `BlogPost` is created, updated or deleted:
There is a special event class [`VendureEntityEvent`](/reference/typescript-api/events/vendure-entity-event) for events relating to the creation, update or deletion of entities. Let's say you have a custom entity (see [defining a database entity](/guides/developer-guide/database-entity)) `BlogPost` and you want to trigger an event whenever a new `BlogPost` is created, updated or deleted:

```ts title="src/plugins/blog/events/blog-post-event.ts"
import { ID, RequestContext, VendureEntityEvent } from '@vendure/core';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class BannerPlugin {}

If you have defined a new database entity, it is likely that you'll want to expose this entity in your GraphQL API. To do so, you'll need to define a corresponding GraphQL type.

Using the `ProductReview` entity from the [Define a database entity guide](/guides/developer-guide/database-entity//), let's see how we can expose it as a new type in the API.
Using the `ProductReview` entity from the [Define a database entity guide](/guides/developer-guide/database-entity), let's see how we can expose it as a new type in the API.

As a reminder, here is the `ProductReview` entity:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ boolean | tinyint (m), bool (p), boolean (s) | Boolean
datetime | datetime (m,s), timestamp (p) | DateTime
relation | many-to-one / many-to-many relation | As specified in config

Additionally, the CustomFieldType also dictates which [configuration options](/reference/typescript-api/custom-fields/#configuration-options)
Additionally, the CustomFieldType also dictates which [configuration options](/reference/typescript-api/custom-fields)
are available for that custom field.

```ts title="Signature"
Expand Down

0 comments on commit 14c6eb4

Please sign in to comment.