- GET /offering/count
- GET /offering/findOne
- GET /offering/start-date-from-range
- GET /offering-course
- GET /offering-course/count
- POST /offering-course/update
- GET /offering-course/findOne
- GET /offering-course/list
- GET /offering-accommodation/count
- GET /offering-accommodation/findOne
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
[ | |
{ | |
"codeName": "STUDENT", | |
"studentEnrollmentSections": [ | |
{ | |
"codeName": "STUDENT", | |
"studentEnrollmentFields": [ | |
{ | |
"codeName": "FIRSTNAME", | |
"placeholder": "PH_FIRSTNAME", |
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
public async isValidEndDateFantasy (offeringId: number, endDate: string) { | |
// doLoadOffering :: number -> Promise(Either(AppError, Offering)) | |
const loadOffering = new Task((reject, result) => { | |
this.Models.Offering.load(offeringId) | |
.then((offering) => { | |
if (isNil(offering)) { | |
return reject(new AppError(`OfferingId ${offeringId} did not correspond to an offering`)) | |
} | |
return result(offering) |
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
/** | |
* Simple wizard | |
* design philosophy: simplicity, wysiwyg, isolated responsibilities | |
* key design decision: each wizard step is aware that it's part of a wizard | |
* upside: simple and flexible | |
* downside: more boilerplate | |
* case-by-case: when we need to add or rearrange the steps, we also need to modify existing steps (smell: Shotgun Surgery) | |
* however, this is aligned with the key design decision | |
* | |
* alternative key design: opposite - isolated steps that are unaware of the fact that they're part of a wizard |
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
type IApplicableFeeMap = Map<string, IApplicableFee> | |
class ApplicableFeesCooridinator { | |
protected applicableFees: IApplicableFee[] | |
constructor(protected Models: IModels, prices: IOfferingPriceDerivedBase[]) { | |
... | |
this.applicableFees = this.generateApplicableFees(prices) | |
} |
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
mutation createQuote { | |
createStudentQuote(input: { | |
studentId: 153254, | |
languageId: 1, | |
studentQuoteOptions: { | |
priceCurrencyId: 26, | |
studentQuoteOptionCourseItems: [{ | |
offeringId: 5666, | |
startDate: "2018-12-02", | |
durationAmount: 4, |
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
const serializeOfferingOptions = R.map(R.compose( | |
R.pick([ | |
'offeringOptions', | |
'offeringId', | |
'offeringPackageOptionId', | |
'durationAmount', | |
'durationTypeId', | |
'startDate', | |
'selectedPackageOptionItems' | |
]), |
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
/* | |
Background: | |
We have a component with two buttons, one button for adding a new empty fee variation, another for duplicating an existing fee variation. | |
for example: | |
button(click='uiModel.addVariation()') Add New | |
button(click='uiModel.duplicateVariation(seed)') Duplicate | |
There are four different implementations: |