PageSourceSearch

https://app.smartdialog.ai/assets/AdBanServiceNew-CubhrzU7.js

js smartdialog.ai collected 2026-10-05 12:39:40 UTC 5,465 bytes, 1 lines download raw bytes

1import{b as G,q as W,d as U,c$ as j,a2 as L,p as _,bK as S,R as e,a4 as z,bP as b,r as D,y as w,E as p,U as E,bZ as K,bY as Z,c6 as J,be as Q,b4 as V,b5 as X,b6 as ee,b7 as r,w as te,A as ae,G as k,N as A,O as f,c9 as I,bG as i,gH as ne,b8 as se,bx as le,P as ce,ai as v}from"./index-CpcUj6vn.js";import{R as re}from"./RoutedStepper-B2K1ef8A.js";import"./Stepper-DOnYgvt3.js";const s=te({root:{borderBottom:"none"}})(se),ie=S(t=>({lastTableRow:{border:"0"},select:{minWidth:"40%"},root:{width:"100%"},button:{marginRight:t.spacing(1)},completed:{display:"inline-block"},instructions:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},helper:{color:"#546e7a",margin:"0",fontSize:"12px",marginTop:"3px",textAlign:"left",fontFamily:"Rajdhani",fontWeight:"400",lineHeight:"13px",letterSpacing:"0.33px"}})),oe=()=>({defaultSender:"",dlrUrl:"",endDate:null,messagingAccountId:"",name:"",serviceState:"Active",startDate:new Date,serviceConfiguration:{responseMessages:{}},hiddenContent:!1}),me=()=>{const t=G(),C=W(),{customerId:d,serviceId:T}=U(),{showInfo:B}=j(),{error:x,success:R}=L(),{messagingAccounts:o}=_(a=>a.messagingAccounts),c=ie(),h=!!T,[P,y]=e.useState(!1),[n,m]=e.useState({...oe(),customerId:d});e.useEffect(()=>{n.messagingAccountId===""&&o?.[0]?.id&&m(a=>({...a,messagingAccountId:o?.[0]?.id}))},[o,n.messagingAccountId]);const{loading:N,mutate:H}=z(a=>({method:"POST",endpoint:"/messaging/services/adban",body:a})),Y=async()=>{y(!0);const{error:a,errorMessages:l,payload:F}=await H({...n});a?(y(!1),x(l)):(R("Opt-out service created successfully"),t(ne(n)),await t(i(!1)),C.push(`/${d}/management/optoutservices/${F}/info`))},g=a=>{const l={...n,[a.target.name]:a.target.value};m(l),t(i(!0))},M=a=>{const l={...n,startDate:a._d};m(l),t(i(!0))},O=a=>{const l={...n,endDate:a._d};m(l),t(i(!0))},$=async()=>{await t(i(!1)),C.push(`/${d}/management/optoutservices`)},q=N;let u=!1;return(h===!1||h&&n?.id!==void 0)&&(u=!0),e.createElement("div",{className:c.container},q?e.createElement(b,null):e.createElement(D.Suspense,{fallback:e.createElement(b,null)},e.createElement(w,{container:!0,direction:"row",justifyContent:"flex-end",alignItems:"center",className:c.toolbar},e.createElement(w,{item:!0,className:c.gridItem},e.createElement(p,{"aria-label":"info",onClick:B},e.createElement(E,{title:"Info"},e.createElement(K,null))),e.createElement(p,{"aria-label":"cancel",onClick:$},e.createElement(E,{title:"Cancel"},e.createElement(Z,null))),e.createElement(p,{"aria-label":"save",onClick:Y,disabled:P},e.createElement(E,{title:"Save changes"},e.createElement(J,null))))),e.createElement(Q,null),u?e.createElement(V,null,e.createElement(X,{xs:6,sm:3},e.createElement("colgroup",null,e.createElement("col",{width:"20%"}),e.createElement("col",{width:"80%"})),e.createElement(ee,null,e.createElement(r,{key:"name"},e.createElement(s,{align:"left"},"Service name (*)"),e.createElement(s,{align:"left"},e.createElement(ae,{name:"name",onChange:g,value:n?.name,className:c.select}))),e.createElement(r,{key:"servicestate"},e.createElement(s,{align:"left"},"Service state"),e.createElement(s,{align:"left"},e.createElement(k,{className:c.formControl},e.createElement(A,{id:"state-select",value:n?.serviceState,onChange:g,name:"serviceState"},e.createElement(f,{value:"Active"},"Active"),e.createElement(f,{value:"Passive"},"Passive"))))),e.createElement(r,{key:"messagingaccount"},e.createElement(s,{align:"left"},"Messaging account"),e.createElement(s,{align:"left"},e.createElement(k,{className:c.formControl},e.createElement(A,{id:"messaging-account-select",onChange:g,name:"messagingAccountId",value:n?.messagingAccountId},o?.map(a=>e.createElement(f,{key:a.id,value:a.id},a.name)))))),e.createElement(r,{key:"startdate"},e.createElement(s,{align:"left"},"Start date (*)"),e.createElement(s,{align:"left"},e.createElement(I,{autoOk:!0,hideTabs:!0,ampm:!1,value:n?.startDate,onChange:M,name:"startDate",format:"D.M.YYYY HH.mm"}))),e.createElement(r,{key:"enddate"},e.createElement(s,{align:"left"},"End date"),e.createElement(s,{align:"left"},e.createElement(I,{autoOk:!0,hideTabs:!0,ampm:!1,value:n?.endDate,onChange:O,name:"endDate",format:"D.M.YYYY HH.mm"})))))):null))},de=S(t=>({lastTableRow:{border:"0"},card:{width:"100%",marginBottom:t.spacing(2)},select:{minWidth:"40%"},root:{width:"100%"},button:{marginRight:t.spacing(1)},completed:{display:"inline-block"},instructions:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},stepperContainer:{padding:t.spacing(2)},stepperControllersContainer:{paddingTop:t.spacing(4)}}
1)),ge=()=>{const t=de();return e.createElement(D.Suspense,{fallback:e.createElement(b,null)},e.createElement(le,{className:t.card},e.createElement("div",{className:t.root},e.createElement(re,{steps:[{title:"Basic Settings",path:"/basicsettings",component:me},{title:"Advanced Settings",path:"/advancedsettings",disabled:!0,component:()=>e.createElement("div",null,"Advanced Setings")}]}))))};S(t=>({contentContainer:{width:"100%",padding:t.spacing(2)},gridItem:{margin:t.spacing(1)},toggleContainer:{margin:t.spacing(2,0)},formControl:{margin:t.spacing(1),minWidth:120},appBar:{backgroundColor:"#fff"},panelContainer:{flexGrow:1,width:"100%",padding:t.spacing(0),paddingTop:t.spacing(3)},panel:{width:"100%",margin:t.spacing(0),padding:t.spacing(0)}}));v.node,v.any.isRequired,v.any.isRequired;const fe=()=>e.createElement(ce,{title:"Opt-out service new"},e.createElement("div",null,e.createElement(ge,null)));export{fe 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.