hotfix-quitSaveOnEnter #1069
|
@ -8,7 +8,7 @@ export default {
|
||||||
// TODO: AUTOFOCUS IS NOT FOCUSING
|
// TODO: AUTOFOCUS IS NOT FOCUSING
|
||||||
const that = this;
|
const that = this;
|
||||||
this.$el.addEventListener('keyup', function (evt) {
|
this.$el.addEventListener('keyup', function (evt) {
|
||||||
if (evt.key === 'Enter') {
|
if (evt.key === 'Enter' && !that.$attrs['prevent-submit']) {
|
||||||
const input = evt.target;
|
const input = evt.target;
|
||||||
if (input.type == 'textarea' && evt.shiftKey) {
|
if (input.type == 'textarea' && evt.shiftKey) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
|
|
@ -293,6 +293,7 @@ defineExpose({
|
||||||
class="q-pa-md"
|
class="q-pa-md"
|
||||||
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
:style="maxWidth ? 'max-width: ' + maxWidth : ''"
|
||||||
id="formModel"
|
id="formModel"
|
||||||
|
:prevent-submit="$attrs['prevent-submit']"
|
||||||
>
|
>
|
||||||
<QCard>
|
<QCard>
|
||||||
<slot
|
<slot
|
||||||
|
|
|
@ -189,6 +189,7 @@ async function getAmountPaid() {
|
||||||
:url-create="urlCreate"
|
:url-create="urlCreate"
|
||||||
:mapper="onBeforeSave"
|
:mapper="onBeforeSave"
|
||||||
@on-data-saved="onDataSaved"
|
@on-data-saved="onDataSaved"
|
||||||
|
:prevent-submit="true"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate }">
|
<template #form="{ data, validate }">
|
||||||
<span ref="closeButton" class="row justify-end close-icon" v-close-popup>
|
<span ref="closeButton" class="row justify-end close-icon" v-close-popup>
|
||||||
|
@ -303,7 +304,7 @@ async function getAmountPaid() {
|
||||||
:label="t('globals.save')"
|
:label="t('globals.save')"
|
||||||
:loading="formModelRef.isLoading"
|
:loading="formModelRef.isLoading"
|
||||||
color="primary"
|
color="primary"
|
||||||
type="submit"
|
@click="formModelRef.save()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -15,9 +15,6 @@ const columns = computed(() => [
|
||||||
name: 'paymentDate',
|
name: 'paymentDate',
|
||||||
label: t('worker.balance.tableVisibleColumns.paymentDate'),
|
label: t('worker.balance.tableVisibleColumns.paymentDate'),
|
||||||
create: true,
|
create: true,
|
||||||
columnCreate: {
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
component: 'date',
|
component: 'date',
|
||||||
field: 'paymentDate',
|
field: 'paymentDate',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
@ -27,9 +24,6 @@ const columns = computed(() => [
|
||||||
name: 'incomeTypeFk',
|
name: 'incomeTypeFk',
|
||||||
label: t('worker.balance.tableVisibleColumns.incomeType'),
|
label: t('worker.balance.tableVisibleColumns.incomeType'),
|
||||||
create: true,
|
create: true,
|
||||||
columnCreate: {
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
options: payrollComponents,
|
options: payrollComponents,
|
||||||
|
@ -43,9 +37,6 @@ const columns = computed(() => [
|
||||||
name: 'debit',
|
name: 'debit',
|
||||||
label: t('worker.balance.tableVisibleColumns.debit'),
|
label: t('worker.balance.tableVisibleColumns.debit'),
|
||||||
create: true,
|
create: true,
|
||||||
columnCreate: {
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
field: 'debit',
|
field: 'debit',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
@ -55,9 +46,6 @@ const columns = computed(() => [
|
||||||
name: 'credit',
|
name: 'credit',
|
||||||
label: t('worker.balance.tableVisibleColumns.credit'),
|
label: t('worker.balance.tableVisibleColumns.credit'),
|
||||||
create: true,
|
create: true,
|
||||||
columnCreate: {
|
|
||||||
required: true,
|
|
||||||
},
|
|
||||||
component: 'input',
|
component: 'input',
|
||||||
field: 'credit',
|
field: 'credit',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
|
Loading…
Reference in New Issue