1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[628],{21297:function(e,t,n){"use strict";n.d(t,{yt:function(){return A},Nl:function(){return P}});var r,a,o=n(30168),i=n(15671),s=n(43144),c=n(60136),l=n(82963),u=n(61120),d=n(67294),p=n(11163),h=n(29323),f=n(58447),m=n(13324),_=n(51649),g=n(63750),x=n(42598),v=n(94184),y=n.n(v),b=n(85458),w=n(85893);function C(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,u.Z)(e);if(t){var a=(0,u.Z)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,l.Z)(this,n)}}var E=(0,h.f3)("store")(r=(0,h.Pi)(r=function(e){(0,c.Z)(n,e);var t=C(n);function n(){return(0,i.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=this.props.data_table.activePage;this.props.data_table&&this.props.data_table.data&&1===this.props.data_table.data.length&&t>1&&(t=Number(t)-1);var n=this.props.data_table.data,r={},a={label:"",sortType:""};for(var o in this.props.data_table.fields)r[o]=a,r[o].label=this.props.data_table.fields[o],r[o].sortType="";this.props.data_table.filteredData=n,this.props.data_table.sortColumn=r,this.props.data_table.activePage=t,this.forceUpdate()}},{key:"sortData",value:function(e){}},{key:"getTableHeader",value:function(){var e=this,t=[],n=function(n){var r=e.props.data_table.fields[n];t.push((0,w.jsx)("th",{onClick:function(){return e.sortData(n)},children:r},"thred-"+n))};for(var r in this.props.data_table.fields)n(r);return(0,w.jsx)("tr",{children:t})}},{key:"getTableBody",value:function(){var e=this;return this.props.data_table.filteredData&&0!==this.props.data_table.filteredData.length?this.props.data_table.filteredData.map((function(t,n){var r=[];for(var a in e.props.data_table.fields)if(["organization_admin","can_access_billing","can_request_consultation"].includes(a))r.push((0,w.jsx)("td",{children:(0,w.jsxs)("select",{id:a,className:"form-control form-control-sm "+e.props.select_class,onChange:function(t){e.props.handlePermissionsChange(n,e.props.data_table.data[n].id,e.props.data_table.data[n].name,t.target.id,t.target.value)},value:t[a],children:[(0,w.jsx)("option",{value:!0,children:"Yes"},!0),(0,w.jsx)("option",{value:!1,children:"No"},!1)]})},"tbody-row-"+n+"-col-"+a));else if(e.props.organization&&"delete"===a)e.props.data_table.data[n].email!==e.props.store.sessionData.userData.email?r.push((0,w.jsx)("td",{children:(0,w.jsx)("div",{className:"action-btn-danger clickable in-table trash-icon-button",onClick:function(){e.props.show_confirm_remove(e.props.data_table.data[n].email,e.props.data_table.data[n].name)},children:(0,w.jsx)(g.yvY,{})})},"tbody-row-"+n+"-col-delete")):r.push((0,w.jsx)("td",{},"tbody-row-"+n+"-col-delete"));else if(e.props.organization&&"img"===a)r.push((0,w.jsx)("td",{children:(0,w.jsx)("div",{className:"orgProfileImg",children:(0,w.jsx)(m.Img,{src:[t[a],"/assets/images/no-image.jpg"]})})},"tbody-row-"+n+"-col-delete"+a));else if(e.props.dashboard&&"display_status"===a)r.push((0,w.jsxs)("td",{className:"",children:[t[a]," ",(0,w.jsx)(_.w0i,{onClick:function(){e.props.getModalContent(t)},className:"clickable dahsboard-icon "+y()({"display-none":"Awaiting your response"!==t[a]})})]},"tbody-row-"+n+"-col-"+a));else if(e.props.dashboard&&"savings"===a)r.push((0,w.jsx)("td",{className:"",children:t[a]?(0,x.aZ)(t[a]):""},"tbody-row-"+n+"-col-"+a));else{var o=t[a];r.push((0,w.jsx)("td",{children:o},"tbody-row-"+n+"-col-"+a))}return(0,w.jsx)("tr",{children:r},"tbody-row-"+n)})):(0,w.jsx)("tr",{children:(0,w.jsx)("td",{className:"text-center",colSpan:this.props.data_table.colLength,children:"No Data Found"})})}},{key:"render",value:function(){var e=this,t=this.props.data_table&&this.props.data_table.activePage?this.props.data_table.activePage:this.props.active_page;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{className:"table-responsive admin-table-responsive",style:{margin:"10px 0"},children:(0,w.jsxs)("table",{className:"table admin-table",children:[(0,w.jsx)("thead",{className:"bg-primary text-white text-nowrap "+y()({"small-labels":this.props.small_labels}),children:this.getTableHeader()}),(0,w.jsx)("tbody",{className:this.props.table_class,children:this.getTableBody()})]})}),!this.props.organization&&(0,w.jsxs)(A,{style:{flex:"0 1 auto"},children:[(0,w.jsx)(P,{children:(0,w.jsx)(f.Z,{activePage:t,itemsCountPerPage:this.props.data_table.perPage,totalItemsCount:this.props.totalItemsCount,pageRangeDisplayed:this.props.data_table.pageRangeDisplayed,onChange:this.props.handlePageChange,prevPageText:"Prev",nextPageText:"Next",firstPageText:"First",lastPageText:"Last"})}),(0,w.jsxs)("div",{className:"form-inline",style:{padding:"10px"},children:["Page: ",this.props.currentDisplay()]}),(0,w.jsxs)("div",{className:"form-inline",children:[(0,w.jsx)("label",{className:"chalice-label",children:"Page size: \xa0 "}),(0,w.jsxs)("select",{className:"form-control form-control-sm",onChange:function(t){return e.props.handlePageSizeChange(t.target.value)},value:this.props.data_table.perPage,children:[(0,w.jsx)("option",{value:"10",children:"10"}),(0,w.jsx)("option",{value:"25",children:"25"}),(0,w.jsx)("option",{value:"50",children:"50"}),(0,w.jsx)("option",{value:"100",children:"100"}),(0,w.jsx)("option",{value:"500",children:"500"}),(0,w.jsx)("option",{value:"1000",children:"1000"})]})]})]})]})}}]),n}(d.Component))||r)||r;t.ZP=(0,p.withRouter)(E);var A=b.ZP.div.withConfig({displayName:"AdminDataTable__TableFooter",componentId:"sc-1r1znn1-0"})(["display:flex;flex-direction:row;justify-content:space-between;align-items:center;",""],(function(e){return e.theme.media.phone(a||(a=(0,o.Z)(["\n flex-direction: column;\n text-align: center;\n "])))})),P=b.ZP.div.withConfig({displayName:"AdminDataTable__PaginationWrapper",componentId:"sc-1r1znn1-1"})(["ul{display:inline-block;padding-left:0;margin:0;border-radius:4px;}li{display:inline;}.disabled > a,.disabled >
1 span{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd;line-height:1.42857143;}a,span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd;}"])},58972:function(e,t,n){"use strict";var r=n(45697),a=n.n(r),o={view:!0,add:!1,change:!1,delete:!1},i=function(e){try{var t=e.store.sessionData.userData;return 2===t.role_id?{view:!0,add:!0,change:!0,delete:!0}:(t.auth_user.groups[0].permissions.forEach((function(t){if(t.content_type.model===e.model){var n=t.codename;(n=n.split("_")[0])in o&&(o[n]=!0)}})),o)}catch(n){return{view:!0,add:!1,change:!1,delete:!1}}};i.propTypes={store:a().object,model:a().string},t.Z=i},20118:function(e,t,n){"use strict";var r=n(15861),a=n(87757),o=n.n(a),i=n(67294),s=n(11163),c=n(31171),l=n(29323),u=n(35689),d=n(10077),p=n(95310),h=n(17582),f=n(94768),m=n(75710),_=n(85893),g=function(e,t){var n=[{name:"Product Details",url:e?u.Z.UPDATE_PRODUCT_DETAILS(e):u.Z.NEW_PRODUCT,key:"details"},{name:"Product Description",url:u.Z.UPDATE_PRODUCT_DESCRIPTION(e),key:"description"},{name:"Product Actions",url:u.Z.UPDATE_PRODUCT_ACTIONS(e),key:"action"},{name:"Media",url:u.Z.PRODUCT_CAROUSEL_MEDIA(e),key:"carouselmedia"},{name:"FAQs",url:u.Z.FAQ_MGMT(e),key:"faq"},{name:"Reviews",url:u.Z.REVIEW_MGMT(e),key:"review"},{name:"Metadata",url:u.Z.PRODUCT_METADATA(e),key:"metadata"}];return t&&n.push({name:"Status",url:u.Z.PRODUCT_STATUS(e),key:"status"}),n},x=(0,l.f3)("store")((0,l.Pi)((function(e){var t=e.store,n=e.children,a=(0,i.useState)(!0),l=a[0],x=a[1],v=(0,s.useRouter)();function y(){return(y=(0,r.Z)(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,h.Z.post_v2(d.Z.API_ADMIN_CHECK_LINKED(v.query.id));case 3:t=e.sent,x(t.response),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}function b(){return w.apply(this,arguments)}function w(){return(w=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!confirm("Are you sure you want to delete this product?")){e.next=11;break}return e.prev=1,e.next=4,h.Z.delete_v2(d.Z.API_ADMIN_PRODUCT_DETAIL(v.query.id));case 4:200===e.sent.statusCode&&((0,c.Am)("Product successfully deleted"),v.push(u.Z.PRODUCT_MGNT)),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}return(0,i.useEffect)((function(){"add"!==v.query.id&&function(){y.apply(this,arguments)}()}),[v.query.id]),(0,_.jsx)(p.Z,{children:function(){var e=v.query.id,a=v.pathname;return(0,_.jsxs)("div",{className:"content-right-panel",children:[(0,_.jsxs)(f.H1,{children:["add"===e?"Add":"Edit"," Product","add"!==e&&(0,_.jsx)(f.m2,{collapse:!0,children:function(e){var t=e.close;return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(m.wg,{danger:!0,onClick:(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t(),e.next=3,b();case 3:case"end":return e.stop()}}),e)}))),children:"Remove Product"})})}})]}),(0,_.jsx)("ul",{className:"admin-tab-list",children:g(e,t.isSuperAdmin()).map((function(t,n){if(e||!(n>0)){var r=t.url;return"add"===e||l?void 0:(0,_.jsx)("li",{onClick:function(e){return function(e,t){e.preventDefault(),v.push(t)}(e,r)},className:"pr-none cwp-review-tab-main admin-tabs",children:(0,_.jsx)("div",{className:"profile-category-title center-tabs "+(-1!==a.indexOf(t.key)?"active-tab":""),children:t.name})},t.key)}}))}),(0,_.jsx)("div",{className:"right-con-box",children:(0,_.jsx)("div",{className:"tableContent",children:n})})]})}()})})));t.Z=x},51477:function(e,t,n){"use strict";n.d(t,{nx:function(){return l},bl:function(){return d},f3:function(){return p}});var r=n(4942),a=(n(67294),n(85458)),o=n(86893),i=n(85893);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=a.ZP.div.withConfig({displayName:"AdminActions__AdminActionRow",componentId:"sc-1mbs66-0"})(["display:flex;flex-direction:row;justify-content:center;align-items:center;float:right;& > button{border:"," solid 0;border-right-width:1px;&:last-child{border-width:0;}}"],(function(e){return e.theme.colors.lightGrey})),u=a.ZP.button.withConfig({displayName:"AdminActions__AdminAction",componentId:"sc-1mbs66-1"})(["background:transparent;border:0;padding:5px 20px;margin:0;svg{height:20px;width:20px;transition:all 0.25s;}&:hover{svg{transition:all 0.25s;transform:scale(1.2);}}"]),d=function(e){return(0,i.jsx)(u,c(c({},e),{},{children:(0,i.jsx)(o.IYd,{})}))},p=function(e){return(0,i.jsx)(u,c(c({},e),{},{children:(0,i.jsx)(o.Ybf,{})}))}},94768:function(e,t,n){"use strict";n.d(t,{bR:function(){return x},H1:function(){return v},H2:function(){return y},px:function(){return b},n2:function(){return w},kB:function(){return C},Xg:function(){return E},rC:function(){return A},xZ:function(){return P},m2:function(){return R},JA:function(){return O}});var r,a,o,i,s,c,l=n(30168),u=n(67294),d=n(85458),p=n(4251),h=n(63335),f=n(1852),m=n(536),_=(n(95339),n(86893)),g=n(85893),x=d.ZP.div.withConfig({displayName:"common__AdminPanel",componentId:"sc-py54hu-0"})(["max-width:1000px;margin:0 auto;padding-bottom:100px;"]),v=d.ZP.h1.withConfig({displayName:"common__H1",componentId:"sc-py54hu-1"})(["font-size:2rem;line-height:50px;display:flex;flex-direction:row;width:100%;justify-content:space-between;"," ",""],(function(e){return e.small&&(0,d.iv)(["font-size:1.5rem;"])}),(function(e){return e.theme.media.phone(r||(r=(0,l.Z)(["\n ","\n "])),(function(e){return e.mobileCenter&&(0,d.iv)(["text-align:center;justify-content:center;"])}))})),y=d.ZP.h2.withConfig({displayName:"common__H2",componentId:"sc-py54hu-2"})(["font-size:1.1rem;"]),b=d.ZP.div.withConfig({displayName:"common__AdminSplit",componentId:"sc-py54hu-3"})(["margin:40px auto;display:flex;flex-direction:row;padding-bottom:40px;border-bottom:#eee solid 2px;"," ",""],(function(e){return e.borderTop&&(0,d.iv)(["border-top:#eee solid 2px;padding-top:40px;"])}),(function(e){return e.theme.media.phone(a||(a=(0,l.Z)(["\n flex-direction: column;\n "])))})),w=d.ZP.div.withConfig({displayName:"common__AdminLeft",componentId:"sc-py54hu-4"})(["width:40%;padding-right:20px;",""],(function(e){return e.theme.media.phone(o||(o=(0,l.Z)(["\n width: 100%;\n padding-right: 0;\n "])))})),C=d.ZP.div.withConfig({displayName:"common__AdminRight",componentId:"sc-py54hu-5"})(["width:60%;",""],(function(e){return e.theme.media.phone(i||(i=(0,l.Z)(["\n width: 100%;\n "])))})),E=d.ZP.div.withConfig({displayName:"common__AdminCard",componentId:"sc-py54hu-6"})(["border-radius:10px;border:"," solid 2px;padding:20px;"],(function(e){return e.theme.colors.adminBorder})),A=d.ZP.div.withConfig({displayName:"common__AdminFilters",componentId:"sc-py54hu-7"})(["display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;width:100%;gap:20px;",""],(function(e){return e.theme.media.phone(s||(s=(0,l.Z)(["\n flex-wrap: nowrap;\n gap: 5px;\n "])))})),P=d.ZP.div.withConfig({displayName:"common__FilterColumn",componentId:"sc-py54hu-8"})(["display:flex;flex-direction:row;align-items:center;gap:20px;",""],(function(e){return e.theme.media.phone(c||(c=(0,l.Z)(["\n flex-wrap: wrap;\n width: 100%;\n "])))})),T=d.ZP.div.withConfig({displayName:"common__ButtonModal",componentId:"sc-py54hu-9"})(["display:flex;flex-direction:column;gap:20px;"]),N=d.ZP.button.withConfig({displayName:"common__MoreButton",componentId:"sc-py54hu-10"})(["border:0;background-color:",";color:#fff;font-size:0.9rem;display:flex;align-items:center;border-radius:10px;padding:2px 10px;line-height:inherit;&:hover{opacity:0.75;transition:all 0.25s;}svg{height:15px;width:15px;color:",";}"],(function(e){return e.theme.colors.adminBlue}),(function(e){return e.theme.colors.white})),D=d.ZP.button.withConfig({displayName:"common__CloseButton",componentId:"sc-py54hu-11"})(["background-color:transparent;border:0;position:absolute;top:20px;right:20px;svg{height:30px;width:30px;}"]),R=function(e){var t=e.collapse,n=void 0!==t&&t,r=e.children,a=(0,f.useMediaQuery)({query:"(max-width: 768px)"}),o=(0,u.useState)(!1),i=o[0],s=o[1],c=function(){return s(!0)},l=function(){return s(!1)},d=function(){return"function"===typeof r?r({open:c,close:l}):r};return a||n?(0,g.jsxs)("div",{children:[(0,g.jsxs)(N,{onClick:c,children:[!a&&"Actions"," \xa0 ",(0,g.jsx)(_.$Pu,{})]}),(0,g.jsx)(p.M,{children:i&&(0,g.jsx)(m.t9,{isOpen:i,onDismiss:l,style:{zIndex:100002},children:(0,g.jsxs)(I,{"aria-label":"Modal",initial:{bottom:-200},animate:{bottom:0},exit:{bottom:-200},children:[(0,g.jsx)(D,{onClick:l,children:(0,g.jsx)(_.q5L,{})}),(0,g.jsx)(T,{children:d()})]})})})]}):(0,g.jsx)(P,{children:d()})},j=(0,h.E)(m.cZ),I=(0,d.ZP)(j).withConfig({displayName:"common__DialogContentStyled",componentId:"sc-py54hu-12"})(["position:fixed;width:100vw;margin-bottom:0;padding:20px;bottom:0;overflow:hidden;box-shadow:rgba(0,0,0,0.15) 0px 15px 25px,rgba(0,0,0,0.05) 0px 5px 10px;display:flex;justify-content:center;"]),O=d.ZP.div.withConfig({displayName:"common__RightFullHeight",componentId:"sc-py54hu-13"})(["width:100%;height:100%;display:flex;flex-direction:column;flex:1 1 auto;"])},98338:function(e,t){"use strict";t.Z={CONFIRM_ALERT_DELETE_MSG:"Are you sure want to delete it?",CONFIRM_ALERT_RESET_PWD_MSG:"Are you sure want to reset password?",CONFIRM_ALERT_STOP_STRIPE_PAYMENT_MSG:"Are you sure want to stop stripe payment?",CONFIRM_ALERT_START_STRIPE_PAYMENT_MSG:"Are you sure want to start stripe payment?",CONFIRM_ALERT_SSO_MSG:"Are you sure want to activate it?",HTTP_ERROR_MSG_500:"Internal Server Error",PRODUCT_SUB_CANCEL_MSG:"Your subscription will end after 2 months",ALERT_MSG_SUB:"To access ChaliceFT products, you must first subscribe to a membership plan. Please click Ok, to go to the membership plan page where you will be able to personalize your membership plan",ALERT_MSG_SUB_ADD_PROD:"To access ChaliceFT products, you must first subscribe to access. Please click Ok, to go to the additional product page where you will be able to personalize your product",CONFIRM_ALERT_CANCEL_MSG:"Are you sure want to cancel product subscription?",CONFIRM_ALERT_RESUME_MSG:"Are you sure want to resume product subscription?",MSG_SUBSCRIPTION_READONLY_USER:"You are a read only user. You do not have a subscription.",MSG_SUBSCRIPTION_ADMIN:"You are an Administrator. You do not have a subscription.",CONFIRM_ALERT_DELETE_MEMBERSHIP_PLAN:"Are you sure want to delete this membership plan?",CONFIRM_ALERT_CANCEL_SUBSCRIPTION:"Do you want to cancel your subscription?",CONFIRM_SIGNUP_TOKEN:"Are you sure want to new signup token?",CONFIRM_DELETE_SSO_AUTH:"Are you sure want to delete this SSO authenticate?",CONFIRM_DELETE_RSS_FEED:"Are you sure want to delete this RSS feed?",CONFIRM_DELETE_ROLE:"Are you sure want to delete this Role?",CONFIRM_DELETE_PRODUCT_TAG:"Are you sure want to delete this product tag?",CONFIRM_DELETE_PRODUCT:"Are you sure want to delete this product?",CONFIRM_HIDE_PRODUCT:"Are you sure want to hide this product from exchange?",CONFIRM_SHOW_PRODUCT:"Are you sure want to show this product on exchange?",CONFIRM_DELETE_BANNER:"Are you sure want to delete this banner?",CONFIRM_DELETE_MEDIA:"Are you sure want to delete this media?",CONFIRM_DELETE_PARTNER:"Are you sure want to delete this partner?",CONFIRM_DELETE_PAGE:"Are you sure want to delete this page?",CONFIRM_DELETE_EVENT:"Are you sure want to delete this Event?",CONFIRM_DELETE_REVIEW:"Are you sure want to delete this Review?",CONFIRM_DELETE_SURVEY:"Are you sure want to delete this Survey Question?",CONFIRM_DELETE_FAQ:"Are you sure want to delete this FAQ?",CONFIRM_DELETE_LEAD:"Are you sure want to delete this Lead?"}},79871:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var r,a=n(67294),o=n(20118),i=n(15861),s=n(15671),c=n(43144),l=n(60136),u=n(82963),d=n(61120),p=n(87757),h=n.n(p),f=n(17582),m=n(11163),_=n(29323),g=n(10077),x=n(35689),v=n(98338),y=n(21297),b=n(80531),w=n(31171),C=n(58972),E=n(75710),A=n(94768),P=n(51477),T=n(85893);function N(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=(0,d.Z)(e);if(t){var a=(0,d.Z)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return(0,u.Z)(this,n)}}w.Am.configure();var D=(0,_.f3)("store")(r=(0,_.Pi)(r=function(e){(0,l.Z)(n,e);var t=N(n);function n(e){var r;return(0,s.Z)(this,n),(r=t.call(this,e)).getFaqs=function(){var e=(0,i.Z)(h().mark((function e(t){var n,a,o=arguments;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>1&&void 0!==o[1]?o[1]:1,e.prev=1,e.next=4,f.Z.get_v2(g.Z.API_ADMIN_PRODUCT_FAQ,{params:{size:r.state.page_size,page:n,product_id:t}}
1);case 4:return a=e.sent,e.abrupt("return",a);case 8:e.prev=8,e.t0=e.catch(1),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),r.deleteFaq=function(){var e=(0,i.Z)(h().mark((function e(t){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,f.Z.delete_v2(g.Z.API_ADMIN_PRODUCT_FAQ_DETAIL(t));case 3:if(200!==(n=e.sent).statusCode){e.next=10;break}return e.next=7,r.reload();case 7:(0,w.Am)("FAQ successfully deleted"),e.next=11;break;case 10:w.Am.error("Could not delete FAQ");case 11:return e.abrupt("return",n);case 14:e.prev=14,e.t0=e.catch(0),console.error(e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,14]])})));return function(t){return e.apply(this,arguments)}}(),r.reload=(0,i.Z)(h().mark((function e(){var t,n,a,o,i,s;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r.setState({loading:!0}),t=r.props.router.query.id,e.next=5,r.getFaqs(t,r.state.active_page);case 5:return n=e.sent,e.next=8,r.constructData(n.results);case 8:a=e.sent,o=n.next,i=n.prev,s=n.count,r.setState({data:a,next:o,prev:i,totalItemsCount:s},(function(){return r.setDataTableField(a)})),r.state.data_table.perPage=r.state.page_size,r.setState({loading:!1}),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(0),console.error(e.t0),w.Am.error("Error loading page");case 21:case"end":return e.stop()}}),e,null,[[0,17]])}))),r.componentDidMount=(0,i.Z)(h().mark((function e(){var t,n,a,o,i,s,c;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t=(0,C.Z)({store:r.props.store,model:"finproductfaqs"}),r.setState({permissions:t}),n=r.props.router.query.id,e.next=6,r.getFaqs(n);case 6:return a=e.sent,e.next=9,r.constructData(a.results);case 9:o=e.sent,i=a.next,s=a.prev,c=a.count,r.setState({data:o,next:i,prev:s,totalItemsCount:c},(function(){return r.setDataTableField(o)})),r.state.data_table.perPage=r.state.page_size,r.setState({loading:!1}),e.next=22;break;case 18:e.prev=18,e.t0=e.catch(0),console.error(e.t0),w.Am.error("Error loading page");case 22:case"end":return e.stop()}}),e,null,[[0,18]])}))),r.addFAQ=function(e){var t=x.Z.NEW_FAQ(r.props.router.query.id);r.props.router.push(t)},r.setDataTableField=function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r.state.page_size,n={data:e,fields:{when:"Generated on",question:"Question",action:""},perPage:t,colLength:4};r.setDataTable(n)},r.handlePageSizeChange=function(){var e=(0,i.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.setState({page_size:t},(0,i.Z)(h().mark((function e(){var n,a,o,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.props.match,a=n.params.product_id,e.next=4,r.getFaqs(a);case 4:return o=e.sent,e.next=7,r.constructData(o.results);case 7:i=e.sent,r.setState({data:i,filtered_data:i,totalItemsCount:o.count},(function(){r.setDataTableField(r.state.data,1,t)}));case 9:case"end":return e.stop()}}),e)}))));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r.handlePaginatorChange=function(){var e=(0,i.Z)(h().mark((function e(t){var n,a,o,i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.props.match,a=n.params.product_id,e.next=4,r.getFaqs(a,t);case 4:return o=e.sent,e.next=7,r.constructData(o.results);case 7:i=e.sent,r.setState({pageNumber:t,data:i,filtered_data:i,totalItemsCount:o.count},(function(){r.setDataTableField(r.state.data)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r.handlePageChange=function(){var e=(0,i.Z)(h().mark((function e(t){var n,a;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return window.scrollTo(0,0),e.prev=1,e.next=4,r.handlePaginatorChange(t);case 4:n=parseInt(t),(a=r.state.data_table).filteredData=a.data,a.activePage=n,r.setState({data_table:a,active_page:n}),r.forceUpdate(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),console.error(e.t0);case 15:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(t){return e.apply(this,arguments)}}(),r.currentDisplay=function(){var e=r.state.totalItemsCount,t=r.state.page_size,n=r.state.active_page,a=null;return a=e<t*n?e:t*n,"".concat(t*n-t," - ").concat(a," of ").concat(e)},r.state={page_size:10,next:null,prev:null,data_table:{},filtered_data:null,active_page:1,totalItemsCount:0,pageNumber:1,loading:!0,loading_data:!1,permissions:{}},r}
1return(0,c.Z)(n,[{key:"constructData",value:function(e){var t=this;this.state.permissions;try{var n=[];return e.map((function(e){var r={id:e.id,when:e.created_at,question:e.question,action:(0,T.jsxs)(P.nx,{children:[(0,T.jsx)(P.bl,{onClick:function(n){return t.editFAQMgnt(e.id,n)},children:"Edit"}),(0,T.jsx)(P.f3,{onClick:function(n){return t.deleteFAQMgnt(e.id,n)},children:"Delete"})]},e.id)};n.push(r)})),n}catch(r){console.error(r)}}},{key:"editFAQMgnt",value:function(e,t){this.props.store.clearFlashData(),this.props.router.push(x.Z.UPDATE_FAQ(this.props.router.query.id,e)),t.preventDefault()}},{key:"deleteFAQMgnt",value:function(e,t){window.confirm(v.Z.CONFIRM_DELETE_FAQ)&&this.deleteFaq(e),t.preventDefault()}},{key:"setDataTable",value:function(e){try{var t={};t.data=e.data,t.filteredData=[],t.fields=e.fields,t.colLength=e.colLength,t.perPage=e.perPage;var n=e.data,r={},a={label:"",sortType:""};for(var o in e.fields)r[o]=a,r[o].label=e.fields[o],r[o].sortType="";t.filteredData=n,t.totalItemsCount=this.state.totalItemsCount,t.sortColumn=r,t.activePage?this.setState({data_table:t,active_page:t.activePage}):this.setState({data_table:t})}catch(i){console.error(i)}}},{key:"dataTableChanged",value:function(e){this.setState({data_table:e})}},{key:"render",value:function(){return this.state.loading?(0,T.jsx)("div",{children:(0,T.jsx)(b.Z,{})}):(0,T.jsx)("div",{children:(0,T.jsxs)("div",{className:"content-right-panel",children:[(0,T.jsxs)(A.H1,{small:!0,children:["FAQ Management",(0,T.jsx)(A.m2,{children:(0,T.jsx)(E.wg,{onClick:this.addFAQ,children:"Add FAQ"})})]}),(0,T.jsx)("div",{className:"right-con-box",children:(0,T.jsx)("div",{className:"tableContent",children:(0,T.jsx)(y.ZP,{nextURL:this.state.next,prevURL:this.state.prev,totalItemsCount:this.state.totalItemsCount,handlePaginatorChange:this.handlePaginatorChange,handlePageSizeChange:this.handlePageSizeChange,dataTableChanged:this.dataTableChanged,data_table:this.state.data_table,active_page:this.state.active_page,handlePageChange:this.handlePageChange,currentDisplay:this.currentDisplay})})})]})})}}]),n}(a.Component))||r)||r,R=(0,m.withRouter)(D),j=function(e){return(0,T.jsx)(R,{})};j.Layout=o.Z;var I=j},28781:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/product/[id]/faq",function(){return n(79871)}])}},function(e){e.O(0,[9866,2013,8447,5310,9774,2888,179],(function(){return t=28781,e(e.s=t);var t}));var t=e.O();_N_E=t}]); 2//# sourceMappingURL=faq-608cf40fe7499fc96a9b.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.