%PDF- %PDF-
Direktori : /home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/ |
Current File : //home/forge/takeaseat.eco-n-tech.co.uk/.nuxt/dist/client/68864c5.js |
(window.webpackJsonp=window.webpackJsonp||[]).push([[43,5,8,21],{391:function(t,e,n){"use strict";n.r(e);var r=n(0),o=(n(3),{props:{slug:{type:String,required:!1,default:null}},computed:{progress:function(){return this.$store.state.account.progress.total}},mounted:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$store.dispatch("account/progress/get",{slug:t.slug});case 2:case"end":return e.stop()}}),e)})))()}}),l=n(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"relative z-20 max-w-md w-full mt-8 text-center"},[n("div",{staticClass:"w-full bg-black bg-opacity-25 h-1 rounded-lg overflow-hidden mb-6"},[n("div",{staticClass:"bg-white h-1 transition-width duration-500",style:"width:"+t.progress+"%"})]),t._v(" "),n("span",{staticClass:"uppercase text-lg"},[t._v(t._s(t.progress)+"% Complete")])])}),[],!1,null,null,null);e.default=component.exports},392:function(t,e,n){"use strict";n.r(e);var r=n(0),o=(n(3),n(14),{data:function(){return{menuOpen:!1,links:[{role:"therapist",name:"Profile",url:"/account"},{role:"therapist",name:"Availability",url:"/account/availability"},{role:"therapist",name:"Verification",url:"/account/verification"},{role:"all",name:"Financial",url:"/account/financial"},{role:"all",name:"Settings",url:"/account/settings"}]}},computed:{role:function(){return 1==this.$auth.loggedIn?this.$auth.user.data.role.name:"all"}},methods:{logout:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$auth.logout();case 2:case"end":return e.stop()}}),e)})))()}}}),l=n(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("nav",{staticClass:"relative"},[n("button",{staticClass:"flex md:hidden items-center justify-center w-full focus:outline-none",on:{click:function(e){t.menuOpen=!t.menuOpen}}},[n("div",{staticClass:"relative w-8"},[n("span",{staticClass:"block mb-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"rotate-45 translate-y-2":""}),t._v(" "),n("span",{staticClass:"block my-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"opacity-0":""}),t._v(" "),n("span",{staticClass:"block mt-1.5 h-1 w-full bg-black rounded transform transition duration-100",class:t.menuOpen?"-rotate-45 -translate-y-3":""})]),t._v(" "),n("span",{staticClass:"block ml-3 font-bold"},[t._v("Menu")])]),t._v(" "),n("div",{staticClass:"hidden md:flex flex-wrap items-center justify-center"},[t._l(t.links,(function(link,e){return n("div",{key:e},["all"==link.role||t.role==link.role?n("NuxtLink",{staticClass:"account-nav-link",attrs:{to:link.url}},[t._v(t._s(link.name))]):t._e()],1)})),t._v(" "),n("button",{staticClass:"account-nav-link",attrs:{type:"button"},on:{click:t.logout}},[t._v("Log Out")])],2),t._v(" "),1==t.menuOpen?n("div",{staticClass:"fixed z-40 top-0 left-0 w-full h-full",on:{click:function(e){t.menuOpen=!1}}}):t._e(),t._v(" "),1==t.menuOpen?n("div",{staticClass:"fixed z-50 bottom-0 left-0 w-full p-3 rounded-t-xl bg-white block overflow-hidden md:hidden"},[t._l(t.links,(function(link,e){return n("div",{key:e},["all"==link.role||t.role==link.role?n("NuxtLink",{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{to:link.url}},[t._v(t._s(link.name))]):t._e()],1)})),t._v(" "),n("button",{staticClass:"block w-full py-2 p-3 rounded-lg font-bold hover:bg-yellow",attrs:{type:"button"},on:{click:t.logout}},[t._v("Log Out")])],2):t._e()])}),[],!1,null,null,null);e.default=component.exports},396:function(t,e,n){var content=n(405);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(34).default)("5984fed3",content,!0,{sourceMap:!1})},400:function(t,e,n){t.exports=n.p+"img/icon-stripe.7b66af1.svg"},404:function(t,e,n){"use strict";n(396)},405:function(t,e,n){var r=n(33)((function(i){return i[1]}));r.push([t.i,".modal[data-v-7219ff7f]{padding-top:20vh}",""]),t.exports=r},407:function(t,e,n){"use strict";n.r(e);var r=n(0),o=(n(60),n(3),{props:{value:{required:!0}},data:function(){return{isActive:!1,working:!1,card:{},card_name:null}},computed:{setup_intent:function(){return this.$store.state.account.billing.setupIntent}},mounted:function(){var t=this.$stripe.elements();this.$store.dispatch("account/billing/setupIntent"),this.card=t.create("card",{style:{base:{fontSize:"15px",fontFamily:"Poppins, sans-serif"}}}),this.card.mount("#new-card-element")},methods:{closeModal:function(){this.$emit("input",!this.value)},submitForm:function(){var t=this;this.$refs.paymentForm.validate().then((function(e){e&&t.saveCard()}))},saveCard:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t.setup_intent){e.next=8;break}return t.working=!0,e.next=4,t.$stripe.confirmCardSetup(t.setup_intent,{payment_method:{card:t.card,billing_details:{name:t.card_name}}});case 4:n=e.sent,r=n.setupIntent,(o=n.error)?(t.$toast.error(o.message).goAway(3e3),t.$store.dispatch("account/billing/setupIntent"),t.working=!1):t.$store.dispatch("account/billing/savePaymentMethod",r.payment_method).then((function(){t.$store.dispatch("account/progress/get",{slug:"financial"}),t.$emit("input",!1),t.working=!1}));case 8:case"end":return e.stop()}}),e)})))()}},watch:{value:function(){var t=this;1==this.value?setTimeout((function(){t.isActive=!0}),100):setTimeout((function(){t.isActive=!1}),100)}}}),l=(n(404),n(10)),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{directives:[{name:"show",rawName:"v-show",value:1==t.value,expression:"value == true"}],staticClass:"modal fixed z-50 bottom-0 left-0 w-full h-screen"},[n("div",{staticClass:"absolute z-10 top-0 left-0 w-full h-full bg-black bg-opacity-25 cursor-pointer transition duration-100",class:1==t.isActive?"opacity-100":"opacity-0",on:{click:t.closeModal}}),t._v(" "),n("div",{staticClass:"relative z-20 h-full bg-white shadow-lg p-10 pt-16 transition transform duration-100",class:1==t.isActive?"translate-y-0 opacity-100":"translate-y-full opacity-0"},[n("button",{staticClass:"absolute top-6 right-10 uppercase hover:text-blue-light focus:outline-none transition",attrs:{type:"button"},on:{click:t.closeModal}},[t._v("Close")]),t._v(" "),n("div",{staticClass:"relative h-full bg-gray p-8 overflow-y-auto"},[n("div",{staticClass:"max-w-lg w-full mx-auto"},[n("h2",{staticClass:"mb-8 text-center text-4xl font-bold"},[t._v("Add new card")]),t._v(" "),n("ValidationObserver",{ref:"paymentForm"},[n("form",{attrs:{role:"form",method:"POST"},on:{submit:function(e){return e.preventDefault(),t.submitForm(e)}}},[n("ValidationProvider",{attrs:{rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[n("t-input-group",{attrs:{label:"Name on Card"}},[n("t-input",{attrs:{type:"text",placeholder:"Name on Card"},model:{value:t.card_name,callback:function(e){t.card_name=e},expression:"card_name"}}),t._v(" "),r[0]?n("span",{staticClass:"field-invalid"},[t._v(t._s(r[0]))]):t._e()],1)]}}])}),t._v(" "),n("t-input-group",{attrs:{label:"Card Information"}},[n("div",{staticClass:"px-4 py-4 bg-white border border-black border-opacity-20 rounded-xl",attrs:{id:"new-card-element"}})]),t._v(" "),n("div",{staticClass:"flex items-center justify-center px-10"},[n("button",{staticClass:"w-full btn btn-primary btn-small rounded-full",attrs:{disabled:1==t.working,type:"submit"}},[0==t.working?n("span",[t._v("Submit")]):n("span",{staticClass:"flex items-center justify-center"},[n("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[n("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),n("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),n("span",[t._v("Processing")])])])]),t._v(" "),n("p",{staticClass:"text-sm text-center mt-6 text-black text-opacity-75"},[t._v("By subscribing to Take a Seat you are agreeing to all site "),n("NuxtLink",{staticClass:"text-blue-light hover:underline",attrs:{to:"/terms-conditions",target:"_blank"}},[t._v("Terms and Conditions")]),t._v(". Please read carefully before continuing.")],1)],1)])],1)])])])}),[],!1,null,"7219ff7f",null);e.default=component.exports},428:function(t,e,n){"use strict";n.r(e);var r=n(0),o=(n(3),{data:function(){return{loading:!0,working:!1,is_complete:!1,showModal:!1}},mounted:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.$axios.$get("/stripe/account").then((function(e){t.loading=!1,t.is_complete=e,0==t.is_complete&&(t.showModal=!0)})).catch((function(e){t.loading=!1,t.$toast.error(e).goAway(3e3)}));case 2:case"end":return e.stop()}}),e)})))()},methods:{createStripeAccountLink:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.working=!0,e.next=3,t.$axios.$get("/stripe/account-link").then((function(t){window.location.href=t.url})).catch((function(e){t.$toast.error(e).goAway(3e3)}));case 3:case"end":return e.stop()}}),e)})))()},createStripeLoginLink:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.working=!0,e.next=3,t.$axios.$get("/stripe/login-link").then((function(t){window.location.href=t.url})).catch((function(e){t.$toast.error(e).goAway(3e3)}));case 3:case"end":return e.stop()}}),e)})))()}}}),l=n(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("Block",{attrs:{title:"Bank Details",description:"Manage your payouts on Stripe"}},[0==t.loading?r("div",[0==t.is_complete?r("div",{staticClass:"flex items-center justify-center"},[r("button",{staticClass:"btn btn-small btn-primary rounded-full",attrs:{type:"button"},on:{click:t.createStripeAccountLink}},[0==t.working?r("span",{staticClass:"flex items-center justify-center"},[t._v("Connect to "),r("img",{staticClass:"ml-1",attrs:{src:n(400),alt:"Stripe"}})]):r("span",{staticClass:"flex items-center justify-center"},[r("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),r("span",[t._v("Redirecting")])])])]):r("div",{staticClass:"flex items-center justify-center"},[r("button",{staticClass:"btn btn-small btn-primary rounded-full",attrs:{type:"button"},on:{click:t.createStripeLoginLink}},[0==t.working?r("span",{staticClass:"flex items-center justify-center"},[t._v("View "),r("img",{staticClass:"mx-1",attrs:{src:n(400),alt:"Stripe"}}),t._v(" Dashboard")]):r("span",{staticClass:"flex items-center justify-center"},[r("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),r("span",[t._v("Redirecting")])])]),t._v(" "),r("t-modal",{attrs:{header:"Setup your stripe account"},scopedSlots:t._u([{key:"footer",fn:function(){return[r("div",{staticClass:"flex justify-between"},[r("button",{staticClass:"btn btn-primary btn-small",attrs:{type:"button"},on:{click:function(e){t.showModal=!1}}},[t._v("Not Now")]),t._v(" "),r("button",{staticClass:"btn btn-primary btn-small",attrs:{type:"button"},on:{click:t.createStripeLoginLink}},[0==t.working?r("span",{staticClass:"flex items-center justify-center"},[t._v("Visit "),r("img",{staticClass:"mx-1",attrs:{src:n(400),alt:"Stripe"}})]):r("span",{staticClass:"flex items-center justify-center"},[r("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),r("span",[t._v("Redirecting")])])])])]},proxy:!0}],null,!1,28807270),model:{value:t.showModal,callback:function(e){t.showModal=e},expression:"showModal"}},[r("p",[t._v("You need to finish setting up your stripe account in order to recieve payments.")])])],1)]):r("div",{staticClass:"flex items-center justify-center"},[r("span",{staticClass:"flex items-center justify-center"},[r("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[r("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),r("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),r("span",[t._v("Fetching Stripe Account")])])])])}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{Block:n(377).default})},429:function(t,e,n){"use strict";n.r(e);var r=n(0),o=(n(3),{data:function(){return{modalOpen:!1,error:null,loading:!1,working:!1,isMakingPrimary:!1,isDeleting:!1,card:{},cardHolderName:null}},computed:{payment_methods:function(){return this.$store.state.account.billing.paymentMethods},default_payment_method:function(){return this.$store.state.account.billing.defaultPaymentMethod}},mounted:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.loading=!0,e.next=3,t.$store.dispatch("account/billing/getPaymentMethods").then((function(){t.loading=!1}));case 3:case"end":return e.stop()}}),e)})))()},methods:{removePaymentMethod:function(t){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.$store.dispatch("account/billing/deletePaymentMethod",{payment_method:t});case 2:case"end":return n.stop()}}),n)})))()},makeMethodPrimary:function(t){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.$store.dispatch("account/billing/makePrimary",{payment_method:t});case 2:case"end":return n.stop()}}),n)})))()}}}),l=n(10),component=Object(l.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("Block",{attrs:{title:"Saved Cards",description:"Manage your saved cards, these cards will be used any payments you make through the take a seat website"}},[1==t.loading?n("div",[n("span",{staticClass:"flex items-center justify-center mb-8"},[n("svg",{staticClass:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",attrs:{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"}},[n("circle",{staticClass:"opacity-25",attrs:{cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}}),t._v(" "),n("path",{staticClass:"opacity-75",attrs:{fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"}})]),t._v(" "),n("span",[t._v("Fetching Payment Methods")])])]):0==t.loading&&t.payment_methods.length?n("div",{staticClass:"grid grid-cols-1 gap-y-3 mb-10"},t._l(t.payment_methods,(function(e,r){return n("div",{key:r},[n("div",{staticClass:"relative grid grid-cols-3 bg-white border border-black border-opacity-10 pl-6 pr-8 py-4 rounded-lg"},[n("span",[t._v(t._s(e.billing_details.name))]),t._v(" "),n("span",{staticClass:"flex items-center justify-center"},[n("span",{staticClass:"font-medium mr-1"},[t._v("Last 4:")]),t._v(t._s(e.card.last4))]),t._v(" "),n("span",{staticClass:"flex items-center justify-end"},[n("span",{staticClass:"font-medium mr-1"},[t._v("Expiry:")]),t._v(t._s(e.card.exp_month)+"/"+t._s(e.card.exp_year))])]),t._v(" "),n("div",{staticClass:"pt-2 px-3 flex items-center justify-end"},[e.id!==t.default_payment_method.id?n("button",{staticClass:"ml-3 uppercase text-xs text-blue-light",attrs:{type:"button"},on:{click:function(n){return t.makeMethodPrimary(e.id)}}},[0==t.isMakingPrimary?n("span",[t._v("Make Primary")]):n("span",[t._v("Processing...")])]):t._e(),t._v(" "),e.id!==t.default_payment_method.id?n("button",{staticClass:"ml-3 uppercase text-xs text-red text-opacity-80",attrs:{type:"button"},on:{click:function(n){return t.removePaymentMethod(e.id)}}},[0==t.isDeleting?n("span",[t._v("Remove")]):n("span",[t._v("Processing...")])]):t._e()])])})),0):n("div",{staticClass:"text-center mb-10"},[n("p",{staticClass:"text-md font-bold"},[t._v("You have no cards yet")])]),t._v(" "),n("div",{staticClass:"flex items-center justify-center"},[n("button",{staticClass:"btn btn-primary btn-small rounded-full",on:{click:function(e){t.modalOpen=!t.modalOpen}}},[t._v("Add a new card")])]),t._v(" "),n("NewCardModal",{model:{value:t.modalOpen,callback:function(e){t.modalOpen=e},expression:"modalOpen"}})],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{NewCardModal:n(407).default,Block:n(377).default})},484:function(t,e,n){"use strict";n.r(e);n(14);var r={middleware:"auth",head:function(){return{titleTemplate:"Financial | %s"}},computed:{is_therapist:function(){return"therapist"==this.$auth.user.data.role.name},setup_intent:function(){return this.$store.state.account.billing.setupIntent},payment_methods:function(){return this.$store.state.account.billing.paymentMethods},default_payment_method:function(){return this.$store.state.account.billing.defaultPaymentMethod}}},o=n(10),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"page-wrapper"},[r("PageHeader",{attrs:{classObject:"bg-pink"}},[r("img",{staticClass:"relative z-20 mb-8",attrs:{src:n(135),alt:"Takeaseat"}}),t._v(" "),r("span",{staticClass:"font-bold uppercase text-xl"},[t._v("Account")]),t._v(" "),r("h1",{staticClass:"relative z-20 text-5xl lg:text-7xl font-bold m-0"},[t._v("Financial")]),t._v(" "),r("AccountProgressBar",{attrs:{slug:"financial"}}),t._v(" "),r("div",{staticClass:"page-header-bottom"},[r("AccountNav")],1)],1),t._v(" "),t.is_therapist?r("AccountSubscription"):t._e(),t._v(" "),t.is_therapist?r("AccountPayouts"):t._e(),t._v(" "),r("SavedCards")],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{AccountProgressBar:n(391).default,AccountNav:n(392).default,PageHeader:n(212).default,AccountSubscription:n(467).default,AccountPayouts:n(428).default,SavedCards:n(429).default})}}]);