Commit graph

948 commits

Author SHA1 Message Date
Ludovic Stephan 91f14deda1 last tweaks and doc 2017-03-16 22:26:30 -03:00
Ludovic Stephan 1c5ac561a3 Change article table into divs 2017-03-16 22:26:08 -03:00
Ludovic Stephan f0a80561ed Add article display to Config callback 2017-03-16 22:24:57 -03:00
Ludovic Stephan 01295d464d Adapt ArticleAutocomplete to new format 2017-03-16 01:22:46 -03:00
Ludovic Stephan 2ce96bce1b Add traverse function to ModelTree 2017-03-16 01:21:50 -03:00
Ludovic Stephan 770c185bd0 Modify sort in ModelTree 2017-03-16 01:21:18 -03:00
Ludovic Stephan 3d76079439 Add correct syntax to category data 2017-03-16 01:20:06 -03:00
Ludovic Stephan 08d1521d81 Adapt ArticleManagerto new API 2017-03-15 22:40:06 -03:00
Ludovic Stephan fe6823fc7b Adapt article_data return value to ModelTree standards 2017-03-15 22:39:30 -03:00
Ludovic Stephan 1570d9f494 Polish ModelForest class 2017-03-15 22:10:56 -03:00
Ludovic Stephan 0219d998ac model tree struct draft 2017-03-15 02:45:13 -03:00
Ludovic Stephan 02485afd9b doc and compare function 2017-03-10 19:59:15 -03:00
Ludovic Stephan e1abff2242 last tweaks 2017-03-09 22:31:59 -03:00
Ludovic Stephan 8aa4fa2dce modify article API return 2017-03-09 09:21:07 -03:00
Ludovic Stephan c9b7683238 articlelist and modellist finished 2017-03-09 09:20:53 -03:00
Ludovic Stephan fe8e5d7e46 move and adapt manager and completion 2017-03-09 09:20:23 -03:00
Ludovic Stephan a05a075962 apimodellist & articlelist 2017-03-08 10:47:51 -03:00
Ludovic Stephan d5dfd5fa93 move ModelList def 2017-03-07 18:36:56 -03:00
Ludovic Stephan c9cce5b125 remove temp file 2017-03-07 17:58:10 -03:00
Ludovic Stephan 2cc0e0cffe modellist suite et fin 2017-03-07 17:57:40 -03:00
Ludovic Stephan db9c14f768 articlelist wip 2017-03-06 02:43:48 -03:00
Ludovic Stephan 643503269e add Article and Category models 2017-03-02 06:50:47 -03:00
Aurélien Delobelle a9cb50b38d Better k-fet js and more
JavaScript
----------
- Basic classes that can be inherited to define a new class for a
  django model in javascript.
- Formatters classes are used to render properties and attributes of
  the instances of models classes.
- New classes to handle Account, Checkout, Statement models.
- Refactor K-Psul JS (part n/m).
- Better file organization.

Views
-----
- 'kpsul.checkout_data' is cleaner. Last statement is added to the JSON
  response with GET paramater 'last_statement'.
- 'account.read.json' is merged in account.read. JSON response is sent if
  GET parametter 'format' is set to 'json'.
- Fix PEP8 of concerned views.

New requirement: django-js-reverse
----------------------------------
Used to resolve the URLs defined in the project in JavaScript.
See https://github.com/ierror/django-js-reverse
2017-02-23 22:07:38 +01:00
Aurélien Delobelle ee848d210e refactor account k-psul js - part 2/?
- les événements de AccountSearch sont enregistrés depuis ces classes (plus depuis le manager)
- ajout d'une classe AccountSelection s'occupant de la sélection d'un
  compte par l'utilisateur
- la méthode update de AccountManager peut maintenant prendre un
  trigramme et le set correctement, à défaut elle récupère le trigramme
  via AccountSelection
2017-02-15 14:09:20 +01:00
Aurélien Delobelle fdcf4c3ab0 fix property location 2017-02-13 13:48:57 +01:00
Aurélien Delobelle d9fc683525 update account_data[] to account_manager.account. 2017-02-13 00:41:41 +01:00
Aurélien Delobelle 890be9b343 refactor account k-psul js - part 1
- nouvelle classe - Account: stocke, sert et récupère les données
  associées à un compte
- nouvelle classe - AccountManager: interface pour le management de la
  partie Account de K-Psul
- nouvelle classe - AccountSearch: module de recherche d'un compte
- nouvelles classes - AccountFormatter, StandardAccountFormatter,
  LIQAccountFormatter: styles de formattage des données d'un compte

