(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{"JZe/":function(e,r,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/warehousing-providers",function(){return n("rGy9")}])},YRLc:function(e,r,n){"use strict";n.d(r,"b",(function(){return j}));var t=n("KQm4"),a=n("rePB"),o=n("wx14"),i=n("Ff2n"),l=n("eHHv"),u=n("0dmp"),c=n("q1tI"),s=n.n(c),d=n("ikXu"),f=n("QetY"),p=n("D1pA"),h=n("NrgV"),b=n("RotF"),w=n.n(b),O=n("YFqc"),g=n.n(O),v=s.a.createElement;function y(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function m(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?y(Object(n),!0).forEach((function(r){Object(a.a)(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}r.a=function(e){var r=e.items,n=e.cols,t=void 0===n?4:n,a=e.rowRenderer,l=e.createPath,u=(e.data,e.children),c=e.loadMoreEntries,s=(e.updateHasMore,e.hasMore),b=(e.loading,Object(i.a)(e,["items","cols","rowRenderer","createPath","data","children","loadMoreEntries","updateHasMore","hasMore","loading"]));return v(d.a,Object(o.a)({celled:!0},b),v(d.a.Header,null,v(d.a.Row,null,v(d.a.HeaderCell,{colSpan:t},l&&v(g.a,{href:l},v(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:l},v(p.a,{name:"plus"}),"Add")))),u),r&&v(w.a,{pageStart:0,element:"tbody",loadMore:c,hasMore:s,loader:v(d.a.Row,null,v(d.a.Cell,{colSpan:t},v(h.a,{active:!0,inline:"centered"})))},r.map(a)),v(d.a.Footer,{fullWidth:!0},v(d.a.Row,null,v(d.a.HeaderCell,{colSpan:t},l&&v(g.a,{href:l},v(f.a,{floated:"right",icon:!0,labelPosition:"left",primary:!0,size:"small",href:l},v(p.a,{name:"plus"})," Add"))))))},Array.prototype.diff=function(e){return this.filter((function(r){return-1!==e.indexOf(r)}))};var j=function(e){var r=e.query,n=e.queryName,a=e.queryOptions,o=e.itemsPerPage,c=void 0===o?5:o;return Object(l.a)(Object(l.h)("hasMore","updateHasMore",!0),Object(u.a)(r,{options:function(e){e.hasMore,e.updateHasMore;var r=Object(i.a)(e,["hasMore","updateHasMore"]);return m({variables:m({offset:0,limit:c},r)},a)},props:function(e){var r=e.data,a=r.loading,o=r.fetchMore,l=Object(i.a)(r,["loading","fetchMore"]),u=e.ownProps,s=u.updateHasMore,d=u.hasMore;return{loading:a,hasMore:!(l[n]&&c>l[n].length)&&d,items:l[n],loadMoreEntries:function(){return o({variables:{offset:Math.floor(l[n].length/c)*c,limit:c},updateQuery:function(e,r){var a=r.fetchMoreResult;if(!a||0===a[n].length)return s(!1),e;var o=e[n].map((function(e){return e._id})),i=a[n].filter((function(e){return-1===o.indexOf(e._id)}));if(0===i.length)return s(!1),e;var l={};return l[n]=[].concat(Object(t.a)(e[n]),Object(t.a)(i)),m({},e,{},l)}})}}}}))}},rGy9:function(e,r,n){"use strict";n.r(r);var t=n("q1tI"),a=n.n(t),o=n("yE/o"),i=n("gaPq"),l=n("h4VS"),u=n("wx14"),c=n("lTCR"),s=n.n(c),d=n("ikXu"),f=n("D1pA"),p=n("YFqc"),h=n.n(p),b=n("YRLc"),w=a.a.createElement;function O(){var e=Object(l.a)(["\n    query warehousingProviders {\n      warehousingProviders {\n        _id\n        type\n        configurationError\n        interface {\n          _id\n          label\n          version\n        }\n      }\n    }\n  "]);return O=function(){return e},e}var g=Object(b.b)({queryName:"warehousingProviders",query:s()(O())})((function(e){var r=Object(u.a)({},e);return w(b.a,Object(u.a)({},r,{cols:4,createPath:"/warehousing-providers/new",rowRenderer:function(e){return w(d.a.Row,{key:e._id},w(d.a.Cell,null,w(h.a,{href:"/warehousing-providers/edit?_id=".concat(e._id)},w("a",{href:"/warehousing-providers/edit?_id=".concat(e._id)},e._id))),w(d.a.Cell,null,e.type),e.interface?w(d.a.Cell,null,e.interface.label," ",e.interface.version):w(d.a.Cell,null,"Invalid Interface"),w(d.a.Cell,null,e.configurationError&&w("span",null,w(f.a,{color:"red",name:"close"}),"Configuration Errors")))}}),w(d.a.Row,null,w(d.a.HeaderCell,null,"Configuration"),w(d.a.HeaderCell,null,"Type"),w(d.a.HeaderCell,null,"Interface"),w(d.a.HeaderCell,null,"Problems")))})),v=n("PZVx"),y=a.a.createElement;r.default=Object(v.a)((function(e){return y(i.a,e,y(o.a,null,y("h2",null,"Warehousing providers"),y(g,null)))}))}},[["JZe/",0,2,5,1,3,4,7]]]);