-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* workspace provider is updated * Connect provider to workspace page2 (#591) * mobile workspace connected to backend * add/edit/delete entries * add/delete references * edit workspace title * provider and box implementations * add route for q/a and reply button * remove comment * make questionlist stateful and fix provider bugs * change nodeid to questionid in answerbox * questions in state fix * Connect provider to workspace page2 (#601) * mobile workspace connected to backend * add/edit/delete entries * add/delete references * edit workspace title * send collaboration request * new features * workspace enhancement * create new workspace button is added * fixed web preview mode problem * message in collaboration request * semantic tag mock * mock semantic tags in workspace * userType and review workspaces * fix the base. Changed base to frontend * fix wrong base. Changed base to frontend * send workspace to review * add review button * button to the node details page * add contributor control * Create annotation provider and model * Update annotation text widget * Implement annotation widget to various pages * buttons implemented except q/a * Updated basic user model and wrote provider for basic user API * answer questions bugs and refresh * usertype connected to backend * Make texts unselectable (#633) * bug fix on guest user on profile view * show unanswered questions to only contributors * fixed editentry provider, resized some widgets * create workspace from node * implemented admin provider, in process connecting node details to backend * resolved new conflicts with frontend branch * code review * bug fix * bug fix * user permissions on workspace * update review request * 646 fe home page advanced nodes (#677) * New provider for getting nodes by type * Create node options menu buttons * Add buttons to home page * 675 fe share button change app url (#678) * Fix node details page width issue in large screens * Add link to share button * Change name graph to relation (#680) * Remove notification page (#681) * Fix view error for smaller screens (#683) * Get related nodes to the given node * Fix auth token disappears error (#685) * Add flutter local storage shared preferences * Save token to local storage, check if it is valid * Check if user is already logged in while loading the app * bug fix for showing multiple proofs (#686) * bug fix for showing multiple proofs * Change the complete layout to fix the bug --------- Co-authored-by: Omer <[email protected]> * update collaboration request * user type update (#695) * bug fix (#694) * Error should affect only current index * bug fixed in settings * entry menu is added * delete button deleted * Display review comments (#707) * review comments * comments sidebar * update contributors section's visibility (#708) * disproof is added * bug fix * Code capitalize string extension * Add semantic tag box to node view page and navigate to related tags on click * Privacy policy is added (#718) * Workspace (#698) * more code * more code * connected to backend as much as possible * no result message * after the tag is added, the page refreshes * delete semantic tag is active * profile page semantic tag * conflicts resolved * Fe reset workspace button (#717) * reset workspace button * pending field * pending * bug fix * bug fix * conflicts resolved * Admin features frontend (#716) * Node model changed. Admin node hide feature completed. Admin provider fixed. * Profile admin features connected to the backend * minor fix * fix promote/demote reviewer * added hide button to questions * is hidden * models updated, bug fixed * fix state updates hide or show buttons * small fix in provider & ban button * fix answer question bug. * fix admin hide/show button * answer question bug fix * empty auth --------- Co-authored-by: brunettow <[email protected]> * Delete semantic tag file * Fix errors related to merged changes in frontend * Fix error related to previous merge * user tags are completed (#723) * orcid input field implemented & provider implemented (#722) * Provider for GET and POST annotations (#688) * Provider for GET and POST annotations * change query parameter logic in annotation provider * use annotion providers in annotation mechanism of frontend * fix annotation provider * add annotation mechanism and provider * change request structure of add annotation * Add author and disable not logged in user add annotation * separate private and public annotations * add change annotation feature --------- Co-authored-by: Omer <[email protected]> * add user null control for guest user (#724) --------- Co-authored-by: Zulalm <[email protected]> Co-authored-by: Mehmet Süzer <[email protected]> Co-authored-by: Zulalm <[email protected]> Co-authored-by: defabdullah <[email protected]> Co-authored-by: mehmetSuzer <[email protected]> Co-authored-by: brunettow <[email protected]> Co-authored-by: Bengisu Takkin <[email protected]> Co-authored-by: laylaylo <[email protected]> Co-authored-by: defabdullah <[email protected]>
- Loading branch information
1 parent
88edcce
commit d000984
Showing
103 changed files
with
8,399 additions
and
2,369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
project/FrontEnd/collaborative_science_platform/lib/exceptions/question_exceptions.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
class PostQuestionError implements Exception { | ||
String message; | ||
PostQuestionError({this.message = "Post Question Error"}); | ||
} | ||
|
||
class PostAnswerError implements Exception { | ||
String message; | ||
PostAnswerError({this.message = "Post Answer Error"}); | ||
} |
5 changes: 5 additions & 0 deletions
5
project/FrontEnd/collaborative_science_platform/lib/extensions/string_extensions.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
extension StringExtension on String { | ||
String capitalize() { | ||
return "${this[0].toUpperCase()}${substring(1).toLowerCase()}"; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
project/FrontEnd/collaborative_science_platform/lib/helpers/select_buttons_helper.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class SelectButtonsHelper { | ||
static int selectedIndex = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 15 additions & 16 deletions
31
project/FrontEnd/collaborative_science_platform/lib/models/annotation.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,24 @@ | ||
import 'package:collaborative_science_platform/models/basic_user.dart'; | ||
|
||
class Annotation { | ||
int annotationID; | ||
String annotationType; | ||
String annotationVisibilityType; | ||
BasicUser owner; | ||
Object annotationLocation; | ||
int? annotationID; | ||
// String annotationType; | ||
// String annotationVisibilityType; | ||
// BasicUser owner; | ||
// Object annotationLocation; | ||
String annotationContent; | ||
String annotationAuthor; | ||
String | ||
sourceLocation; // ${Constants.appUrl}/node/{nodeId}%23{theorem|proof}%23{theoremId|proofId} | ||
int startOffset; | ||
int endOffset; | ||
DateTime createdAt; | ||
DateTime updatedAt; | ||
DateTime dateCreated; | ||
|
||
Annotation({ | ||
required this.annotationID, | ||
required this.annotationType, | ||
required this.annotationVisibilityType, | ||
required this.owner, | ||
required this.annotationLocation, | ||
this.annotationID, | ||
required this.startOffset, | ||
required this.endOffset, | ||
required this.createdAt, | ||
required this.updatedAt, | ||
required this.annotationContent, | ||
required this.annotationAuthor, | ||
required this.sourceLocation, | ||
required this.dateCreated, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 50 additions & 13 deletions
63
project/FrontEnd/collaborative_science_platform/lib/models/node_details_page/question.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,68 @@ | ||
import 'package:collaborative_science_platform/models/user.dart'; | ||
|
||
class Question { | ||
int id; | ||
String content; | ||
String createdAt; | ||
User? asker; | ||
String answer; | ||
User asker; | ||
String? answer; | ||
User? answerer; | ||
String answeredAt; | ||
Question({ | ||
required this.content, | ||
required this.createdAt, | ||
required this.answer, | ||
required this.answeredAt, | ||
required this.answerer, | ||
required this.asker, | ||
}); | ||
String? answeredAt; | ||
int? nodeId; | ||
bool isAnswered; | ||
bool isHidden; | ||
Question( | ||
{required this.id, | ||
required this.content, | ||
required this.createdAt, | ||
required this.asker, | ||
required this.answer, | ||
required this.answerer, | ||
required this.answeredAt, | ||
required this.nodeId, | ||
required this.isAnswered, | ||
required this.isHidden}); | ||
factory Question.fromJson(Map<String, dynamic> jsonString) { | ||
return Question( | ||
id: jsonString['id'] ?? -1, | ||
content: jsonString['question_content'] ?? "", | ||
createdAt: jsonString['created_at'] ?? "", | ||
answer: jsonString['answer_content'] ?? "", | ||
answeredAt: jsonString['answered_at'] ?? "", | ||
answerer: jsonString['answerer'] == null | ||
? null | ||
: User.fromJsonforNodeDetailPage(jsonString['answerer']), | ||
asker: | ||
jsonString['asker'] == null ? null : User.fromJsonforNodeDetailPage(jsonString['asker']), | ||
asker: User.fromJsonforNodeDetailPage(jsonString['asker']), | ||
nodeId: jsonString['node_id'] ?? -1, | ||
isAnswered: jsonString['answer_content'] != null, | ||
isHidden: jsonString['removed_by_admin'] ?? false, | ||
); | ||
} | ||
|
||
factory Question.fromJsonforProfilePage(Map<String, dynamic> jsonString) { | ||
return Question( | ||
id: jsonString['id'] ?? -1, | ||
content: jsonString['question_content'] ?? "", | ||
createdAt: jsonString['ask_date'] ?? "", | ||
asker: User( | ||
id: jsonString['asker_id'], | ||
email: jsonString['asker_mail'], | ||
firstName: jsonString['asker_name'], | ||
lastName: jsonString['asker_surname'], | ||
), | ||
answer: jsonString.containsKey("answer_content") ? jsonString["answer_content"] : "", | ||
answerer: jsonString.containsKey("answerer") | ||
? User( | ||
id: jsonString['answerer_id'], | ||
email: jsonString['answerer_mail'], | ||
firstName: jsonString['answerer_name'], | ||
lastName: jsonString['answerer_surname'], | ||
) | ||
: null, | ||
answeredAt: jsonString.containsKey("answer_date") ? jsonString["answer_date"] as String : "", | ||
nodeId: jsonString['node_id'] ?? -1, | ||
isAnswered: jsonString['is_answered'] == 1, | ||
isHidden: jsonString['removed_by_admin'] ?? false, | ||
); | ||
} | ||
} |
Oops, something went wrong.