1(self.webpackChunkyoopies=self.webpackChunkyoopies||[]).push([[780,5417,12087,58209,81312],{75189:function(t){var e=/^(attrs|props|on|nativeOn|class|style|hook)$/;function a(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}}t.exports=function(t){return t.reduce(function(t,r){var s,i,o,n,l;for(o in r)if(s=t[o],i=r[o],s&&e.test(o))if("class"===o&&("string"==typeof s&&(l=s,t[o]=s={},s[l]=!0),"string"==typeof i&&(l=i,r[o]=i={},i[l]=!0)),"on"===o||"nativeOn"===o||"hook"===o)for(n in i)s[n]=a(s[n],i[n]);else if(Array.isArray(s))t[o]=s.concat(i);else if(Array.isArray(i))t[o]=[s].concat(i);else for(n in i)s[n]=i[n];else t[o]=r[o];return t},{})}},48381:function(t,e,a){"use strict";var r=a(56333),s=a(9776);e.A=(t=0,e=!0,a=r.$n.iso)=>{const i=e||t%1!=0?2:0;return new Intl.NumberFormat(s.Hg,{style:"currency",currency:a,minimumFractionDigits:i}).format(t)}},45348:function(t,e,a){"use strict";a.d(e,{nh:function(){return o}});var r=a(75189),s=a.n(r),i=function(){return Math.random().toString(36).substring(2)},o={name:"ContentLoader",functional:!0,props:{width:{type:[Number,String],default:400},height:{type:[Number,String],default:130},speed:{type:Number,default:2},preserveAspectRatio:{type:String,default:"xMidYMid meet"},baseUrl:{type:String,default:""},primaryColor:{type:String,default:"#f9f9f9"},secondaryColor:{type:String,default:"#ecebeb"},primaryOpacity:{type:Number,default:1},secondaryOpacity:{type:Number,default:1},uniqueKey:{type:String},animate:{type:Boolean,default:!0}},render:function(t,e){var a=e.props,r=e.data,o=e.children,n=a.uniqueKey?a.uniqueKey+"-idClip":i(),l=a.uniqueKey?a.uniqueKey+"-idGradient":i();return t("svg",s()([r,{attrs:{viewBox:"0 0 "+a.width+" "+a.height,version:"1.1",preserveAspectRatio:a.preserveAspectRatio}}]),[t("rect",{style:{fill:"url("+a.baseUrl+"#"+l+")"},attrs:{"clip-path":"url("+a.baseUrl+"#"+n+")",x:"0",y:"0",width:a.width,height:a.height}}),t("defs",[t("clipPath",{attrs:{id:n}},[o||t("rect",{attrs:{x:"0",y:"0",rx:"5",ry:"5",width:a.width,height:a.height}})]),t("linearGradient",{attrs:{id:l}},[t("stop",{attrs:{offset:"0%","stop-color":a.primaryColor,"stop-opacity":a.primaryOpacity}},[a.animate?t("animate",{attrs:{attributeName:"offset",values:"-2; 1",dur:a.speed+"s",repeatCount:"indefinite"}}):null]),t("stop",{attrs:{offset:"50%","stop-color":a.secondaryColor,"stop-opacity":a.secondaryOpacity}},[a.animate?t("animate",{attrs:{attributeName:"offset",values:"-1.5; 1.5",dur:a.speed+"s",repeatCount:"indefinite"}}):null]),t("stop",{attrs:{offset:"100%","stop-color":a.primaryColor,"stop-opacity":a.primaryOpacity}},[a.animate?t("animate",{attrs:{attributeName:"offset",values:"-1; 2",dur:a.speed+"s",repeatCount:"indefinite"}}):null])])])])}}},81312:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return s}});var r={name:"YpMonthFilter",props:{firstAcceptedBookingDate:{type:Date,required:!0},defaultMonth:{type:String,required:!0}},data(){return{selectedMonth:null}},methods:{changeMonth(){const t=this.monthList.filter(t=>t.name===this.selectedMonth)[0].date;this.$emit("input",t)}},mounted(){this.selectedMonth=this.defaultMonth},computed:{startMonth(){return this.$moment(this.firstAcceptedBookingDate)},endMonth(){return this.$moment(new Date).add(1,"years")},monthList(){const t=[];for(;this.endMonth>this.startMonth||this.startMonth.format("M")===this.endMonth.format("M");)t.push({name:this.startMonth.format("MMMM YYYY"),timestamp:this.startMonth.format("X"),date:new Date(this.startMonth)}),this.startMonth.add(1,"month");return t}}},s=(0,a(14486).A)(r,function(){var t=this,e=t._self._c;return e("select",{directives:[{name:"model",rawName:"v-model",value:t.selectedMonth,expression:"selectedMonth"}],staticClass:"yp-month-filter",on:{change:[function(e){var a=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.selectedMonth=e.target.multiple?a:a[0]},t.changeMonth]}},[e("option",{attrs:{disabled:"",value:""}}),t._v(" "),t._l(t.monthList,function(a){return e("option",{key:a.timestamp},[t._v("\n "+t._s(a.name)+"\n ")])})],2)},[],!1,null,"32cfb503",null).exports},72514:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return d}});a(89847);var r=a(95353),s=a(36957),i=a(45348),o=a(47106),n=a(32016),l=a(12087),p=a(2368),c=a(57094),u=a(52235),m={name:"EmployeesDeclarationContainer",components:{EmployeesPaymentsFilters:l.default,EmployeesDeclarationDetail:p.default,EmployeesDeclarationEditContainer:u.default,EmployeesDeclarationNoData:c.default,ContentLoader:i.nh},data(){return{showEdit:!1,formType:"",formData:null}},computed:{filters:(0,s.OH)("employeesModule/filters"),...(0,s.Jt)("employeesModule",["socialDeclaration","socialDeclarationLoading","declarationDetail","payments","paymentsLoading","invoice"]),...(0,s.Jt)("userModule",["currentUser"]),formatedDateProp(){return this.ready?this.filters.timePeriod.fromDate.replace(/-/g,"/"):new Date},hasPendingDeclaration(){return null!==this.socialDeclaration&&"DONE"!==this.socialDeclaration.status&&"DONE_OUTSIDE"!==this.socialDeclaration.status},hasPaymentsWithPositiveAmount(){let t=!1;
1return this.payments.length&&this.payments.forEach(e=>{e.cost.amount>0&&(t=!0)}),t},ready(){return!this.paymentsLoading&&!this.socialDeclarationLoading},invoiceUrl(){return this.socialDeclaration?this.socialDeclaration.paymentSummary.invoice.url:this.invoice.url}},methods:{...(0,r.i0)({getSocialWelfareData:"employeesModule/getSocialWelfareData",getMyEmployeesPayments:"employeesModule/getMyEmployeesPayments",getDetailEmployee:"employeesModule/getDetailEmployee"}),showEditBlock(t){this.showEdit=!0,this.formType=t},showEditDeclaration(t){this.showEdit=!0,this.formType=t.type,this.formData=null,this.formData=t,this.formData.detail=this.declarationDetail,this.formData.declarationName=this.socialDeclaration.name},getMonthDates(t){return(0,o.A)(t)},changeFilter(t){const e=this.getMonthDates(t);this.filters={...this.filters,timePeriod:{fromDate:(0,n.A)(e.first),toDate:(0,n.A)(e.last)}},this.$router.push({name:this.$route.name,params:this.$route.params,query:this.filters.timePeriod}),this.loadItems()},loadItems(){this.getSocialWelfareData({applicantId:Number(this.$route.params.userId),declarationDate:this.filters.timePeriod.fromDate,service:this.$route.params.service.toUpperCase()}),this.getDetailEmployee({service:this.$route.params.service.toUpperCase(),userId:Number(this.$route.params.userId),bookingId:this.$route.params.bookingId}),this.getMyEmployeesPayments({service:this.$route.params.service.toUpperCase(),userId:Number(this.$route.params.userId),paymentId:this.$route.params.paymentId?this.$route.params.paymentId:null})},getNextMomentMonth(t){return(t+1)%12}},mounted(){this.$route.query.fromDate&&this.$route.query.toDate?this.filters={...this.filters,timePeriod:{fromDate:this.$route.query.fromDate,toDate:this.$route.query.toDate}}:this.$router.push({name:"my_employees_declaration",params:{service:this.$route.params.service,userId:this.$route.params.userId},query:{fromDate:this.filters.timePeriod.fromDate,toDate:this.filters.timePeriod.toDate}}),this.loadItems()}},d=(0,a(14486).A)(m,function(){var t=this,e=t._self._c;return e("div",{staticClass:"yp-employees-payments-global"},[e("div",{staticClass:"yp-employees-payments-top"},[e("div",{staticClass:"yp-employees-payments-top__date"},[t.ready?e("EmployeesPaymentsFilters",{attrs:{"date-prop":t.formatedDateProp},on:{changeFilterMonth:t.changeFilter}}):t._e()],1)]),t._v(" "),e("div",{staticClass:"yp-employees-payments"},[t.ready?[t.hasPaymentsWithPositiveAmount?[e("EmployeesDeclarationDetail",{attrs:{payments:t.payments,filters:t.filters,currentUser:t.currentUser,socialDeclaration:t.socialDeclaration,hasPendingDeclaration:t.hasPendingDeclaration,invoiceUrl:t.invoiceUrl},on:{showEditBlock:t.showEditBlock,loadItems:t.loadItems,showEditDeclaration:t.showEditDeclaration}})]:[e("EmployeesDeclarationNoData",{attrs:{declaration:t.socialDeclaration}})]]:e("div",{staticClass:"yp-employees-payments__loader"},[e("ContentLoader",{attrs:{height:900,width:1150,speed:2,primaryColor:"#f3f3f3",secondaryColor:"#ecebeb"}},[e("rect",{attrs:{x:"0",y:"0",width:"1150",height:"900",rx:"3"}})])],1)],2),t._v(" "),e("EmployeesDeclarationEditContainer",{attrs:{showForm:t.showEdit,formType:t.formType,formData:t.formData},on:{loadItems:t.loadItems,closeFormEdit:function(e){t.showEdit=!1}}})],1)},[],!1,null,"144456e4",null).exports},57094:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return i}});var r=a.p+"static/notebook_fa836ce9.svg",s={name:"EmployeesDeclarationNoData",props:{socialDeclaration:{type:Object,default:()=>{}}},data(){return{calendar:r}}},i=(0,a(14486).A)(s,function(){var t=this,e=t._self._c;return e("div",{staticClass:"yp-employees-payments-empty"},[e("img",{attrs:{src:t.calendar,alt:"calendar"}}),t._v(" "),t.socialDeclaration?e("p",[t._v(t._s(t.$t("yoopies.my-employees.declarations.empty")))]):e("p",[t._v(t._s(t.$t("yoopies.my-employees.payments.empty")))])])},[],!1,null,"70c38168",null).exports},12087:function(t,e,a){"use strict";a.r(e),a.d(e,{default:function(){return i}});var r=a(36957),s={name:"EmployeesPaymentsFilters",components:{YpMonthFilter:a(81312).default},props:{dateProp:{type:String,default:""}},data(){return{date:this.dateProp}},computed:{...(0,r.Jt)("employeesModule",["currentEmployee"]),defaultMonth(){const t=new Date(this.date);return this.$moment(t).format("MMMM YYYY")},firstAcceptedBookingDate(){return this.currentEmployee.firstAcceptedBookingDate?new Date(this.currentEmployee.firstAcceptedBookingDate.replace(/-/g,"/")):new Date}},watch:{date(t){this.$emit("changeFilterMonth",t)}}},i=(0,a(14486).A)(s,function(){var t=this,e=t._self._c;return e("div",{staticClass:"yp-payments-filter"},[e("div",{staticClass:"yp-payments-filter__left"},[e("div",{staticClass:"yp-payments-filter__date"},[e("YpMonthFilter",{staticClass:"datepicker-input",attrs:{"default-month":t.defaultMonth,"first-accepted-booking-date":t.firstAcceptedBookingDate},model:{value:t.date,callback:function(e){t.date=e},expression:"date"}})],1)])])},[],!1,null,"16399d31",null).exports}}]);
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.