From 41e8203c0804b0d7a0cc92f26ac4c6f95e622e01 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 8 Sep 2023 12:24:11 -0400 Subject: [PATCH 01/93] initial commit --- .../BMDashboard/ProjectDetails/LogBar.jsx | 8 +++++ .../ProjectDetails/Materials/MaterialCard.jsx | 8 +++++ .../ProjectDetails/Materials/Materials.jsx | 14 +++++++++ .../ProjectDetails/ProjectDetails.jsx | 30 +++++++++++++++++++ .../BMDashboard/ProjectDetails/ProjectLog.jsx | 8 +++++ .../RentedTools/RentedTools.jsx | 14 +++++++++ .../ProjectDetails/RentedTools/ToolCard.jsx | 8 +++++ src/routes.js | 2 ++ 8 files changed, 92 insertions(+) create mode 100644 src/components/BMDashboard/ProjectDetails/LogBar.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/ProjectLog.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx new file mode 100644 index 0000000000..65f0f0bbea --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Card } from 'reactstrap'; + +function LogBar() { + return Add buttons here; +} + +export default LogBar; diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx new file mode 100644 index 0000000000..1233c32e50 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Card } from 'reactstrap'; + +function MaterialCard() { + return MaterialCard; +} + +export default MaterialCard; diff --git a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx new file mode 100644 index 0000000000..39b1e04ed6 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { Card } from 'reactstrap'; +import MaterialCard from './MaterialCard'; + +function Materials() { + return ( + +
Materials with quantity less than 20% left
+ +
+ ); +} + +export default Materials; diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx new file mode 100644 index 0000000000..9305d261d5 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -0,0 +1,30 @@ +import React from 'react'; +import { Container, Row, Col } from 'reactstrap'; +import LogBar from './LogBar'; +import RentedTools from './RentedTools/RentedTools'; +import Materials from './Materials/Materials'; +import ProjectLog from './ProjectLog'; + +function ProjectDetails() { + return ( + +

Project A Dashboard

+ + + + + + + + + + + + + + +
+ ); +} + +export default ProjectDetails; diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx new file mode 100644 index 0000000000..0a8519f087 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Card } from 'reactstrap'; + +function ProjectLog() { + return Project Log; +} + +export default ProjectLog; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx new file mode 100644 index 0000000000..2cca86e996 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx @@ -0,0 +1,14 @@ +import React from 'react'; +import { Card } from 'reactstrap'; +import ToolCard from './ToolCard'; + +function RentedTools() { + return ( + +
Rented Tools or equipment to be returned in 3 days.
+ +
+ ); +} + +export default RentedTools; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx new file mode 100644 index 0000000000..c53567e4dc --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { Card } from 'reactstrap'; + +function ToolCard() { + return ToolCard; +} + +export default ToolCard; diff --git a/src/routes.js b/src/routes.js index 40d2ed78e4..3eec81d2da 100644 --- a/src/routes.js +++ b/src/routes.js @@ -37,6 +37,7 @@ import { TeamReport } from './components/Reports/TeamReport'; import Inventory from './components/Inventory'; import BadgeManagement from './components/Badge/BadgeManagement'; import RoleInfoCollections from 'components/UserProfile/EditableModal/roleInfoModal'; +import ProjectDetails from 'components/BMDashboard/ProjectDetails/ProjectDetails'; export default ( <> @@ -151,6 +152,7 @@ export default ( + ); From eb39df9d256a43122989a025c8415dea341a64e1 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 8 Sep 2023 16:22:03 -0400 Subject: [PATCH 02/93] logbar design --- .../BMDashboard/ProjectDetails/LogBar.css | 34 +++++++++++++ .../BMDashboard/ProjectDetails/LogBar.jsx | 50 ++++++++++++++++++- .../ProjectDetails/Materials/Materials.jsx | 2 +- .../ProjectDetails/ProjectDetails.css | 9 ++++ .../ProjectDetails/ProjectDetails.jsx | 6 ++- .../BMDashboard/ProjectDetails/ProjectLog.css | 8 +++ .../BMDashboard/ProjectDetails/ProjectLog.jsx | 7 ++- .../RentedTools/RentedTools.jsx | 2 +- 8 files changed, 111 insertions(+), 7 deletions(-) create mode 100644 src/components/BMDashboard/ProjectDetails/LogBar.css create mode 100644 src/components/BMDashboard/ProjectDetails/ProjectDetails.css create mode 100644 src/components/BMDashboard/ProjectDetails/ProjectLog.css diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.css b/src/components/BMDashboard/ProjectDetails/LogBar.css new file mode 100644 index 0000000000..6d89ec29a1 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/LogBar.css @@ -0,0 +1,34 @@ +.logBar-container{ + display: grid; + grid-template-columns: auto auto; + text-align: left; + justify-content:space-around; + padding: 1em; + margin-top: 2em; + margin-bottom: 2em; + padding-left: 2em; + padding-right: 2em; + width: 100%; + background-color: #eaeeef; +} + +.logBar-section{ + margin-top: 1em; +} + +.logBar-container > *:last-child{ + +} + +.logBar-btnGroup{ + margin-top: -0.5em; +} + +.btn-red Button{ + background-color: '#015d4a'; + border: 0; + border-radius: '10px' +} + + + diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 65f0f0bbea..b9f0b0c75b 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -1,8 +1,54 @@ import React from 'react'; -import { Card } from 'reactstrap'; +import { Button } from 'reactstrap'; +import './LogBar.css'; function LogBar() { - return Add buttons here; + return ( +
+
+

Daily Logging:

+
+ {' '} + {' '} + +
+
+
+

Add a new item:

+
+ {' '} + {' '} + +
+
+
+

Team:

+
+ {' '} + {' '} + +
+
+
+ ); } export default LogBar; diff --git a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx index 39b1e04ed6..9a1c4c9858 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx @@ -5,7 +5,7 @@ import MaterialCard from './MaterialCard'; function Materials() { return ( -
Materials with quantity less than 20% left
+
Materials with quantity less than 20% left
); diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css new file mode 100644 index 0000000000..a853ca5e44 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -0,0 +1,9 @@ +.project-details{ + text-align: center; + padding-top: 20px; + padding-left: 3%; + padding-right: 3%; + margin-top: 40px; + margin-bottom: 20px; + font-weight: bold; +} \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx index 9305d261d5..a063ff9fb8 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -4,11 +4,13 @@ import LogBar from './LogBar'; import RentedTools from './RentedTools/RentedTools'; import Materials from './Materials/Materials'; import ProjectLog from './ProjectLog'; +import './ProjectDetails.css'; +//import { boxStyle } from 'styles'; function ProjectDetails() { return ( - -

Project A Dashboard

+ +

Project A Dashboard

diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.css b/src/components/BMDashboard/ProjectDetails/ProjectLog.css new file mode 100644 index 0000000000..081b109709 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.css @@ -0,0 +1,8 @@ +.projectLog-container{ + padding: 1em; + margin-top: 2em; + margin-bottom: 2em; + padding-left: 2em; + padding-right: 2em; + width: 100%; +} \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx index 0a8519f087..bae7057cc5 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -1,8 +1,13 @@ import React from 'react'; import { Card } from 'reactstrap'; +import './ProjectLog.css'; function ProjectLog() { - return Project Log; + return ( + +
Members working on site today
+
+ ); } export default ProjectLog; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx index 2cca86e996..d136eaf009 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx @@ -5,7 +5,7 @@ import ToolCard from './ToolCard'; function RentedTools() { return ( -
Rented Tools or equipment to be returned in 3 days.
+
Rented Tools or equipment to be returned in 3 days.
); From e03c4fb612d5beafeb4c3edadad7f274d7d72f01 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Tue, 12 Sep 2023 11:03:27 -0400 Subject: [PATCH 03/93] rented tools and materials display design --- .../BMDashboard/ProjectDetails/LogBar.css | 50 +++++++++++++------ .../BMDashboard/ProjectDetails/LogBar.jsx | 39 +++++++++++---- .../ProjectDetails/Materials/MaterialCard.jsx | 13 +++-- .../ProjectDetails/Materials/Materials.jsx | 12 ++--- .../Materials/MaterialsDisplay.css | 5 ++ .../Materials/MaterialsDisplay.jsx | 15 ++++++ .../ProjectDetails/ProjectDetails.jsx | 15 +++--- .../BMDashboard/ProjectDetails/ProjectLog.css | 7 +-- .../RentedTools/RentedTools.jsx | 14 ------ .../RentedTools/RentedToolsDisplay.css | 5 ++ .../RentedTools/RentedToolsDisplay.jsx | 15 ++++++ .../ProjectDetails/RentedTools/ToolCard.css | 7 +++ .../ProjectDetails/RentedTools/ToolCard.jsx | 17 ++++++- .../ProjectDetails/RentedTools/ToolCards.css | 11 ++++ .../ProjectDetails/RentedTools/ToolCards.jsx | 16 ++++++ 15 files changed, 178 insertions(+), 63 deletions(-) create mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css create mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx delete mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css create mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.css b/src/components/BMDashboard/ProjectDetails/LogBar.css index 6d89ec29a1..ea3f750b0e 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.css +++ b/src/components/BMDashboard/ProjectDetails/LogBar.css @@ -1,34 +1,52 @@ .logBar-container{ - display: grid; - grid-template-columns: auto auto; - text-align: left; - justify-content:space-around; - padding: 1em; - margin-top: 2em; - margin-bottom: 2em; - padding-left: 2em; - padding-right: 2em; + display: flex; + flex-direction: column; + justify-content: center; + margin: 2em; + padding: 1em 2em; width: 100%; background-color: #eaeeef; } .logBar-section{ + width: 100%; margin-top: 1em; } -.logBar-container > *:last-child{ - +.logBar-btnGroup{ + margin-top: -0.5em; +} + + +@media (min-width:600px){ +.logBar-container{ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + margin: 2em; + padding: 1em 2em 2em 2em; +} + + +.logBar-section{ + width: 50%; + margin-top: 1em; } + +/* .logBar-container > *:last-child{ + align-self: baseline; + background-color: red; +} */ + .logBar-btnGroup{ margin-top: -0.5em; } - -.btn-red Button{ - background-color: '#015d4a'; - border: 0; - border-radius: '10px' } + + + diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index b9f0b0c75b..2d122551bc 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -8,13 +8,19 @@ function LogBar() {

Daily Logging:

- {' '} - {' '} -
@@ -22,13 +28,19 @@ function LogBar() {

Add a new item:

- {' '} - {' '} -
@@ -36,13 +48,22 @@ function LogBar() {

Team:

- {' '} - {' '} -
+
+
+

Invisible

+
+
diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx index 1233c32e50..482211ba85 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -1,8 +1,15 @@ -import React from 'react'; -import { Card } from 'reactstrap'; +import { Card, CardImg, CardBody, CardTitle } from 'reactstrap'; function MaterialCard() { - return MaterialCard; + return ( + + + + Card title +
Term ends in __ hours.
+
+
+ ); } export default MaterialCard; diff --git a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx index 9a1c4c9858..9b8e46659e 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx @@ -1,14 +1,14 @@ -import React from 'react'; -import { Card } from 'reactstrap'; +import { CardGroup } from 'reactstrap'; import MaterialCard from './MaterialCard'; function Materials() { return ( - -
Materials with quantity less than 20% left
+ -
+ + + ); } -export default Materials; +export default Materials; \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css new file mode 100644 index 0000000000..50079b5557 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css @@ -0,0 +1,5 @@ +.materials-container{ + align-items: center; + margin: 2em; + padding: 1em 2em; +} \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx new file mode 100644 index 0000000000..24e0346e3c --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { Card } from 'reactstrap'; +import Materials from './Materials'; +import './MaterialsDisplay.css'; + +function MaterialsDisplay() { + return ( + +
Materials with quantity less than 20% left
+ +
+ ); +} + +export default MaterialsDisplay; diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx index a063ff9fb8..6957e78847 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -1,25 +1,24 @@ import React from 'react'; import { Container, Row, Col } from 'reactstrap'; import LogBar from './LogBar'; -import RentedTools from './RentedTools/RentedTools'; -import Materials from './Materials/Materials'; +import RentedToolsDisplay from './RentedTools/RentedToolsDisplay'; +import MaterialsDisplay from './Materials/MaterialsDisplay'; import ProjectLog from './ProjectLog'; import './ProjectDetails.css'; -//import { boxStyle } from 'styles'; function ProjectDetails() { return ( - +

Project A Dashboard

- - + + - - + + diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.css b/src/components/BMDashboard/ProjectDetails/ProjectLog.css index 081b109709..7ac3c5ef4c 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.css @@ -1,8 +1,5 @@ .projectLog-container{ - padding: 1em; - margin-top: 2em; - margin-bottom: 2em; - padding-left: 2em; - padding-right: 2em; + margin: 2em; + padding: 1em 2em; width: 100%; } \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx deleted file mode 100644 index d136eaf009..0000000000 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedTools.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Card } from 'reactstrap'; -import ToolCard from './ToolCard'; - -function RentedTools() { - return ( - -
Rented Tools or equipment to be returned in 3 days.
- -
- ); -} - -export default RentedTools; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css new file mode 100644 index 0000000000..ce1aa3a345 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css @@ -0,0 +1,5 @@ +.rentedTools-container{ + align-items: center; + margin: 2em; + padding: 1em 2em; +} diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx new file mode 100644 index 0000000000..092227f729 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { Card } from 'reactstrap'; +import './RentedToolsDisplay.css'; +import ToolCards from './ToolCards'; + +function RentedToolsDisplay() { + return ( + +
Rented Tools or equipment to be returned in 3 days.
+ +
+ ); +} + +export default RentedToolsDisplay; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css new file mode 100644 index 0000000000..0bff782ebb --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css @@ -0,0 +1,7 @@ + +.infoDiv{ + font-size: 0.3rem; +} + + + diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx index c53567e4dc..b45bbf36f9 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -1,8 +1,21 @@ import React from 'react'; -import { Card } from 'reactstrap'; +import './ToolCard.css'; +import { Card, CardImg, CardBody, CardTitle } from 'reactstrap'; function ToolCard() { - return ToolCard; + return ( + + + + Card title +
Term ends in __ hours.
+
+
+ ); } export default ToolCard; diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css new file mode 100644 index 0000000000..813ca95789 --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css @@ -0,0 +1,11 @@ +/* .cardGroup{ + display: flex; + flex-direction: column; + gap: 1em; +} + +@media (min-width:600px){ + .cardGroup{ + flex-direction: row; + } +} */ \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx new file mode 100644 index 0000000000..f534fa19dd --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx @@ -0,0 +1,16 @@ +import './ToolCards.css'; +import { CardGroup } from 'reactstrap'; +import ToolCard from './ToolCard'; + + +const ToolCards = () => { + return ( + + + + + + ); +} + +export default ToolCards \ No newline at end of file From 93a45a136abb49378a842251d8c0c2b09e8fd16c Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Tue, 12 Sep 2023 14:53:44 -0400 Subject: [PATCH 04/93] projectLog component done --- .../ProjectDetails/Materials/MaterialCard.css | 2 + .../ProjectDetails/Materials/MaterialCard.jsx | 2 + .../ProjectDetails/ProjectDetails.jsx | 4 +- .../BMDashboard/ProjectDetails/ProjectLog.css | 1 + .../BMDashboard/ProjectDetails/ProjectLog.jsx | 65 ++++++++++++++++++- .../ProjectDetails/RentedTools/ToolCard.css | 13 +++- .../ProjectDetails/RentedTools/ToolCard.jsx | 3 +- 7 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css new file mode 100644 index 0000000000..139597f9cb --- /dev/null +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css @@ -0,0 +1,2 @@ + + diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx index 482211ba85..2eedbfd2ec 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -1,4 +1,6 @@ import { Card, CardImg, CardBody, CardTitle } from 'reactstrap'; +import './MaterialCard.css'; + function MaterialCard() { return ( diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx index 6957e78847..617638964e 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -14,10 +14,10 @@ function ProjectDetails() {
- + - + diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.css b/src/components/BMDashboard/ProjectDetails/ProjectLog.css index 7ac3c5ef4c..d749f7b127 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.css @@ -2,4 +2,5 @@ margin: 2em; padding: 1em 2em; width: 100%; + font-weight: lighter; } \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx index bae7057cc5..ddc5d5b372 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -1,11 +1,74 @@ import React from 'react'; -import { Card } from 'reactstrap'; +import { Card, Table } from 'reactstrap'; import './ProjectLog.css'; + +const DummyData = [ + { + id: '12', + firstName: 'Dora', + lastName: 'Kimberly', + role: 'Carpenter', + team: 'XYZ', + currentTask: 'Stud wall construction', + totalHrs: 169, + todaysHrs: 5.5, + }, + { + id: '35', + firstName: 'Cailin', + lastName: 'Colby', + role: 'Volunteer', + team: 'Team A', + currentTask: 'Foundation concreting', + totalHrs: 15, + todaysHrs: 2.18, + }, + { + id: '35', + firstName: 'Member A', + lastName: 'Member A', + role: 'Role A', + team: 'Team A', + currentTask: 'Task 1', + totalHrs: 169, + todaysHrs: 5.5, + }, +]; + function ProjectLog() { + + const tableRows = DummyData.map((person, index) => ( + + {person.id} + {person.firstName} + {person.lastName} + {person.role} + {person.team} + {person.currentTask} + {person.totalHrs} + {person.todaysHrs} + + )); + return (
Members working on site today
+ + + + + + + + + + + + + + {tableRows} +
IDFirst NameLast NameRoleTeamCurrent TaskTotal HrsToday's Hrs
); } diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css index 0bff782ebb..b9bdd22c0a 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css @@ -1,6 +1,17 @@ +/* .toolCard{ + max-width: 30%; +} */ .infoDiv{ - font-size: 0.3rem; + font-size: 0.5rem; + margin: -1em 0.5em; + border-radius: 10px; + background-color: #f2c897 ; +} + +.infoDiv .warning{ + color: white; + background-color: #980101; } diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx index b45bbf36f9..88e01ba0f6 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -9,10 +9,11 @@ function ToolCard() { alt="" src="https://www.theforkliftcenter.com/images/forklift-hero-left.png" top + width="100%" /> Card title -
Term ends in __ hours.
+
Term ends in __ hours.
); From 54eddd234ab0a8fde47da63b935b4d07dba33d02 Mon Sep 17 00:00:00 2001 From: Nathan Hoffman Date: Tue, 12 Sep 2023 14:23:22 -0700 Subject: [PATCH 05/93] Reset User permissions --- .../UserPermissionsPopUp.jsx | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/PermissionsManagement/UserPermissionsPopUp.jsx b/src/components/PermissionsManagement/UserPermissionsPopUp.jsx index ff382d227a..a226056eeb 100644 --- a/src/components/PermissionsManagement/UserPermissionsPopUp.jsx +++ b/src/components/PermissionsManagement/UserPermissionsPopUp.jsx @@ -18,6 +18,12 @@ const UserPermissionsPopUp = ({ allUserProfiles, toggle, getAllUsers, roles }) = const [isInputFocus, setIsInputFocus] = useState(false); const [actualUserRolePermission, setActualUserRolePermission] = useState(); + const setToDefault = () => { + setActualUserProfile(previous => { + return { ...previous, permissions: {frontPermissions: [],} }; + }); + } + //no onchange, always change this state; const onChangeCheck = data => { const actualValue = data; @@ -102,7 +108,21 @@ const UserPermissionsPopUp = ({ allUserProfiles, toggle, getAllUsers, roles }) = updateProfileOnSubmit(e); }} > -

User name:

+
+

User name:

+ +
{ From 64d27abaf98d19984282c22028da10fe4c73dde9 Mon Sep 17 00:00:00 2001 From: Nathan Hoffman Date: Tue, 12 Sep 2023 14:24:20 -0700 Subject: [PATCH 06/93] Formatting --- .../PermissionsManagement/PermissionsManagement.jsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/PermissionsManagement/PermissionsManagement.jsx b/src/components/PermissionsManagement/PermissionsManagement.jsx index 4bb5c5bf9e..4dc258ef88 100644 --- a/src/components/PermissionsManagement/PermissionsManagement.jsx +++ b/src/components/PermissionsManagement/PermissionsManagement.jsx @@ -51,17 +51,17 @@ const PermissionsManagement = ({ getAllRoles, roles, auth, getUserRole, userProf className="role-btn" > {roleName} - +
+ />
-
- )})}; +
+ )})}
{userProfile?.role === 'Owner' && (
From ea4686821d45882432df29cca5a2de079a640bf7 Mon Sep 17 00:00:00 2001 From: Bailey Mejia Date: Mon, 18 Sep 2023 17:50:57 -0700 Subject: [PATCH 07/93] saving local changes to logo --- src/assets/images/logo.png | Bin 52558 -> 52555 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/assets/images/logo.png b/src/assets/images/logo.png index 80c152655938727811809651aef9f132f1f7fee2..ac4d741d97a7776c5bc723d4e13263ed8b6e352f 100644 GIT binary patch delta 25 hcmX>%i}~~{W|qzXKlhESOGG!X5;arU{LnOaIsk-i}~CvX4cLCKX=}ZEK5Wgc{i^RHB$gm_e^uA0|2Fe3T^-Z From f4b7f44f0567543ab792bd6c6cc979d650e9353b Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Tue, 19 Sep 2023 10:44:35 -0400 Subject: [PATCH 08/93] updates --- .../BMDashboard/ProjectDetails/LogBar.css | 52 -------- .../BMDashboard/ProjectDetails/LogBar.jsx | 16 +-- .../ProjectDetails/Materials/MaterialCard.css | 2 - .../ProjectDetails/Materials/MaterialCard.jsx | 23 ++-- .../ProjectDetails/Materials/Materials.jsx | 5 +- .../Materials/MaterialsDisplay.css | 5 - .../Materials/MaterialsDisplay.jsx | 3 +- .../ProjectDetails/ProjectDetails.css | 126 ++++++++++++++++++ .../ProjectDetails/ProjectDetails.jsx | 6 +- .../BMDashboard/ProjectDetails/ProjectLog.css | 6 - .../BMDashboard/ProjectDetails/ProjectLog.jsx | 2 - .../RentedTools/RentedToolsDisplay.css | 5 - .../RentedTools/RentedToolsDisplay.jsx | 3 +- .../ProjectDetails/RentedTools/ToolCard.css | 18 --- .../ProjectDetails/RentedTools/ToolCard.jsx | 26 ++-- .../ProjectDetails/RentedTools/ToolCards.css | 11 -- .../ProjectDetails/RentedTools/ToolCards.jsx | 6 +- 17 files changed, 167 insertions(+), 148 deletions(-) delete mode 100644 src/components/BMDashboard/ProjectDetails/LogBar.css delete mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css delete mode 100644 src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css delete mode 100644 src/components/BMDashboard/ProjectDetails/ProjectLog.css delete mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css delete mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css delete mode 100644 src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.css b/src/components/BMDashboard/ProjectDetails/LogBar.css deleted file mode 100644 index ea3f750b0e..0000000000 --- a/src/components/BMDashboard/ProjectDetails/LogBar.css +++ /dev/null @@ -1,52 +0,0 @@ -.logBar-container{ - display: flex; - flex-direction: column; - justify-content: center; - margin: 2em; - padding: 1em 2em; - width: 100%; - background-color: #eaeeef; -} - -.logBar-section{ - width: 100%; - margin-top: 1em; -} - -.logBar-btnGroup{ - margin-top: -0.5em; -} - - -@media (min-width:600px){ -.logBar-container{ - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-around; - margin: 2em; - padding: 1em 2em 2em 2em; -} - - -.logBar-section{ - width: 50%; - margin-top: 1em; -} - - -/* .logBar-container > *:last-child{ - align-self: baseline; - background-color: red; -} */ - -.logBar-btnGroup{ - margin-top: -0.5em; -} -} - - - - - - diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 2d122551bc..25f3dc2ef5 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -1,6 +1,5 @@ import React from 'react'; import { Button } from 'reactstrap'; -import './LogBar.css'; function LogBar() { return ( @@ -29,17 +28,17 @@ function LogBar() {

Add a new item:

{' '} {' '} @@ -58,12 +57,9 @@ function LogBar() { > Edit Existing Team {' '} -
-
-
-

Invisible

-
-
diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css deleted file mode 100644 index 139597f9cb..0000000000 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.css +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx index 2eedbfd2ec..171ee0b8a8 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -1,16 +1,19 @@ -import { Card, CardImg, CardBody, CardTitle } from 'reactstrap'; -import './MaterialCard.css'; - - function MaterialCard() { return ( - - - - Card title +
+
+ +
+
+
Card title
Term ends in __ hours.
- - +
+
); } diff --git a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx index 9b8e46659e..80632a70af 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx @@ -1,13 +1,12 @@ -import { CardGroup } from 'reactstrap'; import MaterialCard from './MaterialCard'; function Materials() { return ( - +
- +
); } diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css deleted file mode 100644 index 50079b5557..0000000000 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.css +++ /dev/null @@ -1,5 +0,0 @@ -.materials-container{ - align-items: center; - margin: 2em; - padding: 1em 2em; -} \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx index 24e0346e3c..707ce7d434 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx @@ -1,11 +1,10 @@ import React from 'react'; import { Card } from 'reactstrap'; import Materials from './Materials'; -import './MaterialsDisplay.css'; function MaterialsDisplay() { return ( - +
Materials with quantity less than 20% left
diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index a853ca5e44..4793d3bbca 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -6,4 +6,130 @@ margin-top: 40px; margin-bottom: 20px; font-weight: bold; +} + +/* styling for the logBar component - i.e. dashboard with buttons */ + +.logBar-container{ + display: flex; + flex-direction: column; + justify-content: center; + margin: 2em; + padding: 1em 2em; + width: 100%; + background-color: #eaeeef; +} + +.logBar-section{ + width: 100%; + margin-top: 1em; +} + + +.logBar-btnGroup{ + margin-top: -0.5em; +} + + +@media (min-width:600px){ +.logBar-container{ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; + margin: 2em; +} + +/* .logBar-container .logBar-section:first-of-type{ + background-color: red; + + +} */ + +.logBar-section{ + width: 40%; + +} + +.logBar-btnGroup{ + margin-top: -0.5em; + width: 100%; +} +} + +/* styling for containers with cards */ +.cards-container{ + align-items: center; + margin: 1em 2em; + padding: 1em 2em; +} + +.cards-container_content{ + display: flex; + flex-direction: column; + align-items: center; + width: 100%; +} + +/* styling for single card element */ +.singleCard{ + border: 1px solid #eaeeef; + border-radius: 5px; + text-align: center; + margin-bottom: 0.5em; + cursor: pointer; +} + +.singleCard:hover{ + box-shadow: 0 20px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2); + transform: translate3d(0.5px,0.5px,0.5px); +} + +.cardBody{ +margin-top: 0.5em; +} + +.cardBody h6{ +margin-bottom: -0.2em; +} + +@media (min-width:600px){ +.cards-container_content{ + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: flex-start; +} + +/* styling for single card element */ +.singleCard{ + margin-right: 0.5em; +} +} + +/* button on a card */ +.infoDiv{ + font-size: 0.5rem; + padding: 1em; + margin: 0.5em; + border-radius: 10px; + background-color: #f2c897 ; +} + +/* TO DO: dynamic value to be added */ +.infoDiv .warning{ + color: white; + background-color: #980101; +} + +/* styling for project log - i.e.table at the bottom */ +.projectLog-container{ + margin: 2em; + padding: 1em 2em; + width: 100%; + font-weight: lighter; +} + +.projectLog-container h6{ + font-weight: bold; } \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx index 617638964e..2c65378a7c 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -8,16 +8,16 @@ import './ProjectDetails.css'; function ProjectDetails() { return ( - +

Project A Dashboard

- + - + diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.css b/src/components/BMDashboard/ProjectDetails/ProjectLog.css deleted file mode 100644 index d749f7b127..0000000000 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.css +++ /dev/null @@ -1,6 +0,0 @@ -.projectLog-container{ - margin: 2em; - padding: 1em 2em; - width: 100%; - font-weight: lighter; -} \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx index ddc5d5b372..4c4f9bed6d 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -1,7 +1,5 @@ import React from 'react'; import { Card, Table } from 'reactstrap'; -import './ProjectLog.css'; - const DummyData = [ { diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css deleted file mode 100644 index ce1aa3a345..0000000000 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.css +++ /dev/null @@ -1,5 +0,0 @@ -.rentedTools-container{ - align-items: center; - margin: 2em; - padding: 1em 2em; -} diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx index 092227f729..5d1981ec44 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx @@ -1,11 +1,10 @@ import React from 'react'; import { Card } from 'reactstrap'; -import './RentedToolsDisplay.css'; import ToolCards from './ToolCards'; function RentedToolsDisplay() { return ( - +
Rented Tools or equipment to be returned in 3 days.
diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css deleted file mode 100644 index b9bdd22c0a..0000000000 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.css +++ /dev/null @@ -1,18 +0,0 @@ -/* .toolCard{ - max-width: 30%; -} */ - -.infoDiv{ - font-size: 0.5rem; - margin: -1em 0.5em; - border-radius: 10px; - background-color: #f2c897 ; -} - -.infoDiv .warning{ - color: white; - background-color: #980101; -} - - - diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx index 88e01ba0f6..9071232cee 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -1,21 +1,21 @@ import React from 'react'; -import './ToolCard.css'; -import { Card, CardImg, CardBody, CardTitle } from 'reactstrap'; function ToolCard() { return ( - - - - Card title +
+
+ +
+
+
Card title
Term ends in __ hours.
- - +
+
); } diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css deleted file mode 100644 index 813ca95789..0000000000 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.css +++ /dev/null @@ -1,11 +0,0 @@ -/* .cardGroup{ - display: flex; - flex-direction: column; - gap: 1em; -} - -@media (min-width:600px){ - .cardGroup{ - flex-direction: row; - } -} */ \ No newline at end of file diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx index f534fa19dd..e85df41ba5 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx @@ -1,15 +1,13 @@ -import './ToolCards.css'; -import { CardGroup } from 'reactstrap'; import ToolCard from './ToolCard'; const ToolCards = () => { return ( - +
- +
); } From 98438044476c93573d0d6879ec5cd66dee04b2d5 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Tue, 19 Sep 2023 12:31:28 -0400 Subject: [PATCH 09/93] added custom button styles to css file --- .../BMDashboard/ProjectDetails/LogBar.jsx | 46 ++++--------------- .../ProjectDetails/ProjectDetails.css | 29 ++++++++++-- 2 files changed, 35 insertions(+), 40 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 25f3dc2ef5..c5ad5676b2 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -7,58 +7,30 @@ function LogBar() {

Daily Logging:

- {' '} - {' '} - + {' '} +

Add a new item:

{' '} - {' '} - + {' '} +

Team:

+ {' '} + {' '} {' '} - {' '} - diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index 4793d3bbca..1a23db977c 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -30,14 +30,37 @@ margin-top: -0.5em; } +button.btn.btn-secondary{ + border: 0; + border-radius: 10px; + margin: 0.1em +} + +/* buttons custom colors */ +button.btn.btn-secondary.greenBtn{ + background-color: #015d4a; +} + +button.btn.btn-secondary.lightBlueBtn{ + background-color: #0f6386; +} + +button.btn.btn-secondary.darkBlueBtn{ + background-color: #203844; +} + +button.btn.btn-secondary.redBtn{ + background-color: #980101; +} @media (min-width:600px){ .logBar-container{ display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: space-around; - margin: 2em; + justify-content: center; + margin: 2em; + text-align: left; } /* .logBar-container .logBar-section:first-of-type{ @@ -53,7 +76,7 @@ .logBar-btnGroup{ margin-top: -0.5em; - width: 100%; + } } From 833c5c3a319db295fecedf1a3d28400ec4182499 Mon Sep 17 00:00:00 2001 From: robertoooc Date: Sat, 16 Sep 2023 17:01:35 -0700 Subject: [PATCH 10/93] . --- Dockerfile | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e2770b994..bd987a421f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,16 @@ -# Define a imagem base -FROM node:14-alpine -# Set the working directory to /app -WORKDIR /app -# Copy the package.json and yarn.lock files to the container -COPY package.json yarn.lock ./ -# Install dependencies -RUN yarn install -# Copy the rest of the app files to the container -COPY . ./ -# Build the app -RUN yarn build -# Expose port 3000 -EXPOSE 3000 -# Set the startup command to run the app using Node.js +# Define a imagem base +FROM node:14-alpine +# Set the working directory to /app +WORKDIR /app +# Copy the package.json and yarn.lock files to the container +COPY package.json yarn.lock ./ +# Install dependencies +RUN yarn install +# Copy the rest of the app files to the container +COPY . ./ +# Build the app +RUN yarn build +# Expose port 3000 +EXPOSE 3000 +# Set the startup command to run the app using Node.js CMD ["yarn", "start:local"] \ No newline at end of file From 4a8f72f78ede089f1c5f24d7d7ebe0227361cc31 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Tue, 19 Sep 2023 14:14:17 -0400 Subject: [PATCH 11/93] fixed button styling --- .../BMDashboard/ProjectDetails/LogBar.jsx | 2 +- .../ProjectDetails/ProjectDetails.css | 34 +++++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index c5ad5676b2..f64d45b492 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -24,7 +24,7 @@ function LogBar() {
-
+

Team:

{' '} diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index 1a23db977c..dcc467f48e 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -26,14 +26,11 @@ } -.logBar-btnGroup{ - margin-top: -0.5em; -} - button.btn.btn-secondary{ border: 0; border-radius: 10px; - margin: 0.1em + margin: 0.1em; + width: 100%; } /* buttons custom colors */ @@ -51,6 +48,7 @@ button.btn.btn-secondary.darkBlueBtn{ button.btn.btn-secondary.redBtn{ background-color: #980101; + margin-top: 2em; } @media (min-width:600px){ @@ -59,24 +57,30 @@ button.btn.btn-secondary.redBtn{ flex-direction: row; flex-wrap: wrap; justify-content: center; - margin: 2em; - text-align: left; + margin: 2em; } -/* .logBar-container .logBar-section:first-of-type{ - background-color: red; - - -} */ .logBar-section{ - width: 40%; + width: 50%; +} + .thirdSection{ + width:fit-content; } .logBar-btnGroup{ - margin-top: -0.5em; - + margin-top: -0.5em; + display: flex; + justify-content: center; +} + +button.btn.btn-secondary{ + width: auto; +} + +button.btn.btn-secondary.redBtn{ + margin-top: auto; } } From db4ced82f4ce804fcfcd5fd4886d1f68ff78667e Mon Sep 17 00:00:00 2001 From: robertoooc Date: Wed, 20 Sep 2023 11:17:38 -0700 Subject: [PATCH 12/93] Added function adding newly created user to team following the user creation action --- .../UserProfile/AddNewUserProfile/UserProfileAdd.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx b/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx index 8c519c03d3..d4bba89387 100644 --- a/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx +++ b/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx @@ -24,7 +24,7 @@ import { toast } from 'react-toastify'; import TeamsTab from '../TeamsAndProjects/TeamsTab'; import ProjectsTab from '../TeamsAndProjects/ProjectsTab'; import { connect } from 'react-redux'; -import { get } from 'lodash'; +import { assign, get } from 'lodash'; import { getUserProfile, updateUserProfile, clearUserProfile } from '../../../actions/userProfile'; import { getAllUserTeams, @@ -107,13 +107,13 @@ class AddUserProfile extends Component { this.state.showphone = true; this.onCreateNewUser(); } - + + render() { const { firstName, email, lastName, phoneNumber, role, jobTitle } = this.state.userProfile; const phoneNumberEntered = this.state.userProfile.phoneNumber === null || this.state.userProfile.phoneNumber.length === 0; - return ( { + this.props.addTeamMember(teamId, userId, firstName, lastName); + } + onAssignProject = assignedProject => { const projects = [...this.state.projects]; projects.push(assignedProject); @@ -650,6 +654,7 @@ class AddUserProfile extends Component { return; } else { toast.success('User profile created.'); + this.onAddTeamMember(this.state.teams[0]._id, res.data._id, this.state.userProfile.firstName, this.state.userProfile.lastName); } this.props.userCreated(); }) From e121e61b3c23baad7a63b1f623a7809508e496a4 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Wed, 20 Sep 2023 15:51:59 -0400 Subject: [PATCH 13/93] logbar finished --- .../BMDashboard/ProjectDetails/LogBar.jsx | 10 +++---- .../ProjectDetails/ProjectDetails.css | 27 ++++++++++++++----- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index f64d45b492..4adf13fb0e 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -24,16 +24,12 @@ function LogBar() {
-
+

Team:

-
+
{' '} {' '} - +
diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index dcc467f48e..c2abb252d7 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -51,23 +51,37 @@ button.btn.btn-secondary.redBtn{ margin-top: 2em; } -@media (min-width:600px){ +@media (min-width:550px){ + .logBar-container{ + display: flex; + flex-direction: column; +} + +button.btn.btn-secondary{ + width: auto; +} + +button.btn.btn-secondary.redBtn{ + margin-top: auto; +} + +} + +@media (min-width:750px){ .logBar-container{ display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; - margin: 2em; + margin: 2em; } .logBar-section{ width: 50%; + flex: auto; } - .thirdSection{ - width:fit-content; -} .logBar-btnGroup{ margin-top: -0.5em; @@ -81,6 +95,7 @@ button.btn.btn-secondary{ button.btn.btn-secondary.redBtn{ margin-top: auto; + margin-left: 2em; } } @@ -120,7 +135,7 @@ margin-top: 0.5em; margin-bottom: -0.2em; } -@media (min-width:600px){ +@media (min-width:650px){ .cards-container_content{ display: flex; flex-direction: row; From 2c4a75bc13478187c8492701d0673049e78ccf64 Mon Sep 17 00:00:00 2001 From: robertoooc Date: Wed, 20 Sep 2023 18:22:03 -0700 Subject: [PATCH 14/93] updated TeamsTab component allowing users to actually be added to teams from user profile >> assign team --- .../AddNewUserProfile/UserProfileAdd.jsx | 13 +++++++------ .../UserProfile/TeamsAndProjects/TeamsTab.jsx | 5 +++++ src/components/UserProfile/UserProfile.jsx | 2 ++ .../UserProfile/UserProfileEdit/UserProfileEdit.jsx | 1 + 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx b/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx index d4bba89387..69d4af9924 100644 --- a/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx +++ b/src/components/UserProfile/AddNewUserProfile/UserProfileAdd.jsx @@ -417,6 +417,7 @@ class AddUserProfile extends Component { isUserAdmin={true} role={this.props.auth.user.role} edit + userProfile={this.state.userProfile} /> @@ -463,16 +464,11 @@ class AddUserProfile extends Component { onAssignTeam = assignedTeam => { const teams = [...this.state.teams]; teams.push(assignedTeam); - this.setState({ teams: teams, }); }; - onAddTeamMember = (teamId, userId, firstName, lastName) => { - this.props.addTeamMember(teamId, userId, firstName, lastName); - } - onAssignProject = assignedProject => { const projects = [...this.state.projects]; projects.push(assignedProject); @@ -654,7 +650,12 @@ class AddUserProfile extends Component { return; } else { toast.success('User profile created.'); - this.onAddTeamMember(this.state.teams[0]._id, res.data._id, this.state.userProfile.firstName, this.state.userProfile.lastName); + this.state.userProfile._id = res.data._id; + if(this.state.teams.length > 0){ + this.state.teams.forEach((team) => { + this.props.addTeamMember(team._id, res.data._id, res.data.firstName, res.data.lastName) + }) + } } this.props.userCreated(); }) diff --git a/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx b/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx index d04113f058..f78950f71b 100644 --- a/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx +++ b/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import AddTeamPopup from './AddTeamPopup'; import UserTeamsTable from './UserTeamsTable'; +import { addTeamMember } from 'actions/allTeamsAction'; const TeamsTab = props => { const { @@ -15,6 +16,7 @@ const TeamsTab = props => { canEditVisibility, handleSubmit, disabled, + userProfile, } = props; const [addTeamPopupOpen, setaddTeamPopupOpen] = useState(false); const [renderedOn, setRenderedOn] = useState(0); @@ -31,6 +33,9 @@ const TeamsTab = props => { }; const onSelectAssignTeam = team => { + if(userProfile._id){ + addTeamMember(team._id, userProfile._id, userProfile.firstName, userProfile.lastName) + } onAssignTeam(team); setRenderedOn(Date.now()); }; diff --git a/src/components/UserProfile/UserProfile.jsx b/src/components/UserProfile/UserProfile.jsx index d008bd37c0..c563636083 100644 --- a/src/components/UserProfile/UserProfile.jsx +++ b/src/components/UserProfile/UserProfile.jsx @@ -870,6 +870,7 @@ function UserProfile(props) { !formValid.email || !(isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } + userProfile={userProfile} /> @@ -1064,6 +1065,7 @@ function UserProfile(props) { !formValid.email || !(isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } + userProfile={userProfile} /> diff --git a/src/components/UserProfile/UserProfileEdit/UserProfileEdit.jsx b/src/components/UserProfile/UserProfileEdit/UserProfileEdit.jsx index 28ca737be0..53ffd7c331 100644 --- a/src/components/UserProfile/UserProfileEdit/UserProfileEdit.jsx +++ b/src/components/UserProfile/UserProfileEdit/UserProfileEdit.jsx @@ -934,6 +934,7 @@ class UserProfileEdit extends Component { onDeleteTeam={this.onDeleteTeam} role={requestorRole} edit + userProfile={this.state ? this.state.userProfile : []} /> From 8c85d9e0ecf0f9e370fe5d9b4e1e892f8bfe1d26 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Thu, 21 Sep 2023 10:05:50 -0400 Subject: [PATCH 15/93] fixed cards responsiveness --- .../Materials/MaterialsDisplay.jsx | 2 +- .../ProjectDetails/ProjectDetails.css | 159 +++++++++--------- .../RentedTools/RentedToolsDisplay.jsx | 2 +- 3 files changed, 82 insertions(+), 81 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx index 707ce7d434..05537c85e7 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx @@ -5,7 +5,7 @@ import Materials from './Materials'; function MaterialsDisplay() { return ( -
Materials with quantity less than 20% left
+
Materials with quantity less than 20% left
); diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index c2abb252d7..30628a0c52 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -1,4 +1,4 @@ -.project-details{ +.project-details { text-align: center; padding-top: 20px; padding-left: 3%; @@ -10,7 +10,7 @@ /* styling for the logBar component - i.e. dashboard with buttons */ -.logBar-container{ +.logBar-container { display: flex; flex-direction: column; justify-content: center; @@ -20,13 +20,12 @@ background-color: #eaeeef; } -.logBar-section{ +.logBar-section { width: 100%; margin-top: 1em; } - -button.btn.btn-secondary{ +button.btn.btn-secondary { border: 0; border-radius: 10px; margin: 0.1em; @@ -34,79 +33,76 @@ button.btn.btn-secondary{ } /* buttons custom colors */ -button.btn.btn-secondary.greenBtn{ +button.btn.btn-secondary.greenBtn { background-color: #015d4a; } -button.btn.btn-secondary.lightBlueBtn{ +button.btn.btn-secondary.lightBlueBtn { background-color: #0f6386; } -button.btn.btn-secondary.darkBlueBtn{ +button.btn.btn-secondary.darkBlueBtn { background-color: #203844; } -button.btn.btn-secondary.redBtn{ +button.btn.btn-secondary.redBtn { background-color: #980101; margin-top: 2em; } -@media (min-width:550px){ - .logBar-container{ - display: flex; - flex-direction: column; -} - -button.btn.btn-secondary{ - width: auto; -} - -button.btn.btn-secondary.redBtn{ - margin-top: auto; -} +@media (min-width: 550px) { + .logBar-container { + display: flex; + flex-direction: column; + } -} + button.btn.btn-secondary { + width: auto; + } -@media (min-width:750px){ -.logBar-container{ - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - margin: 2em; + button.btn.btn-secondary.redBtn { + margin-top: auto; + } } +@media (min-width: 750px) { + .logBar-container { + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + margin: 2em; + } -.logBar-section{ - width: 50%; - flex: auto; -} + .logBar-section { + width: 50%; + flex: auto; + } + .logBar-btnGroup { + margin-top: -0.5em; + display: flex; + justify-content: center; + } -.logBar-btnGroup{ - margin-top: -0.5em; - display: flex; - justify-content: center; -} + button.btn.btn-secondary { + width: auto; + } -button.btn.btn-secondary{ - width: auto; -} - -button.btn.btn-secondary.redBtn{ - margin-top: auto; - margin-left: 2em; -} + button.btn.btn-secondary.redBtn { + margin-top: auto; + margin-left: 2em; + } } /* styling for containers with cards */ -.cards-container{ +.card.cards-container { align-items: center; margin: 1em 2em; padding: 1em 2em; } -.cards-container_content{ +.cards-container_content { display: flex; flex-direction: column; align-items: center; @@ -114,64 +110,69 @@ button.btn.btn-secondary.redBtn{ } /* styling for single card element */ -.singleCard{ +.singleCard { border: 1px solid #eaeeef; border-radius: 5px; text-align: center; - margin-bottom: 0.5em; - cursor: pointer; + margin-bottom: 0.5em; + cursor: pointer; } -.singleCard:hover{ +.singleCard:hover { box-shadow: 0 20px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2); - transform: translate3d(0.5px,0.5px,0.5px); -} - -.cardBody{ -margin-top: 0.5em; + transform: translate3d(0.5px, 0.5px, 0.5px); } -.cardBody h6{ -margin-bottom: -0.2em; +.cardBody { + margin-top: 0.5em; } -@media (min-width:650px){ -.cards-container_content{ - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: flex-start; -} - -/* styling for single card element */ -.singleCard{ - margin-right: 0.5em; -} +.cardBody h6 { + margin-bottom: -0.2em; } /* button on a card */ -.infoDiv{ +.infoDiv { font-size: 0.5rem; padding: 1em; margin: 0.5em; - border-radius: 10px; - background-color: #f2c897 ; + border-radius: 10px; + background-color: #f2c897; } /* TO DO: dynamic value to be added */ -.infoDiv .warning{ +/* .infoDiv .warning{ color: white; background-color: #980101; +} */ + +@media (min-width: 600px) { + .cards-container_header { + height: 38px; + } + + .cards-container_content { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-around; + } + + /* styling for single card element */ + .singleCard { + margin: auto 0.2em; + flex: none; + } } /* styling for project log - i.e.table at the bottom */ -.projectLog-container{ +.projectLog-container { margin: 2em; padding: 1em 2em; width: 100%; font-weight: lighter; } -.projectLog-container h6{ +.projectLog-container h6 { font-weight: bold; -} \ No newline at end of file +} diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx index 5d1981ec44..8eda6ec1dc 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx @@ -5,7 +5,7 @@ import ToolCards from './ToolCards'; function RentedToolsDisplay() { return ( -
Rented Tools or equipment to be returned in 3 days.
+
Rented Tools or equipment to be returned in 3 days.
); From 54d971f852a5703d7928e63da415786d69c5a7f4 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 15:38:30 -0400 Subject: [PATCH 16/93] updated semantic tags throughout --- .../BMDashboard/ProjectDetails/LogBar.jsx | 58 ++++++++++++------- .../ProjectDetails/Materials/MaterialCard.jsx | 3 +- .../Materials/MaterialsDisplay.jsx | 2 +- .../ProjectDetails/ProjectDetails.css | 50 ++++++++++------ .../ProjectDetails/ProjectDetails.jsx | 2 +- .../BMDashboard/ProjectDetails/ProjectLog.jsx | 2 +- .../RentedTools/RentedToolsDisplay.jsx | 2 +- .../ProjectDetails/RentedTools/ToolCard.jsx | 4 +- 8 files changed, 74 insertions(+), 49 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 4adf13fb0e..94509b6ef7 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -5,32 +5,46 @@ function LogBar() { return (
-

Daily Logging:

-
- {' '} - -
+

Daily Logging:

+
    +
  • + +
  • {' '} +
  • + +
  • {' '} +
  • + +
  • +
-

Add a new item:

-
- {' '} - {' '} - -
+

Add a new item:

+
    +
  • + +
  • {' '} +
  • + +
  • {' '} +
  • + +
  • +
-

Team:

-
- {' '} - {' '} - -
+

Team:

+
    +
  • + +
  • {' '} +
  • + +
  • {' '} +
  • + +
  • +
); diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx index 171ee0b8a8..af09e3c962 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -5,12 +5,11 @@ function MaterialCard() {
-
Card title
+

Card title

Term ends in __ hours.
diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx index 05537c85e7..b52b03d9f0 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx @@ -5,7 +5,7 @@ import Materials from './Materials'; function MaterialsDisplay() { return ( -
Materials with quantity less than 20% left
+

Materials with quantity less than 20% left

); diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index 30628a0c52..9fd4596970 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -8,6 +8,10 @@ font-weight: bold; } +.project-details h1{ + font-size: 1.5rem; +} + /* styling for the logBar component - i.e. dashboard with buttons */ .logBar-container { @@ -20,12 +24,22 @@ background-color: #eaeeef; } + .logBar-section { width: 100%; margin-top: 1em; } -button.btn.btn-secondary { +.logBar-section h2, .card.cards-container h2, .projectLog-container h2{ + font-size: 1em; + font-weight: bold; +} + +.logBar-section ul{ + list-style-type: none; + } + +.button.btn.btn-secondary { border: 0; border-radius: 10px; margin: 0.1em; @@ -33,19 +47,19 @@ button.btn.btn-secondary { } /* buttons custom colors */ -button.btn.btn-secondary.greenBtn { +.button.btn.greenBtn { background-color: #015d4a; } -button.btn.btn-secondary.lightBlueBtn { +.button.btn.lightBlueBtn { background-color: #0f6386; } -button.btn.btn-secondary.darkBlueBtn { +.button.btn.darkBlueBtn { background-color: #203844; } -button.btn.btn-secondary.redBtn { +.button.btn.redBtn { background-color: #980101; margin-top: 2em; } @@ -56,11 +70,17 @@ button.btn.btn-secondary.redBtn { flex-direction: column; } - button.btn.btn-secondary { + .logBar-btnGroup { + margin-top: -0.5em; + display: flex; + justify-content: center; + } + + .button.btn.btn-secondary { width: auto; } - button.btn.btn-secondary.redBtn { + .button.btn.btn-secondary.redBtn { margin-top: auto; } } @@ -79,17 +99,11 @@ button.btn.btn-secondary.redBtn { flex: auto; } - .logBar-btnGroup { - margin-top: -0.5em; - display: flex; - justify-content: center; - } - - button.btn.btn-secondary { + .button.btn.btn-secondary { width: auto; } - button.btn.btn-secondary.redBtn { + .button.btn.btn-secondary.redBtn { margin-top: auto; margin-left: 2em; } @@ -127,7 +141,8 @@ button.btn.btn-secondary.redBtn { margin-top: 0.5em; } -.cardBody h6 { +.cardBody h3 { + font-size: 1em; margin-bottom: -0.2em; } @@ -173,6 +188,3 @@ button.btn.btn-secondary.redBtn { font-weight: lighter; } -.projectLog-container h6 { - font-weight: bold; -} diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx index 2c65378a7c..5992a20c11 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.jsx @@ -9,7 +9,7 @@ import './ProjectDetails.css'; function ProjectDetails() { return ( -

Project A Dashboard

+

Project A Dashboard

diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx index 4c4f9bed6d..f56a7b530a 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -51,7 +51,7 @@ function ProjectLog() { return ( -
Members working on site today
+

Members working on site today

diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx index 8eda6ec1dc..a3272e3e33 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx @@ -5,7 +5,7 @@ import ToolCards from './ToolCards'; function RentedToolsDisplay() { return ( -
Rented Tools or equipment to be returned in 3 days.
+

Rented Tools or equipment to be returned in 3 days.

); diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx index 9071232cee..fb2be88585 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -7,12 +7,12 @@ function ToolCard() {
-
Card title
+

Card title

Term ends in __ hours.
From 662776824bfa9c0dc5ce17d605b32737c30bf962 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 16:19:34 -0400 Subject: [PATCH 17/93] updated classnames to follow BEM convention --- .../BMDashboard/ProjectDetails/LogBar.jsx | 32 +++++------ .../ProjectDetails/Materials/MaterialCard.jsx | 8 +-- .../ProjectDetails/Materials/Materials.jsx | 2 +- .../Materials/MaterialsDisplay.jsx | 2 +- .../ProjectDetails/ProjectDetails.css | 53 +++++++++---------- .../BMDashboard/ProjectDetails/ProjectLog.jsx | 2 +- .../RentedTools/RentedToolsDisplay.jsx | 2 +- .../ProjectDetails/RentedTools/ToolCard.jsx | 9 ++-- .../ProjectDetails/RentedTools/ToolCards.jsx | 2 +- 9 files changed, 55 insertions(+), 57 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 94509b6ef7..075b5e66e2 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -3,46 +3,46 @@ import { Button } from 'reactstrap'; function LogBar() { return ( -
-
+
+

Daily Logging:

-
    +
    • - +
    • {' '}
    • - +
    • {' '}
    • - +
-
+

Add a new item:

-
    +
    • - +
    • {' '}
    • - +
    • {' '}
    • - +
-
+

Team:

-
    +
    • - +
    • {' '}
    • - +
    • {' '}
    • - +
diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx index af09e3c962..f0abe0f96f 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialCard.jsx @@ -1,16 +1,16 @@ function MaterialCard() { return ( -
-
+
+
-
+

Card title

-
Term ends in __ hours.
+
Term ends in __ hours.
); diff --git a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx index 80632a70af..2f7229d711 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/Materials.jsx @@ -2,7 +2,7 @@ import MaterialCard from './MaterialCard'; function Materials() { return ( -
+
diff --git a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx index b52b03d9f0..cc4b85530a 100644 --- a/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/Materials/MaterialsDisplay.jsx @@ -5,7 +5,7 @@ import Materials from './Materials'; function MaterialsDisplay() { return ( -

Materials with quantity less than 20% left

+

Materials with quantity less than 20% left

); diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index 9fd4596970..a7bc5fb2ae 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -14,7 +14,7 @@ /* styling for the logBar component - i.e. dashboard with buttons */ -.logBar-container { +.log-bar { display: flex; flex-direction: column; justify-content: center; @@ -25,21 +25,21 @@ } -.logBar-section { +.log-bar__section { width: 100%; margin-top: 1em; } -.logBar-section h2, .card.cards-container h2, .projectLog-container h2{ +.log-bar__section h2, .card.cards-container h2, .project-log h2{ font-size: 1em; font-weight: bold; } -.logBar-section ul{ +.log-bar__section ul{ list-style-type: none; } -.button.btn.btn-secondary { +.button.btn { border: 0; border-radius: 10px; margin: 0.1em; @@ -47,30 +47,30 @@ } /* buttons custom colors */ -.button.btn.greenBtn { +.button.btn.button--green { background-color: #015d4a; } -.button.btn.lightBlueBtn { +.button.btn.button--blue { background-color: #0f6386; } -.button.btn.darkBlueBtn { +.button.btn.button--indigo { background-color: #203844; } -.button.btn.redBtn { +.button.btn.button--maroon { background-color: #980101; margin-top: 2em; } @media (min-width: 550px) { - .logBar-container { + .log-bar { display: flex; flex-direction: column; } - .logBar-btnGroup { + .log-bar__btn-group { margin-top: -0.5em; display: flex; justify-content: center; @@ -80,13 +80,13 @@ width: auto; } - .button.btn.btn-secondary.redBtn { + .button.btn.btn-secondary.button--maroon { margin-top: auto; } } @media (min-width: 750px) { - .logBar-container { + .log-bar { display: flex; flex-direction: row; flex-wrap: wrap; @@ -94,7 +94,7 @@ margin: 2em; } - .logBar-section { + .log-bar__section { width: 50%; flex: auto; } @@ -103,8 +103,7 @@ width: auto; } - .button.btn.btn-secondary.redBtn { - margin-top: auto; + .button.btn.btn-secondary.button--maroon { margin-left: 2em; } } @@ -116,7 +115,7 @@ padding: 1em 2em; } -.cards-container_content { +.cards-container__content { display: flex; flex-direction: column; align-items: center; @@ -124,7 +123,7 @@ } /* styling for single card element */ -.singleCard { +.single-card { border: 1px solid #eaeeef; border-radius: 5px; text-align: center; @@ -132,22 +131,22 @@ cursor: pointer; } -.singleCard:hover { +.single-card:hover { box-shadow: 0 20px 20px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.2); transform: translate3d(0.5px, 0.5px, 0.5px); } -.cardBody { +.single-card__body { margin-top: 0.5em; } -.cardBody h3 { +.single-card__body h3 { font-size: 1em; margin-bottom: -0.2em; } /* button on a card */ -.infoDiv { +.single-card__info { font-size: 0.5rem; padding: 1em; margin: 0.5em; @@ -156,17 +155,17 @@ } /* TO DO: dynamic value to be added */ -/* .infoDiv .warning{ +/* .single-card__info .warning{ color: white; background-color: #980101; } */ @media (min-width: 600px) { - .cards-container_header { + .cards-container__header { height: 38px; } - .cards-container_content { + .cards-container__content { display: flex; flex-direction: row; flex-wrap: nowrap; @@ -174,14 +173,14 @@ } /* styling for single card element */ - .singleCard { + .single-card { margin: auto 0.2em; flex: none; } } /* styling for project log - i.e.table at the bottom */ -.projectLog-container { +.project-log { margin: 2em; padding: 1em 2em; width: 100%; diff --git a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx index f56a7b530a..72fe4b80e7 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx +++ b/src/components/BMDashboard/ProjectDetails/ProjectLog.jsx @@ -50,7 +50,7 @@ function ProjectLog() { )); return ( - +

Members working on site today

diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx index a3272e3e33..0406de5ba1 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/RentedToolsDisplay.jsx @@ -5,7 +5,7 @@ import ToolCards from './ToolCards'; function RentedToolsDisplay() { return ( -

Rented Tools or equipment to be returned in 3 days.

+

Rented Tools or equipment to be returned in 3 days.

); diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx index fb2be88585..71936da59d 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCard.jsx @@ -2,18 +2,17 @@ import React from 'react'; function ToolCard() { return ( -
-
+
+
-
+

Card title

-
Term ends in __ hours.
+
Term ends in __ hours.
); diff --git a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx index e85df41ba5..814679a9ee 100644 --- a/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx +++ b/src/components/BMDashboard/ProjectDetails/RentedTools/ToolCards.jsx @@ -3,7 +3,7 @@ import ToolCard from './ToolCard'; const ToolCards = () => { return ( -
+
From d1b83d849645e2fb316f2831c97c62c8c8ea06c4 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 16:43:30 -0400 Subject: [PATCH 18/93] added media query for smaller fontsize in tablet and mobile view --- .../BMDashboard/ProjectDetails/ProjectDetails.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index a7bc5fb2ae..e483fcfb6d 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -187,3 +187,9 @@ font-weight: lighter; } +@media (max-width: 768px){ + .project-log td, .project-log th { + font-size: 0.5em; + } +} + From db30b246d22dad668f89d5cf6f1d8ee550dbc68b Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 16:46:43 -0400 Subject: [PATCH 19/93] updated fontsize on media query --- src/components/BMDashboard/ProjectDetails/ProjectDetails.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css index e483fcfb6d..f54473920c 100644 --- a/src/components/BMDashboard/ProjectDetails/ProjectDetails.css +++ b/src/components/BMDashboard/ProjectDetails/ProjectDetails.css @@ -189,7 +189,7 @@ @media (max-width: 768px){ .project-log td, .project-log th { - font-size: 0.5em; + font-size: 0.6em; } } From f65968b7986370b0744571e82b749d13a9a0c362 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 20:13:53 -0400 Subject: [PATCH 20/93] updated logbar component --- .../BMDashboard/ProjectDetails/LogBar.jsx | 74 ++++++++----------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 075b5e66e2..12afaf84a2 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -1,51 +1,41 @@ import React from 'react'; import { Button } from 'reactstrap'; +// button styles for each section +const buttonStyles = { + dailyLogging: 'green', + newItem: 'blue', + team: 'indigo', +}; + +// button labels for each section +const buttonLabels = { + dailyLogging: ['Time', 'Material', 'Tool/Equipment'], + newItem: ['Team', 'Material', 'Tool/Equipment'], + team: ['Create New Team', 'Edit Existing Team', 'Log Issue'], +}; + function LogBar() { return (
-
-

Daily Logging:

-
    -
  • - -
  • {' '} -
  • - -
  • {' '} -
  • - -
  • -
-
-
-

Add a new item:

-
    -
  • - -
  • {' '} -
  • - -
  • {' '} -
  • - -
  • -
-
-
-

Team:

-
    -
  • - -
  • {' '} -
  • - -
  • {' '} -
  • - -
  • -
-
+ {Object.keys(buttonStyles).map((section, index) => ( +
+

+ {section === 'dailyLogging' + ? 'Daily Logging:' + : section === 'newItem' + ? 'Add a New Item:' + : 'Team:'} +

+
    + {buttonLabels[section].map((label, i) => ( +
  • + +
  • + ))} +
+
+ ))}
); } From 8c60fb6c5a1ac99a46a393b989b4071daac720f1 Mon Sep 17 00:00:00 2001 From: Olga Yudkin Date: Fri, 22 Sep 2023 20:44:26 -0400 Subject: [PATCH 21/93] updated button attribute --- src/components/BMDashboard/ProjectDetails/LogBar.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/BMDashboard/ProjectDetails/LogBar.jsx b/src/components/BMDashboard/ProjectDetails/LogBar.jsx index 12afaf84a2..faec077723 100644 --- a/src/components/BMDashboard/ProjectDetails/LogBar.jsx +++ b/src/components/BMDashboard/ProjectDetails/LogBar.jsx @@ -30,7 +30,16 @@ function LogBar() {
    {buttonLabels[section].map((label, i) => (
  • - +
  • ))}
From dfa356f96e708084ae5993991a347659b5765f54 Mon Sep 17 00:00:00 2001 From: robertoooc Date: Tue, 26 Sep 2023 13:59:32 -0700 Subject: [PATCH 22/93] adding untouched file to eslint ignore causing github actions to fail --- .eslintignore | 1 + .prettierignore | 1 + 2 files changed, 2 insertions(+) diff --git a/.eslintignore b/.eslintignore index 237ba8ebac..eae556b638 100644 --- a/.eslintignore +++ b/.eslintignore @@ -54,4 +54,5 @@ src/components/UpdatePassword/** src/components/UserManagement/** src/components/UserProfile/** src/components/WeeklySummary/** +src/components/WeeklySummariesReport/** src/components/MouseoverText/** diff --git a/.prettierignore b/.prettierignore index bac3b76edb..28365c8af2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -51,4 +51,5 @@ src/components/UpdatePassword/** src/components/UserManagement/** src/components/UserProfile/** src/components/WeeklySummary/** +src/components/WeeklySummariesReport/** src/components/MouseoverText/** From c99ba8ae5f51918003274b8fe564f40e9a80bc26 Mon Sep 17 00:00:00 2001 From: robertoooc Date: Wed, 27 Sep 2023 16:50:06 -0700 Subject: [PATCH 23/93] Found solution to removing user from team from user profile --- .../UserProfile/TeamsAndProjects/TeamsTab.jsx | 15 ++++++++++++++- src/components/UserProfile/UserProfile.jsx | 15 +++++++++++++++ .../UserProfile/UserProfileEdit/SaveButton.jsx | 3 ++- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx b/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx index 090ea0fea7..7d45c4d0dc 100644 --- a/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx +++ b/src/components/UserProfile/TeamsAndProjects/TeamsTab.jsx @@ -1,6 +1,7 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import AddTeamPopup from './AddTeamPopup'; import UserTeamsTable from './UserTeamsTable'; +import { deleteTeamMember } from 'actions/allTeamsAction'; const TeamsTab = props => { const { @@ -21,9 +22,20 @@ const TeamsTab = props => { userProfile, codeValid, setCodeValid, + saved, } = props; const [addTeamPopupOpen, setaddTeamPopupOpen] = useState(false); const [renderedOn, setRenderedOn] = useState(0); + const [removedTeams, setRemovedTeams] = useState([]); + + useEffect(() => { + if(saved && removedTeams.length > 0){ + removedTeams.forEach(teamId => { + deleteTeamMember(teamId, userProfile._id); + setRemovedTeams([]); + }) + } + }, [saved]); const onAddTeamPopupShow = () => { setaddTeamPopupOpen(true); @@ -33,6 +45,7 @@ const TeamsTab = props => { setaddTeamPopupOpen(false); }; const onSelectDeleteTeam = teamId => { + setRemovedTeams([...removedTeams, teamId]); onDeleteTeam(teamId); }; diff --git a/src/components/UserProfile/UserProfile.jsx b/src/components/UserProfile/UserProfile.jsx index 21c99df34e..ecc8ed8351 100644 --- a/src/components/UserProfile/UserProfile.jsx +++ b/src/components/UserProfile/UserProfile.jsx @@ -92,6 +92,7 @@ function UserProfile(props) { const [summarySelected, setSummarySelected] = useState(null); const [summaryName, setSummaryName] = useState(''); const [showSummary, setShowSummary] = useState(false); + const [saved, setSaved] = useState(false); const userProfileRef = useRef(); @@ -413,6 +414,10 @@ function UserProfile(props) { setBlueSquareChanged(true); }; + // const handleSave = ()=>{ + // setSaved(true); + // } + const handleSubmit = async () => { for (let i = 0; i < updatedTasks.length; i += 1) { const updatedTask = updatedTasks[i]; @@ -427,6 +432,7 @@ function UserProfile(props) { } await loadUserProfile(); await loadUserTasks(); + setSaved(false) } catch (err) { alert('An error occurred while attempting to save this profile.'); } @@ -861,6 +867,7 @@ function UserProfile(props) { @@ -980,6 +988,7 @@ function UserProfile(props) { (isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } userProfile={userProfile} + setSaved={()=>setSaved(true)} /> { @@ -1035,6 +1044,7 @@ function UserProfile(props) { (isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } userProfile={userProfile} + setSaved={()=>setSaved(true)} /> { @@ -1062,6 +1072,7 @@ function UserProfile(props) { setSaved(true)} /> { @@ -1160,6 +1172,7 @@ function UserProfile(props) { (isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } userProfile={userProfile} + setSaved={()=>setSaved(true)} /> { @@ -1207,6 +1220,7 @@ function UserProfile(props) { (isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } userProfile={userProfile} + setSaved={()=>setSaved(true)} /> { @@ -1274,6 +1288,7 @@ function UserProfile(props) { (isProfileEqual && isTasksEqual && isTeamsEqual && isProjectsEqual) } userProfile={userProfile} + setSaved={()=>setSaved(true)} /> {activeTab !== '3' && ( { * @returns */ const SaveButton = props => { - const { handleSubmit, disabled, userProfile } = props; + const { handleSubmit, disabled, userProfile, setSaved } = props; const [modal, setModal] = useState(false); const [randomMessage, setRandomMessage] = useState(getRandomMessage()); const handleSave = () => { handleSubmit(); + setSaved(); setModal(true); }; From d214f8b3e23e883dd37d72d3e3e372fe1b3313c5 Mon Sep 17 00:00:00 2001 From: robertoooc Date: Thu, 28 Sep 2023 16:31:56 -0700 Subject: [PATCH 24/93] removed unused line of code from previous commit --- src/components/UserProfile/UserProfile.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/UserProfile/UserProfile.jsx b/src/components/UserProfile/UserProfile.jsx index ecc8ed8351..5b4e432fa6 100644 --- a/src/components/UserProfile/UserProfile.jsx +++ b/src/components/UserProfile/UserProfile.jsx @@ -414,10 +414,6 @@ function UserProfile(props) { setBlueSquareChanged(true); }; - // const handleSave = ()=>{ - // setSaved(true); - // } - const handleSubmit = async () => { for (let i = 0; i < updatedTasks.length; i += 1) { const updatedTask = updatedTasks[i]; @@ -867,7 +863,6 @@ function UserProfile(props) { Date: Fri, 29 Sep 2023 12:04:13 -0700 Subject: [PATCH 25/93] delete ignore file --- .eslintignore | 58 ------------------------------------------------- .prettierignore | 54 --------------------------------------------- 2 files changed, 112 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .prettierignore diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 58b85ab980..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,58 +0,0 @@ -*.png -*.svg -*.test.js -*.test.jsx -src/actions/** -src/App.css -src/config.json -src/constants/** -src/index.js -src/languages/** -src/reducers/** -src/registerServiceWorker.js -src/routes.js -src/services/** -src/setupTests.js -src/store.js -src/styles.js -src/utils/** -src/__tests__/** - - - -src/components/App.jsx -src/components/AutoReload/** -src/components/AutoUpdate/** -src/components/Badge/** -src/components/BMDashboard/** -src/components/common/** -src/components/ForcePasswordUpdate/** -src/components/Header/** -src/components/Inventory/** -src/components/LeaderBoard/** -src/components/Login/** -src/components/ManageMemberships/** -src/components/Memberships/** -src/components/MonthlyEffort/** -src/components/NewProfileLink/** -src/components/OwnerMessage/** -src/components/PermissionsManagement/** -src/components/PopUpBar/** -src/components/ProfileLinks/** -src/components/Projects/** -src/components/RenderInfringement/** -src/components/Reports/** -src/components/SetupProfile/** -src/components/SummaryBar/** -src/components/SummaryManagement/** -src/components/TaskEditSuggestions/** -src/components/TeamMemberTasks/** -src/components/Teams/** -src/components/Timelog/** -src/components/Timer/** -src/components/UpdatePassword/** -src/components/UserManagement/** -src/components/UserProfile/** -src/components/WeeklySummary/** -src/components/MouseoverText/** -src/components/WeeklySummariesReport/** diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 12c9181f07..0000000000 --- a/.prettierignore +++ /dev/null @@ -1,54 +0,0 @@ -*.png -*.svg -src/actions/** -src/App.css -src/config.json -src/constants/** -src/index.js -src/languages/** -src/reducers/** -src/registerServiceWorker.js -src/routes.js -src/services/** -src/setupTests.js -src/store.js -src/styles.js -src/utils/** -src/__tests__/** - - -src/components/App.jsx -src/components/AutoReload/** -src/components/AutoUpdate/** -src/components/Badge/** -src/components/common/** -src/components/ForcePasswordUpdate/** -src/components/Header/** -src/components/Inventory/** -src/components/LeaderBoard/** -src/components/Login/** -src/components/ManageMemberships/** -src/components/Memberships/** -src/components/MonthlyEffort/** -src/components/NewProfileLink/** -src/components/OwnerMessage/** -src/components/PermissionsManagement/** -src/components/PopUpBar/** -src/components/ProfileLinks/** -src/components/Projects/** -src/components/RenderInfringement/** -src/components/Reports/** -src/components/SetupProfile/** -src/components/SummaryBar/** -src/components/SummaryManagement/** -src/components/TaskEditSuggestions/** -src/components/TeamMemberTasks/** -src/components/Teams/** -src/components/Timelog/** -src/components/Timer/** -src/components/UpdatePassword/** -src/components/UserManagement/** -src/components/UserProfile/** -src/components/WeeklySummary/** -src/components/MouseoverText/** -src/components/WeeklySummariesReport/** \ No newline at end of file From a2910da90ed5dd6fb28380edfcc3e309958da1b5 Mon Sep 17 00:00:00 2001 From: Zijie Yu Date: Fri, 29 Sep 2023 12:08:06 -0700 Subject: [PATCH 26/93] fixed index.js --- src/components/Reports/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Reports/index.js b/src/components/Reports/index.js index 7b5807188a..3464662d14 100644 --- a/src/components/Reports/index.js +++ b/src/components/Reports/index.js @@ -1 +1,3 @@ -export { default } from './Reports'; +import Reports from './Reports'; + +export default Reports; From 26c88db88da18261be3e93acab9c0ca23799092a Mon Sep 17 00:00:00 2001 From: Zijie Yu Date: Fri, 29 Sep 2023 12:21:10 -0700 Subject: [PATCH 27/93] PeopleTableDetails.jsx --- src/components/Reports/PeopleTableDetails.jsx | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/src/components/Reports/PeopleTableDetails.jsx b/src/components/Reports/PeopleTableDetails.jsx index d57476ff3c..c46ee8789d 100644 --- a/src/components/Reports/PeopleTableDetails.jsx +++ b/src/components/Reports/PeopleTableDetails.jsx @@ -5,7 +5,7 @@ import './PeopleTableDetails.css'; import { NewModal } from '../common/NewModal'; import TableFilter from './TableFilter/TableFilter'; -const PeopleTableDetails = props => { +function PeopleTableDetails(props) { const [name, setName] = useState(''); const [priority, setPriority] = useState(''); const [status, setStatus] = useState(''); @@ -14,12 +14,8 @@ const PeopleTableDetails = props => { const [assign, setAssign] = useState(''); const [estimatedHours, setEstimatedHours] = useState(''); const [order, setOrder] = useState(''); - const [deleteId, setDeleteId] = useState(''); - const [deleteName, setDeleteName] = useState(''); - const [deletePopup, setDeletePopup] = useState(false); - const [editPopup, setEditPopup] = useState(false); - const [startDate, setStartDate] = useState(''); - const [endDate, setEndDate] = useState(''); + const [startDate] = useState(''); + const [endDate] = useState(''); const onTaskNameSearch = text => { setName(text); @@ -61,7 +57,9 @@ const PeopleTableDetails = props => { }; const filterTasks = tasks => { - let simple = []; + // eslint-disable-next-line no-unused-vars + const simple = []; + // eslint-disable-next-line array-callback-return,consistent-return let filteredList = tasks.filter(task => { if ( task.taskName.toLowerCase().includes(name.toLowerCase()) && @@ -76,7 +74,7 @@ const PeopleTableDetails = props => { }); filteredList = filteredList.filter(task => { let flag = false; - for (let i = 0; i < task.resources[0].length; i++) { + for (let i = 0; i < task.resources[0].length; i += 1) { if (task.resources[0][i].name.toLowerCase().includes(resources.toLowerCase())) { flag = true; break; @@ -88,7 +86,7 @@ const PeopleTableDetails = props => { }; let toggleMoreResourcesStatus = true; const toggleMoreResources = id => { - let x = document.getElementById(id); + const x = document.getElementById(id); if (toggleMoreResourcesStatus) { x.style.display = 'table-cell'; } else { @@ -96,7 +94,8 @@ const PeopleTableDetails = props => { } toggleMoreResourcesStatus = !toggleMoreResourcesStatus; }; - let filteredTasks = filterTasks(props.taskData); + const { taskData } = props; + const filteredTasks = filterTasks(taskData); const renderFilteredTask = value => (
@@ -117,18 +116,24 @@ const PeopleTableDetails = props => { /> ); } + return null; }), )} {value.resources?.map(res => res.length > 2 ? ( - toggleMoreResources(value._id)}> + ) : null, )}
{value.resources?.map(res => + // eslint-disable-next-line array-callback-return,consistent-return res.map((resource, index) => { if (index >= 2) { return ( @@ -193,7 +198,7 @@ const PeopleTableDetails = props => {
{filteredTasks.map(value => ( - renderFilteredTask(value)}> + renderFilteredTask(value)}>
Why This Task is important