|
- {"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/Manage/Applications/ApplicationList.tsx\";\nimport React, { Component } from 'react';\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap';\nimport { ApplicationsHeaderObjects } from '../../../shared/components/TableHeaderObjects';\nimport RPMTable from '../../../shared/components/rpm-table/RpmTable';\nimport axios from 'axios';\n\nvar ApplicationsList = /*#__PURE__*/function (_Component) {\n _inherits(ApplicationsList, _Component);\n\n function ApplicationsList(props) {\n var _this;\n\n _classCallCheck(this, ApplicationsList);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(ApplicationsList).call(this, props));\n _this.state = {\n isLoading: true,\n tableData: {\n heads: ApplicationsHeaderObjects,\n rows: []\n },\n pagination: {\n i: 0,\n size: 1000\n }\n };\n return _this;\n }\n\n _createClass(ApplicationsList, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var ApplicationList, _this$state$paginatio, size, i;\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/application/applicationlist/?size=\".concat(size, \"&i=\").concat(i)).then(function (res) {\n return ApplicationList = 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: ApplicationsHeaderObjects,\n rows: ApplicationList\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 __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 }, \"Applications\"))), /*#__PURE__*/React.createElement(Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 49,\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: 50,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(Card, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 25\n }\n }, /*#__PURE__*/React.createElement(CardBody, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 29\n }\n }, /*#__PURE__*/React.createElement(RPMTable, {\n heads: this.state.tableData.heads,\n rows: this.state.tableData.rows,\n tableType: \"applications\",\n isLoading: this.state.isLoading,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 33\n }\n }))))));\n }\n }]);\n\n return ApplicationsList;\n}(Component);\n\nexport { ApplicationsList as default };","map":{"version":3,"sources":["/Users/michielcarman/Projects/React Access/ClientApp/src/containers/Manage/Applications/ApplicationList.tsx"],"names":["React","Component","Card","CardBody","Col","Container","Row","ApplicationsHeaderObjects","RPMTable","axios","ApplicationsList","props","state","isLoading","tableData","heads","rows","pagination","i","size","get","then","res","ApplicationList","data","items","records","catch","err","console","error","setState"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,SAASC,IAAT,EAAeC,QAAf,EAAyBC,GAAzB,EAA8BC,SAA9B,EAAyCC,GAAzC,QAAoD,YAApD;AAEA,SAASC,yBAAT,QAA0C,+CAA1C;AACA,OAAOC,QAAP,MAAqB,+CAArB;AACA,OAAOC,KAAP,MAAkB,OAAlB;;IAEqBC,gB;;;AACjB,4BAAYC,KAAZ,EAAwB;AAAA;;AAAA;;AACpB,0FAAMA,KAAN;AACA,UAAKC,KAAL,GAAa;AACTC,MAAAA,SAAS,EAAE,IADF;AAETC,MAAAA,SAAS,EAAE;AACPC,QAAAA,KAAK,EAAER,yBADA;AAEPS,QAAAA,IAAI,EAAE;AAFC,OAFF;AAMTC,MAAAA,UAAU,EAAE;AACRC,QAAAA,CAAC,EAAE,CADK;AAERC,QAA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A,sBACI,oBAAC,QAAD;AAAU,QAAA,KAAK,EAAE,KAAKX,KAAL,CAAWE,SAAX,CAAqBC,KAAtC;AAA6C,QAAA,IAAI,EAAE,KAAKH,KAAL,CAAWE,SAAX,CAAqBE,IAAxE;AAA8E,QAAA,SAAS,EAAC,cAAxF;AAAuG,QAAA,SAAS,EAAE,KAAKJ,KAAL,CAAWC,SAA7H;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QADJ,CADJ,CADJ,CADJ,CANJ,CADJ;AAkBH;;;;EApDyCZ,S;;SAAzBS,gB","sourcesContent":["import React, { Component } from 'react'\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap'\nimport ApplicationsMockData from '../../../shared/components/mockdata/ApplicationsMockData'\nimport { ApplicationsHeaderObjects } from '../../../shared/components/TableHeaderObjects'\nimport RPMTable from '../../../shared/components/rpm-table/RpmTable'\nimport axios from 'axios'\n\nexport default class ApplicationsList extends Component<any, any> {\n constructor(props: any) {\n super(props)\n this.state = {\n isLoading: true,\n tableData: {\n heads: ApplicationsHeaderObjects,\n rows: [],\n },\n pagination: {\n i: 0,\n size: 1000,\n }\n }\n }\n\n async componentDidMount() {\n let ApplicationList;\n let { size, i } = this.state.pagination;\n await axios.get(`/api/application/applicationlist/?size=${size}&i=${i}`)\n .then(res => ApplicationList = res.data.items.records)\n .catch(err => console.error(err))\n\n this.setState({\n ...this.state,\n isLoading: false,\n tableData: {\n heads: ApplicationsHeaderObjects,\n rows: ApplicationList\n }\n })\n }\n\n render() {\n return (\n <Container>\n <Row>\n <Col md={12}>\n <h3 className=\"page-title\">Applications</h3>\n </Col>\n </Row>\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=\"applications\" isLoading={this.state.isLoading}></RPMTable>\n </CardBody>\n </Card>\n </Col>\n </Row>\n </Container>\n )\n }\n}\n"]},"metadata":{},"sourceType":"module"}
|