1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9992],{79992:function(e,t,n){n.r(t);var r=n(47568),o=n(26042),i=n(69396),a=n(29815),c=n(97582),u=n(85893),p=n(67294),l=n(4566),s=n(22850),y=n(51904),f=n(71230),h=n(15746),d=n(71577),m=n(43541),g=n(45),T=n(65774),x=n(7688),Z=(n(25675),n(11163)),C=n(99611),P=n(85060),R=n(83461),j=n(30381),_=n.n(j);t.default=(0,Z.withRouter)((function(e){var t=(0,p.useState)(!1),n=(t[0],t[1]),Z=(0,p.useState)([]),j=Z[0],w=Z[1],I=(0,p.useState)([]),k=I[0],v=I[1],b=(0,p.useState)(!1),S=b[0],M=b[1],D=(0,p.useState)([]),L=D[0],E=D[1],N=(0,p.useState)([{label:"Created_At",key:"createdAt"},{label:"Property_Name",key:"propertyName"},{label:"Room_Type_Name",key:"roomTypeName"},{label:"Room_Type",key:"roomType"},{label:"Channel_Manager",key:"channelManager"},{label:"Channel_ID",key:"channelId"}]),A=N[0];N[1];(0,p.useEffect)((function(){return B(),function(){}}),[]);var B=function(){var e=(0,r.Z)((function(){var e,t,r;return(0,c.__generator)(this,(function(o){switch(o.label){case 0:return n(!0),[4,T.Z.getRoomTypeList()];case 1:return e=o.sent(),console.log("res getRoomTypeList",e),e.message?[2]:(w(e),[4,x.Z.getPropertyList()]);case 2:return t=o.sent(),console.log("propertyListRes",t),r=t.map((function(e){return{text:e.name,value:e.name}})),v(r),n(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}(),z=[{title:"Creation Date",dataIndex:"createdAt",key:"createdAt",width:140,defaultSortOrder:"descend",sorter:function(e,t){return _()(e.createdAt).unix()-_()(t.createdAt).unix()}
1,sortDirections:["descend","ascend"],render:function(e){if(e)return(0,u.jsx)("div",{children:(0,u.jsx)(s.Z.Paragraph,{style:{width:150,margin:0},ellipsis:{rows:S?0:1,expandable:!1,tooltip:!0},children:_()(e).format("DD-MMM-YYYY hh:mma")})})}},(0,i.Z)((0,o.Z)({},(0,g.x7)("Property","property")),{filterMultiple:!1,filters:k||[],onFilter:function(e,t){return t.property.name.includes(e)},render:function(e,t){return(0,u.jsx)("div",{children:(0,u.jsx)(s.Z.Paragraph,{style:{width:150,margin:0},ellipsis:{rows:S?0:1,expandable:!1,tooltip:!0},children:e.name})})}}),(0,i.Z)((0,o.Z)({},(0,g.x7)("Room Type Name","name"),(0,g.Ly)("name","Search Name")),{render:function(e,t){return(0,u.jsx)("div",{children:(0,u.jsx)(s.Z.Paragraph,{style:{width:200,margin:0},ellipsis:{rows:S?0:1,expandable:!1,tooltip:!0},children:e})})}}),(0,o.Z)({},(0,g.x7)("Room Type","roomType"),(0,g.Ly)("roomType","Search Room Type")),{title:"Channel Manager",dataIndex:"CM_Integration",key:"CM_Integration",filterMultiple:!1,filters:[{text:"Host Platform",value:"HP"},{text:"Ezee",value:"Ezee"}],onFilter:function(e,t){return t.CM_Integration===e},render:function(e,t){switch(e){case"HP":return(0,u.jsx)(y.Z,{color:"#39B6CD",children:"Host Platform"});case"Ezee":return(0,u.jsx)(y.Z,{color:"#1E72BE",children:"Ezee"});default:return(0,u.jsx)(y.Z,{color:"grey",children:e})}}},(0,o.Z)({},(0,g.x7)("Channel ID","CM_RoomTypeId"),(0,g.Ly)("CM_RoomTypeId","Search Channel ID")),(0,i.Z)((0,o.Z)({},(0,g.x7)("View Details","")),{render:function(e,t){return(0,u.jsx)(f.Z,{onClick:function(e){return e.stopPropagation()},children:(0,u.jsx)(h.Z,{children:(0,u.jsxs)(d.ZP,{type:"link",href:"/admin/manage-room-types?roomTypeId=".concat(t._id),children:[(0,u.jsx)(C.Z,{})," View Details"]})})})}})],H=(0,u.jsx)(m.Z,{columns:z,dataSource:j,rowKey:function(e){return e._id},scroll:{x:!0},showSorterTooltip:!1,onRow:function(e){return{onClick:function(){M(!S)}}}});return(0,u.jsx)(l.Z,{children:(0,u.jsxs)("div",{style:{backgroundColor:"#fff",padding:16},children:[(0,u.jsxs)(f.Z,{justify:"space-between",align:"middle",style:{marginBottom:16},children:[(0,u.jsx)(h.Z,{style:{fontWeight:600,fontSize:16},children:"Integration"}),(0,u.jsx)(h.Z,{children:(0,u.jsx)(R.CSVLink,{data:L,headers:A,filename:"Integration.csv",onClick:function(){for(var e=(0,a.Z)(j),t=[],n=0;n<e.length;n++){var r=e[n];console.log(r),t.push({propertyName:r.property.name,roomTypeName:r.name,roomType:r.roomType,channelManager:"HP"===r.CM_Integration?"Host Platform":"Ezee",channelId:r.CM_RoomTypeId,createdAt:r.createdAt})}return E(t),!0},children:(0,u.jsx)(d.ZP,{icon:(0,u.jsx)(P.Z,{}),type:"primary",children:"Export CSV"})})})]}),H]})})}))},7688:function(e,t,n){var r=n(1898).wR,o={getPropertyList:function(){return r.get("/api/property/").then((function(e){return e})).catch((function(e){return e}))},addProperty:function(e){return r.post("/api/property/add-property",e).then((function(e){return e})).catch((function(e){return e}))},getPropertyDetail:function(e){return r.get("/api/property/"+e).then((function(e){return e})).catch((function(e){return e}))},patchPropertyInfo:function(e,t){return r.patch("/api/property/"+e,t,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){return e})).catch((function(e){return e}))},deleteProperty:function(e){return r.delete("/api/property/"+e).then((function(e){return e})).catch((function(e){return e}))},getPropertyListCity:function(){return r.get("/api/property/list/city").then((function(e){return e})).catch((function(e){return e}))},getPropertyBySelectedCity:function(e){return r.get("/api/property/list/property-by-city?city="+e).then((function(e){return e})).catch((function(e){return e}))},activateProperty:function(e){return r.patch("/api/property/"+e+"/activate").then((function(e){return e})).catch((function(e){return e}))}};t.Z=o},65774:function(e,t,n){var r=n(1898).wR,o={getRoomTypeList:function(){return r.get("/api/roomType").then((function(e){return e})).catch((function(e){return e}))},addRoomType:function(e){return r.post("/api/roomType/add-roomType",e).then((function(e){return e})).catch((function(e){return e}))}
1,getRoomTypeDetail:function(e){return r.get("/api/roomType/"+e).then((function(e){return e})).catch((function(e){return e}))},patchRoomTypeInfo:function(e,t){return r.patch("/api/roomType/"+e,t,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){return e})).catch((function(e){return e}))},deleteRoomType:function(e){return r.delete("/api/roomType/"+e).then((function(e){return e})).catch((function(e){return e}))},getRoomDetails:function(e){return r.get("/api/roomType/"+e).then((function(e){return e})).catch((function(e){return e}))},GetBookingRate:function(e){return r.post("/api/roomType/roomType-with-rate",e).then((function(e){return e})).catch((function(e){return e}))},getRoomTypeListBySelectedProperty:function(e){return r.post("/api/roomType/roomType-rate-by-property",e).then((function(e){return e})).catch((function(e){return e}))},getRoomTypeListByPropertyId:function(e){return r.post("/api/roomType/roomType-by-property/"+e).then((function(e){return e})).catch((function(e){return e}))}};t.Z=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.