Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing error message when trying to create a citizen with a username already in use #471

Closed
melanieselman opened this issue Apr 29, 2020 · 1 comment · Fixed by #561
Closed
Labels
Good First Issue Usually small issues which does not take long to fix Priority: high High priority, its required to work Type: bug Bugs and other insects

Comments

@melanieselman
Copy link
Contributor

Describe the bug
When creating a new citizen with a username that is already used in another citizen, no error message is shown indicating the reason why the citizen can not be saved.

To Reproduce
Steps to reproduce the behavior:

  1. Go to screen where you can choose between citizens and add a new citizen.
  2. Click on create a citizen.
  3. Create a citizen with a specific username and save it.
  4. Create a new citizen with the same username.
  5. See how no error message is shown indicating that you are trying to create a citizen with an already existing username.

Expected behavior
An error message should show telling the user that they are trying to create a new citizen with an already existing username, and they should therefore choose a different username.

Actual behavior
It is not possible to save the citizen, but there is no error message telling you why.

@melanieselman melanieselman added Type: bug Bugs and other insects ReleaseFix labels Apr 29, 2020
@jbjarn17
Copy link
Contributor

I think this is related to issue #431

@T-Dawq T-Dawq added Priority: high High priority, its required to work Good First Issue Usually small issues which does not take long to fix labels May 5, 2020
@T-Dawq T-Dawq added this to Issues to do in 2020e 0. sprint May 26, 2020
@T-Dawq T-Dawq added this to the 2020eS0 milestone May 26, 2020
@ProgDaniel ProgDaniel moved this from Issues to do to Issues in progress in 2020e 0. sprint Sep 24, 2020
@Riasalit Riasalit moved this from Issues in progress to Pull requests in progress in 2020e 0. sprint Sep 28, 2020
@Riasalit Riasalit moved this from Pull requests in progress to Issues in progress in 2020e 0. sprint Sep 28, 2020
@Riasalit Riasalit moved this from Issues in progress to Pull requests in progress in 2020e 0. sprint Sep 29, 2020
2020e 0. sprint automation moved this from Pull requests in progress to Issues done Sep 30, 2020
LivHolm pushed a commit that referenced this issue Sep 30, 2020
* Created error messages for already existing users

created an error handler in new_citizen_screen.dart to handle errors from the client_api

* Added documentation for the exception handler

* Update new_citizen_screen.dart

removed dependency on a illagal variable, which which made the class not imutable

* Update new_citizen_screen.dart