- désactive l'autocomplétion dans la recherche d'un compte
- fix #89: "Entrée" dans le champ de trigramme met le compte LIQ
2017-02-13 00:23:32 +01:00
Aurélien Delobelle 5c7a1d6874 Refactor JS Settings K-Psul
- change name: Settings -> Config
- provide interface `Config` to get/set parameters
- `Config` uses global object `window.config` to store key/value
- `Config` setters handle types
2017-02-12 13:26:02 +01:00
Aurélien Delobelle 8279bddf4e clean js k-psul
- K-Psul JavaScript uses strict-mode (when JS try to do better things,
  we should follow)
2017-02-12 06:10:17 +01:00
Aurélien Delobelle 4a5d9f880a Merge branch 'Aufinal/fix_amounts' into 'k-fet'
Corrige l'affichage du prix

!124 était overkill ; `amountToUKF` peut prendre en argument des valeurs positives ou négatives, et il me semble que le `round` ne sert quà corriger les erreurs de `float`, ce qui conduit à #128. Du coup, on revert une partie.

fixes #128

See merge request !163
2017-02-12 05:09:30 +01:00
Aurélien Delobelle 49e6101156 Merge branch 'qwann/k-fet/decimal_issue2' into 'k-fet'
Qwann/k fet/decimal issue2

`grant` is a Decimal and thus can not be casted implicitly to float.

See merge request !158
2017-02-11 22:04:10 +01:00
Aurélien Delobelle db4786abf8 Merge branch 'manet/correction-commandes' into 'k-fet'
Manet/correction commandes

- Fix création de commandes (fournisseur)

Fix #97
See merge request !128
2017-02-11 22:00:45 +01:00
Ludovic Stephan 8d0f803639 Corrige l'affichage du prix
fixes #128
2017-02-06 16:42:19 -02:00
Qwann 44202811ae not supporting future.builtins anymore in templatetags 2017-02-05 22:39:20 +01:00
Martin Pepin 5b0dc1a07f Merge branch 'fix/117' into 'k-fet'
Fix #117.

Not tested because there's no unittests.
Reviewed by @manet.

See merge request !134
2017-02-04 11:23:30 +01:00
Aurélien Delobelle 1bf5352097 Merge branch 'Aufinal/fix_87' into 'k-fet'
Fixes #87

Le field `groups` de `UserGroupForm` accepte les valeurs vides, ce qui permet la destitution de K-Fêt.

See merge request !157
2017-02-02 12:28:56 +01:00
Aurélien Delobelle d5bf249212 Merge branch 'qwann/k-fet/stock_update' into 'k-fet'
fixes #127

Si je ne me trompe pas, c'était juste un selecteur jQuery qui ne fonctionnait pas. fixes #127

See merge request !156
2017-02-02 12:24:54 +01:00
Qwann bc14205d29 fixing decimal issue2 2017-02-01 19:32:18 +01:00
Ludovic Stephan 47d7a3ec6e fixes #87 2017-01-31 16:35:52 -02:00
Qwann 863699bfb6 Merge branch 'qwann/k-fet/stock_update' of git.eleves.ens.fr:cof-geek/gestioCOF into qwann/k-fet/stock_update 2017-01-31 16:03:00 +01:00
Qwann 1275fdff99 fixes #127
fixing stock update
2017-01-31 16:00:44 +01:00
Qwann a400832c6d fixing stock update 2017-01-31 15:55:38 +01:00
Qwann 0ac1eaf414 fixing decimal_issue 2017-01-27 13:08:50 +01:00
Martin Pepin 75ff77c4ec Merge branch 'Aufinal/search_account' into 'k-fet'
Popup de recherche de compte

Quand on clique sur l'icone de recherche (ou qu'on appuie sur Ctrl+F depuis la zone de saisie de trigramme) un popup apparaît pour rechercher les comptes par prénom ou par nom, en utilisant `autocomplete`.

Fix #109

See merge request !153
2017-01-25 23:58:08 +01:00
Martin Pepin 939e0f32a2 Merge branch 'qwann/decimal_fixes' into 'k-fet'
Qwann/decimal fixes

Répare les problèmes suivants : 
* On ne pouvait pas lire la balance d'un compte à l'aide du templatetag correspond sur lequel était effectué un mauvais cast en float
* On ne pouvait pas effectuer d'opération à cause d'une absence de cast en Decimal pour operation.amount

See merge request !154
2017-01-24 19:49:33 +01:00
Qwann 94f8705ea4 wrong merge fixed 2017-01-24 19:42:15 +01:00
Qwann fff7a2022b conflict solved 2017-01-20 18:45:28 +01:00
Qwann 8b4f7ad60c decimal cast for operation.amount 2017-01-20 18:34:45 +01:00
Qwann 7e5910e0b3 balance templatetag fixed 2017-01-20 18:10:49 +01:00
Ludovic Stephan 1b0144691f No need for len of query 2017-01-20 07:32:11 -02:00