mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
2 lines
2.8 KiB
JavaScript
2 lines
2.8 KiB
JavaScript
"use strict";(self["webpackChunkjandl"]=self["webpackChunkjandl"]||[]).push([[4060],{44060:function(r,e,o){o.r(e),o.d(e,{default:function(){return b}});var a=o(73396),t=o(87139),s=o(67312),l=o(45869);const n=r=>((0,a.dD)("data-v-7cacfc7a"),r=r(),(0,a.Cn)(),r),i={class:"border-bottom py-5 px-5"},d=n((()=>(0,a._)("h1",null,"Všeobecné informácie",-1))),u={class:"py-5 px-5 border-bottom"},m=n((()=>(0,a._)("h1",null,"Pracovná doba",-1))),c={class:"py-5 px-5"};function h(r,e,o,n,h,p){return(0,a.wg)(),(0,a.iD)(a.HY,null,[(0,a._)("div",i,[d,(0,a.Wm)(l.hw,{class:"w-75",variant:"solo",label:"Meno",disabled:!0,modelValue:r.user.name,"onUpdate:modelValue":e[0]||(e[0]=e=>r.user.name=e)},null,8,["modelValue"]),(0,a.Wm)(l.hw,{class:"w-75",variant:"solo",label:"Priezvisko",modelValue:r.user.surname,"onUpdate:modelValue":e[1]||(e[1]=e=>r.user.surname=e),disabled:!0},null,8,["modelValue"])]),(0,a._)("div",u,[m,(0,a.Wm)(l.hw,{class:(0,t.C_)(["w-75",{error:h.v$.form.work_start.$errors.length}]),variant:"solo",label:"Začiatok",modelValue:h.form.work_start,"onUpdate:modelValue":e[2]||(e[2]=r=>h.form.work_start=r),"append-inner-icon":"mdi-clock-outline",type:"time",hint:h.v$.form.work_start.$errors?h.errorUtils.parseErrors(h.v$.form.work_start.$errors):null},null,8,["modelValue","class","hint"]),(0,a.Wm)(l.hw,{class:(0,t.C_)(["w-75",{error:h.v$.form.work_end.$errors.length}]),variant:"solo",label:"Koniec",modelValue:h.form.work_end,"onUpdate:modelValue":e[3]||(e[3]=r=>h.form.work_end=r),"append-inner-icon":"mdi-clock-outline",type:"time",hint:h.v$.form.work_end.$errors?h.errorUtils.parseErrors(h.v$.form.work_end.$errors):null},null,8,["modelValue","class","hint"])]),(0,a._)("div",c,[(0,a.Wm)(s.T,{class:"button primary",onClick:e[4]||(e[4]=r=>p.updateUserInfo())},{default:(0,a.w5)((()=>[(0,a.Uk)("ULOŽIŤ ZMENY")])),_:1})])],64)}var p=o(33053),w=o(69117),_=o(7648),f=o(20065),k={data(){return{errorUtils:_.Z,v$:(0,p.ZP)(),form:{}}},computed:{...(0,f.Se)("auth",["user"])},validations(){return{form:{work_start:{required:w.C1},work_end:{required:w.C1}}}},mounted(){this._setDates()},methods:{async updateUserInfo(){if(!await this.v$.$validate())return;const[r,e]=this.form.work_start.split(":"),[o,a]=this.form.work_end.split(":"),t={id:this.user.id,work_start:parseFloat(r)+parseFloat(e)/60,work_end:parseFloat(o)+parseFloat(a)/60};try{await this.$store.dispatch("auth/updateUserInfo",t),this.$toast.success("Profil bol úspešne zmenený")}catch(s){this.$toast.error(s)}},_setDates(){this.form={work_start:this.decimalHoursToTime(this.user.work_start),work_end:this.decimalHoursToTime(this.user.work_end)}},decimalHoursToTime(r){var e=Math.floor(r),o=Math.floor(60*r%60);return e=(e<10?"0":"")+e,o=(o<10?"0":"")+o,e+":"+o}},watch:{user(){this._setDates()}}},v=o(40089);const $=(0,v.Z)(k,[["render",h],["__scopeId","data-v-7cacfc7a"]]);var b=$}}]);
|
|
//# sourceMappingURL=4060.684ee70a.js.map
|