fixed linting
Determinatoro added a commit that referenced this issue Dec 4, 2020
* Update package link (#554)

This organization has been renamed, and so the name is up for grabs. Currently, it still works because Github redirects to the renamed organization page, but if the old name is registered, the redirection will stop, and thus many tests will break. This update will ensure that the link won't break.

* Feature/562 Updates to unit tests (#564)

* Updated unit tests

* Update weekplans_bloc_test.dart

* FIxes for linter

* Feature 531: Pictogram title text no longer in all caps (#558)

* Pictogram text is no longer all caps

The first letter under every pictogram will now be upper case, while the rest will be lower case.

* Tests now work for pictogram test

Tests have been adjusted to correctly reflect the new changes and have been tested, so they fail when expected and succeed when expected.

* Fixed too long lines

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Feature/434 (#567)

* Update .gitignore

* Feature/434

* develop to feature/434 (#566)

* Update package link (#554)

This organization has been renamed, and so the name is up for grabs. Currently, it still works because Github redirects to the renamed organization page, but if the old name is registered, the redirection will stop, and thus many tests will break. This update will ensure that the link won't break.

* Feature/562 Updates to unit tests (#564)

* Updated unit tests

* Update weekplans_bloc_test.dart

* FIxes for linter

Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Jakob Precht <sporvogn@live.com>

* Update .gitignore

Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Jakob Precht <sporvogn@live.com>

* feature #471: Created error messages for already existing users (#561)

* Created error messages for already existing users

created an error handler in new_citizen_screen.dart to handle errors from the client_api

* Added documentation for the exception handler

* Update new_citizen_screen.dart

removed dependency on a illagal variable, which which made the class not imutable

* Update new_citizen_screen.dart

fixed linting

* Fixed issue 304 in weekplaner. Edited handleOnTapWeekPlanAdd in weekplan_selector_screen.dart (#560)

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>

* Feature 485: Created a new errorColor variable  (#557)

* made a errorColor variable with the standard error color for dart and used for a incorrectly colored text field

* Update routes.dart

Undid change to route

* Feature 527: Opacity changed to 40% on disabled buttons (#556)

* Opacity changed to 40% on disabled buttons

In the file lib/style/custom_color.dart the opacity for the disabled button has been changed from 65%(A6) to 40%(66), and the border has been changed from 100% opacity (FF) to 40% (66). The gradient has also been changed from 27% (46) to 40% (66).

* Update custom_color.dart

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Release 2020 S0 R1 (#578)

* Releasefix 570: Created class for converting Error codes to Danish messages (#574)

* Created class for converting Error codes to Danish messages

The class can be expanded with more of the error codes from the ErrorKey class such that it can be used with all comunication with the api_client

* added unit tests for creating new citizens

Also moved the error handling to the error code translater class for easier use when it needs to be implemented in more classes

* Added comments for some helper functions in the Widget tests

* Removed unused imports

* en test mere til at gøre code coverage glad

Den case burde den aldrig komme ind i normalvis, men nu er testen der i guess

* Removed another unused package

why linter no tell though?

* Releasefix 573: Username validation expanded in new_citizen_bloc.dart (#575)

* Username validation expanded in new_citizen_bloc.dart

Pull Request for #573
The _usernamevalidation method has been revised from blacklisting spaces only to a whitelist regex that contains only all letters, ÆØÅ, numbers, underscore( _ ) or a hyphen ( - )

The warning message under the text field has been updated to explain this change.

A test has been added to verify this feature in new_citizen_bloc_test.dart.

* Update new_citizen_screen.dart

missing letter in "tom"

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

* Update issue templates (#581)

Added "not prioritised" as default label

* Feature 535: Buggy "Fortryd" button on activity (#585)

* Updates local ActivityModel instance after changing state normal/cancelled

* Immutable fix

* Added a test

Added a test with when the activity is cancelled, then uncancelled and a timer is added.

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Feature 580: Newly added citizens appear in the choose citizen list immediately  (#590)

* Fixed import

* Fixed import

* Nu virker det endelig

* Make pretty and write comments

* Fix linting issues

* Fix linting issues 2!

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Refactoring of font sizes (#599)

* Refactoring of font sizes

Font sizes now have a document where they are defined. There was used a font size of 25 twice in upload_image_from_phone_screen which has been set to 24 so it's the same as the other places. Likewise the font size was set to 18 in weekplan_selector_screen and it's been set to 20 as in line with the rest of the app.

* Update font_size.dart

* Update weekplan_selector_screen.dart

* Update font_size.dart

* Feature/474: With a lot of activities on a single weekplan, a activity sometime jump back to the bottom when moved (#598)

* Changed activity order

* Changed activity order

Co-authored-by: Rikke Husted Østergaard <raster16@student.aau.dk>

* Feature 273: Users can delete pictograms they have created (#606)

* Can I push?

* Working tests

* delete function in pictogram block

* Delete button

* Delete button and dialog box

* Added delete button to pictograms

Delete buttons are only active on the users own pictograms

* Update pubspec

* Insert user in PictogramSearch

* Added Directionality to the stack Widget

* Insert user in PictogramSearch
Fix tests

* Fix linting issues

* Removed unnecessary comment

* Removed test segment

Co-authored-by: twaxlol <folese18@student.aau.dk>

* Revert "Feature 273: Users can delete pictograms they have created (#606)" (#611)

This reverts commit f8b6a1b.

* Feature/529: Guardians should be able to mark activities as complete like the citizens can (#602)

* Another button

* Complete activity button is rendered in guardian mode

* Removed containers and added proper padding

* Feature 514: Popped the context for the activity icon setting options. (#582)

* Popped the context for the activity icon setting options.

* Fixed import

* Create completed_activity_icon_selection_screen_test.dart

* Update completed_activity_icon_selection_screen_test.dart

* Refactor how completed activity setting is saved

* Fixed completed_activity_icon_selection_screen_test.dart test

* Fixed linting issues

* Update workflow flutter version

* Fix linting issues

* Refactor how settings are saved

* Test settings screens are popped

Co-authored-by: oliver <ossa18@student.aau.dk>
Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: twaxlol <45589745+twaxlol@users.noreply.github.com>

* Feature 499: Refactor to not use observable (#609)

* Observable is a bitch

* Observable is a bitch

* Fixed tests. No longer uses unmodifyable lists

* Fix linting issues !

* Force ImagePicker dependency to be lower than 0.6.7 as these versions deprecates a used function and the suggested solution does not work.

* Update github action flutter version

* Use develop branch of api_client

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature 273: User are able to delete pictograms they have created (#621)

* Can I push?

* Working tests

* delete function in pictogram block

* Delete button

* Delete button and dialog box

* Added delete button to pictograms

Delete buttons are only active on the users own pictograms

* Update pubspec

* Insert user in PictogramSearch

* Added Directionality to the stack Widget

* Insert user in PictogramSearch
Fix tests

* Fix linting issues

* Removed unnecessary comment

* Removed test segment

* Fix so pictogram delete button does not show up on pictogram field when making a new weekplan

* Delete button only show up on pictograms the current user has access to.
If delete should fail, a notify popup with an errormessage is shown.
Tests are added.

* Revert "Merge branch 'develop' into feature/273"

This reverts commit 9f933ec, reversing
changes made to 5424442.

* Revert "Revert "Merge branch 'develop' into feature/273""

This reverts commit f9122e1

* Fix Observable merge

* Fix error with fixed image size

Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>

* Changed background color of timer to white, when finished (#594)

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature 563: Activity screen buttons (Timer & Choiceboard) buttons now boxes instead of icons. (#596)

* Choiceboard card is now button + early testing of timer card button

The card containing "Tilføj ChoiceBoard" is now the button itself, rather than the plus icon below it

The Timer button is in testing to implement the same functionality as the ChoiceBoard button.

* Final iteration of activity screen buttons

The timer button on the activity screen will now properly "disable" (by making the highlight- and splashcolors invisible when tapped.)

* Reverted mistaken commit

* Update font value to default in _develop branch

* Compatability with #273 and linter fix

This commit adds a missing user parameter in the changed PictogramSearch method, as well as fixes a linting issue that clashed with GitHub Actions

* Feature 495: Changed pictogram box changes (#559)

* Changed pictogram box changes

The Issue was that some text was cut off when it spanned multiple lines, as the box size was static. this has been solved by allowing the pictogram box to be as high as the elements within and set the max amount of lines for the text to 2.

this made smaller words split into 2 lines, which was further solved by only allowing the text to be 1 line of only 1 word was present in the string.

* Update pictogram_text.dart

Now sets textlines to 2 if a word cant fit on one line

* Minimum Android APK changed from 16 (Jelly Bean) to 23 (Marshmallow) (#647)

minSdkVersion has been increased from 16 to 23, primarily to prevent a library warning with text relocations.

This is also due to Jelly Bean no longer being supported and is far too outdated to be worth.

* Feature/418 As a guardian i would like to be able to search for a specific weekplan so it is easier for me to find (#593)

* intermediate push

* more difficult than expected

* bump

* Someone take over please

* Functionality done - trying to fix a minor issue

* Fixed the minor issue

* Hotfix

* Dirty hotfix

* bump

* moar fixes

* All done

* bump

* Release prep

Tried fixing pubspec.lock - unsure why it changed.
Set the sdk version to be 2.1 as the develop branch.
Removed flutter_bloc depedency - again, not sure why it was added
Changed the SERVER_HOST to be the live server.

* Update pubspec.lock

* Update pubspec.lock

* Streams are dumb

* Ready to ship

Fixed issue with user not having any old week plans.
Changed the name of the `WeekPlansBloc` to `WeekPlanSelectorBloc` for better readability.
Fixed test.
Removed `Observable` class.
Updated SDK to 2.2.0 for set literals support.
Minor changes in a bunch of places from the name change of `WeekplanSelectorBloc`.

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Update environments.json

* Removed comments

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Trying to fix CI errors

Undid chages to pubspec.lock
Fixed linting isssues in various files: added const keywords and changed a deprecated function.

* Take 2

CI is using old versions - this should be fixed at some point.

* Update pubspec.lock

* Merge branch 'develop' into feature/418

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Update copy_resolve_screen_test.dart

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

Co-authored-by: Jeppe Krogh Laursen <jeppe.k.l.97@gmail.com>
Co-authored-by: JeppeKLau <44167691+JeppeKLau@users.noreply.github.com>

* Loading the first pictogram in the activity bloc (#650)

* Revert "Feature/418 As a guardian i would like to be able to search for a specific weekplan so it is easier for me to find (#593)" (#657)

This reverts commit d045b80.

* Feature 615: citizens can now open completed activities  (#651)

* Removed !

* Update weekplan_day_column.dart

* Reverted some changes

Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Fixed unit test errors (#661)

Fixed errors in copy_resolve_screen_test.dart
Fixed errors in show_activity_screen_test.dart
Fixed errors in weekplan_selector_screen_test.dart

* Feature/592: "Overståede Uger" includes current week (#663)

* Added some tests and beginning to design the algorithm

* It should work now, next is thorough testing

* Tested, and fixed edge cases

* Fixed linting stuff

* Long line in a comment

* Because GitHub CI couldn't find the file

* Because CI is still stupid

* Create Dates_with_weeks_2020_to_2030_semi.csv

* Mac os problem fixed

* stupid linting... again

Co-authored-by: Alexander Nykjær <alax0013@gmail.com>
Co-authored-by: Michelle Terpling <michelle@terpling.dk>

* Feature/595 Used MediaQuery to adjust the layout for all screens (upload_image_from_phone) (#655)

* made the

* Text and image overlflow fixed and code optimisation

Added MediaQuery to manage changes such as rotationg the screen and replaced the column with a widget that returns a container. This works for both tablet and mobile phone device

* minor

* Issue 595 clean code fix

beautifying and small changes

* Revert changes to gitignore, evviroment jason and pubspec

This reverts commit 4d5999e.

Co-authored-by: ChristofferAaen <cbaaen@live.dk>

* Feature/429.5 (#654)

* Fixed delay on erroneous login

* Merge develop into feature/429.5 (#653)

* Feature 495: Changed pictogram box changes (#559)

* Changed pictogram box changes

The Issue was that some text was cut off when it spanned multiple lines, as the box size was static. this has been solved by allowing the pictogram box to be as high as the elements within and set the max amount of lines for the text to 2.

this made smaller words split into 2 lines, which was further solved by only allowing the text to be 1 line of only 1 word was present in the string.

* Update pictogram_text.dart

Now sets textlines to 2 if a word cant fit on one line

* Minimum Android APK changed from 16 (Jelly Bean) to 23 (Marshmallow) (#647)

minSdkVersion has been increased from 16 to 23, primarily to prevent a library warning with text relocations.

This is also due to Jelly Bean no longer being supported and is far too outdated to be worth.

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

* Feature 538: No lingering weekplans when editing (#656)

* Reverted some changes

* Maybe not hacky

* Mere await

* Mere await

* Fix add new weekplan was counted

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature/371 (#664)

* not done yet

needs more

* small change

* unit test + flutter test

not done yet

* Flutter test of undo button (genoptag knap)

* Revert "small change"

This reverts commit aeb448f.

* Update weekplan_bloc.dart

Co-authored-by: myname <email@email.email>

* Weekplanner 668: Inconsistency in settings menu for citizens (#682)

* Fixed the issue

Added a null check. Also fixed some issues that had arisen due to conflicting pushes in earlier sprints, so the code is consistent.

* Linter

* Linter

* Linter

* Feature/540: Collapse "overståede uger" (#665)

* Update weekplan_selector_screen.dart

* Fixed button position

Also added a key for testing

* Incomplete test

* Test implemented

Test has been implemented and naming convention fix.

* Linter

* Fixed

* Update weekplan_selector_screen.dart

Co-authored-by: JohanKrogh <johan.krogh@gmail.com>

* Feature 683: Fixed server status check and made login async (#686)

* WIP: Make login actually async

* Fixed tests and status endpoint

* Login from popup async too

* Handle error right

* More correct error handling

* Check server status through api_client

* One comment

* Remove unnecessary method from test

* Specify types on wait

* Be completely sure about internet connection :)

* Remove library due to build errors

* oops

* Feature/592.5 (#685)

* Skipped a test instead of commenting it out

* Cleaned up the code, and fixed a small issue

The issue was that it made the calculations from a specific time of day, not at 00:00

* Linting

* Just a small rename

* Small speed up for December

* Split the current week algorithm into different methods, and cleaned up

* Linting

* Final refactor to something the we can actually explain to someone else

Removed unneeded tests

* Moved a method

* Moved a statement

* Removed unnecessary complication

* feature/696: Inconsistent buttons (#701)

* Inconsistent buttons

Only partly solved the issue.
The buttons now correctly remove the timer and add choiceboard options when marking an activity as completed as well as cancelled. Furthermore an isEnabled has been added to the cancel button, so it becomes disables when the state is completed.
The buttons however only become disabled, when you reenter the activity. This is due to the fact the other button does not check for a new state, when the first button is pressed and as such does not get the new state information, when an acitivty is completed or cancelled. There is not enough time to fix this before release, and as such only the most system breaking part of the bug has been fixed, as it would do some funky things, when trying to make a choiceboard on a completed activity.

* Update show_activity_screen.dart

Fixed missing Add Choiceboard on new activities

* Changed values for release (#706)

Co-authored-by: Frederik Spang <fthoms16@student.aau.dk>
Co-authored-by: Frederik Spang <frederik@progras.dk>
Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Rikke Husted Østergaard <raster16@student.aau.dk>
Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>
Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: Mostaan H <34608699+smh87@users.noreply.github.com>
Co-authored-by: Kristian Benny Winther Sørensen <43601483+kbwsoorensen@users.noreply.github.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>
Co-authored-by: Ane Søgaard Jørgensen <42242841+Kaliahh@users.noreply.github.com>
Co-authored-by: AdrianPlesner <33195961+AdrianPlesner@users.noreply.github.com>
Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>
Co-authored-by: LJensen0403 <44022936+LJensen0403@users.noreply.github.com>
Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: Liv Holm <43985985+LivHolm@users.noreply.github.com>
Co-authored-by: twaxlol <45589745+twaxlol@users.noreply.github.com>
Co-authored-by: Alexander <31063192+ggAlexS@users.noreply.github.com>
Co-authored-by: Jeppe Krogh Laursen <jeppe.k.l.97@gmail.com>
Co-authored-by: JeppeKLau <44167691+JeppeKLau@users.noreply.github.com>
Co-authored-by: JohanKrogh <johan.krogh1@gmail.com>
Co-authored-by: Alexander Nykjær <alax0013@gmail.com>
Co-authored-by: Michelle Terpling <michelle@terpling.dk>
Co-authored-by: ZohraAmini <amini.zohra.za@gmail.com>
Co-authored-by: ChristofferAaen <cbaaen@live.dk>
Co-authored-by: Emil7370 <43956069+Emil7370@users.noreply.github.com>
Co-authored-by: myname <email@email.email>
Co-authored-by: JohanKrogh <johan.krogh@gmail.com>
JakobFaarGreg pushed a commit that referenced this issue Oct 12, 2021
* Release/2020es3r1 (#707)

* Update package link (#554)

This organization has been renamed, and so the name is up for grabs. Currently, it still works because Github redirects to the renamed organization page, but if the old name is registered, the redirection will stop, and thus many tests will break. This update will ensure that the link won't break.

* Feature/562 Updates to unit tests (#564)

* Updated unit tests

* Update weekplans_bloc_test.dart

* FIxes for linter

* Feature 531: Pictogram title text no longer in all caps (#558)

* Pictogram text is no longer all caps

The first letter under every pictogram will now be upper case, while the rest will be lower case.

* Tests now work for pictogram test

Tests have been adjusted to correctly reflect the new changes and have been tested, so they fail when expected and succeed when expected.

* Fixed too long lines

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Feature/434 (#567)

* Update .gitignore

* Feature/434

* develop to feature/434 (#566)

* Update package link (#554)

This organization has been renamed, and so the name is up for grabs. Currently, it still works because Github redirects to the renamed organization page, but if the old name is registered, the redirection will stop, and thus many tests will break. This update will ensure that the link won't break.

* Feature/562 Updates to unit tests (#564)

* Updated unit tests

* Update weekplans_bloc_test.dart

* FIxes for linter

Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Jakob Precht <sporvogn@live.com>

* Update .gitignore

Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Jakob Precht <sporvogn@live.com>

* feature #471: Created error messages for already existing users (#561)

* Created error messages for already existing users

created an error handler in new_citizen_screen.dart to handle errors from the client_api

* Added documentation for the exception handler

* Update new_citizen_screen.dart

removed dependency on a illagal variable, which which made the class not imutable

* Update new_citizen_screen.dart

fixed linting

* Fixed issue 304 in weekplaner. Edited handleOnTapWeekPlanAdd in weekplan_selector_screen.dart (#560)

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>

* Feature 485: Created a new errorColor variable  (#557)

* made a errorColor variable with the standard error color for dart and used for a incorrectly colored text field

* Update routes.dart

Undid change to route

* Feature 527: Opacity changed to 40% on disabled buttons (#556)

* Opacity changed to 40% on disabled buttons

In the file lib/style/custom_color.dart the opacity for the disabled button has been changed from 65%(A6) to 40%(66), and the border has been changed from 100% opacity (FF) to 40% (66). The gradient has also been changed from 27% (46) to 40% (66).

* Update custom_color.dart

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Release 2020 S0 R1 (#578)

* Releasefix 570: Created class for converting Error codes to Danish messages (#574)

* Created class for converting Error codes to Danish messages

The class can be expanded with more of the error codes from the ErrorKey class such that it can be used with all comunication with the api_client

* added unit tests for creating new citizens

Also moved the error handling to the error code translater class for easier use when it needs to be implemented in more classes

* Added comments for some helper functions in the Widget tests

* Removed unused imports

* en test mere til at gøre code coverage glad

Den case burde den aldrig komme ind i normalvis, men nu er testen der i guess

* Removed another unused package

why linter no tell though?

* Releasefix 573: Username validation expanded in new_citizen_bloc.dart (#575)

* Username validation expanded in new_citizen_bloc.dart

Pull Request for #573
The _usernamevalidation method has been revised from blacklisting spaces only to a whitelist regex that contains only all letters, ÆØÅ, numbers, underscore( _ ) or a hyphen ( - )

The warning message under the text field has been updated to explain this change.

A test has been added to verify this feature in new_citizen_bloc_test.dart.

* Update new_citizen_screen.dart

missing letter in "tom"

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

* Update issue templates (#581)

Added "not prioritised" as default label

* Feature 535: Buggy "Fortryd" button on activity (#585)

* Updates local ActivityModel instance after changing state normal/cancelled

* Immutable fix

* Added a test

Added a test with when the activity is cancelled, then uncancelled and a timer is added.

Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>

* Feature 580: Newly added citizens appear in the choose citizen list immediately  (#590)

* Fixed import

* Fixed import

* Nu virker det endelig

* Make pretty and write comments

* Fix linting issues

* Fix linting issues 2!

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Refactoring of font sizes (#599)

* Refactoring of font sizes

Font sizes now have a document where they are defined. There was used a font size of 25 twice in upload_image_from_phone_screen which has been set to 24 so it's the same as the other places. Likewise the font size was set to 18 in weekplan_selector_screen and it's been set to 20 as in line with the rest of the app.

* Update font_size.dart

* Update weekplan_selector_screen.dart

* Update font_size.dart

* Feature/474: With a lot of activities on a single weekplan, a activity sometime jump back to the bottom when moved (#598)

* Changed activity order

* Changed activity order

Co-authored-by: Rikke Husted Østergaard <raster16@student.aau.dk>

* Feature 273: Users can delete pictograms they have created (#606)

* Can I push?

* Working tests

* delete function in pictogram block

* Delete button

* Delete button and dialog box

* Added delete button to pictograms

Delete buttons are only active on the users own pictograms

* Update pubspec

* Insert user in PictogramSearch

* Added Directionality to the stack Widget

* Insert user in PictogramSearch
Fix tests

* Fix linting issues

* Removed unnecessary comment

* Removed test segment

Co-authored-by: twaxlol <folese18@student.aau.dk>

* Revert "Feature 273: Users can delete pictograms they have created (#606)" (#611)

This reverts commit f8b6a1b.

* Feature/529: Guardians should be able to mark activities as complete like the citizens can (#602)

* Another button

* Complete activity button is rendered in guardian mode

* Removed containers and added proper padding

* Feature 514: Popped the context for the activity icon setting options. (#582)

* Popped the context for the activity icon setting options.

* Fixed import

* Create completed_activity_icon_selection_screen_test.dart

* Update completed_activity_icon_selection_screen_test.dart

* Refactor how completed activity setting is saved

* Fixed completed_activity_icon_selection_screen_test.dart test

* Fixed linting issues

* Update workflow flutter version

* Fix linting issues

* Refactor how settings are saved

* Test settings screens are popped

Co-authored-by: oliver <ossa18@student.aau.dk>
Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: twaxlol <45589745+twaxlol@users.noreply.github.com>

* Feature 499: Refactor to not use observable (#609)

* Observable is a bitch

* Observable is a bitch

* Fixed tests. No longer uses unmodifyable lists

* Fix linting issues !

* Force ImagePicker dependency to be lower than 0.6.7 as these versions deprecates a used function and the suggested solution does not work.

* Update github action flutter version

* Use develop branch of api_client

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature 273: User are able to delete pictograms they have created (#621)

* Can I push?

* Working tests

* delete function in pictogram block

* Delete button

* Delete button and dialog box

* Added delete button to pictograms

Delete buttons are only active on the users own pictograms

* Update pubspec

* Insert user in PictogramSearch

* Added Directionality to the stack Widget

* Insert user in PictogramSearch
Fix tests

* Fix linting issues

* Removed unnecessary comment

* Removed test segment

* Fix so pictogram delete button does not show up on pictogram field when making a new weekplan

* Delete button only show up on pictograms the current user has access to.
If delete should fail, a notify popup with an errormessage is shown.
Tests are added.

* Revert "Merge branch 'develop' into feature/273"

This reverts commit 9f933ec, reversing
changes made to 5424442.

* Revert "Revert "Merge branch 'develop' into feature/273""

This reverts commit f9122e1

* Fix Observable merge

* Fix error with fixed image size

Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>

* Changed background color of timer to white, when finished (#594)

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature 563: Activity screen buttons (Timer & Choiceboard) buttons now boxes instead of icons. (#596)

* Choiceboard card is now button + early testing of timer card button

The card containing "Tilføj ChoiceBoard" is now the button itself, rather than the plus icon below it

The Timer button is in testing to implement the same functionality as the ChoiceBoard button.

* Final iteration of activity screen buttons

The timer button on the activity screen will now properly "disable" (by making the highlight- and splashcolors invisible when tapped.)

* Reverted mistaken commit

* Update font value to default in _develop branch

* Compatability with #273 and linter fix

This commit adds a missing user parameter in the changed PictogramSearch method, as well as fixes a linting issue that clashed with GitHub Actions

* Feature 495: Changed pictogram box changes (#559)

* Changed pictogram box changes

The Issue was that some text was cut off when it spanned multiple lines, as the box size was static. this has been solved by allowing the pictogram box to be as high as the elements within and set the max amount of lines for the text to 2.

this made smaller words split into 2 lines, which was further solved by only allowing the text to be 1 line of only 1 word was present in the string.

* Update pictogram_text.dart

Now sets textlines to 2 if a word cant fit on one line

* Minimum Android APK changed from 16 (Jelly Bean) to 23 (Marshmallow) (#647)

minSdkVersion has been increased from 16 to 23, primarily to prevent a library warning with text relocations.

This is also due to Jelly Bean no longer being supported and is far too outdated to be worth.

* Feature/418 As a guardian i would like to be able to search for a specific weekplan so it is easier for me to find (#593)

* intermediate push

* more difficult than expected

* bump

* Someone take over please

* Functionality done - trying to fix a minor issue

* Fixed the minor issue

* Hotfix

* Dirty hotfix

* bump

* moar fixes

* All done

* bump

* Release prep

Tried fixing pubspec.lock - unsure why it changed.
Set the sdk version to be 2.1 as the develop branch.
Removed flutter_bloc depedency - again, not sure why it was added
Changed the SERVER_HOST to be the live server.

* Update pubspec.lock

* Update pubspec.lock

* Streams are dumb

* Ready to ship

Fixed issue with user not having any old week plans.
Changed the name of the `WeekPlansBloc` to `WeekPlanSelectorBloc` for better readability.
Fixed test.
Removed `Observable` class.
Updated SDK to 2.2.0 for set literals support.
Minor changes in a bunch of places from the name change of `WeekplanSelectorBloc`.

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Update environments.json

* Removed comments

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Trying to fix CI errors

Undid chages to pubspec.lock
Fixed linting isssues in various files: added const keywords and changed a deprecated function.

* Take 2

CI is using old versions - this should be fixed at some point.

* Update pubspec.lock

* Merge branch 'develop' into feature/418

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

* Update copy_resolve_screen_test.dart

Co-Authored-By: Alexander <31063192+ggAlexS@users.noreply.github.com>

Co-authored-by: Jeppe Krogh Laursen <jeppe.k.l.97@gmail.com>
Co-authored-by: JeppeKLau <44167691+JeppeKLau@users.noreply.github.com>

* Loading the first pictogram in the activity bloc (#650)

* Revert "Feature/418 As a guardian i would like to be able to search for a specific weekplan so it is easier for me to find (#593)" (#657)

This reverts commit d045b80.

* Feature 615: citizens can now open completed activities  (#651)

* Removed !

* Update weekplan_day_column.dart

* Reverted some changes

Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Fixed unit test errors (#661)

Fixed errors in copy_resolve_screen_test.dart
Fixed errors in show_activity_screen_test.dart
Fixed errors in weekplan_selector_screen_test.dart

* Feature/592: "Overståede Uger" includes current week (#663)

* Added some tests and beginning to design the algorithm

* It should work now, next is thorough testing

* Tested, and fixed edge cases

* Fixed linting stuff

* Long line in a comment

* Because GitHub CI couldn't find the file

* Because CI is still stupid

* Create Dates_with_weeks_2020_to_2030_semi.csv

* Mac os problem fixed

* stupid linting... again

Co-authored-by: Alexander Nykjær <alax0013@gmail.com>
Co-authored-by: Michelle Terpling <michelle@terpling.dk>

* Feature/595 Used MediaQuery to adjust the layout for all screens (upload_image_from_phone) (#655)

* made the

* Text and image overlflow fixed and code optimisation

Added MediaQuery to manage changes such as rotationg the screen and replaced the column with a widget that returns a container. This works for both tablet and mobile phone device

* minor

* Issue 595 clean code fix

beautifying and small changes

* Revert changes to gitignore, evviroment jason and pubspec

This reverts commit 4d5999e.

Co-authored-by: ChristofferAaen <cbaaen@live.dk>

* Feature/429.5 (#654)

* Fixed delay on erroneous login

* Merge develop into feature/429.5 (#653)

* Feature 495: Changed pictogram box changes (#559)

* Changed pictogram box changes

The Issue was that some text was cut off when it spanned multiple lines, as the box size was static. this has been solved by allowing the pictogram box to be as high as the elements within and set the max amount of lines for the text to 2.

this made smaller words split into 2 lines, which was further solved by only allowing the text to be 1 line of only 1 word was present in the string.

* Update pictogram_text.dart

Now sets textlines to 2 if a word cant fit on one line

* Minimum Android APK changed from 16 (Jelly Bean) to 23 (Marshmallow) (#647)

minSdkVersion has been increased from 16 to 23, primarily to prevent a library warning with text relocations.

This is also due to Jelly Bean no longer being supported and is far too outdated to be worth.

Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>

* Feature 538: No lingering weekplans when editing (#656)

* Reverted some changes

* Maybe not hacky

* Mere await

* Mere await

* Fix add new weekplan was counted

Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>

* Feature/371 (#664)

* not done yet

needs more

* small change

* unit test + flutter test

not done yet

* Flutter test of undo button (genoptag knap)

* Revert "small change"

This reverts commit aeb448f.

* Update weekplan_bloc.dart

Co-authored-by: myname <email@email.email>

* Weekplanner 668: Inconsistency in settings menu for citizens (#682)

* Fixed the issue

Added a null check. Also fixed some issues that had arisen due to conflicting pushes in earlier sprints, so the code is consistent.

* Linter

* Linter

* Linter

* Feature/540: Collapse "overståede uger" (#665)

* Update weekplan_selector_screen.dart

* Fixed button position

Also added a key for testing

* Incomplete test

* Test implemented

Test has been implemented and naming convention fix.

* Linter

* Fixed

* Update weekplan_selector_screen.dart

Co-authored-by: JohanKrogh <johan.krogh@gmail.com>

* Feature 683: Fixed server status check and made login async (#686)

* WIP: Make login actually async

* Fixed tests and status endpoint

* Login from popup async too

* Handle error right

* More correct error handling

* Check server status through api_client

* One comment

* Remove unnecessary method from test

* Specify types on wait

* Be completely sure about internet connection :)

* Remove library due to build errors

* oops

* Feature/592.5 (#685)

* Skipped a test instead of commenting it out

* Cleaned up the code, and fixed a small issue

The issue was that it made the calculations from a specific time of day, not at 00:00

* Linting

* Just a small rename

* Small speed up for December

* Split the current week algorithm into different methods, and cleaned up

* Linting

* Final refactor to something the we can actually explain to someone else

Removed unneeded tests

* Moved a method

* Moved a statement

* Removed unnecessary complication

* feature/696: Inconsistent buttons (#701)

* Inconsistent buttons

Only partly solved the issue.
The buttons now correctly remove the timer and add choiceboard options when marking an activity as completed as well as cancelled. Furthermore an isEnabled has been added to the cancel button, so it becomes disables when the state is completed.
The buttons however only become disabled, when you reenter the activity. This is due to the fact the other button does not check for a new state, when the first button is pressed and as such does not get the new state information, when an acitivty is completed or cancelled. There is not enough time to fix this before release, and as such only the most system breaking part of the bug has been fixed, as it would do some funky things, when trying to make a choiceboard on a completed activity.

* Update show_activity_screen.dart

Fixed missing Add Choiceboard on new activities

* Changed values for release (#706)

Co-authored-by: Frederik Spang <fthoms16@student.aau.dk>
Co-authored-by: Frederik Spang <frederik@progras.dk>
Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Rikke Husted Østergaard <raster16@student.aau.dk>
Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>
Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: Mostaan H <34608699+smh87@users.noreply.github.com>
Co-authored-by: Kristian Benny Winther Sørensen <43601483+kbwsoorensen@users.noreply.github.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>
Co-authored-by: Ane Søgaard Jørgensen <42242841+Kaliahh@users.noreply.github.com>
Co-authored-by: AdrianPlesner <33195961+AdrianPlesner@users.noreply.github.com>
Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>
Co-authored-by: LJensen0403 <44022936+LJensen0403@users.noreply.github.com>
Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: Liv Holm <43985985+LivHolm@users.noreply.github.com>
Co-authored-by: twaxlol <45589745+twaxlol@users.noreply.github.com>
Co-authored-by: Alexander <31063192+ggAlexS@users.noreply.github.com>
Co-authored-by: Jeppe Krogh Laursen <jeppe.k.l.97@gmail.com>
Co-authored-by: JeppeKLau <44167691+JeppeKLau@users.noreply.github.com>
Co-authored-by: JohanKrogh <johan.krogh1@gmail.com>
Co-authored-by: Alexander Nykjær <alax0013@gmail.com>
Co-authored-by: Michelle Terpling <michelle@terpling.dk>
Co-authored-by: ZohraAmini <amini.zohra.za@gmail.com>
Co-authored-by: ChristofferAaen <cbaaen@live.dk>
Co-authored-by: Emil7370 <43956069+Emil7370@users.noreply.github.com>
Co-authored-by: myname <email@email.email>
Co-authored-by: JohanKrogh <johan.krogh@gmail.com>

* Changes in versions (#708)

ro0dkll/upload-to-google-play updated to 1.0.7
App version updated to 1.2.2

Co-authored-by: Jakob Precht <sporvogn@live.com>
Co-authored-by: Frederik Spang <fthoms16@student.aau.dk>
Co-authored-by: Frederik Spang <frederik@progras.dk>
Co-authored-by: Bogi Napoleon Wennerstrøm <bogi.wennerstrom@gmail.com>
Co-authored-by: Rikke Husted Østergaard <raster16@student.aau.dk>
Co-authored-by: Adrian Plesner <adrian.plesner@gmail.com>
Co-authored-by: Mustafa Al-Dailemi <43955099+Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Mustafa Al-Dailemi <Mustafa-ALD@users.noreply.github.com>
Co-authored-by: Riasalit <daniel-vilslev@hotmail.com>
Co-authored-by: Mostaan H <34608699+smh87@users.noreply.github.com>
Co-authored-by: Kristian Benny Winther Sørensen <43601483+kbwsoorensen@users.noreply.github.com>
Co-authored-by: ProgDaniel <43956461+ProgDaniel@users.noreply.github.com>
Co-authored-by: Ane Søgaard Jørgensen <42242841+Kaliahh@users.noreply.github.com>
Co-authored-by: AdrianPlesner <33195961+AdrianPlesner@users.noreply.github.com>
Co-authored-by: OliverSorensen <Ossa18@student.aau.dk>
Co-authored-by: LJensen0403 <44022936+LJensen0403@users.noreply.github.com>
Co-authored-by: twaxlol <folese18@student.aau.dk>
Co-authored-by: Liv Holm <43985985+LivHolm@users.noreply.github.com>
Co-authored-by: twaxlol <45589745+twaxlol@users.noreply.github.com>
Co-authored-by: Alexander <31063192+ggAlexS@users.noreply.github.com>
Co-authored-by: Jeppe Krogh Laursen <jeppe.k.l.97@gmail.com>
Co-authored-by: JeppeKLau <44167691+JeppeKLau@users.noreply.github.com>
Co-authored-by: JohanKrogh <johan.krogh1@gmail.com>
Co-authored-by: Alexander Nykjær <alax0013@gmail.com>
Co-authored-by: Michelle Terpling <michelle@terpling.dk>
Co-authored-by: ZohraAmini <amini.zohra.za@gmail.com>
Co-authored-by: ChristofferAaen <cbaaen@live.dk>
Co-authored-by: Emil7370 <43956069+Emil7370@users.noreply.github.com>
Co-authored-by: myname <email@email.email>
Co-authored-by: JohanKrogh <johan.krogh@gmail.com>
Co-authored-by: Jakob Faarbaek Gregersen <jfg@bluepp.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Usually small issues which does not take long to fix Priority: high High priority, its required to work Type: bug Bugs and other insects
Projects
No open projects
2020e 0. sprint
  
Issues done
Development

Successfully merging a pull request may close this issue.

5 participants