PageSourceSearch

https://askbina.ai/assets/AdminSimulation-D1ap86gd.js

js askbina.ai collected 2026-10-05 13:00:37 UTC 5,604 bytes, 1 lines download raw bytes

1import{r as m,j as e,t as j,w as y,x as g,v as f,B as d,R as v,a6 as N,aH as u}from"./index-CcMLSBG6.js";import{T as C}from"./TechnicalAdminLayout-BwhlunFu.js";import{L as n}from"./label-6YVF-Fk-.js";import{S as b,a as w,b as S,c as k,d as P}from"./select-DljSOX27.js";import{S as t}from"./switch-DimzQKXP.js";import{I as i}from"./input-6C8gsjbZ.js";import{P as h}from"./play-CqJPcbZy.js";import"./lock-CkLMpw2q.js";import"./chart-no-axes-column-D2swLHl6.js";import"./dollar-sign-DMrgMiCk.js";import"./bot-C7e4-GsS.js";import"./wrench-C9-gyDf5.js";import"./map-pin-luXfVPf-.js";function T(){const[c,o]=m.useState(!1),[a,r]=m.useState({clearChat:!0,clearOffers:!0,clearDocuments:!0,simulationType:"new_mortgage",skipPayment:!0,userFullName:"משה ישראלי",userEmail:"",userPhone:"0501234567",propertyValue:2e6,loanAmount:14e5,monthlyIncome:25e3}),x=[{id:"new_mortgage",label:"משכנתא חדשה - דירה ראשונה"},{id:"refinance",label:"מחזור משכנתא קיימת"},{id:"investment",label:"דירת השקעה"}],p=async()=>{o(!0);try{a.clearChat&&console.log("מוחק היסטוריית צ׳אט..."),a.clearOffers&&console.log("מוחק הצעות קיימות..."),a.clearDocuments&&console.log("מוחק מסמכים קיימים..."),await N.User.updateMyUserData({full_name:a.userFullName,email:a.userEmail,phone:a.userPhone,simulation_mode:!0,simulation_type:a.simulationType,simulation_data:{property_value:a.propertyValue,loan_amount:a.loanAmount,monthly_income:a.monthlyIncome,skip_payment:a.skipPayment}});const s=`/Chat?simulation=true&type=${a.simulationType}`;window.location.href=s,u({title:"הסימולציה החלה בהצלחה",description:"מועבר לצ'אט..."})}catch(s){console.error("Simulation error:",s),u({title:"שגיאה בהפעלת הסימולציה",description:"אנא נסה שוב",variant:"destructive"})}finally{o(!1)}};return e.jsxs(j,{className:"w-full",children:[e.jsx(y,{children:e.jsxs(g,{className:"flex items-center gap-2",children:[e.jsx(h,{className:"h-5 w-5"}),"הפעלת סימולציה מהירה"]})}),e.jsxs(f,{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"סוג משכנתא"}),e.jsxs(b,{value:a.simulationType,onValueChange:s=>r(l=>({...l,simulationType:s})),children:[e.jsx(w,{children:e.jsx(S,{placeholder:"בחר סוג משכנתא"})}),e.jsx(k,{children:x.map(s=>e.jsx(P,{value:s.id,children:s.label},s.id))})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"שם מלא"}),e.jsx(i,{value:a.userFullName,onChange:s=>r(l=>({...l,userFullName:s.target.value})),placeholder:"שם מלא"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"אימייל (לא חובה)"}),e.jsx(i,{value:a.userEmail,onChange:s=>r(l=>({...l,userEmail:s.target.value})),placeholder:"אימייל"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"טלפון"}),e.jsx(i,{value:a.userPhone,onChange:s=>r(l=>({...l,userPhone:s.target.value})),placeholder:"טלפון"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"שווי נכס"}),e.jsx(i,{type:"number",value:a.propertyValue,onChange:s=>r(l=>({...l,propertyValue:Number(s.target.value)})),placeholder:"שווי נכס"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"סכום הלוואה"}),e.jsx(i,{type:"number",value:a.loanAmount,onChange:s=>r(l=>({...l,loanAmount:Number(s.target.value)})),placeholder:"סכום הלוואה"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(n,{children:"הכנסה חודשית"}),e.jsx(i,{type:"number",value:a.monthlyIncome,onChange:s=>r(l=>({...l,monthlyIncome:Number(s.target.value)})),placeholder:"הכנסה חודשית"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"דלג על תשלום"}),e.jsx(t,{checked:a.skipPayment,onCheckedChange:s=>r(l=>({...l,skipPayment:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"נקה היסטוריית צ'אט"}),e.jsx(t,{checked:a.clearChat,onCheckedChange:s=>r(l=>({...l,clearChat:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"נקה הצעות קיימות"}),e.jsx(t,{checked:a.clearOffers,onCheckedChange:s=>r(l=>({...l,clearOffers:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(n,{children:"נקה מסמכים"}),e.jsx(t,{checked:a.clearDocuments,onCheckedChange:s=>r(l=>({...l,clearDocuments:s}))})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs(d,{variant:"outline",onClick:()=>
1window.location.reload(),disabled:c,children:[e.jsx(v,{className:"h-4 w-4 ml-2"}),"אפס הכל"]}),e.jsxs(d,{onClick:p,disabled:c,children:[e.jsx(h,{className:"h-4 w-4 ml-2"}),"התחל סימולציה"]})]})]})]})}function M(){return e.jsx(C,{currentPage:"AdminSimulation",children:e.jsxs("div",{className:"container max-w-7xl mx-auto p-6 space-y-8",children:[e.jsxs("div",{className:"flex flex-col space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold",children:"כלי סימולציה"}),e.jsx("p",{className:"text-gray-500",children:"כלים לניהול ובדיקת תהליכי המשכנתא במערכת"})]}),e.jsx("div",{className:"grid gap-6 grid-cols-1",children:e.jsx(T,{})})]})})}export{M 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.