-
Notifications
You must be signed in to change notification settings - Fork 3
Capacities and occupancies for service and program occurrences #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
htysc
wants to merge
46
commits into
master
Choose a base branch
from
capacities
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
0a2ca21
Changes to list overview in Clients and Need Occurences
Damon-D-Ma 830c727
Revert local backend index.js changes
Damon-D-Ma 735256f
Base Code for Service Waitlist Type
Damon-D-Ma e91597d
Completed Service Waitlist Feature
Damon-D-Ma 1739f27
Add capacity to service and program occurrences
htysc a1ec584
Add occupancy to service and program occurrences
htysc 9910ac4
Add occurrence status (string for now)
htysc 69de1f4
Use options for program and service occurrences
htysc 92e6d45
Let capacities be unlimited
htysc 6b2e375
Set occupancy to 0 on creation
htysc 2839427
Bugfix on NumberField & partial CO deletion.
LesterLyu 193163b
Registration statuses
htysc dd34179
Customized service registration status options
htysc 652e572
Customized program registration status options
htysc d95b58a
Registration status option fixes
htysc 74adf7a
Service registration status backend (except for waitlists)
htysc 76a096f
Merge branch 'master' into capacities
htysc fa09dde
Fix bugs
htysc 07bb558
Program registration status backend (except for waitlists)
htysc 0f232af
Fix bugs
htysc a660b8d
Update waitlist TODOs
htysc 00dd1f3
Updates to Waitlist + New Entry Model
Damon-D-Ma 708cbf0
Added Required Functions to Manipulate Service Waitlists
Damon-D-Ma f926dc1
Fix occupancy update bug
htysc ea4ef26
Added auto-create waitlist for serviceOccurrence
Damon-D-Ma 1e55e15
Updated waitlistEntryModel
Damon-D-Ma fa466b4
Forgot to fix import statements
Damon-D-Ma cb0d9dd
Changes to backend waitlistEntry Components
Damon-D-Ma cf4e8a6
Changes to waitlistEntry Structure
Damon-D-Ma 45ce943
Forgot to Rename serviceWaitlist Attribute
Damon-D-Ma b34b528
Updated waitlist functions
Damon-D-Ma 23f989b
Implemented Changes From Code Review
Damon-D-Ma 5b67143
More Fixes From Code Review
Damon-D-Ma ca862ae
Created Models for program waitlists + entries
Damon-D-Ma bc88bed
Added Program Waitlists
Damon-D-Ma 2eb86a4
Use waitlist functions (not fully tested yet)
htysc e19c7b6
Fix bugs
htysc 63b4839
Implement service occurrence capacity change checks
htysc 1c99ac1
Waitlists for program occurrences
htysc 5c40d5f
Fix bug
htysc 8c1a524
Added functionality for programWaitlist, code style changes
Damon-D-Ma ec1832e
Fix bugs
htysc 5422bce
Prevent updating a registration's occurrence
htysc 194de23
Added New General FAQ Guide for Codebase Newcomers
Damon-D-Ma 8c94e97
Guide got ignored by gitignore for some reason
Damon-D-Ma 6d91055
Merge branch 'master' into capacities
LesterLyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| const {createGraphDBModel, DeleteType, Types} = require("graphdb-utils"); | ||
| const { GDBServiceRegistrationModel } = require("../serviceRegistration"); | ||
|
|
||
| const GDBWaitlistEntryModel = createGraphDBModel({ | ||
|
|
||
| serviceRegistration: {type: GDBServiceRegistrationModel, internalKey: ':hasServiceRegistration'}, | ||
| priority: {type: Number, internalKey: ':hasPriority'}, | ||
| date: {type: Date, internalKey: ':hasDate'}, | ||
| }, | ||
| { | ||
| rdfTypes: [':WaitlistEntry'], name: 'waitlistEntry' | ||
| } | ||
|
|
||
| ); | ||
| module.exports = { | ||
| GDBWaitlistEntryModel | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| const {getPredefinedProperty} = require("./helperFunctions"); | ||
| const {GDBInternalTypeModel} = require("../../models/internalType"); | ||
| const {SPARQL} = require("graphdb-utils"); | ||
| const FORMTYPE = 'waitlistEntry' | ||
|
|
||
| const waitlistEntryInternalTypeCreateTreater = async (internalType, instanceData, value) => { | ||
| //get the property name from the internalType | ||
| const property = getPredefinedProperty(FORMTYPE, internalType); | ||
| if (property === 'serviceRegistration' || property === 'priority' || property === 'date'){ | ||
htysc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| instanceData[property] = value; | ||
| } | ||
| }; | ||
|
|
||
| const waitlistEntryInternalTypeFetchTreater = async (data) => { | ||
| const result = {}; | ||
| const schema = data.schema; | ||
| for (const property in data) { | ||
| if (property === 'serviceRegistration' || property === 'priority' || property === 'date') { | ||
htysc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| const internalType = await GDBInternalTypeModel.findOne({predefinedProperty: schema[property].internalKey, formType: FORMTYPE}); | ||
| result[ 'internalType_'+ internalType._id] = SPARQL.ensureFullURI(data[property]); | ||
| } | ||
| } | ||
| return result; | ||
| }; | ||
|
|
||
|
|
||
| const waitlistEntryInternalTypeUpdateTreater = async (internalType, value, result) => { | ||
| await waitlistEntryInternalTypeCreateTreater(internalType, result, value); | ||
| } | ||
|
|
||
|
|
||
| module.exports = {waitlistEntryInternalTypeCreateTreater, waitlistEntryInternalTypeFetchTreater, waitlistEntryInternalTypeUpdateTreater} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.