mirror of
https://github.com/frappe/books.git
synced 2026-08-24 02:24:17 -05:00
Merge pull request #1418 from frappe/loyalty-label
fix: add sublabel in loyalty program
This commit is contained in:
@@ -10,8 +10,9 @@
|
||||
},
|
||||
{
|
||||
"fieldname": "collectionFactor",
|
||||
"label": "Collection Factor (=1 LP)",
|
||||
"fieldtype": "Float"
|
||||
"label": "Collection Factor",
|
||||
"fieldtype": "Float",
|
||||
"sub_label": "Sale 100→ 100 (1), 50 (0.5)"
|
||||
},
|
||||
{
|
||||
"fieldname": "minimumTotalSpent",
|
||||
|
||||
@@ -43,7 +43,8 @@
|
||||
"label": "Conversion Factor",
|
||||
"fieldtype": "Float",
|
||||
"default": 1,
|
||||
"required": true
|
||||
"required": true,
|
||||
"sub_label": "100 Points → 100 (Factor 1), 50 (Factor 0.5)"
|
||||
},
|
||||
{
|
||||
"fieldname": "expiryDuration",
|
||||
|
||||
@@ -69,6 +69,7 @@ export interface BaseField {
|
||||
tab?: string; // UI Facing config, for grouping by tabs
|
||||
abstract?: string; // Used to mark the location of a field in an Abstract schema
|
||||
isCustom?: boolean; // Whether the field is a custom field
|
||||
sub_label?: string;
|
||||
filters?: Record<string, string>;
|
||||
getOptions?: () => Promise<{ label: string; value: string }[]>;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
@input="(e) => !isReadOnly && $emit('input', e)"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="showLabel" :class="labelClasses">
|
||||
{{ df?.sub_label }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<div
|
||||
v-for="df in tableFields"
|
||||
:key="df.fieldname"
|
||||
class="items-center flex px-2 h-row-mid"
|
||||
class="items-center px-2 h-row-mid"
|
||||
:class="{
|
||||
'ms-auto': isNumeric(df),
|
||||
}"
|
||||
@@ -32,6 +32,7 @@
|
||||
}"
|
||||
>
|
||||
{{ df.label }}
|
||||
<p class="text-xs">{{ df.sub_label }}</p>
|
||||
</div>
|
||||
</Row>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user