Много чего
This commit is contained in:
@@ -17,12 +17,12 @@ import {ref, watch} from "vue";
|
||||
import {router} from "@inertiajs/vue3";
|
||||
const open = defineModel('open')
|
||||
const props = defineProps({
|
||||
type: {
|
||||
type: String
|
||||
},
|
||||
archiveHistoryId: {
|
||||
type: Number
|
||||
},
|
||||
activeHistoryType: {
|
||||
type: String
|
||||
},
|
||||
isCreateNew: {
|
||||
type: Boolean
|
||||
}
|
||||
@@ -31,8 +31,7 @@ const emits = defineEmits(['closeWithoutSave', 'historyUpdated'])
|
||||
|
||||
const loading = ref(false)
|
||||
const archiveHistory = ref({
|
||||
historyable_id: props.archiveHistoryId,
|
||||
historyable_type: props.activeHistoryType,
|
||||
type: props.type,
|
||||
issue_at: null,
|
||||
org_id: null,
|
||||
return_at: null,
|
||||
@@ -45,8 +44,8 @@ const orgs = ref([])
|
||||
|
||||
const onResetData = () => {
|
||||
archiveHistory.value = {
|
||||
historyable_id: props.archiveHistoryId,
|
||||
historyable_type: props.activeHistoryType,
|
||||
archive_info_id: props.archiveHistoryId,
|
||||
type: props.type,
|
||||
issue_at: null,
|
||||
org_id: null,
|
||||
return_at: null,
|
||||
@@ -114,7 +113,7 @@ watch(() => props.archiveHistoryId, async (newId) => {
|
||||
<template>
|
||||
<NModal v-model:show="open" preset="card" class="max-w-2xl relative" closable @close="onCloseWithoutSave">
|
||||
<template #header>
|
||||
{{ archiveHistoryId === null ? 'Добавить' : 'Редактировать' }} запись выдачи
|
||||
{{ isCreateNew ? 'Добавить' : 'Редактировать' }} запись выдачи
|
||||
</template>
|
||||
<NForm>
|
||||
<NFormItem label="Дата выдачи">
|
||||
|
||||
Reference in New Issue
Block a user