diff --git a/frappe/index.js b/frappe/index.js index 745f7c03..058fce6e 100644 --- a/frappe/index.js +++ b/frappe/index.js @@ -56,9 +56,12 @@ module.exports = { display = parseInt(display); } - const moneyMaker = getMoneyMaker({ currency, precision, display }); - // Pesa uses private fields, Vue does deep conversions to Proxy, ∴ - this.pesa = (...args) => markRaw(moneyMaker(...args)); + this.pesa = getMoneyMaker({ + currency, + precision, + display, + wrapper: markRaw, + }); }, init(force) { diff --git a/src/components/Controls/Table.vue b/src/components/Controls/Table.vue index 30493b69..78143db9 100644 --- a/src/components/Controls/Table.vue +++ b/src/components/Controls/Table.vue @@ -9,7 +9,7 @@ :class="{ 'px-2 py-3': size === 'small', 'px-3 py-4': size !== 'small', - 'text-right': isNumeric(df) + 'text-right': isNumeric(df), }" v-for="df in tableFields" :key="df.fieldname" @@ -31,7 +31,7 @@ :ratio="ratio" class="text-gray-500 cursor-pointer border-transparent px-2 w-full" v-if="!isReadOnly" - @click.native="addRow" + @click="addRow" >
@@ -40,7 +40,7 @@ class="flex justify-between" :class="{ 'px-2 py-3': size === 'small', - 'px-3 py-4': size !== 'small' + 'px-3 py-4': size !== 'small', }" > {{ t('Add Row') }} @@ -50,7 +50,7 @@ class="text-right" :class="{ 'px-2 py-3': size === 'small', - 'px-3 py-4': size !== 'small' + 'px-3 py-4': size !== 'small', }" v-if="maxRowsBeforeOverflow && value.length > maxRowsBeforeOverflow" > @@ -71,15 +71,15 @@ export default { extends: Base, props: { showHeader: { - default: true + default: true, }, maxRowsBeforeOverflow: { - default: 0 - } + default: 0, + }, }, components: { Row, - TableRow + TableRow, }, data: () => ({ rowContainerHeight: null }), watch: { @@ -95,8 +95,8 @@ export default { this.rowContainerHeight = `${containerHeight}px`; }); } - } - } + }, + }, }, methods: { focus() {}, @@ -109,13 +109,13 @@ export default { }, removeRow(row) { let rows = this.value || []; - rows = rows.filter(_row => _row !== row); + rows = rows.filter((_row) => _row !== row); this.triggerChange(rows); }, scrollToRow(index) { let row = this.$refs['table-row'][index]; row && row.$el.scrollIntoView({ block: 'nearest' }); - } + }, }, computed: { ratio() { @@ -123,8 +123,8 @@ export default { }, tableFields() { let meta = frappe.getMeta(this.df.childtype); - return meta.tableFields.map(fieldname => meta.getField(fieldname)); - } - } + return meta.tableFields.map((fieldname) => meta.getField(fieldname)); + }, + }, }; diff --git a/src/pages/ListView/List.vue b/src/pages/ListView/List.vue index a0844678..f3a433de 100644 --- a/src/pages/ListView/List.vue +++ b/src/pages/ListView/List.vue @@ -31,7 +31,7 @@