whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/Tasks-BsV6YmvZ.js
import{bs as P,u as T,a as R,dy as D,bv as V,eJ as H,f as M,d as O,Y as I,bt as G,Z as y,b as q,j as e,bw as K,bx as Q,by as C,eK as U,eL as J,eM as W,eN as Y,aA as Z,l as E,eO as X,eP as ee,bD as se,bE as te,bj as ae,bq as w,i as S,bF as ne,H as oe,h as le,bG as re,r as ie,e as ce,p as g,ay as A,eQ as de,eR as ue,L as me,g as xe,dx as he,dw as pe,eG as be,dz as fe,br as je,a3 as ke,Q as ge,k as Ce,a4 as _,bc as we,eS as ye,eH as Te,a5 as ve,a6 as Ne,a7 as $e,a8 as B}from"./bundle.OlIVtvc7.js";import{D as Se}from"./DataTableColumnsPicker-BAbL5ze4.js";import{u as _e}from"./useShowEditOption-Cod7cZDV.js";import{I as Ee}from"./ImportButton-CbAh905F.js";import{u as Ae}from"./hooks-XTagFAuk.js";import{T as Be}from"./TaskClock-SGIUUrSZ.js";import{B as Fe}from"./Banner-D9Q__Gmd.js";import"./Import-Dp8FQZJ0.js";const L=P(null),z=P(!1);le.extend(re);const F=oe.div` background-color: ${({theme:a})=>a.backgroundColor}; &:hover { background-color: ${({theme:a})=>a.hoverBackgroundColor}; } `;function Pe(){const[a]=T();return s=>{var i,c,d,u,m,x,t;let n=ae(`activity_${s.activity_type_id}`,{});const r={client:e.jsx(w,{to:S("/clients/:id",{id:(i=s.client)==null?void 0:i.hashed_id}),children:(c=s.client)==null?void 0:c.label}),user:((d=s.user)==null?void 0:d.label)??a("system"),task:e.jsx(w,{to:S("/tasks/:id/edit",{id:(u=s.task)==null?void 0:u.hashed_id}),children:(m=s==null?void 0:s.task)==null?void 0:m.label}),contact:e.jsx(w,{to:S("/clients/:id/edit",{id:(x=s==null?void 0:s.contact)==null?void 0:x.hashed_id}),children:(t=s==null?void 0:s.contact)==null?void 0:t.label})};for(const[j,h]of Object.entries(r))n=ne(n,`:${j}`,()=>h);return n}}function Re(){var k,f;const[a]=T(),s=R(),n=D({showCommonBulkAction:!0,showEditAction:!0}),{timeFormat:r}=V();H();const{dateFormat:i}=M(),c=O(),d=Ae(),u=I(),m=G(),x=Pe(),[t,j]=y(L),[h,v]=y(z),p=t&&d(t.time_log),{data:b}=q({queryKey:["/api/v1/activities",t==null?void 0:t.id,"task"],queryFn:()=>ie("POST",ce("/api/v1/activities/entity"),{entity:"task",entity_id:t==null?void 0:t.id}).then(l=>l.data.data),enabled:t!==null&&h,staleTime:1/0});return e.jsx(K,{size:"regular",visible:h,onClose:()=>{v(!1),j(null)},title:`${a("task")} ${t==null?void 0:t.number}`,topRight:t&&(u("edit_task")||m(t))?e.jsx(te,{label:a("actions"),resource:t,actions:n}):null,withoutActionContainer:!0,withoutHeaderBorder:!0,children:e.jsxs(Q,{tabs:[a("overview"),a("activity")],width:"full",withHorizontalPadding:!0,horizontalPaddingWidth:"1.5rem",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"px-6",children:[e.jsx(C,{className:"border-b border-dashed",leftSide:a("amount"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:s.$20},children:t?c(t.rate*U(t.time_log),(k=t.client)==null?void 0:k.country_id,(f=t.client)==null?void 0:f.settings.currency_id):null}),e.jsx(C,{className:"border-b border-dashed",leftSide:a("entity_state"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:s.$20},children:t?a(J(t)):null}),e.jsx(C,{className:"border-b border-dashed",leftSide:a("duration"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:s.$20},children:t?W(t.time_log.toString(),!0):null}),e.jsx(C,{leftSide:a("status"),pushContentToRight:!0,noExternalPadding:!0,children:t?e.jsx(Y,{entity:t,withoutDropdown:!0}):null})]}),e.jsx(Z,{withoutPadding:!0,borderColor:s.$20}),e.jsx("div",{className:"flex flex-col space-y-4 px-6 py-5",children:t&&(p==null?void 0:p.map(([l,N,$],o)=>e.jsxs(F,{className:"flex items-center justify-between p-4 w-full shadow-sm border rounded-md",style:{borderColor:s.$20},theme:{backgroundColor:s.$1,hoverBackgroundColor:s.$4},children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("p",{className:"text-sm font-medium",style:{color:s.$3},children:E(l,i)}),e.jsxs("span",{className:"text-xs",style:{color:s.$17},children:[N," - ",$]})]}),e.jsx("div",{className:"text-sm font-medium",style:{color:s.$3},children:ee(t)&&o===p.length-1?e.jsx(Be,{task:t,calculateLastTimeLog:!0}):X(t.time_log,o)})]},o)))})]}),e.jsx("div",{children:e.jsx("div",{className:"flex flex-col pt-3 px-3",children:b==null?void 0:b.map(l=>e.jsxs(F,{className:"flex space-x-3 p-4 rounded-md flex-1 min-w-0",theme:{backgroundColor:s.$1,hoverBackgroundColor:s.$25},children:[e.jsx("div",{className:"flex items-center justify-center",children:e.jsx("div",{className:"p-2 rounded-full",style:{backgroundColor:s.$20},children:e.jsx(se,{size:"1.3rem",color:s.$16,filledColor:s.$16})})}),e.jsxs("div",{className:"flex flex-col space-y-0.5 flex-1 min-w-0",children:[e.jsx("div",{className:"text-sm",style:{color:s.$3},children:x(l)}),e.jsxs("div",{className:"flex w-full items-center space-x-1 text-xs truncate",style:{color:s.$17},children:[e.jsx("span",{className:"whitespace-nowrap",children:E(l.created_at,`${i} ${r}`)}),e.jsx("span",{children:"-"}),e.jsx("span",{children:l.ip})]})]})]},l.id))})})]})})}/** * Invoice Ninja (https://invoiceninja.com). * * @link https://github.com/invoiceninja/invoiceninja source repository * * @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com) * * @license https://www.elastic.co/licensing/elastic-license */function De(){return{isChrome:/Chrome/.test(navigator.userAgent)}}function Ie(){const[a]=T(),s=R(),{isChrome:n}=De(),[r,i]=g.useState(localStorage.getItem("displayChromeExtensionBanner"));return g.useEffect(()=>{r==="false"&&localStorage.setItem("displayChromeExtensionBanner","false")},[r]),r==="false"||!n?e.jsx(e.Fragment,{}):e.jsx(Fe,{variant:"orange",children:e.jsxs("div",{className:"flex items-center w-full justify-between py-1.5",children:[e.jsxs("div",{className:"flex justify-start items-center w-full space-x-3",children:[e.jsx(A,{element:de,color:s.$1,size:25}),e.jsxs("span",{style:{color:s.$1},children:[a("task_extension_banner"),"."]})]}),e.jsxs("div",{className:"flex items-center space-x-5 whitespace-nowrap",children:[e.jsx("span",{className:"cursor-pointer",onClick:()=>window.open("https://www.youtube.com/watch?v=UL0OklMJTEA"),style:{color:s.$1},children:a("watch_video")}),e.jsx("span",{className:"cursor-pointer",onClick:()=>window.open("https://chromewebstore.google.com/detail/invoice-ninja-tasks/dlfcbfdpemfnjbjlladogijcchfmmaaf?pli=1"),style:{color:s.$1},children:a("view_extension")}),e.jsx(A,{className:"cursor-pointer",element:ue,onClick:()=>i("false"),size:25,color:s.$1})]})]})})}function Ke(){const{documentTitle:a}=me("tasks"),[s]=T(),n=I(),r=_e(),i=xe(),c=[{name:s("tasks"),href:"/tasks"}],d=D(),u=he(),m=pe(),x=be(),t=fe(),[j,h]=g.useState(""),[v,p]=y(L),[b,k]=y(z),{data:f}=je({id:j});g.useEffect(()=>{f&&b&&p(f)},[f,b]),g.useEffect(()=>()=>k(!1),[]);const{changeTemplateVisible:l,setChangeTemplateVisible:N,changeTemplateResources:$}=ke();return e.jsxs(ge,{title:a,breadcrumbs:c,aboveMainContainer:e.jsx(Ie,{}),children:[e.jsx(Ce,{resource:"task",columns:m,customActions:d,endpoint:"/api/v1/tasks?include=status,client,project,user,assigned_user&without_deleted_clients=true&sort=id|desc",bulkRoute:"/api/v1/tasks/bulk",linkToCreate:"/tasks/create",linkToEdit:"/tasks/:id/edit",showEdit:o=>r(o),customFilters:u,customBulkActions:t,customFilterPlaceholder:"status",withResourcefulActions:!0,rightSide:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Se,{columns:x,defaultColumns:Te,table:"task"}),e.jsx(ve,{type:"component",component:e.jsx(Ee,{route:"/tasks/import"}),guards:[Ne(_("create_task"),_("edit_task"))]})]}),beforeFilter:(n("view_task")||n("edit_task"))&&e.jsx(w,{to:"/tasks/kanban",children:e.jsxs(we,{children:[e.jsx(ye,{size:20}),e.jsx("span",{children:"Kanban"})]})}),linkToCreateGuards:[_("create_task")],hideEditableOptions:!n("edit_task"),onTableRowClick:o=>{h(o.id),k(!0)},enableSavingFilterPreference:!0}),!i("task",v)&&e.jsx(Re,{}),e.jsx($e,{entity:"task",entities:$,visible:l,setVisible:N,labelFn:o=>e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx(B,{children:s("number")}),e.jsx("span",{children:o.number})]}),bulkLabelFn:o=>e.jsxs("div",{className:"flex space-x-2",children:[e.jsxs(B,{children:[s("number"),":"]}),e.jsx("span",{children:o.number})]}),bulkUrl:"/api/v1/tasks/bulk"})]})}export{Ke as default};
Copyright ©2021 || Defacer Indonesia