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 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: 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), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\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: 65,\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: 67,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this), DirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\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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A,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,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,EAMGU,cAAc,CAACd,QAAQ,CAACO,oBAAV,CANjB;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AA8BD,CAtED;;GAAMR,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 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 }\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 {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 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 console.log(parentDirectory.id + \"\" + childDirectories.type);\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: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\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: 36,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\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: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\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: 56,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\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: 65,\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","console","log","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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,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,CAjED;;GAAMR,M;;KAAAA,M;AAmEN,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 console.log(parentDirectory.id + \"\" + childDirectories.type)\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 = () => {\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: `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: 35,\n columnNumber: 17\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: 37,\n columnNumber: 17\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 15\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 13\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: 56,\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: 58,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(DirectoryItems, {}, 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), /*#__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: 67,\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: 69,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\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: 76,\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: 78,\n columnNumber: 19\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 17\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 71,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\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,EAAE,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAlD,KAA9E;AA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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 = () => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {\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 }\r\n\r\n </ul>\r\n\r\n\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 />\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 activeObjects: 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.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 console.log(parentDirectory.id);\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: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\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: 36,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\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: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\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: 56,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\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: 65,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"JL+WiEaEtnZXei4RoDy/VEWvoW4=\");\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","console","log","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,IADwB;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,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AAA,UADF;AAMD,CAjED;;GAAMR,M;;KAAAA,M;AAmEN,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 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 console.log(parentDirectory.id)\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 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: activeObjects.push(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, \"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","push","toggleActiveStyles","activeObject","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,mBAAN;AAA2BE,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,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AAA,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,YAAxD,GACCC,cAAc,CAAChB,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 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: activeObjects.push(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 console.log(parentDirectory.id + \"\" + childDirectories[0].id);\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: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\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: 36,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\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: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\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: 56,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\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: 65,\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","console","log","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,M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,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,CAjED;;GAAMR,M;;KAAAA,M;AAmEN,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 console.log(parentDirectory.id + \"\" + childDirectories[0].id)\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 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[directory[index]]) {\n const newArray = appState.activeObjects.slice();\n newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\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 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: 38,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\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: 40,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 34,\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: 55,\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: 56,\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: 57,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObjects ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\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), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\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: 70,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObjects ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\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","slice","pop","toggleActiveStyles","DirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG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AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,aAAxD,GACCe,cAAc,CAACjB,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CA5ED;;GAAMR,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 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\r\n\r\n if (directory[index] === appState.activeObjects[directory[index]]) {\r\n const newArray = appState.activeObjects.slice()\r\n newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\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 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: [],\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 = this.appState.activeObjects.slice();\n\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 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: 37,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 38,\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: 39,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\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: 54,\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: 55,\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: 56,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObjects ? DirectoryItems(appState.personalProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\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: 67,\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: 68,\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: 69,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObjects ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 48,\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","slice","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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AEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CA3ED;;GAAMR,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 [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 = this.appState.activeObjects.slice()\r\n\r\n if (directory[index] === appState.activeObjects) {\r\n\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 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 = 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: 52,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"p\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\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: 54,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\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: 65,\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: 67,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObject ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\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,I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AAG,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,CAzED;;GAAMR,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 [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 }\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 <p>&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;</p>\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 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: `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,MAA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Q,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,CAACK,sBAAV,CANjB;AAAA;AAAA;AAAA;AAAA;AAAA,cAHF,eAcE;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,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 {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 }\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 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: 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: 66,\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: 68,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 11\n }, this), DirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\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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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 = (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 }\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 {\r\n DirectoryItems(appState.personalProjectObjects)\r\n\r\n }\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: 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) : 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;AACvCK,IAAAA,aA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WD,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) :\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: 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: 52,\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: 53,\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: 55,\n columnNumber: 13\n }, this)]\n }, 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[0] === appState.activeObject ? DirectoryItems(appState.personalProjectObjects) : null]\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: 66,\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: 68,\n columnNumber: 13\n }, this)]\n }, 1, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 11\n }, this), appState.personalSharedDirectoryObjects[1] === appState.activeObject ? DirectoryItems(appState.sharedProjectObjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\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,KAA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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,cAjBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAkCD,CA1ED;;GAAMR,M;;KAAAA,M;AA4EN,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 }\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\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 = [];\n\n if (directory[index] === appState.activeObjects[directory[index]]) {\n newArray = appState.activeObjects.slice(start, end);\n newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n } else {\n newArray = appState.activeObjects.slice(start, end);\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","slice","start","end","pop","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,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,UAAM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,CAACK,sBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAHF,eAgBE;AAAA,gCACE;AAAa,UAAA,SAAS,EAAG,qCAAoCc,kBAAkB,CAACnB,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,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 = appState.activeObjects.slice(start, end)\r\n newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n }\r\n else {\r\n newArray = appState.activeObjects.slice(start, end)\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 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 console.log(parentDirectory.id + \"\" + 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: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectory.id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\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: 36,\n columnNumber: 13\n }, this)]\n }, parentDirectory.index, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this), parentDirectory === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\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: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\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: 56,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\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: 65,\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","console","log","SubDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP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BAAkB,CAACF,SAAD,EAAYC,KAAZ,CAA9C;AAAkE,UAAA,OAAO,EAAE,MAAM;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,CAjED;;GAAMR,M;;KAAAA,M;AAmEN,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 console.log(parentDirectory.id + \"\" + 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 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 = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, index),\n onClick: () => {\n toggleActive(appState.personalSharedDirectoryObjects, 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 \", appState.personalSharedDirectoryObjects[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), directory[index] === appState.activeObjects ? SubDirectoryItems(directory) : null]\n }, void 0, true, {\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 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: 55,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\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: 57,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.personalProjectObjects), RootDirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\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","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,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,MAAA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AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,eACGE,kBAAkB,CAACd,QAAQ,CAACK,sBAAV,CADrB,EAEGS,kBAAkB,CAACd,QAAQ,CAACO,oBAAV,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAlED;;GAAMR,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: [],\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 = (directory) => {\r\n return (\r\n <ul className=\"rootDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, index)} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {appState.personalSharedDirectoryObjects[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n directory[index] === appState.activeObjects ?\r\n SubDirectoryItems(directory) :\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.personalProjectObjects)}\r\n {RootDirectoryItems(appState.sharedProjectObjects)}\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