PageSourceSearch

https://www.billgist.com/static/js/799.398039aa.chunk.js

js billgist.com collected 2026-10-03 21:01:51 UTC 7,857 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkclient=self.webpackChunkclient||[]).push([[799],{2799:function(e,n,t){t.r(n),t.d(n,{default:function(){return N}});var r=t(4165),s=t(5861),a=t(4942),i=t(1413),c=t(9439),o=t(2791),u=t(5954),l=t(7258),d=t(9513),m=t.n(d),h=t(6681),p=(t(8639),t(2426)),x=t.n(p),f=t(6674),g=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){var t,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n,e.next=3,(0,f.Z)("add-credits",{method:"POST",body:t});case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){var t,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n,e.next=3,(0,f.Z)("remove-credits",{method:"POST",body:t});case 3:return s=e.sent,e.abrupt("return",s);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Z=t(9806),b=t(1632),v=t(2867),w=t(3927),y=t(184),N=function(){var e=(0,o.useContext)(l.S).data,n=(0,o.useState)(null),t=(0,c.Z)(n,2),d=t[0],p=t[1],f=(0,o.useState)(!1),N=(0,c.Z)(f,2),_=N[0],k=N[1],S=(0,o.useState)(!1),C=(0,c.Z)(S,2),D=C[0],I=C[1],A=(0,o.useState)(""),O=(0,c.Z)(A,2),R=O[0],U=O[1],P=(0,o.useRef)(),q=(0,v.N)(e.item_id,{enabled:Boolean(e.item_id),onError:function(e){var n=e.message;return U(n)},onSuccess:function(e){e.integrationOptions.length&&W(e.integrationOptions[0])}}),E=q.data,T=void 0===E?{}:E,B=T.integrations,L=T.integrationOptions,M=q.isPending,Y=(0,o.useState)(""),z=(0,c.Z)(Y,2),F=z[0],G=z[1],J=(0,o.useState)({amountRemaining:"",amountUsed:"",expirationDate:"",integrationID:""}),X=(0,c.Z)(J,2),$=X[0],H=X[1],K=$.amountRemaining,V=$.amountUsed,W=function(e){G(e),H((0,i.Z)((0,i.Z)({},$),{},(0,a.Z)({},"integrationID",F)))},Q=function(e){var n=e.target,t=n.name,r=n.value;H((0,i.Z)((0,i.Z)({},$),{},(0,a.Z)({},t,r)))},ee=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.preventDefault(),I(!1),!$){e.next=14;break}return e.prev=3,e.next=6,g($);case 6:k(!0),H({amountRemaining:"",amountUsed:"",expirationDate:""}),G(""),P.current.select.clearValue(),p(null),e.next=14;break;case 10:e.prev=10,e.t0=e.catch(3),I(!0),U(e.t0.message);case 14:case"end":return e.stop()}}),e,null,[[3,10]])})));return function(n){return e.apply(this,arguments)}}(),ne=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!1),!n){e.next=12;break}return e.prev=2,e.next=5,j(n);case 5:k(!0),e.next=12;break;case 8:e.prev=8,e.t0=e.catch(2),I(!0),U(e.t0.message);case 12:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(n){return e.apply(this,arguments)}}();return(0,y.jsxs)("section",{className:"container py-4",children:[_&&(0,y.jsx)(u.sU,{className:"text-center",color:"success",children:"Credits data updated Successfully."}),D&&(0,y.jsx)(u.sU,{className:"text-center",color:"danger",children:R}),(0,y.jsxs)(u.JX,{className:"col-sm-12 col-md-6 offset-md-4",children:[(0,y.jsx)("h3",{className:"pb-3 font-avenir-bold",children:"Credits Data"}),(0,y.jsxs)("p",{children:["This feature allows you to keep an eye on your credits data. Based on your credits data we will notify you when your remaining credits are less than 10% or expired.",(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),"Go to AWS Billing Credits Console by clicking"," ",(0,y.jsx)("a",{href:"https://console.aws.amazon.com/billing/home#/credits",rel:"noreferrer",target:"_blank",children:"here"})," ","and insert your credits data in the form below."]}),(0,y.jsxs)(u.l0,{onSubmit:ee,children:[(0,y.jsxs)(u.cw,{className:"mb-4",children:[(0,y.jsx)(u.__,{className:"fw-bold col-lg-4 ps-0 ms-md-1",children:"Expiration Date"}),(0,y.jsx)(m(),{selected:d,startDate:d,onChange:function(e){p(e),H((0,i.Z)((0,i.Z)({},$),{},(0,a.Z)({},"expirationDate",x()(e).format("MM-DD-YYYY"))))},dateFormat:"MM/dd/yyyy",wrapperClassName:"d-block",className:"form-control col-lg-6",popperPlacement:"bottom-start",required:!0})]}),(0,y.jsxs)(u.cw,{className:"mb-4",children:[(0,y.jsx)(u.__,{className:"fw-bold col-lg-4 ps-0 ms-md-1",children:"Amount Used"}),(0,y.jsx)(u.II,{className:"col-lg-6",type:"number",name:"amountUsed",value:V,onChange:Q,required:!0})]}),(0,y.jsxs)(u.cw,{className:"mb-4",children:[(0,y.jsx)(u.__,{className:"fw-bold col-lg-4 ps-0 ms-md-1",children:"Amount Rermaining"}),(0,y.jsx)(u.II,{className:"col-lg-6",type:"number",name:"amountRemaining",value:K,onChange:Q,required:!0})]}),(0,y.jsxs)(u.cw,{className:"mb-4",children:[(0,y.jsx)(u.__,{className:"fw-bold col-lg-4 ps-0 ms-md-1",children:"Select Integration"}),(0,y.jsx)(u.JX,{className:"col-lg-7",children:(0,y.jsx)(h.ZP,{className:"select-integration",placeholder:"Select Integration",isLoading:M,onChange:W,options:L,ref:P})})]}),(0,y.jsx)(u.zx,{type:"submit",color:"primary",size:"md",className:"text-white",children:"Add Credit Data"})]})]}),(0,y.jsx)("div",{className:" justify-content-center px-1",children:(0,y.jsx)("div",{children:(0,y.jsxs)(u.iA,{className:"mt-5 px-1 integration-table",children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{className:"font-avenir-bold",children:[(0,y.jsx)("th",{children:"Expiration Date"}),(0,y.jsx)("th",{children:"Amount Used"}),(0,y.jsx)("th",{children:"Amount Remaining"}),(0,y.jsx)("th",{children:"Integration"}),(0,y.jsx)("th",{})]})}),(0,y.jsx)("tbody",{children:B?B.map((function(e){return(0,y.jsx)("tr",{children:e&&e.credits&&(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("td",{children:e.credits.expirationDate}),(0,y.jsxs)("td",{children:["$ ",e.credits.amountUsed]}),(0,y.jsxs)("td",{children:["$ ",e.credits.amountRemaining]}),(0,y.jsx)("td",{children:e.name}),(0,y.jsx)("td",{children:(0,y.jsxs)(u.OB,{direction:"left",className:"align-self-end",children:[(0,y.jsx)(u.Z_,{color:"light",className:"py-1 px-2 bg-transparent border-0",children:(0,y.jsx)(Z.G,{icon:b.cNd})}),(0,y.jsx)(u.h_,{className:"mt-4 shadow-sm",children:(0,y.jsxs)(u.hP,{onClick:function(){return ne(e.item_id)},children:[(0,y.jsx)(Z.G,{icon:b.I7k})," Remove credits"]})})]})})]})},e.item_id)})):(0,y.jsx)("tr",{children:(0,y.jsx)("td",{colSpan:"5",className:"text-center",children:(0,y.jsx)(w.Z,{show:M})})})})]})})})]})}},5417:function(e,n,t){t.d(n,{Z:function(){return o}});var r=t(4165),s=t(5861),a=t(3144),i=t(5671),c=t(6674),o=(0,a.Z)((function e(){(0,i.Z)(this,e)}));o.create=function(e){return(0,c.Z)("aws-integrations",{method:"POST",body:e})},o.query=function(e){return(0,c.Z)("aws-integrations?user_id=".concat(e))},o.getIntegrationsAndOptionsList=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){var t,s;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,o.query(n);case 2:return t=e.sent,s=t.map((function(e){return{value:e.item_id,label:e.name}})),e.abrupt("return",{integrations:t,integrationOptions:s});case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),o.update=function(e){return(0,c.Z)("aws-integrations",{method:"PATCH",body:e})},o.delete=function(e){return(0,c.Z)("aws-integrations?item_id=".concat(e),{method:"DELETE"})},o.get_total_number_of_integrations=function(){var e=(0,s.Z)((0,r.Z)().mark((function e(n){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.Z)("get-total-number-of-integrations?user_id=".concat(n)));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},2867:function(e,n,t){t.d(n,{N:function(){return i}});var r=t(1413),s=t(7137),a=t(5417),i=function(e,n){return(0,s.a)((0,r.Z)({queryKey:["aws-integrations",e],queryFn:function(){return a.Z.getIntegrationsAndOptionsList(e)}},n))}}}]);
2//# sourceMappingURL=799.398039aa.chunk.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.