コード例 #1
0
  public static void show(Long id) {
    Bowl bowl = Bowl.findById(id);

    List<Participant> bowlParticipants = Participant.calculateShares(bowl);
    List<Bill> bills = Bill.generateByBowl(bowl);

    render(bowl, bowlParticipants, bills);
  }
コード例 #2
0
  public static void users(Long id, String query) {
    Bowl bowl = Bowl.findById(id);
    List<User> users = null;
    if (query != null && !query.isEmpty()) {
      users = User.findByNickNameExcludeBowls(query, bowl, new Pagination(1, 10));
    }

    render(bowl, users, query);
  }
コード例 #3
0
  public static void expenses(Long id) {
    Bowl bowl = Bowl.fetchUsersById(id);
    List<User> users = bowl.users;

    render(bowl, users);
  }
コード例 #4
0
  public static void delete(Long id) {
    Bowl bowl = Bowl.findById(id);
    bowl.delete();

    render(bowl);
  }
コード例 #5
0
  public static void list() {
    List<Bowl> bowls = Bowl.findByUser(currentUser);

    render(bowls);
  }
コード例 #6
0
  public static void edit(Long id) {
    Bowl bowl = Bowl.findById(id);

    render(bowl);
  }