3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-04 12:35:35 +00:00

Use profile eula API view

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2025-06-22 19:25:05 +01:00
parent 47069ad3f4
commit 103cbfd038
2 changed files with 9 additions and 3 deletions

View File

@ -763,7 +763,7 @@
data-sort-order="asc"
data-sort-name="name"
class="table table-striped snipe-table table-hover"
data-url="{{route('api.user.eulas', $user->id)}}"
data-url="{{ route('api.self.eulas') }}"
data-export-options='{
"fileName": "export-eula-{{ str_slug($user->username) }}-{{ date('Y-m-d') }}",
"ignoreColumn": ["actions","image","change","checkbox","checkincheckout","delete","purchasecost", "icon"]
@ -779,8 +779,7 @@
<th data-visible="true" data-field="item.name">{{ trans('general.item') }}</th>
<th data-visible="true" data-field="created_at" data-sortable="true" data-formatter="dateDisplayFormatter">{{ trans('general.accepted_date') }}</th>
<th data-field="note">{{ trans('general.notes') }}</th>
<th data-field="signature_file" data-visible="false" data-formatter="imageFormatter">{{ trans('general.signature') }}</th>
<th data-field="file" data-formatter="fileUploadFormatter">{{ trans('general.download') }}</th>
<th data-field="url" data-formatter="downloadFormatter">{{ trans('general.download') }}</th>
</tr>
</thead>
</table>

View File

@ -40,6 +40,13 @@ Route::group(['prefix' => 'v1', 'middleware' => ['api', 'api-throttle:api']], fu
]
)->name('api.assets.requested');
Route::get('eulas',
[
Api\ProfileController::class,
'eulas'
]
)->name('api.self.eulas');
Route::post('request/{asset}', [Api\CheckoutRequest::class, 'store'])->name('api.assets.requests.store');
Route::post('request/{asset}/cancel', [Api\CheckoutRequest::class, 'destroy'])->name('api.assets.requests.destroy');