diff --git a/app/Http/Controllers/Settings/API/SettingsController.php b/app/Http/Controllers/Settings/API/SettingsController.php index 6d857d2a3..5f3a29cb6 100644 --- a/app/Http/Controllers/Settings/API/SettingsController.php +++ b/app/Http/Controllers/Settings/API/SettingsController.php @@ -6,9 +6,11 @@ use App\Settings\SettingsField; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use Illuminate\Http\Response; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Storage; use Illuminate\Support\Str; +use Illuminate\Validation\Rule; use Setting; class SettingsController extends Controller @@ -146,6 +148,30 @@ public function reset(): JsonResponse ]); } + public function resetField(string $key): JsonResponse + { + $fields = self::getSettings(); + if (!$fields->keys()->map(fn ($k) => Str::slug($k))->contains($key)) { + return response() + ->json([ + 'message' => __("Invalid field."), + ], Response::HTTP_UNPROCESSABLE_ENTITY); + } + + $settingsKey = $fields->filter(fn ($v, $k) => Str::slug($k) == $key)->map(fn ($v, $k) => $k)->first(); + $field = $fields[$settingsKey]; + if ($field->formType() == 'file' && Setting::has($settingsKey)) { + Storage::delete(Setting::get($settingsKey)); + } + Setting::forget($settingsKey); + Setting::save(); + + return response() + ->json([ + 'message' => __($field->label().' has been reset.'), + ]); + } + private static function updateFieldValue(SettingsField $field, Request $request, string $key): void { if ($field->formType() == 'file') { diff --git a/resources/js/api/settings.js b/resources/js/api/settings.js index 38253fdc2..774981aaf 100644 --- a/resources/js/api/settings.js +++ b/resources/js/api/settings.js @@ -9,11 +9,17 @@ export default { return await api.get(url); }, async update(data) { + const formData = new FormData(); + Object.entries(data).forEach(e => formData.append(e[0], e[1])); const url = route("api.settings.update"); - return await api.put(url, data); + return await api.postFormData(url, formData); }, async reset() { const url = route("api.settings.reset"); return await api.delete(url); }, + async resetField(field) { + const url = route("api.settings.resetField", {key: field}); + return await api.delete(url); + }, }; diff --git a/resources/js/components/settings/SettingsField.vue b/resources/js/components/settings/SettingsField.vue index b07ed281d..7860cfe7e 100644 --- a/resources/js/components/settings/SettingsField.vue +++ b/resources/js/components/settings/SettingsField.vue @@ -40,26 +40,29 @@ /> @@ -74,6 +77,10 @@ export default { disabled: Boolean, value: { required: true + }, + fieldKey: { + required: true, + type: String } }, computed: { diff --git a/resources/js/pages/settings/SettingsPage.vue b/resources/js/pages/settings/SettingsPage.vue index ab754a5ea..df580d541 100644 --- a/resources/js/pages/settings/SettingsPage.vue +++ b/resources/js/pages/settings/SettingsPage.vue @@ -17,8 +17,10 @@ @@ -70,22 +72,25 @@ export default { this.fetchSettings(); }, methods: { - async fetchSettings() { + async fetchSettings(field) { let data = await settingsApi.fields(); - this.sections = data.sections; - this.fields = data.fields; - this.formData = Object.fromEntries( - Object.entries(this.fields).map(([key, { value }]) => [ - key, - value, - ]) - ); - this.loaded = true; + if (field) { + this.fields[field] = data.fields[field] + this.formData[field] = this.fields[field].type == 'file' ? null : this.fields[field].value + } else { + this.sections = data.sections; + this.fields = data.fields; + this.formData = Object.fromEntries( + Object.entries(this.fields).map(([key, field]) => [key, field.type == 'file' ? null : field.value]) + ); + this.loaded = true; + } }, async updateSettings() { this.isBusy = true; try { - let data = await settingsApi.update(this.formData); + let dataForUpdate = Object.fromEntries(Object.entries(this.formData).filter(e => this.fields[e[0]].type == 'file' ? e[1] != null : true)) + let data = await settingsApi.update(dataForUpdate); showSnackbar(data.message); await this.fetchSettings(); } catch (err) { @@ -107,6 +112,20 @@ export default { } this.isBusy = false; }, + async resetField(field) { + if (!confirm(this.$t(`Really reset ${this.fields[field].label}?`))) { + return; + } + this.isBusy = true; + try { + let data = await settingsApi.resetField(field); + await this.fetchSettings(field); + showSnackbar(data.message); + } catch (err) { + alert(err); + } + this.isBusy = false; + } }, }; diff --git a/resources/js/ziggy.js b/resources/js/ziggy.js index 5d4a193eb..5eefc08c7 100644 --- a/resources/js/ziggy.js +++ b/resources/js/ziggy.js @@ -1,4 +1,4 @@ -const Ziggy = {"url":"http:\/\/localhost","port":null,"defaults":{},"routes":{"api.dashboard":{"uri":"api\/dashboard","methods":["GET","HEAD"]},"api.users.index":{"uri":"api\/users","methods":["GET","HEAD"]},"api.users.store":{"uri":"api\/users","methods":["POST"]},"api.users.show":{"uri":"api\/users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.update":{"uri":"api\/users\/{user}","methods":["PUT","PATCH"],"bindings":{"user":"id"}},"api.users.destroy":{"uri":"api\/users\/{user}","methods":["DELETE"],"bindings":{"user":"id"}},"api.users.disable2FA":{"uri":"api\/users\/{user}\/disable2FA","methods":["PUT"],"bindings":{"user":"id"}},"api.users.disableOAuth":{"uri":"api\/users\/{user}\/disableOAuth","methods":["PUT"],"bindings":{"user":"id"}},"api.users.roles.index":{"uri":"api\/users\/{user}\/roles","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.relationships.roles.index":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.relationships.roles.store":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["POST"],"bindings":{"user":"id"}},"api.users.relationships.roles.update":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["PUT"],"bindings":{"user":"id"}},"api.users.relationships.roles.destroy":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["DELETE"],"bindings":{"user":"id"}},"api.roles.index":{"uri":"api\/roles","methods":["GET","HEAD"]},"api.roles.store":{"uri":"api\/roles","methods":["POST"]},"api.roles.show":{"uri":"api\/roles\/{role}","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.update":{"uri":"api\/roles\/{role}","methods":["PUT","PATCH"],"bindings":{"role":"id"}},"api.roles.destroy":{"uri":"api\/roles\/{role}","methods":["DELETE"],"bindings":{"role":"id"}},"api.roles.users.index":{"uri":"api\/roles\/{role}\/users","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.administrators.index":{"uri":"api\/roles\/{role}\/administrators","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.users.index":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.users.store":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["POST"],"bindings":{"role":"id"}},"api.roles.relationships.users.update":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["PUT"],"bindings":{"role":"id"}},"api.roles.relationships.users.destroy":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["DELETE"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.index":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.store":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["POST"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.update":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["PUT"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.destroy":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["DELETE"],"bindings":{"role":"id"}},"api.fundraising.donors.export":{"uri":"api\/fundraising\/donors\/export","methods":["GET","HEAD"]},"api.fundraising.donors.salutations":{"uri":"api\/fundraising\/donors\/salutations","methods":["GET","HEAD"]},"api.fundraising.donors.names":{"uri":"api\/fundraising\/donors\/names","methods":["GET","HEAD"]},"api.fundraising.donors.index":{"uri":"api\/fundraising\/donors","methods":["GET","HEAD"]},"api.fundraising.donors.store":{"uri":"api\/fundraising\/donors","methods":["POST"]},"api.fundraising.donors.show":{"uri":"api\/fundraising\/donors\/{donor}","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.update":{"uri":"api\/fundraising\/donors\/{donor}","methods":["PUT","PATCH"],"bindings":{"donor":"id"}},"api.fundraising.donors.destroy":{"uri":"api\/fundraising\/donors\/{donor}","methods":["DELETE"],"bindings":{"donor":"id"}},"api.fundraising.donors.vcard":{"uri":"api\/fundraising\/donors\/{donor}\/vcard","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.index":{"uri":"api\/fundraising\/donors\/{donor}\/donations","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.store":{"uri":"api\/fundraising\/donors\/{donor}\/donations","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.export":{"uri":"api\/fundraising\/donors\/{donor}\/donations\/export","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.budgets":{"uri":"api\/fundraising\/donors\/{donor}\/budgets","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.comments.index":{"uri":"api\/fundraising\/donors\/{donor}\/comments","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.comments.store":{"uri":"api\/fundraising\/donors\/{donor}\/comments","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.donors.tags.index":{"uri":"api\/fundraising\/donors\/{donor}\/tags","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.tags.store":{"uri":"api\/fundraising\/donors\/{donor}\/tags","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.tags.index":{"uri":"api\/fundraising\/tags","methods":["GET","HEAD"]},"api.fundraising.donations.channels":{"uri":"api\/fundraising\/donations\/channels","methods":["GET","HEAD"]},"api.fundraising.donations.currencies":{"uri":"api\/fundraising\/donations\/currencies","methods":["GET","HEAD"]},"api.fundraising.donations.export":{"uri":"api\/fundraising\/donations\/export","methods":["GET","HEAD"]},"api.fundraising.donations.import":{"uri":"api\/fundraising\/donations\/import","methods":["POST"]},"api.fundraising.donations.index":{"uri":"api\/fundraising\/donations","methods":["GET","HEAD"]},"api.fundraising.donations.store":{"uri":"api\/fundraising\/donations","methods":["POST"]},"api.fundraising.donations.show":{"uri":"api\/fundraising\/donations\/{donation}","methods":["GET","HEAD"],"bindings":{"donation":"id"}},"api.fundraising.donations.update":{"uri":"api\/fundraising\/donations\/{donation}","methods":["PUT","PATCH"],"bindings":{"donation":"id"}},"api.fundraising.donations.destroy":{"uri":"api\/fundraising\/donations\/{donation}","methods":["DELETE"],"bindings":{"donation":"id"}},"api.fundraising.report.donors.count":{"uri":"api\/fundraising\/report\/donors\/count","methods":["GET","HEAD"]},"api.fundraising.report.donors.languages":{"uri":"api\/fundraising\/report\/donors\/languages","methods":["GET","HEAD"]},"api.fundraising.report.donors.countries":{"uri":"api\/fundraising\/report\/donors\/countries","methods":["GET","HEAD"]},"api.fundraising.report.donors.registrations":{"uri":"api\/fundraising\/report\/donors\/registrations","methods":["GET","HEAD"]},"api.fundraising.report.donations.registrations":{"uri":"api\/fundraising\/report\/donations\/registrations","methods":["GET","HEAD"]},"api.fundraising.report.donations.currencies":{"uri":"api\/fundraising\/report\/donations\/currencies","methods":["GET","HEAD"]},"api.fundraising.report.donations.channels":{"uri":"api\/fundraising\/report\/donations\/channels","methods":["GET","HEAD"]},"api.accounting.wallets.names":{"uri":"api\/accounting\/wallets\/names","methods":["GET","HEAD"]},"api.accounting.wallets.index":{"uri":"api\/accounting\/wallets","methods":["GET","HEAD"]},"api.accounting.wallets.create":{"uri":"api\/accounting\/wallets\/create","methods":["GET","HEAD"]},"api.accounting.wallets.store":{"uri":"api\/accounting\/wallets","methods":["POST"]},"api.accounting.wallets.show":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["GET","HEAD"],"bindings":{"wallet":"id"}},"api.accounting.wallets.edit":{"uri":"api\/accounting\/wallets\/{wallet}\/edit","methods":["GET","HEAD"]},"api.accounting.wallets.update":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["PUT","PATCH"],"bindings":{"wallet":"id"}},"api.accounting.wallets.destroy":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["DELETE"],"bindings":{"wallet":"id"}},"api.accounting.categories.tree":{"uri":"api\/accounting\/categories\/tree","methods":["GET","HEAD"]},"api.accounting.categories.index":{"uri":"api\/accounting\/categories","methods":["GET","HEAD"]},"api.accounting.categories.create":{"uri":"api\/accounting\/categories\/create","methods":["GET","HEAD"]},"api.accounting.categories.store":{"uri":"api\/accounting\/categories","methods":["POST"]},"api.accounting.categories.show":{"uri":"api\/accounting\/categories\/{category}","methods":["GET","HEAD"],"bindings":{"category":"id"}},"api.accounting.categories.edit":{"uri":"api\/accounting\/categories\/{category}\/edit","methods":["GET","HEAD"]},"api.accounting.categories.update":{"uri":"api\/accounting\/categories\/{category}","methods":["PUT","PATCH"],"bindings":{"category":"id"}},"api.accounting.categories.destroy":{"uri":"api\/accounting\/categories\/{category}","methods":["DELETE"],"bindings":{"category":"id"}},"api.accounting.projects.tree":{"uri":"api\/accounting\/projects\/tree","methods":["GET","HEAD"]},"api.accounting.projects.index":{"uri":"api\/accounting\/projects","methods":["GET","HEAD"]},"api.accounting.projects.create":{"uri":"api\/accounting\/projects\/create","methods":["GET","HEAD"]},"api.accounting.projects.store":{"uri":"api\/accounting\/projects","methods":["POST"]},"api.accounting.projects.show":{"uri":"api\/accounting\/projects\/{project}","methods":["GET","HEAD"],"bindings":{"project":"id"}},"api.accounting.projects.edit":{"uri":"api\/accounting\/projects\/{project}\/edit","methods":["GET","HEAD"]},"api.accounting.projects.update":{"uri":"api\/accounting\/projects\/{project}","methods":["PUT","PATCH"],"bindings":{"project":"id"}},"api.accounting.projects.destroy":{"uri":"api\/accounting\/projects\/{project}","methods":["DELETE"],"bindings":{"project":"id"}},"api.accounting.transactions.summary":{"uri":"api\/accounting\/transactions\/summary","methods":["GET","HEAD"]},"api.accounting.transactions.index":{"uri":"api\/accounting\/transactions","methods":["GET","HEAD"]},"api.accounting.transactions.store":{"uri":"api\/accounting\/transactions","methods":["POST"]},"api.accounting.transactions.export":{"uri":"api\/accounting\/transactions\/export","methods":["GET","HEAD"]},"api.accounting.transactions.updateReceipt":{"uri":"api\/accounting\/transactions\/{transaction}\/receipt","methods":["POST"],"bindings":{"transaction":"id"}},"api.accounting.transactions.rotateReceipt":{"uri":"api\/accounting\/transactions\/{transaction}\/receipt\/rotate","methods":["PUT"],"bindings":{"transaction":"id"}},"api.accounting.transactions.history":{"uri":"api\/accounting\/transactions\/history","methods":["GET","HEAD"]},"api.accounting.transactions.transactionHistory":{"uri":"api\/accounting\/transactions\/{transaction}\/history","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.secondaryCategories":{"uri":"api\/accounting\/transactions\/secondaryCategories","methods":["GET","HEAD"]},"api.accounting.transactions.locations":{"uri":"api\/accounting\/transactions\/locations","methods":["GET","HEAD"]},"api.accounting.transactions.costCenters":{"uri":"api\/accounting\/transactions\/costCenters","methods":["GET","HEAD"]},"api.accounting.transactions.attendees":{"uri":"api\/accounting\/transactions\/attendees","methods":["GET","HEAD"]},"api.accounting.transactions.taxonomies":{"uri":"api\/accounting\/transactions\/taxonomies","methods":["GET","HEAD"]},"api.accounting.transactions.controllable":{"uri":"api\/accounting\/transactions\/controllable","methods":["GET","HEAD"]},"api.accounting.transactions.show":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.update":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["PUT","PATCH"],"bindings":{"transaction":"id"}},"api.accounting.transactions.destroy":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["DELETE"],"bindings":{"transaction":"id"}},"api.accounting.transactions.undoBooking":{"uri":"api\/accounting\/transactions\/{transaction}\/undoBooking","methods":["PUT"],"bindings":{"transaction":"id"}},"api.accounting.transactions.controlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.markControlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["POST"],"bindings":{"transaction":"id"}},"api.accounting.transactions.undoControlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["DELETE"],"bindings":{"transaction":"id"}},"api.accounting.suppliers.export":{"uri":"api\/accounting\/suppliers\/export","methods":["GET","HEAD"]},"api.accounting.suppliers.names":{"uri":"api\/accounting\/suppliers\/names","methods":["GET","HEAD"]},"api.accounting.suppliers.index":{"uri":"api\/accounting\/suppliers","methods":["GET","HEAD"]},"api.accounting.suppliers.create":{"uri":"api\/accounting\/suppliers\/create","methods":["GET","HEAD"]},"api.accounting.suppliers.store":{"uri":"api\/accounting\/suppliers","methods":["POST"]},"api.accounting.suppliers.show":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["GET","HEAD"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.edit":{"uri":"api\/accounting\/suppliers\/{supplier}\/edit","methods":["GET","HEAD"]},"api.accounting.suppliers.update":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["PUT","PATCH"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.destroy":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["DELETE"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.transactions":{"uri":"api\/accounting\/suppliers\/{supplier}\/transactions","methods":["GET","HEAD"],"bindings":{"supplier":"slug"}},"api.accounting.budgets.names":{"uri":"api\/accounting\/budgets\/names","methods":["GET","HEAD"]},"api.accounting.budgets.index":{"uri":"api\/accounting\/budgets","methods":["GET","HEAD"]},"api.accounting.budgets.store":{"uri":"api\/accounting\/budgets","methods":["POST"]},"api.accounting.budgets.show":{"uri":"api\/accounting\/budgets\/{budget}","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.update":{"uri":"api\/accounting\/budgets\/{budget}","methods":["PUT","PATCH"],"bindings":{"budget":"id"}},"api.accounting.budgets.destroy":{"uri":"api\/accounting\/budgets\/{budget}","methods":["DELETE"],"bindings":{"budget":"id"}},"api.accounting.budgets.transactions":{"uri":"api\/accounting\/budgets\/{budget}\/transactions","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.donations":{"uri":"api\/accounting\/budgets\/{budget}\/donations","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.export":{"uri":"api\/accounting\/budgets\/{budget}\/export","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.cmtyvol.ageDistribution":{"uri":"api\/cmtyvol\/ageDistribution","methods":["GET","HEAD"]},"api.cmtyvol.nationalityDistribution":{"uri":"api\/cmtyvol\/nationalityDistribution","methods":["GET","HEAD"]},"api.cmtyvol.genderDistribution":{"uri":"api\/cmtyvol\/genderDistribution","methods":["GET","HEAD"]},"api.cmtyvol.getHeaderMappings":{"uri":"api\/cmtyvol\/getHeaderMappings","methods":["POST"]},"api.cmtyvol.index":{"uri":"api\/cmtyvol","methods":["GET","HEAD"]},"api.cmtyvol.show":{"uri":"api\/cmtyvol\/{cmtyvol}","methods":["GET","HEAD"],"bindings":{"cmtyvol":"id"}},"api.cmtyvol.comments.index":{"uri":"api\/cmtyvol\/{cmtyvol}\/comments","methods":["GET","HEAD"],"bindings":{"cmtyvol":"id"}},"api.cmtyvol.comments.store":{"uri":"api\/cmtyvol\/{cmtyvol}\/comments","methods":["POST"],"bindings":{"cmtyvol":"id"}},"api.visitors.export":{"uri":"api\/visitors\/export","methods":["GET","HEAD"]},"api.visitors.dailyVisitors":{"uri":"api\/visitors\/dailyVisitors","methods":["GET","HEAD"]},"api.visitors.monthlyVisitors":{"uri":"api\/visitors\/monthlyVisitors","methods":["GET","HEAD"]},"api.visitors.dailyRegistrations":{"uri":"api\/visitors\/dailyRegistrations","methods":["GET","HEAD"]},"api.visitors.ageDistribution":{"uri":"api\/visitors\/ageDistribution","methods":["GET","HEAD"]},"api.visitors.nationalityDistribution":{"uri":"api\/visitors\/nationalityDistribution","methods":["GET","HEAD"]},"api.visitors.checkInsByPurpose":{"uri":"api\/visitors\/checkInsByPurpose","methods":["GET","HEAD"]},"api.visitors.checkInsByVisitor":{"uri":"api\/visitors\/checkInsByVisitor","methods":["GET","HEAD"]},"api.visitors.checkins":{"uri":"api\/visitors\/checkins","methods":["GET","HEAD"]},"api.visitors.index":{"uri":"api\/visitors","methods":["GET","HEAD"]},"api.visitors.store":{"uri":"api\/visitors","methods":["POST"]},"api.visitors.show":{"uri":"api\/visitors\/{visitor}","methods":["GET","HEAD"],"bindings":{"visitor":"id"}},"api.visitors.update":{"uri":"api\/visitors\/{visitor}","methods":["PUT"],"bindings":{"visitor":"id"}},"api.visitors.destroy":{"uri":"api\/visitors\/{visitor}","methods":["DELETE"],"bindings":{"visitor":"id"}},"api.visitors.checkin":{"uri":"api\/visitors\/{visitor}\/checkins","methods":["POST"],"bindings":{"visitor":"id"}},"api.visitors.signLiabilityForm":{"uri":"api\/visitors\/{visitor}\/signLiabilityForm","methods":["POST"],"bindings":{"visitor":"id"}},"api.visitors.giveParentalConsent":{"uri":"api\/visitors\/{visitor}\/giveParentalConsent","methods":["POST"],"bindings":{"visitor":"id"}},"api.badges.make":{"uri":"api\/badges\/make","methods":["POST"]},"api.badges.parseSpreadsheet":{"uri":"api\/badges\/parseSpreadsheet","methods":["POST"]},"api.badges.fetchCommunityVolunteers":{"uri":"api\/badges\/fetchCommunityVolunteers","methods":["GET","HEAD"]},"api.userprofile":{"uri":"api\/userprofile","methods":["GET","HEAD"]},"api.userprofile.update":{"uri":"api\/userprofile","methods":["POST"]},"api.userprofile.updatePassword":{"uri":"api\/userprofile\/updatePassword","methods":["POST"]},"api.userprofile.delete":{"uri":"api\/userprofile","methods":["DELETE"]},"api.userprofile.2fa.index":{"uri":"api\/userprofile\/2FA","methods":["GET","HEAD"]},"api.userprofile.2fa.store":{"uri":"api\/userprofile\/2FA","methods":["POST"]},"api.comments.show":{"uri":"api\/comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"id"}},"api.comments.update":{"uri":"api\/comments\/{comment}","methods":["PUT","PATCH"],"bindings":{"comment":"id"}},"api.comments.destroy":{"uri":"api\/comments\/{comment}","methods":["DELETE"],"bindings":{"comment":"id"}},"api.settings.fields":{"uri":"api\/settings\/fields","methods":["GET","HEAD"]},"api.settings.update":{"uri":"api\/settings","methods":["PUT"]},"api.settings.reset":{"uri":"api\/settings","methods":["DELETE"]},"api.countries":{"uri":"api\/countries","methods":["GET","HEAD"]},"api.languages":{"uri":"api\/languages","methods":["GET","HEAD"]},"api.settings":{"uri":"api\/settings","methods":["GET","HEAD"]},"api.changelog":{"uri":"api\/changelog","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"users.permissions":{"uri":"admin\/users\/permissions","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"users.create":{"uri":"admin\/users\/create","methods":["GET","HEAD"]},"users.store":{"uri":"admin\/users","methods":["POST"]},"users.show":{"uri":"admin\/users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"id"}},"users.edit":{"uri":"admin\/users\/{user}\/edit","methods":["GET","HEAD"],"bindings":{"user":"id"}},"users.update":{"uri":"admin\/users\/{user}","methods":["PUT","PATCH"],"bindings":{"user":"id"}},"users.destroy":{"uri":"admin\/users\/{user}","methods":["DELETE"],"bindings":{"user":"id"}},"roles.permissions":{"uri":"admin\/roles\/permissions","methods":["GET","HEAD"]},"roles.manageMembers":{"uri":"admin\/roles\/{role}\/members","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.updateMembers":{"uri":"admin\/roles\/{role}\/members","methods":["PUT"],"bindings":{"role":"id"}},"roles.index":{"uri":"admin\/roles","methods":["GET","HEAD"]},"roles.create":{"uri":"admin\/roles\/create","methods":["GET","HEAD"]},"roles.store":{"uri":"admin\/roles","methods":["POST"]},"roles.show":{"uri":"admin\/roles\/{role}","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.edit":{"uri":"admin\/roles\/{role}\/edit","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.update":{"uri":"admin\/roles\/{role}","methods":["PUT","PATCH"],"bindings":{"role":"id"}},"roles.destroy":{"uri":"admin\/roles\/{role}","methods":["DELETE"],"bindings":{"role":"id"}},"users.avatar":{"uri":"users\/{user}\/avatar","methods":["GET","HEAD"],"bindings":{"user":"id"}},"accounting.webling.index":{"uri":"accounting\/wallets\/{wallet}\/webling","methods":["GET","HEAD"],"bindings":{"wallet":"id"}},"cmtyvol.index":{"uri":"cmtyvol","methods":["GET","HEAD"]}}}; +const Ziggy = {"url":"http:\/\/localhost","port":null,"defaults":{},"routes":{"api.dashboard":{"uri":"api\/dashboard","methods":["GET","HEAD"]},"api.users.index":{"uri":"api\/users","methods":["GET","HEAD"]},"api.users.store":{"uri":"api\/users","methods":["POST"]},"api.users.show":{"uri":"api\/users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.update":{"uri":"api\/users\/{user}","methods":["PUT","PATCH"],"bindings":{"user":"id"}},"api.users.destroy":{"uri":"api\/users\/{user}","methods":["DELETE"],"bindings":{"user":"id"}},"api.users.disable2FA":{"uri":"api\/users\/{user}\/disable2FA","methods":["PUT"],"bindings":{"user":"id"}},"api.users.disableOAuth":{"uri":"api\/users\/{user}\/disableOAuth","methods":["PUT"],"bindings":{"user":"id"}},"api.users.roles.index":{"uri":"api\/users\/{user}\/roles","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.relationships.roles.index":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["GET","HEAD"],"bindings":{"user":"id"}},"api.users.relationships.roles.store":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["POST"],"bindings":{"user":"id"}},"api.users.relationships.roles.update":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["PUT"],"bindings":{"user":"id"}},"api.users.relationships.roles.destroy":{"uri":"api\/users\/{user}\/relationships\/roles","methods":["DELETE"],"bindings":{"user":"id"}},"api.roles.index":{"uri":"api\/roles","methods":["GET","HEAD"]},"api.roles.store":{"uri":"api\/roles","methods":["POST"]},"api.roles.show":{"uri":"api\/roles\/{role}","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.update":{"uri":"api\/roles\/{role}","methods":["PUT","PATCH"],"bindings":{"role":"id"}},"api.roles.destroy":{"uri":"api\/roles\/{role}","methods":["DELETE"],"bindings":{"role":"id"}},"api.roles.users.index":{"uri":"api\/roles\/{role}\/users","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.administrators.index":{"uri":"api\/roles\/{role}\/administrators","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.users.index":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.users.store":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["POST"],"bindings":{"role":"id"}},"api.roles.relationships.users.update":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["PUT"],"bindings":{"role":"id"}},"api.roles.relationships.users.destroy":{"uri":"api\/roles\/{role}\/relationships\/users","methods":["DELETE"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.index":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["GET","HEAD"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.store":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["POST"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.update":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["PUT"],"bindings":{"role":"id"}},"api.roles.relationships.administrators.destroy":{"uri":"api\/roles\/{role}\/relationships\/administrators","methods":["DELETE"],"bindings":{"role":"id"}},"api.fundraising.donors.export":{"uri":"api\/fundraising\/donors\/export","methods":["GET","HEAD"]},"api.fundraising.donors.salutations":{"uri":"api\/fundraising\/donors\/salutations","methods":["GET","HEAD"]},"api.fundraising.donors.names":{"uri":"api\/fundraising\/donors\/names","methods":["GET","HEAD"]},"api.fundraising.donors.index":{"uri":"api\/fundraising\/donors","methods":["GET","HEAD"]},"api.fundraising.donors.store":{"uri":"api\/fundraising\/donors","methods":["POST"]},"api.fundraising.donors.show":{"uri":"api\/fundraising\/donors\/{donor}","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.update":{"uri":"api\/fundraising\/donors\/{donor}","methods":["PUT","PATCH"],"bindings":{"donor":"id"}},"api.fundraising.donors.destroy":{"uri":"api\/fundraising\/donors\/{donor}","methods":["DELETE"],"bindings":{"donor":"id"}},"api.fundraising.donors.vcard":{"uri":"api\/fundraising\/donors\/{donor}\/vcard","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.index":{"uri":"api\/fundraising\/donors\/{donor}\/donations","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.store":{"uri":"api\/fundraising\/donors\/{donor}\/donations","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.donors.donations.export":{"uri":"api\/fundraising\/donors\/{donor}\/donations\/export","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.budgets":{"uri":"api\/fundraising\/donors\/{donor}\/budgets","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.comments.index":{"uri":"api\/fundraising\/donors\/{donor}\/comments","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.comments.store":{"uri":"api\/fundraising\/donors\/{donor}\/comments","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.donors.tags.index":{"uri":"api\/fundraising\/donors\/{donor}\/tags","methods":["GET","HEAD"],"bindings":{"donor":"id"}},"api.fundraising.donors.tags.store":{"uri":"api\/fundraising\/donors\/{donor}\/tags","methods":["POST"],"bindings":{"donor":"id"}},"api.fundraising.tags.index":{"uri":"api\/fundraising\/tags","methods":["GET","HEAD"]},"api.fundraising.donations.channels":{"uri":"api\/fundraising\/donations\/channels","methods":["GET","HEAD"]},"api.fundraising.donations.currencies":{"uri":"api\/fundraising\/donations\/currencies","methods":["GET","HEAD"]},"api.fundraising.donations.export":{"uri":"api\/fundraising\/donations\/export","methods":["GET","HEAD"]},"api.fundraising.donations.import":{"uri":"api\/fundraising\/donations\/import","methods":["POST"]},"api.fundraising.donations.index":{"uri":"api\/fundraising\/donations","methods":["GET","HEAD"]},"api.fundraising.donations.store":{"uri":"api\/fundraising\/donations","methods":["POST"]},"api.fundraising.donations.show":{"uri":"api\/fundraising\/donations\/{donation}","methods":["GET","HEAD"],"bindings":{"donation":"id"}},"api.fundraising.donations.update":{"uri":"api\/fundraising\/donations\/{donation}","methods":["PUT","PATCH"],"bindings":{"donation":"id"}},"api.fundraising.donations.destroy":{"uri":"api\/fundraising\/donations\/{donation}","methods":["DELETE"],"bindings":{"donation":"id"}},"api.fundraising.report.donors.count":{"uri":"api\/fundraising\/report\/donors\/count","methods":["GET","HEAD"]},"api.fundraising.report.donors.languages":{"uri":"api\/fundraising\/report\/donors\/languages","methods":["GET","HEAD"]},"api.fundraising.report.donors.countries":{"uri":"api\/fundraising\/report\/donors\/countries","methods":["GET","HEAD"]},"api.fundraising.report.donors.registrations":{"uri":"api\/fundraising\/report\/donors\/registrations","methods":["GET","HEAD"]},"api.fundraising.report.donations.registrations":{"uri":"api\/fundraising\/report\/donations\/registrations","methods":["GET","HEAD"]},"api.fundraising.report.donations.currencies":{"uri":"api\/fundraising\/report\/donations\/currencies","methods":["GET","HEAD"]},"api.fundraising.report.donations.channels":{"uri":"api\/fundraising\/report\/donations\/channels","methods":["GET","HEAD"]},"api.accounting.wallets.names":{"uri":"api\/accounting\/wallets\/names","methods":["GET","HEAD"]},"api.accounting.wallets.index":{"uri":"api\/accounting\/wallets","methods":["GET","HEAD"]},"api.accounting.wallets.create":{"uri":"api\/accounting\/wallets\/create","methods":["GET","HEAD"]},"api.accounting.wallets.store":{"uri":"api\/accounting\/wallets","methods":["POST"]},"api.accounting.wallets.show":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["GET","HEAD"],"bindings":{"wallet":"id"}},"api.accounting.wallets.edit":{"uri":"api\/accounting\/wallets\/{wallet}\/edit","methods":["GET","HEAD"]},"api.accounting.wallets.update":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["PUT","PATCH"],"bindings":{"wallet":"id"}},"api.accounting.wallets.destroy":{"uri":"api\/accounting\/wallets\/{wallet}","methods":["DELETE"],"bindings":{"wallet":"id"}},"api.accounting.categories.tree":{"uri":"api\/accounting\/categories\/tree","methods":["GET","HEAD"]},"api.accounting.categories.index":{"uri":"api\/accounting\/categories","methods":["GET","HEAD"]},"api.accounting.categories.create":{"uri":"api\/accounting\/categories\/create","methods":["GET","HEAD"]},"api.accounting.categories.store":{"uri":"api\/accounting\/categories","methods":["POST"]},"api.accounting.categories.show":{"uri":"api\/accounting\/categories\/{category}","methods":["GET","HEAD"],"bindings":{"category":"id"}},"api.accounting.categories.edit":{"uri":"api\/accounting\/categories\/{category}\/edit","methods":["GET","HEAD"]},"api.accounting.categories.update":{"uri":"api\/accounting\/categories\/{category}","methods":["PUT","PATCH"],"bindings":{"category":"id"}},"api.accounting.categories.destroy":{"uri":"api\/accounting\/categories\/{category}","methods":["DELETE"],"bindings":{"category":"id"}},"api.accounting.projects.tree":{"uri":"api\/accounting\/projects\/tree","methods":["GET","HEAD"]},"api.accounting.projects.index":{"uri":"api\/accounting\/projects","methods":["GET","HEAD"]},"api.accounting.projects.create":{"uri":"api\/accounting\/projects\/create","methods":["GET","HEAD"]},"api.accounting.projects.store":{"uri":"api\/accounting\/projects","methods":["POST"]},"api.accounting.projects.show":{"uri":"api\/accounting\/projects\/{project}","methods":["GET","HEAD"],"bindings":{"project":"id"}},"api.accounting.projects.edit":{"uri":"api\/accounting\/projects\/{project}\/edit","methods":["GET","HEAD"]},"api.accounting.projects.update":{"uri":"api\/accounting\/projects\/{project}","methods":["PUT","PATCH"],"bindings":{"project":"id"}},"api.accounting.projects.destroy":{"uri":"api\/accounting\/projects\/{project}","methods":["DELETE"],"bindings":{"project":"id"}},"api.accounting.transactions.summary":{"uri":"api\/accounting\/transactions\/summary","methods":["GET","HEAD"]},"api.accounting.transactions.index":{"uri":"api\/accounting\/transactions","methods":["GET","HEAD"]},"api.accounting.transactions.store":{"uri":"api\/accounting\/transactions","methods":["POST"]},"api.accounting.transactions.export":{"uri":"api\/accounting\/transactions\/export","methods":["GET","HEAD"]},"api.accounting.transactions.updateReceipt":{"uri":"api\/accounting\/transactions\/{transaction}\/receipt","methods":["POST"],"bindings":{"transaction":"id"}},"api.accounting.transactions.rotateReceipt":{"uri":"api\/accounting\/transactions\/{transaction}\/receipt\/rotate","methods":["PUT"],"bindings":{"transaction":"id"}},"api.accounting.transactions.history":{"uri":"api\/accounting\/transactions\/history","methods":["GET","HEAD"]},"api.accounting.transactions.transactionHistory":{"uri":"api\/accounting\/transactions\/{transaction}\/history","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.secondaryCategories":{"uri":"api\/accounting\/transactions\/secondaryCategories","methods":["GET","HEAD"]},"api.accounting.transactions.locations":{"uri":"api\/accounting\/transactions\/locations","methods":["GET","HEAD"]},"api.accounting.transactions.costCenters":{"uri":"api\/accounting\/transactions\/costCenters","methods":["GET","HEAD"]},"api.accounting.transactions.attendees":{"uri":"api\/accounting\/transactions\/attendees","methods":["GET","HEAD"]},"api.accounting.transactions.taxonomies":{"uri":"api\/accounting\/transactions\/taxonomies","methods":["GET","HEAD"]},"api.accounting.transactions.controllable":{"uri":"api\/accounting\/transactions\/controllable","methods":["GET","HEAD"]},"api.accounting.transactions.show":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.update":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["PUT","PATCH"],"bindings":{"transaction":"id"}},"api.accounting.transactions.destroy":{"uri":"api\/accounting\/transactions\/{transaction}","methods":["DELETE"],"bindings":{"transaction":"id"}},"api.accounting.transactions.undoBooking":{"uri":"api\/accounting\/transactions\/{transaction}\/undoBooking","methods":["PUT"],"bindings":{"transaction":"id"}},"api.accounting.transactions.controlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["GET","HEAD"],"bindings":{"transaction":"id"}},"api.accounting.transactions.markControlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["POST"],"bindings":{"transaction":"id"}},"api.accounting.transactions.undoControlled":{"uri":"api\/accounting\/transactions\/{transaction}\/controlled","methods":["DELETE"],"bindings":{"transaction":"id"}},"api.accounting.suppliers.export":{"uri":"api\/accounting\/suppliers\/export","methods":["GET","HEAD"]},"api.accounting.suppliers.names":{"uri":"api\/accounting\/suppliers\/names","methods":["GET","HEAD"]},"api.accounting.suppliers.index":{"uri":"api\/accounting\/suppliers","methods":["GET","HEAD"]},"api.accounting.suppliers.create":{"uri":"api\/accounting\/suppliers\/create","methods":["GET","HEAD"]},"api.accounting.suppliers.store":{"uri":"api\/accounting\/suppliers","methods":["POST"]},"api.accounting.suppliers.show":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["GET","HEAD"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.edit":{"uri":"api\/accounting\/suppliers\/{supplier}\/edit","methods":["GET","HEAD"]},"api.accounting.suppliers.update":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["PUT","PATCH"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.destroy":{"uri":"api\/accounting\/suppliers\/{supplier}","methods":["DELETE"],"bindings":{"supplier":"slug"}},"api.accounting.suppliers.transactions":{"uri":"api\/accounting\/suppliers\/{supplier}\/transactions","methods":["GET","HEAD"],"bindings":{"supplier":"slug"}},"api.accounting.budgets.names":{"uri":"api\/accounting\/budgets\/names","methods":["GET","HEAD"]},"api.accounting.budgets.index":{"uri":"api\/accounting\/budgets","methods":["GET","HEAD"]},"api.accounting.budgets.store":{"uri":"api\/accounting\/budgets","methods":["POST"]},"api.accounting.budgets.show":{"uri":"api\/accounting\/budgets\/{budget}","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.update":{"uri":"api\/accounting\/budgets\/{budget}","methods":["PUT","PATCH"],"bindings":{"budget":"id"}},"api.accounting.budgets.destroy":{"uri":"api\/accounting\/budgets\/{budget}","methods":["DELETE"],"bindings":{"budget":"id"}},"api.accounting.budgets.transactions":{"uri":"api\/accounting\/budgets\/{budget}\/transactions","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.donations":{"uri":"api\/accounting\/budgets\/{budget}\/donations","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.accounting.budgets.export":{"uri":"api\/accounting\/budgets\/{budget}\/export","methods":["GET","HEAD"],"bindings":{"budget":"id"}},"api.cmtyvol.ageDistribution":{"uri":"api\/cmtyvol\/ageDistribution","methods":["GET","HEAD"]},"api.cmtyvol.nationalityDistribution":{"uri":"api\/cmtyvol\/nationalityDistribution","methods":["GET","HEAD"]},"api.cmtyvol.genderDistribution":{"uri":"api\/cmtyvol\/genderDistribution","methods":["GET","HEAD"]},"api.cmtyvol.getHeaderMappings":{"uri":"api\/cmtyvol\/getHeaderMappings","methods":["POST"]},"api.cmtyvol.index":{"uri":"api\/cmtyvol","methods":["GET","HEAD"]},"api.cmtyvol.show":{"uri":"api\/cmtyvol\/{cmtyvol}","methods":["GET","HEAD"],"bindings":{"cmtyvol":"id"}},"api.cmtyvol.comments.index":{"uri":"api\/cmtyvol\/{cmtyvol}\/comments","methods":["GET","HEAD"],"bindings":{"cmtyvol":"id"}},"api.cmtyvol.comments.store":{"uri":"api\/cmtyvol\/{cmtyvol}\/comments","methods":["POST"],"bindings":{"cmtyvol":"id"}},"api.visitors.export":{"uri":"api\/visitors\/export","methods":["GET","HEAD"]},"api.visitors.dailyVisitors":{"uri":"api\/visitors\/dailyVisitors","methods":["GET","HEAD"]},"api.visitors.monthlyVisitors":{"uri":"api\/visitors\/monthlyVisitors","methods":["GET","HEAD"]},"api.visitors.dailyRegistrations":{"uri":"api\/visitors\/dailyRegistrations","methods":["GET","HEAD"]},"api.visitors.ageDistribution":{"uri":"api\/visitors\/ageDistribution","methods":["GET","HEAD"]},"api.visitors.nationalityDistribution":{"uri":"api\/visitors\/nationalityDistribution","methods":["GET","HEAD"]},"api.visitors.checkInsByPurpose":{"uri":"api\/visitors\/checkInsByPurpose","methods":["GET","HEAD"]},"api.visitors.checkInsByVisitor":{"uri":"api\/visitors\/checkInsByVisitor","methods":["GET","HEAD"]},"api.visitors.checkins":{"uri":"api\/visitors\/checkins","methods":["GET","HEAD"]},"api.visitors.index":{"uri":"api\/visitors","methods":["GET","HEAD"]},"api.visitors.store":{"uri":"api\/visitors","methods":["POST"]},"api.visitors.show":{"uri":"api\/visitors\/{visitor}","methods":["GET","HEAD"],"bindings":{"visitor":"id"}},"api.visitors.update":{"uri":"api\/visitors\/{visitor}","methods":["PUT"],"bindings":{"visitor":"id"}},"api.visitors.destroy":{"uri":"api\/visitors\/{visitor}","methods":["DELETE"],"bindings":{"visitor":"id"}},"api.visitors.checkin":{"uri":"api\/visitors\/{visitor}\/checkins","methods":["POST"],"bindings":{"visitor":"id"}},"api.visitors.signLiabilityForm":{"uri":"api\/visitors\/{visitor}\/signLiabilityForm","methods":["POST"],"bindings":{"visitor":"id"}},"api.visitors.giveParentalConsent":{"uri":"api\/visitors\/{visitor}\/giveParentalConsent","methods":["POST"],"bindings":{"visitor":"id"}},"api.badges.make":{"uri":"api\/badges\/make","methods":["POST"]},"api.badges.parseSpreadsheet":{"uri":"api\/badges\/parseSpreadsheet","methods":["POST"]},"api.badges.fetchCommunityVolunteers":{"uri":"api\/badges\/fetchCommunityVolunteers","methods":["GET","HEAD"]},"api.userprofile":{"uri":"api\/userprofile","methods":["GET","HEAD"]},"api.userprofile.update":{"uri":"api\/userprofile","methods":["POST"]},"api.userprofile.updatePassword":{"uri":"api\/userprofile\/updatePassword","methods":["POST"]},"api.userprofile.delete":{"uri":"api\/userprofile","methods":["DELETE"]},"api.userprofile.2fa.index":{"uri":"api\/userprofile\/2FA","methods":["GET","HEAD"]},"api.userprofile.2fa.store":{"uri":"api\/userprofile\/2FA","methods":["POST"]},"api.comments.show":{"uri":"api\/comments\/{comment}","methods":["GET","HEAD"],"bindings":{"comment":"id"}},"api.comments.update":{"uri":"api\/comments\/{comment}","methods":["PUT","PATCH"],"bindings":{"comment":"id"}},"api.comments.destroy":{"uri":"api\/comments\/{comment}","methods":["DELETE"],"bindings":{"comment":"id"}},"api.settings.fields":{"uri":"api\/settings\/fields","methods":["GET","HEAD"]},"api.settings.update":{"uri":"api\/settings","methods":["POST"]},"api.settings.reset":{"uri":"api\/settings","methods":["DELETE"]},"api.settings.resetField":{"uri":"api\/settings\/{key}","methods":["DELETE"]},"api.countries":{"uri":"api\/countries","methods":["GET","HEAD"]},"api.languages":{"uri":"api\/languages","methods":["GET","HEAD"]},"api.settings":{"uri":"api\/settings","methods":["GET","HEAD"]},"api.changelog":{"uri":"api\/changelog","methods":["GET","HEAD"]},"login":{"uri":"login","methods":["GET","HEAD"]},"users.permissions":{"uri":"admin\/users\/permissions","methods":["GET","HEAD"]},"users.index":{"uri":"admin\/users","methods":["GET","HEAD"]},"users.create":{"uri":"admin\/users\/create","methods":["GET","HEAD"]},"users.store":{"uri":"admin\/users","methods":["POST"]},"users.show":{"uri":"admin\/users\/{user}","methods":["GET","HEAD"],"bindings":{"user":"id"}},"users.edit":{"uri":"admin\/users\/{user}\/edit","methods":["GET","HEAD"],"bindings":{"user":"id"}},"users.update":{"uri":"admin\/users\/{user}","methods":["PUT","PATCH"],"bindings":{"user":"id"}},"users.destroy":{"uri":"admin\/users\/{user}","methods":["DELETE"],"bindings":{"user":"id"}},"roles.permissions":{"uri":"admin\/roles\/permissions","methods":["GET","HEAD"]},"roles.manageMembers":{"uri":"admin\/roles\/{role}\/members","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.updateMembers":{"uri":"admin\/roles\/{role}\/members","methods":["PUT"],"bindings":{"role":"id"}},"roles.index":{"uri":"admin\/roles","methods":["GET","HEAD"]},"roles.create":{"uri":"admin\/roles\/create","methods":["GET","HEAD"]},"roles.store":{"uri":"admin\/roles","methods":["POST"]},"roles.show":{"uri":"admin\/roles\/{role}","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.edit":{"uri":"admin\/roles\/{role}\/edit","methods":["GET","HEAD"],"bindings":{"role":"id"}},"roles.update":{"uri":"admin\/roles\/{role}","methods":["PUT","PATCH"],"bindings":{"role":"id"}},"roles.destroy":{"uri":"admin\/roles\/{role}","methods":["DELETE"],"bindings":{"role":"id"}},"users.avatar":{"uri":"users\/{user}\/avatar","methods":["GET","HEAD"],"bindings":{"user":"id"}},"accounting.webling.index":{"uri":"accounting\/wallets\/{wallet}\/webling","methods":["GET","HEAD"],"bindings":{"wallet":"id"}},"cmtyvol.index":{"uri":"cmtyvol","methods":["GET","HEAD"]}}}; if (typeof window !== 'undefined' && typeof window.Ziggy !== 'undefined') { Object.assign(Ziggy.routes, window.Ziggy.routes); diff --git a/routes/api.php b/routes/api.php index c2ba08cfc..1cb659775 100644 --- a/routes/api.php +++ b/routes/api.php @@ -403,10 +403,12 @@ // Route::get('settings/fields', [SettingsController::class, 'fields']) ->name('settings.fields'); - Route::put('settings', [SettingsController::class, 'update']) + Route::post('settings', [SettingsController::class, 'update']) ->name('settings.update'); Route::delete('settings', [SettingsController::class, 'reset']) ->name('settings.reset'); + Route::delete('settings/{key}', [SettingsController::class, 'resetField']) + ->name('settings.resetField'); }); // RaiseNow Webhook