PageSourceSearch

https://mediumspringgreen-oyster-710225.hostingersite.com/build/assets/Create-BIqB5Vsw.js

js mediumspringgreen-oyster-710225.hostingersite.com collected 2026-10-03 04:41:37 UTC 3,545 bytes, 1 lines download raw bytes

1import{u,j as e,H as h,L as c}from"./app-BaCFBhvp.js";import{A as p}from"./AuthenticatedLayout-B0R_nv0X.js";import{T as o,I as l}from"./TextInput-DGWZ1goF.js";import{I as i}from"./InputLabel-ChiK0I3f.js";import{P as v}from"./PrimaryButton-Dhzat5Qh.js";import"./transition-D682H2UK.js";function y({location:m}){const{data:r,setData:s,post:n,processing:d,errors:t}=u({reviewer_display_name:"",reviewer_profile_photo_url:"",rating:"5",comment:"",review_create_time:""}),x=a=>{a.preventDefault(),n(route("locations.reviews.store",m.id))};return e.jsxs(p,{header:e.jsxs("div",{className:"flex items-center",children:[e.jsx(c,{href:route("locations.reviews.index",m.id),className:"text-gray-500 hover:text-gray-700 mr-2",children:"← Volver"}),e.jsxs("h2",{className:"text-xl font-semibold leading-tight text-gray-800",children:["Nueva Reseña - ",m.title]})]}),children:[e.jsx(h,{title:"Nueva Reseña"}),e.jsx("div",{className:"py-12",children:e.jsx("div",{className:"mx-auto max-w-2xl sm:px-6 lg:px-8",children:e.jsx("div",{className:"bg-white overflow-hidden shadow-sm sm:rounded-lg p-6",children:e.jsxs("form",{onSubmit:x,children:[e.jsxs("div",{className:"mb-4",children:[e.jsx(i,{htmlFor:"reviewer_display_name",value:"Nombre del autor *"}),e.jsx(o,{id:"reviewer_display_name",type:"text",className:"mt-1 block w-full",value:r.reviewer_display_name,onChange:a=>s("reviewer_display_name",a.target.value),required:!0,placeholder:"Juan García"}),e.jsx(l,{message:t.reviewer_display_name,className:"mt-2"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx(i,{htmlFor:"reviewer_profile_photo_url",value:"URL de foto de perfil"}),e.jsx(o,{id:"reviewer_profile_photo_url",type:"url",className:"mt-1 block w-full",value:r.reviewer_profile_photo_url,onChange:a=>s("reviewer_profile_photo_url",a.target.value),placeholder:"https://ejemplo.com/foto.jpg"}),e.jsx(l,{message:t.reviewer_profile_photo_url,className:"mt-2"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx(i,{htmlFor:"rating",value:"Calificación *"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[[1,2,3,4,5].map(a=>e.jsx("button",{type:"button",onClick:()=>s("rating",a.toString()),className:`text-3xl ${parseInt(r.rating)>=a?"text-yellow-400":"text-gray-300"} hover:text-yellow-400 transition`,children:"★"},a)),e.jsxs("span",{className:"ml-2 text-gray-600",children:[r.rating," / 5"]})]}),e.jsx(l,{message:t.rating,className:"mt-2"})]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(i,{htmlFor:"comment",value:"Comentario"}),e.jsx("textarea",{id:"comment",className:"mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:border-blue-500 focus:ring-blue-500",rows:"4",value:r.comment,onChange:a=>s("comment",a.target.value),placeholder:"Escribe el comentario de la reseña..."}),e.jsx(l,{message:t.comment,className:"mt-2"})]}),e.jsxs("div",{className:"mb-4",children:[e.jsx(i,{htmlFor:"review_create_time",value:"Fecha de la reseña"}),e.jsx(o,{id:"review_create_time",type:"datetime-local",className:"mt-1 block w-full",value:r.review_create_time,onChange:a=>s("review_create_time",a.target.value)}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Si se deja vacío, se usará la fecha actual."}),e.jsx(l,{message:t.review_create_time,className:"mt-2"})]}),e.jsxs("div",{className:"flex items-center justify-end",children:[e.jsx(c,{href:route("locations.reviews.index",m.id),className:"px-4 py-2 text-gray-600 hover:text-gray-800 mr-4",children:"Cancelar"}),e.jsx(v,{disabled:d,children:"Crear Reseña"})]})]})})})})]})}export{y as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.