PageSourceSearch

https://www.xpark.ai/assets/AdminModifications-CCydaCox.js

js xpark.ai collected 2026-10-05 14:02:36 UTC 2,530 bytes, 1 lines download raw bytes

1import{r,d as m,j as e,f as x}from"./index-FWKSGZPO.js";import{C as n,c as d,a as u,b as p}from"./card-DTQVPU97.js";import{B as f}from"./badge-Cpd-8HxK.js";const o=t=>new Intl.NumberFormat("pt-BR",{style:"currency",currency:"BRL"}).format(t||0),a=t=>t?new Date(t).toLocaleString("pt-BR"):"-",g={pending:"bg-yellow-500/10 text-yellow-700 border-yellow-500/30",paid:"bg-blue-500/10 text-blue-700 border-blue-500/30",applied:"bg-green-500/10 text-green-700 border-green-500/30",cancelled:"bg-red-500/10 text-red-700 border-red-500/30",expired:"bg-muted text-muted-foreground border-muted"};function _(){const[t,i]=r.useState([]),[l,c]=r.useState(!0);return r.useEffect(()=>{m.from("booking_modifications").select("*").order("created_at",{ascending:!1}).limit(500).then(({data:s})=>{i(s||[]),c(!1)})},[]),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Alterações de reserva"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Histórico de modificações feitas pelos clientes em /minhas-reservas."})]}),l?e.jsx("div",{className:"flex justify-center py-10",children:e.jsx(x,{className:"h-6 w-6 animate-spin"})}):t.length===0?e.jsx(n,{children:e.jsx(d,{className:"py-10 text-center text-muted-foreground",children:"Nenhuma alteração ainda."})}):e.jsx("div",{className:"space-y-3",children:t.map(s=>e.jsxs(n,{children:[e.jsxs(u,{className:"pb-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(p,{className:"text-sm font-mono",children:s.booking_id}),e.jsx(f,{variant:"outline",className:g[s.status]||"",children:s.status})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s.created_by_email||"anônimo"," · ",a(s.created_at)]})]}),e.jsxs(d,{className:"text-xs space-y-1",children:[e.jsxs("div",{children:[e.jsx("strong",{children:"De:"})," ",a(s.from_start_at)," → ",a(s.from_end_at)," · ",s.from_category,s.from_has_insurance?" + seguro":""]}),e.jsxs("div",{children:[e.jsx("strong",{children:"Para:"})," ",a(s.to_start_at)," → ",a(s.to_end_at)," · ",s.to_category,s.to_insurance?" + seguro":""]}),e.jsxs("div",{className:"pt-1",children:[e.jsx("strong",{children:"Cobrado:"})," ",o(Number(s.amount_due))," · ",e.jsx("strong",{children:"Novo total:"})," ",o(Number(s.recalculated_total)),s.applied_at&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("span",{className:"text-muted-foreground",children:["aplicado em ",a(s.applied_at)]})]})]})]})]},s.id))})]})}export{_ 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.