PageSourceSearch

https://erobella.com/_nuxt/BY-DQq2u.js

js erobella.com collected 2026-09-24 10:05:37 UTC 3,853 bytes, 1 lines download raw bytes

1import{d as E,J as C,u as N,o as h,a as V,j as _,t as T,e as o,m as w,N as R,r as v,$ as I,E as S,s as M,f as k,q as B,k as P,w as d,ao as L,b as f,B as A,R as D,Q as j,a8 as y}from"./-6Lls737.js";import{_ as q}from"./DnEzZ4vY.js";import{_ as z}from"./DiK78WlO.js";import{_ as F}from"./uJCw86W8.js";import{_ as G}from"./C9IHJtY7.js";import"./CiiYzqQD.js";import"./DSV61gAW.js";import"./DlAUqK2U.js";import"./DoVhiLtZ.js";import"./B5spvOTL.js";const J=["for"],Q={class:"flex-1"},H={class:"flex items-center gap-1"},K=["id","placeholder","value"],b=E({__name:"PriceInput",props:C(["label","placeholder"],{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(i){const n=N(i,"modelValue"),u=Math.floor(Math.random()*99999);return(p,c)=>(h(),V("label",{for:`price-input-${o(u)}`,class:"flex items-center w-full bg-x-grey-8 border border-x-grey-1 rounded-2xl p-5 cursor-text text-x-grey-7 text-sm"},[_("span",Q,T(i.label),1),_("span",H,[_("input",{id:`price-input-${o(u)}`,placeholder:i.placeholder,type:"text",value:n.value,class:"bg-transparent text-right focus:outline-none placeholder:text-x-grey-7 text-dark-grey w-[50px]",onInput:c[0]||(c[0]=t=>p.$emit("update:modelValue",t.target.value))},null,40,K),w(" € ")])],8,J))}}),W=R("prices",()=>{const i=v(null),n=v(null);async function u(){var t,l;i.value=(l=(t=await I(S.PRICES.TIME_SLOTS))==null?void 0:t.response)==null?void 0:l.results}async function p(){var t,l;n.value=(l=(t=await I(S.PRICES.GET_USER_PRICES))==null?void 0:t.response)==null?void 0:l.results}async function c(t){return await I(S.PRICES.UPDATE_USER_PRICES,{method:"put",body:t})}return{pricesTimesSlots:i,userPrices:n,fetchTimeSlots:u,fetchUsersPrices:p,updateUsersPrices:c}}),X={class:"container-sm md:py-6 max-md:p-0"},Y={class:"grid md:grid-cols-2 gap-4"},ie=E({__name:"prices",setup(i){const n=W(),{pricesTimesSlots:u,userPrices:p}=M(n),c=v(!1),{t}=k(),l=v([]);B(async()=>{await n.fetchTimeSlots(),await n.fetchUsersPrices(),$()});function $(){var a;l.value=[],(a=u.value)==null||a.forEach(s=>{const e=U(s.id),r={timeSlotId:s.id,slotName:s.name,priceIncall:(e==null?void 0:e.incall)??0,priceOutcall:(e==null?void 0:e.outcall)??0};l.value.push(r)})}function U(a){var s;return(s=p.value)==null?void 0:s.find(e=>e.prices_time_slot_id===a)}async function O(){c.value=!0;const a={prices:[]};l.value.forEach(e=>{a.prices.push({incall:e.priceIncall&&e.priceIncall>0?e.priceIncall:null,outcall:e.priceOutcall&&e.priceOutcall>0?e.priceOutcall:null,timeSlotId:e.timeSlotId})});const{error:s}=await n.updateUsersPrices(a);s?y.error():y.success(),await n.fetchUsersPrices(),c.value=!1}function x(a,s,e){if(!isNaN(a)&&a>0&&!a.includes(".")&&a.length<7)return!0;l.value[s][e]=null}return(a,s)=>{const e=L;return h(),P(e,{name:"account"},{default:d(()=>[f(o(q),{title:"Prices",description:"Please enter your rates below for incall and outcall visits"},{sidebar:d(()=>[f(o(z))]),actions:d(()=>[f(o(G),{variant:"outline",size:"sm",class:"max-md:w-full",onClick:A(O,["prevent"]),disabled:c.value,loading:c.value},{default:d(()=>[w(" Confirm Changes ")]),_:1},8,["disabled","loading"])]),default:d(()=>[_("div",X,[(h(!0),V(j,null,D(l.value,(r,g)=>(h(),P(o(F),{title:o(t)(`account.priceNames.${r.slotName}`),description:"Enter price for given hour",class:"md:mb-4"},{default:d(()=>[_("div",Y,[f(o(b),{onInput:m=>x(r.priceIncall,g,"priceIncall"),label:"Incall",placeholder:r.priceIncall,modelValue:r.priceIncall,"onUpdate:modelValue":m=>r.priceIncall=m},null,8,["onInput","placeholder","modelValue","onUpdate:modelValue"]),f(o(b),{onInput:m=>x(r.priceOutcall,g,"priceOutcall"),label:"Outcall",placeholder:r.priceOutcall,modelValue:r.priceOutcall,"onUpdate:modelValue":m=>r.priceOutcall=m},null,8,["onInput","placeholder","modelValue","onUpdate:modelValue"])])]),_:2},1032,["title"]))),256))])]),_:1})]),_:1})}}});
1export{ie 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.