Skip to content

Commit

Permalink
feat(admin): allow rendering description in shipping methods
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Jul 5, 2024
1 parent 0507fa6 commit bde392d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
<PdkTableCol
component="th"
:class="config?.cssUtilities?.whitespaceNoWrap">
{{ shippingMethod.label }}
<p v-text="shippingMethod.label" />

<small
v-if="shippingMethod.description"
v-html="translate(shippingMethod.description)" />
</PdkTableCol>

<PdkTableCol
Expand Down Expand Up @@ -59,7 +63,7 @@ import {
useShippingMethodsInputContext,
} from '@myparcel-pdk/admin';
import {isEnumValue} from '@myparcel/ts-utils';
import {PackageTypeName} from '@myparcel/constants';
import {PackageTypeName} from '@myparcel/constants'; // eslint-disable-next-line vue/no-unused-properties
// eslint-disable-next-line vue/no-unused-properties
const props = defineProps<ShippingMethodsInputProps>();
Expand Down
3 changes: 2 additions & 1 deletion apps/admin/src/types/form.types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {type Keyable, type SortType} from '@myparcel-pdk/common';
import {type InteractiveElementInstance} from '@myparcel/vue-form-builder';
import {type AdminIcon} from '../data';
import {type Translation} from './language.types';
import {type Translatable, type Translation} from './language.types';

export type GlobalFieldProps = {
description?: Translation;
Expand Down Expand Up @@ -40,6 +40,7 @@ interface BaseSelectOption<Value extends SelectOptionValue = SelectOptionValue>
disabled?: boolean;
icon?: string | AdminIcon;
image?: string;
description?: Translatable;
value: Value;
}

Expand Down

0 comments on commit bde392d

Please sign in to comment.