Skip to content

Commit

Permalink
minutes read and agreed checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
omar-farooq committed Oct 24, 2024
1 parent 17c0220 commit 9a4a0a0
Show file tree
Hide file tree
Showing 15 changed files with 792 additions and 286 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ jobs:
- run: npm run build

- name: execute tests via phpunit
# services:
# websocket:
# image: quay.io/soketi/soketi:latest-16-alpine
# ports:
# - 6001:6001
env:
DB_CONNECTION: sqlite
DB_DATABASE: database/database.sqlite
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gcloud-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy
on:
push:
tags:
- v-*
- v1.**

env:
PROJECT_ID: '231388685322'
Expand Down
27 changes: 19 additions & 8 deletions app/Http/Controllers/MeetingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ public function create(Meeting $meeting, User $user)
*
* @return \Illuminate\Http\Response
*/
public function show(Meeting $meeting)
public function show(Meeting $meeting, Request $request)
{
if($request->exists('getMinutesRead')) {
return response()->json(
$meeting->minutes_read_and_agreed
);
}

return Inertia::render('Meetings/View', [
'title' => 'Historical Meeting',
'meeting' => $meeting->load(['meetingAgenda', 'minutes', 'attendees', 'secretaryReport', 'polls', 'guests']),
Expand All @@ -148,15 +154,20 @@ public function edit(Meeting $meeting)
*/
public function update(UpdateMeetingRequest $request, Meeting $meeting)
{
Document::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
Minute::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
Poll::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
SecretaryReport::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
if($request->exists('updateMinutesRead')) {
$meeting->minutes_read_and_agreed = $request->minutesReadAndAgreed;
$meeting->save();
} else {
Document::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
Minute::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
Poll::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);
SecretaryReport::where('meeting_id', null)->update(['meeting_id' => $meeting->id]);

//Meeting Agendas are now handled on a meeting by meeting basis (25/08/2024)
//MeetingAgenda::where('meeting_id', NULL)->update(['meeting_id' => $meeting->id]);
//Meeting Agendas are now handled on a meeting by meeting basis (25/08/2024)
//MeetingAgenda::where('meeting_id', NULL)->update(['meeting_id' => $meeting->id]);

$meeting->update(['completed' => 1]);
$meeting->update(['completed' => 1]);
}
}

/**
Expand Down
1 change: 1 addition & 0 deletions app/Models/Meeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class Meeting extends Model
protected $fillable = [
'cancelled',
'completed',
'minutes_read_and_agreed',
'notes',
];

Expand Down
Loading

0 comments on commit 9a4a0a0

Please sign in to comment.