diff --git a/docs/docs/guides/core-concepts/money/index.mdx b/docs/docs/guides/core-concepts/money/index.mdx index 6d6aad686e..05a33f6234 100644 --- a/docs/docs/guides/core-concepts/money/index.mdx +++ b/docs/docs/guides/core-concepts/money/index.mdx @@ -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": { @@ -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). @@ -234,4 +236,4 @@ export function formatCurrency(value: number, currencyCode: string, locale?: str return majorUnits.toFixed(3); } } -``` \ No newline at end of file +``` diff --git a/docs/docs/guides/core-concepts/payment/index.md b/docs/docs/guides/core-concepts/payment/index.md index d6217d9dd9..11f1559d72 100644 --- a/docs/docs/guides/core-concepts/payment/index.md +++ b/docs/docs/guides/core-concepts/payment/index.md @@ -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 diff --git a/docs/docs/guides/developer-guide/events/index.mdx b/docs/docs/guides/developer-guide/events/index.mdx index 77197b61ea..8238b21c36 100644 --- a/docs/docs/guides/developer-guide/events/index.mdx +++ b/docs/docs/guides/developer-guide/events/index.mdx @@ -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'; diff --git a/docs/docs/guides/developer-guide/extend-graphql-api/index.md b/docs/docs/guides/developer-guide/extend-graphql-api/index.md index 807ba4fb5f..06872098ec 100644 --- a/docs/docs/guides/developer-guide/extend-graphql-api/index.md +++ b/docs/docs/guides/developer-guide/extend-graphql-api/index.md @@ -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: diff --git a/docs/docs/reference/typescript-api/custom-fields/custom-field-type.md b/docs/docs/reference/typescript-api/custom-fields/custom-field-type.md index 689bdfb277..87f795e761 100644 --- a/docs/docs/reference/typescript-api/custom-fields/custom-field-type.md +++ b/docs/docs/reference/typescript-api/custom-fields/custom-field-type.md @@ -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"