File manager - Edit - /home/autoph/.trash/assets/header-51ac1c99.js
Back
import{I as m}from"./index-56f9d4fc.js";import{P as x}from"./PurchaseRequestService-76aa26ba.js";import{_ as h,r as v,o as i,d as l,f as t,e as d,I as p,b as n,Q as g}from"./index-84ae394b.js";const b={components:{Icon:m},data(){return{MyRequestCount:0,ForheadApprovalCount:0,ForassetValidation:0,ForBuyerValidation:0,ForCanvass:0,mancomApproval:0}},computed:{activeUser:function(){return this.$store.userSettings.getActiveUser},activeRoleGroups(){var o,e;return((e=(o=this.activeUser)==null?void 0:o.roles)==null?void 0:e.map(r=>r.group_id))||[]},activeCompany:function(){return this.$store.userSettings.getActiveCompany??null},activeDealership:function(){return this.$store.userSettings.getActiveDealership??null}},methods:{goTo(o){this.$router.push(o)},async getApproval(){var o;if(this.activeUser)try{const e=await x.getForApproval({employee_id:this.activeUser.employee_id,role_group_id:this.activeRoleGroups,active_company_id:this.activeCompany,active_dealership_id:this.activeDealership,active_department_id:((o=this.activeUser.employees)==null?void 0:o.department_id)??null});if(console.log("RESPONSE",e),e){let r=e.data.data;this.ForheadApprovalCount=r.head_approval,this.MyRequestCount=r.my_request,this.ForCanvass=r.canvass,this.mancomApproval=r.mancom,console.log("DATA",r)}}catch(e){console.error("Error Fetching for Approval : ",e)}}},mounted(){this.getApproval()}},y={class:""},f={class:"py-4 bg-opacity-[0.5] h-full"},_={class:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-8 auto-rows-fr"},w={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},k=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," My Requests ",-1),C={key:0,class:"absolute top-0.5 right-0.5 grid min-h-[24px] min-w-[24px] translate-x-2/4 -translate-y-2/4 place-items-center rounded-full bg-red-500 py-1 px-1 text-xs text-white"},A={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},R=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," PRF Approval ",-1),q={key:0,class:"absolute top-0.5 right-0.5 grid min-h-[24px] min-w-[24px] translate-x-2/4 -translate-y-2/4 place-items-center rounded-full bg-red-500 py-1 px-1 text-xs text-white"},F={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},G=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," Canvass ",-1),S={key:0,class:"absolute top-0.5 right-0.5 grid min-h-[24px] min-w-[24px] translate-x-2/4 -translate-y-2/4 place-items-center rounded-full bg-red-500 py-1 px-1 text-xs text-white"},T={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},M=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," Mancom Approval ",-1),U={key:0,class:"absolute top-0.5 right-0.5 grid min-h-[24px] min-w-[24px] translate-x-2/4 -translate-y-2/4 place-items-center rounded-full bg-red-500 py-1 px-1 text-xs text-white"},j={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},D=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," For PO ",-1),I={class:"h-full"};function P(o,e,r,V,a,s){const c=v("Icon");return i(),l("div",y,[t("div",f,[t("div",_,[t("button",{onClick:e[0]||(e[0]=u=>s.goTo("/purchase-request/my-requests")),class:"rounded-md p-4 bg-amber-700 bg-opacity-[0.4] text-white dark:bg-opacity-50 text-center drop-shadow transition duration-500 hover:scale-110"},[t("div",w,[d(c,{icon:"fluent-mdl2:file-request",class:"text-3xl text-amber-500"})]),k,a.MyRequestCount>0?(i(),l("span",C,p(a.MyRequestCount),1)):n("",!0)]),s.activeRoleGroups.includes(3)?n("",!0):(i(),l("button",{key:0,onClick:e[1]||(e[1]=u=>s.goTo("/purchase-request/ongoing")),class:"rounded-md p-4 bg-pink-700 bg-opacity-[0.4] text-white dark:bg-opacity-50 text-center drop-shadow transition duration-500 hover:scale-110"},[t("div",A,[d(c,{icon:"fluent-mdl2:file-request",class:"text-3xl text-pink-500"})]),R,a.ForheadApprovalCount>0?(i(),l("span",q,p(a.ForheadApprovalCount),1)):n("",!0)])),t("button",{onClick:e[2]||(e[2]=u=>s.goTo("/purchase-request/for-canvas")),class:"rounded-md p-4 bg-purple-700 bg-opacity-[0.4] text-white dark:bg-opacity-50 text-center drop-shadow transition duration-500 hover:scale-110"},[t("div",F,[d(c,{icon:"teenyicons:spreadsheet-outline",class:"text-3xl text-purple-500"})]),G,a.ForCanvass>0?(i(),l("span",S,p(a.ForCanvass),1)):n("",!0)]),!s.activeRoleGroups.includes(3)&&!s.activeRoleGroups.includes(6)&&!s.activeRoleGroups.includes(7)?(i(),l("button",{key:1,onClick:e[3]||(e[3]=u=>s.goTo("/purchase-request/mancom-approval")),class:"rounded-md p-4 bg-emerald-700 bg-opacity-[0.4] text-white dark:bg-opacity-50 text-center drop-shadow transition duration-500 hover:scale-110"},[t("div",T,[d(c,{icon:"material-symbols-light:approval-outline",class:"text-4xl text-emerald-500"})]),M,a.mancomApproval>0?(i(),l("span",U,p(a.mancomApproval),1)):n("",!0)])):n("",!0),!s.activeRoleGroups.includes(3)&&!s.activeRoleGroups.includes(6)&&!s.activeRoleGroups.includes(7)?(i(),l("button",{key:2,onClick:e[4]||(e[4]=u=>s.goTo("/purchase-request/po-creation")),class:"rounded-md p-4 bg-cyan-700 bg-opacity-[0.4] text-white dark:bg-opacity-50 text-center drop-shadow transition duration-500 hover:scale-110"},[t("div",j,[d(c,{icon:"material-symbols-light:order-approve-outline-sharp",class:"text-4xl text-cyan-500"})]),D])):n("",!0)]),t("div",I,[g(o.$slots,"default")])])])}const H=h(b,[["render",P]]);export{H};
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings