{"size": 16251, "ext": "js", "max_stars_repo_path": "public/js/8.js", "max_stars_repo_name": "SeyramWood/adu-hrms", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "public/js/8.js", "max_issues_repo_name": "SeyramWood/adu-hrms", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "public/js/8.js", "max_forks_repo_name": "SeyramWood/adu-hrms", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 16251.0, "max_line_length": 16251, "alphanum_fraction": 0.6814349886}
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{1:function(t,e,a){"use strict";function r(t,e,a,r,s,i,n,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=a,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):s&&(l=o?function(){s.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:s),l)if(c.functional){c._injectStyles=l;var _=c.render;c.render=function(t,e){return l.call(e),_(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}a.d(e,"a",(function(){return r}))},29:function(t,e,a){var r=a(86);"string"==typeof r&&(r=[[t.i,r,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};a(6)(r,s);r.locals&&(t.exports=r.locals)},58:function(t,e,a){"use strict";a.r(e);var r=a(2),s=a.n(r),i=a(0);function n(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return o(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,r=new Array(e);a<e;a++)r[a]=t[a];return r}function l(t,e,a,r,s,i,n){try{var o=t[i](n),l=o.value}catch(t){return void a(t)}o.done?e(l):Promise.resolve(l).then(r,s)}function c(t){return function(){var e=this,a=arguments;return new Promise((function(r,s){var i=t.apply(e,a);function n(t){l(i,r,s,n,o,"next",t)}function o(t){l(i,r,s,n,o,"throw",t)}n(void 0)}))}}function _(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function d(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?_(Object(a),!0).forEach((function(e){f(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):_(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var u={name:"StaffDirectory",layout:a(8).a,metaInfo:function(){return{title:"Staff Directory"}},components:{},props:{},computed:d({},Object(i.c)(["getStaffDirectory"])),watch:{searchKey:function(t){var e=this;if(t){var a="/dashboard/search-staff?page=".concat(this.searchPage,"&search=").concat(t);this.searchPage=1,this.$axios.get(a).then((function(t){var a=t.data;e.searchResults=a.data.map((function(t){return t.personal_details=JSON.parse(t.personal_details),t.job=t.job?JSON.parse(t.job):t.job,t})),e.triggerSearch=!0}))}else this.triggerSearch=!1,this.searchResults=[],this.searchPage=1}},created:function(){},mounted:function(){},data:function(){return{page:1,searchPage:1,searchResults:[],searchKey:"",triggerSearch:!1}},methods:d(d({},Object(i.b)(["dispatchStaff"])),{},{getFullName:function(t){var e=t.title,a=t.lastName,r=t.firstName,s=t.middleName;return"".concat(e||""," ").concat(a||""," ").concat(r||""," ").concat(s||"")},fetchStaffDirectory:function(t){var e=this;return c(s.a.mark((function a(){var r,i;return s.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.$axios.get("/dashboard/search-staff?page=".concat(e.page));case 3:r=a.sent,(i=r.data).data.length?(e.page+=1,e.getStaffDirectory.filter((function(t){return i.data.includes(t)})).length||e.dispatchStaff({type:"ADD_DIRECTORY",payload:i.data}),t.loaded()):t.complete(),a.next=10;break;case 8:a.prev=8,a.t0=a.catch(0);case 10:case"end":return a.stop()}}),a,null,[[0,8]])})))()},searchStaffDirectory:function(t){var e=this;return c(s.a.mark((function a(){var r,i,o;return s.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,e.$axios.get("/dashboard/search-staff?page=".concat(e.searchPage,"&search=").concat(e.searchKey));case 3:r=a.sent,i=r.data,o=e.searchResults.filter((function(t){return i.data.includes(t)})),i.data.length?(e.searchPage+=1,o.length||(e.searchResults=[].concat(n(e.searchResults),n(i.data.map((function(t){return t.personal_details=JSON.parse(t.personal_details),t.job=t.job?JSON.parse(t.job):t.job,t}))))),t.loaded()):t.complete(),a.next=11;break;case 9:a.prev=9,a.t0=a.catch(0);case 11:case"end":return a.stop()}}),a,null,[[0,9]])})))()}})},p=a(1),h=Object(p.a)(u,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("section",{staticClass:"staff__directory__container"},[a("div",{staticClass:"staff__directory__container__search"},[a("b-field",{staticStyle:{width:"100%"}},[a("b-input",{attrs:{placeholder:"Search staff...",type:"search","icon-pack":"fas",icon:"search",size:"is-medium",expanded:""},model:{value:t.searchKey,callback:function(e){t.searchKey=e},expression:"searchKey"}})],1)],1),t._v(" "),a("div",{staticClass:"staff__directory__container__results"},[t.triggerSearch?t._l(t.searchResults,(function(e,r){return a("div",{key:r,staticClass:"staff__directory__container__results__card"},[a("div",{staticClass:"avatar"},[a("img",{attrs:{src:"/storage/avatar/"+e.personal_details.avatar,alt:"avatar",srcset:""}})]),t._v(" "),a("div",{staticClass:"info"},[a("article",{staticClass:"info__details info--header"},[a("strong",[t._v(t._s(t.getFullName(e.personal_details)))])]),t._v(" "),e.department?a("article",{staticClass:"info__details"},[a("span",[t._v(t._s(e.department))])]):t._e(),t._v(" "),e.unit?a("article",{staticClass:"info__details"},[a("span",[t._v(t._s(e.unit))])]):t._e(),t._v(" "),a("article",{staticClass:"info__details"},[a("a",{attrs:{href:"mailto:"+e.email}},[t._v(t._s(e.email))])]),t._v(" "),a("article",{staticClass:"info__details mb-4"},[a("a",{attrs:{href:"tel:+"+t.isNull(e.mobile)}},[t._v(t._s(t.isNull(e.mobile)))])]),t._v(" "),t.$page.props.userPermissions.includes("view_admin")||t.$page.props.userPermissions.includes("view_pim")?a("inertia-link",{attrs:{href:t.$page.props.authUser.id===e.id?"/dashboard/ess":"/dashboard/ess/"+e.id+"/"+e.slug,"preserve-scroll":""}},[a("b-button",{attrs:{type:"is-info is-light",size:""}},[t._v("View profile")])],1):t._e(),t._v(" "),t.$page.props.authUser.id!==e.id||t.$page.props.userPermissions.includes("view_admin")&&t.$page.props.userPermissions.includes("view_pim")?t._e():a("inertia-link",{attrs:{href:"/dashboard/ess","preserve-scroll":""}},[a("b-button",{attrs:{type:"is-info is-light",size:""}},[t._v("View profile")])],1)],1)])})):t._l(t.getStaffDirectory,(function(e,r){return a("div",{key:r,staticClass:"staff__directory__container__results__card"},[a("div",{staticClass:"avatar"},[a("img",{attrs:{src:"/storage/avatar/"+e.personal_details.avatar,alt:"avatar",srcset:""}})]),t._v(" "),a("div",{staticClass:"info"},[a("article",{staticClass:"info__details info--header"},[a("strong",[t._v(t._s(t.getFullName(e.personal_details)))])]),t._v(" "),e.department?a("article",{staticClass:"info__details"},[a("span",[t._v(t._s(e.department))])]):t._e(),t._v(" "),e.unit?a("article",{staticClass:"info__details"},[a("span",[t._v(t._s(e.unit))])]):t._e(),t._v(" "),a("article",{staticClass:"info__details"},[a("a",{attrs:{href:"mailto:"+e.email}},[t._v(t._s(e.email))])]),t._v(" "),a("article",{staticClass:"info__details mb-4"},[a("a",{attrs:{href:"tel:+"+t.isNull(e.mobile)}},[t._v(t._s(t.isNull(e.mobile)))])]),t._v(" "),t.$page.props.userPermissions.includes("view_admin")||t.$page.props.userPermissions.includes("view_pim")?a("inertia-link",{attrs:{href:t.$page.props.authUser.id===e.id?"/dashboard/ess":"/dashboard/ess/"+e.id+"/"+e.slug,"preserve-scroll":""}},[a("b-button",{attrs:{type:"is-info is-light",size:""}},[t._v("View profile")])],1):t._e(),t._v(" "),t.$page.props.authUser.id!==e.id||t.$page.props.userPermissions.includes("view_admin")&&t.$page.props.userPermissions.includes("view_pim")?t._e():a("inertia-link",{attrs:{href:"/dashboard/ess","preserve-scroll":""}},[a("b-button",{attrs:{type:"is-info is-light",size:""}},[t._v("View profile")])],1)],1)])}))],2),t._v(" "),t.triggerSearch?[a("infinite-loading",{on:{infinite:t.searchStaffDirectory}},[a("div",{staticClass:"text-main py-4",attrs:{slot:"no-more"},slot:"no-more"},[t._v('"No more staff.')]),t._v(" "),a("div",{staticClass:"text-main py-4",attrs:{slot:"no-results"},slot:"no-results"},[t._v('"No staff found :(')])])]:t._e(),t._v(" "),t.triggerSearch?t._e():[a("infinite-loading",{on:{infinite:t.fetchStaffDirectory}},[a("div",{staticClass:"text-main py-4",attrs:{slot:"no-more"},slot:"no-more"},[t._v('"No more staff.')]),t._v(" "),a("div",{staticClass:"text-main py-4",attrs:{slot:"no-results"},slot:"no-results"},[t._v('"No staff found :(')])])]],2)}),[],!1,null,"dfe1e258",null);e.default=h.exports},8:function(t,e,a){"use strict";var r=a(13),s=a(0);function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function n(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach((function(e){o(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var l={name:"Dashboard",metaInfo:{title:"ADU Staff Portal",titleTemplate:"%s | ADU Staff Portal"},props:{userPermissions:{require:!0,type:Array}},computed:n(n({},Object(s.c)(["getDepartments","getOrganizationProfile","getProfile","getAuthUser","getJobTitles"])),{},{authUserName:function(){return"".concat(this.isNull(this.getAuthUser.title)," ").concat(this.getAuthUser.lastName," ").concat(this.getAuthUser.firstName," ").concat(this.isNull(this.getAuthUser.middleName))},authJobTitle:function(){var t=this;if(this.getAuthUser.jobTitle&&this.getJobTitles.length){var e=this.getJobTitles.find((function(e){return e.id===parseInt(t.getAuthUser.jobTitle)}));return e?e.title:""}return""},getLogo:function(){if(this.getOrganizationProfile)return this.getOrganizationProfile.logo},getOrgName:function(){if(this.getOrganizationProfile)return this.getOrganizationProfile.name}}),beforeMount:function(){var t=this;this.activePage=this.$page.url,r.Inertia.on("navigate",(function(e){t.activePage=e.detail.page.url})),localStorage.getItem("locale")?this.$lang.setLocale(localStorage.getItem("locale")):this.$lang.setLocale("en")},created:function(){this.dispatchAuthUser({payload:this.$page.props.authUser}),this.dispatchOrgnizationProfile({payload:this.$page.props.orgInfo})},mounted:function(){},data:function(){return{activePage:"",regex:new RegExp("^/dashboard/ess/[0-9]+/[a-z-]*$")}},methods:n(n({},Object(s.b)(["dispatchOrgnizationProfile","dispatchAuthUser"])),{},{isNull:function(t){return"null"===t?"":t}})},c=(a(85),a(1)),_=Object(c.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("main",{staticClass:"v-cloak"},[a("div",{staticClass:"brand__logo"},[a("div",{staticClass:"brand__logo__main"},[a("img",{attrs:{src:"/storage/logo/"+t.getLogo,alt:"Brand Logo",srcset:""}})])]),t._v(" "),a("header",{staticClass:"header"},[a("nav",{staticClass:"header__nav"},[a("ul",{staticClass:"header__nav__list header__nav__list--left"},[a("li",{class:"header__nav__list__item "+("/dashboard"===t.activePage?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard","preserve-scroll":"",headers:{"Custom-Header":"poopjpo"}}},[t._v(t._s(t.$t("app.dashboard")))])],1),t._v(" "),a("li",{class:"header__nav__list__item "+("/dashboard/ess"===t.activePage||t.regex.test(t.activePage)?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard/ess","preserve-scroll":""}},[t._v(t._s(t.$t("app.employee")))])],1),t._v(" "),t.isPermission("view_admin")?a("li",{class:"header__nav__list__item "+("/dashboard/admin"===t.activePage?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard/admin","preserve-scroll":""}},[t._v(t._s(t.$t("app.admin")))])],1):t._e(),t._v(" "),t.isPermission("view_pim")?a("li",{class:"header__nav__list__item "+("/dashboard/pim"===t.activePage?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard/pim","preserve-scroll":""}},[t._v(t._s(t.$t("app.pim")))])],1):t._e(),t._v(" "),a("li",{class:"header__nav__list__item "+("/dashboard/kpi"===t.activePage?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard/kpi","preserve-scroll":""}},[t._v(t._s(t.$t("app.kpi")))])],1),t._v(" "),a("li",{class:"header__nav__list__item "+("/dashboard/staff-directory"===t.activePage?"active-left":"")},[a("inertia-link",{attrs:{href:"/dashboard/staff-directory","preserve-scroll":""}},[t._v(t._s(t.$t("app.staff_directory")))])],1)]),t._v(" "),a("ul",{staticClass:"header__nav__list header__nav__list--right"},[a("li",{staticClass:"header__nav__list__item"},[a("b-dropdown",{attrs:{"aria-role":"list",position:"is-bottom-left"}},[a("p",{attrs:{slot:"trigger",role:"button"},slot:"trigger"},[a("b-icon",{attrs:{pack:"fas",icon:"exclamation-circle",size:"is-small"}})],1),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("a",{staticClass:"default",attrs:{href:"#"}},[t._v(" Notifications")])]),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("a",{staticClass:"default",attrs:{href:"#"}},[t._v(" Notifications")])]),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("a",{staticClass:"default",attrs:{href:"#"}},[t._v(" Notifications")])]),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("a",{staticClass:"default",attrs:{href:"#"}},[t._v(" Notifications")])])],1)],1),t._v(" "),a("li",{staticClass:"header__nav__list__item"},[a("b-dropdown",{attrs:{"aria-role":"list",position:"is-bottom-left"}},[a("p",{attrs:{slot:"trigger",role:"button"},slot:"trigger"},[a("b-icon",{attrs:{pack:"fas",icon:"cogs",size:"is-small"}})],1),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("inertia-link",{attrs:{href:"/dashboard/ess","preserve-scroll":""}},[a("b-icon",{attrs:{pack:"fas",icon:"user",size:"is-small"}}),t._v("\n                  "+t._s(t.$t("app.profile"))+"\n              ")],1)],1),t._v(" "),a("b-dropdown-item",{attrs:{"aria-role":"listitem"}},[a("inertia-link",{staticClass:"logout-btn",attrs:{href:"/logout",method:"POST",as:"button"}},[a("b-icon",{attrs:{pack:"fas",icon:"sign-out-alt",size:"is-small"}}),t._v("\n                  "+t._s(t.$t("app.logout")))],1)],1)],1)],1)])]),t._v(" "),a("div",{staticClass:"header__details"},[a("div",{staticClass:"header__details__avatar"},[a("div",{staticClass:"header__details__avatar__round"},[a("img",{attrs:{src:"/storage/avatar/"+t.getAuthUser.avatar,alt:"avatar",srcset:""}})])]),t._v(" "),a("div",{staticClass:"header__details__staff"},[a("strong",{staticClass:"header__details__staff__name"},[a("span",[t._v(t._s(t.authUserName))])]),t._v(" "),a("h4",{staticClass:"header__details__staff__title"},[a("span",[t._v(t._s(t.authJobTitle))])])]),t._v(" "),a("div",{staticClass:"header__details__brand__name"},[a("h4",[t._v(t._s(t.getOrgName))])])])]),t._v(" "),[t._t("default")],t._v(" "),a("vue-confirm-dialog")],2)}),[],!1,null,"591b84e2",null);e.a=_.exports},85:function(t,e,a){"use strict";a(29)},86:function(t,e,a){(t.exports=a(5)(!1)).push([t.i,"[v-cloak][data-v-591b84e2]{display:none}.logout-btn[data-v-591b84e2]{border:none;background-color:transparent;color:#686767;cursor:pointer}.logout-btn[data-v-591b84e2]:active{border:none}",""])}}]);