Add Languages and school classes lookups

Issue #91 closed
Brian Lewis repo owner created an issue

These two lookups needed for school form

Comments (7)

  1. Brian Lewis reporter

    This is controlled in Pineapples.Data, DSLookups

    DSLookups maintains a dictionary of lookup names and the SQL Statements that retrieve them. These SQL statements are designed to return the lookup code as C, the lookup description ( or name) as N.

    Add two new entries to this array, called languages and schoolClasses

    Construct the sql for each to read from the views TRLanguage and TRSchoolClass (The data is in the tables lkpLanguage and lkpSchoolClass, the corresponding TRx views just choose the description from up to 3 languages - codeDescription codeDescriptionL1 codeDescriptionL2 - on the table. )

    Add the new entries 'languages' and 'schoolClasses' to the array in the method core(). This defines all the lookup tables fetched on application startup.

    Build the project, and the Pineapples project!

    To test if it has worked, you can use fiddler composer to GET api/lookups/collection/core: Capture.PNG

  2. Brian Lewis reporter

    Note on the screen image above: the lookups method do not require authorization (they care called before signin) so you don't need a bearer Token authorization header to test this call.

  3. Ghislain Hachey

    Sure I will include this issue in. It's taking me a little longer but I will get to this first thing after lunch.

  4. Log in to comment