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

feat: Introduce study status and add closing state #634

Merged
merged 24 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5c0f04f
chore: translation
johannesvedder May 25, 2024
3cf8804
feat: deprecate published for study_status
johannesvedder May 25, 2024
29310b7
chore: create migration temporarily
johannesvedder May 26, 2024
9aba30c
fix: improve status transition rules
johannesvedder May 26, 2024
15a72e5
feat: study close button
johannesvedder Jun 7, 2024
881f856
chore: format
johannesvedder Jun 7, 2024
acdbb1c
chore: copy migration to schema
johannesvedder Jun 10, 2024
aed1eff
fix: merge dashboard refactor pr
johannesvedder Jun 11, 2024
051552d
chore: fix seed
johannesvedder Jun 11, 2024
dbd1810
fix: study visibility policy no longer uses published field
johannesvedder Jun 11, 2024
1ce2f78
fix: potential isClosed error
johannesvedder Jun 11, 2024
7dcc928
fix: migrate app to status
johannesvedder Jun 11, 2024
1cb7740
fix: do not show separator if no delete item shown
johannesvedder Jun 11, 2024
b6dad92
fix: only show close button for editors
johannesvedder Jun 11, 2024
547c468
fix: add closed success description
johannesvedder Jun 11, 2024
4beb796
style: format
johannesvedder Jun 11, 2024
9ffc7ce
tests: migrate db test to status
johannesvedder Jun 11, 2024
7c5b8ae
tests: fix workflow trigger
johannesvedder Jun 11, 2024
f190d1f
Merge branch 'dev' into feat/study-closing-studystatus
johannesvedder Jun 12, 2024
e27a580
chore: format
johannesvedder Jun 12, 2024
dad913e
chore: format
johannesvedder Jun 12, 2024
cdcbca5
style: rephrase translation
johannesvedder Jun 13, 2024
9b66d33
feat: new severe close confirmation
johannesvedder Jun 13, 2024
931c4e2
Merge branch 'feat/study-closing' into feat/study-closing-studystatus
johannesvedder Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'feat/study-closing' into feat/study-closing-studystatus
# Conflicts:
#	core/lib/src/models/tables/study.dart
#	designer_v2/lib/common_views/action_popup_menu.dart
#	designer_v2/lib/features/recruit/study_recruit_page.dart
#	designer_v2/lib/repositories/study_repository.dart
#	designer_v2/lib/services/notifications.dart
#	designer_v2/lib/utils/model_action.dart
  • Loading branch information
johannesvedder committed Jun 14, 2024
commit 931c4e2fa50e64bb0ada2486f99106009fe9509c
4 changes: 0 additions & 4 deletions app/lib/screens/study/onboarding/study_selection.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ class _StudySelectionScreenState extends State<StudySelectionScreen> {
child: StudyTile.fromStudy(
study: study,
onTap: () async {
if (study.isClosed) {
await showStudyClosedDialog(context);
return;
}
await navigateToStudyOverview(context, study);
},
),
Expand Down
12 changes: 0 additions & 12 deletions database/migration/migrate-close_study.sql

This file was deleted.

3 changes: 0 additions & 3 deletions designer_v2/lib/domain/study.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ enum StudyActionType {
duplicateDraft,
addCollaborator,
export,
close,
delete,
}

Expand All @@ -28,8 +27,6 @@ extension StudyActionTypeFormatted on StudyActionType {
return tr.action_unpin;
case StudyActionType.edit:
return tr.action_edit;
case StudyActionType.close:
return tr.action_close;
case StudyActionType.delete:
return tr.action_delete;
case StudyActionType.duplicate:
Expand Down
1 change: 0 additions & 1 deletion designer_v2/lib/features/study/study_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ Map<StudyActionType, IconData> studyActionIcons = {
StudyActionType.addCollaborator: Icons.person_add_rounded,
StudyActionType.export: Icons.download_rounded,
StudyActionType.delete: Icons.delete_rounded,
StudyActionType.close: MdiIcons.accountLock,
};
1 change: 0 additions & 1 deletion designer_v2/lib/localization/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,6 @@
"action_pin": "Anheften",
"action_unpin": "Nicht mehr anheften",
"action_edit": "Bearbeiten",
"action_close": "Schließen",
"action_delete": "Löschen",
"action_remove": "Entfernen",
"action_duplicate": "Duplizieren",
Expand Down
1 change: 0 additions & 1 deletion designer_v2/lib/localization/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,6 @@
"action_pin": "Pin",
"action_unpin": "Remove pin",
"action_delete": "Delete",
"action_close": "Close",
"action_remove": "Remove",
"action_duplicate": "Duplicate",
"action_clipboard": "Copy to clipboard",
Expand Down
12 changes: 0 additions & 12 deletions designer_v2/lib/repositories/study_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,6 @@ class StudyRepository extends ModelRepository<Study>
);
}

Future<void> onCloseCallback() {
model.isClosed = true;
return save(model)
.then((value) =>
ref.read(routerProvider).dispatch(RoutingIntents.studies),)
.then((value) => Future.delayed(
const Duration(milliseconds: 200),
() => ref
.read(notificationServiceProvider)
.show(Notifications.studyClosed),),);
}

final currentUser = authRepository.currentUser;
if (currentUser == null) return [];

Expand Down
3 changes: 0 additions & 3 deletions designer_v2/lib/services/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class Notifications {
static final studyDeleted = SnackbarIntent(
message: tr.notification_study_deleted,
);
static final studyClosed = SnackbarIntent(
message: tr.notification_study_closed,
);
static final inviteCodeDeleted = SnackbarIntent(
message: tr.notification_code_deleted,
);
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.