lms/public/build/assets/index-D-uqG4Km.js
2025-12-15 12:26:23 +01:00

2 lines
5.1 KiB
JavaScript

import{u as S,b as P,j as e,H as D,cH as u,bu as H,n as T,m as M}from"./vendor-BKmmeuxg.js";import{I as r}from"./input-error-LaPr_4wd.js";import{A as i,b as m}from"./alert-D9uBQ7fu.js";import{B as j}from"./button-BpNwv2aE.js";import{C as c,b as o,a as y,c as f}from"./card-D9_SJYq6.js";import{I as b}from"./input-DM0goJrn.js";import{L as d}from"./label-HmIcv5Yx.js";import{M as O}from"./main-_V386djS.js";import{o as g}from"./inertia-SZXqLvQm.js";import{k as A}from"./richtor-CRcM6Du2.js";import"./utils-DxSsnXxD.js";import"./index-WW_1X1qx.js";import"./index-D9-QKOod.js";const E=()=>{const{props:t}=S(),{user:N,item:w,amount:C,currency:v,payment_instructions:x,payment_details:h,errors:a}=t,{data:p,setData:n,post:_,processing:l}=P({payment_info:"",payment_date:new Date().toISOString().split("T")[0],attachment:null}),I=s=>{s.preventDefault(),_(route("payments.offline.submit"))};return e.jsxs(e.Fragment,{children:[e.jsx(D,{title:"Offline Payment"}),e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-gray-50 py-8",children:e.jsx("div",{className:"mx-auto w-full max-w-[900px] p-6",children:e.jsxs(c,{className:"overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"bg-blue-500 p-6 text-white",children:[e.jsx("h1",{className:"mb-2 text-2xl font-bold",children:"Offline Payment Instructions"}),e.jsx("p",{className:"text-blue-100",children:"Please complete the payment and submit your transaction details below"})]}),e.jsxs(o,{className:"space-y-6 p-6",children:[e.jsxs(c,{className:"border bg-gray-50",children:[e.jsx(y,{children:e.jsx(f,{className:"text-lg",children:"Order Summary"})}),e.jsxs(o,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-gray-600",children:"Item:"}),e.jsx("span",{className:"font-medium text-gray-900",children:w.title})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-gray-600",children:"Customer:"}),e.jsx("span",{className:"font-medium text-gray-900",children:N.name})]}),e.jsxs("div",{className:"flex items-center justify-between border-t pt-3",children:[e.jsx("span",{className:"text-lg font-semibold text-gray-800",children:"Total Amount:"}),e.jsxs("span",{className:"text-2xl font-bold text-blue-600",children:[v," ",Number(C).toFixed(2)]})]})]})]}),x&&e.jsxs(i,{className:"border-yellow-200 bg-yellow-50",children:[e.jsx(u,{className:"h-5 w-5 text-yellow-600"}),e.jsxs(m,{children:[e.jsx("h2",{className:"mb-3 text-lg font-semibold text-gray-800",children:"Payment Instructions"}),e.jsx("div",{className:"prose prose-sm max-w-none text-gray-700",dangerouslySetInnerHTML:{__html:x}})]})]}),h&&e.jsxs(i,{className:"border-blue-200 bg-blue-50",children:[e.jsx(H,{className:"h-5 w-5 text-blue-600"}),e.jsxs(m,{children:[e.jsx("h2",{className:"mb-4 text-lg font-semibold text-gray-800",children:"Payment Details"}),e.jsx("div",{className:"prose prose-sm max-w-none text-gray-700",dangerouslySetInnerHTML:{__html:h}})]})]}),e.jsxs(c,{children:[e.jsx(y,{children:e.jsx(f,{className:"text-lg",children:"Submit Payment Details"})}),e.jsx(o,{children:e.jsxs("form",{onSubmit:I,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{htmlFor:"payment_method",children:["Payment Method Used ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(A,{output:"html",placeholder:{paragraph:"Enter payment details here...",imageCaption:"Enter image caption here..."},contentMinHeight:220,contentMaxHeight:600,initialContent:p.payment_info,onContentChange:s=>n("payment_info",s)}),e.jsx(r,{message:a.payment_info})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{children:["Payment Date ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(b,{required:!0,type:"date",name:"payment_date",max:new Date().toISOString().split("T")[0],value:p.payment_date,onChange:s=>g(s,n)}),e.jsx(r,{message:a.payment_date})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(d,{children:["Transaction Attachment ",e.jsx("span",{className:"font-light",children:"(Optional)"})]}),e.jsx(b,{type:"file",name:"attachment",placeholder:"Enter transaction attachment",onChange:s=>g(s,n)}),e.jsx(r,{message:a.attachment})]}),e.jsxs(i,{className:"border-blue-200 bg-blue-50",children:[e.jsx(u,{className:"h-4 w-4 text-blue-600"}),e.jsxs(m,{className:"text-sm text-blue-800",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Important Notice"}),e.jsx("p",{children:"Your enrollment will be activated once our team verifies your payment. This usually takes 1-2 business days. You will receive an email notification once your payment is confirmed."})]})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsxs(j,{type:"submit",className:"flex flex-1 items-center justify-center gap-2",disabled:l,children:[e.jsx(T,{className:"h-5 w-5"}),l?"Submitting...":"Submit Payment Details"]}),e.jsx(j,{asChild:!0,type:"button",variant:"secondary",disabled:l,className:"gap-2",children:e.jsxs("a",{href:route("payments.offline.cancel"),children:[e.jsx(M,{className:"h-4 w-4"}),"Cancel"]})})]})]})})]})]})]})})})]})};E.layout=t=>e.jsx(O,{children:t});export{E as default};