Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gestioCOF
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 76
    • Issues 76
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Klub Dev ENSKlub Dev ENS
  • gestioCOF
  • Merge requests
  • !231

WIP: Refactor K-Psul basket

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Aurélien Delobelle requested to merge aureplop/js_basket into aureplop/kpsul_js_refactor May 18, 2017
  • Overview 8
  • Commits 10
  • Pipelines 0
  • Changes 7

K-Psul - Basket refactor

  • Done.

K-Psul - ArticleManager

  • "selected" property becomes a reference to an article from the data property.

ModelForest

  • Add create method (based on previous get_or_create). Direction defaults to 0.
  • Add delete method.
  • Methods find, traverse, update, delete can also take a model (class) as first argument. String representation of model still works.
  • Fix child linking to parent in create method.
  • Add data property "object" linked to object being represented.
  • Use class to identify objects instead of id. Allow multiple displays of same ModelForest.
  • New get_class method returns the class selector to find an object container in the DOM.
  • New get_dom method returns the DOM element from an object in the ModelForest.

ModelForest -> ForestDisplay

  • (One-way data binding) Changes on a ModelForest are directly reflected on listening ForestDisplay(s).
  • ArticleManager and KHistory become simpler.

Config

  • Add addcost key, shorthand for double addcost keys check.

K-Psul

  • Improve display for basket summary and previous operation.
  • Improve article autocompletion.
  • Clean js code / duplicates.
  • Some components gains chance to trigger/handle events. They are really happy. Eg basket amounts and summary are updated thanks to these events if the selected account is changed.

Formatters

  • Fixes addcost and amount display.

History

  • Fix options management (api_options were overrided and K-Psul displayed more than the last day history).
  • Fix data display, thanks to formatters fixes and modelforest fixes.Cancellation view
  • Fix 500 on cancel with already canceled opes/transfers.
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: aureplop/js_basket