_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[63],{QSOU:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/quotations",function(){return r("ytoK")}])},ytoK:function(e,t,r){"use strict";r.r(t);var n=r("rePB"),c=r("nKUr"),i=r("wx14"),o=(r("q1tI"),r("yE/o")),s=r("gaPq"),a=r("h4VS"),j=r("Ff2n"),l=r("sWYD"),u=r("UYTu"),d=r("eHHv"),b=r("ikXu"),O=r("YFqc"),p=r.n(O),f=r("YRLc");function h(){var e=Object(a.a)(["\n      query quotations($offset: Int, $limit: Int) {\n        quotations(offset: $offset, limit: $limit) {\n          _id\n          expires\n          quotationNumber\n          status\n          user {\n            _id\n            name\n          }\n          product {\n            _id\n            ... on SimpleProduct {\n              sku\n            }\n            texts {\n              _id\n              title\n            }\n          }\n        }\n      }\n    "]);return h=function(){return e},e}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=Object(d.a)(Object(d.c)({limit:20,offset:0}),Object(f.b)({queryName:"quotations",query:Object(u.a)(h())}))((function(e){e.loading,e.updateHasMore;var t=Object(j.a)(e,["loading","updateHasMore"]);return Object(c.jsx)(f.a,_(_({},t),{},{cols:5,createPath:null,rowRenderer:function(e){var t;return Object(c.jsxs)(b.a.Row,{children:[Object(c.jsx)(b.a.Cell,{children:Object(c.jsx)(p.a,{href:"/quotations/view?_id=".concat(e._id),children:Object(c.jsx)("a",{href:"/quotations/view?_id=".concat(e._id),children:e.quotationNumber?Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)("b",{children:e.quotationNumber}),Object(c.jsxs)("small",{children:["\xa0(",e._id,")"]})]}):Object(c.jsxs)(c.Fragment,{children:[Object(c.jsx)("b",{children:"RFP"}),Object(c.jsxs)("small",{children:["\xa0(",e._id,")"]})]})})})}),Object(c.jsx)(b.a.Cell,{children:e.product&&Object(c.jsx)(p.a,{href:"/products/edit?_id=".concat(e.product._id),children:Object(c.jsxs)("a",{href:"/products/edit?_id=".concat(e.product._id),children:[Object(c.jsx)("b",{children:null===(t=e.product.texts)||void 0===t?void 0:t.title}),Object(c.jsxs)("small",{children:["\xa0(",e.product.sku,")"]})]})})}),Object(c.jsx)(b.a.Cell,{children:e.user&&Object(c.jsx)(p.a,{href:"/users/edit?_id=".concat(e.user._id),children:Object(c.jsx)("a",{href:"/users/edit?_id=".concat(e.user._id),children:e.user.name||e.user._id})})}),Object(c.jsx)(b.a.Cell,{children:e.expires?Object(l.default)(new Date(e.expires),"Ppp"):"n/a"}),Object(c.jsx)(b.a.Cell,{children:e.status})]},e._id)},children:Object(c.jsxs)(b.a.Row,{children:[Object(c.jsx)(b.a.HeaderCell,{children:"Quotation #"}),Object(c.jsx)(b.a.HeaderCell,{children:"Product"}),Object(c.jsx)(b.a.HeaderCell,{children:"User"}),Object(c.jsx)(b.a.HeaderCell,{children:"Expiry Date"}),Object(c.jsx)(b.a.HeaderCell,{children:"Status"})]})}))})),y=r("PZVx");function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){Object(n.a)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.default=Object(y.a)((function(e){var t=Object(i.a)({},e);return Object(c.jsx)(s.a,m(m({},t),{},{children:Object(c.jsxs)(o.a,{children:[Object(c.jsx)("h2",{children:"Quotations"}),Object(c.jsx)(w,{})]})}))}))}},[["QSOU",0,2,3,1,4,5,8,9]]]);