Files
jobbi-bewerbung/views/partials/labelPicker.ejs
T
thomasandClaude Opus 4.8 03760d293f Labels für Stellen (Bewerbungen + Jobangebote), inkl. API & Swagger
Mehrere Labels pro Stelle (Regional, Remote-Deutschlandweit,
Homeoffice-Deutschlandweit), gespeichert als JSON-Array in einer neuen
labels-Spalte beider Tabellen (Migration). Geteiltes lib/labels.js mit
parse/serialize; wiederverwendbare Partials fuer Chips + Mehrfachauswahl.

- Web: setzen im Hinzufuegen-Modal, auf der Bearbeiten-Seite und im
  Jobangebot-Bearbeiten-Formular; Anzeige als Chips in den Listen.
- Uebernahme eines Angebots traegt dessen Labels in die neue Bewerbung.
- REST-API: labels[] in /applications und /joboffers (GET/POST/PUT),
  Filter ?label=…; OpenAPI/Swagger-Schemas + Enums erweitert.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 15:23:44 +02:00

17 lines
989 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<%
// Multi-select label picker (checkboxes named "labels"). Expects locals:
// labelOptions array of all selectable labels
// selected array of currently selected labels (optional)
var _opts = (typeof labelOptions !== 'undefined' && labelOptions) ? labelOptions : [];
var _sel = (typeof selected !== 'undefined' && selected) ? selected : [];
%>
<div class="flex flex-wrap gap-2">
<% _opts.forEach(function (opt) { %>
<label class="inline-flex items-center gap-2 px-3 py-1.5 rounded-full border cursor-pointer text-sm transition-colors border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-700">
<input type="checkbox" name="labels" value="<%= opt %>" <%= _sel.indexOf(opt) !== -1 ? 'checked' : '' %>
class="rounded border-gray-300 dark:border-gray-500 text-blue-600 focus:ring-blue-500">
<span class="text-gray-700 dark:text-gray-200"><%= opt %></span>
</label>
<% }); %>
</div>