1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44909],{22407:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/health-insurance-outside-reservation/health-insurance-menus/[health-insurance-menu_id]",function(){return n(18255)}])},27501:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var i=n(97975);const a=e=>({app_liff_url:e.app_liff_url||"",app_liff_id:e.app_liff_id||"",reservation_liff_url:e.reservation_liff_url||"",reservation_liff_id:e.reservation_liff_id||"",add_link:e.add_link||"",messaging_api_access_token:e.messaging_api_access_token||"",is_auto_reply:e.is_auto_reply,bot_user_id:e.bot_user_id});var r=n(44074),l=n(53947);const s=()=>{const{loading:e,client:t}=(0,r.O_)(),{ability:n}=(0,l.ew)();return(0,i.Jh)(e||!n.can("read","LINE")?null:t.brand_line_settings,void 0,a)}},71294:function(e,t,n){"use strict";n.d(t,{G5:function(){return b},vm:function(){return m},Bl:function(){return g}});var i=n(99562),a=n(87442),r=n(2784),l=n(97975),s=n(61187),u=n(27501),o=n(1407),c=n(14577);const _=e=>({app_liff_url:e.app_liff_url||"",app_liff_id:e.app_liff_id||"",reservation_liff_url:e.reservation_liff_url||"",reservation_liff_id:e.reservation_liff_id||"",add_link:e.add_link||"",messaging_api_access_token:e.messaging_api_access_token||"",is_auto_reply:e.is_auto_reply,bot_user_id:e.bot_user_id,webhook_urls:e.webhook_urls}),d=e=>new c.fB({app_liff_url:e.app_liff_url,app_liff_id:e.app_liff_id,reservation_liff_url:e.reservation_liff_url,reservation_liff_id:e.reservation_liff_id,add_link:e.add_link,messaging_api_access_token:e.messaging_api_access_token,is_auto_reply:e.is_auto_reply,webhook_urls:e.webhook_urls});var f=n(44074),p=n(53947),h=n(65384),v=n(17447);const b=()=>{const{loading:e,client:t}=(0,f.O_)(),{ability:n}=(0,p.ew)();return(0,l.Jh)(e||!n.can("read","LINE")?null:t.line_settings,void 0,_)},m=()=>{const{clinic:e}=(0,s.rh)(),{data:t}=b(),{data:n}=(0,u.M)(),i=(0,r.useMemo)((()=>{if(t&&e)return null!=t.reservation_liff_url&&""!==t.reservation_liff_url?t:n}),[t,n,e]);return{lineSettings:i,isLineQREnabled:null!=i&&""!==i.add_link&&""!==i.app_liff_url,getLiffUrl:i=>{let{paths:a,queries:r}=i;return(0,o.G)({clinicLiffUrl:null===t||void 0===t?void 0:t.reservation_liff_url,brandLiffUrl:null===n||void 0===n?void 0:n.reservation_liff_url,clinicId:null===e||void 0===e?void 0:e.clinic_id,paths:a,queries:r})}}},g=()=>{const{client:e}=(0,f.O_)(),{ability:t}=(0,p.ew)(),{enqueueSnackbar:n}=(0,a.Ds)(),{t:r}=(0,i.QT)(v.s),{mutate:l}=(0,h.bv)(e.line_settings);return{handleUpdate:async i=>{if(!t.can("write","LINE"))return n(r("{subject}\u306e{action}\u6a29\u9650\u304c\u3042\u308a\u307e\u305b\u3093",{action:r("\u7de8\u96c6"),subject:r("LINE")}),{variant:"error"}),!1;const a=d(i);if(a.isFailure())return!1;return await e.line_settings.$put({body:a.value}).then((()=>(l(),!0))).catch((()=>!1))}}}},1407:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});const i=e=>{let{clinicLiffUrl:t,brandLiffUrl:n,clinicId:i,paths:a,queries:r}=e;const l=a.join("/");if(t){const e=new URLSearchParams({...r}).toString();return"".concat(t,"/").concat(l).concat(e?"?".concat(e):"")}if(n){const e=new URLSearchParams({...r||{},...i?{c:i}:{}}).toString();return"".concat(n,"/").concat(l).concat(e?"?".concat(e):"")}return null}},96400:function(e,t,n){"use strict";n.d(t,{V:function(){return a}});var i=n(5632);const a=()=>{const e=(0,i.useRouter)(),t=()=>{const t=new URLSearchParams,{path:n,per_page:i,page:a}=e.query;return"string"===typeof n&&t.set("path",n),"string"===typeof i&&t.set("per_page",i),"string"===typeof a&&t.set("page",a),t};return{createQueryParamsForList:t,createPathWithQueryForList:e=>{const n=t().toString();return"".concat(e).concat(n?"?".concat(n):"")}}}},18255:function(e,t,n){"use strict";n.r(t);var i=n(52903),a=n(72561),r=n(99562),l=n(69141),s=n(19068),u=n(42541),o=n(39989),c=n(40658),_=n(5632),d=n(87442),f=n(2784),p=n(94652),h=n(24521),v=n(53144),b=n(45910),m=n(1391),g=n(84897),y=n(61187),k=n(71294),Z=n(20569),E=n(60847),L=n(71774),w=n(76503),N=n(44074),S=n(53947),R=n(96400),I=n(17447);const U=(0,a.VD)(I.s,"\u4fdd\u967a\u30e1\u30cb\u30e5\u30fc\u7de8\u96c6"),x=()=>{const{loading:e}=(0,N.O_)(),t=(0,_.useRouter)(),{t:n}=(0,r.QT)(I.s),{clinic:a}=(0,y.rh)(),{getLiffUrl:g}=(0,k.vm)(),U=t.query["health-insurance-menu_id"],{enqueueSnackbar:x}=(0,d.Ds)(),{createPathWithQueryForList:O}=(0,R.V)(),{data:P,mutate:T}=(0,Z.jb)(U),{handleUpdate:A,handleDelete:j}=(0,Z.hP)(T),{ability:q}=(0,S.ew)(),B=(0,f.useRef)(null),[D,H]=(0,f.useState)(),{data:X}=(0,L.N5)(),{data:C}=(0,w.NY)(),F=(0,f.useMemo)((()=>{var e;return[{label:n("\u672a\u8a2d\u5b9a"),value:""},...null!==(e=null===C||void 0===C?void 0:C.map((e=>({label:e.name,value:e.id}))))&&void 0!==e?e:[]]}),[C,n]);(0,f.useEffect)((()=>{var e;P&&!D&&H({...P,reservation_slot_schedule_master_id:null!==(e=P.reservation_slot_schedule_master_id)&&void 0!==e?e:""})}),[P]);const W=a?"".concat("https://reservation.medical-force.com","/c/").concat(a.clinic_id,"/insurance-reservations?menu_id=").concat(U):null,M=g({paths:["insurance-reservations"],queries:{menu_id:U}}),Q=(e,t)=>{var n;const i=null!==(n=null===D||void 0===D?void 0:D.operations)&&void 0!==n?n:[],a=i[e];if(null==a)return;const r=i.reduce(((n,i,r)=>r===e?n:r===t?e<t?[...n,i,a]:[...n,a,i]:[...n,i]),[]);H((e=>e?{...e,operations:r}:e))};return q.can("read","HEALTH_INSURANCE_RESERVATION")?null==U?null:!P||e?(0,i.tZ)(b.O,{}):(0,i.BX)(i.HY,{children:[(0,i.tZ)(m.O,{ref:e=>e&&e instanceof HTMLElement&&null==e.getAttribute("data-testid")&&e.setAttribute("data-testid","Component"),info:[{breadcrumb:null!==(V=P.name)&&void 0!==V?V:n("\u8a73\u7d30"),path:"/health-insurance-outside-reservation/health-insurance-menus/[health-insurance-menu_id]"}]}),(0,i.tZ)(l.ZP,{ref:B,container:!0,justifyContent:"space-between",spacing:1,children:(0,i.tZ)(l.ZP,{item:!0,xs:12,children:(0,i.tZ)(p.o,{resourceName:n("\u4fdd\u967a\u30e1\u30cb\u30e5\u30fc"),handleDelete:async()=>
1{if(!D)return;await j(D.id)&&(x(n("{0}\u3092\u524a\u9664\u3057\u307e\u3057\u305f",[n("\u4fdd\u967a\u30e1\u30cb\u30e5\u30fc")]),{variant:"success"}),await t.push(O("/health-insurance-outside-reservation/health-insurance-menus")))},loading:!D,disabled:!q.can("write","HEALTH_INSURANCE_RESERVATION"),fields:[{name:"name",label:n("\u30e1\u30cb\u30e5\u30fc\u540d"),type:"text",isRequired:!0},{name:"internal_name",label:n("\u5185\u90e8\u8868\u793a\u540d"),type:"text"},{name:"description",label:n("\u8aac\u660e\u6587"),type:"textarea"},{name:"priority",label:n("\u512a\u5148\u9806\u4f4d"),type:"number",allowNegative:!0},{name:"is_hide",label:n("\u3053\u306e\u9662\u3067\u306f\u975e\u8868\u793a\u306b\u3059\u308b"),type:"bool"},{name:"reservation_slot_view",label:n("\u4e88\u7d04\u306e\u53d7\u4ed8\u65b9\u6cd5"),type:"enum",values:[{value:"calendar",label:n("\u6642\u9593\u5e2f\u4e88\u7d04")},{value:"queue",label:n("\u9806\u756a\u5f85\u3061\u4e88\u7d04")}]},{name:"reservation_slot_schedule_master_id",label:n("\u4e88\u7d04\u67a0"),type:"enum",values:F},{name:"",label:"",type:"jsx",callback:()=>{var e;return(0,i.tZ)(h.n,{label:n("\u30e1\u30cb\u30e5\u30fc\u306b\u542b\u3081\u308b\u65bd\u8853"),fullWidth:!0,options:null!==X&&void 0!==X?X:[],data:null!==(e=null===D||void 0===D?void 0:D.operations)&&void 0!==e?e:[],getOptionLabel:e=>e.displayName,setData:e=>H((t=>t?{...t,operations:[...e]}:t))})}},{name:"",label:"",type:"jsx",callback:()=>{var e;return(0,i.tZ)(E.Y,{inputOperations:null!==(e=null===D||void 0===D?void 0:D.operations)&&void 0!==e?e:[],onDragEnd:Q})}}],subFields:[{name:"",label:"",type:"jsx",callback:()=>(0,i.BX)(s.Z,{gap:1,children:[(0,i.tZ)(u.Z,{fontWeight:"bold",children:n("\u3053\u306e\u30e1\u30cb\u30e5\u30fc\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u5c0e\u7dda")}),P.menu_entrances.length>0?P.menu_entrances.map((e=>(0,i.BX)(s.Z,{direction:"row",alignItems:"center",gap:1,children:[(0,i.tZ)(v.g,{href:"/health-insurance-outside-reservation/health-insurance-menu-entrances/".concat(e.id),textStyle:"link",children:e.name}),e.is_hide&&(0,i.tZ)(o.Z,{label:n("\u975e\u8868\u793a"),size:"small",sx:{height:"20px"}})]},e.id))):(0,i.tZ)(u.Z,{children:n("\u306a\u3057")})]})},{name:"",label:"",type:"jsx",callback:()=>(0,i.BX)(s.Z,{gap:1,children:[(0,i.tZ)(u.Z,{fontWeight:"bold",children:n("\u3053\u306e\u30e1\u30cb\u30e5\u30fc\u306b\u7d10\u3065\u3044\u305f\u4fdd\u967aWEB\u4e88\u7d04URL")}),W&&(0,i.tZ)(v.g,{href:W,textStyle:"link",target:"_blank",children:W})]})},{name:"",label:"",type:"jsx",hidden:!q.can("read","LINE"),callback:()=>(0,i.BX)(s.Z,{gap:1,children:[(0,i.BX)(c.Z,{children:[(0,i.tZ)(u.Z,{fontWeight:"bold",children:n("\u3053\u306e\u30e1\u30cb\u30e5\u30fc\u306b\u7d10\u3065\u3044\u305f\u4fdd\u967aLINE\u4e88\u7d04URL")}),(0,i.tZ)(u.Z,{variant:"caption",children:n("\u30ea\u30c3\u30c1\u30e1\u30cb\u30e5\u30fc\u3082\u3057\u304f\u306f\u30c8\u30fc\u30af\u30eb\u30fc\u30e0\u4ee5\u5916\u306b\u306f\u8cbc\u3089\u306a\u3044\u3067\u4e0b\u3055\u3044")})]}),null!=M?(0,i.tZ)(v.g,{href:M,textStyle:"link",target:"_blank",children:M}):(0,i.tZ)(u.Z,{variant:"caption",children:(0,i.tZ)(v.g,{href:"/various-settings/line-settings",textStyle:"link",children:n("LINE\u8a2d\u5b9a\u3067LIFF\u30a2\u30d7\u30eaURL\u3092\u767b\u9332\u3057\u3066\u304f\u3060\u3055\u3044")})})]})}],state:D,setState:H,handleSubmit:async()=>{if(!D)return;await A(D)&&(x(n("{0}\u3092\u4fdd\u5b58\u3057\u307e\u3057\u305f",[n("\u4fdd\u967a\u30e1\u30cb\u30e5\u30fc\u60c5\u5831")]),{variant:"success"}),await t.push(O("/health-insurance-outside-reservation/health-insurance-menus")))}})})})]}):null;var V};x.getInitialProps=async()=>({title:U}),x.getLayout=e=>(0,i.tZ)(g.M,{type:"OUTSIDE_HEALTH_INSURANCE_RESERVATION",children:e}),t.default=x}},function(e){e.O(0,[56139,76081,90076,47884,39989,85573,73478,39097,1629,4925,85844,46242,95516,38726,77641,78852,76528,84897,48947,1391,68663,92888,49774,40179],(function(){return t=22407,e(e.s=t);var t}));var t=e.O();_N_E=t}]);
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.