Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

1 riga
14 KiB

  1. {"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/RequestForDeviation/DeviationList.tsx\";\nimport React, { Component } from 'react';\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap';\nimport { RequestForDeviationHeaderObjects } from '../../shared/components/TableHeaderObjects';\nimport RPMTable from '../../shared/components/rpm-table/RpmTable';\nimport axios from 'axios';\n\nvar RfdList = /*#__PURE__*/function (_Component) {\n _inherits(RfdList, _Component);\n\n function RfdList(props) {\n var _this;\n\n _classCallCheck(this, RfdList);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(RfdList).call(this, props));\n _this.getAll = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var Deviations, i;\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n i = _this.state.pagination.i;\n _context.next = 3;\n return axios({\n method: 'get',\n url: \"/api/deviation/requestfordeviationlist?size=10000000\"\n }).then(function (res) {\n Deviations = res.data.items.records;\n }).catch(function (err) {\n console.error(err);\n });\n\n case 3:\n _this.setState(_objectSpread({}, _this.state, {\n isLoading: false,\n tableData: {\n heads: RequestForDeviationHeaderObjects,\n rows: Deviations\n },\n pagination: {\n size: 100000,\n i: 0\n }\n }));\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n _this.state = {\n isLoading: true,\n tableData: {\n heads: RequestForDeviationHeaderObjects,\n rows: []\n },\n pagination: {\n size: 100,\n i: 0\n }\n };\n return _this;\n }\n\n _createClass(RfdList, [{\n key: \"componentDidMount\",\n value: function () {\n var _componentDidMount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {\n var DeviationList, _this$state$paginatio, size, index;\n\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _this$state$paginatio = this.state.pagination, size = _this$state$paginatio.size, index = _this$state$paginatio.index;\n _context2.next = 3;\n return axios.get(\"/api/deviation/requestfordeviationlist?size=\".concat(size)).then(function (res) {\n DeviationList = 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: RequestForDeviationHeaderObjects,\n rows: DeviationList\n }\n }));\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, 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 var _this2 = this;\n\n return /*#__PURE__*/React.createElement(Container, {\n className: \"dashboard\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 13\n }\n }, /*#__PURE__*/React.createElement(Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 17\n }\n }, /*#__PURE__*/React.createElement(Col, {\n md: 12,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(\"h3\", {\n className: \"page-title\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 25\n }\n }, \"Forms \", /*#__PURE__*/React.createElement(\"span\", {\n className: \"lnr lnr-chevron-right\",\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 58\n }\n }), \" Request for Deviation\"))), /*#__PURE__*/React.createElement(Row, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 75,\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: 76,\n columnNumber: 21\n }\n }, /*#__PURE__*/React.createElement(Card, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 25\n }\n }, /*#__PURE__*/React.createElement(CardBody, {\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 29\n }\n }, /*#__PURE__*/React.createElement(\"button\", {\n onClick: function onClick() {\n return _this2.getAll();\n },\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 33\n }\n }, \"GETALL\"), /*#__PURE__*/React.createElement(RPMTable, {\n heads: this.state.tableData.heads,\n rows: this.state.tableData.rows,\n tableType: \"rfd\",\n isLoading: this.state.isLoading,\n __self: this,\n __source: {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 33\n }\n }))))));\n }\n }]);\n\n return RfdList;\n}(Component);\n\nexport { RfdList as default };","map":{"version":3,"sources":["/Users/michielcarman/Projects/React Access/ClientApp/src/containers/RequestForDeviation/DeviationList.tsx"],"names":["React","Component","Card","CardBody","Col","Container","Row","RequestForDeviationHeaderObjects","RPMTable","axios","RfdList","props","getAll","i","state","pagination","method","url","then","res","Deviations","data","items","records","catch","err","console","error","setState","isLoading","tableData","heads","rows","size","index","get","DeviationList"],"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,gCAAT,QAAiD,4CAAjD;AACA,OAAOC,QAAP,MAAqB,4CAArB;AACA,OAAOC,KAAP,MAAkB,OAAlB;;IAEqBC,O;;;AACjB,mBAAYC,KAAZ,EAAwB;AAAA;;AAAA;;AACpB,iFAAMA,KAAN;AADoB,UAgCxBC,MAhCwB,yEAgCf;AAAA;AAAA;AAAA;AAAA;AAAA;AAECC,cAAAA,CAFD,GAEO,MAAKC,KAAL,CAAWC,UAFlB,CAECF,CAFD;AAAA;AAAA,qBAGCJ,KAAK,CAAC;AACRO,gBAAAA,MAAM,EAAE,KADA;AAERC,gBAAAA,GAAG;AAFK,eAAD,CAAL,CAGHC,IAHG,CAGE,UAAAC,GAAG,EAAI;AACXC,gBAAAA,UAAU,GAAGD,GAAG,CAACE,IAAJ,CAASC,KAAT,CAAeC,OAA5B;AACH,eALK,EAKHC,KALG,CAKG,UAAAC,GAAG,EAAI;AACZC,gBAAAA,OAAO,CAACC,KAAR,CAAcF,GAAd;AACH,eAPK,CAHD;;AAAA;AAWL,oBAAKG,QAAL,mBACO,MAAKd,KADZ;AAEIe,gBAAAA,SAAS,EAAE,KAFf;AAGIC,gBAAAA,SAAS,EAAE;AACPC,kBAAAA,KAAK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AAK,QAAA,EAAE,EAAE,EAAT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBACI;AAAI,QAAA,SAAS,EAAC,YAAd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAiC;AAAM,QAAA,SAAS,EAAC,uBAAhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAAjC,4BADJ,CADJ,CADJ,eAMI,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;AAAQ,QAAA,OAAO,EAAE;AAAA,iBAAM,MAAI,CAACxB,MAAL,EAAN;AAAA,SAAjB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBADJ,eAEI,oBAAC,QAAD;AAAU,QAAA,KAAK,EAAE,KAAKE,KAAL,CAAWgB,SAAX,CAAqBC,KAAtC;AAA6C,QAAA,IAAI,EAAE,KAAKjB,KAAL,CAAWgB,SAAX,CAAqBE,IAAxE;AAA8E,QAAA,SAAS,EAAC,KAAxF;AAA8F,QAAA,SAAS,EAAE,KAAKlB,KAAL,CAAWe,SAApH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAFJ,CADJ,CADJ,CADJ,CANJ,CADJ;AAmBH;;;;EA/EgC5B,S;;SAAhBS,O","sourcesContent":["import React, { PureComponent, Component } from 'react';\nimport { Card, CardBody, Col, Container, Row } from 'reactstrap';\nimport RequestForDeviationMockData from '../../shared/components/mockdata/RequestForDeviationMockData';\nimport { RequestForDeviationHeaderObjects } from '../../shared/components/TableHeaderObjects';\nimport RPMTable from '../../shared/components/rpm-table/RpmTable'\nimport axios from 'axios'\n\nexport default class RfdList extends Component<any, any> {\n constructor(props: any) {\n super(props)\n this.state = {\n isLoading: true,\n tableData: {\n heads: RequestForDeviationHeaderObjects,\n rows: [],\n },\n pagination: {\n size: 100,\n i: 0,\n }\n }\n }\n\n async componentDidMount() {\n let DeviationList;\n const { size, index } = this.state.pagination\n await axios.get(`/api/deviation/requestfordeviationlist?size=${size}`)\n .then(res => {\n DeviationList = res.data.items.records\n })\n .catch(err => console.error(err))\n this.setState({\n ...this.state,\n isLoading: false,\n tableData: {\n heads: RequestForDeviationHeaderObjects,\n rows: DeviationList\n }\n })\n }\n getAll = async () => {\n let Deviations;\n let { i } = this.state.pagination;\n await axios({\n method: 'get',\n url: `/api/deviation/requestfordeviationlist?size=10000000`\n }).then(res => {\n Deviations = res.data.items.records;\n }).catch(err => {\n console.error(err)\n })\n this.setState({\n ...this.state,\n isLoading: false,\n tableData: {\n heads: RequestForDeviationHeaderObjects,\n rows: Deviations\n },\n pagination: {\n size: 100000,\n i: 0\n }\n })\n }\n\n\n render() {\n return (\n <Container className=\"dashboard\">\n <Row>\n <Col md={12}>\n <h3 className=\"page-title\">Forms <span className=\"lnr lnr-chevron-right\"></span> Request for Deviation</h3>\n </Col>\n </Row>\n <Row>\n <Col md={12} lg={12}>\n <Card>\n <CardBody>\n <button onClick={() => this.getAll()} >GETALL</button>\n <RPMTable heads={this.state.tableData.heads} rows={this.state.tableData.rows} tableType=\"rfd\" isLoading={this.state.isLoading} />\n </CardBody>\n </Card>\n </Col>\n </Row>\n </Container>\n );\n }\n}"]},"metadata":{},"sourceType":"module"}