@@ -16,6 +16,7 @@ const knowledge = ref(0)
1616const hoverKnowledge = ref (0 )
1717const demeanor = ref (0 )
1818const hoverDemeanor = ref (0 )
19+ const isAnonymous = ref (false )
1920
2021interface Judge {
2122 id: string ;
@@ -84,7 +85,7 @@ function handleCancel() {
8485 </script >
8586
8687<template >
87- <div class =" space-y-12" >
88+ <div class =" space-y-12 pb-32 " >
8889 <ReviewJudgeSearch v-if =" !judge" class =" mb-48" />
8990
9091 <!-- Review Form - Only shown when judge is selected -->
@@ -116,8 +117,9 @@ function handleCancel() {
116117 name =" title"
117118 id =" title"
118119 v-model =" reviewTitle"
120+ :disabled =" !judge"
119121 placeholder =" Brief summary of your experience"
120- class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6"
122+ class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6 disabled:opacity-50 disabled:cursor-not-allowed "
121123 >
122124 </div >
123125 </div >
@@ -131,7 +133,8 @@ function handleCancel() {
131133 v-for =" star in 5"
132134 :key =" star"
133135 type =" button"
134- class =" text-gray-300 hover:text-yellow-400 focus:outline-none"
136+ :disabled =" !judge"
137+ class =" text-gray-300 hover:text-yellow-400 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
135138 :class =" { 'text-yellow-400': star <= (hoverFairness || fairness) }"
136139 @click =" fairness = star"
137140 @mouseenter =" hoverFairness = star"
@@ -154,7 +157,8 @@ function handleCancel() {
154157 v-for =" star in 5"
155158 :key =" star"
156159 type =" button"
157- class =" text-gray-300 hover:text-yellow-400 focus:outline-none"
160+ :disabled =" !judge"
161+ class =" text-gray-300 hover:text-yellow-400 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
158162 :class =" { 'text-yellow-400': star <= (hoverKnowledge || knowledge) }"
159163 @click =" knowledge = star"
160164 @mouseenter =" hoverKnowledge = star"
@@ -177,7 +181,8 @@ function handleCancel() {
177181 v-for =" star in 5"
178182 :key =" star"
179183 type =" button"
180- class =" text-gray-300 hover:text-yellow-400 focus:outline-none"
184+ :disabled =" !judge"
185+ class =" text-gray-300 hover:text-yellow-400 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
181186 :class =" { 'text-yellow-400': star <= (hoverDemeanor || demeanor) }"
182187 @click =" demeanor = star"
183188 @mouseenter =" hoverDemeanor = star"
@@ -198,21 +203,38 @@ function handleCancel() {
198203 <div class =" sm:col-span-3" >
199204 <label for =" case-number" class =" block text-sm/6 font-medium text-gray-700" >Case Number (Optional)</label >
200205 <div class =" mt-2" >
201- <input type =" text" name =" case-number" id =" case-number" class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6" >
206+ <input
207+ type =" text"
208+ name =" case-number"
209+ id =" case-number"
210+ :disabled =" !judge"
211+ class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6 disabled:opacity-50 disabled:cursor-not-allowed"
212+ >
202213 </div >
203214 </div >
204215
205216 <div class =" sm:col-span-3" >
206217 <label for =" case-date" class =" block text-sm/6 font-medium text-gray-700" >Case Date (Optional)</label >
207218 <div class =" mt-2" >
208- <input type =" date" name =" case-date" id =" case-date" class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6" >
219+ <input
220+ type =" date"
221+ name =" case-date"
222+ id =" case-date"
223+ :disabled =" !judge"
224+ class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6 disabled:opacity-50 disabled:cursor-not-allowed"
225+ >
209226 </div >
210227 </div >
211228
212229 <div class =" col-span-full" >
213230 <label for =" role" class =" block text-sm/6 font-medium text-gray-700" >Your Role in the Case</label >
214231 <div class =" mt-2" >
215- <select id =" role" name =" role" class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6" >
232+ <select
233+ id =" role"
234+ name =" role"
235+ :disabled =" !judge"
236+ class =" block w-full rounded-md bg-off-white px-3 py-1.5 text-base text-gray-900 outline outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-gray-600 sm:text-sm/6 disabled:opacity-50 disabled:cursor-not-allowed"
237+ >
216238 <option >Attorney</option >
217239 <option >Party to the Case</option >
218240 <option >Court Staff</option >
@@ -221,6 +243,56 @@ function handleCancel() {
221243 </select >
222244 </div >
223245 </div >
246+
247+ <div class =" col-span-full" >
248+ <div class =" relative flex items-start" >
249+ <div class =" flex h-6 items-center" >
250+ <button
251+ type =" button"
252+ :disabled =" !judge"
253+ @click =" isAnonymous = !isAnonymous"
254+ :class =" [
255+ isAnonymous ? 'bg-gray-600' : 'bg-gray-200',
256+ 'relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-gray-600 focus:ring-offset-2 disabled:opacity-50 disabled:cursor-not-allowed'
257+ ]"
258+ >
259+ <span
260+ :class =" [
261+ isAnonymous ? 'translate-x-5' : 'translate-x-0',
262+ 'pointer-events-none relative inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out'
263+ ]"
264+ >
265+ <span
266+ :class =" [
267+ isAnonymous ? 'opacity-0 duration-100 ease-out' : 'opacity-100 duration-200 ease-in',
268+ 'absolute inset-0 flex h-full w-full items-center justify-center transition-opacity'
269+ ]"
270+ aria-hidden =" true"
271+ >
272+ <svg class =" h-3 w-3 text-gray-400" fill =" none" viewBox =" 0 0 12 12" >
273+ <path d =" M4 8l2-2m0 0l2-2M6 6L4 4m2 2l2 2" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" />
274+ </svg >
275+ </span >
276+ <span
277+ :class =" [
278+ isAnonymous ? 'opacity-100 duration-200 ease-in' : 'opacity-0 duration-100 ease-out',
279+ 'absolute inset-0 flex h-full w-full items-center justify-center transition-opacity'
280+ ]"
281+ aria-hidden =" true"
282+ >
283+ <svg class =" h-3 w-3 text-gray-600" fill =" currentColor" viewBox =" 0 0 12 12" >
284+ <path d =" M3.707 5.293a1 1 0 00-1.414 1.414l1.414-1.414zM5 8l-.707.707a1 1 0 001.414 0L5 8zm4.707-3.293a1 1 0 00-1.414-1.414l1.414 1.414zm-7.414 2l2 2 1.414-1.414-2-2-1.414 1.414zm3.414 2l4-4-1.414-1.414-4 4 1.414 1.414z" />
285+ </svg >
286+ </span >
287+ </span >
288+ </button >
289+ </div >
290+ <div class =" ml-3 text-sm leading-6" >
291+ <label for =" anonymous" class =" font-medium text-gray-700" >Post anonymously</label >
292+ <p class =" text-gray-500" >Your name will not be displayed with this review</p >
293+ </div >
294+ </div >
295+ </div >
224296 </div >
225297
226298 <div class =" mt-10 grid grid-cols-1 gap-x-6 gap-y-8 sm:grid-cols-6" >
@@ -232,7 +304,8 @@ function handleCancel() {
232304 v-for =" star in 5"
233305 :key =" star"
234306 type =" button"
235- class =" text-gray-300 hover:text-yellow-400 focus:outline-none"
307+ :disabled =" !judge"
308+ class =" text-gray-300 hover:text-yellow-400 focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed"
236309 :class =" { 'text-yellow-400': star <= (hoverRating || rating) }"
237310 @click =" rating = star"
238311 @mouseenter =" hoverRating = star"
@@ -250,7 +323,10 @@ function handleCancel() {
250323 <div class =" col-span-full" >
251324 <label for =" review" class =" block text-sm/6 font-medium text-gray-700" >Your Review</label >
252325 <div class =" mt-2" >
253- <RichTextEditor v-model =" reviewContent" />
326+ <RichTextEditor
327+ v-model =" reviewContent"
328+ :disabled =" !judge"
329+ />
254330 </div >
255331 <p class =" mt-3 text-sm/6 text-gray-600" >Please be specific about your experience and maintain a professional tone.</p >
256332 </div >
0 commit comments