whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/Project-D3ynNitG.js
import{L as A,bS as C,eF as D,Y as R,bt as B,p as r,u as F,i,j as e,bT as N,a3 as V,Q as k,e1 as L,bV as _,bW as w,a7 as I,a8 as O,bE as Q,bf as u,r as U,e as $,$ as q}from"./bundle.OlIVtvc7.js";import{a as H}from"./hooks-CA_GHzwm.js";import{P as M}from"./PreviousNextNavigation-zAd8_mLU.js";import"./atoms-BexY8cYu.js";function J(){const{documentTitle:l,setDocumentTitle:f}=A("project"),{id:o}=C(),{data:t}=D({id:o}),p=R(),h=B(),x=H(),[T,c]=r.useState(),[m,d]=r.useState(!1),[s,j]=r.useState(),[n]=F();r.useEffect(()=>{t!=null&&t.name&&f(t.name),t&&j(t)},[t]);const g=[{name:n("projects"),href:"/projects"},{name:l,href:i("/projects/:id",{id:o})}],v=[{name:n("edit"),href:i("/projects/:id/edit",{id:o})},{name:n("documents"),href:i("/projects/:id/documents",{id:o}),enabled:p("view_project")||p("edit_project")||h(s),formatName:()=>{var a;return e.jsx(N,{numberOfDocuments:(a=s==null?void 0:s.documents)==null?void 0:a.length})}}],y=()=>{m||(u.processing(),c(void 0),d(!0),U("PUT",$("/api/v1/projects/:id",{id:o}),s).then(()=>{u.success("updated_project"),q(["projects"])}).catch(a=>{var b;((b=a.response)==null?void 0:b.status)==422&&(u.dismiss(),c(a.response.data))}).finally(()=>{d(!1)}))},{changeTemplateVisible:P,setChangeTemplateVisible:S,changeTemplateResources:E}=V();return e.jsxs(k,{title:l,breadcrumbs:g,navigationTopRight:s&&e.jsx(Q,{resource:s,onSaveClick:y,actions:x,cypressRef:"projectActionDropdown",disableSaveButton:!s||m}),afterBreadcrumbs:e.jsx(M,{entity:"project"}),children:[e.jsxs(L,{breadcrumbs:[],children:[e.jsx(_,{tabs:v}),e.jsx(w,{context:{errors:T,setErrors:c,project:s,setProject:j}})]}),e.jsx(I,{entity:"project",entities:E,visible:P,setVisible:S,labelFn:a=>e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx(O,{children:n("number")}),e.jsx("span",{children:a.number})]}),bulkUrl:"/api/v1/projects/bulk"})]})}export{J as default};
Copyright ©2021 || Defacer Indonesia