averbraeck / housinggame-admin

Administrator app for the Housing Game
https://housing-game.tbm.tudelft.nl
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

When editing house measures, don't show personal measures #50

Open averbraeck opened 3 days ago

averbraeck commented 3 days ago

The table for editing house measures in the admin app does not yet filter out the personal measures. The selection does work, however:

image

Furthermore, it seems that a 'null' option is allowed in the picklist. This has to be researched.

averbraeck commented 1 day ago

The code that will retrieve the correct table data is:

setPickTable(data, Tables.MEASURETYPE.join(Tables.MEASURECATEGORY)
    .on(Tables.MEASURETYPE.MEASURECATEGORY_ID.eq(Tables.MEASURECATEGORY.ID))
    .and(Tables.MEASURECATEGORY.GAMEVERSION_ID.eq(gameVersion.getId()))
    .and(Tables.MEASURETYPE.HOUSE_MEASURE.ne((byte) 0)),
    Tables.MEASURETYPE.ID, Tables.MEASURETYPE.NAME)