whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> //home/qbizpnmr/arif.umairtax.com/public/Show-0pn6Bxo1.js
import{u as p,a as x,w as _,j as s,b1 as T,b2 as C,L as H,bS as V,f as G,a9 as O,aV as z,Y as Q,bt as K,M as U,i as r,b as Y,dy as J,dw as W,d as X,dx as Z,eG as ss,dz as es,a3 as ts,Q as y,S as as,a_ as ns,l as is,bq as u,T as os,k as ls,a4 as cs,eH as rs,a7 as ds,a8 as ms,bE as us,h as ps,eI as xs,r as hs,e as js}from"./bundle.OlIVtvc7.js";import{I as d}from"./InfoCard-BvC2FhUQ.js";import{a as fs}from"./hooks-CA_GHzwm.js";import{D as bs}from"./DataTableColumnsPicker-BAbL5ze4.js";import{u as vs}from"./useShowEditOption-Cod7cZDV.js";import{C as ks}from"./ClientActionButtons-DC8u7uNL.js";import{P as Ns}from"./PreviousNextNavigation-zAd8_mLU.js";import"./atoms-BexY8cYu.js";function gs(o){const[t]=p(),{project:n}=o,l=x(),i=_();return s.jsx(s.Fragment,{children:!!(n&&n.private_notes)&&s.jsx(d,{title:t("private_notes"),className:"shadow-sm h-full 2xl:h-max col-span-12 lg:col-span-6 xl:col-span-4 2xl:col-span-3 p-4",style:{borderColor:l.$24},withoutPadding:!0,children:s.jsx("div",{className:"whitespace-normal pt-1 min-h-32 max-h-56 overflow-y-auto",children:s.jsx("article",{className:C("prose prose-sm",{"prose-invert":i==null?void 0:i.dark_mode}),dangerouslySetInnerHTML:{__html:T(n.private_notes)}})})})})}function ys(o){const[t]=p(),{project:n}=o,l=x(),i=_();return s.jsx(s.Fragment,{children:!!(n&&n.public_notes)&&s.jsx(d,{title:t("public_notes"),className:"shadow-sm h-full 2xl:h-max col-span-12 lg:col-span-6 xl:col-span-4 2xl:col-span-3 p-4",style:{borderColor:l.$24},withoutPadding:!0,children:s.jsx("div",{className:"whitespace-normal pt-1 min-h-32 max-h-56 overflow-y-auto",children:s.jsx("article",{className:C("prose prose-sm",{"prose-invert":i==null?void 0:i.dark_mode}),dangerouslySetInnerHTML:{__html:T(n.public_notes)}})})})})}ps.extend(xs);function $s(){var f,b,v,k,N,g;const{documentTitle:o}=H("project"),{t}=p(),{id:n}=V(),{dateFormat:l}=G(),i=O(),w=z(),h=Q(),P=K(),A=U(),j=[{name:t("projects"),href:"/projects"},{name:t("project"),href:r("/projects/:id",{id:n})}],{data:e}=Y({queryKey:["/api/v1/projects",`/api/v1/projects/${n}`],queryFn:()=>hs("GET",js(`/api/v1/projects/${n}?include=client,tasks,invoices,quotes,expenses`)).then(a=>a.data.data),staleTime:1/0}),F=fs(),E=J(),$=W(),S=X(),B=Z(),M=ss(),R=es(),q=vs(),m=x(),{changeTemplateVisible:I,setChangeTemplateVisible:L,changeTemplateResources:D}=ts();return e?s.jsxs(y,{title:o,breadcrumbs:j,...(h("edit_project")||P(e))&&e&&{navigationTopRight:s.jsx(us,{resource:e,actions:F,saveButtonLabel:t("edit"),onSaveClick:()=>i(r("/projects/:id/edit",{id:n})),cypressRef:"projectActionDropdown"})},afterBreadcrumbs:s.jsx(Ns,{entity:"project"}),children:[s.jsxs("div",{className:"grid grid-cols-12 lg:space-y-0 gap-4",children:[s.jsx(d,{title:e.name,className:"shadow-sm h-full 2xl:h-max col-span-12 lg:col-span-6 xl:col-span-4 2xl:col-span-3 p-4",style:{borderColor:m.$24},withoutPadding:!0,children:s.jsxs("div",{className:"flex flex-col space-y-3 pt-1",children:[e&&s.jsxs("div",{className:"flex space-x-10",children:[s.jsx("span",{className:"text-sm font-medium",style:{color:m.$3},children:t("status")}),s.jsx(ns,{entity:e})]}),e.client&&s.jsx(ks,{displayClientName:!0,client:e.client}),s.jsxs("div",{children:[e.due_date.length>0&&s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("span",{className:"text-sm font-medium",children:[t("due_date"),":"]}),s.jsx("span",{className:"text-sm",children:is(e.due_date,l)})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("span",{className:"text-sm font-medium",children:[t("budgeted_hours"),":"]}),s.jsx("span",{className:"text-sm",children:w(e.budgeted_hours)})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsxs("span",{className:"text-sm font-medium",children:[t("task_rate"),":"]}),s.jsx("span",{className:"text-sm",children:S(e.task_rate,(f=e.client)==null?void 0:f.country_id,(b=e.client)==null?void 0:b.settings.currency_id)})]})]}),s.jsxs("div",{children:[(v=e==null?void 0:e.invoices)==null?void 0:v.map((a,c)=>s.jsxs(u,{to:r("/invoices/:id/edit",{id:a.id}),children:[t("invoice")," #",a.number]},c)),(k=e==null?void 0:e.quotes)==null?void 0:k.map((a,c)=>s.jsxs(u,{to:r("/quotes/:id/edit",{id:a.id}),children:[t("quote")," #",a.number]},c)),(N=e==null?void 0:e.expenses)==null?void 0:N.map((a,c)=>s.jsxs(u,{to:r("/expenses/:id/edit",{id:a.id}),children:[t("expense")," #",a.number]},c))]})]})}),s.jsx(gs,{project:e}),s.jsx(ys,{project:e}),s.jsxs(d,{title:t("summary"),className:"shadow-sm h-full 2xl:h-max col-span-12 lg:col-span-6 xl:col-span-4 2xl:col-span-3 p-4",style:{borderColor:m.$24},withoutPadding:!0,children:[s.jsxs("div",{className:"flex space-x-2",children:[s.jsxs("span",{className:"font-medium",children:[t("active_tasks"),":"]}),s.jsx("span",{children:(g=e.tasks)==null?void 0:g.length})]}),s.jsxs("div",{className:"flex space-x-2",children:[s.jsxs("span",{className:"font-medium",children:[t("total_hours"),":"]}),s.jsx("span",{children:parseFloat(((e==null?void 0:e.current_hours)||0).toFixed(4))})]})]})]}),A(os.Tasks)&&s.jsx("div",{className:"my-4",children:s.jsx(ls,{resource:"task",columns:$,customActions:E,endpoint:`/api/v1/tasks?include=status,client,project,user,assigned_user&sort=id|desc&project_tasks=${e.id}&without_deleted_clients=true`,bulkRoute:"/api/v1/tasks/bulk",linkToCreate:`/tasks/create?project=${n}&rate=${e.task_rate}`,linkToEdit:"/tasks/:id/edit",showEdit:a=>q(a),customFilters:B,customBulkActions:R,customFilterPlaceholder:"status",withResourcefulActions:!0,rightSide:s.jsx(bs,{columns:M,defaultColumns:rs,table:"task"}),linkToCreateGuards:[cs("create_task")],hideEditableOptions:!h("edit_task")})}),s.jsx(ds,{entity:"project",entities:D,visible:I,setVisible:L,labelFn:a=>s.jsxs("div",{className:"flex flex-col space-y-1",children:[s.jsx(ms,{children:t("number")}),s.jsx("span",{children:a.number})]}),bulkUrl:"/api/v1/projects/bulk"})]}):s.jsx(y,{title:o,breadcrumbs:j,children:s.jsx(as,{})})}export{$s as default};
Copyright ©2021 || Defacer Indonesia