PageSourceSearch

https://matomeru-oiwai.jp/_next/static/chunks/pages/admin/tenants-f075dfa0242f3e1a.js

js matomeru-oiwai.jp collected 2026-10-08 20:01:59 UTC 10,503 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6422],{76034:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/tenants",function(){return t(48920)}])},85650:function(e,n,t){"use strict";t.d(n,{K:function(){return PrimaryButton}});var a=t(72253),o=t(85893),r=t(69417),i=t(85178),PrimaryButton=function(e){var n=e.onClick,t=e.text,s=e.disabled,l=e.sx;return(0,o.jsx)(r.Z,{onClick:n,variant:"contained",disabled:s,sx:(0,a._)({backgroundColor:i.Z.palette.primary.light,color:i.Z.palette.primary.contrastText,fontSize:"14px",width:144,height:40,borderRadius:"22px",":hover":{backgroundColor:i.Z.palette.primary.light,opacity:.8}},l),children:t})}},94942:function(e,n,t){"use strict";t.d(n,{m:function(){return GenericTableContainer}});var a=t(85893),o=t(67294),r=t(72882),i=t(90629),s=t(7906),l=t(53184),c=t(53816),d=t(53252),h=t(295),u=t(8896),g=t(26280),GenericTablePresentation=function(e){var n=e.columns,t=e.data,o=e.page,x=e.rowsPerPage,p=e.totalRows,f=e.handleChangePage,m=e.handleChangeRowsPerPage,P=e.handleSort,w=e.orderBy,C=e.orderDirection;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.Z,{component:i.Z,sx:{width:"100%",boxShadow:"none"},children:(0,a.jsxs)(s.Z,{sx:{width:"100%",overflowX:"auto"},children:[(0,a.jsx)(l.Z,{children:(0,a.jsx)(c.Z,{children:n.map(function(e){return e.sortable?(0,a.jsx)(d.Z,{align:e.align||"left",sx:{minWidth:e.minWidth,padding:"6px 0px 6px 16px",fontFamily:"Roboto",cursor:"pointer"},children:(0,a.jsx)(g.Z,{active:w===e.key,direction:w===e.key?C:"asc",onClick:function(){return P&&P(e.key)},sx:{"& .MuiTableSortLabel-icon":{fontSize:"14px",margin:"0px"}},children:e.label})},e.key):(0,a.jsx)(d.Z,{align:e.align||"left",sx:{minWidth:e.minWidth,padding:"6px 0px 6px 16px",fontFamily:"Roboto",fontSize:"14px"},children:e.label},e.key)})})}),(0,a.jsx)(h.Z,{children:t})]})}),(0,a.jsx)(u.Z,{rowsPerPageOptions:[10,25,100,250,500,1e3],component:"div",count:p,rowsPerPage:x,page:o,onPageChange:f,onRowsPerPageChange:m,sx:{".MuiToolbar-root":{display:"flex",p:"2px 0px",alignItems:"center"},".MuiTablePagination-selectLabel":{fontFamily:"Roboto",fontSize:"0.75rem"},".MuiInputBase-root":{mr:"26px"},".MuiSelect-select":{py:0,lineHeight:"1.5",fontFamily:"Roboto"},".MuiButtonBase-root":{padding:"12px"},".MuiTablePagination-displayedRows":{fontFamily:"Roboto",fontSize:"0.75rem",fontWeight:400},".MuiTablePagination-actions":{ml:"26px"}}})]})},GenericTableContainer=function(e){var n=e.columns,t=e.data,r=e.handleSort,i=e.orderBy,s=e.orderDirection,l=e.page,c=e.rowsPerPage,d=e.handleChangePage,h=e.handleChangeRowsPerPage,u=o.Children.toArray(t.props.children),g=u.slice(l*c,(l+1)*c);return(0,a.jsx)(GenericTablePresentation,{columns:n,data:g,page:l,rowsPerPage:c,handleChangePage:d,handleChangeRowsPerPage:h,totalRows:u.length,handleSort:r,orderBy:i,orderDirection:s})}},87129:function(e,n,t){"use strict";t.d(n,{n:function(){return CustomAdminError}});var a=t(85893),o=t(5616),r=t(15861),i=t(92382),CustomAdminError=function(e){var n=e.statusCode;return(0,a.jsx)(i.Z,{children:(0,a.jsxs)(o.Z,{sx:{display:"flex",justifyContent:"center",flexDirection:"column",my:20},children:[(0,a.jsx)(r.Z,{variant:"h3",sx:{textAlign:"center"},children:n}),(0,a.jsxs)(o.Z,{sx:{mt:3},children:[(0,a.jsx)(r.Z,{variant:"body1",sx:{textAlign:"center"},children:"エラーが発生しました"}),(0,a.jsx)(r.Z,{variant:"body1",sx:{textAlign:"center"},children:"継続的にエラーが発生する場合は、運用担当者にお問い合わせください"})]})]})})}},87336:function(e,n,t){"use strict";t.d(n,{P:function(){return useTablePagination}});var a=t(11010),o=t(91309),r=t(97582),i=t(11163),s=t(67294),useTablePagination=function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e3,l=(0,i.useRouter)(),c=parseInt(sessionStorage.getItem("".concat(l.asPath,"_page"))),d=parseInt(sessionStorage.getItem("".concat(l.asPath,"_rowsPerPage"))),h=(0,o._)((0,s.useState)(isNaN(c)?n:c-1),2),u=h[0],g=h[1],x=(0,o._)((0,s.useState)(isNaN(d)?t:d),2),p=x[0],f=x[1];return(0,s.useEffect)(function(){var handleBeforeUnload=function(){sessionStorage.removeItem("".concat(l.asPath,"_page")),sessionStorage.removeItem("".concat(l.asPath,"_rowsPerPage"))};return window.addEventListener("beforeunload",handleBeforeUnload),function(){window.removeEventListener("beforeunload",handleBeforeUnload)}},[l.asPath]),{page:u,rowsPerPage:p,handleChangePage:(0,s.useCallback)(function(e,n){g(n),sessionStorage.setItem("".concat(l.asPath,"_page"),String(n+1))},[l.asPath]),handleChangeRowsPerPage:(0,s.useCallback)(function(e){f(parseInt(e.target.value,10)),g(0),sessionStorage.setItem("".concat(l.asPath,"_rowsPerPage"),e.target.value)},[l.asPath]),setPage:g,setRowsPerPage:f,handleClickTableRow:(0,s.useCallback)((e=(0,a._)(function(e){return(0,r.Jh)(this,function(n){switch(n.label){case 0:return[4,l.push(e)];case 1:return n.sent(),[2]}})}),function(n){return e.apply(this,arguments)}),[l])}}},29506:function(e,n,t){"use strict";t.d(n,{p:function(){return useScrollRestoration}});var a=t(11163),o=t(67294),useScrollRestoration=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scrollPositions",n=(0,a.useRouter)();(0,o.useEffect)(function(){var t={};try{var a=sessionStorage.getItem(e);a&&(t=JSON.parse(a))}catch(e){t={}}var handleRouteChangeStart=function(){t[n.asPath]=window.scrollY;try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){console.error("Failed to save scroll positions in localStorage (".concat(e,")"))}},handleRouteChangeComplete=function(e){var n,a=null!==(n=t[e])&&void 0!==n?n:0;window.scrollTo({top:a,left:0,behavior:"smooth"})};return n.events.on("routeChangeStart",handleRouteChangeStart),n.events.on("routeChangeComplete",handleRouteChangeComplete),function(){n.events.off("routeChangeStart",handleRouteChangeStart),n.events.off("routeChangeComplete",handleRouteChangeComplete)}},[n,e])}},48920:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return tenants}});var a=t(85893),o=t(9008),r=t.n(o),i=t(11010),s=t(97582),l=t(51350),c=t(11163),d=t(67294),h=t(91444),u=t(87129),g=t(87336),x=t(29506),p=t(67819),f=t(55314),m=t(72253),P=t(14932),w=t(53816),C=t(53252),b=t(5616),v=t(21407),y=t(15861),j=t(69417),R=t(2734),_=t(85650),S=t(94942),Z=t(92382),k=[{label:"企業名",key:"companyName",minWidth:140},{label:"企業アカウント名",key:"displayName",minWidth:138},{label:"住所",key:"address",minWidth:200},{label:"テナントオーナー名",key:"owner_name",minWidth:100},{label:"登録日時",key:"created_at",minWidth:115}],T={display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal"},Tenants=function(e){var n=e.isLoading,t=e.handleCreateTenant,o=e.tenants,r=e.onClickTableRow,i=e.handleDownloadCsv,s=e.page,l=e.rowsPerPage,c=e.handleChangePage,h=e.handleChangeRowsPerPage,u=(0,R.Z)(),g=(0,d.useMemo)(function(){return(0,a.jsx)(a.Fragment,{children:null==o?void 0:o.map(function(e){return(0,a.jsxs)(w.Z,{hover:!0,sx:{cursor:"pointer",height:"52px"},onClick:function(){return r("/admin/tenants/update?id=".concat(e.id))},children:[(0,a.jsx)(C.Z,{sx:{width:"18.7%",py:1.4,fontFamily:"Roboto"},children:(0,a.jsx)(b.Z,{sx:(0,P._)((0,m._)({},T),{maxWidth:"196px"}),children:e.company_name})}),(0,a.jsx)(C.Z,{sx:{width:"18.7%",py:1.4,fontFamily:"Roboto"},children:(0,a.jsx)(b.Z,{sx:(0,P._)((0,m._)({},T),{maxWidth:"200px"}),children:e.display_name})}),(0,a.jsx)(C.Z,{sx:{width:"30%",py:1.4,fontFamily:"Roboto"},children:(0,a.jsx)(b.Z,{sx:(0,P._)((0,m._)({},T),{maxWidth:"250px",wordBreak:"break-word"}),children:e.address})}),(0,a.jsx)(C.Z,{sx:{width:"19.1%",py:1.4,fontFamily:"Roboto"},children:(0,a.jsx)(b.Z,{sx:(0,P._)((0,m._)({},T),{maxWidth:"200px",wordBreak:"break-word"}),children:e.owner_name})}),(0,a.jsx)(C.Z,{sx:{width:"10.9%",py:1.4,fontFamily:"Roboto"},children:e.created_at})]},e.id)})})},[o,r]);return(0,a.jsx)(v.Z,{theme:u,children:(0,a.jsxs)(Z.Z,{isLoading:n,children:[(0,a.jsxs)(b.Z,{sx:{pt:7,display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,a.jsx)(y.Z,{variant:"h1",sx:{fontSize:"24px"},children:"テナント企業一覧"}),(0,a.jsxs)(b.Z,{sx:{display:"flex",gap:2},children:[(0,a.jsx)(j.Z,{onClick:i,children:" CSVダウンロード"}),(0,a.jsx)(_.K,{onClick:t,text:"新規作成",sx:{position:"static",right:void 0}})]})]}),(0,a.jsx)(b.Z,{sx:{mt:3},children:(0,a.jsx)(S.m,{columns:k,data:g,page:s,rowsPerPage:l,handleChangePage:c,handleChangeRowsPerPage:h})})]})})},Container=function(){var e,n,t=(0,c.useRouter)(),o=(0,g.P)(),r=o.page,m=o.rowsPerPage,P=o.handleChangePage,w=o.handleChangeRowsPerPage,C=o.handleClickTableRow;(0,x.p)();var b=(0,d.useCallback)((0,i._)(function(){return(0,s.Jh)(this,function(e){switch(e.label){case 0:return[4,t.push("/admin/tenants/create")];case 1:return e.sent(),[2]}})}),[t]),v=(0,l.Z)(p.L.admin.tenants),y=v.data,j=v.error,R=v.isLoading;if(j)return(0,a.jsx)(u.n,{statusCode:null===(n=j.response)||void 0===n?void 0:n.status});var _=(e=(0,i._)(function(){var e;return(0,s.Jh)(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,p.L.admin.tenants.csv.get()];case 1:return e=n.sent(),(0,f.l)(e.body,"テナント一覧.csv"),[3,3];case 2:return n.sent(),h.toast.error("予期せぬエラーが発生しました"),[3,3];case 3:return[2]}})}),function(){return e.apply(this,arguments)});return(0,a.jsx)(Tenants,{isLoading:R,tenants:y,onClickTableRow:C,handleCreateTenant:b,handleDownloadCsv:_,page:r,rowsPerPage:m,handleChangePage:P,handleChangeRowsPerPage:w})},Component=function(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{children:(0,a.jsx)("title",{children:"テナント一覧 - 管理者用 | matomeru"})}),(0,a.jsx)(Container,{})]})},tenants=function(){return(0,a.jsx)(Component,{})}},55314:function(e,n,t){"use strict";t.d(n,{l:function(){return downloadBlobAsCsv}});var a=t(4914),o=t.n(a),downloadBlobAsCsv=function(e,n){if(navigator.userAgent.includes("Windows"))t=o().encode(e,"Shift_JIS"),a="text/csv;charset=Shift_JIS;";else{var t,a;t=new TextEncoder().encode("\uFEFF"+e),a="text/csv;charset=utf-8;"}var r=new Blob([t],{type:a}),i=document.createElement("a");i.href=URL.createObjectURL(r),i.download=n,document.body.appendChild(i),i.click(),document.body.removeChild(i)}},25832:function(){}},function(e){e.O(0,[6478,5675,5336,321,6202,3575,1488,5145,5281,2382,9774,2888,179],function(){return e(e.s=76034)}),_N_E=e.O()}]);

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.