PageSourceSearch

https://ng-app.pulsepro.ai/static/js/6868.dd8a39d8.chunk.js

js pulsepro.ai collected 2026-10-04 15:26:44 UTC 15,380 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkpulse=globalThis.webpackChunkpulse||[]).push([[6868],{93997(e,s,n){n.d(s,{A:()=>c});var l=n(9950),i=n(10080),t=n(2815),a=n(48738),r=n.n(a),o=n(44414);const c=e=>{let{children:s,className:n="",iconRight:a=null}=e;const{width:c}=(0,t.A)(),[d,u]=(0,l.useState)(!1),m=(0,l.useRef)(Math.floor(1e5*Math.random()));return(0,l.useEffect)(()=>{const e=document.querySelector(`#table-text-tooltip-${m.current}`);e&&e.clientWidth<e.scrollWidth?u(!0):u(!1)},[c]),(0,o.jsx)("div",{className:"w-100 d-flex gap-1",children:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("p",{id:`table-text-tooltip-${m.current}`,className:r()(n,"text-dark text-truncate m-0"),style:{maxWidth:"fit-content"},children:s}),d&&(0,o.jsx)(i.A,{target:`table-text-tooltip-${m.current}`,placement:"right",children:s}),a]}):"--"})}},96868(e,s,n){n.r(s),n.d(s,{default:()=>V});var l=n(25045),i=n.n(l),t=n(9950),a=n(62391),r=n(16673),o=n(8081),c=n(10877),d=n(59335),u=n(84084),m=n(88156),h=n(61295),x=n(98277),p=n(95071),v=n(20928),g=n(14171),f=n(66771),j=n(97917),b=n(44383),y=n(48738),N=n.n(y),_=n(87537),A=n(68119),w=n(93997),k=n(44414);const U=()=>{const[e,s]=(0,t.useState)(!1),[n,l]=(0,t.useState)([]);(0,t.useEffect)(()=>{(async()=>{try{s(!0);const e=await(0,g.ZiW)();l((null===e||void 0===e?void 0:e.invoices)||[])}catch(e){console.error({error:e})}finally{s(!1)}})()},[]);const i=[{name:"S. No.",selector:(e,s)=>s+1,maxWidth:"5rem"},{name:"Invoice ID",selector:e=>e.invoice_id,cell:e=>(0,k.jsx)(w.A,{className:"fs-15",children:e.invoice_id})},{name:"Month",selector:e=>e.month+e.year,cell:e=>(0,k.jsxs)(w.A,{className:"mx-auto fs-15",children:[e.month,", ",e.year]}),center:!0},{name:"Amount",selector:e=>e.amount,cell:e=>e.amount?(0,k.jsxs)("span",{className:"fs-15",children:[e.currency," ",Number(e.amount).toFixed(2)]}):"--",center:!0},{name:"Status",selector:e=>e.invoice_status,cell:e=>{var s;return(0,k.jsx)("span",{className:N()("badge fs-14 text-capitalize","paid"===(null===(s=e.invoice_status)||void 0===s?void 0:s.toLowerCase())?"text-bg-success":"text-bg-ddanger"),children:e.invoice_status})},center:!0},{name:"Link",cell:e=>e.invoice_pdf?(0,k.jsx)("a",{target:"_blank",rel:"noreferrer",href:e.invoice_pdf,className:"btn btn-link",children:"View PDF"}):"--",center:!0,maxWidth:"8rem"}];return(0,k.jsxs)(u.A,{children:[(0,k.jsx)(_.A,{children:(0,k.jsx)("h4",{className:"m-0",children:"Invoices"})}),(0,k.jsx)(m.A,{children:(0,k.jsx)(A.A,{data:n,columns:i,progressPending:e,pagination:!0,paginationPerPage:10,paginationRowsPerPageOptions:[10,20,30,50]})})]})};var O=n(65604),S=n(97202),C=n(61340),Y=n(39708),F=n(97176),P=n(46114),M=n(79969),D=n(91646),I=n(83452),T=n(65488),$=n(31531);const E=e=>{let{subscriptionExists:s=!1}=e;const[n,l]=(0,t.useState)(!0),[i,a]=(0,t.useState)([]),[r,o]=(0,t.useState)(!1),c=(0,t.useCallback)(async()=>{try{l(!0);const e=await(0,g.J5M)();a(e)}catch(e){console.error({error:e})}finally{setTimeout(()=>{l(!1)},1e3)}},[]);return(0,t.useEffect)(()=>{c()},[c]),n||s?(0,k.jsxs)(u.A,{children:[(0,k.jsx)(_.A,{children:(0,k.jsx)("h4",{className:"fs-5 mb-0",children:"Payment Methods"})}),(0,k.jsxs)(m.A,{className:"d-flex flex-column gap-2",children:[n?(0,k.jsx)("p",{className:"placeholder-glow m-0",children:(0,k.jsx)("span",{className:"placeholder col-12 rounded",style:{height:"85px"}})}):(0,k.jsx)(k.Fragment,{children:i.length?i.map(e=>(0,k.jsx)(u.A,{className:"mb-0 shadow-lg",children:(0,k.jsx)(m.A,{className:"d-flex gap-3",children:"card"===e.type?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)("i",{className:"ri-bank-card-line fs-2"}),(0,k.jsxs)("p",{className:"d-flex flex-column gap-1 fs-5 mb-0",children:[(0,k.jsxs)("span",{children:["Card ending in"," ",(0,k.jsx)("strong",{className:"fw-bold",children:e.last4})]}),(0,k.jsx)("span",{className:"fs-16 text-muted text-capitalize",children:e.brand})]})]}):(0,k.jsxs)("p",{children:["Bank: ",e.bank_name]})})},e.id)):(0,k.jsx)("p",{className:"text-muted fs-4 m-0 p-2",children:"Please add a new payment method."})}
1),n?(0,k.jsx)("p",{className:"placeholder-glow mb-0 mt-2",children:(0,k.jsx)("span",{className:"placeholder col-2 rounded",style:{height:"35px"}})}):(0,k.jsx)("div",{className:"w-100 mt-2",children:(0,k.jsx)(p.A,{type:"button",color:"dark",icon:"ri-settings-6-line",className:"mx-auto",onClick:async()=>{try{o(!0);const e=await(0,g.WTo)();e?window.open(e,"_self"):(0,h.A)(f.gN)}catch(n){var e,s;console.error({error:n}),(0,h.A)(null===n||void 0===n||null===(e=n.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message)}finally{o(!1)}},isLoading:r,children:"Update"})})]})]}):null},L=[{label:"Yearly",value:"per year"},{label:"Monthly",value:"per month"}],W=(0,S.c)("pk_live_51JAAgmGsVHwuxkpI6sshNqrEuIs68N0yWsB1zUiVfVk4b1zrMf6ZQgpdhX1mCUXynrdwUtXsDwhYThkSDtRbXHNF00l36EwKeQ"),q=e=>{let{isOpen:s=!1,toggle:n=j.lQ,billingForm:l=null,userCount:i=1,licenseCharges:t=18,onUpdate:a=j.lQ,isLoading:r=!1}=e;return(0,k.jsxs)(o.A,{isOpen:s,toggle:n,keyboard:!r,backdrop:r?"static":"",centered:!0,children:[(0,k.jsx)(C.A,{tag:"h4",children:(0,k.jsx)("span",{className:"fs-3",children:"Update Subscription"})}),(0,k.jsxs)(c.A,{children:[(0,k.jsxs)("div",{className:"fs-5",children:[i!==l.noOfUsers&&(0,k.jsxs)(k.Fragment,{children:["You've changed number of users from ",i," to"," ",l.noOfUsers,"."," "]}),"Your updated billing amount will be"," ",(0,k.jsx)("strong",{className:"fw-bold",children:"per year"===l.interval?(0,k.jsxs)(k.Fragment,{children:["$",t,"/year."]}):(0,k.jsxs)(k.Fragment,{children:["$",t,"/month."]})})]}),(0,k.jsxs)("div",{className:"d-flex justify-content-end gap-2 mt-3",children:[(0,k.jsx)(p.A,{type:"button",color:"light",icon:"ri-close-circle-line",onClick:n,disabled:r,children:"Close"}),(0,k.jsx)(p.A,{type:"button",color:"dark",icon:"ri-checkbox-circle-line",onClick:a,isLoading:r,children:"Update"})]})]})]})},B=e=>{var s,n;let{isLoading:l=!1,subscriptionInfo:i,pricingPlanDetails:a,refetchData:r=j.lQ}=e;const[o,c]=(0,t.useState)({noOfUsers:1,interval:"per year"}),[d,x]=(0,t.useState)(!1),[v,f]=(0,t.useState)(!1),b=((null===i||void 0===i?void 0:i.min_quantity)<(null===i||void 0===i?void 0:i.user_count)?null===i||void 0===i?void 0:i.user_count:null===i||void 0===i?void 0:i.min_quantity)||1,y=Number("per year"===(null===o||void 0===o?void 0:o.interval)?(null===o||void 0===o?void 0:o.noOfUsers)*(null===a||void 0===a||null===(s=a.amount_yearly)||void 0===s?void 0:s.amount)*12:(null===o||void 0===o?void 0:o.noOfUsers)*(null===a||void 0===a||null===(n=a.amount_monthly)||void 0===n?void 0:n.amount)).toFixed(2),N=(null===i||void 0===i?void 0:i.subscription_exists)&&(b===+o.noOfUsers||!o.noOfUsers)&&(null===i||void 0===i?void 0:i.interval)===o.interval,A=()=>{d||f(e=>!e)};return(0,t.useEffect)(()=>{c({noOfUsers:b,interval:(null===i||void 0===i?void 0:i.interval)||"per year"})},[i,b]),(0,k.jsxs)(u.A,{className:"mt-2",children:[(0,k.jsx)(q,{isOpen:v,toggle:A,userCount:b,billingForm:o,licenseCharges:y,onUpdate:async()=>{try{x(!0);const e=await(0,g.nV9)(o.noOfUsers,{id:i.plan_id});(0,h.A)(null===e||void 0===e?void 0:e.message,!0),r(),A()}catch(n){var e,s;console.error({error:n}),(0,h.A)(null===n||void 0===n||null===(e=n.response)||void 0===e||null===(s=e.data)||void 0===s?void 0:s.message)}finally{x(!1)}},isLoading:d}),(0,k.jsx)(_.A,{children:(0,k.jsx)("h4",{className:"m-0",children:"Subscription Details"})}),(0,k.jsxs)(m.A,{children:[(0,k.jsx)(Y.A,{onSubmit:async e=>{e.preventDefault(),i.subscription_exists?A():(async()=>{try{var e,s;x(!0);const n=await(0,g.fwv)("per year"===o.interval?null===a||void 0===a||null===(e=a.amount_yearly)||void 0===e?void 0:e.id:null===a||void 0===a||null===(s=a.amount_monthly)||void 0===s?void 0:s.id,o.noOfUsers),l=await W,{error:i}=await l.redirectToCheckout({sessionId:n});i&&(0,h.A)(i.message)}catch(i){var n,l;console.error({error:i}),(0,h.A)(null===i||void 0===i||null===(n=i.response)||void 0===n||null===(l=n.data)||void 0===l?void 0:l.message)}finally{x(!1)}})()},noValidate:!0,children:(0,k.jsx)(F.A,{className:"justify-content-center",children:(0,k.jsx)(P.A,{sm:8,md:10,children:l?(0,k.jsx)("p",{className:"placeholder-glow",children:(0,k.jsx)("span",{className:"placeholder col-12 rounded",style:{height:"125px"}})}):(0,k.jsx)(u.A,{className:"shadow-lg",children:(0,k.jsxs)(m.A,{children:[(0,k.jsxs)(F.A,{className:"align-items-center",children:[(0,k.jsx)(P.A,{md:4,children:(0,k.jsxs)(M.A,{className:"d-flex flex-column align-items-center",children:[(0,k.jsx)(D.A,{className:"fs-5 fw-semibold mx-auto mb-3",children:"Number of Users"}),(0,k.jsxs)("div",{className:"d-flex align-items-center gap-3",children:[(0,k.jsx)(I.A,{type:"button",color:"dark",className:"p-1 rounded-circle lh-1",onClick:()=>{1!==o.noOfUsers&&c(e=>({...e,noOfUsers:e.noOfUsers-1}))},disabled:1===+o.noOfUsers||!o.noOfUsers,children:(0,k.jsx)("i",{className:"ri-subtract-line fs-4"})}),(0,k.jsx)(T.A,{type:"number",style:{maxWidth:"75px"},className:"text-center",value:o.noOfUsers,onChange:e=>{c(s=>({...s,noOfUsers:e.target.value}))},onBlur:e=>{e.target.value||c(e=>({...e,noOfUsers:i.user_count}))},min:1,max:100}),(0,k.jsx)(I.A,{type:"button",color:"dark",className:"p-1 rounded-circle lh-1",onClick:()=>{c(e=>({...e,noOfUsers:e.noOfUsers+1}))},disabled:!o.noOfUsers,children:(0,k.jsx)("i",{className:"ri-add-line fs-4"})})]})]})}),(0,k.jsx)(P.A,{md:4,children:(0,k.jsxs)(M.A,{className:"w-100",children:[(0,k.jsx)(D.A,{className:"fs-5 fw-semibold mb-3",children:"Billing Cycle"}),(0,k.jsx)($.Ay,{value:L.find(e=>e.value===o.interval),options:L,onChange:e=>{c(s=>({...s,interval:e.value}))},min:1,max:50,isDisabled:null===i||void 0===i?void 0:i.subscription_exists})]})}),(0,k.jsx)(P.A,{md:4,children:(0,k.jsx)(p.A,{type:"submit",color:"dark",icon:"ri-checkbox-circle-line",className:"w-100 mt-3",isLoading:d&&!v,disabled:N,children:null!==i&&void 0!==i&&i.subscription_exists?"Update Subscription":"Subscribe Now"})})]}),(0,k.jsx)("div",{className:"text-center my-2",children:(0,k.jsxs)("p",{className:"fs-4 text-muted m-0",children:["Total Cost:"," ",(0,k.jsx)("strong",{className:"fw-bold",children:"per year"===(null===o||void 0===o?void 0:o.interval)?`$${y}/year`:`$${y}/month`})]})})]})})})})}),(0,k.jsx)(F.A,{className:"justify-content-center",children:(0,k.jsx)(P.A,{sm:8,md:10,children:(0,k.jsx)(O.Elements,{stripe:W,children:(0,k.jsx)(E,{subscriptionExists:null===i||void 0===i?void 0:i.subscription_exists})})})})]})]})},Q=e=>{let{isOpen:s=!1,toggle:n=j.lQ}=e;return(0,k.jsx)(o.A,{isOpen:s,toggle:n,centered:!0,children:(0,k.jsxs)(c.A,{children:[(0,k.jsxs)("div",{className:"mt-2 text-center",children:[(0,k.jsx)("lord-icon",{src:"https://cdn.lordicon.com/f
1kmafinl.json",trigger:"loop",delay:"500",state:"in-reveal",style:{width:"200px",height:"200px"}}),(0,k.jsxs)("div",{className:"mt-2 pt-2 fs-15 mx-2",children:[(0,k.jsx)("h4",{className:"fs-3",children:"Congratulations \ud83e\udd73"}),(0,k.jsxs)("p",{className:"text-muted fs-5 mx-4 mb-0",children:["Your payment is complete, and you are now subscribed to our"," ",(0,k.jsx)("strong",{className:"fw-semibold text-dark",children:"Pro"})," plan. Thank you for choosing us!"]})]})]}),(0,k.jsx)("div",{className:"d-flex justify-content-center mt-4 mb-2",children:(0,k.jsx)(p.A,{type:"button",color:"light",icon:"ri-checkbox-circle-line",onClick:n,children:"Close"})})]})})},V=()=>{const e=(0,r.W6)(),s=(0,a.wA)(),[n]=(0,v.A)(),l=n.get("payment_status"),{user:o}=(0,a.d4)(e=>({user:e.Login.user})),c=(0,a.d4)(e=>e.permissions.userPermissions),[p,j]=(0,t.useState)(!0),[y,N]=(0,t.useState)(null),[_,A]=(0,t.useState)(null),[w,O]=(0,t.useState)(!1),[S,C]=(0,t.useState)(!1),Y=(null===y||void 0===y?void 0:y.min_quantity)<(null===y||void 0===y?void 0:y.user_count)?null===y||void 0===y?void 0:y.user_count:null===y||void 0===y?void 0:y.min_quantity,F=async()=>{try{j(!0);const e=await(0,g._MI)();if(N(e),"success"===l&&e.subscription_exists){const e={...JSON.parse(localStorage.getItem("user")),is_trialing:!1,subscription_exists:!0,trial_remaining_days:null,trial_ends:null};localStorage.setItem("user",JSON.stringify(e));const{access_token:n,refresh_token:l,...i}=e;s((0,b.Ne)(i)),C(!0)}}catch(t){var n,i;(0,h.A)((null===t||void 0===t||null===(n=t.response)||void 0===n||null===(i=n.data)||void 0===i?void 0:i.message)||f.gN),e.replace("/home-page"),console.error({error:t})}finally{j(!1)}},P=async()=>{try{const e=await(0,g.snT)();O(e)}catch(e){console.error({error:e})}};return(0,t.useEffect)(()=>{null!==c&&void 0!==c&&c.manage_org_profile?(F(),(async()=>{try{const e={period:null},s=await(0,g.bYI)(e);A(s)}catch(e){console.error({error:e})}})(),P()):((0,h.A)(f.RN),e.replace("/home-page"))},[e,null===c||void 0===c?void 0:c.manage_org_profile]),document.title="Billing | Pulse - Smart Checklists, Inspections and Audits",(0,k.jsxs)("div",{className:"page-content",children:[(0,k.jsx)(Q,{isOpen:S,toggle:()=>{C(!1),e.replace("/billing")}}),(0,k.jsxs)(d.A,{fluid:!0,children:[(0,k.jsx)(x.A,{title:"Billing"}),(0,k.jsx)(u.A,{className:"mt-2",children:(0,k.jsx)(m.A,{children:p?(0,k.jsxs)("p",{className:"placeholder-glow m-0",children:[(0,k.jsx)("span",{className:"placeholder col-12 rounded fs-5 mb-2"}),(0,k.jsx)("span",{className:"placeholder col-4 rounded fs-5 mb-2"})]}):(0,k.jsx)(k.Fragment,{children:null!==y&&void 0!==y&&y.subscription_exists&&null!==y&&void 0!==y&&y.is_enterprise_customer?(0,k.jsxs)("p",{className:"fs-5 m-0",children:["Thank you for being a valued enterprise client. As per the terms of your agreement, your billing will be processed via invoicing rather than through our payment gateway. Please refer to the payment terms outlined in your contract. If you have any questions or need further assistance with your invoice, please don't hesitate to contact our billing team at"," ",(0,k.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),"."]}):null!==y&&void 0!==y&&y.subscription_exists?(0,k.jsxs)("p",{className:"fs-5 m-0",children:["You are subscribed to the"," ",(0,k.jsx)("strong",{children:y.plan_name})," plan, which includes"," ",(0,k.jsx)("strong",{className:"fw-semibold",children:Y})," users."," ",w.next_invoice_date&&(0,k.jsxs)(k.Fragment,{children:["Your next invoice is due on"," ",(0,k.jsx)("strong",{className:"fw-semibold",children:w.next_invoice_date?i()(w.next_invoice_date).format("Do MMMM, YYYY"):"TBD"})," ","for a total amount of"," ",(0,k.jsx)("strong",{className:"fw-semibold",children:w.upcoming_invoice_amount_due?`$${(w.upcoming_invoice_amount_due/100).toFixed(2)}`:"NA"}),"."]})]}):null!==y&&void 0!==y&&y.is_trialing?(0,k.jsxs)("p",{className:"fs-5 m-0",children:["You are currently not subscribed. Your 14-day trial will end on"," ",(0,k.jsx)("strong",{className:"fw-semibold",children:i()(null===y||void 0===y?void 0:y.trial_ends).format("Do MMM, YYYY")}),". Please click on"," ",(0,k.jsx)("strong",{className:"fw-semibold",children:"Subscribe Now"})," ","button to subscribe."]}):(0,k.jsxs)("p",{className:"fs-5 m-0",children:["Your 14-day trial period has ended. Please click on"," ",(0,k.jsx)("strong",{children:"Subscribe Now"})," button to continue using our services."]})})})}),!(null!==y&&void 0!==y&&y.is_enterprise_customer)&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(B,{isLoading:p,subscriptionInfo:y,pricingPlanDetails:_,refetchData:()=>{F(),P()}}),(null===y||void 0===y?void 0:y.subscription_exists)&&(0,k.jsx)(U,{})]})]})]})}}}]);

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.