Merge branch 'develop'
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 12s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 12s
This commit is contained in:
commit
543c28e162
7 changed files with 47 additions and 20 deletions
|
|
@ -42,6 +42,15 @@ defineProps<{
|
|||
|
||||
const modal = defineModel('modal', { default: false });
|
||||
const currentTab = defineModel<string>('currentTab');
|
||||
|
||||
async function onValidationError(ref: any) {
|
||||
const el = ref.$el as Element;
|
||||
el.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'nearest',
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog
|
||||
|
|
@ -60,6 +69,7 @@ const currentTab = defineModel<string>('currentTab');
|
|||
@submit.prevent
|
||||
@validation-success="submit"
|
||||
class="column full-height"
|
||||
@validation-error="onValidationError"
|
||||
>
|
||||
<!-- header -->
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -46,6 +46,15 @@ function reset() {
|
|||
myForm.value.resetValidation();
|
||||
}
|
||||
}
|
||||
|
||||
async function onValidationError(ref: any) {
|
||||
const el = ref.$el as Element;
|
||||
el.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'nearest',
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<q-drawer
|
||||
|
|
@ -66,6 +75,7 @@ function reset() {
|
|||
greedy
|
||||
@submit.prevent
|
||||
@validation-success="submit"
|
||||
@validation-error="onValidationError"
|
||||
>
|
||||
<div
|
||||
class="column justify-between full-height"
|
||||
|
|
|
|||
|
|
@ -23,6 +23,15 @@ function update(value: boolean) {
|
|||
}
|
||||
}
|
||||
|
||||
async function onValidationError(ref: any) {
|
||||
const el = ref.$el as Element;
|
||||
el.scrollIntoView({
|
||||
behavior: 'smooth',
|
||||
block: 'center',
|
||||
inline: 'nearest',
|
||||
});
|
||||
}
|
||||
|
||||
const state = defineModel({ default: false });
|
||||
</script>
|
||||
|
||||
|
|
@ -41,6 +50,7 @@ const state = defineModel({ default: false });
|
|||
}"
|
||||
>
|
||||
<q-form
|
||||
@validation-error="onValidationError"
|
||||
@submit.prevent="(e) => $emit('submit', e)"
|
||||
@reset="$emit('reset')"
|
||||
greedy
|
||||
|
|
|
|||
|
|
@ -72,7 +72,11 @@ onMounted(async () => {
|
|||
:option="selectOptions"
|
||||
:hide-selected="false"
|
||||
:fill-input="false"
|
||||
:rules="[(v: string) => !!v || $t('form.error.required')]"
|
||||
:rules="[
|
||||
(v: string) => {
|
||||
return !!v?.length || $t('form.error.required');
|
||||
},
|
||||
]"
|
||||
@filter="filter"
|
||||
>
|
||||
<template #before-options v-if="creatable">
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@ async function scrollTo(id: string) {
|
|||
|
||||
<template>
|
||||
<main
|
||||
class="full-height q-gutter-sm"
|
||||
:class="{ 'row reverse': $q.screen.gt.xs, column: $q.screen.xs }"
|
||||
class="full-height q-gutter-sm no-wrap"
|
||||
:class="{ column: !toc && $q.screen.lt.md, 'row reverse': $q.screen.gt.sm }"
|
||||
>
|
||||
<section
|
||||
v-if="toc"
|
||||
|
|
@ -168,7 +168,7 @@ async function scrollTo(id: string) {
|
|||
</q-list>
|
||||
</section>
|
||||
|
||||
<section v-if="!toc && $q.screen.xs">
|
||||
<section v-if="!toc && $q.screen.lt.md">
|
||||
<q-btn
|
||||
dense
|
||||
class="full-width text-capitalize"
|
||||
|
|
@ -181,7 +181,7 @@ async function scrollTo(id: string) {
|
|||
</section>
|
||||
|
||||
<section
|
||||
v-if="content || (!toc && $q.screen.xs)"
|
||||
v-if="$q.screen.gt.xs || (!toc && $q.screen.xs)"
|
||||
ref="wrapper"
|
||||
class="markdown col scroll full-height rounded"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -555,7 +555,6 @@ async function triggerChangeStatus(id: string, status: string) {
|
|||
async function assignFormData(idEdit: string) {
|
||||
if (!userData.value) return;
|
||||
const foundUser = userData.value.result.find((user) => user.id === idEdit);
|
||||
console.log(foundUser);
|
||||
|
||||
if (foundUser) {
|
||||
currentUser.value = foundUser;
|
||||
|
|
@ -600,8 +599,8 @@ async function assignFormData(idEdit: string) {
|
|||
responsibleArea: foundUser.responsibleArea,
|
||||
status: foundUser.status,
|
||||
selectedImage: foundUser.selectedImage,
|
||||
contactName: foundUser.contactName,
|
||||
contactTel: foundUser.contactTel,
|
||||
contactName: foundUser.contactName || '',
|
||||
contactTel: foundUser.contactTel || '',
|
||||
licenseExpireDate:
|
||||
(foundUser.licenseExpireDate &&
|
||||
new Date(foundUser.licenseExpireDate)) ||
|
||||
|
|
|
|||
|
|
@ -198,7 +198,6 @@ const selectedWorkerItem = computed(() => {
|
|||
})),
|
||||
];
|
||||
});
|
||||
const workerList = ref<Employee[]>([]);
|
||||
const firstCodePayment = ref('');
|
||||
const selectedProductGroup = ref('');
|
||||
const selectedInstallmentNo = ref<number[]>([]);
|
||||
|
|
@ -1059,12 +1058,7 @@ watch(
|
|||
() => quotationFormData.value.customerBranchId,
|
||||
async (v) => {
|
||||
if (!v) return;
|
||||
|
||||
const retEmp = await customerStore.fetchBranchEmployee(v, {
|
||||
passport: true,
|
||||
});
|
||||
|
||||
if (retEmp) workerList.value = retEmp.data.result;
|
||||
selectedWorker.value = [];
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -2531,8 +2525,8 @@ function covertToNode() {
|
|||
}
|
||||
|
||||
:deep(
|
||||
i.q-icon.mdi.mdi-chevron-down-circle.q-expansion-item__toggle-icon.q-expansion-item__toggle-icon--rotated
|
||||
) {
|
||||
i.q-icon.mdi.mdi-chevron-down-circle.q-expansion-item__toggle-icon.q-expansion-item__toggle-icon--rotated
|
||||
) {
|
||||
color: var(--brand-1);
|
||||
}
|
||||
|
||||
|
|
@ -2549,9 +2543,9 @@ function covertToNode() {
|
|||
}
|
||||
|
||||
:deep(
|
||||
.q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.surface-1
|
||||
.q-focus-helper
|
||||
) {
|
||||
.q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.surface-1
|
||||
.q-focus-helper
|
||||
) {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue