2 lines
3.2 KiB
JavaScript
2 lines
3.2 KiB
JavaScript
import{u as f,b as y,j as e}from"./vendor-BKmmeuxg.js";import{I as l}from"./input-error-LaPr_4wd.js";import{L as g}from"./loading-button-BnTVAMJ7.js";import{S as j}from"./switch-Db09nqXX.js";import{C as v}from"./card-D9_SJYq6.js";import{L as a}from"./label-HmIcv5Yx.js";import{k as c}from"./richtor-CRcM6Du2.js";import"./utils-DxSsnXxD.js";import"./button-BpNwv2aE.js";import"./index-WW_1X1qx.js";import"./switch-DFFqeub-.js";const I=({payment:i})=>{const{props:m}=f(),{translate:d}=m,{button:p,common:r}=d,{data:s,setData:n,post:h,errors:o,processing:x}=y({...i.fields,type:"offline"}),u=t=>{t.preventDefault(),h(route("settings.payment.update",{id:i.id}))};return e.jsxs(v,{className:"p-4 sm:p-6",children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-xl font-semibold",children:"Offline Payment Settings"}),e.jsx("p",{className:"text-gray-500",children:"Configure manual payment options for your students"})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(a,{htmlFor:"status",children:s.active?r.enabled:r.disabled}),e.jsx(j,{id:"status",checked:s.active,onCheckedChange:t=>n("active",t)})]})]}),e.jsxs("form",{onSubmit:u,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsxs(a,{children:["Payment Instructions ",e.jsx("span",{className:"font-light",children:"(for student)"})]}),e.jsx(c,{output:"html",placeholder:{paragraph:"Enter instructions here...",imageCaption:"Enter image caption here..."},contentMinHeight:260,contentMaxHeight:600,initialContent:s.payment_instructions,onContentChange:t=>n("payment_instructions",t)}),e.jsx(l,{message:o.payment_instructions}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"These instructions will be shown to students when they select offline payment"})]}),e.jsxs("div",{children:[e.jsx(a,{children:"Payment Details"}),e.jsx(c,{output:"html",placeholder:{paragraph:"Enter payment details here...",imageCaption:"Enter image caption here..."},contentMinHeight:260,contentMaxHeight:600,initialContent:s.payment_details,onContentChange:t=>n("payment_details",t)}),e.jsx(l,{message:o.payment_details}),e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"These payment/bank details will be displayed to students for making offline payments"})]}),e.jsx("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 p-4",children:e.jsxs("div",{className:"flex",children:[e.jsx("svg",{className:"mr-2 h-5 w-5 shrink-0 text-yellow-600",fill:"currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),e.jsxs("div",{className:"text-sm text-yellow-800",children:[e.jsx("p",{className:"mb-1 font-medium",children:"Important Notice"}),e.jsx("p",{children:"Offline payments require manual verification. You will need to approve each payment in the Payment History section before the student can access the course."})]})]})}),e.jsx(g,{loading:x,type:"submit",className:"w-full",children:p.save_changes})]})]})};export{I as default};
|