Роли, переделывание отчета, изменение на главной странице
This commit is contained in:
42
resources/js/Pages/Report/Components/ReportForm.vue
Normal file
42
resources/js/Pages/Report/Components/ReportForm.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<script setup>
|
||||
import { NFlex, NButton } from 'naive-ui'
|
||||
import ReportHeader from "./ReportHeader.vue";
|
||||
import ReportFormInput from "./ReportFormInput.vue";
|
||||
import ReportSection from "./ReportSection.vue";
|
||||
import {useReportStore} from "../../../Stores/report.js";
|
||||
import {useAuthStore} from "../../../Stores/auth.js";
|
||||
|
||||
const props = defineProps({
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'fillable' // 'fillable', 'readonly'
|
||||
}
|
||||
})
|
||||
|
||||
const authStore = useAuthStore()
|
||||
const reportStore = useReportStore()
|
||||
|
||||
const onSubmit = () => {
|
||||
reportStore.sendReportForm({
|
||||
departmentId: authStore.userDepartment.department_id
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NFlex vertical class="max-w-6xl mx-auto mt-6 mb-4 w-full">
|
||||
<ReportHeader :mode="mode" />
|
||||
|
||||
<ReportFormInput />
|
||||
|
||||
<ReportSection label="Планово" />
|
||||
|
||||
<NButton secondary size="large" @click="onSubmit">
|
||||
Сохранить отчет
|
||||
</NButton>
|
||||
</NFlex>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user