diff --git a/client/src/app/about/about.module.ts b/client/src/app/about/about.module.ts index c6fb034..ea066db 100644 --- a/client/src/app/about/about.module.ts +++ b/client/src/app/about/about.module.ts @@ -8,13 +8,16 @@ import { AboutPageRoutingModule } from './about-routing.module'; import { AboutPage } from './about.page'; +import { NavComponent } from '../nav/nav.component'; + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - AboutPageRoutingModule + AboutPageRoutingModule, + NavComponent ], declarations: [AboutPage] }) -export class AboutPageModule {} +export class AboutPageModule { } diff --git a/client/src/app/about/about.page.html b/client/src/app/about/about.page.html index 8bb3e9b..3d3a92a 100644 --- a/client/src/app/about/about.page.html +++ b/client/src/app/about/about.page.html @@ -1,31 +1,41 @@ - + - - About Us - + About Us - - - - - {{ member.name }} Avatar - - -

{{ member.name }}

-

Email: {{ member.email }}

-

GitHub: - {{ member.github }} -

-

LinkedIn: - {{ member.linkedin }} -

-

Personal Website: - {{ member.website }} -

-

{{ member.bio }}

-
-
-
+ + + + + + + Project Contributors + + + + + + + + + {{ member.name }} Avatar + + +

{{ member.name }}

+

Email: {{ member.email }}

+

GitHub: + {{ member.github }} +

+

LinkedIn: + {{ member.linkedin }} +

+

Personal Website: + {{ member.website }} +

+

{{ member.bio }}

