4 * Copyright © 2003-2024 The Galette Team
6 * This file is part of Galette (https://galette.eu).
8 * Galette is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
13 * Galette is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
22 use Galette\Controllers\GaletteController
;
23 use Galette\Controllers\Crud
;
24 use Galette\Controllers\CsvController
;
25 use Galette\Controllers\PdfController
;
26 use Galette\Entity\Contribution
;
29 '/{type:transactions|contributions}/mine',
30 [Crud\ContributionsController
::class, 'myList']
31 )->setName('myContributions')->add($authenticate);
34 '/{type:transactions|contributions}[/{option:page|order|member}/{value:\d+|all}]',
35 [Crud\ContributionsController
::class, 'list']
36 )->setName('contributions')->add($authenticate);
39 '/{type:contributions|transactions}/filter',
40 [Crud\ContributionsController
::class, 'filter']
41 )->setName('payments_filter')->add($authenticate);
44 '/contribution/{type:' . Contribution
::TYPE_FEE
. '|' . Contribution
::TYPE_DONATION
. '}/add',
45 [Crud\ContributionsController
::class, 'add']
46 )->setName('addContribution')->add($authenticate);
49 '/contribution/{type:' . Contribution
::TYPE_FEE
. '|' . Contribution
::TYPE_DONATION
. '}/edit/{id:\d+}',
50 [Crud\ContributionsController
::class, 'edit']
51 )->setName('editContribution')->add($authenticate);
54 '/contribution/{type:' . Contribution
::TYPE_FEE
. '|' . Contribution
::TYPE_DONATION
. '}/add',
55 [Crud\ContributionsController
::class, 'doAdd']
56 )->setName('doAddContribution')->add($authenticate);
59 '/contribution/{type:' . Contribution
::TYPE_FEE
. '|' . Contribution
::TYPE_DONATION
. '}/edit/{id:\d+}',
60 [Crud\ContributionsController
::class, 'doEdit']
61 )->setName('doEditContribution')->add($authenticate);
63 //Batch actions on contributions list
65 '/{type:contributions|transactions}/batch',
66 [Crud\ContributionsController
::class, 'handleBatch']
67 )->setName('batch-contributionslist')->add($authenticate);
69 //contributions list CSV export
72 '/{type:contributions|transactions}/export/csv',
73 [CsvController
::class, 'contributionsExport']
74 )->setName('csv-contributionslist')->add($authenticate);
78 [Crud\TransactionsController
::class, 'add']
79 )->setName('addTransaction')->add($authenticate);
82 '/transaction/edit/{id:\d+}',
83 [Crud\TransactionsController
::class, 'edit']
84 )->setName('editTransaction')->add($authenticate);
87 '/transaction/{id}/attach/{cid}',
88 [Crud\TransactionsController
::class, 'attach']
89 )->setName('attach_contribution')->add($authenticate);
92 '/transaction/{id}/detach/{cid}',
93 [Crud\TransactionsController
::class, 'detach']
94 )->setName('detach_contribution')->add($authenticate);
98 [Crud\TransactionsController
::class, 'doAdd']
99 )->setName('doEditTransaction')->add($authenticate);
102 '/transaction/edit/{id:\d+}',
103 [Crud\TransactionsController
::class, 'doEdit']
104 )->setName('doEditTransaction')->add($authenticate);
107 '/{type:contributions|transactions}/remove' . '/{id:\d+}',
108 [Crud\ContributionsController
::class, 'confirmDelete']
109 )->setName('removeContribution')->add($authenticate);
112 '/{type:contributions|transactions}/batch/remove',
113 [Crud\ContributionsController
::class, 'confirmDelete']
114 )->setName('removeContributions')->add($authenticate);
117 '/{type:contributions|transactions}/remove[/{id}]',
118 [Crud\ContributionsController
::class, 'delete']
119 )->setName('doRemoveContribution')->add($authenticate);
123 '/contribution/print/{id:\d+}',
124 [PdfController
::class, 'contribution']
125 )->setName('printContribution')->add($authenticate);
128 '/document/download/{hash}',
129 [GaletteController
::class, 'documentLink']
130 )->setName('directlink');
133 '/document/download/{hash}',
134 [PdfController
::class, 'directlinkDocument']
135 )->setName('get-directlink');
138 '/contribution/mass-add/choose-type',
139 [Crud\ContributionsController
::class, 'massAddChooseType']
140 )->setName('massAddContributionsChooseType')->add($authenticate);
143 '/contribution/mass-add',
144 [Crud\ContributionsController
::class, 'massAddContributions']
145 )->setName('massAddContributions')->add($authenticate);
148 '/contribution/do-mass-add',
149 [Crud\ContributionsController
::class, 'doMassAddContributions']
150 )->setName('doMassAddContributions')->add($authenticate);