{"ast":null,"code":"import _regeneratorRuntime from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator\";import _asyncToGenerator from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";import _classCallCheck from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck\";import _createClass from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass\";import _inherits from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits\";import _createSuper from\"C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createSuper\";import React from\"react\";import Container from\"@material-ui/core/Container\";import BreadCrumb from\"../layouts/Breadcrumb\";import PageTitle from\"../layouts/PageTitle\";import{Box}from\"@material-ui/core\";import{withRouter}from\"react-router-dom\";import TagFormAdd from\"./TagGroups/TagFormAdd\";import TagGroupServices from'./TagGroups/TagGroupServicesClass';import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var TagGroupServ=new TagGroupServices();var TagAdd=/*#__PURE__*/function(_React$Component){_inherits(TagAdd,_React$Component);var _super=_createSuper(TagAdd);function TagAdd(props){var _this;_classCallCheck(this,TagAdd);_this=_super.call(this,props);_this.pageTitle=\"Tag Add\";_this.id=_this.props.match.params.id;_this.test=\"\";_this.state={groupName:'ss'};_this.links=[{link:\"/opc/tag-groups\",text:\"Tag Groups\"},{link:\"/opc/tag-groups/detail/\"+_this.id,text:\"Tag Group Detail\"},{link:\"/opc/tags/add/\"+_this.id,text:_this.pageTitle}];return _this;}_createClass(TagAdd,[{key:\"componentDidMount\",value:function(){var _componentDidMount=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(){return _regeneratorRuntime.wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:document.title=process.env.REACT_APP_APP_NAME+\" - \"+this.pageTitle;this.findOne();this.test='123';console.log(this.test);case 4:case\"end\":return _context.stop();}}},_callee,this);}));function componentDidMount(){return _componentDidMount.apply(this,arguments);}return componentDidMount;}()},{key:\"findOne\",value:function(){var _findOne=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(){var resp;return _regeneratorRuntime.wrap(function _callee2$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:_context2.next=2;return TagGroupServ.findOne(this.id);case 2:resp=_context2.sent;this.setState({groupName:resp.data.TagGroupName});case 4:case\"end\":return _context2.stop();}}},_callee2,this);}));function findOne(){return _findOne.apply(this,arguments);}return findOne;}()},{key:\"render\",value:function render(){var links=this.links;var pageTitle=this.pageTitle;return/*#__PURE__*/_jsx(\"main\",{className:this.props.content,children:/*#__PURE__*/_jsxs(Container,{maxWidth:\"xl\",children:[/*#__PURE__*/_jsx(BreadCrumb,{links:links}),/*#__PURE__*/_jsxs(Box,{mt:3,width:\"100%\",children:[/*#__PURE__*/_jsxs(Box,{children:[/*#__PURE__*/_jsx(PageTitle,{pageTitle:pageTitle+\" (\"+this.state.groupName+\")\"}),/*#__PURE__*/_jsx(Box,{})]}),/*#__PURE__*/_jsx(TagFormAdd,{})]})]})});}}]);return TagAdd;}(React.Component);export default withRouter(TagAdd);","map":{"version":3,"sources":["C:/laragon/www/iot.mksolusi/DriverOPCDA/frontend/src/components/pages/TagAdd.jsx"],"names":["React","Container","BreadCrumb","PageTitle","Box","withRouter","TagFormAdd","TagGroupServices","TagGroupServ","TagAdd","props","pageTitle","id","match","params","test","state","groupName","links","link","text","document","title","process","env","REACT_APP_APP_NAME","findOne","console","log","resp","setState","data","TagGroupName","content","Component"],"mappings":"u9BAAA,MAAOA,CAAAA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AI,CAACE,IAAL,CAAUC,YAAvB,CAAd,EAFF,6D,qGAKA,iBAAS,CACP,GAAMd,CAAAA,KAAK,CAAG,KAAKA,KAAnB,CACA,GAAMP,CAAAA,SAAS,CAAG,KAAKA,SAAvB,CACA,mBACE,aAAM,SAAS,CAAE,KAAKD,KAAL,CAAWuB,OAA5B,uBACE,MAAC,SAAD,EAAW,QAAQ,CAAE,IAArB,wBACE,KAAC,UAAD,EAAY,KAAK,CAAEf,KAAnB,EADF,cAEE,MAAC,GAAD,EAAK,EAAE,CAAE,CAAT,CAAY,KAAK,CAAC,MAAlB,wBACE,MAAC,GAAD,yBACE,KAAC,SAAD,EAAW,SAAS,CAAEP,SAAS,CAAG,IAAZ,CAAkB,KAAKK,KAAL,CAAWC,SAA7B,CAAuC,GAA7D,EADF,cAEE,KAAC,GAAD,IAFF,GADF,cAME,KAAC,UAAD,IANF,GAFF,GADF,EADF,CAeD,C,oBAtDkBjB,KAAK,CAACkC,S,EAyD3B,cAAe7B,CAAAA,UAAU,CAACI,MAAD,CAAzB","sourcesContent":["import React from \"react\";\r\nimport Container from \"@material-ui/core/Container\";\r\nimport BreadCrumb from \"../layouts/Breadcrumb\";\r\nimport PageTitle from \"../layouts/PageTitle\";\r\nimport { Box } from \"@material-ui/core\";\r\nimport { withRouter } from \"react-router-dom\";\r\nimport TagFormAdd from \"./TagGroups/TagFormAdd\";\r\nimport TagGroupServices from  './TagGroups/TagGroupServicesClass'\r\nconst TagGroupServ = new TagGroupServices()\r\nclass TagAdd extends React.Component {\r\n  constructor(props) {\r\n    super(props);\r\n    this.pageTitle = \"Tag Add\";\r\n    this.id = this.props.match.params.id\r\n    this.test = \"\"\r\n    this.state = {\r\n        groupName :'ss'\r\n    }\r\n    this.links = [\r\n      {\r\n        link: \"/opc/tag-groups\",\r\n        text: \"Tag Groups\",\r\n      },\r\n      {\r\n        link: \"/opc/tag-groups/detail/\" + this.id,\r\n        text: \"Tag Group Detail\",\r\n      },\r\n      {\r\n        link: \"/opc/tags/add/\" + this.id,\r\n        text: this.pageTitle,\r\n      },\r\n    ];\r\n  }\r\n  async componentDidMount() {\r\n    document.title = process.env.REACT_APP_APP_NAME + \" - \" + this.pageTitle;\r\n    this.findOne()\r\n    this.test = '123'\r\n    console.log(this.test)\r\n  }\r\n\r\n  async findOne(){\r\n    const resp = await TagGroupServ.findOne(this.id)\r\n    this.setState({ groupName: resp.data.TagGroupName });\r\n  } \r\n\r\n  render() {\r\n    const links = this.links;\r\n    const pageTitle = this.pageTitle;\r\n    return (\r\n      <main className={this.props.content}>\r\n        <Container maxWidth={\"xl\"}>\r\n          <BreadCrumb links={links} />\r\n          <Box mt={3} width=\"100%\">\r\n            <Box>\r\n              <PageTitle pageTitle={pageTitle + \" (\" +this.state.groupName+\")\"} />\r\n              <Box></Box>\r\n            </Box>\r\n            {/* CONTENT */}\r\n            <TagFormAdd></TagFormAdd>\r\n          </Box>\r\n        </Container>\r\n      </main>\r\n    );\r\n  }\r\n}\r\n\r\nexport default withRouter(TagAdd);\r\n"]},"metadata":{},"sourceType":"module"}