Compare commits
15 commits
ff5767cdd1
...
543c28e162
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
543c28e162 | ||
|
|
bcd54813d1 | ||
|
|
2b78abcd3b | ||
|
|
4d023a7c7c | ||
|
|
70e9755952 | ||
|
|
9a57056ffa | ||
|
|
8354b6b40a | ||
|
|
4d8eebdd04 | ||
|
|
5ec924fe14 | ||
|
|
0871a8b899 | ||
|
|
7a2be56ef4 | ||
|
|
c4c4b76973 | ||
|
|
2192041e35 | ||
|
|
c1ffbef565 | ||
|
|
46de2412df |
13 changed files with 95 additions and 31 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">
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@ import { onMounted, watch } from 'vue';
|
|||
import { useManualStore } from 'src/stores/manual';
|
||||
import { useNavigator } from 'src/stores/navigator';
|
||||
import { Icon } from '@iconify/vue/dist/iconify.js';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
// NOTE: Variable
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const manualStore = useManualStore();
|
||||
const navigatorStore = useNavigator();
|
||||
const { dataManual, dataTroubleshooting } = storeToRefs(manualStore);
|
||||
|
|
@ -33,6 +34,16 @@ watch(
|
|||
if (route.name === 'Troubleshooting') {
|
||||
const res = await manualStore.getTroubleshooting();
|
||||
dataTroubleshooting.value = res ? res : [];
|
||||
if (
|
||||
res.length &&
|
||||
res.length === 1 &&
|
||||
res[0].page &&
|
||||
res[0].page.length === 1
|
||||
) {
|
||||
router.replace(
|
||||
`/troubleshooting/${res[0].category}/${res[0].page[0].name}`,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
{ immediate: true },
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -94,21 +94,22 @@ onMounted(async () => {
|
|||
<template>
|
||||
<main class="column full-height no-wrap">
|
||||
<div class="surface-1 col bordered rounded column">
|
||||
<div class="q-px-lg q-py-xs row items-center">
|
||||
<div class="q-py-xs row items-center" style="padding-inline: 38px">
|
||||
<q-checkbox
|
||||
size="xs"
|
||||
:model-value="selectedNoti.length === noti.length"
|
||||
class="q-px-sm"
|
||||
:model-value="noti.length > 0 && selectedNoti.length === noti.length"
|
||||
:disable="noti.length === 0"
|
||||
@click="toggleSelection('', true)"
|
||||
/>
|
||||
<q-separator vertical inset spaced="md" />
|
||||
<q-btn
|
||||
v-if="selectedNoti.length === 0"
|
||||
icon="mdi-refresh"
|
||||
rounded
|
||||
flat
|
||||
dense
|
||||
size="xs"
|
||||
class="app-text-muted-2 q-ml-sm q-mt-xs"
|
||||
size="sm"
|
||||
class="app-text-muted-2 q-mt-xs"
|
||||
@click="async () => await fetchNoti()"
|
||||
>
|
||||
<q-tooltip>Refresh</q-tooltip>
|
||||
|
|
@ -119,8 +120,8 @@ onMounted(async () => {
|
|||
rounded
|
||||
flat
|
||||
dense
|
||||
size="xs"
|
||||
class="app-text-muted-2 q-ml-sm"
|
||||
size="sm"
|
||||
class="app-text-muted-2"
|
||||
@click="async () => await deleteNoti()"
|
||||
>
|
||||
<q-tooltip>{{ $t('general.delete') }}</q-tooltip>
|
||||
|
|
@ -131,7 +132,7 @@ onMounted(async () => {
|
|||
rounded
|
||||
flat
|
||||
dense
|
||||
size="xs"
|
||||
size="sm"
|
||||
class="app-text-muted-2 q-mx-sm"
|
||||
@click="async () => await markAsRead()"
|
||||
>
|
||||
|
|
@ -177,7 +178,13 @@ onMounted(async () => {
|
|||
<q-badge
|
||||
rounded
|
||||
class="q-ml-md"
|
||||
style="background: hsl(var(--info-bg))"
|
||||
:color="
|
||||
(tab.value === 'all'
|
||||
? noti.length
|
||||
: noti.filter((v) => !v.read).length) > 0
|
||||
? 'info'
|
||||
: 'grey'
|
||||
"
|
||||
>
|
||||
{{
|
||||
tab.value === 'all'
|
||||
|
|
|
|||
|
|
@ -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)) ||
|
||||
|
|
|
|||
|
|
@ -2506,6 +2506,7 @@ watch(
|
|||
/>
|
||||
|
||||
<KebabAction
|
||||
v-if="actionDisplay"
|
||||
:disable-delete="props.row.status !== 'CREATED'"
|
||||
:status="props.row.status"
|
||||
:id-name="props.row.name"
|
||||
|
|
@ -3252,6 +3253,7 @@ watch(
|
|||
"
|
||||
/>
|
||||
<KebabAction
|
||||
v-if="actionDisplay"
|
||||
:use-copy="productAndServiceTab === 'service'"
|
||||
:status="props.row.status"
|
||||
:id-name="props.row.name"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -143,6 +143,7 @@ async function openRequestListDialog() {
|
|||
page: 1,
|
||||
pageSize: 999,
|
||||
incomplete: true,
|
||||
responsibleOnly: true,
|
||||
});
|
||||
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ watch(
|
|||
@click="prev"
|
||||
/>
|
||||
<MainButton
|
||||
:disabled="selected.length === 0"
|
||||
icon="mdi-check"
|
||||
color="207 96% 32%"
|
||||
solid
|
||||
|
|
@ -164,6 +165,7 @@ watch(
|
|||
</MainButton>
|
||||
<SaveButton
|
||||
v-if="step === Step.Configure"
|
||||
:disabled="form.responsibleUserId === ''"
|
||||
id="btn-save"
|
||||
solid
|
||||
@click="$emit('submit', { form, selected })"
|
||||
|
|
|
|||
|
|
@ -1005,7 +1005,21 @@ function toEmployee(employee: RequestData['employee']) {
|
|||
:label="$t('dialog.action.close')"
|
||||
/>
|
||||
<MainButton
|
||||
v-if="productsList.some((v) => v._messengerExpansion)"
|
||||
v-if="
|
||||
productsList.some((v) => v._messengerExpansion) &&
|
||||
!(
|
||||
data.requestDataStatus === RequestDataStatus.Canceled ||
|
||||
(responsibleList &&
|
||||
!responsibleList[pageState.currentStep]?.user.find(
|
||||
(v) => v.id === getUserId(),
|
||||
) &&
|
||||
!responsibleList[pageState.currentStep]?.group.some((v) =>
|
||||
currentUserGroup.includes(v),
|
||||
)) ||
|
||||
(!!responsibleList[pageState.currentStep]?.user?.length &&
|
||||
!!responsibleList[pageState.currentStep]?.user?.length)
|
||||
)
|
||||
"
|
||||
solid
|
||||
icon="mdi-account-outline"
|
||||
color="207 96% 32%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue