@@ -89,6 +89,7 @@ export default function ProjectPage() {
8989 mode : "onChange" ,
9090 defaultValues : {
9191 name : "" ,
92+ description : "" ,
9293 startDate : eventId ? "" : dayjs ( ) . format ( "YYYY-MM-DD" ) ,
9394 endDate : eventId ? "" : dayjs ( ) . add ( 6 , "day" ) . format ( "YYYY-MM-DD" ) ,
9495 allowedRanges : [ { startTime : "00:00" , endTime : "23:45" } ] ,
@@ -109,6 +110,7 @@ export default function ProjectPage() {
109110 if ( ! project ) return ;
110111 reset ( {
111112 name : project . name ,
113+ description : project . description ,
112114 startDate : dayjs ( project . startDate ) . format ( "YYYY-MM-DD" ) ,
113115 endDate : dayjs ( project . endDate ) . format ( "YYYY-MM-DD" ) ,
114116 allowedRanges : [
@@ -136,6 +138,7 @@ export default function ProjectPage() {
136138
137139 const eventData = {
138140 name : data . name ?? "" ,
141+ description : data . description ?? "" ,
139142 startDate : startDateTime ,
140143 endDate : endDateTime ,
141144 allowedRanges : rangeWithDateTime ?? [ ] ,
@@ -235,6 +238,19 @@ export default function ProjectPage() {
235238 />
236239 { errors . name && < p className = "mt-1 text-red-500 text-sm" > { errors . name . message } </ p > }
237240 </ div >
241+ < div >
242+ < label className = "text-gray-400 text-sm" htmlFor = "input-description" >
243+ イベントの説明(任意)
244+ </ label >
245+ < textarea
246+ { ...register ( "description" ) }
247+ id = "input-description"
248+ className = { `textarea w-full text-base ${ errors . description ? "textarea-error border-red-500" : "" } ` }
249+ placeholder = "イベントの詳細や注意事項などを入力"
250+ rows = { 3 }
251+ />
252+ { errors . description && < p className = "mt-1 text-red-500 text-sm" > { errors . description . message } </ p > }
253+ </ div >
238254 { ! project || ( project && project . guests . length === 0 ) ? (
239255 < >
240256 < div className = "collapse-arrow collapse mb-4 border border-blue-200 bg-blue-50" >
0 commit comments