Skip to content

Commit

Permalink
Fix details screens
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeDoctorDE committed Feb 24, 2025
1 parent a9a2acf commit a7ac425
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 28 deletions.
3 changes: 1 addition & 2 deletions api/lib/models/event/database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class EventDatabaseService extends EventService with TableService {
description TEXT NOT NULL DEFAULT '',
location TEXT NOT NULL DEFAULT '',
extra TEXT,
FOREIGN KEY (parentId) REFERENCES events(id) ON DELETE CASCADE,
FOREIGN KEY (groupId) REFERENCES groups(id) ON DELETE CASCADE
FOREIGN KEY (parentId) REFERENCES events(id) ON DELETE CASCADE
)
""");
}
Expand Down
44 changes: 24 additions & 20 deletions app/lib/pages/calendar/item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,30 +153,35 @@ class _CalendarItemDialogState extends State<CalendarItemDialog> {
),
],
content: DefaultTabController(
length: tabs ? 3 : 1,
length: tabs ? 5 : 1,
child: Column(
spacing: 8,
children: [
if (tabs)
TabBar(
isScrollable: true,
tabs: [
(
PhosphorIconsLight.faders,
AppLocalizations.of(context).general
),
(
PhosphorIconsLight.checkCircle,
AppLocalizations.of(context).notes
),
(
PhosphorIconsLight.cube,
AppLocalizations.of(context).resources
),
(PhosphorIconsLight.user, AppLocalizations.of(context).users),
(
PhosphorIconsLight.usersThree,
AppLocalizations.of(context).group
),
]
(
PhosphorIconsLight.faders,
AppLocalizations.of(context).general
),
(
PhosphorIconsLight.checkCircle,
AppLocalizations.of(context).notes
),
(
PhosphorIconsLight.cube,
AppLocalizations.of(context).resources
),
(
PhosphorIconsLight.user,
AppLocalizations.of(context).users
),
(
PhosphorIconsLight.usersThree,
AppLocalizations.of(context).group
),
]
.map((e) => HorizontalTab(
icon: PhosphorIcon(e.$1),
label: Text(e.$2),
Expand Down Expand Up @@ -204,7 +209,6 @@ class _CalendarItemDialogState extends State<CalendarItemDialog> {
),
const SizedBox(height: 16),
],
const SizedBox(height: 16),
EventSelectTile(
source: _source,
value: _item.eventId,
Expand Down
2 changes: 1 addition & 1 deletion app/lib/pages/events/event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class EventDialog extends StatelessWidget {
content: DefaultTabController(
length: tabs ? 5 : 1,
child: Column(
spacing: 8,
children: [
if (tabs)
TabBar(
Expand Down Expand Up @@ -105,7 +106,6 @@ class EventDialog extends StatelessWidget {
),
const SizedBox(height: 16),
],
const SizedBox(height: 16),
TextFormField(
controller: nameController,
decoration: InputDecoration(
Expand Down
1 change: 1 addition & 0 deletions app/lib/pages/resources/resource.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class ResourceDialog extends StatelessWidget {
content: DefaultTabController(
length: tabs ? 3 : 1,
child: Column(
spacing: 8,
children: [
if (tabs)
TabBar(
Expand Down
10 changes: 5 additions & 5 deletions app/lib/widgets/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ List _getNavigationItems(BuildContext context) => [
"icon": PhosphorIconsLight.listChecks,
"link": "/notes"
},
{
"title": AppLocalizations.of(context).groups,
"icon": PhosphorIconsLight.usersThree,
"link": "/groups"
},
{
"title": AppLocalizations.of(context).resources,
"icon": PhosphorIconsLight.cube,
"link": "/resources"
},
{
"title": AppLocalizations.of(context).groups,
"icon": PhosphorIconsLight.usersThree,
"link": "/groups"
},
{
"title": AppLocalizations.of(context).users,
"icon": PhosphorIconsLight.users,
Expand Down

0 comments on commit a7ac425

Please sign in to comment.