Работа над интерактивным обучением для дежурного и мед. сестры
This commit is contained in:
@@ -27,6 +27,8 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const reportStore = useReportStore()
|
||||
const onboarding = useOnboardingStore()
|
||||
|
||||
const formRef = ref()
|
||||
|
||||
const rawUsers = ref([])
|
||||
@@ -153,10 +155,15 @@ const onSubmit = (e) => {
|
||||
formRef.value?.validate((errors) => {
|
||||
if (!errors) {
|
||||
if (reportExists.value) return
|
||||
|
||||
router.visit(props.targetPath, {
|
||||
data: {
|
||||
userId: reportStore.reportInfo.userId,
|
||||
departmentId: reportStore.reportInfo.departmentId
|
||||
},
|
||||
onSuccess: () => {
|
||||
onboarding.emit('navigate:report')
|
||||
show.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -177,22 +184,11 @@ const onChangeDepartment = (departmentId) => {
|
||||
usersLoaded.value = false
|
||||
fetchUsers(departmentId)
|
||||
}
|
||||
|
||||
const onboarding = useOnboardingStore()
|
||||
const onAfterEnter = async () => {
|
||||
// Если онбординг активен и текущий шаг имеет opensModal, переходим к следующему
|
||||
if (!onboarding.isActive) return
|
||||
|
||||
await nextTick()
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
onboarding.setStep(onboarding.activeStepIndex + 1)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NModal v-model:show="show"
|
||||
id="modal-select-user"
|
||||
preset="card"
|
||||
class="max-w-[420px]"
|
||||
:mask-closable="false"
|
||||
|
||||
Reference in New Issue
Block a user