Skip to content

Commit

Permalink
Migrate vcard
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcage committed Nov 18, 2023
1 parent e96e840 commit a439485
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 31 deletions.

This file was deleted.

1 change: 0 additions & 1 deletion app/Providers/NavigationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class NavigationServiceProvider extends ServiceProvider
'accounting.webling.prepare' => \App\Navigation\ContextButtons\Accounting\WeblingPrepareContextButtons::class,

'cmtyvol.index' => \App\Navigation\ContextButtons\CommunityVolunteers\CommunityVolunteersIndexContextButtons::class,
'cmtyvol.show' => \App\Navigation\ContextButtons\CommunityVolunteers\CommunityVolunteersShowContextButtons::class,
'cmtyvol.import-export' => \App\Navigation\ContextButtons\CommunityVolunteers\CommunityVolunteersReturnToIndexContextButtons::class,
];

Expand Down
9 changes: 9 additions & 0 deletions resources/js/pages/cmtyvol/CommunityVolunteersShowPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ export default {
text: this.$t("Edit"),
show: this.cmtyvol.can_update
},
{
href: this.route(
"api.cmtyvol.vcard",
this.id
),
icon: "address-card",
text: this.$t("vCard"),
show: true,
},
]
},
fields() {
Expand Down
2 changes: 1 addition & 1 deletion resources/js/ziggy.js

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use App\Http\Controllers\CommunityVolunteers\API\CommunityVolunteerCommentsController;
use App\Http\Controllers\CommunityVolunteers\API\CommunityVolunteerController;
use App\Http\Controllers\CommunityVolunteers\API\ReportController as CommunityVolunteersReportController;
use App\Http\Controllers\CommunityVolunteers\ImportExportController as CommunityVolunteersImportExportController;
use App\Http\Controllers\CommunityVolunteers\API\ResponsibilitiesController;
use App\Http\Controllers\CommunityVolunteers\ImportExportController;
use App\Http\Controllers\Fundraising\API\DonationController;
Expand Down Expand Up @@ -314,6 +315,10 @@
->name('pickupLocations')
->middleware('can:viewAny,App\Models\CommunityVolunteers\CommunityVolunteer');

// Download vCard
Route::get('{cmtyvol}/vcard', [CommunityVolunteersImportExportController::class, 'vcard'])
->name('vcard');

// Age distribution
Route::get('ageDistribution', [CommunityVolunteersReportController::class, 'ageDistribution'])
->name('ageDistribution')
Expand Down
4 changes: 0 additions & 4 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,6 @@
->name('doImport')
->middleware('can:import,App\Models\CommunityVolunteers\CommunityVolunteer');

// Download vCard
Route::get('{cmtyvol}/vcard', [CommunityVolunteersImportExportController::class, 'vcard'])
->name('vcard');

// Responsibilities resource
Route::view('responsibilities', 'vue-app')
->name('responsibilities');
Expand Down

0 comments on commit a439485

Please sign in to comment.