forked from alfio-event/alf.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alfio-event#549 - Retrieve fields as a map (object in angularJS) and…
… iterate over the object to display fields
- Loading branch information
Nassim Bounouas
committed
Dec 1, 2018
1 parent
f257f19
commit 262f3d1
Showing
4 changed files
with
26 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 21 additions & 5 deletions
26
src/main/java/alfio/controller/api/admin/WaitingQueueDownloader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,28 @@ | ||
package alfio.controller.api.admin; | ||
|
||
import java.util.Arrays; | ||
import java.util.List; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class WaitingQueueDownloader { | ||
private static final List<String> FIXED_FIELDS = Arrays.asList("ID", "Creation", "Event", "Status", "Full Name", "First Name", "Last Name", "E-Mail", "Ticket Reservation Id", "Language", "Selected category", "Subscription type"); | ||
private Map<String, String> map; | ||
|
||
public static List<String> availableFields() { | ||
return FIXED_FIELDS; | ||
public WaitingQueueDownloader() { | ||
map = new HashMap<>(); | ||
map.put("id", "ID"); | ||
map.put("creation", "Creation"); | ||
map.put("event", "Event"); | ||
map.put("status", "Status"); | ||
map.put("fullname", "Full Name"); | ||
map.put("firstname", "First Name"); | ||
map.put("lastname", "Last Name"); | ||
map.put("email", "E-Mail"); | ||
map.put("ticket_reservation_id", "Ticket Reservation Id"); | ||
map.put("language", "Language"); | ||
map.put("selected_category", "Selected category"); | ||
map.put("subscription_type", "Subscription type"); | ||
} | ||
|
||
public Map<String, String> availableFields() { | ||
return this.map; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters