PageSourceSearch

https://secure-static.fattureincloud.it/0214dc791091ff2a97b15f5961…/assets/CouponsPassListPage-0EZOwrWD.js

js fattureincloud.it collected 2026-09-24 15:34:46 UTC 4,496 bytes, 1 lines download raw bytes

1import{j as e,hC as a,z as j,aj as T,r as s,h as A,gh as E,ar as b,as as L,bN as W,m0 as O,m7 as k,lH as v,hD as P}from"./index-D_dQ-BFB.js";import{a as n}from"./Coupon-iEBKWdbh.js";import{u as R}from"./useTableHooks-Bp8sLs03.js";import{D as w}from"./DropdownFilter-xsEi2CCF.js";import{F}from"./mapRoutes-Cr_1mcVK.js";import{E as z}from"./ExportTable-CEvQ842q.js";import{T as N}from"./TableEmptyState-DDLgW_M1.js";import{C as I,B as _,D as B,m as G,u as H,a as q,L as U}from"./useCouponListActions-HRAUnzlB.js";import{u as J}from"./useGetCouponsList-Dn49h_3Q.js";import{E as K}from"./ExpireDateCell-CTZgkVpL.js";import{u as M}from"./UserInfoBox-aF40YLiO.js";import"./InternalApp-C-U8Jp7C.js";import"./FICModule-BI6p5Wv-.js";import"./FICPageSection-Brf0JMFJ.js";import"./FICModuleTitle-A_4OZkPW.js";import"./FICInputText-Cwq5zut8.js";import"./FICTooltip-DGDuV156.js";import"./ValidatedInput-C4tYzeNv.js";import"./useCompanyRegistryActivationPermissions-DhTJTrrc.js";import"./VaporIconBase-DvvmLZlU.js";import"./IssuedDocumentHelper-BOmBp-1l.js";import"./FICAutocomplete-DPXEfSzf.js";import"./FICFormGenerator-Y9FfOYfi.js";import"./index-DTS-NSog.js";import"./FICLabel-DuSf2A65.js";import"./teamSystemLogoColor-DFKF4ZWW.js";import"./NotificationSentModalBody-YlLig0u9.js";import"./usePersonSelector-tDog1Hxn.js";import"./SidesStyle-CI8Sip98.js";import"./ComponentWithHooks-CGj-qLxB.js";import"./objectUtils-D_z3nHwI.js";import"./timeUtils-wl9JyQyd.js";import"./FICTooltip-CkP4LUmG.js";import"./passwordHelper-CRDXaAEs.js";import"./validators-DdErpdqQ.js";import"./App-Dm9WebCa.js";import"./useGetUrlSub-3-PE2XL6.js";import"./useWithoutHelp-DLOyFsSj.js";import"./styled-Bnd4mf_n.js";const Q=[{field:"is_used",name:"STATO COUPON ONLINE",values:[{label:"Disponibile",value:"0",operator:"="},{label:"Assegnato",value:"1",operator:"="}]}],V=[{columnDefType:a.ACCESSOR,key:"code",columnDef:{header:"Codice Coupon Online",minWidth:150,maxWidth:250,customCell:o=>e.jsx(I,{...o.original})}},{columnDefType:a.ACCESSOR,key:"couponType",columnDef:{header:"Tipologia",minWidth:150,maxWidth:150,customCell:()=>e.jsx("div",{style:{padding:"0px 8px"},children:"Premium Plus"})}},{columnDefType:a.ACCESSOR,key:"expiresAt",columnDef:{header:"Scadenza",minWidth:110,maxWidth:110,customCell:o=>e.jsx(K,{date:o.original.expiresAt})}},{columnDefType:a.ACCESSOR,key:"year",columnDef:{align:"center",header:"Anno",minWidth:90,maxWidth:90,customCell:o=>e.jsx(j,{centered:!0,children:o.original.year})}},{columnDefType:a.ACCESSOR,key:"company",columnDef:{enableSorting:!1,header:"Disponibile",minWidth:90,maxWidth:90,customCell:o=>e.jsx(_,{value:!o.original.company})}},{columnDefType:a.ACCESSOR,key:"id",columnDef:{id:"company.name",enableSorting:!1,header:"Assegnato a",minWidth:200,customCell:o=>e.jsx("div",{style:{padding:"0px 8px"},children:o.original.company?.name??""})}},{columnDefType:a.ACCESSOR,key:"id",columnDef:{id:"company.useDate",enableSorting:!1,header:"Data di applicazione",minWidth:130,maxWidth:130,customCell:o=>e.jsx(B,{date:o.original.company?.useDate,leaveEmpty:!0})}}],Fe=()=>{const o=T(),{pathname:d}=M(),[i,C]=s.useState([]),[h,r]=s.useState(!0),l=s.useCallback(()=>{r(!0),A.get({request:"/accountant/coupons/counters"}).then(t=>t.data.data).then(t=>Object.entries(t).reduce((c,[S,D])=>{const u=E(D,{deep:!1});return c[S]=u[n.PASS]?{[n.PASS]:u[n.PASS]}:{},c},{})).then(t=>C(G(t))).catch(t=>console.log(t)).finally(()=>r(!1))},[]),{coupons:p,listLoading:m,loadCoupons:x}=J("pass");s.useEffect(l,[l]);const{setFilters:f,setSort:g}=R(x),y=H();return e.jsxs(q,{children:[e.jsx(F,{onClick:()=>o(-1),leftIcon:{icon:b,color:"grey"},style:{marginBottom:32},children:e.jsxs(L,{color:"grey",children:["Torna a"," ",d?.includes("accountant_coupons")?"Gestione Licenze":"I tuoi clienti"]})}),h?e.jsx(U,{children:e.jsx(W,{})}):i.length>0&&e.jsx(O,{items:i,maxElementsPerRow:i.length<10?3:4}),e.jsxs(k,{style:{marginTop:16},children:[e.jsxs(v,{style:{justifyContent:"flex-end"},children:[e.jsx(w,{applyFilters:t=>f(t),filters:Q}),e.jsx(z,{disabled:m||p.length<=0,exportFilename:"Export_coupon_online.xlsx",exportUrl:"/accountant/coupons/export?view=pass"})]}),e.jsx(P,{uniqueId:"id",columns:V,data:p,isLoading:m,rowSize:56,headerSize:56,noPagination:!0,enableSettings:!1,rowActions:y,sortable:!0,showScrollShadows:!0,actionColumnWidth:128,onSort:t=>g([t]),renderEmptyState:()=>e.jsx(N,{title:"Nessun Coupon Online trovato",description:"Modifica o rimuovi i filtri di ricerca"})})]})]})};export{Fe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.