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

implemented general solution for selecting directories

parent 4f6eb930
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\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(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(appState.personalSharedDirectoryObjects, 0),\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: 33,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 11\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 9\n }, this), directory[index] === appState.activeObjects ? SubDirectoryItems(directory) : null]\n }, void 0, true, {\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: 52,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\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: 54,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 50,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 48,\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: [RootDirectoryItems(appState.personalProjectObjects), RootDirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\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","SubDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,EADwB;AAEvCC,IAAAA,8BAA8B,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFO;AAGvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAED,MAAAA,EAAE,EAAE,OAAN;AAAeE,MAAAA,IAAI,EAAE;AAArB,KAAD,CAHe;AAIvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEH,MAAAA,EAAE,EAAE,UAAN;AAAkBE,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE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AkB,CAACd,QAAQ,CAACK,sBAAV,CADrB,EAEGS,kBAAkB,CAACd,QAAQ,CAACO,oBAAV,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAQD,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 = (directory) => {\r\n return (\r\n\r\n <li>\r\n <div key={index} className={toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)} 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 }\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 <ul className=\"rootDirectory\">\r\n {RootDirectoryItems(appState.personalProjectObjects)}\r\n {RootDirectoryItems(appState.sharedProjectObjects)}\r\n </ul>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: [],\n personalSharedDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectory, 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: 33,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", appState.personalSharedDirectoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 32,\n columnNumber: 11\n }, this), directory[index] === appState.activeObjects ? SubDirectoryItems(directory) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.personalProjectObjects), RootDirectoryItems(appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"jWdx8XXHroi6UjgxtPTs5wUOW6U=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","personalSharedDirectoryObjects","id","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectory","childDirectories","SubDirectoryItems","map","elements"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,Q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,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,CAACK,sBAAV,CADrB,EAEGS,kBAAkB,CAACd,QAAQ,CAACO,oBAAV,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAhED;;GAAMR,M;;KAAAA,M;AAkEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectory, childDirectories) => {\r\n return (\r\n <ul className=\"rootDirectory\">\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectory, 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 </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
{"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 id: \"MyOtherApp\",\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: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\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: 38,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? SubDirectoryItems(childDirectories[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 32,\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: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\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: 59,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\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: 68,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"Qm44hRlidRqEH8YJhLTl1myXtWo=\");\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,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFiB;AAGvCC,IAAAA,mBAAmB,EAAE,CACnB;AAAEC,MAAAA,sBAAsB,EAAE;AAAEF,QAAAA,EAAE,EAAE,OAAN;AAAeG,QAAAA,IAAI,EAAE,UAArB;AAAiCH,QAAAA,EAAE,EAAE,YAArC;AAAmDG,QAAAA,IAAI,EAAE;AAAzD;AAA1B,KADmB,EAEnB;AAAEC,MAAAA,oBAAoB,EAAE;AAAEJ,QAAAA,EAAE,EAAE,UAAN;AAAkBG,QAAAA,IAAI,EAAE,QAAxB;AAAkCH,QAAAA,EAAE,EAAE,mBAAtC;AAA2DG,QAAAA,IAAI,EAAE;AAAjE;AAAxB,KAFmB;AAHkB,GAAD,CAAxC;;AASA,QAAME,YAAY,GAAG,CAACC,SAAD,EAAYC,KAAZ,KAAsB;AACzC,QAAID,SAAS,CAACC,KAAD,CAAT,KAAqBX,QAAQ,CAACE,aAAlC,EAAiD;AAC/CD,MAAAA,WAAW,C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,CAACH,gBAAgB,CAACJ,KAAD,CAAjB,CADnB,GAEE,IATN;AAAA;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAkBD,GAnBD;;AAqBA,QAAMO,iBAAiB,GAAIR,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACM,GAAV,CAAc,CAACC,QAAD,EAAWN,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEC,kBAAkB,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,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,CAnED;;GAAMN,M;;KAAAA,M;AAqEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [\r\n { personalProjectObjects: { id: \"MyApp\", type: \"personal\", id: \"MyOtherApp\", type: \"personal\" } },\r\n { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" } }\r\n ],\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n SubDirectoryItems(childDirectories[index]) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const SubDirectoryObjects = [{\n personalProjectObjects: {\n id: \"MyApp\",\n type: \"personal\",\n id: \"MyOtherApp\",\n type: \"personal\"\n }\n }, {\n sharedProjectObjects: {\n id: \"ReactApp\",\n type: \"shared\",\n id: \"Very big ReactApp\",\n type: \"shared\"\n }\n }];\n const [appState, changeState] = useState({\n activeObjects: null\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? console.log(childDirectories[0]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"ShkwgPNyqd9lFjFigTVb4hbrdAU=\");\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","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","appState","changeState","activeObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","console","log","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,oBAAoB,GAAG,CAAC;AAAEC,IAAAA,EAAE,EAAE;AAAN,GAAD,EAA8B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAA9B,CAA7B;AACA,QAAMC,mBAAmB,GAAG,CAAC;AAAEC,IAAAA,sBAAsB,EAAE;AAAEF,MAAAA,EAAE,EAAE,OAAN;AAAeG,MAAAA,IAAI,EAAE,UAArB;AAAiCH,MAAAA,EAAE,EAAE,YAArC;AAAmDG,MAAAA,IAAI,EAAE;AAAzD;AAA1B,GAAD,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hD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAUU,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,CAACP,QAAQ,CAACN,oBAAV,EAAgCM,QAAQ,CAACJ,mBAAzC;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAlED;;GAAMH,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 rootDirectoryObjects = [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n const SubDirectoryObjects = [{ personalProjectObjects: { id: \"MyApp\", type: \"personal\", id: \"MyOtherApp\", type: \"personal\" } },\r\n { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" } }]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n console.log(childDirectories[0]) :\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 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 const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? console.log(childDirectories[0]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"aLNPDzK/0LybQ112DtYBgiGmYeY=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","console","log","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,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,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,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,CAlED;;GAAMN,M;;KAAAA,M;AAoEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [{ personalProjectObjects: { id: \"MyApp\", type: \"personal\" } }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", id: \"Very big ReactApp\", type: \"shared\" }],\r\n\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n console.log(childDirectories[0]) :\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 activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [],\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Aubergine\"\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: 38,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[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), parentDirectories[index] === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\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 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: 59,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\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: 61,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.rootDirectoryObjects, appState.personalProjectObjects), RootDirectoryItems(appState.rootDirectoryObjects, appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"GTAczF2HJJzqkODXuvjI+PhpnoM=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BJ,QAAQ,CAAC;AACvCK,IAAAA,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAEC,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B,CAFiB;AAGvCC,IAAAA,mBAAmB,EAAE,EAHkB;AAKvCC,IAAAA,sBAAsB,EAAE,CAAC;AAAEF,MAAAA,EAAE,EAAE,OAAN;AAAeG,MAAAA,IAAI,EAAE;AAArB,KAAD,CALe;AAMvCC,IAAAA,oBAAoB,EAAE,CACpB;AAAEJ,MAAAA,EAAE,EAAE,UAAN;AAAkBG,MAAAA,IAAI,EAAE,QAAxB;AAAkCE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAzC,KADoB,EAEpB;AAAEN,MAAAA,EAAE,EAAE,mBAAN;AAA2BG,MAAAA,IAAI,EAAE,QAAjC;AAA2CE,MAAAA,KAAK,EAAE;AAAEC,QAAAA,IAAI,EAAE;AAAR;AAAlD,KAFoB;AANiB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AACG,oBAAV,EAAgCH,QAAQ,CAACQ,oBAAzC,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAtED;;GAAMT,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: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [],\r\n\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [\r\n { id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Aubergine\" } }]\r\n })\r\n\r\n const 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.personalProjectObjects)}\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.sharedProjectObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: {\n id: \"MyApp\",\n type: \"personal\"\n }\n }, {\n sharedProjectObjects: {\n id: \"ReactApp\",\n type: \"shared\"\n }\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\"\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? console.log(childDirectories[0]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"eTF3/LDSb+6dvilJMI6+ivnZkmQ=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","console","log","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA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,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,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,CAlED;;GAAMN,M;;KAAAA,M;AAoEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [{ personalProjectObjects: { id: \"MyApp\", type: \"personal\" } }, { sharedProjectObjects: { id: \"ReactApp\", type: \"shared\" } }],\r\n\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\" }, { id: \"Very big ReactApp\", type: \"shared\" }],\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n console.log(childDirectories[0]) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.SubDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = {\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }],\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n };\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = parentDirectories => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 7\n }, this);\n };\n\n 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: 74,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 75,\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: 76,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(appState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 85,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MnMalrRrCVMlzPxXJdDd9y+CZuk=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG;AACrBF,IAAAA,EAAE,EAAE,UADiB;AAErBC,IAAAA,IAAI,EAAE,QAFe;AAGrBE,IAAAA,KAAK,EAAE,CAAC;AACNC,MAAAA,IAAI,EAAE;AADA,KAAD,CAHc;AAOrBJ,IAAAA,EAAE,EAAE,mBAPiB;AAQrBC,IAAAA,IAAI,EAAE,QARe;AASrBE,IAAAA,KAAK,EAAE,CAAC;AACNC,MAAAA,IAAI,EAAE;AADA,KAAD;AATc,GAAvB;AAgBA,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC;AACvCW,IAAAA,aAAa,EAAE,IADwB;AAEvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE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,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACR,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CApFD;;GAAMV,M;;KAAAA,M;AAsFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = {\r\n id: \"ReactApp\",\r\n type: \"shared\",\r\n teams: [{\r\n name: \"Henriks Meme Machine\"\r\n }],\r\n\r\n id: \"Very big ReactApp\",\r\n type: \"shared\",\r\n teams: [{\r\n name: \"Aubergine\"\r\n }]\r\n }\r\n\r\n\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects)}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const [appState, changeState] = useState({\n activeObjects: null,\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }],\n SubDirectoryObjects: [{\n personalProjectObjects: [{\n id: \"MyApp\",\n type: \"personal\"\n }],\n sharedProjectObjects: [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Henriks Meme Machine\"\n }\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: {\n name: \"Dream team\"\n }\n }]\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: parentDirectories.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(parentDirectories, index),\n onClick: () => {\n toggleActive(parentDirectories, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 35,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 36,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 34,\n columnNumber: 13\n }, this), parentDirectories[index] === appState.activeObjects ? SubDirectoryItems(childDirectories) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 7\n }, this);\n };\n\n const SubDirectoryItems = directory => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"projectListDirectory\",\n children: directory.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: toggleActiveStyles(directory, index),\n onClick: () => {\n toggleActive(directory, index);\n },\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 52,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [RootDirectoryItems(appState.rootDirectoryObjects, appState.personalProjectObjects), RootDirectoryItems(appState.rootDirectoryObjects, appState.sharedProjectObjects)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"HBHNfitYJzNjsBhI3lL3zT/Uzwk=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","appState","changeState","activeObjects","rootDirectoryObjects","id","SubDirectoryObjects","personalProjectObjects","type","sharedProjectObjects","teams","name","toggleActive","directory","index","toggleActiveStyles","RootDirectoryItems","parentDirectories","childDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP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M,GAAV,CAAc,CAACC,QAAD,EAAWN,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEC,kBAAkB,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,CAAiBT,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,WAAUS,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,CAACf,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACM,sBAAzC,CADrB,EAEGS,kBAAkB,CAACf,QAAQ,CAACG,oBAAV,EAAgCH,QAAQ,CAACQ,oBAAzC,CAFrB;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAMD,CAnED;;GAAMT,M;;KAAAA,M;AAqEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: null,\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n SubDirectoryObjects: [{ personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }], sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }] }]\r\n\r\n\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n changeState({ ...appState, activeObjects: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === appState.activeObjects) {\r\n return \"active\"\r\n } else return \"inactive\"\r\n }\r\n\r\n const RootDirectoryItems = (parentDirectories, childDirectories) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {parentDirectories.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {parentDirectories[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {\r\n parentDirectories[index] === appState.activeObjects ?\r\n SubDirectoryItems(childDirectories) :\r\n null\r\n }\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directory[index].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n ))}\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems(appState.rootDirectoryObjects, appState.personalProjectObjects)}\r\n {RootDirectoryItems(appState.rootDirectoryObjects, 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 const newArray = [];\n\n if (directory[index] === appState.activeObjects[directory[index]]) {\n newArray = appState.activeObjects.map();\n newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n } else {\n newArray = appState.activeObjects.slice();\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","map","pop","slice","push","toggleActiveStyles","DirectoryItems","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,UAAMC,QAAQ,GAAG,EAAjB;;AAEA,QAAIF,SAAS,CAACC,KAAD,CAAT,KAAqBZ,QAAQ,CAACE,a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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,eAEE;AAAA,gCAAWH,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,EAA2CC,EAAtD;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,eAGE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA,WAAU,CAAV;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGJ,QAAQ,CAACG,8BAAT,CAAwC,CAAxC,MAA+CH,QAAQ,CAACE,aAAxD,GACCiB,cAAc,CAACnB,QAAQ,CAACO,oBAAV,CADf,GAEC,IARJ;AAAA;AAAA;AAAA;AAAA;AAAA,cAhBF;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAiCD,CA9ED;;GAAMR,M;;KAAAA,M;AAgFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n personalSharedDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }],\r\n personalProjectObjects: [{ id: \"MyApp\", type: \"personal\" }],\r\n sharedProjectObjects: [{ id: \"ReactApp\", type: \"shared\", teams: { name: \"Henriks Meme Machine\" } }, { id: \"Very big ReactApp\", type: \"shared\", teams: { name: \"Dream team\" } }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n\r\n if (directory[index] === appState.activeObjects[directory[index]]) {\r\n newArray = appState.activeObjects.map()\r\n newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n }\r\n else {\r\n newArray = appState.activeObjects.slice()\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
......@@ -3,76 +3,77 @@ import "./assign.css"
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
const Assign = () => {
const personalProjects = [
{ id: "MyApp", type: "personal" },
{ id: "MyOtherApp", type: "personal" }
]
const sharedProjects = [
{ id: "ReactApp", type: "shared", teams: [{ name: "Henriks Meme Machine" }] },
{ id: "Very big ReactApp", type: "shared", teams: [{ name: "Aubergine" }] }
]
const [appState, changeState] = useState({
activeObject: null,
personalSharedDirectoryObjects: [{ id: "Personal projects" }, { id: "Shared projects" }],
personalProjectObjects: [{ id: "MyApp", type: "personal" }],
sharedProjectObjects: [{ id: "ReactApp", type: "shared", teams: { name: "Henriks Meme Machine" } }]
activeObjects: [],
rootDirectoryObjects: [{ id: "Personal projects" }, { id: "Shared projects" }]
})
const toggleActive = (directory, index) => {
if (directory[index] === appState.activeObject) {
changeState({ ...appState, activeObject: null })
if (directory[index] === appState.activeObjects) {
changeState({ ...appState, activeObjects: null })
}
else {
changeState({ ...appState, activeObject: directory[index] })
changeState({ ...appState, activeObjects: (directory[index]) })
}
}
const toggleActiveStyles = (directory, index) => {
if (directory[index] === appState.activeObject) {
if (directory[index] === appState.activeObjects) {
return "active"
} else return "inactive"
}
return (
<div className="assignSelectContainer">
<ul>
{/* Personal projects*/}
<li>
<div key={0} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 0)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 0) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
&nbsp; {appState.personalSharedDirectoryObjects[0].id} &nbsp;
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
<ul>
{/* Projects */}
{appState.personalProjectObjects.map((elements, index) => (
<li>
<div key={index} className={`directoryItemPersonalProjectSelect ${toggleActiveStyles(appState.personalProjectObjects, index)}`} onClick={() => { toggleActive(appState.personalProjectObjects, index) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
&nbsp; {appState.personalProjectObjects[index].id} &nbsp;
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
</li>
))}
</ul>
</li>
const RootDirectoryItems = (parentDirectories) => {
return (
< ul className="rootDirectory" >
{parentDirectories.map((elements, index) => (
<li>
<div key={index} className={toggleActiveStyles(parentDirectories, index)} onClick={() => { toggleActive(parentDirectories, index) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
<a>&nbsp; {parentDirectories[index].id} &nbsp;</a>
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
{
parentDirectories[index] === appState.activeObjects ?
parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) :
null
}
</li>
))}
</ul >
)
}
{/* Shared projects */}
<li>
<div key={1} className={`directoryItemPersonalSharedSelect ${toggleActiveStyles(appState.personalSharedDirectoryObjects, 1)}`} onClick={() => { toggleActive(appState.personalSharedDirectoryObjects, 1) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
&nbsp; {appState.personalSharedDirectoryObjects[1].id} &nbsp;
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
<ul>
{/* Projects */}
{appState.sharedProjectObjects.map((elements, index) => (
<li>
<div key={index} className={`directoryItemSharedProjectSelect ${toggleActiveStyles(appState.sharedProjectObjects, index)}`} onClick={() => { toggleActive(appState.sharedProjectObjects, index) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
&nbsp; {appState.sharedProjectObjects[index].id} &nbsp;
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
</li>
))}
</ul>
</li>
const SubDirectoryItems = (directory) => {
return (
<ul className="projectListDirectory">
{directory.map((elements, index) => (
<li>
<div key={index} className={toggleActiveStyles(directory, index)} onClick={() => { toggleActive(directory, index) }} >
<FontAwesomeIcon icon="folder" className="folder-icon"></FontAwesomeIcon>
<a>&nbsp; {directory[index].id} &nbsp;</a>
<FontAwesomeIcon icon="chevron-right" className="arrow-right-icon"></FontAwesomeIcon>
</div>
</li>
))}
</ul >
)
}
</ul>
</div>
return (
<div className="assignSelectContainer">
{RootDirectoryItems(appState.rootDirectoryObjects)}
</div >
)
}
......
.assignSelectContainer {
display: inline-block;
font-size: 14px;
}
.assignSelectContainer ul {
.rootDirectory {
list-style: none;
padding: 0;
margin: 0;
padding: 0;
user-select: none;
}
.assignSelectContainer li div {
......@@ -38,4 +38,13 @@
.assignSelectContainer li div.active .arrow-right-icon {
color: rgb(32, 124, 202);
transform: rotate(90deg);
}
.assignSelectContainer li div.active + .projectListDirectory {
visibility: visible;
}
.projectListDirectory {
visibility: hidden;
padding-left: 23px;
}
\ 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