Commit 03fefdc6 authored by Mathias Engelbrecht Pilegård's avatar Mathias Engelbrecht Pilegård
Browse files

reimplemented issue assignment selection directory with pure css

parent 50cfc658
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n if (directory === rootDirectory.rootDirectoryObjects) {\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n } else if (directory === subDirectory.subDirectoryObjects) {\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 58,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\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: 60,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 54,\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: 77,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 78,\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: 79,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 73,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 88,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","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;AA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AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGE,kBAAkB,CAACZ,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAvFD;;GAAMV,M;;KAAAA,M;AAyFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n else if (directory === subDirectory.subDirectoryObjects) {\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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 {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\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(rootDirectory.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":"export { default as CSSTransition } from './CSSTransition';\nexport { default as ReplaceTransition } from './ReplaceTransition';\nexport { default as SwitchTransition } from './SwitchTransition';\nexport { default as TransitionGroup } from './TransitionGroup';\nexport { default as Transition } from './Transition';\nexport { default as config } from './config';","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/node_modules/react-transition-group/esm/index.js"],"names":["default","CSSTransition","ReplaceTransition","SwitchTransition","TransitionGroup","Transition","config"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAApB,QAAyC,iBAAzC;AACA,SAASD,OAAO,IAAIE,iBAApB,QAA6C,qBAA7C;AACA,SAASF,OAAO,IAAIG,gBAApB,QAA4C,oBAA5C;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,mBAA3C;AACA,SAASJ,OAAO,IAAIK,UAApB,QAAsC,cAAtC;AACA,SAASL,OAAO,IAAIM,MAApB,QAAkC,UAAlC","sourcesContent":["export { default as CSSTransition } from './CSSTransition';\nexport { default as ReplaceTransition } from './ReplaceTransition';\nexport { default as SwitchTransition } from './SwitchTransition';\nexport { default as TransitionGroup } from './TransitionGroup';\nexport { default as Transition } from './Transition';\nexport { default as config } from './config';"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectoryState, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject[index]) {\n changeRootState({ ...rootDirectoryState,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootState({ ...rootDirectoryState,\n activeRootDirectoryObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject) {\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: 43,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\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: 45,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectoryState.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\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: 64,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\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: 66,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectoryState.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"9i5h1PzN0cFgCmgEUn0ANzja/sU=\");\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","rootDirectoryState","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","toggleActive","directory","index","changeRootState","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,kBAAD,EAAqBC,wBAArB,IAAiDV,QAAQ,CAAC;AAC9DW,IAAAA,yBAAyB,EAAE,EADmC;AAE9DC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B;AAFwC,GAAD,CAA/D;;AAKA,QAAMS,YAAY,GAAG,CAACC,SAAD,EAAYC,KAAZ,KAAsB;AACzC,QAAID,SAAS,CAACC,KAAD,CAAT,KAAqBN,kBAAkB,CAACE,yBAAnB,CAA6CI,KAA7C,CAAzB,EAA8E;AAC5EC,MAAAA,eAAe,CAAC,EAAE,GAAGP,kBAAL;AAAyBE,QAAAA,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AiB,CAACnB,gBAAD,CAAlD,GAAuEmB,iBAAiB,CAAChB,cAAD,CAD1F,GAEE,IATN;AAAA;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAkBD,GAnBD;;AAqBA,QAAMgB,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,EAAEE,kBAAkB,CAACH,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,CAAiBX,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,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGG,kBAAkB,CAACT,kBAAkB,CAACG,oBAApB;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA1ED;;GAAMV,M;;KAAAA,M;AA4EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectoryState, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject[index]) {\r\n changeRootState({ ...rootDirectoryState, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootState({ ...rootDirectoryState, activeRootDirectoryObject: (directory[index]) })\r\n\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectoryState.activeRootDirectoryObject) {\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] === rootDirectoryState.activeRootDirectoryObject ?\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(rootDirectoryState.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 personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n if (directory === rootDirectory.rootDirectoryObjects) {\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeSubDirectoryObject);\n }\n } else {\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject);\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 59,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[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), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\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 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: 78,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 79,\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: 80,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 89,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,aAAD,EAAgBC,wBAAhB,IAA4CV,QAAQ,CAAC;AACzDW,IAAAA,yBAAyB,EAAE,EAD8B;AAEzDC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B;AAFmC,GAAD,CAA1D;AAKA,QAAM,CAACS,YAAD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EAAEG,kBAAkB,CAACJ,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,CAAiBf,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,WAAUe,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACd,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAxFD;;GAAMV,M;;KAAAA,M;AA0FN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeSubDirectoryObject)\r\n }\r\n }\r\n else {\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject)\r\n }\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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 {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\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(rootDirectory.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\";\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 const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\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: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", personalProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\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: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", sharedProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 55,\n columnNumber: 5\n }, this);\n};\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","rootDirectoryObjects","DirectoryItems","map","elements","index"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAMA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEL,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;;AAKA,QAAMM,cAAc,GAAG,MAAM;AAC3B,wBACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,8BACE;AAAK,QAAA,SAAS,EAAC,cAAf;AAAA,gCACE;AAAO,UAAA,IAAI,EAAC,UAAZ;AAAuB,UAAA,EAAE,EAAC;AAA1B;AAAA;AAAA;AAAA;AAAA,gBADF,eAEE;AAAO,UAAA,GAAG,EAAC,GAAX;AAAA,kCAAe,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC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CAAI;AAAG,cAAA,IAAI,EAAC,GAAR;AAAA,8BAAcP,cAAc,CAACO,KAAD,CAAd,CAAsBT,EAApC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAJ;AAAA;AAAA;AAAA;AAAA,kBADD;AADH;AAAA;AAAA;AAAA;AAAA,gBANF;AAAA;AAAA;AAAA;AAAA;AAAA,cAbF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF;AA6BD,GA9BD;;AAgCA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,2BACE,QAAC,cAAD;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAtDD;;KAAMF,M;AAwDN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"rootDirectory\">\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li><a href=\"#\"> {personalProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li><a href=\"#\"> {sharedProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n console.log(\"toggle item active\" + directory[index].id);\n\n if (directory === rootDirectory.rootDirectoryObjects) {\n console.log(\"directory is rootDirectory\");\n\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n }\n\n if (directory === subDirectory.subDirectoryObjects) {\n console.log(\"directory is subDirectory\");\n\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"subDirectory set to active\");\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 61,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 62,\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: 63,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\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: 80,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 81,\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: 82,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 79,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 78,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 91,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,aAAD,EAAgBC,wBAAhB,IAA4CV,QAAQ,CAAC;AACzDW,IAAAA,yBAAyB,EAAE,EAD8B;AAEzDC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,E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,GAjBD;;AAmBA,QAAMQ,iBAAiB,GAAIT,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACO,GAAV,CAAc,CAACC,QAAD,EAAWP,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEG,kBAAkB,CAACJ,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,CAAiBf,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,WAAUe,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACd,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA1FD;;GAAMV,M;;KAAAA,M;AA4FN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n console.log(\"toggle item active\" + directory[index].id)\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n console.log(\"directory is rootDirectory\")\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n if (directory === subDirectory.subDirectoryObjects) {\r\n console.log(\"directory is subDirectory\")\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"subDirectory set to active\")\r\n }\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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 {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\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(rootDirectory.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 personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n const activeDirectory = directory;\n\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 48,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 49,\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: 50,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\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: 69,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 70,\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: 71,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 80,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","activeDirectory","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,aAAD,EAAgBC,wBAAhB,IAA4CV,QAAQ,CAAC;AACzDW,IAAAA,yBAAyB,EAAE,EAD8B;AAEzDC,IAAAA,oBAAoB,EAAE,CAAC;AAAER,MAAAA,EAAE,EAAE;AAAN,KAAD,EAA8B;AAAEA,MAAAA,EAAE,EAAE;AAAN,KAA9B;AAFmC,GAAD,CAA1D;AAKA,QAAM,CAACS,YAAD,EAA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,WAAUe,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,cACGG,kBAAkB,CAACb,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA/ED;;GAAMV,M;;KAAAA,M;AAiFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const activeDirectory = directory\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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] === rootDirectory.activeRootDirectoryObject ?\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(rootDirectory.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\";\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 const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const DirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"rootDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"A\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[0].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 28,\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: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: personalProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"a\", {\n href: \"#\",\n children: [\" \", personalProjects[index].id, \" \"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 33,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 38,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 26\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", rootDirectoryObjects[1].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\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: 41,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this), /*#__PURE__*/_jsxDEV(\"ul\", {\n children: sharedProjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"subSubDirectory\",\n children: [/*#__PURE__*/_jsxDEV(\"input\", {\n type: \"checkbox\",\n id: \"B-A\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 17\n }, this), /*#__PURE__*/_jsxDEV(\"label\", {\n for: \"B-A\",\n children: sharedProjects[index].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 17\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 19\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 15\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\n columnNumber: 11\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: /*#__PURE__*/_jsxDEV(DirectoryItems, {}, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 5\n }, this);\n};\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","rootDirectoryObjects","DirectoryItems","map","elements","index"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAA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AAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA3DD;;KAAMF,M;AA6DN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const DirectoryItems = () => {\r\n return (\r\n <div className=\"rootDirectory\">\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"A\" />\r\n <label for=\"A\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[0].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {personalProjects.map((elements, index) => (\r\n <li><a href=\"#\"> {personalProjects[index].id} </a></li>\r\n ))}\r\n </ul>\r\n </div>\r\n <div className=\"subDirectory\">\r\n <input type=\"checkbox\" id=\"B\" />\r\n <label for=\"B\"><FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {rootDirectoryObjects[1].id} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </label>\r\n <ul>\r\n {sharedProjects.map((elements, index) => (\r\n <li><div className=\"subSubDirectory\">\r\n <input type=\"checkbox\" id=\"B-A\" />\r\n <label for=\"B-A\">\r\n {sharedProjects[index].id}\r\n </label>\r\n </div></li>\r\n ))}\r\n </ul>\r\n </div>\r\n </div>\r\n\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <DirectoryItems />\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n const activeDirectoryObject = [];\n\n if (directory === rootDirectory.rootDirectoryObjects) {\n activeDirectoryObject === rootDirectory.activeRootDirectoryObject;\n } else if (directory === subDirectory.subDirectoryObjects) {\n activeDirectoryObject === subDirectory.activeSubDirectoryObject;\n }\n\n if (directory[index] === activeDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeDirectoryObject: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 55,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 56,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 57,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 54,\n columnNumber: 13\n }, this), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? parentDirectories[index] === 0 ? SubDirectoryItems(personalProjects) : SubDirectoryItems(sharedProjects) : null]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 53,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 51,\n columnNumber: 7\n }, this);\n };\n\n 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: 76,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 77,\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: 78,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 75,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 72,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 87,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","activeDirectoryObject","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;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AdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGG,kBAAkB,CAACb,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAtFD;;GAAMV,M;;KAAAA,M;AAwFN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const activeDirectoryObject = []\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n activeDirectoryObject === rootDirectory.activeRootDirectoryObject\r\n } else if (directory === subDirectory.subDirectoryObjects) {\r\n activeDirectoryObject === subDirectory.activeSubDirectoryObject\r\n }\r\n\r\n\r\n if (directory[index] === activeDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeDirectoryObject: (directory[index]) })\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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] === rootDirectory.activeRootDirectoryObject ?\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(rootDirectory.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 personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n newArray: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n appState.newArray.push(directory[index]);\n console.log(appState.newArray);\n\n if (directory[index] === appState.activeObjects) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n changeState({ ...appState,\n activeObjects: directory[index]\n });\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === appState.activeObjects) {\n return \"active\";\n } else return \"inactive\";\n };\n\n const 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: 45,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\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: 47,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 44,\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: 43,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\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: 66,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\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: 68,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 62,\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: 77,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"xWS9QEyxm04K2oIrDmBJxIV5tO0=\");\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","newArray","rootDirectoryObjects","toggleActive","directory","index","push","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAM,CAACC,QAAD,EAAWC,WAAX,IAA0BV,QAAQ,CAAC;AACvCW,IAAAA,aAAa,EAAE,EADwB;AAEvCC,IAAAA,QAAQ,EAAE,EAF6B;AAGvCC,IAAAA,oBAAoB,EAAE,CAAC;AAAET,MAAAA,EAAE,EAAE;AAAN,KA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AUY,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,cACGK,kBAAkB,CAACZ,QAAQ,CAACI,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA5ED;;GAAMX,M;;KAAAA,M;AA8EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n newArray: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n appState.newArray.push(directory[index])\r\n console.log(appState.newArray)\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\";\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 const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"DirectoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 15\n }, this), console.log(directoryObjects[index]), /*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"chevron-right\",\n className: \"arrow-right-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 31,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\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: 40,\n columnNumber: 5\n }, this);\n};\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","rootDirectoryObj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AwBV,EAAnC;AAAA;AAAA;AAAA;AAAA;AAAA,kBAFF,EAGGW,OAAO,CAACC,GAAR,CAAYL,gBAAgB,CAACG,KAAD,CAA5B,CAHH,eAIE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,eAAtB;AAAsC,YAAA,SAAS,EAAC;AAAhD;AAAA;AAAA;AAAA;AAAA,kBAJF;AAAA,WAAUA,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAcD,GAfD;;AAiBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGJ,kBAAkB,CAACO,QAAQ,CAACR,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAvCD;;KAAMP,M;AAyCN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div key={index} className={\"DirectoryItem\"}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[index].id} &nbsp;</a>\r\n {console.log(directoryObjects[index])}\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 personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [rootDirectory, changeRootDirectoryState] = useState({\n activeRootDirectoryObject: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n const [subDirectory, changeSubDirectoryState] = useState({\n activeSubDirectoryObject: [],\n subDirectoryObjects: [personalProjects, sharedProjects]\n });\n\n const toggleActive = (directory, index) => {\n if (directory === rootDirectory.rootDirectoryObjects) {\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: null\n });\n } else {\n changeRootDirectoryState({ ...rootDirectory,\n activeRootDirectoryObject: directory[index]\n });\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeRootDirectoryObject.id);\n }\n } else {\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: null\n });\n } else {\n changeSubDirectoryState({ ...subDirectory,\n activeSubDirectoryObject: directory[index]\n });\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject.id);\n }\n }\n };\n\n const toggleActiveStyles = (directory, index) => {\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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: 59,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[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), parentDirectories[index] === rootDirectory.activeRootDirectoryObject ? SubDirectoryItems(subDirectory.subDirectoryObjects[index]) : null]\n }, void 0, true, {\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 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: 78,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 79,\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: 80,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 77,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 76,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 74,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems(rootDirectory.rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 89,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"iGoe9GTgUyRwalL5Oja9aYXeNzs=\");\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","rootDirectory","changeRootDirectoryState","activeRootDirectoryObject","rootDirectoryObjects","subDirectory","changeSubDirectoryState","activeSubDirectoryObject","subDirectoryObjects","toggleActive","directory","index","console","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AI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWD,SAAS,CAACC,KAAD,CAAT,CAAiBf,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,WAAUe,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGI,kBAAkB,CAACd,aAAa,CAACG,oBAAf;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAxFD;;GAAMV,M;;KAAAA,M;AA0FN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [rootDirectory, changeRootDirectoryState] = useState({\r\n activeRootDirectoryObject: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const [subDirectory, changeSubDirectoryState] = useState({\r\n activeSubDirectoryObject: [],\r\n subDirectoryObjects: [personalProjects, sharedProjects]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n if (directory === rootDirectory.rootDirectoryObjects) {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject[index]) {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: null })\r\n }\r\n else {\r\n changeRootDirectoryState({ ...rootDirectory, activeRootDirectoryObject: (directory[index]) })\r\n console.log(\"rootDirectory set to active\" + \" \" + rootDirectory.activeRootDirectoryObject.id)\r\n }\r\n }\r\n else {\r\n if (directory[index] === subDirectory.activeSubDirectoryObject[index]) {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: null })\r\n }\r\n else {\r\n changeSubDirectoryState({ ...subDirectory, activeSubDirectoryObject: (directory[index]) })\r\n console.log(\"subDirectory set to active\" + \" \" + subDirectory.activeSubDirectoryObject.id)\r\n }\r\n }\r\n }\r\n\r\n const toggleActiveStyles = (directory, index) => {\r\n if (directory[index] === rootDirectory.activeRootDirectoryObject) {\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 {parentDirectories[index] === rootDirectory.activeRootDirectoryObject ?\r\n SubDirectoryItems(subDirectory.subDirectoryObjects[index]) :\r\n null}\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(rootDirectory.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, useRef, createRef, useEffect } 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 // Directory data\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }]; // Directory references\n\n const rootDirectoryRefs = useRef([]);\n rootDirectoryRefs.current = rootDirectoryObjects.map((ref, index) => rootDirectoryRefs.current[index] = /*#__PURE__*/createRef()); // Directory states\n\n const [isActive, setIsActive] = useState(false);\n\n const onClick = index => {\n console.log(rootDirectoryRefs.current[index]);\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: () => onClick(index),\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 \", directoryObjects[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 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 ref: rootDirectoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\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(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MJDv9q+kWhlGbDVTmxVjrQjz+R8=\");\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","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","rootDirectoryRefs","current","map","ref","index","isActive","setIsActive","onClick","console","log","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB;AACA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEC,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;AAKA,QAAMC,gBAAgB,GAAG,CACvB;AAAED,IAAAA,EAAE,EAAE,OAAN;AAAeE,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAEF,IAAAA,EAAE,EAAE,YAAN;AAAoBE,IAAAA,IAAI,EAA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SAAS,EAAC,uBAAf;AAAA,cACGM,kBAAkB,CAACjB,oBAAD;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAnED;;GAAMD,M;;KAAAA,M;AAqEN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, createRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n // Directory data\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n // Directory references\r\n const rootDirectoryRefs = useRef([])\r\n rootDirectoryRefs.current = rootDirectoryObjects.map(\r\n (ref, index) => rootDirectoryRefs.current[index] = createRef()\r\n )\r\n\r\n // Directory states\r\n const [isActive, setIsActive] = useState(false)\r\n const onClick = (index) => {\r\n console.log(rootDirectoryRefs.current[index])\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs.current[index]} key={[index]} className={isActive ? 'active' : 'inactive'} onClick={() => onClick(index)} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[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 }\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 ref={rootDirectoryRefs} key={[index]} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\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(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 _s2 = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { CSSTransition } from 'react-transition-group';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = props => {\n _s2();\n\n var _s = $RefreshSig$();\n\n const [open, setOpen] = useState(false);\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const SubDirectoryItem = props => {\n return /*#__PURE__*/_jsxDEV(CSSTransition, {\n children: /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"subDirectoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"SubDirectoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 30,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", props.text, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 31,\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: 32,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 29,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 7\n }, this);\n };\n\n const RootDirectoryItem = props => {\n _s();\n\n const [activeMenu, setActiveMenu] = useState();\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"directoryItem\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: [/*#__PURE__*/_jsxDEV(\"div\", {\n className: \"DirectoryItem\",\n onClick: () => props.openItems && setActiveMenu(props.openItems),\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 47,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", props.text, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\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: 49,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\n columnNumber: 11\n }, this), open && props.children]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 44,\n columnNumber: 7\n }, this);\n };\n\n _s(RootDirectoryItem, \"DND9FcZXazjQ4+k4Kj5K3T5SIWM=\");\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: [/*#__PURE__*/_jsxDEV(RootDirectoryItem, {\n text: rootDirectoryObjects[0].id,\n openItems: \"personalProjects\",\n children: [/*#__PURE__*/_jsxDEV(SubDirectoryItem, {\n text: personalProjects[0].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 60,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SubDirectoryItem, {\n text: personalProjects[1].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 61,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 59,\n columnNumber: 7\n }, this), /*#__PURE__*/_jsxDEV(RootDirectoryItem, {\n text: rootDirectoryObjects[1].id,\n openItems: \"sharedProjects\",\n children: [/*#__PURE__*/_jsxDEV(SubDirectoryItem, {\n text: sharedProjects[0].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\n columnNumber: 9\n }, this), /*#__PURE__*/_jsxDEV(SubDirectoryItem, {\n text: sharedProjects[1].id\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 9\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 63,\n columnNumber: 7\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 58,\n columnNumber: 5\n }, this);\n};\n\n_s2(Assign, \"xG1TONbKtDWtdOTrXaTAsNhPg/Q=\");\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","CSSTransition","Assign","props","open","setOpen","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects","SubDirectoryItem","text","RootDirectoryItem","activeMenu","setActiveMenu","openItems","children"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;AACA,SAASC,aAAT,QAA8B,wBAA9B;;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAW;AAAA;;AAAA;;AACxB,QAAM,CAACC,IAAD,EAAOC,OAAP,IAAkBN,QAAQ,CAAC,KAAD,CAAhC;AAEA,QAAMO,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAKA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEL,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IA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;AAAA;AAAA;AAAA;AAAA,kBAHF;AAAA;AAAA;AAAA;AAAA;AAAA,gBADF,EAMGV,IAAI,IAAID,KAAK,CAACgB,QANjB;AAAA;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAYD,GAfD;;AAlCwB,KAkClBJ,iBAlCkB;;AAmDxB,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,4BACE,QAAC,iBAAD;AAAmB,MAAA,IAAI,EAAEH,oBAAoB,CAAC,CAAD,CAApB,CAAwBL,EAAjD;AAAqD,MAAA,SAAS,EAAC,kBAA/D;AAAA,8BACE,QAAC,gBAAD;AAAkB,QAAA,IAAI,EAAED,gBAAgB,CAAC,CAAD,CAAhB,CAAoBC;AAA5C;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,gBAAD;AAAkB,QAAA,IAAI,EAAED,gBAAgB,CAAC,CAAD,CAAhB,CAAoBC;AAA5C;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YADF,eAKE,QAAC,iBAAD;AAAmB,MAAA,IAAI,EAAEK,oBAAoB,CAAC,CAAD,CAApB,CAAwBL,EAAjD;AAAqD,MAAA,SAAS,EAAC,gBAA/D;AAAA,8BACE,QAAC,gBAAD;AAAkB,QAAA,IAAI,EAAEE,cAAc,CAAC,CAAD,CAAd,CAAkBF;AAA1C;AAAA;AAAA;AAAA;AAAA,cADF,eAEE,QAAC,gBAAD;AAAkB,QAAA,IAAI,EAAEE,cAAc,CAAC,CAAD,CAAd,CAAkBF;AAA1C;AAAA;AAAA;AAAA;AAAA,cAFF;AAAA;AAAA;AAAA;AAAA;AAAA,YALF;AAAA;AAAA;AAAA;AAAA;AAAA,UADF;AAYD,CA/DD;;IAAML,M;;KAAAA,M;AAiEN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\nimport { CSSTransition } from 'react-transition-group'\r\n\r\nconst Assign = (props) => {\r\n const [open, setOpen] = useState(false)\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const SubDirectoryItem = (props) => {\r\n return (\r\n <CSSTransition>\r\n < ul className=\"subDirectoryItem\" >\r\n <li>\r\n <div className={\"SubDirectoryItem\"}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {props.text} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n </ul >\r\n </CSSTransition>\r\n )\r\n }\r\n\r\n const RootDirectoryItem = (props) => {\r\n const [activeMenu, setActiveMenu] = useState();\r\n\r\n return (\r\n < ul className=\"directoryItem\" >\r\n <li>\r\n <div className={\"DirectoryItem\"} onClick={() => props.openItems && setActiveMenu(props.openItems)}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {props.text} &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n {open && props.children}\r\n </li>\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n <RootDirectoryItem text={rootDirectoryObjects[0].id} openItems=\"personalProjects\">\r\n <SubDirectoryItem text={personalProjects[0].id} />\r\n <SubDirectoryItem text={personalProjects[1].id} />\r\n </RootDirectoryItem>\r\n <RootDirectoryItem text={rootDirectoryObjects[1].id} openItems=\"sharedProjects\">\r\n <SubDirectoryItem text={sharedProjects[0].id} />\r\n <SubDirectoryItem text={sharedProjects[1].id} />\r\n </RootDirectoryItem>\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n rootDirectoryObjects: [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }]\n });\n\n const toggleActive = (directory, index) => {\n const newArray = [];\n\n if (directory[index] === newArray[index]) {\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n newArray.push(directory[index]);\n changeState({ ...appState,\n activeObjects: newArray\n });\n console.log(newArray[index]);\n console.log(appState.activeObjects[index]);\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: 46,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 47,\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: 48,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 45,\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: 44,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 42,\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: 67,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 68,\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: 69,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 65,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 63,\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: 78,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"G9VHBYFRMM2vunD5OUCIV/YwKNw=\");\n\n_c = Assign;\nexport default Assign;\n\nvar _c;\n\n$RefreshReg$(_c, \"Assign\");","map":{"version":3,"sources":["C:/Users/Bruger/Desktop/Web-projects/pipit/client/src/components/reportForm/assign/Assign.js"],"names":["React","useState","FontAwesomeIcon","Assign","personalProjects","id","type","sharedProjects","teams","name","appState","changeState","activeObjects","rootDirectoryObjects","toggleActive","directory","index","newArray","push","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAA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,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEK,kBAAkB,CAACN,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,CAAiBX,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,WAAUW,KAAV;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAaD,GAdD;;AAgBA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGM,kBAAkB,CAACZ,QAAQ,CAACG,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA7ED;;GAAMV,M;;KAAAA,M;AA+EN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n const newArray = []\r\n if (directory[index] === newArray[index]) {\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n newArray.push(directory[index])\r\n changeState({ ...appState, activeObjects: newArray })\r\n console.log(newArray[index])\r\n console.log(appState.activeObjects[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, useRef, createRef, useEffect } 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 // Directory data\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }]; // Directory references\n\n const rootDirectoryRefs = useRef([]);\n rootDirectoryRefs.current = [rootDirectoryObjects.length].map((ref, index) => rootDirectoryRefs.current[index] = /*#__PURE__*/createRef()); // Directory states\n\n const [isActive, setIsActive] = useState(false);\n\n const onClick = () => {\n console.log(rootDirectoryRefs[1].id);\n setIsActive(!isActive);\n };\n\n const RootDirectoryItems = directoryObjects => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: directoryObjects.map((elements, index) => /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n ref: rootDirectoryRefs.current[index],\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 41,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directoryObjects[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 42,\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: 43,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 40,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 39,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\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 ref: rootDirectoryRefs,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\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 }, void 0, 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(rootDirectoryObjects)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"MJDv9q+kWhlGbDVTmxVjrQjz+R8=\");\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","useRef","createRef","useEffect","FontAwesomeIcon","Assign","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","rootDirectoryRefs","current","length","map","ref","index","isActive","setIsActive","onClick","console","log","RootDirectoryItems","directoryObjects","elements","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,EAA6CC,SAA7C,QAA8D,OAA9D;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AAAA;;AACnB;AACA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEC,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;AAKA,QAAMC,gBAAgB,GAAG,CACvB;AAAED,IAAAA,EAAE,EAAE,OAAN;AAAeE,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAEF,IAAAA,EAAE,EAAE,YAAN;AAAoBE,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEH,IAAAA,EAAE,EAAE,UAAN;AAAkBE,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EA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"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n // Directory data\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n // Directory references\r\n const rootDirectoryRefs = useRef([])\r\n rootDirectoryRefs.current = [rootDirectoryObjects.length].map(\r\n (ref, index) => rootDirectoryRefs.current[index] = createRef()\r\n )\r\n\r\n // Directory states\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = () => {\r\n console.log(rootDirectoryRefs[1].id)\r\n setIsActive(!isActive);\r\n }\r\n\r\n const RootDirectoryItems = (directoryObjects) => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n {directoryObjects.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs.current[index]} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; {directoryObjects[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 const SubDirectoryItems = (directory) => {\r\n return (\r\n <ul className=\"projectListDirectory\">\r\n {directory.map((elements, index) => (\r\n <li>\r\n <div ref={rootDirectoryRefs} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\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(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\";\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 const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n\n const RootDirectoryItems = () => {\n return /*#__PURE__*/_jsxDEV(\"ul\", {\n className: \"rootDirectory\",\n children: /*#__PURE__*/_jsxDEV(\"li\", {\n children: /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"DirectoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: \"\\xA0 Personal Projects \\xA0\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\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: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this);\n };\n\n return /*#__PURE__*/_jsxDEV(\"div\", {\n className: \"assignSelectContainer\",\n children: RootDirectoryItems()\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 37,\n columnNumber: 5\n }, this);\n};\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","rootDirectoryObjects","RootDirectoryItems"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAG,MAAM;AACnB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAMA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEL,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;;AAKA,QAAMM,kBAAkB,GAAG,MAAM;AAC/B,wBACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,6BACE;AAAA,+BACE;AAAK,UAAA,SAAS,EAAE,eAAhB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA;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;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,YADF;AAWD,GAZD;;AAcA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,cACGA,kBAAkB;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CApCD;;KAAMR,M;AAsCN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const RootDirectoryItems = () => {\r\n return (\r\n < ul className=\"rootDirectory\" >\r\n <li>\r\n <div className={\"DirectoryItem\"}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; Personal Projects &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\r\n </ul >\r\n )\r\n }\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n {RootDirectoryItems()}\r\n </div >\r\n )\r\n}\r\n\r\nexport default Assign"]},"metadata":{},"sourceType":"module"}
\ No newline at end of file
{"ast":null,"code":"var _jsxFileName = \"C:\\\\Users\\\\Bruger\\\\Desktop\\\\Web-projects\\\\pipit\\\\client\\\\src\\\\components\\\\reportForm\\\\assign\\\\Assign.js\",\n _s = $RefreshSig$();\n\nimport React, { useState } from 'react';\nimport \"./assign.css\";\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\n\nconst Assign = () => {\n _s();\n\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const [appState, changeState] = useState({\n activeObjects: [],\n newArray: [],\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 appState.newArray.pop(directory[index]);\n changeState({ ...appState,\n activeObjects: null\n });\n } else {\n appState.newArray.push(directory[index]);\n console.log(appState.newArray);\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: 47,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\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: 49,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 46,\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: 45,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 43,\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: 68,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\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: 70,\n columnNumber: 15\n }, this)]\n }, index, true, {\n fileName: _jsxFileName,\n lineNumber: 67,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 64,\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: 79,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"xWS9QEyxm04K2oIrDmBJxIV5tO0=\");\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","newArray","rootDirectoryObjects","toggleActive","directory","index","pop","push","console","log","toggleActiveStyles","RootDirectoryItems","parentDirectories","map","elements","SubDirectoryItems"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,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GAAiCU,iBAAiB,CAACvB,gBAAD,CAAlD,GAAuEuB,iBAAiB,CAACpB,cAAD,CAD1F,GAEE,IATN;AAAA;AAAA;AAAA;AAAA;AAAA,cADD;AADH;AAAA;AAAA;AAAA;AAAA,YADF;AAkBD,GAnBD;;AAqBA,QAAMoB,iBAAiB,GAAIX,SAAD,IAAe;AACvC,wBACE;AAAI,MAAA,SAAS,EAAC,sBAAd;AAAA,gBACGA,SAAS,CAACS,GAAV,CAAc,CAACC,QAAD,EAAWT,KAAX,kBACb;AAAA,+BACE;AAAiB,UAAA,SAAS,EAAEK,kBAAkB,CAACN,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,CAAiBZ,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,WAAUY,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,cACGM,kBAAkB,CAACb,QAAQ,CAACI,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CA9ED;;GAAMX,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 personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n const [appState, changeState] = useState({\r\n activeObjects: [],\r\n newArray: [],\r\n rootDirectoryObjects: [{ id: \"Personal projects\" }, { id: \"Shared projects\" }]\r\n })\r\n\r\n const toggleActive = (directory, index) => {\r\n\r\n if (directory[index] === appState.activeObjects) {\r\n appState.newArray.pop(directory[index])\r\n changeState({ ...appState, activeObjects: null })\r\n }\r\n else {\r\n appState.newArray.push(directory[index])\r\n console.log(appState.newArray)\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\";\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 = props => {\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\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: \"DirectoryItem\",\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 27,\n columnNumber: 13\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: \"\\xA0 Personal Projects \\xA0\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 28,\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: 29,\n columnNumber: 13\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 26,\n columnNumber: 11\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 25,\n columnNumber: 9\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 24,\n columnNumber: 7\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 23,\n columnNumber: 5\n }, this);\n};\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","props","personalProjects","id","type","sharedProjects","teams","name","rootDirectoryObjects"],"mappings":";AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,OAAO,cAAP;AACA,SAASC,eAAT,QAAgC,gCAAhC;;;AAEA,MAAMC,MAAM,GAAIC,KAAD,IAAW;AACxB,QAAMC,gBAAgB,GAAG,CACvB;AAAEC,IAAAA,EAAE,EAAE,OAAN;AAAeC,IAAAA,IAAI,EAAE;AAArB,GADuB,EAEvB;AAAED,IAAAA,EAAE,EAAE,YAAN;AAAoBC,IAAAA,IAAI,EAAE;AAA1B,GAFuB,CAAzB;AAKA,QAAMC,cAAc,GAAG,CACrB;AAAEF,IAAAA,EAAE,EAAE,UAAN;AAAkBC,IAAAA,IAAI,EAAE,QAAxB;AAAkCE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAzC,GADqB,EAErB;AAAEJ,IAAAA,EAAE,EAAE,mBAAN;AAA2BC,IAAAA,IAAI,EAAE,QAAjC;AAA2CE,IAAAA,KAAK,EAAE,CAAC;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAAD;AAAlD,GAFqB,CAAvB;AAMA,QAAMC,oBAAoB,GAAG,CAC3B;AAAEL,IAAAA,EAAE,EAAE;AAAN,GAD2B,EAE3B;AAAEA,IAAAA,EAAE,EAAE;AAAN,GAF2B,CAA7B;AAKA,sBACE;AAAK,IAAA,SAAS,EAAC,uBAAf;AAAA,2BACE;AAAK,MAAA,SAAS,EAAC,eAAf;AAAA,6BACE;AAAA,+BACE;AAAK,UAAA,SAAS,EAAE,eAAhB;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA;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;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA;AADF;AAAA;AAAA;AAAA;AAAA,UADF;AAaD,CA9BD;;KAAMH,M;AAgCN,eAAeA,MAAf","sourcesContent":["import React, { useState } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = (props) => {\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n return (\r\n <div className=\"assignSelectContainer\">\r\n < ul className=\"rootDirectory\" >\r\n <li>\r\n <div className={\"DirectoryItem\"}>\r\n <FontAwesomeIcon icon=\"folder\" className=\"folder-icon\"></FontAwesomeIcon>\r\n <a>&nbsp; Personal Projects &nbsp;</a>\r\n <FontAwesomeIcon icon=\"chevron-right\" className=\"arrow-right-icon\"></FontAwesomeIcon>\r\n </div>\r\n </li>\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, useRef, useEffect } 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 directoryRef = useRef(null);\n const [isActive, setIsActive] = useState(false);\n\n const onClick = () => setIsActive(!isActive);\n\n const rootDirectoryObjects = [{\n id: \"Personal projects\"\n }, {\n id: \"Shared projects\"\n }];\n const personalProjects = [{\n id: \"MyApp\",\n type: \"personal\"\n }, {\n id: \"MyOtherApp\",\n type: \"personal\"\n }];\n const sharedProjects = [{\n id: \"ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Henriks Meme Machine\"\n }]\n }, {\n id: \"Very big ReactApp\",\n type: \"shared\",\n teams: [{\n name: \"Aubergine\"\n }]\n }];\n useEffect(() => {\n const pageClickEvent = e => {\n if (directoryRef.current !== null && !directoryRef.current.contains(e.target)) {\n setIsActive(!isActive);\n }\n }; // If the item is active (ie open) then listen for clicks\n\n\n if (isActive) {\n window.addEventListener('click', pageClickEvent);\n }\n\n return () => {\n window.removeEventListener('click', pageClickEvent);\n };\n }, [isActive]);\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 ref: directoryRef,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 49,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", parentDirectories[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 50,\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: 51,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 48,\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: 47,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 45,\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 ref: directoryRef,\n className: isActive ? 'active' : 'inactive',\n onClick: onClick,\n children: [/*#__PURE__*/_jsxDEV(FontAwesomeIcon, {\n icon: \"folder\",\n className: \"folder-icon\"\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 70,\n columnNumber: 15\n }, this), /*#__PURE__*/_jsxDEV(\"a\", {\n children: [\"\\xA0 \", directory[index].id, \" \\xA0\"]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 71,\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: 72,\n columnNumber: 15\n }, this)]\n }, void 0, true, {\n fileName: _jsxFileName,\n lineNumber: 69,\n columnNumber: 13\n }, this)\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 68,\n columnNumber: 11\n }, this))\n }, void 0, false, {\n fileName: _jsxFileName,\n lineNumber: 66,\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: 81,\n columnNumber: 5\n }, this);\n};\n\n_s(Assign, \"vhy9HVB0Kxy+Q0kp+sn6XLaJcaM=\");\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","useRef","useEffect","FontAwesomeIcon","Assign","directoryRef","isActive","setIsActive","onClick","rootDirectoryObjects","id","personalProjects","type","sharedProjects","teams","name","pageClickEvent","e","current","contains","target","window","addEventListener","removeEventListener","RootDirectoryItems","parentDirectories","map","elements","index","appState","activeObjects","SubDirectoryItems","directory"],"mappings":";;;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,EAA0BC,MAA1B,EAAkCC,SAAlC,QAAmD,OAAnD;AACA,OAAO,cAAP;AACA,SAASC,eAA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AAC,sBAAd;AAAA,gBACGA,SAAS,CAACN,GAAV,CAAc,CAACC,QAAD,EAAWC,KAAX,kBACb;AAAA,+BACE;AAAK,UAAA,GAAG,EAAEvB,YAAV;AAAwB,UAAA,SAAS,EAAEC,QAAQ,GAAG,QAAH,GAAc,UAAzD;AAAqE,UAAA,OAAO,EAAEE,OAA9E;AAAA,kCACE,QAAC,eAAD;AAAiB,YAAA,IAAI,EAAC,QAAtB;AAA+B,YAAA,SAAS,EAAC;AAAzC;AAAA;AAAA;AAAA;AAAA,kBADF,eAEE;AAAA,gCAAWwB,SAAS,CAACJ,KAAD,CAAT,CAAiBlB,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;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,cACGc,kBAAkB,CAACK,QAAQ,CAACpB,oBAAV;AADrB;AAAA;AAAA;AAAA;AAAA,UADF;AAKD,CAhFD;;GAAML,M;;KAAAA,M;AAkFN,eAAeA,MAAf","sourcesContent":["import React, { useState, useRef, useEffect } from 'react'\r\nimport \"./assign.css\"\r\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome'\r\n\r\nconst Assign = () => {\r\n const directoryRef = useRef(null);\r\n const [isActive, setIsActive] = useState(false);\r\n const onClick = () => setIsActive(!isActive);\r\n\r\n const rootDirectoryObjects = [\r\n { id: \"Personal projects\" },\r\n { id: \"Shared projects\" }\r\n ]\r\n\r\n const personalProjects = [\r\n { id: \"MyApp\", type: \"personal\" },\r\n { id: \"MyOtherApp\", type: \"personal\" }\r\n ]\r\n\r\n const sharedProjects = [\r\n { id: \"ReactApp\", type: \"shared\", teams: [{ name: \"Henriks Meme Machine\" }] },\r\n { id: \"Very big ReactApp\", type: \"shared\", teams: [{ name: \"Aubergine\" }] }\r\n ]\r\n\r\n useEffect(() => {\r\n const pageClickEvent = (e) => {\r\n if (directoryRef.current !== null && !directoryRef.current.contains(e.target)) {\r\n setIsActive(!isActive);\r\n }\r\n };\r\n\r\n // If the item is active (ie open) then listen for clicks\r\n if (isActive) {\r\n window.addEventListener('click', pageClickEvent);\r\n }\r\n\r\n return () => {\r\n window.removeEventListener('click', pageClickEvent);\r\n }\r\n\r\n }, [isActive]);\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 ref={directoryRef} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\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 ref={directoryRef} className={isActive ? 'active' : 'inactive'} onClick={onClick} >\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
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