1(function(){try{var M=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},h=new M.Error().stack;h&&(M._sentryDebugIds=M._sentryDebugIds||{},M._sentryDebugIds[h]="69d63b4d-6729-402b-953e-67fe4c89603e",M._sentryDebugIdIdentifier="sentry-dbid-69d63b4d-6729-402b-953e-67fe4c89603e")}catch{}})(),(self.webpackChunkelopage_web_apps=self.webpackChunkelopage_web_apps||[]).push([[10281],{7590:(M,h,t)=>{t.r(h),t.d(h,{AdminNotes:()=>g,default:()=>F});var e=t(86070),c=t(30758),b=t(75146),O=t(98713),m=t(94636),B=t(2424),C=t(901),P=t(83815),y=t(87849),N=t(10618),I=t(37544),U=t(2667),W=t(2100),R=t(98535),S=t(29938),A=t(42499);const j=[{label:"id",sortingKey:"id"},{label:"message",sortingKey:"message"},{label:"notable id",sortingKey:"notable_id"},{label:"notable type",sortingKey:"notable_type"},{label:"reporter id",sortingKey:"reporter_id"},{label:"created",sortingKey:"created_at"},{label:"actions"}],T=[{label:"id",sortingKey:"id"},{label:"message",sortingKey:"message"},{label:"notable id",sortingKey:"notable_id"},{label:"notable type",sortingKey:"notable_type"},{label:"reporter id",sortingKey:"reporter_id"},{label:"created",sortingKey:"created_at"}],u=(0,S.ar)(T),g=(0,m.PA)(({itemStore:E,hideTopbar:K})=>{const[_,x]=(0,c.useState)(!1),[i,o]=(0,c.useState)(""),{adminNotesStore:a}=(0,A.v$)(),n=(0,b.W6)();(0,c.useEffect)(()=>{if(a.setHistory(n),E&&E.item?.id){const{id:f}=E.item||{},L=E.storeKey;a.handleScopeChange("notableId",f),a.handleScopeChange("notableType",L)}return a.fetchList(),()=>{a.resetData()}},[]);const s=(0,c.useCallback)(f=>{o(f)},[]),l=(0,c.useCallback)(()=>{x(!_)},[_]),d=(0,c.useCallback)(f=>{a.deleteItem(f).then(()=>a.fetchList())},[]),r=(0,c.useCallback)(()=>{const f=E.storeKey;a.createItem({notableId:E.item.id,notableType:f,message:i}).then(()=>{o(""),a.fetchFullList()})},[i]),v=(0,c.useCallback)(f=>f.map(L=>{const{id:D,message:H,notableId:$,notableType:w,reporterId:V,createdAt:X}=L,G=[{show:!0,content:"Delete",action:()=>d(D),useConfirmation:!0}];return(0,e.jsxs)("tr",{children:[(0,e.jsx)("td",{className:"elo-table__title",children:D}),(0,e.jsx)("td",{children:H}),(0,e.jsx)("td",{children:$}),(0,e.jsx)("td",{children:w}),(0,e.jsx)("td",{children:(0,e.jsx)(O.N_,{to:`/admin/users/${V}`,children:V})}),(0,e.jsx)("td",{children:(0,C.r6)(X)}),(0,e.jsx)("td",{children:(0,e.jsx)(P.Vb,{id:D,menuItems:G})})]},(0,B.s)(D.toString(),$))}),[]),p=(0,c.useMemo)(()=>(0,R.oL)([],!0),[]);return(0,e.jsxs)(c.Fragment,{children:[!K&&(0,e.jsx)("div",{className:"topbar",children:(0,e.jsx)("h2",{className:"float-left",children:"Admin Notes"})}),(0,e.jsxs)("div",{className:"content",children:[(0,e.jsx)("div",{className:"white-widget",children:(0,e.jsxs)(I.A,{initStore:a,filtersList:["createdAt"],csvParams:j,headerKeys:u,csvConfig:"/admin/admin_notes.csv",withSavedFilters:!0,children:[(0,e.jsx)(I.A.Head,{children:(0,e.jsx)(U.A,{list:j,store:a})}),(0,e.jsx)(I.A.Body,{children:v(a.list||[])})]})}),E&&(0,e.jsx)("div",{"data-testId":"container-add-new-comment",className:"elo-btn-container elo-btn-container--right",children:(0,e.jsx)(y.P,{onClick:l,"data-test-id":!0,children:"Add new comment"})})]}),(0,e.jsx)(W.A,{isOpen:_,title:"Create new comment",submit:r,toggle:l,children:(0,e.jsx)(N.t,{value:i,onChange:s,fontFamilyList:p})})]})}),F=g},10618:(M,h,t)=>{t.d(h,{t:()=>e.t});var e=t(20549)},20549:(M,h,t)=>{t.d(h,{t:()=>x});var e=t(86070),c=t(30758),b=t(94636),O=t(2736),m=t.n(O),B=t(97500),C=t.n(B),P=t(59394),y=t(15292),N=t.n(y),I=t(18975
1),U=t(57812),W=t(37958),R=t(98535),S=t(83829),A=Object.defineProperty,j=Object.getOwnPropertyDescriptor,T=(i,o,a)=>o in i?A(i,o,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[o]=a,u=(i,o,a,n)=>{for(var s=n>1?void 0:n?j(o,a):o,l=i.length-1,d;l>=0;l--)(d=i[l])&&(s=(n?d(o,a,s):d(s))||s);return n&&s&&A(o,a,s),s},g=(i,o,a)=>T(i,typeof o!="symbol"?o+"":o,a);const F=N()(()=>Promise.all([t.e(23882),t.e(77605)]).then(t.bind(t,77605)),{ssr:!1}),E={name:m().string,value:m().string,onChange:m().func,onBlur:m().func,className:m().string,label:m().string,placeholder:m().string,disabled:m().bool,fontFamilyList:m().shape({}),pluginsArrayDisable:m().arrayOf(m().oneOfType([m().element,m().string]))},K={disabled:!1,fontFamilyList:{},pluginsArrayDisable:[]};let _=class extends c.Component{constructor(i){super(i),g(this,"textIsInvalid",!1),g(this,"showEditor",!1),g(this,"setValidity",o=>{this.textIsInvalid=o}),g(this,"toggleShowEditor",o=>{this.showEditor=o||!this.showEditor}),(0,P.Gn)(this)}componentDidMount(){const{value:i,withSwitcher:o}=this.props;(i||!o)&&this.toggleShowEditor(!0)}componentDidUpdate(){const{isInvalid:i,validateOnUpdate:o}=this.props;o&&this.textIsInvalid!==i&&this.setValidity(i)}render(){const{value:i,name:o,className:a,label:n,isInvalid:s,errorMessage:l,onChange:d,tooltipId:r,disabled:v,required:p,fontFamilyList:f,withSwitcher:L,I18n:D,...H}=this.props,$=C()("field text-editor-field",{"field--disabled":v,"field--required":p,"text-editor-field--error":this.textIsInvalid},a),w=C()("field__label",{"field__label--no-margin":L&&!this.showEditor}),V={invoice_setup_additional_info:D.t("react.cabinet.help_icon.invoice_setup_additional_info.content"),default_page_settings_description:D.t("react.cabinet.help_icon.default_page_settings_description.content"),cancellation_term_checkout_text:D.t("react.cabinet.help_icon.cancellation_term_checkout_text.content"),cancellation_term_description:D.t("react.cabinet.help_icon.cancellation_term_description.content"),mobile_app_in_app_view_content:D.t("react.cabinet.help_icon.mobile_app_in_app_view_content.content")};return(0,e.jsxs)("div",{className:$,onBlur:()=>this.setValidity(s),children:[n&&(0,e.jsxs)("label",{className:w,htmlFor:o,children:[L&&(0,e.jsx)(U.R,{id:`${r}_labelsEnabled`,handleChange:()=>{this.showEditor&&d(""),this.toggleShowEditor()},checked:this.showEditor,className:"elo-toggle--without-margins"}),(0,e.jsx)("span",{children:n}),r&&(0,e.jsx)(I.I,{id:`${r}_popover`,body:V[r]})]}),this.textIsInvalid&&(0,e.jsxs)("div",{className:"field__error",children:[l,(0,e.jsx)("i",{className:"fas fa-exclamation-circle"})]}),this.showEditor&&(0,e.jsx)(F,{id:o||"text-editor",tag:"textarea",model:H.type===S.LU.rich?(0,R.d9)(i):i,onModelChange:d,fontFamilyList:f,...H})]})}};u([P.sH],_.prototype,"textIsInvalid",2),u([P.sH],_.prototype,"showEditor",2),u([P.XI],_.prototype,"setValidity",2),u([P.XI],_.prototype,"toggleShowEditor",2),_=u([b.PA],_),_.displayName="TextEditorField",_.propTypes=E,_.defaultProps=K;const x=i=>{const o=(0,W.s9)();return(0,e.jsx)(_,{I18n:o,...i})}},25917:(M,h,t)=>{t.r(h),t.d(h,{default:()=>a});var e=t(86070),c=t(30758),b=t(75146),O=t(94636),m=t(59394),B=t(30212),C=t(69680),P=t(39360),y=t(62608),N=t(7590),I=t(98713),U=t(40711),W=t(40134),R=t(35226),S=Object.defineProperty,A=Object.getOwnPropertyDescriptor,j=(n,s,l,d)=>{for(var r=d>1?void 0:d?A(s,l):s,v=n.length-1,p;v>=0;v--)(p=n[v])&&(r=(d?p(s,l,r):p(r))||r);return d&&r&&S(s,l,r),r};let T=class extends c.Component{componentDidMount(){const{match:{params:{id:n}},creditMemosStore:s}=this.props;s.fetchItem(n)}render(){const{match:{params:{id:n}},creditMemosStore:{item:s,fetchItem:l}}=this.props,{token:d}=s;return(0,e.jsxs)("div",{className:"row",children:[(0,e.jsx)("div",{className:"col-6",children:(0,e.jsx)(U.A,{LinkComponent:I.N_,item:(0,W.ap)(s),action:l})}),(0,e.jsx)("div",{className:"col-6",children:(0,e.jsxs)("dl",{className:"row",children:[(0,e.jsx)("dt",{className:"col-sm-3",children:"Credit memo pdf:"}),(0,e.jsx)("dd",{className:"col-sm-9",children:(0,e.jsx)("a",{href:(0,R.ww)(`/common/credit_memos/${n}.pdf`,{token:d}),target:"_blank",children:`/common/credit_memos/${n}.pdf?toke=${d}`})})]})})]})}};T=j([b.y,(0,O.WQ)("creditMemosStore"),O.PA],T);const u=T;var g=Object.defineProperty,F=Object.getOwnPropertyDescriptor,E=(n,s,l)=>s in n?g(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l,K=(n,s,l,d)=>{for(var r=d>1?void 0:d?F(s,l):s,v=n.length-1,p;v>=0;v--)(p=n[v])&&(r=(d?p(s,l,r):p(r))||r);return d&&r&&g(s,l,r),r},_=(n,s,l)=>E(n,typeof s!="symbol"?s+"":s,l);const x={...y.K,details:"details"},i=[{key:x.details,label:"Details"},y.f.adminNotes];let o=class extends c.Component{constructor(n){super(n),_(this,"activeTab",x.details),_(this,"toggleActiveTab",s=>{const{creditMemosStore:l}=this.props;this.activeTab=s,l.handleScopeChange("tab",this.activeTab)}),_(this,"getActiveTab",()=>{const{creditMemosStore:s}=this.props;switch(this.activeTab){case x.details:return(0,e.jsx)(u,{});case x.adminNotes:return(0,e.jsx)(N.AdminNotes,{itemStore:s,hideTopbar:!0})}}),(0,m.Gn)(this)}componentWillUnmount(){const{creditMemosStore:n}=this.props;n.resetData()}render(){const{creditMemosStore:n,history:{location:{hash:s}}}=this.props;return(0,e.jsxs)(c.Fragment,{children:[(0,e.jsx)(B.A,{title:"Credit memo",backUrl:"/admin/credit_memos"}),(0,e.jsx)("div",{className:"content",children:(0,e.jsxs)("div",{className:"white-widget",children:[(0,e.jsx)(P.A,{locationHash:s,tabs:i,activeTab:this.activeTab,setActiveTab:this.toggleActiveTab,withHash:!0}),this.getActiveTab()]})}),n.loading&&(0,e.jsx)(C.lL,{})]})}};K([m.sH],o.prototype,"activeTab",2),o=K([b.y,(0,O.WQ)("creditMemosStore"),O.PA],o);const a=o},62608:(M,h,t)=>{t.d(h,{K:()=>e,f:()=>c});const e={notifications:"notifications",adminNotes:"admin_notes",history:"history"},c={adminNotes:{key:e.adminNotes,label:"Notes"},history:{key:e.history,label:"History"}}}}]); 2 3//# sourceMappingURL=10281.9e3c9ab36f5a15ca672c.js.map
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.