1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2256],{49292:(e,a,c)=>{"use strict";c.r(a),c.d(a,{default:()=>j});var s=c(37876),d=c(94250),t=c.n(d),r=c(14232),i=c(77328),l=c.n(i),n=c(48230),o=c.n(n);let x="/api/admin/quantity-limits";function j(){let[e,a]=(0,r.useState)([]),[c,d]=(0,r.useState)(""),[i,n]=(0,r.useState)(!0),[j,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),[p,b]=(0,r.useState)(""),[f,g]=(0,r.useState)(!1),N=(0,r.useCallback)(async()=>{n(!0),u("");try{let e=await fetch(x,{credentials:"same-origin"});if(!e.ok)return void u(401===e.status?"èªè¨¼ãå¿
è¦ã§ããåèªã¿è¾¼ã¿ãã¦ãã ããã":"è¨å®ã®åå¾ã«å¤±æãã¾ããã");let c=await e.json();a(Array.isArray(c.limits)?c.limits:[]),d(c.siteId||""),g(!1)}catch(e){u("éä¿¡ã«å¤±æãã¾ããã")}finally{n(!1)}},[]);(0,r.useEffect)(()=>{N()},[N]);let y=(e,c)=>{a(a=>a.map((a,s)=>s===e?{...a,...c}:a)),g(!0),b("")},k=async()=>{m(!0),u(""),b("");try{let c=await fetch(x,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({limits:e.map(e=>({handle:e.handle,maxQuantity:Number(e.maxQuantity),note:e.note||""}))})}),s=await c.json();if(!c.ok||!s.success)return void u(s.error||"ä¿åã«å¤±æãã¾ããã");a(Array.isArray(s.limits)?s.limits:[]),g(!1),b("ä¿åãã¾ãããåæ ã¾ã§æå¤§30ç§ãããã¾ãã")}catch(e){u("éä¿¡ã«å¤±æãã¾ããã")}finally{m(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(l(),{children:[(0,s.jsx)("title",{className:"jsx-203ce0aced15e258",children:"æ°éå¶éè¨å® | Admin"}),(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow",className:"jsx-203ce0aced15e258"}),(0,s.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1",className:"jsx-203ce0aced15e258"})]}),(0,s.jsxs)("div",{className:"jsx-203ce0aced15e258 page",children:[(0,s.jsxs)("header",{className:"jsx-203ce0aced15e258 head",children:[(0,s.jsx)(o(),{href:"/admin/contents-mgr",className:"back",children:"â 管çã¡ãã¥ã¼ã¸æ»ã"}),(0,s.jsx)("h1",{className:"jsx-203ce0aced15e258",children:"æ°éå¶éè¨å®"}),(0,s.jsxs)("p",{className:"jsx-203ce0aced15e258 sub",children:["ååãã³ãã«ï¼slugï¼åä½ã§ããã²ã¨ãæ§Nç¹ã¾ã§ããè¨å®ãã¾ãã",c?"ã対象ãµã¤ã: ".concat(c):""]})]}),(0,s.jsxs)("main",{className:"jsx-203ce0aced15e258 body",children:[(0,s.jsx)("section",{className:"jsx-203ce0aced15e258 guide",children:(0,s.jsxs)("ul",{className:"jsx-203ce0aced15e258",children:[(0,s.jsxs)("li",{className:"jsx-203ce0aced15e258",children:[(0,s.jsx)("strong",{className:"jsx-203ce0aced15e258",children:"åä¸ãã³ãã«ã§ããã°ãµã¤ãºéãï¼å¥SKUã»å¥EANï¼ãåç®"}),"ãã¦ã«ã¦ã³ããã¾ãã"]}),(0,s.jsx)("li",{className:"jsx-203ce0aced15e258",children:"ã«ã¼ãå
ã®åè¨ãä¸éãè¶
ãã追å ã»æ°é夿´ã¯ããµã¼ãã¼å´ã§æå¦ããã¾ãã"}),(0,s.jsx)("li",{className:"jsx-203ce0aced15e258",children:"ãã³ãã«ã¯ååãã¼ã¸URLã®æ«å°¾ã§ããååãã¼ã¸ã®URLããã®ã¾ã¾è²¼ãä»ãã¦ãæ§ãã¾ããã"}),(0,s.jsx)("li",{className:"jsx-203ce0aced15e258",children:"ãã®è¨å®ã¯ãã®ãµã¤ãå°ç¨ã§ããä»ãµã¤ãã®è¨å®ã«ã¯å½±é¿ãã¾ããã"})]})}),h&&(0,s.jsx)("p",{className:"jsx-203ce0aced15e258 alert error",children:h}),p&&(0,s.jsx)("p",{className:"jsx-203ce0aced15e258 alert ok",children:p}),i?(0,s.jsx)("p",{className:"jsx-203ce0aced15e258 muted",children:"èªã¿è¾¼ã¿ä¸â¦"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("table",{className:"jsx-203ce0aced15e258",children:[(0,s.jsx)("thead",{className:"jsx-203ce0aced15e258",children:(0,s.jsxs)("tr",{className:"jsx-203ce0aced15e258",children:[(0,s.jsx)("th",{style:{width:"32%"},className:"jsx-203ce0aced15e258",children:"ååãã³ãã«ï¼slugï¼"}),(0,s.jsx)("th",{style:{width:"12%"},className:"jsx-203ce0aced15e258",children:"ä¸éåæ°"}),(0,s.jsx)("th",{className:"jsx-203ce0aced15e258",children:"ã¡ã¢"}),(0,s.jsx)("th",{style:{width:"16%"},className:"jsx-203ce0aced15e258",children:"æçµæ´æ°"}),(0,s.jsx)("th",{style:{width:"8%"},className:"jsx-203ce0aced15e258"})]})}),(0,s.jsxs)("tbody",{className:"jsx-203ce0aced15e258",children:[0===e.length&&(0,s.jsx)("tr",{className:"jsx-203ce0aced15e258",children:(0,s.jsx)("td",{colSpan:5,className:"jsx-203ce0aced15e258 muted center",children:"è¨å®ã¯ã¾ã ããã¾ããããè¡ã追å ãããç»é²ãã¦ãã ããã"})}),e.map((e,c)=>(0,s.jsxs)("tr",{className:"jsx-203ce0aced15e258",children:[(0,s.jsx)("td",{className:"jsx-203ce0aced15e258",children:(0,s.jsx)("input",{type:"text",value:e.handle,onChange:e=>y(c,{handle:e.target.value}
1),placeholder:"ä¾: 1d000008",className:"jsx-203ce0aced15e258"})}),(0,s.jsx)("td",{className:"jsx-203ce0aced15e258",children:(0,s.jsx)("input",{type:"number",min:1,max:99,value:e.maxQuantity,onChange:e=>y(c,{maxQuantity:Number(e.target.value)}),className:"jsx-203ce0aced15e258"})}),(0,s.jsx)("td",{className:"jsx-203ce0aced15e258",children:(0,s.jsx)("input",{type:"text",value:e.note||"",onChange:e=>y(c,{note:e.target.value}),placeholder:"ä¾: D-AIR ROAD ã·ã¼ã«ãã¸ã§ãã¬ã¼ã¿ã¼",className:"jsx-203ce0aced15e258"})}),(0,s.jsx)("td",{className:"jsx-203ce0aced15e258 muted small",children:function(e){if(!e)return"â";let a=new Date(e);return Number.isNaN(a.getTime())?"â":a.toLocaleString("ja-JP",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}(e.updatedAt)}),(0,s.jsx)("td",{className:"jsx-203ce0aced15e258",children:(0,s.jsx)("button",{type:"button",onClick:()=>{a(e=>e.filter((e,a)=>a!==c)),g(!0),b("")},className:"jsx-203ce0aced15e258 danger",children:"åé¤"})})]},c))]})]}),(0,s.jsxs)("div",{className:"jsx-203ce0aced15e258 actions",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{a(e=>[...e,{handle:"",maxQuantity:2,note:""}]),g(!0),b("")},className:"jsx-203ce0aced15e258",children:"è¡ã追å "}),(0,s.jsx)("button",{type:"button",onClick:k,disabled:j||!f,className:"jsx-203ce0aced15e258 primary",children:j?"ä¿åä¸â¦":f?"ä¿åãã":"夿´ãªã"}),(0,s.jsx)("button",{type:"button",onClick:N,disabled:j,className:"jsx-203ce0aced15e258",children:"åèªã¿è¾¼ã¿"})]})]})]})]}),(0,s.jsx)(t(),{id:"203ce0aced15e258",children:'.page.jsx-203ce0aced15e258{min-height:100vh;background-color:#fff;color:#000;font-family:"Montserrat","Noto Sans JP",sans-serif}.head.jsx-203ce0aced15e258{background-color:#000;color:#fff;padding:20px 24px;position:sticky;top:0;z-index:100}.head.jsx-203ce0aced15e258 h1.jsx-203ce0aced15e258{margin:8px 0 4px;font-size:1.35rem}.sub.jsx-203ce0aced15e258{margin:0;font-size:.8rem;color:#bbb}.back.jsx-203ce0aced15e258{color:#999;font-size:.8rem;text-decoration:none}.back.jsx-203ce0aced15e258:hover{color:#fff}.body.jsx-203ce0aced15e258{padding:24px;max-width:1100px}.guide.jsx-203ce0aced15e258{background-color:#f8f9fa;border:1px solid#e5e7eb;border-radius:8px;padding:14px 18px;margin-bottom:18px}.guide.jsx-203ce0aced15e258 ul.jsx-203ce0aced15e258{margin:0;padding-left:1.1rem}.guide.jsx-203ce0aced15e258 li.jsx-203ce0aced15e258{font-size:.82rem;line-height:1.8;color:#444}.alert.jsx-203ce0aced15e258{padding:10px 14px;border-radius:6px;font-size:.85rem;margin:0 0 14px}.alert.error.jsx-203ce0aced15e258{background-color:#fef2f2;color:#dc2626;border:1px solid#fecaca}.alert.ok.jsx-203ce0aced15e258{background-color:#f0fdf4;color:#2c5530;border:1px solid#bbf7d0}table.jsx-203ce0aced15e258{width:100%;border-collapse:collapse}th.jsx-203ce0aced15e258,td.jsx-203ce0aced15e258{border-bottom:1px solid#e5e7eb;padding:10px 8px;text-align:left;vertical-align:middle}th.jsx-203ce0aced15e258{font-size:.75rem;color:#666;font-weight:600;border-bottom:2px solid#d1d5db}input.jsx-203ce0aced15e258{width:100%;padding:8px 10px;border:1px solid#d1d5db;border-radius:4px;font-size:.9rem;font-family:inherit}input.jsx-203ce0aced15e258:focus{outline:none;border-color:#2c5530}.actions.jsx-203ce0aced15e258{display:flex;gap:10px;margin-top:18px}button.jsx-203ce0aced15e258{padding:9px 18px;border:1px solid#d1d5db;border-radius:4px;background-color:#fff;font-size:.85rem;font-family:inherit;cursor:pointer}button.jsx-203ce0aced15e258:hover:not(:disabled){background-color:#f3f4f6}button.primary.jsx-203ce0aced15e258{background-color:#000;border-color:#000;color:#fff}button.primary.jsx-203ce0aced15e258:disabled{background-color:#9ca3af;border-color:#9ca3af;cursor:not-allowed}button.danger.jsx-203ce0aced15e258{color:#dc2626;border-color:#fecaca}.muted.jsx-203ce0aced15e258{color:#666;font-size:.85rem}.small.jsx-203ce0aced15e258{font-size:.75rem}.center.jsx-203ce0aced15e258{text-align:center;padding:28px 8px}'})]})}},70193:(e,a,c)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/quantity-limits",function(){return c(49292)}])}},e=>{e.O(0,[8230,636,6593,8792],()=>e(e.s=70193)),_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.