%PDF- %PDF-
Direktori : /var/www/html/hr/web/js/ |
Current File : /var/www/html/hr/web/js/chunk-7401641b.6eef7b96.js |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7401641b"],{"04c0":function(t,e,n){"use strict";n("d3b7"),n("3ca3"),n("ddb0"),n("2b3d");var a=n("1829"),i=n("18c2");e["a"]={list:function(t){return new Promise((function(e,n){a["a"].get("v1/holidays?".concat(Object(i["a"])(t))).then((function(t){return e(t.data)}),(function(t){return n(t)})).catch((function(t){return n(t)}))}))},downloadExcelExample:function(){return new Promise((function(t,e){Object(a["a"])({url:"v1/holidays/actions/downloadExcelExample",method:"GET",responseType:"blob"}).then((function(e){var n=window.URL.createObjectURL(new Blob([e.data])),a=document.createElement("a");a.href=n,a.setAttribute("download","holidays_import_example.xlsx"),document.body.appendChild(a),a.click(),t()}),(function(t){return e(t)}))}))},holidays:function(t){return new Promise((function(e,n){a["a"].get("v1/daysOff?".concat(Object(i["a"])(t))).then((function(t){return e(t.data)}),(function(t){return n(t)})).catch((function(t){return n(t)}))}))},getMonthData:function(t){return new Promise((function(e,n){a["a"].get("v1/getMonthData?".concat(Object(i["a"])(t))).then((function(t){return e(t.data)}),(function(t){return n(t)})).catch((function(t){return n(t)}))}))},create:function(t){return new Promise((function(e,n){a["a"].post("v1/holidays",t).then((function(t){return e(t.data)}),(function(t){return n(t)}))}))}}},"8f2c":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("vue-portal",{attrs:{to:"hrsys-navbar"}},[n("div",{staticClass:"flex text-2xl font-bold text-center"},[n("base-back-button"),n("base-header-title",{attrs:{title:t.$t("holidays.details")}})],1)]),n("holiday-details-component",{attrs:{action:t.$t("buttons."+[t.process]),holiday:t.holidayData},on:{confirm:t.doHoliday}})],1)},i=[],o=(n("99af"),function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"view-container"},[n("div",{staticClass:"flex flex-col justify-around items-center"},[n("div",{staticClass:"max-w-md w-full sm:w-1/2 lg:w-1/3 xl:w-1/3 flex flex-wrap content-center justify-center"},[n("ValidationObserver",{ref:"validator",staticClass:"w-full",scopedSlots:t._u([{key:"default",fn:function(e){var a=e.invalid;return[n("form",{on:{submit:function(e){return e.preventDefault(),t.submit()}}},[n("base-input",{staticClass:"w-full",attrs:{"label-placeholder":t.$t("auth.password"),name:t.$t("holidays.table.name"),rules:"required"},model:{value:t.holiday.name,callback:function(e){t.$set(t.holiday,"name",e)},expression:"holiday.name"}}),n("date-picker",{staticClass:"w-full",attrs:{"input-label":t.$t("holidays.table.date"),name:t.$t("holidays.table.date"),rules:"required"},model:{value:t.holiday.date,callback:function(e){t.$set(t.holiday,"date",e)},expression:"holiday.date"}}),n("base-button",{staticClass:"w-full mb-5 mt-2",attrs:{disabled:a,button:"filled",color:"success",type:"submit"}},[t._v(" "+t._s(t.$t("buttons.create"))+" ")])],1)]}}])})],1)])])}),r=[],s=(n("96cf"),n("1da1")),c=n("e94a"),l={name:"HolidayDetailsComponent",components:{DatePicker:c["a"]},props:{holiday:{type:Object,required:!0},action:{type:String,required:!0},loading:{type:Boolean,default:!1}},methods:{submit:function(){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$refs.validator.validate();case 2:if(n=e.sent,n){e.next=5;break}return e.abrupt("return");case 5:t.$emit("confirm");case 6:case"end":return e.stop()}}),e)})))()},startLoading:function(){this.$vs.loading({container:this.$refs.holidayDetails})},stopLoading:function(){this.$vs.loading.close(this.$refs.holidayDetails)}},watch:{loading:function(t){t?this.startLoading():this.stopLoading()}}},u=l,d=n("2877"),f=Object(d["a"])(u,o,r,!1,null,null,null),h=f.exports,m=n("04c0"),b={name:"HolidayDetails",components:{HolidayDetailsComponent:h},data:function(){return{holidayData:{}}},methods:{doHoliday:function(){this.createHoliday()},createHoliday:function(){var t=this;this.$vs.loading(),m["a"].create(this.holidayData).then((function(){t.$notificationService.success("".concat(t.$t("holidays.holiday")," ").concat(t.$t("notification.successCreate"))),window.history.back()})).catch((function(e){t.$vs.loading.close(),t.$notificationService.error(e.message)}))}}},p=b,y=Object(d["a"])(p,a,i,!1,null,"58ee7970",null);e["default"]=y.exports}}]); //# sourceMappingURL=chunk-7401641b.6eef7b96.js.map