PageSourceSearch

https://www.ccvt.fr/build/assets/Index-CcIgKGAK.js

js ccvt.fr collected 2026-10-09 17:04:28 UTC 5,682 bytes, 1 lines download raw bytes

1import{r as w,o as r,p as _,w as g,d as t,t as n,g as k,k as R,v as S,c as i,i as u,F as C,m as D,a as q,b as y,l as j,e as l,q as m,j as $}from"./app-CFYReQIT.js";import{_ as T}from"./AdminLayout-CkT6GqRm.js";/* empty css            */const V={class:"container mx-auto px-4 py-8"},B={class:"flex justify-between items-center mb-6"},N={class:"text-sm text-gray-600 mt-1"},A={class:"mb-6 space-y-4"},F={class:"flex gap-2 max-w-2xl"},L={class:"relative flex-1"},Q={key:0,class:"bg-white rounded-lg shadow p-8 text-center text-gray-500"},E={key:0},K={key:1},M={key:1,class:"bg-white rounded-lg shadow overflow-hidden"},O={class:"admin-table min-w-full divide-y divide-gray-200"},P={class:"bg-white divide-y divide-gray-200"},z={class:"px-6 py-4 whitespace-nowrap"},I={class:"text-sm text-gray-900"},U={class:"text-xs text-gray-500"},G={class:"px-6 py-4 whitespace-nowrap"},H={class:"text-sm font-medium text-gray-900"},J={class:"px-6 py-4 whitespace-nowrap"},W=["href"],X={class:"px-6 py-4"},Y={class:"text-sm text-gray-900"},Z={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},tt=["onClick"],et={key:0,class:"px-6 py-4 border-t border-gray-200"},st={class:"flex items-center justify-between"},at={class:"text-sm text-gray-700"},rt={class:"font-medium"},ot={class:"font-medium"},nt={class:"font-medium"},it={class:"flex gap-2"},xt={__name:"Index",props:{contactRequests:Object,searchQuery:String},setup(a){const c=$(),d=w(a.searchQuery||""),x=()=>{m.get(c("admin.contact-requests.index"),d.value?{search:d.value}:{},{preserveState:!0,preserveScroll:!0})},h=()=>{d.value="",m.get(c("admin.contact-requests.index"))},p=o=>{const e={page:o};d.value&&(e.search=d.value),m.get(c("admin.contact-requests.index"),e,{preserveState:!0,preserveScroll:!0})},f=o=>new Date(o).toLocaleDateString("fr-FR",{day:"2-digit",month:"2-digit",year:"numeric"}),v=o=>new Date(o).toLocaleTimeString("fr-FR",{hour:"2-digit",minute:"2-digit"}),b=o=>{confirm(`Êtes-vous sûr de vouloir supprimer la demande de contact de ${o.first_name??""} ${o.name} ? Cette action est irréversible.`)&&m.delete(c("admin.contact-requests.destroy",o.id))};return(o,e)=>(r(),_(T,{title:"Demandes de contact"},{default:g(()=>[t("div",V,[t("div",B,[t("div",null,[e[3]||(e[3]=t("h1",{class:"text-3xl font-bold"},"Demandes de contact",-1)),t("p",N,n(a.contactRequests.total)+" demande(s) reçue(s)",1)])]),t("div",A,[t("div",F,[t("div",L,[k(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>d.value=s),type:"text",placeholder:"Rechercher par nom ou email...",onKeyup:R(x,["enter"]),class:"w-full rounded-lg border border-gray-300 pl-10 pr-10 py-2 text-sm focus:ring-2 focus:ring-primary focus:border-primary"},null,544),[[S,d.value]]),e[4]||(e[4]=t("svg",{class:"w-4 h-4 text-gray-400 absolute left-3 top-1/2 -translate-y-1/2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1)),d.value?(r(),i("button",{key:0,onClick:h,class:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600"}," ✕ ")):u("",!0)]),t("button",{onClick:x,class:"px-6 py-2 bg-primary-dark hover:bg-primary-darker text-white rounded-lg text-sm font-medium transition-colors whitespace-nowrap"}," Rechercher ")])]),a.contactRequests.data.length===0?(r(),i("div",Q,[a.searchQuery?(r(),i("span",E,"Aucun résultat pour cette recherche.")):(r(),i("span",K,"Aucune demande de contact pour le moment."))])):(r(),i("div",M,[t("table",O,[e[6]||(e[6]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"}," Date "),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"}," Nom "),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"}," Email "),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"}," Objet "),t("th",{class:"px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"}," Actions ")])],-1)),t("tbody",P,[(r(!0),i(C,null,D(a.contactRequests.data,s=>(r(),i("tr",{key:s.id},[t("td",z,[t("div",I,n(f(s.created_at)),1),t("div",U,n(v(s.created_at)),1)]),t("td",G,[t("div",H,n(s.first_name)+" "+n(s.name),1)]),t("td",J,[t("a",{href:`mailto:${s.email}`,class:"text-sm text-primary hover:text-primary-dark"},n(s.email),9,W)]),t("td",X,[t("div",Y,n(s.subject_label),1)]),t("td",Z,[q(y(j),{href:y(c)("admin.contact-requests.show",s.id),class:"text-primary hover:text-primary-dark mr-4"},{default:g(()=>[...e[5]||(e[5]=[l(" Voir ",-1)])]),_:1},8,["href"]),t("button",{onClick:ct=>b(s),class:"text-red-700 hover:text-red-900"}," Supprimer ",8,tt)])]))),128))])]),a.contactRequests.last_page>1?(r(),i("div",et,[t("div",st,[t("div",at,[e[7]||(e[7]=l(" Affichage de ",-1)),t("span",rt,n(a.contactRequests.from),1),e[8]||(e[8]=l(" à ",-1)),t("span",ot,n(a.contactRequests.to),1),e[9]||(e[9]=l(" sur ",-1)),t("span",nt,n(a.contactRequests.total),1),e[10]||(e[10]=l(" résultat(s) ",-1))]),t("div",it,[a.contactRequests.prev_page_url?(r(),i("button",{key:0,onClick:e[1]||(e[1]=s=>p(a.contactRequests.current_page-1)),class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50"}," Précédent ")):u("",!0),a.contactRequests.next_page_url?(r(),i("button",{key:1,onClick:e[2]||(e[2]=s=>p(a.contactRequests.current_page+1)),class:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50"}," Suivant ")):u("",!0)])])])):u("",!0)]))])]),_:1}))}};export{xt 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.