1
0
Fork 0
Commit Graph

14 Commits (1aa51775f3d4b794b256574500c0d9aa708f4688)

Author SHA1 Message Date
Austin Schaffer 015a3f5d47 [DEV-5312] Convert MongoServerDao to TS 2019-11-11 15:14:49 -05:00
Austin Schaffer 4f39c754a2 [DEV-6353] Add bucket definitions 2019-11-07 16:25:33 -05:00
Mike Gerwitz 767a248e44 RatingService: Convert to TypeScript
This was an adventure, and was also used as a peer programming exercise to
introduce TypeScript to other programmers in the office.

This class has far too many dependencies, which made this difficult.  The
approach was to create .d.ts files for dependencies and wait on moving those
over for now, otherwise the task will never get done.

The RatingServicePublic trait was left as such for the time being; I was
able to work around a bug that was making it difficult to mix it into a
prototype.

There were no logic changes; this was just type refactoring.
2019-10-29 13:36:41 -04:00
Mike Gerwitz e058c8b509 Copyright range update
All files now have the same range, beginning from the conception of this
project.
2019-08-30 09:41:35 -04:00
Austin Schaffer 9637fc22e1 [DEV-5333] Pass last rated date from the server quote back to the client quote
Correct and add more elaborate tests for RateEventHandler
2019-06-17 08:28:19 -04:00
Andrew Fanton 5a5c2ca629 [DEV-3514] Lock quotes that exceed expiration date 2019-05-28 16:33:05 -04:00
Mike Gerwitz f9f7cebce7 Accommodate ancient qtype data on init and clean
* src/program/ProgramInit.js (_isKnownType): Account for ancient qtype
    representation (as a string).
* src/server/quote/ProgramQuoteCleaner.js (_isKnownType): Likewise.
* test/program/ProgramInitTest.js: New test case for this situation.
* test/server/quote/ProgramQuoteCleanerTest.js: Modify existing test case
    for this situation.
2018-11-19 11:10:16 -05:00
Mike Gerwitz ecdfea5cdb ProgramInit: Do not initialize bucket values for undefined question types
These denote fields that are generated but do not actually have any data
associated with them.  For example, select options with predicates have a
field generated so that they contribute to the group field count (so that
the group will automatically show/hide appropriately), but those should
never have values associated with them in the bucket.

This was manifesting as a nasty bug:  The bucket contained a key for
generated options.  When the quote is loaded, the client "empties" the
bucket.  In doing so, it set the option value to the empty string, which had
the effect of rendering the dropdown useless---every value was the empty
string!

* src/program/ProgramInit.js (_isKnownType): New method.
  (init): Use it and ignore fields with unknown types.
* src/server/Server.js: Add note that we shouldn't have this logic
  duplicated between ProgramInit and ProgramQuoteCleaner.
* src/server/quote/ProgramQuoteCleaner.js (_fixGroup): Ignore fields with
    unknown types.
  (_isKnownType): New method.
* test/program/ProgramInitTest.js: Update existing tests.  Add new.
* test/server/quote/ProgramQuoteCleanerTest.js: Test this case.
2018-11-14 11:52:52 -05:00
Mike Gerwitz 2bc1b96a15 ProgramQuoteCleaner: Clean all groups (not just linked)
* src/server/quote/ProgramQuoteCleaner.js (clean): Add docblock.
    Replace previous linked group cleaning with call to `_fixGroup'.
  (_fixGroup): New method.  Similar logic to previous linked group cleaning,
    except that fields are never truncated.
  (_fixLinkedGroups, _getLinkedIndexLength): Remove methods.
  (_getGroupLength): New method determining group size from leader length,
    which also accounts for linked groups.
* test/server/quote/ProgramQuoteCleanerTest.js: New test case.
2018-10-21 23:41:58 -04:00
Mike Gerwitz deeb5648b0 ProgramQuoteCleaner: Handle case of missing meta field data
* src/server/quote/ProgramQuoteCleaner.js (_fixMeta): `program.meta'
  does not exist on programs compiled previous to the proguic update.
2017-07-14 15:07:08 -04:00
Mike Gerwitz 22c3a21cdf ServerSideQuote: Add metabucket
* src/server/quote/ServerSideQuote.js (_metabucket): Add field.
  (getMetabucket, setMetabucket, setMetadata): Add methods.
2017-07-10 10:09:24 -04:00
Mike Gerwitz 37f84b7da8 Initialize metadata on quote version change
Consequently, on quote load as well.

* src/server/quote/ProgramQuoteCleaner.js (_fixMeta): New method.
  (clean): Use it.
2017-07-10 10:09:22 -04:00
Mike Gerwitz 1bb5191e3e LoVullo Associates => R-T Specialty
Copyright notices updated.  More casual references to "LoVullo
Associates" replaced with "RT Specialty / Lovullo", which will be "RT
Specialty Buffalo" in the future.  Or "RT Specialty", depending on how
this is rolled out.  Or "Ryan Specialty Group".  Who knows.

"R-T Specialty, LLC." is the legal name, which includes the dash.  Not
to be confused with a certain television network.
2017-06-08 14:48:43 -04:00
Mike Gerwitz 657573ab63 Near-complete liberation of liza
I have sat on releasing a lot of this code for years because I wanted
the liza repo to be in a pristine state---tests and all---which
required a great deal of refactoring.  Well, that never happened, and
time is up.

LoVullo Associates---my employer---has been purchased by another
company.  This means that any agreement with LoVullo regarding
releasing free software is going to have to be re-negotiated with this
new company, and I have no idea how those negotiations will go.  So,
I have no choice but to simply release everything in its current state,
or risk it being lost forever.

This represents work over the past 6--7 years, 99.9% of it written by
me.  This project has been my baby for quite some time, and has been
through a number of battles with deadlines and other unfortunate
circumstances; the scars show.  I also didn't really "know" JS when
starting this project.  Perhaps you can help improve upon it.

There are some odds-and-ends that could be committed.  And references
to insurance and LoVullo need to be removed to generalize this.

I hope that this will not be the last public commit for this project.
I'll fight the good fight and we'll see where that takes us.  Maybe
it'll be easy.

Happy hacking.
2017-06-08 14:38:28 -04:00