Commit 50cfc658 authored by Mathias Engelbrecht Pilegård's avatar Mathias Engelbrecht Pilegård
Browse files

implemented general solution for selecting directories

parent 4f6eb930
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"HBHNfitYJzNjsBhI3lL3zT/Uzwk=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFiB;AAGvCC,IAAAA,mBAAmB,EAAE,CAAC;AAAEC,MAAAA,sBAAsB,EAAE,CAAC;AAAEF,QAAAA,EAAE,EAAE,OAAN;AAAeG,QAAAA,IAAI,EAAE;AAArB,OAAD,CAA1B;AAA+DC,MAAAA,oBAAoB,EAAE,CAAC;AAAEJ,QAAAA,EAAE,EAAE,UAAN;AAAkBG,Q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AAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACf,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACK,mBAAzC;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAlED;;GAAMN,M;;KAAAA,M;AAoEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [{ personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }], sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }] }]\r\n\r\n\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n SubDirectoryItems(childDirectories) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.personalProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: appState.sharedProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.sharedProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.sharedProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8B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C;AAAhD;AAAA;AAAA;AAAA;AAAA,sBAHF;AAAA,eAAUQ,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,kBADD;AAFH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAxBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiDD,CAxED;;GAAMb,M;;KAAAA,M;AA0EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul>\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul>\r\n {/* Projects */}\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul>\r\n {/* Projects */}\r\n {appState.sharedProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.sharedProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n </ul>\r\n </div>\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: this.state.activeObjects.concat(directory[index])\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","state","concat","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,Q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C,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACV,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAzED;;GAAMV,M;;KAAAA,M;AA2EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: this.state.activeObjects.concat(directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.personalProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.sharedProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.sharedProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.sharedProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eA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AjM;AAAA,sCACE,QAAC,eAAD;AAAiB,gBAAA,IAAI,EAAC,QAAtB;AAA+B,gBAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,sBADF,WAEUZ,QAAQ,CAACO,oBAAT,CAA8BK,KAA9B,EAAqCR,EAF/C,wBAGE,QAAC,eAAD;AAAiB,gBAAA,IAAI,EAAC,eAAtB;AAAsC,gBAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,sBAHF;AAAA,eAAUQ,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,kBADD;AAFH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAxBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiDD,CAxED;;GAAMb,M;;KAAAA,M;AA0EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.sharedProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.sharedProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObject || appState.sharedProjectObjects.every(object => object === appState.activeObject) ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","DirectoryItems","map","elements","every","object"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAAE,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAlD,KAA9E;AAJiB,GAAD,CAAxC;;AAOA,QAAMC,YAAY,GAAG,CAACC,SAAD,EAAYC,KAAZ,KAAsB;AACzC,QAAID,SAAS,CAACC,KAAD,CAAT,KAAqBZ,QAAQ,CA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AWH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,YAAxD,IAAwEF,QAAQ,CAACO,oBAAT,CAA8BU,KAA9B,CAAoCC,MAAM,IAAIA,MAAM,KAAKlB,QAAQ,CAACE,YAAlE,CAAxE,GACCY,cAAc,CAACd,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CAxED;;GAAMR,M;;KAAAA,M;AA0EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObject ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObject || appState.sharedProjectObjects.every(object => object === appState.activeObject) ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const directoryItems = (elements, index) => {\n return /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.personalProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"directoryItems\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.sharedProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.sharedProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.sharedProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","directoryItems","elements","map"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,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AAAA;AAAA;AAAA,cAlBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AA2CD,CA9ED;;GAAMb,M;;KAAAA,M;AAgFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const directoryItems = (elements, index) => {\r\n return (\r\n <li>\r\n <div key={index} className={`directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <directoryItems />\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.sharedProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.sharedProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectory, parentDirectory.index),\n onClick: () => {\n toggleActive(parentDirectory, parentDirectory.index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? window.alert(\"hej\") : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.personalSharedDirectoryObjects[0], appState.personalProjectObjects), RootDirectoryItems(appState.personalSharedDirectoryObjects[1], appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"jWdx8XXHroi6UjgxtPTs5wUOW6U=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectory","childDirectories","window","alert","SubDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,EADwB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAAE,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,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ACd,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,CAAD,EAA6CH,QAAQ,CAACO,oBAAtD,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAhED;;GAAMR,M;;KAAAA,M;AAkEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\r\n return (\r\n <ul className=\"rootDirectory\">\r\n <li>\r\n <div key={parentDirectory.index} className={toggleActiveStyles(parentDirectory, parentDirectory.index)} onClick={() => { toggleActive(parentDirectory, parentDirectory.index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectory.id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectory === appState.activeObjects ?\r\n window.alert(\"hej\") :\r\n null\r\n }\r\n </li>\r\n </ul>\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.personalSharedDirectoryObjects[0], appState.personalProjectObjects)}\r\n {RootDirectoryItems(appState.personalSharedDirectoryObjects[1], appState.sharedProjectObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: {\n id: \"MyApp\",\n type: \"personal\"\n }\n }, {\n sharedProjectObjects: {\n id: \"ReactApp\",\n type: \"shared\",\n id: \"Very big ReactApp\",\n type: \"shared\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? SubDirectoryItems(childDirectories[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"IIfX1HcCSefxM7wC5eKepYWDB7k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;A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A;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBP,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUO,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACb,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACK,mBAAzC;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAtED;;GAAMN,M;;KAAAA,M;AAwEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [\r\n { id: \"Personal projects\" }, { id: \"Shared projects\" }\r\n ],\r\n\r\n SubDirectoryObjects: [\r\n { personalProjectObjects: { id: \"MyApp\", type: \"personal\" } },\r\n { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" } }\r\n ]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n SubDirectoryItems(childDirectories[index]) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this), DirectoryItems(appState.personalProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 11\n }, this), DirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","DirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAA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QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,WAEUH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAFrD,wBAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGU,cAAc,CAACd,QAAQ,CAACO,oBAAV,CANjB;AAAA;AAAA;AAAA;AAAA;AAAA,cAdF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AA4BD,CApED;;GAAMR,M;;KAAAA,M;AAsEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {DirectoryItems(appState.personalProjectObjects)}\r\n\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {DirectoryItems(appState.sharedProjectObjects)}\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n\n if (directory[index] === appState.activeObjects[directory[index]]) {\n newArray = JSON.parse(JSON.stringify(appState.activeObjects));\n newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n } else {\n newArray = JSON.parse(JSON.stringify(appState.activeObjects));\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObjects ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObjects ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"jWdx8XXHroi6UjgxtPTs5wUOW6U=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","newArray","JSON","parse","string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,CAA1C,CAAZ;AAA0D,WAA1M;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,aAAxD,GACCkB,cAAc,CAACpB,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CA9ED;;GAAMR,M;;KAAAA,M;AAgFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n\r\n if (directory[index] === appState.activeObjects[directory[index]]) {\r\n newArray = JSON.parse(JSON.stringify(appState.activeObjects))\r\n newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n }\r\n else {\r\n newArray = JSON.parse(JSON.stringify(appState.activeObjects))\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObjects ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObjects ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjectss: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjectss) {\n changeState({ ...appState,\n activeObjectss: null\n });\n } else {\n changeState({ ...appState,\n activeObjectss: activeObjectss.push(directory[index])\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjectss) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObjects ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObjects ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"alNxFrDjh1Z8Zv5R0BfVuK7nQ8g=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjectss","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","push","toggleActiveStyles","DirectoryItems","map","elements","activeObjects"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,cAAc,EAAE,EADuB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAAE,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAlD,KAA9E;AAJiB,GAAD,CAAxC;;AAOA,QAAMC,YAAY,GAAG,CAACC,SAAD,EAAYC,KAAZ,KAAsB;AACzC,QAAID,SAAS,CAACC,KAAD,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AC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACkB,aAAxD,GACCH,cAAc,CAACf,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CAxED;;GAAMR,M;;KAAAA,M;AA0EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjectss: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjectss) {\r\n changeState({ ...appState, activeObjectss: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjectss: activeObjectss.push(directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjectss) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObjects ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObjects ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = (className, directory) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: className,\n onClick: () => {\n toggleActive(appState.personalProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this), DirectoryItems(\"directoryItemPersonalProjectSelect\", appState.personalProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.sharedProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.sharedProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.sharedProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","DirectoryItems","className","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAAE,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,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r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (className, directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={className} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {DirectoryItems(\"directoryItemPersonalProjectSelect\", appState.personalProjectObjects)}\r\n\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.sharedProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.sharedProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObject ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","DirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8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awesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObject ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObject ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectory, parentDirectory.index),\n onClick: () => {\n toggleActive(parentDirectory, parentDirectory.index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.personalSharedDirectoryObjects[0], appState.personalProjectObjects), RootDirectoryItems(appState.personalSharedDirectoryObjects[1], appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"jWdx8XXHroi6UjgxtPTs5wUOW6U=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectory","childDirectories","SubDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAA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M;AAAEF,YAAAA,YAAY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBR,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUQ,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,eACGE,kBAAkB,CAACd,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,CAAD,EAA6CH,QAAQ,CAACK,sBAAtD,CADrB,EAEGS,kBAAkB,CAACd,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,CAAD,EAA6CH,QAAQ,CAACO,oBAAtD,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAhED;;GAAMR,M;;KAAAA,M;AAkEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n <li>\r\n <div key={parentDirectory.index} className={toggleActiveStyles(parentDirectory, parentDirectory.index)} onClick={() => { toggleActive(parentDirectory, parentDirectory.index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectory.id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectory === appState.activeObjects ?\r\n SubDirectoryItems(childDirectories) :\r\n null\r\n }\r\n </li>\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.personalSharedDirectoryObjects[0], appState.personalProjectObjects)}\r\n {RootDirectoryItems(appState.personalSharedDirectoryObjects[1], appState.sharedProjectObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this), \"\\xA0 \", directory[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObject ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","DirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,YAAY,EAAE,IADyB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN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gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,YAAxD,GACCY,cAAc,CAACd,QAAQ,CAACK,sBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAHF,eAgBE;AAAA,gCACE;AAAa,UAAA,SAAS,EAAG,qCAAoCQ,kBAAkB,CAACb,QAAQ,CAACG,8BAAV,EAA0C,CAA1C,CAA6C,EAA5H;AAA+H,UAAA,OAAO,EAAE,MAAM;AAAEO,YAAAA,YAAY,CAACV,QAAQ,CAACG,8BAAV,EAA0C,CAA1C,CAAZ;AAA0D,WAA1M;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,WAEUH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAFrD,wBAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,YAAxD,GACCY,cAAc,CAACd,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CAxED;;GAAMR,M;;KAAAA,M;AA0EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {directory[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObject ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObject ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [...appState.activeObjects];\n\n if (directory[index] === appState.activeObjects[directory[index]]) {\n newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n console.log(newArray);\n } else {\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n console.log(newArray);\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const DirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObjects ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObjects ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"jWdx8XXHroi6UjgxtPTs5wUOW6U=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","newArray","pop","console","log","push","toggleActiveStyles","DirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,EADwB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KAAD,EAA8E;AAAEL,MAAAA,EAAE,EAAE,mB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AAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,aAAxD,GACCiB,cAAc,CAACnB,QAAQ,CAACK,sBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAHF,eAgBE;AAAA,gCACE;AAAa,UAAA,SAAS,EAAG,qCAAoCa,kBAAkB,CAAClB,QAAQ,CAACG,8BAAV,EAA0C,CAA1C,CAA6C,EAA5H;AAA+H,UAAA,OAAO,EAAE,MAAM;AAAEO,YAAAA,YAAY,CAACV,QAAQ,CAACG,8BAAV,EAA0C,CAA1C,CAAZ;AAA0D,WAA1M;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,aAAxD,GACCiB,cAAc,CAACnB,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CA9ED;;GAAMR,M;;KAAAA,M;AAgFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = [...appState.activeObjects]\r\n\r\n if (directory[index] === appState.activeObjects[directory[index]]) {\r\n newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n console.log(newArray)\r\n }\r\n else {\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n console.log(newArray)\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const DirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[0] === appState.activeObjects ?\r\n DirectoryItems(appState.personalProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {appState.personalSharedDirectoryObjects[1] === appState.activeObjects ?\r\n DirectoryItems(appState.sharedProjectObjects) :\r\n null\r\n }\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: {\n id: \"MyApp\",\n type: \"personal\"\n }\n }, {\n sharedProjectObjects: {\n id: \"ReactApp\",\n type: \"shared\",\n id: \"Very big ReactApp\",\n type: \"shared\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? console.log(childDirectories[0][0]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"IIfX1HcCSefxM7wC5eKepYWDB7k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","console","log","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAA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AY,CAACC,SAAD,EAAYC,KAAZ,CAAZ;AAAgC,WAAnH;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBP,EAA5B;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUO,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACb,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACK,mBAAzC;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAtED;;GAAMN,M;;KAAAA,M;AAwEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [\r\n { id: \"Personal projects\" }, { id: \"Shared projects\" }\r\n ],\r\n\r\n SubDirectoryObjects: [\r\n { personalProjectObjects: { id: \"MyApp\", type: \"personal\" } },\r\n { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" } }\r\n ]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n console.log(childDirectories[0][0]) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MnMalrRrCVMlzPxXJdDd9y+CZuk=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAOA,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC;AACvCW,IAAAA,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,E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AkB,CAACR,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA3ED;;GAAMV,M;;KAAAA,M;AA6EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObject: null,\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n changeState({ ...appState,\n activeObject: null\n });\n } else {\n changeState({ ...appState,\n activeObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObject) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const projectDirectoryItems = () => {\n appState.sharedProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.sharedProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this), \"\\xA0 \", appState.sharedProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this));\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 0);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: appState.personalProjectObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`,\n onClick: () => {\n toggleActive(appState.personalProjectObjects, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 19\n }, this), \"\\xA0 \", appState.personalProjectObjects[index].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: `directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`,\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 1);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 13\n }, this), \"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\", /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: /*#__PURE__*/_jsxDEV(\"projectDirectoryItems\", {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"z4Q8rkqxebzZe7unu0SZgSsWN8k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObject","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","projectDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,Q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+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,WAEUH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAFrD,wBAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,eAME;AAAI,UAAA,SAAS,EAAC,sBAAd;AAAA,iCAEE;AAAA;AAAA;AAAA;AAAA;AAFF;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAxBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAyCD,CA5ED;;GAAML,M;;KAAAA,M;AA8EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObject: null,\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n changeState({ ...appState, activeObject: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObject: directory[index] })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObject) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const projectDirectoryItems = () => {\r\n appState.sharedProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.sharedProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <ul className=\"rootDirectory\">\r\n\r\n {/* Personal projects*/}\r\n <li>\r\n <div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n {appState.personalProjectObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={`directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalProjectObjects[index].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul>\r\n </li>\r\n\r\n {/* Shared projects */}\r\n <li>\r\n <div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n &nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n <ul className=\"projectListDirectory\">\r\n {/* List of Projects */}\r\n <projectDirectoryItems />\r\n </ul>\r\n </li>\r\n\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: {\n id: \"MyApp\",\n type: \"personal\"\n }\n }, {\n sharedProjectObjects: {\n id: \"ReactApp\",\n type: \"shared\",\n id: \"Very big ReactApp\",\n type: \"shared\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? console.log(childDirectories.sharedProjectObjects[0]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"IIfX1HcCSefxM7wC5eKepYWDB7k=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","console","log","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CACpB;AAAEC,MAAAA,EAAE,EAAE;AAAN,KADoB,EACS;AAAEA,MAAAA,EAAE,EAAE;AAAN,KADT,CAFiB;AAMvCC,IAAAA,mBAAmB,EAAE,CACnB;AAAEC,MAAAA,sBAAsB,EAAE;AAAEF,QAAAA,EAAE,E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AA;AAAA,kBAHF;AAAA,WAAUO,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACb,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACK,mBAAzC;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAtED;;GAAMN,M;;KAAAA,M;AAwEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [\r\n { id: \"Personal projects\" }, { id: \"Shared projects\" }\r\n ],\r\n\r\n SubDirectoryObjects: [\r\n { personalProjectObjects: { id: \"MyApp\", type: \"personal\" } },\r\n { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" } }\r\n ]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n console.log(childDirectories.sharedProjectObjects[0]) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment