PageSourceSearch

https://coenoma.com/_next/static/chunks/pages/[com_id]/admin/groups/new-59d43cbecd82cfbd.js

js coenoma.com collected 2026-09-24 19:11:50 UTC 8,403 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1faf6146-e5ca-4f95-982e-5417c18bdcfa",e._sentryDebugIdIdentifier="sentry-dbid-1faf6146-e5ca-4f95-982e-5417c18bdcfa")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1820],{58931:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[com_id]/admin/groups/new",function(){return t(75786)}])},40198:function(e,n,t){"use strict";t.d(n,{E:function(){return d}});var s=t(85893),i=t(67294),a=t(41664),l=t.n(a),o=t(99603),c=t(59417),r=t(11163);let d=e=>{let{menuItems:n}=e,[t,a]=(0,i.useState)(()=>"false"!==localStorage.getItem("adminSideMenuIsOpen")),d=(0,r.useRouter)();return(0,s.jsxs)("div",{className:"flex flex-col ".concat(t?"w-64":"w-[38px]"," bg-white border-r border-gray-100 transition-all duration-300 py-4 px-2"),children:[(0,s.jsx)("div",{className:"flex items-center justify-end",children:(0,s.jsx)("button",{onClick:()=>{a(e=>(localStorage.setItem("adminSideMenuIsOpen",String(!e)),!e))},className:"focus:outline-none w-[20px] h-[20px]",children:(0,s.jsx)(o.G,{icon:t?c.UXu:c.cLY,className:"text-primary w-[20px] h-[20px]"})})}),(0,s.jsx)("nav",{className:"flex flex-col overflow-y-auto px-3",children:n.map((e,n)=>(0,s.jsxs)(l(),{href:e.link,passHref:!0,className:"flex items-center py-3 px-2 text-gray-700 hover:bg-gray-100 rounded-lg transition-colors duration-200 text-[14px] ".concat(d.asPath.split("#")[0]===e.link?"font-bold text-primary":""),target:e.link.startsWith("http")?"_blank":"_self",children:[(0,s.jsx)("span",{className:"".concat(t?"transition-opacity duration-300 opacity-100 delay-100":"opacity-0"),children:e.name}),e.link.startsWith("http")&&(0,s.jsx)(o.G,{icon:c.Xjp,className:"ml-auto text-primary ".concat(t?"opacity-100 delay-300":"opacity-0")})]},n))})]})}},57713:function(e,n,t){"use strict";var s=t(85893),i=t(67294),a=t(11163),l=t(87536),o=t(47533),c=t(32143),r=t(81923),d=t(57632),u=t(11728),m=t(75153),p=t(28327),x=t(70852),f=t(80571),g=t(9779);
1n.Z=e=>{var n,t,v,y,h;let{initialData:b,isEditMode:j,onSubmit:w,ssoGroupSyncEnabled:N=!1}=e,_=(0,a.useRouter)().query.com_id,[E,S]=(0,i.useState)(""),k=i.useMemo(()=>(0,c.Z$)(null==b?void 0:b.slug),[null==b?void 0:b.slug]),{register:I,handleSubmit:U,formState:{errors:M},setValue:O,trigger:R,watch:Z}=(0,l.cI)({resolver:(0,o.X)(k),mode:"onBlur",defaultValues:{name:(null==b?void 0:b.name)||"",slug:(null==b?void 0:b.slug)||"",isActive:!j||null!==(h=null==b?void 0:b.isActive)&&void 0!==h&&h,icon:null}});(0,i.useEffect)(()=>{(async()=>{if(null==b?void 0:b.displayIconUrl)try{let e=await fetch(b.displayIconUrl),n=await e.blob(),t=new File([n],"icon",{type:n.type});O("icon",t),S(await (0,r.T)(t))}catch(e){console.log("Failed to load initial image: ",e)}})()},[null==b?void 0:b.displayIconUrl]);let A=U(async e=>{let n;let{name:t,slug:s,icon:i,isActive:a}=e,l="";l=j&&(null==b?void 0:b.id)?b.id:(0,d.Z)();let o="public",c="communities/".concat(_,"/groups/").concat(l),u="",m=i?await (0,r.T)(i):"";i&&m!==E?(u=await (0,x.c)(o,i,i.name,c),n=g.p.UPLOAD,(null==b?void 0:b.iconUrl)&&await (0,f.c)(o,b.iconUrl)):!i&&E?(u="",n=g.p.REMOVE,(null==b?void 0:b.iconUrl)&&await (0,f.c)(o,b.iconUrl)):n=g.p.KEEP;let p={id:l,name:t,isActive:a?"true":"false",comId:_,...(null==b?void 0:b.ssoSynced)&&N?{}:{slug:s||null}};n!==g.p.KEEP&&(p.iconUrl=u),w(p)});return(0,s.jsxs)("form",{onSubmit:A,className:"space-y-8 pb-12",children:[(null==b?void 0:b.ssoSynced)&&N&&(null==b?void 0:b.slug)&&(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"グループ識別子"}),(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("span",{className:"inline-block bg-gray-100 text-gray-700 text-sm px-3 py-2 rounded-md border border-gray-300",children:b.slug}),(0,s.jsx)("span",{className:"ml-3 text-xs text-gray-500",children:"SSO同期により自動設定されています。変更できません。"})]})]}),(!(null==b?void 0:b.ssoSynced)||!N)&&(0,s.jsxs)("div",{children:[(0,s.jsx)(u.Z,{id:"slug",label:"グループ識別子",inputRef:I("slug"),errorMessage:null===(n=M.slug)||void 0===n?void 0:n.message,placeholder:"例: dev, marketing, sales"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"半角英小文字・数字・ハイフン・アンダーバー・ドットが使用可能です。省略可能です。"})]}),(0,s.jsx)(u.Z,{id:"name",label:"グループ名",inputRef:I("name"),required:!0,errorMessage:null===(t=M.name)||void 0===t?void 0:t.message}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)(m.Z,{id:"icon",label:"アイコン",onFileSelected:e=>{O("icon",e),R("icon")},imageFileUrl:null==b?void 0:b.displayIconUrl,inputRef:I("icon").ref,errorMessage:null===(v=M.icon)||void 0===v?void 0:v.message}),(0,s.jsx)("p",{className:"mt-2 text-xs text-gray-500",children:"現在、アイコンはリスナー向け画面には表示されません。今後のアップデートで、グループ一覧などに表示される予定です。"})]}),(0,s.jsx)(p.Z,{id:"isActive",label:"グループの有効・無効",checkboxText:"このグループを有効にする",isChecked:Z("isActive"),onChange:e=>O("isActive",e),required:!0,errorMessage:null===(y=M.isActive)||void 0===y?void 0:y.message}),j&&(null==b?void 0:b.ssoSynced)&&N&&(0,s.jsx)("p",{className:"text-xs text-gray-500",children:"※ SSO同期グループを無効にすると、リスナー向け画面でこのグループが非表示になります。SSOによるメンバーの自動割り当ては継続されます。"}),(0,s.jsx)("button",{type:"submit",className:"button form-button mt-6",children:j?"更新する":"登録する"})]})}},93348:function(e,n,t){"use strict";t.d(n,{l:function(){return d}});var s=t(67294),i=t(11163),a=t(76569),l=t(5160),o=t(12011),c=t(37467),r=t(84657);let d=()=>{let{community:e,setErrorMessage:n}=(0,a.s)(),{userInfo:t}=(0,l.P)(),d=(0,i.useRouter)(),u=d.query.com_id;(0,s.useEffect)(()=>{if(e&&!(0,c.M)(t)&&!e.canGroup){n((0,o.x)(r.V.GROUP_ACCESS));let e=u?"/".concat(u,"/admin"):"/";d.replace(e)}},[e,t,u,d,n])}},75786:function(e,n,t){"use strict";t.r(n);var s=t(85893),i=t(11163),a=t(76569),l=t(12915),o=t(75621),c=t(93348),r=t(49170),d=t(40198),u=t(8201),m=t(57713),p=t(85352),x=t(91108),f=t(62319),g=t(84657),v=t(12011);n.default=()=>{let e=(0,i.useRouter)(),n=e.query.com_id,{loading:t}=(0,l.Q)(),{isUserAdmin:y}=(0,o.G)(),{setSuccessMessage:h,setErrorMessage:b,checkedCommunityAuth:j}=(0,a.s)();(0,c.l)();let w=async t=>{try{await (0,f.Z)(t),h("新しいグループが作成されました。"),e.pathname!=="/".concat(n,"/admin/groups")&&e.push("/".concat(n,"/admin/groups"))}catch(e){console.error(e),b((0,v.x)(g.V.CREATE_GROUP,e))}};return t||!y?(0,s.jsx)(p.a,{}):j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.p,{pageTitle:"グループ作成"}),(0,s.jsxs)("div",{className:"flex",children:[(0,s.jsx)(d.E,{menuItems:(0,u.E)(n)}),(0,s.jsxs)("div",{className:"main-content form-container w-full",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-gray-800 mb
1-4",children:"グループ作成"}),(0,s.jsx)(m.Z,{isEditMode:!1,onSubmit:w})]})]})]}):(0,s.jsx)(x.M,{})}},62319:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var s=t(87066);async function i(e){var n,t,i;let a=await s.Z.post("/api/admin/groups/save_group",e);if(!(null===(n=a.data)||void 0===n?void 0:n.success))throw Error((null===(i=a.data)||void 0===i?void 0:null===(t=i.error)||void 0===t?void 0:t.message)||"グループ保存に失敗しました");return a.data.data}},8201:function(e,n,t){"use strict";t.d(n,{E:function(){return s}});let s=(e,n)=>{let t=[{name:"グループ一覧",link:"/".concat(e,"/admin/groups")},{name:"グループ作成",link:"/".concat(e,"/admin/groups/new")}];return n&&t.push({name:"メンバー一覧",link:"/".concat(e,"/admin/groups/").concat(n,"/members")},{name:"メンバーの追加",link:"/".concat(e,"/admin/groups/").concat(n,"/add")},{name:"グループ編集",link:"/".concat(e,"/admin/groups/").concat(n,"/edit")},{name:"メンバーの一括追加・削除",link:"/".concat(e,"/admin/groups/").concat(n,"/import")}),t}}},function(e){e.O(0,[9100,1281,9766,8901,5650,2881,5098,2888,9774,179],function(){return e(e.s=58931)}),_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.