Skip to content

appState internal data structure

Gabrielle Singh Cadieux edited this page Aug 24, 2017 · 6 revisions

DB data

"offers": {
  "fetching": int,                            # count of currently active GET requests for this resource
  "list": {  
    offerId: {                                # offer.id
      "applicant_id": int,                    # offer.applicant_id
      "first_name": string,                   # offer.applicant.first_name
      "last_name": string,                    # offer.applicant.last_name
      "student_number": int,                  # offer.applicant.student_number
      "email": string,                        # offer.applicant.email
      "contract_details": {
        "position": string,                   # offer.position
        "sessional_year": int,                # offer.session.year,
        "sessional_semester": int,            # offer.session.semester,
        "hours": int,                         # offer.hours,
        "start_date": string,                 # offer.session.start_date
        "end_date: string,                    # offer.session.end_date
        "pay": int,                           # offer.session.pay
        "link": string,                       # offer.link
        "signature": blob,                    # offer.signature
      },
      "contract_statuses": {
        "nag_count": int,                     # offer.nag_count
        "status": string,                     # offer.status
        "hr_status": string,                  # offer.hr_status
        "ddah_status": string,                # offer.ddah_status
        "sent_at": string,                    # offer.send_date,
        "printed_at": string,                 # offer.print_time
      }
    }
  }
}

"importing": int                              # count of currently active import requests to the database

View data

"role": string,                               # instructor or administrator
"user": string,                               # username of current user

"notifications": [string]                     # unread notifications

"alerts": [string]                            # active alerts

"selectedSortFields": [[int1, int2]]          # int1 is an index into the list of fields used by TableMenu
                                              # int2 is the direction of the sort (-1 for down, 1 for up)
"selectedFilters": {
  fieldIndex: categoryIndex (int)             # fieldIndex is an index into the list of fields used by TableMenu
                                              # categoryIndex is an index into the list of categories for the field
}

Clone this wiki locally