PageSourceSearch

https://business.payda.app/assets/CorporateDiscounts-b771d9ca.js

js payda.app collected 2026-10-02 00:43:11 UTC 2,627 bytes, 1 lines download raw bytes

1import{k as b,b2 as S,bz as j,Q as v,aJ as f,u as C,j as t,m as y,b6 as E,b7 as P,b8 as T,b9 as I,ba as k,bv as L,B as i,ah as F,f as _,T as O,h as R,x as U}from"./index-a4b9e797.js";import{u as q,g as w}from"./index.esm-539edec9.js";import{c as A,D as B,C as G}from"./CorporateDiscountContracts-7e5e5912.js";import"./employees-c99f6762.js";import{L as Q}from"./LoadableButton-1bad7375.js";import{S as N}from"./Switch-c4d4290b.js";const W=()=>b(j,{refetchQueries:[{query:S}]}),z=({business:n})=>{const[s,u]=v.useState(n.isCorpDiscountEnabled),{enqueueSnackbar:r}=f(),{t:e}=C(),[c]=W(),a=q({initialValues:{corpDiscountPercent:n.corpDiscountPercent},validationSchema:A,onSubmit:async(o,{setSubmitting:h})=>{try{await c({variables:{corpDiscountEnabled:s,settings:o}}),r(e("profile.settings.corporativeDiscountSettings.notifications.settingsSaved"),{variant:"success"})}catch(D){console.log(D)}finally{h(!1)}}}),{values:l,errors:p,getFieldProps:d,submitForm:m,isSubmitting:x}=a,g=async()=>{if(u(o=>!o),l.corpDiscountPercent>0)try{await c({variables:{corpDiscountEnabled:!s}});const o=e(s?"profile.settings.corporativeDiscountSettings.notifications.discountDisabled":"profile.settings.corporativeDiscountSettings.notifications.discountEnabled");r(o,{variant:"success"})}catch(o){console.log(o)}};return t.jsx(w,{value:a,children:t.jsxs(y,{noGutter:!0,children:[t.jsx(E,{children:t.jsxs(P,{children:[t.jsx(T,{children:t.jsx(B,{})}),t.jsx(I,{primary:e("profile.settings.corporativeDiscountSettings.title"),secondary:e("profile.settings.corporativeDiscountSettings.hint")}),t.jsx(k,{children:t.jsx(N,{color:"secondary",checked:s,onChange:g})})]})}),t.jsx(L,{in:s,timeout:"auto",unmountOnExit:!0,children:t.jsxs(i,{children:[t.jsx(F,{}),t.jsxs(i,{pt:2,px:4,children:[t.jsx(_,{placeholder:e("profile.settings.corporativeDiscountSettings.corporativeDiscountPercent.placeholder"),label:e("profile.settings.corporativeDiscountSettings.corporativeDiscountPercent.label"),margin:"none",fullWidth:!0,type:"number",required:!0,...d("corpDiscountPercent"),error:!!p.corpDiscountPercent}),t.jsx(i,{mb:2,children:t.jsx(O,{variant:"caption",color:"textSecondary",children:e("profile.settings.corporativeDiscountSettings.corporativeDiscountPercent.helperText")})})]}),t.jsx(i,{p:2,textAlign:"right",children:t.jsx(Q,{loading:x,variant:"contained",color:"primary",onClick:m,children:e("common.save")})})]})})]})})},X=()=>{const{authStore:n}=R(),s=n.business;return s?t.jsx("div",{children:t.jsxs(U,{maxWidth:"md",children:[t.jsx(i,{mb:4,children:t.jsx(z,{business:s})}),t.jsx(i,{mb:4,children:t.jsx(G,{business:s})})]})}):null};export{X 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.