+
+
+
+
\ No newline at end of file diff --git a/client/src/app/about/about.page.scss b/client/src/app/about/about.page.scss index e69de29..19ae630 100644 --- a/client/src/app/about/about.page.scss +++ b/client/src/app/about/about.page.scss @@ -0,0 +1,8 @@ +ion-card, ion-title, ion-card-subtitle { + --ion-item-border-color: #025E73; + --ion-item-background: #80A7BF; + --ion-text-color: #012E40; + overflow: visible; + color: black; + text-align: center; +} \ No newline at end of file diff --git a/client/src/app/app-routing.module.ts b/client/src/app/app-routing.module.ts index 7e0a708..9e50e3f 100644 --- a/client/src/app/app-routing.module.ts +++ b/client/src/app/app-routing.module.ts @@ -51,6 +51,10 @@ const routes: Routes = [ path: 'task', loadChildren: () => import('./task/task.module').then(m => m.TaskPageModule) }, + { + path: 'results', + loadChildren: () => import('./results/results.module').then( m => m.ResultsPageModule) + }, diff --git a/client/src/app/education/education.module.ts b/client/src/app/education/education.module.ts index bd2b94e..2f95561 100644 --- a/client/src/app/education/education.module.ts +++ b/client/src/app/education/education.module.ts @@ -8,12 +8,16 @@ import { EducationPageRoutingModule } from './education-routing.module'; import { EducationPage } from './education.page'; +import { NavComponent } from '../nav/nav.component'; + + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - EducationPageRoutingModule + EducationPageRoutingModule, + NavComponent ], declarations: [EducationPage] }) diff --git a/client/src/app/education/education.page.html b/client/src/app/education/education.page.html index 1ac025c..f9e6611 100644 --- a/client/src/app/education/education.page.html +++ b/client/src/app/education/education.page.html @@ -1,91 +1,446 @@ - - - - Home - -
Home
-
- - - Education - -
Cog Load Page
-
Strategies
-
Measure
-
- - - Quiz - -
Quiz - Builder
-
New Task
-
Quiz - Task Load
-
Quiz - Results
-
-
- - - - Education - Cog Load Page - The mental work to complete a task - - - - Brain Lift helps users understand how their cognitive load affects their learning and performance. - Use the NASA Task Load Index to measure and track your cognitive load for different tasks. - - - - - - - Intrinsic - (examples) - - - - - - - - - - Extraneous - (examples) - - - - - - - - - - Germane - (examples) - - - - - - - - - - Measure with TLX - (examples) - - - - - - - -

Content

-
- - - -

© 2023 Cognitive Load App. All rights reserved.

+ + + Learn About Cognitive Load -
\ No newline at end of file +
+ + + + Learn about Cognitive Load + + + + + + + What is Cognitive Load? + + + + Definition + + + Cognitive Load is the mental effort required to complete a task. + + + + + + + What is Brain Lift? + + Measure and track the mental effort to complete your tasks + + + + + Brain Lift helps users understand how their cognitive load affects their learning and performance. + Use the NASA Task Load Index to measure and track your cognitive load for different tasks. + + + + + + + + + Three Types of Cognitive Load + + + + + + Intrinsic + + + + + Extraneous + + + Germane + + + + + + + + + + + + + + Left facing head with gears + + + + Intrinsic Cognitive Load + + + + + + + + + Intrinsic Cognitive Load + Definition + + +
  • + The inherent complexity of a given task +
  • +
  • + Remains fairly constant +
  • +
    + +
    +
    + + + + Intrinsic Load Examples + Inherent Complexity + + +
  • + Weightlifting – lifting a weight +
  • +
  • + Washing Dishes – picking up plates and glassware, not breaking anything +
  • +
  • + Driving – focusing on traffic, arriving safely, not getting distracted or lost +
  • +
  • + PC RAM – RAM required to do a task (Chrome needs 1GB RAM) +
  • +
    +
    +
    +
    +
    + + + + + + + + + Extraneous Cognitive Load + Definition + + +
  • + Mental effort to process things that interfere with your ability to complete the task that are irrelevant + to the task +
  • +
  • + Irrelevant to task at hand +
  • +
    + +
    + + + + Extraneous Load + + + Three categories + + + +
      +
    1. + Mental Loads (mental illness symptoms, medications, symptoms of disability) +
    2. +
    3. + Physical Loads – being sick, hungry, thirsty, in pain, medications +
    4. +
    5. + Environmental Loads – Raining or snowing, too hot or cold, loud noises + +
    6. +
    +
    + +
    +
    + + + + + Extraneous Load + Mental Load Examples + + + + Illness Symptoms + +
  • Mood (feeling very sad or very happy) +
  • +
  • + Mood changes (rollercoaster days) + +
  • +
  • + Visual hallucinations - shimmering, past memory overlay, difficulty seeing properly, not seeing things + that + are there + +
  • +
  • Auditory hallucinations - voices, indistinct or command +
  • +
  • Intrusive thoughts - can't focus on conversations, song playing only in your head but too loud to hear + anything else +
  • +
  • Forgetfulness - issues with short term processing (having repeated conversations, forgetting important + tasks) - may be a symptom +
  • +
  • Medications
  • +
  • Brain fog, difficulty with speech, forgetting to take them +
  • + +
    +
    +
    + + + + Left facing head with gears + + + + Extraneous Cognitive Load + + + + Learn about strategies to deal with extraneous load + + +
    +
    + + + + + + + + Extraneous Cognitive Load + Physical Load Examples + + +
  • Being sick (runny nose, headache, coughing) +
  • +
  • Cravings for substances - cigs, weed, alcohol, other drugs +
  • +
  • Hungry/thirsty +
  • +
  • Extreme fatigue +
  • +
  • Pain +
  • +
  • + Double vision - making it hard to see +
  • +
  • + Medications (excessive sweating, akathisia) +
  • +
    + +
    +
    + + + + + Extraneous Load + Environmental Load Examples + + + + Illness Symptoms + + +
  • Raining or snowing + +
  • +
  • + Loud external noises (like a dog barking loudly or child screaming) +
  • +
  • + Temperature discomfort (feeling like it's too cold or hot) +
  • +
    +
    +
    + + + + + Extraneous Load + + + + + + Mental illness or other disabilities can interfere with the ability to complete tasks. Thus, the illness + or disability adds to an individual’s Extraneous load, and increases the overall mental effort required to + complete a task. + + + +
    +
    + + + + + + + + + Silhouette of head with keyhole + + + + Germane Cognitive Load + + + + + + + + + Germane Cognitive Load + Definition + + +
  • Mental effort related to helping yourself complete tasks +
  • +
  • Mental effort required to understand and retain information +
  • + + +
    + +
    +
    + + + + + Germane Load + How can we optimize our germane load to complement our extraneous loads? + + + + +
  • Weight-lifting and Exercise - keep it simple +
  • +
  • + Doing dishes – use other senses to determine clean +
  • +
  • + Driving – take a quiz or something to measure daily ability +
  • +
  • + PC RAM -write efficient code to use less RAM +
  • +
    +
    +
    +
    +
    + + + + + + + + + Silhouette of head with circuitry + + + + NASA Task Load Index + + + + + + + + NASA Task Load Index + Measure your cognitive load + + + + What is the Task Load Index? + + The NASA Task Load Index (NASA-TLX) was created in 1980 by a team of researchers led by Sandra G. Hart at + the NASA Ames Research Center. The rating scale was designed to assess the perceived workload and mental + demands of a task. + + + Start measuring your cognitive load + + + + + + NASA Task Load Index + The NASA TLX has six questions. + + + +
      + +
    1. + How much mental and perceptual activity was required? Was the task easy or demanding, simple or complex? +
    2. +
    3. + How much physical activity was required? Was the task easy or demanding, slack or strenuous? +
    4. +
    5. + How much time pressure did you feel due to the pace at which the tasks or task elements occurred? Was + the + pace slow or rapid? +
    6. +
    7. + How successful were you in performing the task? How satisfied were you with your performance? +
    8. +
    9. + How hard did you have to work (mentally and physically) to accomplish your level of performance? +
    10. +
    11. + How irritated, stressed, and annoyed versus content, relaxed, and complacent did you feel during the + task? +
    12. +
    + + +
    +
    +
    +
    +
    + + + +

    © 2023 Cognitive Load App. All rights reserved.

    +
    +
    +
    \ No newline at end of file diff --git a/client/src/app/education/education.page.scss b/client/src/app/education/education.page.scss index 21f3bc3..1df9f70 100644 --- a/client/src/app/education/education.page.scss +++ b/client/src/app/education/education.page.scss @@ -9,10 +9,21 @@ ion-accordion { /* Card Styles */ -ion-card { +ion-card, ion-title, ion-card-subtitle { --ion-item-border-color: #025E73; --ion-item-background: #80A7BF; --ion-text-color: #012E40; + overflow: visible; + color: black; + text-align: center; +} + +li { + text-align: left; +} + +ion-img { + width: 30%; } ion-button { @@ -21,10 +32,6 @@ ion-button { --ion-text-color: #012E40; } -ion-card { - width: auto; - height: fit-content; -} ion-img::part(image) { width: 50%; /* or whatever value */ @@ -44,4 +51,5 @@ ion-footer p { font-size: 12px; color: #888; } - \ No newline at end of file + + diff --git a/client/src/app/education/education.page.ts b/client/src/app/education/education.page.ts index a7ae7e5..7add74e 100644 --- a/client/src/app/education/education.page.ts +++ b/client/src/app/education/education.page.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; - +import { Router } from '@angular/router'; @Component({ selector: 'app-education', templateUrl: './education.page.html', @@ -7,7 +7,15 @@ import { Component, OnInit } from '@angular/core'; }) export class EducationPage implements OnInit { - constructor() { } + constructor(private router: Router) { } + + goToStrategies() { + this.router.navigateByUrl('/strategies') + } + + goToMeasure() { + this.router.navigateByUrl('/measure') + } ngOnInit() { } diff --git a/client/src/app/home/home.module.ts b/client/src/app/home/home.module.ts index a554f01..4aa14c1 100644 --- a/client/src/app/home/home.module.ts +++ b/client/src/app/home/home.module.ts @@ -6,14 +6,17 @@ import { HomePage } from './home.page'; import { HomePageRoutingModule } from './home-routing.module'; +import { NavComponent } from '../nav/nav.component'; + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - HomePageRoutingModule + HomePageRoutingModule, + NavComponent ], declarations: [HomePage] }) -export class HomePageModule {} +export class HomePageModule { } diff --git a/client/src/app/home/home.page.html b/client/src/app/home/home.page.html index 85515f6..7a5d6f9 100644 --- a/client/src/app/home/home.page.html +++ b/client/src/app/home/home.page.html @@ -1,59 +1,100 @@ - - - Cognitive Load App + + + Home - - - - - Welcome to the Cognitive Load App - Manage Your Mental Health - - -

    Reduce cognitive load and improve your mental health with our powerful app. Get personalized exercises and - techniques to help you optimize your cognitive performance and reduce stress.

    -

    Track your progress, set reminders, and receive helpful insights along the way. Start your journey to a - healthier mind today!

    -
    -
    - - Get Started - - - - - -

    Personalized Insights

    -

    Get personalized insights to understand your cognitive load and make informed decisions for better mental - health.

    -
    - - -

    Time Management

    -

    Learn effective time management techniques to optimize your cognitive performance and reduce overwhelm. -

    -
    -
    - - - -

    Mindfulness Exercises

    -

    Practice mindfulness exercises to enhance your focus, reduce stress, and improve your overall well-being. -

    -
    - - -

    Task Prioritization

    -

    Learn effective strategies to prioritize tasks and manage your cognitive load more efficiently.

    -
    -
    -
    - - - -

    © 2023 Cognitive Load App. All rights reserved.

    -
    -
    -
    \ No newline at end of file + + + + + +
    + Hero Image +
    +
    + + Welcome to Brain Lift + Manage Your Mental Health + +
    + +
    + + +

    Reduce cognitive load and improve your mental health with our powerful app. Get personalized exercises and + techniques to help you optimize your cognitive performance and reduce stress.

    +

    Track your progress, set reminders, and receive helpful insights along the way. Start your journey to a + healthier mind today!

    +
    +
    + + Get Started + + + + + +

    Personalized Insights

    +

    Get personalized insights to understand your cognitive load and make informed decisions for better mental + health.

    +
    + + +

    Time Management

    +

    Learn effective time management techniques to optimize your cognitive performance and reduce overwhelm. +

    +
    +
    + + + +

    Mindfulness Exercises

    +

    Practice mindfulness exercises to enhance your focus, reduce stress, and improve your overall well-being. +

    +
    + + +

    Task Prioritization

    +

    Learn effective strategies to prioritize tasks and manage your cognitive load more efficiently.

    +
    +
    +
    + +
    + +

    Mission

    +
    + +

    Our mission at Brain Lift is to enable individuals to optimize their cognitive performance and improve + their + learning abilities via the efficient management of cognitive load. We aim to provide users with a thorough + understanding of cognitive load, its impact on performance and learning, and practical techniques for + minimizing + cognitive overload. By integrating the NASA Task Load Index and our cognitive load application, Brain Lift, + we + enable users to evaluate their cognitive load across a variety of tasks and activities, allowing them to + make + informed decisions and schedule their time efficiently. Through our platform, users are able to identify + areas + of high cognitive load, implement cognitive load management strategies such as scaffolding, automaticity, + and + chunking, and ultimately achieve enhanced task completion, accelerated learning, and increased independence + in + daily life. +

    +
    +
    + + +
    +
    + + +
    + + + +

    © 2023 Cognitive Load App. All rights reserved.

    +
    +
    \ No newline at end of file diff --git a/client/src/app/home/home.page.scss b/client/src/app/home/home.page.scss index 456096a..867684b 100644 --- a/client/src/app/home/home.page.scss +++ b/client/src/app/home/home.page.scss @@ -33,25 +33,13 @@ body { padding: 0; } -/* Navigation Styles */ - -ion-accordion { - font-family: Arial, sans-serif; - font: 16px bold; - color: #f4f4f4; - +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; } -/* Header Styles */ -ion-header { - padding: 20px; -} -ion-title { - font-size: 24px; - font-weight: bold; - color: #fff; -} /* Card Styles */ ion-card { @@ -75,7 +63,7 @@ ion-card-title { ion-card-subtitle { font-size: 16px; - color: #888; + color: black; margin-top: 10px; } @@ -106,10 +94,102 @@ h3 { p { font-size: 14px; + color: black; + margin-top: 10px; +} +.hero { + position: relative; + + img { + width: 100%; + } + + + .hero-overlay { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + text-align: center; + background-color: rgb(255, 255, 255, .90); + padding: 16px; + width: 100%; + height: 100%; + + + h1 { + font-size: 24px; + font-weight: bold; + margin-bottom: 16px; + } + + p { + font-size: 16px; + } + } + } + + /* Global Styles */ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; +} + +ion-col { + background-color: white; +} + +/* Card Styles */ +ion-card { + max-width: 400px; + margin: 50px auto; + text-align: center; +} + +.logo { + width: 150px; + margin: 20px auto; +} + +ion-card-title { + font-size: 24px; + font-weight: bold; + margin-top: 20px; + +} + +ion-card-subtitle { + font-size: 16px; color: #888; margin-top: 10px; } +ion-card-content { + margin-top: 20px; +} + +/* Hero Section Styles */ +.hero { + position: relative; +} + +.hero-background { + width: 100%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.hero-overlay { + position: relative; + text-align: center; + background-color: rgba(255, 255, 255, .95); + padding: 16px; +} + + /* Footer Styles */ ion-footer { margin-top: 50px; diff --git a/client/src/app/home/home.page.ts b/client/src/app/home/home.page.ts index 83522d5..2cb6dfa 100644 --- a/client/src/app/home/home.page.ts +++ b/client/src/app/home/home.page.ts @@ -1,12 +1,14 @@ import { Component } from '@angular/core'; - +import { Router } from '@angular/router'; @Component({ selector: 'app-home', templateUrl: 'home.page.html', styleUrls: ['home.page.scss'], }) export class HomePage { - - constructor() {} + goSignup() { + this.router.navigateByUrl('/signup'); + } + constructor(private router: Router) { } } diff --git a/client/src/app/landingpage/landing.page.html b/client/src/app/landingpage/landing.page.html deleted file mode 100644 index a45a0ea..0000000 --- a/client/src/app/landingpage/landing.page.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - Brain Lift - - - - - -
    - Hero Image -
    -

    Welcome to Brain Lift

    -

    `Our mission at Brain Lift is to enable individuals to optimize their cognitive performance and improve their learning abilities via the efficient management of cognitive load. We aim to provide users with a thorough understanding of cognitive load, its impact on performance and learning, and practical techniques for minimizing cognitive overload. By integrating the NASA Task Load Index and our cognitive load application, Brain Lift, we enable users to evaluate their cognitive load across a variety of tasks and activities, allowing them to make informed decisions and schedule their time efficiently. Through our platform, users are able to identify areas of high cognitive load, implement cognitive load management strategies such as scaffolding, automaticity, and chunking, and ultimately achieve enhanced task completion, accelerated learning, and increased independence in daily life.` -

    -
    -
    - \ No newline at end of file diff --git a/client/src/app/landingpage/landing.page.scss b/client/src/app/landingpage/landing.page.scss deleted file mode 100644 index 3b9ff78..0000000 --- a/client/src/app/landingpage/landing.page.scss +++ /dev/null @@ -1,28 +0,0 @@ -.hero { - position: relative; - - img { - width: 100%; - } - - .hero-overlay { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - text-align: center; - color: #fff; - padding: 16px; - - h1 { - font-size: 24px; - font-weight: bold; - margin-bottom: 16px; - } - - p { - font-size: 16px; - } - } - } - \ No newline at end of file diff --git a/client/src/app/landingpage/landing.page.ts b/client/src/app/landingpage/landing.page.ts deleted file mode 100644 index 6ef2689..0000000 --- a/client/src/app/landingpage/landing.page.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-landing', - templateUrl: 'landing.page.html', - styleUrls: ['landing.page.scss'], -}) -export class LandingPage { - missionStatement: string = `Our mission at Brain Lift is to enable individuals to optimize their cognitive performance and improve their learning abilities via the efficient management of cognitive load. We aim to provide users with a thorough understanding of cognitive load, its impact on performance and learning, and practical techniques for minimizing cognitive overload. By integrating the NASA Task Load Index and our cognitive load application, Brain Lift, we enable users to evaluate their cognitive load across a variety of tasks and activities, allowing them to make informed decisions and schedule their time efficiently. Through our platform, users are able to identify areas of high cognitive load, implement cognitive load management strategies such as scaffolding, automaticity, and chunking, and ultimately achieve enhanced task completion, accelerated learning, and increased independence in daily life.`; - - constructor() { } -} diff --git a/client/src/app/login/login.module.ts b/client/src/app/login/login.module.ts index 5eda226..8f7f422 100644 --- a/client/src/app/login/login.module.ts +++ b/client/src/app/login/login.module.ts @@ -8,13 +8,17 @@ import { LoginPageRoutingModule } from './login-routing.module'; import { LoginPage } from './login.page'; +import { NavComponent } from '../nav/nav.component'; + + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - LoginPageRoutingModule + LoginPageRoutingModule, + NavComponent ], declarations: [LoginPage] }) -export class LoginPageModule {} +export class LoginPageModule { } diff --git a/client/src/app/login/login.page.html b/client/src/app/login/login.page.html index a90bdb7..dbe9c96 100644 --- a/client/src/app/login/login.page.html +++ b/client/src/app/login/login.page.html @@ -1,24 +1,31 @@ - + Login - - - Email (Username) - - - - Password - - + + +
    + + + Email (Username) + + - Login -

    {{ errorMessage }}

    + + Password + + + + Login +

    {{ errorMessage }}

    + + +
    - \ No newline at end of file diff --git a/client/src/app/login/login.page.scss b/client/src/app/login/login.page.scss index e69de29..97a908f 100644 --- a/client/src/app/login/login.page.scss +++ b/client/src/app/login/login.page.scss @@ -0,0 +1,7 @@ +ion-card, ion-title, ion-card-subtitle { + --ion-item-border-color: #025E73; + --ion-text-color: #012E40; + overflow: visible; + color: black; + text-align: center; +} \ No newline at end of file diff --git a/client/src/app/measure/measure.module.ts b/client/src/app/measure/measure.module.ts index 19b73a2..c10d5e3 100644 --- a/client/src/app/measure/measure.module.ts +++ b/client/src/app/measure/measure.module.ts @@ -8,13 +8,16 @@ import { MeasurePageRoutingModule } from './measure-routing.module'; import { MeasurePage } from './measure.page'; +import { NavComponent } from '../nav/nav.component'; + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - MeasurePageRoutingModule + MeasurePageRoutingModule, + NavComponent ], declarations: [MeasurePage] }) -export class MeasurePageModule {} +export class MeasurePageModule { } diff --git a/client/src/app/measure/measure.page.html b/client/src/app/measure/measure.page.html index 50959ba..3c89e9a 100644 --- a/client/src/app/measure/measure.page.html +++ b/client/src/app/measure/measure.page.html @@ -1,49 +1,16 @@ - - - - Home - -
    Home
    -
    - - - Education - -
    Cog Load Page
    -
    Strategies
    -
    Measure
    -
    - - - Quiz - -
    Quiz - Builder
    -
    New Task
    -
    Quiz - Task Load
    -
    Quiz - Results
    -
    -
    + + + Measure your cognitive load + + - - - Education - Measure - NASA Task Load Index - - -
    -
    -Explanation -
    -
    -How to Use -
    -
    - -

    Content

    -
    + - + + + + -

    © 2023 Cognitive Load App. All rights reserved.

    +

    © 2023 Cognitive Load App. All rights reserved.

    -
    +
    \ No newline at end of file diff --git a/client/src/app/measure/measure.page.scss b/client/src/app/measure/measure.page.scss index 6445ca8..0c11c7a 100644 --- a/client/src/app/measure/measure.page.scss +++ b/client/src/app/measure/measure.page.scss @@ -6,7 +6,11 @@ ion-accordion { color: #f4f4f4; } - +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; +} /* Card Styles */ ion-card { --ion-item-border-color: #025E73; diff --git a/client/src/app/nav/nav.component.html b/client/src/app/nav/nav.component.html new file mode 100644 index 0000000..24430aa --- /dev/null +++ b/client/src/app/nav/nav.component.html @@ -0,0 +1,28 @@ + + + + Home + +
    Home
    +
    Login
    +
    Signup
    +
    + + + Education + + +
    Education
    +
    Strategies
    + +
    + + + Quiz + +
    Quiz
    +
    New Task
    +
    Results
    +
    Test
    +
    +
    \ No newline at end of file diff --git a/client/src/app/nav/nav.component.scss b/client/src/app/nav/nav.component.scss new file mode 100644 index 0000000..81faa3d --- /dev/null +++ b/client/src/app/nav/nav.component.scss @@ -0,0 +1,6 @@ +ion-accordion { + font-family: Arial, sans-serif; + font: 16px bold; + color: #f4f4f4; + background-color: #011411; +} \ No newline at end of file diff --git a/client/src/app/nav/nav.component.spec.ts b/client/src/app/nav/nav.component.spec.ts new file mode 100644 index 0000000..a94f19e --- /dev/null +++ b/client/src/app/nav/nav.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { NavComponent } from './nav.component'; + +describe('NavComponent', () => { + let component: NavComponent; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ NavComponent ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(NavComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/nav/nav.component.ts b/client/src/app/nav/nav.component.ts new file mode 100644 index 0000000..790cfae --- /dev/null +++ b/client/src/app/nav/nav.component.ts @@ -0,0 +1,70 @@ +import { Component, OnInit } from '@angular/core'; +import { IonicModule } from '@ionic/angular'; +import { Router } from '@angular/router'; + + +@Component({ + selector: 'app-nav', + templateUrl: './nav.component.html', + styleUrls: ['./nav.component.scss'], + standalone: true, + imports: [IonicModule], + +}) +export class NavComponent implements OnInit { + + constructor(private router: Router) { } + + goHome() { + this.router.navigateByUrl('/home'); + } + + goAbout() { + this.router.navigateByUrl('/about'); + } + + goEducation() { + this.router.navigateByUrl('/education'); + } + + goLogin() { + this.router.navigateByUrl('/login'); + } + + goSignup() { + this.router.navigateByUrl('/signup'); + } + + goMeasure() { + this.router.navigateByUrl('/measure'); + } + + goQuiz() { + this.router.navigateByUrl('/quiz'); + } + + goStrategies() { + this.router.navigateByUrl('/strategies'); + } + + goTask() { + this.router.navigateByUrl('/task'); + } + + goTest() { + this.router.navigateByUrl('/test'); + } + + goResults() { + this.router.navigateByUrl('/results'); + } + + + + navigateTo(page: string) { + this.router.navigateByUrl('/' + page); + } + + ngOnInit() { + } +} diff --git a/client/src/app/quiz/quiz.module.ts b/client/src/app/quiz/quiz.module.ts index a05e492..4697247 100644 --- a/client/src/app/quiz/quiz.module.ts +++ b/client/src/app/quiz/quiz.module.ts @@ -8,13 +8,16 @@ import { QuizPageRoutingModule } from './quiz-routing.module'; import { QuizPage } from './quiz.page'; +import { NavComponent } from '../nav/nav.component'; + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - QuizPageRoutingModule + QuizPageRoutingModule, + NavComponent ], declarations: [QuizPage] }) -export class QuizPageModule {} +export class QuizPageModule { } diff --git a/client/src/app/quiz/quiz.page.html b/client/src/app/quiz/quiz.page.html index 7e21293..1607425 100644 --- a/client/src/app/quiz/quiz.page.html +++ b/client/src/app/quiz/quiz.page.html @@ -1,29 +1,3 @@ - - - - Home - -
    Home
    -
    - - - Education - -
    Cog Load Page
    -
    Strategies
    -
    Measure
    -
    - - - Quiz - -
    Quiz - Builder
    -
    New Task
    -
    Quiz - Task Load
    -
    Quiz - Results
    -
    -
    - Quiz @@ -31,30 +5,30 @@ - - - - *QUESTION TYPE / QUESTION TIME* - - - - *GENERATED QUESTION TYPE* - - + - + + + {{taskName}} + -> + +
    +

    {{question.text}}

    + + 1 + 10 + +
    +
    + SAVE + +
    -
    + \ No newline at end of file diff --git a/client/src/app/quiz/quiz.page.scss b/client/src/app/quiz/quiz.page.scss index bd42840..a171241 100644 --- a/client/src/app/quiz/quiz.page.scss +++ b/client/src/app/quiz/quiz.page.scss @@ -1,55 +1,45 @@ -/* Navigation Styles */ +ion-range::part(tick) { + background: #a2d2ff; +} + +ion-range::part(tick-active) { + background: #bde0fe; +} + +ion-range::part(pin) { + display: inline-flex; + align-items: center; + justify-content: center; + + background: #fff; + color: #000000; + + border-radius: 50%; + transform: scale(1.01); + + top: -20px; + + min-width: 28px; + height: 28px; + transition: transform 120ms ease, background 120ms ease; +} +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; +} +ion-range::part(pin)::before { + content: none; +} + +ion-range::part(knob) { + background: #fff; +} -ion-accordion { - font-family: Arial, sans-serif; - font: 16px bold; - color: #f4f4f4; - +ion-range::part(bar) { + background: #a2d2ff; } -ion-range { - // Styles for the range component here - - ion-range::part(tick) { - background: #a2d2ff; - - } - - ion-range::part(tick-active) { - background: #bde0fe; - } - - ion-range::part(pin) { - display: inline-flex; - align-items: center; - justify-content: center; - - background: #ffafcc; - color: #fff; - - border-radius: 50%; - transform: scale(1.01); - - top: -20px; - - min-width: 28px; - height: 28px; - transition: transform 120ms ease, background 120ms ease; - } - - ion-range::part(pin)::before { - content: none; - } - - ion-range::part(knob) { - background: #ffc8dd; - } - - ion-range::part(bar) { - background: #a2d2ff; - } - - ion-range::part(bar-active) { - background: #bde0fe; - } - } \ No newline at end of file +ion-range::part(bar-active) { + background: #bde0fe; +} \ No newline at end of file diff --git a/client/src/app/quiz/quiz.page.ts b/client/src/app/quiz/quiz.page.ts index e9ef63d..1014ac1 100644 --- a/client/src/app/quiz/quiz.page.ts +++ b/client/src/app/quiz/quiz.page.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { AnswerDataService } from '../services/answer-data.service'; @Component({ selector: 'app-quiz', @@ -6,8 +7,72 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./quiz.page.scss'], }) export class QuizPage implements OnInit { + userID: string = '1'; + taskID: string = '1'; + + formData: any = {}; + + getFormData() { + const currentDate = new Date(); + const year = currentDate.getFullYear(); + const month = String(currentDate.getMonth() + 1).padStart(2, '0'); + const day = String(currentDate.getDate()).padStart(2, '0'); + const hours = String(currentDate.getHours()).padStart(2, '0'); + const minutes = String(currentDate.getMinutes()).padStart(2, '0'); + const seconds = String(currentDate.getSeconds()).padStart(2, '0'); + + this.formData = { + taskAnswer_1: this.questions[0].answer, + taskAnswer_2: this.questions[1].answer, + taskAnswer_3: this.questions[2].answer, + taskAnswer_4: this.questions[3].answer, + taskAnswer_5: this.questions[4].answer, + taskAnswer_6: this.questions[5].answer, + taskScoreTotal: this.questions.reduce((total, question) => total + question.answer, 0), + dateTaken: `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`, + userID: this.userID, + taskID: this.taskID, + }; + + console.log(this.formData) + + this.answerDataService.postData(this.formData).subscribe({ + next: response => console.log('Response from server:', response), + error: error => console.error('Error:', error) + }); + } + + constructor(private answerDataService: AnswerDataService) { } + + taskName: string = 'Task Name'; + + questions: any[] = [ + { + text: 'Mental Demand - How much mental and perceptual activity was required? Was the task easy or demanding, simple or complex?', + answer: 1 + }, + { + text: 'Physical Demand - How much physical activity was required? Was the task easy or demanding, slack or strenuous?', + answer: 1 + }, + { + text: 'Temporal Demand - How much time pressure did you feel due to the pace at which the tasks or task elements occurred? Was the pace slow or rapid?', + answer: 1 + }, + { + text: 'Own Performance - How successful were you in performing the task? How satisfied were you with your performance?', + answer: 1 + }, + { + text: 'Effort - How hard did you have to work (mentally and physically) to accomplish your level of performance?', + answer: 1 + }, + { + text: 'Frustration Level - How irritated, stressed, and annoyed versus content, relaxed, and complacent did you feel during the task?', + answer: 1 + }, + ]; - constructor() { } ngOnInit() { } diff --git a/client/src/app/results/results-routing.module.ts b/client/src/app/results/results-routing.module.ts new file mode 100644 index 0000000..3a264b4 --- /dev/null +++ b/client/src/app/results/results-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { ResultsPage } from './results.page'; + +const routes: Routes = [ + { + path: '', + component: ResultsPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class ResultsPageRoutingModule {} diff --git a/client/src/app/results/results.module.ts b/client/src/app/results/results.module.ts new file mode 100644 index 0000000..c0293b9 --- /dev/null +++ b/client/src/app/results/results.module.ts @@ -0,0 +1,22 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { ResultsPageRoutingModule } from './results-routing.module'; + +import { ResultsPage } from './results.page'; +import { NavComponent } from '../nav/nav.component'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + ResultsPageRoutingModule, + NavComponent + ], + declarations: [ResultsPage] +}) +export class ResultsPageModule { } diff --git a/client/src/app/results/results.page.html b/client/src/app/results/results.page.html new file mode 100644 index 0000000..234e018 --- /dev/null +++ b/client/src/app/results/results.page.html @@ -0,0 +1,30 @@ + + + Results + + + + + + See Your Past Results + + + Task ID: {{ demoResult.taskID }} + Answer ID: {{ demoResult.answerID }} + Mental Demand: {{ demoResult.taskAnswer_1 }} + Physical Demand: {{ demoResult.answerID }} + Time (Temporal) Demand: {{ demoResult.answerID }} + Self Performance: {{ demoResult.answerID }} + Effort: {{ demoResult.answerID }} + Frustration Level: {{ demoResult.answerID }} + + + + + View Your Tasks + + Task ID: {{ demoResult.taskID }} + + + Take a New Quiz + \ No newline at end of file diff --git a/client/src/app/results/results.page.scss b/client/src/app/results/results.page.scss new file mode 100644 index 0000000..0bf84bf --- /dev/null +++ b/client/src/app/results/results.page.scss @@ -0,0 +1,5 @@ +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; +} \ No newline at end of file diff --git a/client/src/app/results/results.page.spec.ts b/client/src/app/results/results.page.spec.ts new file mode 100644 index 0000000..a478065 --- /dev/null +++ b/client/src/app/results/results.page.spec.ts @@ -0,0 +1,17 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ResultsPage } from './results.page'; + +describe('ResultsPage', () => { + let component: ResultsPage; + let fixture: ComponentFixture; + + beforeEach(async(() => { + fixture = TestBed.createComponent(ResultsPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/client/src/app/results/results.page.ts b/client/src/app/results/results.page.ts new file mode 100644 index 0000000..4494740 --- /dev/null +++ b/client/src/app/results/results.page.ts @@ -0,0 +1,42 @@ +import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; + +@Component({ + selector: 'app-results', + templateUrl: './results.page.html', + styleUrls: ['./results.page.scss'], +}) +export class ResultsPage implements OnInit { + results: any; + demoResults = [ + { + "answerID": 10, "taskAnswer_1": 5, "taskAnswer_2": 5, "taskAnswer_3": 5, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 30, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 1 + }, + { + "answerID": 11, "taskAnswer_1": 4, "taskAnswer_2": 5, "taskAnswer_3": 4, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 28, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 1 + }, + { + "answerID": 10, "taskAnswer_1": 5, "taskAnswer_2": 5, "taskAnswer_3": 5, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 30, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 3 + }, + { + "answerID": 11, "taskAnswer_1": 4, "taskAnswer_2": 5, "taskAnswer_3": 4, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 28, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 3 + }, + { + "answerID": 10, "taskAnswer_1": 5, "taskAnswer_2": 5, "taskAnswer_3": 5, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 30, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 4 + }, + { + "answerID": 11, "taskAnswer_1": 4, "taskAnswer_2": 5, "taskAnswer_3": 4, "taskAnswer_4": 5, "taskAnswer_5": 5, "taskAnswer_6": 5, "taskScore": 28, "dateTaken": "2023-05-15 11:30:00", "userID": 1, "taskID": 4 + }, + ] + + + constructor(private router: Router) { } + + goQuiz() { + this.router.navigateByUrl('/quiz'); + } + + ngOnInit() { + } + +} diff --git a/client/src/app/services/user-data.service.ts b/client/src/app/services/user-data.service.ts index 2253cd3..b5846d8 100644 --- a/client/src/app/services/user-data.service.ts +++ b/client/src/app/services/user-data.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { HttpHeaders, HttpParams } from '@angular/common/http'; +import { Router } from '@angular/router'; @Injectable({ @@ -11,7 +12,7 @@ export class UserDataService { private url = 'https://www.brain-lift.org/brain-lift/server/api/user/'; - constructor(private http: HttpClient) { } + constructor(private http: HttpClient, private router: Router) { } getData(): Observable { return this.http.get(this.url); @@ -38,6 +39,12 @@ export class UserDataService { updateData(formData: any): Observable { + // // check for sessionID or send to login page + // const loggedIn = sessionStorage.getItem('sessionID'); + // if (!loggedIn) { + // this.router.navigateByUrl('/login'); + // } + const updateUrl = `${this.url}/update/`; const httpOptions = { diff --git a/client/src/app/signup/signup.module.ts b/client/src/app/signup/signup.module.ts index 295034b..950dd39 100644 --- a/client/src/app/signup/signup.module.ts +++ b/client/src/app/signup/signup.module.ts @@ -8,13 +8,17 @@ import { SignupPageRoutingModule } from './signup-routing.module'; import { SignupPage } from './signup.page'; +import { NavComponent } from '../nav/nav.component'; + + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - SignupPageRoutingModule + SignupPageRoutingModule, + NavComponent ], declarations: [SignupPage] }) -export class SignupPageModule {} +export class SignupPageModule { } diff --git a/client/src/app/signup/signup.page.html b/client/src/app/signup/signup.page.html index f8384bb..d42a99f 100644 --- a/client/src/app/signup/signup.page.html +++ b/client/src/app/signup/signup.page.html @@ -1,3 +1,5 @@ + + Sign Up @@ -5,16 +7,22 @@ - - Email (Username) - - +
    + + + + Email (Username) + + + + + Password + + - - Password - - + Sign Up +

    {{ errorMessage }}

    +
    - Sign Up -

    {{ errorMessage }}

    +
    \ No newline at end of file diff --git a/client/src/app/signup/signup.page.scss b/client/src/app/signup/signup.page.scss index e69de29..0bf84bf 100644 --- a/client/src/app/signup/signup.page.scss +++ b/client/src/app/signup/signup.page.scss @@ -0,0 +1,5 @@ +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; +} \ No newline at end of file diff --git a/client/src/app/strategies/strategies.module.ts b/client/src/app/strategies/strategies.module.ts index 10b3b04..783e6c0 100644 --- a/client/src/app/strategies/strategies.module.ts +++ b/client/src/app/strategies/strategies.module.ts @@ -8,13 +8,17 @@ import { StrategiesPageRoutingModule } from './strategies-routing.module'; import { StrategiesPage } from './strategies.page'; +import { NavComponent } from '../nav/nav.component'; + + @NgModule({ imports: [ CommonModule, FormsModule, IonicModule, - StrategiesPageRoutingModule + StrategiesPageRoutingModule, + NavComponent ], declarations: [StrategiesPage] }) -export class StrategiesPageModule {} +export class StrategiesPageModule { } diff --git a/client/src/app/strategies/strategies.page.html b/client/src/app/strategies/strategies.page.html index 6b0e612..6450b6f 100644 --- a/client/src/app/strategies/strategies.page.html +++ b/client/src/app/strategies/strategies.page.html @@ -1,65 +1,376 @@ - - - - Home - -
    Home
    -
    - - - Education - -
    Cog Load Page
    -
    Strategies
    -
    Measure
    -
    - - - Quiz - -
    Quiz - Builder
    -
    New Task
    -
    Quiz - Task Load
    -
    Quiz - Results
    -
    -
    - - + + + Strategies + + + + + + + + + + Preventing Cognitive Overload + + + Preventing cognitive overload is certainly harder than it sounds. + There are a few ways to help deal with overload, but be sure to consult with a therapist or psychiatrist before + relying on any of these methods. These methods are provided as a sample to help those in the moment, and is not to + be substituted for health advice. + + + + + + Tips for Intrinsic Load + + + + + + + + + Chunking + + + Split up a task into smaller parts + + + + Chunking describes the strategy of splitting up a single task into smaller, more manageable chunks. + By grouping related pieces of information together, individuals can reduce cognitive load and enhance + their ability to process and retain information effectively. Chunking helps simplify complex tasks by + organizing them into manageable and interconnected parts, making it easier to remember and execute the + individual steps involved. It facilitates efficiency, pattern recognition, and problem-solving by + promoting a more streamlined approach to task execution. + + + + + + + + + Sequencing + + + Split up a task in a + specific order to complete it + + + + + Sequencing refers to the logical order and arrangement of steps or actions in a process or task. It + involves breaking down a complex task into smaller, manageable steps that need to be performed in a + specific order to achieve the desired outcome. Sequencing helps ensure that each step is + completed before + moving on to the next, ensuring efficiency, accuracy, and successful completion of the task. Whether it's + in activities like laundry or cooking, sequencing plays a crucial role in organizing the workflow, + maintaining consistency, and achieving optimal results. + + + + + + + + + Scaffolding + + + Using aids to lessen cognitive effort needed to complete the task + + + + Scaffolding can take different forms, such as verbal instructions, visual aids, demonstrations, or + physical assistance. The goal of scaffolding is to gradually reduce support as as time goes on. It serves + as a temporary framework that assists individuals in acquiring and refining the necessary skills to + perform tasks effectively and autonomously. + + + + + + + + + Tips for Extraneous Load + + + + + + + + + Simplification + + + Modify your goals to support the cognitive load framework + + + + Keep things simple. Modify your existing goals to support the cognitive load framework, and base your + success on + how well you are accomplishing preventing cognitive overload or slowly gaining independence in the task. + Write + your goals to gradually reduce extraneous demands on your mental resources. + + + + + + + + Therapy + + + Provides a supportive and safe environment for individuals to explore their thoughts, emotions, and + behaviors + + + + Therapy can provide a supportive and safe environment for individuals to explore their thoughts, emotions, + and + behaviors, leading to increased self-awareness, improved coping skills, and enhanced overall mental + well-being. + + + + + + + + Medication + + + Can help alleviate symptoms, restore chemical imbalances in the brain, and improve overall quality of + life + + + + For those with mental illness, psychiatric medication can help alleviate symptoms, restore chemical + imbalances + in the brain, and improve overall quality of life by reducing distress and promoting stability. + + + + + + + + + Tips for Germane Load + + + + + Reflection + + + Thinking about tasks and events in advance and after completion + + + + Reflection is a powerful tool for managing cognitive load. Thinking about tasks and experiences lets us gain + insight into our thinking processes, identify areas of improvement, and make adjustments for more efficient + cognitive functioning. By reflecting on our performance, we think about an experience or task outside of the + event, helping us to identify and to distinguish between the hard parts of a task and the easy parts. It helps us + be strategic with our cognitive effort, and it can help us decrease overall cognitive load. Reflection also + provides an opportunity to really understand ourselves and our challenges, all while preparing for the future. + + + + + Interweaving + + + + + + + + Task Switching + + + Interweave different tasks within a single session + + + + Instead of completing one ADL entirely before moving on to the next, you can interweave different tasks + within a single session. For example, you can switch between folding laundry, preparing a meal, and + organizing your workspace, allowing your brain to transition between different activities and engage with + varied cognitive demands. + + + + + + + + + Multitasking with Intention + + + Combining activities strategically to make the most of your time + + + + While multitasking can sometimes lead to decreased productivity, interweaving tasks with intention can be + beneficial. For instance, while waiting for water to boil on the stove, you can use that time to wash a + few dishes or sort through your mail. By combining activities strategically, you can make the most of your + time and accomplish multiple tasks simultaneously. + + + + + + + + Sequential Overlapping + + + Overlap steps or actions in different tasks + + + + Instead of completing each ADL in isolation, look for opportunities to overlap steps or actions. For + instance, while cooking, you can start a load of laundry and let it run in the background while you + continue with meal preparation. This way, you're interweaving different tasks and utilizing time and + resources more effectively. + + + + + + + + + + + Dealing with Cognitive Overload + Emotional Freedom Techniques (EFT) + +
      +
    1. + Establish a phrase accepting yourself specific the problem you're facing +
    2. +
        +
      • "While I am hearing voices, I know the voices aren't real."
      • +
      • "While I am feeling very sad, I know the sad feelings are temporary."
      • +
      • "Even though this is happening, I know I will get through it"
      • +
      +
    3. Now, tap each of the following points seven (7) times.
    4. +
      Start with the side of your hand.
      +
        +
      1. + Side of hand opposite of your thumb. +
      2. +
      3. In between your eyebrows
      4. +
      5. End of your right eyebrow
      6. +
      7. Under your right eye
      8. +
      9. Right under your nose
      10. +
      11. In between your mouth and your chin
      12. +
      13. To the right of your upper sternum
      14. +
      15. Under your right armpit
      16. +
      17. Back to in between your eyebrows
      18. + + +
      +
    5. + Starting with the side of your hand opposite your thumb, tap each point seven times. +
    6. + +
    +
    + +
    + + + + Eye Movement Desensitization and Reprocessing +

    + EMDR therapy is a method used to help people deal with difficult memories and experiences that may be causing + emotional distress. While it's typically done with a trained therapist, there's a simplified technique you can try + at home called the "Butterfly Hug." Here's how you can do it: +

    +
      +
    1. + Sit comfortably and take a few deep breaths to relax. +
    2. +
    3. Cross your arms across your chest, with your hands resting lightly on your upper arms. +
    4. +
    5. Start tapping alternately with your right and left hands on your arms, like a butterfly's wings gently + fluttering. +
    6. +
    7. While tapping, bring to mind a specific memory or issue that's bothering you. It could be something that makes + you feel anxious, upset, or scared. +
    8. +
    9. Focus on the memory or issue and let the tapping continue for about 20-30 seconds. +
    10. +
    11. Take a deep breath and let it out slowly. +
    12. +
    13. Notice any thoughts, feelings, or sensations that arise during the process. +
    14. +
    + +

    + The idea behind this technique is that the bilateral tapping helps stimulate both sides of the brain, which can + aid + in processing and reducing the emotional intensity of the memory or issue. It's important to remember that this + simplified version may not be as effective as undergoing EMDR therapy with a trained professional, especially for + complex or severe issues. If you find that your distress persists or worsens, it's recommended to seek the help of + a + qualified mental health practitioner. +

    +
    + + + + + Education - Strategies - How to Prevent Cognitive Overload + How to Prevent Cognitive Overload - - - - + + + + - Strategies to deal with cognitive overload + Strategies to deal with cognitive overload - - -
    - -EFT -EMDR -DBT -CBT - -
    - -Forum for Tasks - -
    - - +
    + +
    + + EFT + EMDR + DBT + CBT + +
    + + Forum for Tasks + +
    + +

    Content

    -
    + -
    +
    + + - -

    © 2023 Cognitive Load App. All rights reserved.

    -
    + +

    © 2023 Cognitive Load App. All rights reserved.

    +
    \ No newline at end of file diff --git a/client/src/app/strategies/strategies.page.scss b/client/src/app/strategies/strategies.page.scss index b362da2..63ef411 100644 --- a/client/src/app/strategies/strategies.page.scss +++ b/client/src/app/strategies/strategies.page.scss @@ -1,39 +1,34 @@ -/* Navigation Styles */ - -ion-accordion { - font-family: Arial, sans-serif; - font: 16px bold; - color: #f4f4f4; - +ion-card, ion-title, ion-card-subtitle { + overflow: visible; + color: black; + text-align: center; } -/* Card Styles */ -ion-card { - --ion-item-border-color: #025E73; - --ion-item-background: #80A7BF; - --ion-text-color: #012E40; -} + // @media (max-width: 768px) { + // ion-grid { + // grid-template-columns: repeat(1, 1fr) !important; + // } + // } -ion-button { - --ion-item-border-color: #025E73; - --ion-item-background: #80A7BF; - --ion-text-color: #012E40; -} + // @media (min-width: 769px) { + // ion-grid { + // grid-template-columns: repeat(3, 1fr) !important; + // } + // } -ion-button.large { - --background: #025E73; - --ion-text-color: #012E40; -} + // ion-card { + // transition: transform 0.3s ease-in-out; + // } -/* Footer Styles */ -ion-footer { - margin-top: 50px; - background-color: #f4f4f4; - padding: 10px; -} - -ion-footer p { - font-size: 12px; - color: #888; -} - \ No newline at end of file + // ion-card:hover { + // transform: scale(1.05); + // } + + // ion-button { + // transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out; + // } + + // ion-button:hover { + // background-color: #dddddd; + // transform: scale(1.1); + // } diff --git a/client/src/app/task/task.module.ts b/client/src/app/task/task.module.ts index fb21ab4..773a76e 100644 --- a/client/src/app/task/task.module.ts +++ b/client/src/app/task/task.module.ts @@ -10,6 +10,8 @@ import { IonicModule } from '@ionic/angular'; import { TaskPageRoutingModule } from './task-routing.module'; import { TaskPage } from './task.page'; +import { NavComponent } from '../nav/nav.component'; + const routes: Routes = [ { @@ -24,8 +26,9 @@ const routes: Routes = [ FormsModule, ReactiveFormsModule, IonicModule, - TaskPageRoutingModule + TaskPageRoutingModule, + NavComponent ], declarations: [TaskPage] }) -export class TaskPageModule {} +export class TaskPageModule { } diff --git a/client/src/app/task/task.page.html b/client/src/app/task/task.page.html index 59242df..de89f62 100644 --- a/client/src/app/task/task.page.html +++ b/client/src/app/task/task.page.html @@ -1,53 +1,42 @@ - - - - Home - -
    Home
    -
    - - - Education - -
    Cog Load Page
    -
    Strategies
    -
    Measure
    -
    - - - Quiz - -
    Quiz - Builder
    -
    New Task
    -
    Quiz - Task Load
    -
    Quiz - Results
    -
    -
    - - + - - New Task - + New Task - - - -
    + + + + + + + + - Task Name - + Type a Task Name + - + + + + - Task Type - Type A - Type B - Type C + Choose or Type a Task Type + + + Intrinsic + Extraneous + Germane - + + Type a Task Type + + + + + + + + + Save Task + +
    \ No newline at end of file diff --git a/client/src/app/task/task.page.scss b/client/src/app/task/task.page.scss index 1194df4..279e56b 100644 --- a/client/src/app/task/task.page.scss +++ b/client/src/app/task/task.page.scss @@ -1,8 +1,6 @@ -/* Navigation Styles */ -ion-accordion { - font-family: Arial, sans-serif; - font: 16px bold; - color: #f4f4f4; - +ion-card, ion-title, ion-card-subtitle, ion-item { + overflow: visible; + color: black; + text-align: center; } \ No newline at end of file diff --git a/client/src/app/task/task.page.ts b/client/src/app/task/task.page.ts index 2bad34b..e52f9d5 100644 --- a/client/src/app/task/task.page.ts +++ b/client/src/app/task/task.page.ts @@ -1,23 +1,54 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup } from '@angular/forms'; - +import { TaskDataService } from '../services/task-data.service'; +import { Router } from '@angular/router'; @Component({ selector: 'app-task', templateUrl: './task.page.html', styleUrls: ['./task.page.scss'], }) export class TaskPage implements OnInit { - - taskForm: any - constructor() { } + taskForm = new FormGroup({ + taskName: new FormControl(''), + taskType: new FormControl(''), + taskTime: new FormControl(''), + userID: new FormControl(''), // todo + sessionID: new FormControl(''), // todo + }); + + constructor(private taskDataService: TaskDataService, private router: Router) { } ngOnInit() { } - selectTaskTime(time: any) { } - selectTaskType(type: any) { } + selectTaskTime(time: any) { + this.taskForm.controls['taskTime'].setValue(time); + } + + selectTaskType(type: any) { + this.taskForm.controls['taskType'].setValue(type); + } - + saveTask() { -} + // console.log(this.taskForm.value) + this.taskForm.value["sessionID"] = sessionStorage.getItem("sessionID") + this.taskForm.value["userID"] = sessionStorage.getItem("sessionID") + + const formData = { + "taskName": this.taskForm.value.taskName, + "taskType": this.taskForm.value.taskType, + "taskTime": this.taskForm.value.taskTime, + "userID": 1, + + // "userID": this.taskForm.value.userID, + // "sessionID": this.taskForm.value.sessionID + } + + this.taskDataService.postData(formData).subscribe({ + next: response => console.log('Response from server:', response), + error: error => console.error('Error:', error) + }); + } +} diff --git a/client/src/app/test/test.module.ts b/client/src/app/test/test.module.ts index e965001..de6465d 100644 --- a/client/src/app/test/test.module.ts +++ b/client/src/app/test/test.module.ts @@ -10,6 +10,8 @@ import { TestPage } from './test.page'; import { HttpClientModule } from '@angular/common/http'; +import { NavComponent } from '../nav/nav.component'; + @NgModule({ imports: [ @@ -18,6 +20,7 @@ import { HttpClientModule } from '@angular/common/http'; IonicModule, TestPageRoutingModule, HttpClientModule, + NavComponent ], declarations: [TestPage] }) diff --git a/client/src/app/test/test.page.html b/client/src/app/test/test.page.html index e7f34dd..cec2d67 100644 --- a/client/src/app/test/test.page.html +++ b/client/src/app/test/test.page.html @@ -1,29 +1,3 @@ - - - - Home - -
    Home
    -
    - - - Education - -
    Cog Load Page
    -
    Strategies
    -
    Measure
    -
    - - - Quiz - -
    Quiz - Builder
    -
    New Task
    -
    Quiz - Task Load
    -
    Quiz - Results
    -
    -
    - API Route Test Page @@ -31,6 +5,7 @@ + Task API Routes Get Task diff --git a/server/api/task/index.php b/server/api/task/index.php index 6630ef0..5b298ba 100644 --- a/server/api/task/index.php +++ b/server/api/task/index.php @@ -59,17 +59,16 @@ sanitizeRequestStrings(); $requestData = $_REQUEST; // Check if required data is provided - if (isset($requestData['taskName']) && isset($requestData['taskType']) && isset($requestData['taskTime']) && isset($requestData['userID'])) { + if (isset($requestData['taskName']) && isset($requestData['taskType']) && isset($requestData['userID'])) { // Insert the data into the table // Prepare and bind parameters for an insert query - $query = "INSERT INTO $table (taskName, taskType, taskTime, userID) VALUES (:value1, :value2, :value3, :value4)"; + $query = "INSERT INTO $table (taskName, taskType, userID) VALUES (:value1, :value2, :value3)"; $stmt = $db->prepare($query); $stmt->bindParam(':value1', $requestData['taskName']); $stmt->bindParam(':value2', $requestData['taskType']); - $stmt->bindParam(':value3', $requestData['taskTime']); - $stmt->bindParam(':value4', $requestData['userID']); + $stmt->bindParam(':value3', $requestData['userID']); $stmt->execute();