|
- {"ast":null,"code":"import _regeneratorRuntime from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator\";\nimport _objectSpread from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread\";\nimport _asyncToGenerator from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\nimport _classCallCheck from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass\";\nimport _possibleConstructorReturn from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn\";\nimport _getPrototypeOf from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf\";\nimport _inherits from \"/Users/michielcarman/Projects/React Access/ClientApp/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits\";\nvar _jsxFileName = \"/Users/michielcarman/Projects/React Access/ClientApp/src/containers/Queries/Fittings/FittingsList.tsx\";\nimport React, { Component } from 'react';\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap';\nimport { FittingsHeaderObjects } from '../../../shared/components/TableHeaderObjects';\nimport RPMTable from '../../../shared/components/rpm-table/RpmTable';\nimport axios from 'axios';\n\nvar FittingsList = /*#__PURE__*/function (_Component) {\n _inherits(FittingsList, _Component);\n\n function FittingsList(props) {\n var _this;\n\n _classCallCheck(this, FittingsList);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(FittingsList).call(this, props));\n _this.state = {\n isLoading: true,\n tableData: {\n heads: FittingsHeaderObjects,\n rows: []\n },\n pagination: {\n size: 1000,\n i: 0\n }\n };\n return _this;\n }\n\n _createClass(FittingsList, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _this$state$paginatio, size, i, FittingsList;\n\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _this$state$paginatio = this.state.pagination, size = _this$state$paginatio.size, i = _this$state$paginatio.i;\n _context.next = 3;\n return axios.get(\"/api/designspec/fittingslist?size=\".concat(size, \"&i=\").concat(i)).then(function (res) {\n return FittingsList = res.data.items.records;\n }).catch(function (err) {\n return console.error(err);\n });\n\n case 3:\n this.setState(_objectSpread({}, this.state, {\n isLoading: false,\n tableData: {\n heads: FittingsHeaderObjects,\n rows: FittingsList\n }\n }));\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function componentDidMount() {\n return _componentDidMount.apply(this, arguments);\n }\n\n return componentDidMount;\n }()\n }, {\n key: \"render\",\n value: function render() {\n return /*#__PURE__*/React.createElement(Container, {\n className: \"dashboard\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(Col, {\n md: 12,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"h3\", {\n className: \"page-title\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 25\n }\n }, \"Queries \", /*#__PURE__*/React.createElement(\"span\", {\n className: \"lnr lnr-chevron-right\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 60\n }\n }), \"Fittings\"), /*#__PURE__*/React.createElement(\"h6\", {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 25\n }\n }, \"Fittings PARTCODES: Adapter / Adapter Elbow / Tee / Plug / Cap / Hose Fitting / Special Fitting / Banjo / Pump Fitting\"))), /*#__PURE__*/React.createElement(Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(Col, {\n md: 12,\n lg: 12,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(Card, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 25\n }\n }, /*#__PURE__*/React.createElement(CardBody, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 29\n }\n }, /*#__PURE__*/React.createElement(RPMTable, {\n heads: this.state.tableData.heads,\n rows: this.state.tableData.rows,\n tableType: \"fittings\",\n isLoading: this.state.isLoading,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 33\n }\n }))))));\n }\n }]);\n\n return FittingsList;\n}(Component);\n\nexport { FittingsList as default };","map":{"version":3,"sources":["/Users/michielcarman/Projects/React Access/ClientApp/src/containers/Queries/Fittings/FittingsList.tsx"],"names":["React","Component","Card","CardBody","Col","Container","Row","FittingsHeaderObjects","RPMTable","axios","FittingsList","props","state","isLoading","tableData","heads","rows","pagination","size","i","get","then","res","data","items","records","catch","err","console","error","setState"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAA+BC,SAA/B,QAAgD,OAAhD;AACA,SAASC,IAAT,EAAeC,QAAf,EAAyBC,GAAzB,EAA8BC,SAA9B,EAAyCC,GAAzC,QAAoD,YAApD;AAEA,SAASC,qBAAT,QAAsC,+CAAtC;AACA,OAAOC,QAAP,MAAqB,+CAArB;AACA,OAAOC,KAAP,MAAkB,OAAlB;;IAGqBC,Y;;;AAC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,QAAA,SAAS,EAAC,uBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAnC,aADJ,eAEI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kIAFJ,CADJ,CADJ,eAQI,oBAAC,GAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI,oBAAC,GAAD;AAAK,QAAA,EAAE,EAAE,EAAT;AAAa,QAAA,EAAE,EAAE,EAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI,oBAAC,IAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI,oBAAC,QAAD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI,oBAAC,QAAD;AAAU,QAAA,KAAK,EAAE,KAAKE,KAAL,CAAWE,SAAX,CAAqBC,KAAtC;AAA6C,QAAA,IAAI,EAAE,KAAKH,KAAL,CAAWE,SAAX,CAAqBE,IAAxE;AAA8E,QAAA,SAAS,EAAC,UAAxF;AAAmG,QAAA,SAAS,EAAE,KAAKJ,KAAL,CAAWC,SAAzH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ,CADJ,CADJ,CARJ,CADJ;AAoBH;;;;EArDqCZ,S;;SAArBS,Y","sourcesContent":["import React, { PureComponent, Component } from 'react';\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap';\nimport FittingsMockData from '../../../shared/components/mockdata/FittingsMockData';\nimport { FittingsHeaderObjects } from '../../../shared/components/TableHeaderObjects';\nimport RPMTable from '../../../shared/components/rpm-table/RpmTable'\nimport axios from 'axios'\n\n\nexport default class FittingsList extends Component<any, any> {\n constructor(props: any) {\n super(props)\n this.state = {\n isLoading: true,\n tableData: {\n heads: FittingsHeaderObjects,\n rows: [],\n },\n pagination: {\n size: 1000,\n i: 0\n }\n }\n }\n\n async componentDidMount() {\n const { size, i } = this.state.pagination;\n let FittingsList;\n await axios.get(`/api/designspec/fittingslist?size=${size}&i=${i}`)\n .then(res => FittingsList = res.data.items.records)\n .catch(err => console.error(err))\n this.setState({\n ...this.state,\n isLoading: false,\n tableData: {\n heads: FittingsHeaderObjects,\n rows: FittingsList\n }\n })\n }\n\n render() {\n return (\n <Container className=\"dashboard\">\n <Row>\n <Col md={12}>\n <h3 className=\"page-title\">Queries <span className=\"lnr lnr-chevron-right\"></span>Fittings</h3>\n <h6 >Fittings PARTCODES: Adapter / Adapter Elbow / Tee / Plug / Cap / Hose Fitting / Special Fitting / Banjo / Pump Fitting</h6>\n </Col>\n </Row>\n\n <Row>\n <Col md={12} lg={12}>\n <Card>\n <CardBody>\n <RPMTable heads={this.state.tableData.heads} rows={this.state.tableData.rows} tableType=\"fittings\" isLoading={this.state.isLoading} />\n </CardBody>\n </Card>\n </Col>\n </Row>\n </Container>\n );\n }\n}"]},"metadata":{},"sourceType":"module"}
|