File manager - Edit - /home/autoph/.trash/assets/header-8313c48a.js
Back
import{I as m}from"./index-2a106319.js";import{P as h}from"./PurchaseRequestService-11816ac4.js";import{_ as x,r as v,o as r,d as a,f as t,e as c,I as p,b as i,Q as g}from"./index-68adbd41.js";const b={components:{Icon:m},props:{mancomApproval:{type:Number,default:0},ForCanvass:{type:Number,default:0}},data(){return{MyRequestCount:0,ForheadApprovalCount:0,ForassetValidation:0,ForBuyerValidation:0}},computed:{activeUser:function(){return this.$store.userSettings.getActiveUser},activeRoleGroups(){var s,e;return((e=(s=this.activeUser)==null?void 0:s.roles)==null?void 0:e.map(l=>l.group_id))||[]},activeCompany:function(){return this.$store.userSettings.getActiveCompany??null},activeDealership:function(){return this.$store.userSettings.getActiveDealership??null},hasPOAccess(){return[7,8,9,10,14].some(e=>this.activeRoleGroups.includes(e)&&!this.activeRoleGroups.includes(3))}},methods:{goTo(s){this.$router.push(s)},async getApproval(){if(console.log("Active usersss : ",this.activeUser),this.activeUser)try{const s=await h.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:this.activeUser.department_access.map(e=>e.id)??null});if(console.log("RESPONSE",s),s){let e=s.data.data;this.ForheadApprovalCount=e.head_approval,this.MyRequestCount=e.my_request,console.log("DATA",e)}}catch(s){console.error("Error Fetching for Approval : ",s)}}},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),P={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"},S={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},T=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"},M={class:"mx-auto h-12 w-12 flex flex-col items-center justify-center rounded-full bg-slate-700 text-2xl mb-2"},N=t("div",{class:"block text-sm text-white font-semibold dark:text-white mb-1"}," For PO ",-1),j={class:"h-full"};function D(s,e,l,I,d,o){const n=v("Icon");return r(),a("div",y,[t("div",f,[t("div",_,[t("button",{onClick:e[0]||(e[0]=u=>o.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,[c(n,{icon:"fluent-mdl2:file-request",class:"text-3xl text-amber-500"})]),k,d.MyRequestCount>0?(r(),a("span",C,p(d.MyRequestCount),1)):i("",!0)]),o.activeRoleGroups.includes(3)?i("",!0):(r(),a("button",{key:0,onClick:e[1]||(e[1]=u=>o.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,[c(n,{icon:"fluent-mdl2:file-request",class:"text-3xl text-pink-500"})]),R,d.ForheadApprovalCount>0?(r(),a("span",q,p(d.ForheadApprovalCount),1)):i("",!0)])),o.activeRoleGroups.includes(4)?i("",!0):(r(),a("button",{key:1,onClick:e[2]||(e[2]=u=>o.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,[c(n,{icon:"teenyicons:spreadsheet-outline",class:"text-3xl text-purple-500"})]),G,l.ForCanvass>0?(r(),a("span",P,p(l.ForCanvass),1)):i("",!0)])),o.activeRoleGroups.includes(14)?(r(),a("button",{key:2,onClick:e[3]||(e[3]=u=>o.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",S,[c(n,{icon:"material-symbols-light:approval-outline",class:"text-4xl text-emerald-500"})]),T,l.mancomApproval>0?(r(),a("span",U,p(l.mancomApproval),1)):i("",!0)])):i("",!0),o.hasPOAccess?(r(),a("button",{key:3,onClick:e[4]||(e[4]=u=>o.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",M,[c(n,{icon:"material-symbols-light:order-approve-outline-sharp",class:"text-4xl text-cyan-500"})]),N])):i("",!0)]),t("div",j,[g(s.$slots,"default")])])])}const O=x(b,[["render",D]]);export{O as H};
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings