refactor(components): add co-author field to the story form
This commit is contained in:
		
							parent
							
								
									ba13c4a52f
								
							
						
					
					
						commit
						188b55724c
					
				| @ -1,7 +1,6 @@ | |||||||
| <script setup lang="ts"> | <script setup lang="ts"> | ||||||
| 	import draggable from "vuedraggable"; | 	import draggable from "vuedraggable"; | ||||||
| 	import { v4 } from "uuid"; | 	import { v4 } from "uuid"; | ||||||
| 	import { autoSave } from "~/lib/client/utils"; |  | ||||||
| 	import lmove from "lodash-move"; | 	import lmove from "lodash-move"; | ||||||
| 	import { | 	import { | ||||||
| 		Field, | 		Field, | ||||||
| @ -16,6 +15,9 @@ | |||||||
| 		FormStory, | 		FormStory, | ||||||
| 		defaultChapter, | 		defaultChapter, | ||||||
| 	} from "~/lib/client/types/form/story"; | 	} from "~/lib/client/types/form/story"; | ||||||
|  | 	import { autoSave } from "~/lib/client/utils"; | ||||||
|  | 
 | ||||||
|  | 	import findUser from "~/components/findUser.vue"; | ||||||
| 
 | 
 | ||||||
| 	import singleChapter from "./singleChapter.vue"; | 	import singleChapter from "./singleChapter.vue"; | ||||||
| 	import icon from "~/components/icon.vue"; | 	import icon from "~/components/icon.vue"; | ||||||
| @ -24,6 +26,7 @@ | |||||||
| 		data: FormStory; | 		data: FormStory; | ||||||
| 		canDraft?: boolean; | 		canDraft?: boolean; | ||||||
| 		endpoint: string; | 		endpoint: string; | ||||||
|  | 		endpointMethod: "put" | "post"; | ||||||
| 	}>(); | 	}>(); | ||||||
| 	let drag = false; | 	let drag = false; | ||||||
| 	let acData = ref(props.data); | 	let acData = ref(props.data); | ||||||
| @ -67,6 +70,9 @@ | |||||||
| 				<a-input v-bind="field" :value="value" /> | 				<a-input v-bind="field" :value="value" /> | ||||||
| 			</a-form-item> | 			</a-form-item> | ||||||
| 		</Field> | 		</Field> | ||||||
|  | 		<a-form-item label="Co-author (optional)"> | ||||||
|  | 			<find-user :initial-option="null" fieldName="coAuthor" :multi="false" /> | ||||||
|  | 		</a-form-item> | ||||||
| 		<Field | 		<Field | ||||||
| 			:unchecked-value="false" | 			:unchecked-value="false" | ||||||
| 			:value="true" | 			:value="true" | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user