Commit graph

887 commits

Author SHA1 Message Date
Aurélien Delobelle
921dce1f35 Merge branch 'master' into aureplop/kfet_config 2017-04-03 20:58:57 +02:00
Ludovic Stephan
5607d7c9a4 Migration pour kfet_forms 2017-04-03 15:54:02 -03:00
Ludovic Stephan
ad2c8537e3 Add Runpython (oops) 2017-04-03 15:50:18 -03:00
Aurélien Delobelle
85caa6b058 Use django-djconfig for kfet app.
Old configuration(/settings), based on Settings model, system is
deleted: SettingsForm, Settings.
New system use `django-djconfig` module.

- `kfet.config` module provides `kfet_config` to access configuration concerning
kfet app.
- Views, forms, models, etc now use this object to retrieve conf values.
- Views no longer add config values to context, instead templates use
  `kfet_config` provided by a new context_processor.
- Enhance list and update views of settings.
- Fix: settings can directly be used without having to visit a specific
  page...

Misc
- Delete some py2/3 imports
- Delete unused imports in kfet.models and kfet.views
- Some PEP8 compliance
2017-04-03 20:32:16 +02:00
Aurélien Delobelle
10d2b58fa7 clean some comments
- fix: error if actions are empty in balance stats
2017-04-03 17:06:32 +02:00
Aurélien Delobelle
6d2e150aa0 clean align 2017-04-03 16:56:44 +02:00
Aurélien Delobelle
903da795ab clean kfet statistic.js
- no longer dictToArray where it isn't necessary (because already an
  array)
- fix chart height:
  - previous charts were causing bugs
  - height is fixed (even with window resizing)
- clean whitespaces
2017-04-03 16:53:28 +02:00
Ludovic Stephan
40da3bc299 Listen on input 2017-04-03 11:21:05 -03:00
Ludovic Stephan
b113a57b74 Fix update function 2017-04-03 11:20:56 -03:00
Aurélien Delobelle
87bc90ec8b Begin/end balance stat graph
- Anytime begin at account creation datetime
- Others doesn't take care of account creation
- Add check to avoid to bug on actions list length
2017-04-03 16:07:31 +02:00
Aurélien Delobelle
769c37634d delete debug msg 2017-04-03 15:43:56 +02:00
Aurélien Delobelle
1bb83ccdd7 simplify StatScale 2017-04-03 15:10:53 +02:00
Aurélien Delobelle
7dc233c0e2 Merge branch 'Aufinal/editions' into 'master'
K-Fêt
- Fix: Les éditions ne touchent plus la caisse
- Fix: Seuls les achats sont possibles sur LIQ

See merge request !198
2017-04-03 14:39:53 +02:00
Aurélien Delobelle
b157ffac4c Merge branch 'Aufinal/kfet_forms' into 'master'
K-Fêt
- Affichage des formulaires amélioré

See merge request !203
2017-04-03 13:40:41 +02:00
Aurélien Delobelle
b3a9ad8a96 clean mixin 2017-04-03 13:24:04 +02:00
Aurélien Delobelle
d97a7be819 stats: fix begin of balances graphs
- graph begin at first operation or later
2017-04-03 03:15:07 +02:00
Aurélien Delobelle
c01de558e1 Clean Article stats
kfet.statistic
- delete no longer used defs
- new mixin - ScaleMixin
  - get scale args from GET params
  - chunkify querysets according to a scale

Article stats
- use SingleResumeStat for manifest
- use ScaleMixin for sales
- update urls
- update permission required: teamkfet

Account stats
- update permission required: teamkfet
- operations use ScaleMixin
- fix manifests urls
2017-04-03 03:12:52 +02:00
Aurélien Delobelle
f585247224 Refactor Account Operations stats
K-Fêt - Statistics

New base class - StatScale
- create scale, given chunk size (timedelta), start and end times
- get labels of
- get start and end datetimes of chunks

DayStatScale: Scale whose chunks interval is 1 day
WeekStatScale: same with 1 week
MonthStatScale: same with 1 month

AccountStatOperationList: manifest of operations stats of an account
- renamed from AccountStatLastAll
- updated according to SingleResumeStat

AccountStatOperation:
- renamed from AccountStatLast
- remove scale logic with use of StatScale objects
- used scale is given by `scale` and `scale_args` GET params
- add filter on operations types with `types` GET param

AccountStatLast(Day,Week,Month) are deleted ("merged" in
AccountStatOperation)
2017-04-03 00:40:52 +02:00
Aurélien Delobelle
31261fd376 set height canvas graph & fix graph display 2017-04-02 23:38:42 +02:00
Aurélien Delobelle
6ebea6557c Merge branch 'Aufinal/graph_size' into aureplop/fix_stats 2017-04-02 23:19:34 +02:00
Ludovic Stephan
48721b7dca Reduce graph size 2017-04-02 17:54:13 -03:00
Aurélien Delobelle
df7e935390 Clean GET params in ajax calls
- Use `data` arg of `$.getJSON` for `format` param
- Delete `dictToArray` call on data returned by `SingleResumeStat` class view since this view now returns stats manifest as an array
2017-04-02 17:16:05 +02:00
Aurélien Delobelle
1ee993e1e1 Add permission check to AccountStatBalance
Only connected user can get its balance data
2017-04-02 17:14:36 +02:00
Aurélien Delobelle
87b9db520f Refactor py base stats and account balance stats
New mixin: PkUrlMixin
- use with SingleObjectMixin standard django mixin (used by
  DetailView...)
- `get_object` use field declared in `pk_url_kwarg` to get... the object

SingleResumeStat
- clean (part of) py code

AccountStatBalanceList
- renamed from `AccountStatBalanceAll`
- url modified
- add permission checking (only the connected user can get balance
  stats manifest)
- clean py code

AccountStatBalance
- cleaner filtering management
- merge urls using this class
- clean py code
2017-04-02 17:03:20 +02:00
Aurélien Delobelle
f6022ecf7d Add str to Transfer model
+ PEP8 this model
2017-04-02 16:49:41 +02:00
Aurélien Delobelle
78aa5df350 fix template error 2017-04-02 12:55:44 +02:00
Aurélien Delobelle
e8fdd083aa delete unused class-views 2017-04-02 05:34:34 +02:00
Aurélien Delobelle
96597aa146 clean some kfet templates 2017-04-02 05:17:26 +02:00
Ludovic Stephan
c9973cde75 Help text for password length 2017-04-01 23:25:47 -03:00
Aurélien Delobelle
55116f7179 Merge branch 'Aufinal/stat_article' into 'master'
Fix article stat display

See merge request !207
2017-04-02 02:49:54 +02:00
Martin Pépin
e4d51de569 Merge branch 'hotfix/autocomplete_no_value' 2017-04-01 22:11:36 +01:00
Ludovic Stephan
91a057873d Merge migrations 2017-04-01 18:10:51 -03:00
Ludovic Stephan
944a73eef7 Merge remote-tracking branch 'origin/master' into Aufinal/editions 2017-04-01 18:09:23 -03:00
Martin Pépin
a793e9a2e7 exclude empty strings from ldap results
The uid attribute in a LDAP's entry cannot be an empty string. We need
to get an actual identifier.
2017-04-01 22:07:32 +01:00
Martin Pépin
9cdf064005 Handle incomplete values from the LDAP
Sometime `uid` is not set in the objects fetched from the LDAP. This
case has to be handled. Also, the `.uid` and `.cn` attributes of these
objects in the python abstractions have a `.value` method which we
should use.
2017-04-01 21:45:05 +01:00
Ludovic Stephan
cce0411ee9 Merge both 0048 migrations 2017-04-01 17:37:29 -03:00
Ludovic Stephan
bbb517fbd3 Fix article stat display 2017-04-01 10:37:40 -03:00
Ludovic Stephan
6797c92a1f Ok ok je me rends 2017-04-01 09:35:37 -03:00
Ludovic Stephan
4af2562121 More clarity in argument names 2017-04-01 09:34:02 -03:00
Ludovic Stephan
29836fd15c Remove deprecated option 2017-04-01 09:24:18 -03:00
Ludovic Stephan
e20ab2f352 Use set delete() 2017-04-01 09:18:40 -03:00
Ludovic Stephan
271654b447 No need for intermediate error reporting 2017-04-01 08:47:09 -03:00
Ludovic Stephan
ccf5f80685 Merge remote-tracking branch 'origin/master' into Aufinal/editions 2017-04-01 02:43:19 -03:00
Ludovic Stephan
8da832c1f7 Use nice authentication in orders too 2017-04-01 00:36:39 -03:00
Ludovic Stephan
063446efb5 Use columns for authentication and submit 2017-04-01 00:32:09 -03:00
Ludovic Stephan
cf03fba1cc Remove whitespace by using elif 2017-03-31 23:54:38 -03:00
Ludovic Stephan
2774dbb5de Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-31 23:51:13 -03:00
Ludovic Stephan
7d93d91af9 Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles 2017-03-31 23:50:33 -03:00
Ludovic Stephan
9c9ad21d73 Add variable for article line 2017-03-31 23:46:10 -03:00
Ludovic Stephan
92fd94d1f9 Merge remote-tracking branch 'origin/master' into Aufinal/fix_stock_ws 2017-03-31 23:43:19 -03:00
Aurélien Delobelle
1286606f7a Merge branch 'Aufinal/hotfix/liq_withdraw' into 'master'
K-Fêt :
- Empêche les retraits/charges sur LIQ

See merge request !205
2017-03-31 23:49:33 +02:00
Ludovic Stephan
aa29621c7c Prevents special opes on LIQ 2017-03-31 18:28:03 -03:00
Ludovic Stephan
236dcb4644 Tweaks to UserDialog 2017-03-31 18:10:06 -03:00
Ludovic Stephan
582cdebaa1 Better callback management 2017-03-31 17:49:22 -03:00
Ludovic Stephan
ab15dbae76 Add handler management 2017-03-31 17:37:39 -03:00
Ludovic Stephan
38bfccf331 Change class name 2017-03-31 15:57:15 -03:00
Ludovic Stephan
8bf1bd5343 Websocket as member 2017-03-31 15:45:15 -03:00
Ludovic Stephan
413df0806d Add url get method 2017-03-31 15:10:41 -03:00
Ludovic Stephan
49c84076de Manage help_text and errors 2017-03-31 15:01:31 -03:00
Ludovic Stephan
1d8e084a19 websocket update when addcost 2017-03-31 14:37:00 -03:00
Ludovic Stephan
499c081565 Websocket class and instance 2017-03-31 12:23:27 -03:00
Ludovic Stephan
fdcd2e864c Use widget_tweaks everywhere 2017-03-31 11:24:38 -03:00
Ludovic Stephan
530aafad19 Use widget_tweaks 2017-03-31 11:07:37 -03:00
Ludovic Stephan
6ac1241bd3 Listen to submit instead 2017-03-31 10:07:42 -03:00
Ludovic Stephan
50cb6e51a1 Use Set() natively 2017-03-31 10:06:02 -03:00
Ludovic Stephan
e54324e9f1 Use col-offset 2017-03-31 09:50:37 -03:00
Ludovic Stephan
ebf133d9af Lowercase model verbose names 2017-03-30 21:38:16 -03:00
Ludovic Stephan
20561eb515 Idem for account_update 2017-03-30 21:31:16 -03:00
Ludovic Stephan
c1b8849cb8 Idem for supplier_form 2017-03-30 21:16:47 -03:00
Ludovic Stephan
91d5fe234c Idem for checkoutstatements 2017-03-30 21:10:50 -03:00
Ludovic Stephan
8e65298c7c Idem for article_update 2017-03-30 19:34:22 -03:00
Ludovic Stephan
079666c0db Use verbose names and form snippets for article_create 2017-03-30 19:32:11 -03:00
Ludovic Stephan
0c21238391 Change misc field when updating 2017-03-30 18:39:13 -03:00
Ludovic Stephan
998838ca3e Add update button 2017-03-30 13:31:16 -03:00
Ludovic Stephan
31888e33ce simpler jquery selection 2017-03-30 13:30:55 -03:00
Ludovic Stephan
56b5fd6279 Always randomize supplier articles 2017-03-29 23:22:18 -03:00
Ludovic Stephan
95c59de4fc Add supplier to dev data 2017-03-29 23:16:40 -03:00
Ludovic Stephan
eb7d436b90 Add "count finished" checkbox 2017-03-29 20:43:48 -03:00
Ludovic Stephan
ca6e120a38 Fix ws stock update 2017-03-29 09:43:10 -03:00
Ludovic Stephan
e6a1d16860 Websocket to manage possible kpsul conflicts 2017-03-29 00:58:47 -03:00
Ludovic Stephan
3b793dc726 Add first improvements for inventory 2017-03-28 23:47:41 -03:00
Ludovic Stephan
08c752f1b3 Simplify addcost management 2017-03-26 18:10:26 -03:00
Ludovic Stephan
5101400f64 Use callback_as_dict for addcost 2017-03-26 17:57:51 -03:00
Ludovic Stephan
c1f70d9d0a Add capslock support for inputs 2017-03-26 17:51:55 -03:00
Ludovic Stephan
6d92df4155 Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/dialog_utils 2017-03-26 15:21:33 -03:00
Ludovic Stephan
946182f1fe Simpler migration revert 2017-03-26 15:06:45 -03:00
Aurélien Delobelle
842f2cecc1 fix import, fix ope with addcost enabled, move Config location 2017-03-26 15:12:03 +02:00
Aurélien Delobelle
bc6ecda0c8 fix addcost kspul 2017-03-26 14:59:21 +02:00
Aurélien Delobelle
24f72ae7d4 add missing ; 2017-03-26 14:52:23 +02:00
Aurélien Delobelle
b81b33c056 allow chaining on container in display method 2017-03-26 14:51:16 +02:00
Aurélien Delobelle
485ae86a42 add update method to ModelObject 2017-03-26 14:46:46 +02:00
Ludovic Stephan
3bf7a066a2 Adapt history.html to new functions 2017-03-26 00:33:33 -03:00
Ludovic Stephan
3f07bf56fa Remove console log 2017-03-26 00:25:51 -03:00
Ludovic Stephan
dbcfc6df46 Remove duplicate kfet.js import 2017-03-26 00:21:17 -03:00
Ludovic Stephan
87943ea7b9 Adapt kpsul to new functions 2017-03-26 00:20:47 -03:00
Ludovic Stephan
6be2f086df Add generic functions for confirm dialogs 2017-03-26 00:20:28 -03:00
Ludovic Stephan
a1c976185c Fix transfer sort 2017-03-25 13:44:35 -03:00
Ludovic Stephan
0997d85083 Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/refactor_history 2017-03-25 12:39:30 -03:00
Ludovic Stephan
5ff8f69bfa Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/refactor_articles 2017-03-25 12:35:04 -03:00
Ludovic Stephan
06a89055c4 Simpler migration 2017-03-25 10:46:18 -03:00
Ludovic Stephan
9a081ddae0 PEP8 on Operation model 2017-03-25 10:43:02 -03:00
Ludovic Stephan
f645121fb1 Add error when editing LIQ 2017-03-25 10:39:53 -03:00
Ludovic Stephan
14e0d8090f Add euros symbols 2017-03-25 10:01:35 -03:00
Ludovic Stephan
d8f572bb01 Remove group check in is_checkout 2017-03-25 09:57:44 -03:00
Ludovic Stephan
bc0affc038 Remove autocomplete leftovers 2017-03-25 09:56:36 -03:00
Aurélien Delobelle
ae82c34023 add missing migration 2017-03-25 11:21:21 +01:00
Aurélien Delobelle
215d4a63ad Merge branch 'Aufinal/create_opes' into 'master'
K-Fêt - Dev :
- new command - createopes: Création d'opérations et transferts aléatoires

See merge request !193
2017-03-25 11:08:22 +01:00
Aurélien Delobelle
6afbcb44a1 delete array comprehesion 2017-03-25 10:26:45 +01:00
Aurélien Delobelle
967748ded3 details link to read instead of update
- It was the old behaviour.
2017-03-25 09:58:20 +01:00
Aurélien Delobelle
72970c6be7 Fix api call on new transfers
- Use django-js-reverse
- Replace old url (deleted) with standard url
2017-03-25 09:44:55 +01:00
Ludovic Stephan
aa6a50a6e7 Simplify JS-Python interface for cancel_ops 2017-03-24 23:57:27 -03:00
Ludovic Stephan
794527772f Add more explicit migration name 2017-03-24 23:41:33 -03:00
Ludovic Stephan
5f3f044084 Add revert function to migration 2017-03-24 23:27:55 -03:00
Ludovic Stephan
608e67fe6a Add RunPython script to migration 2017-03-24 21:23:04 -03:00
Ludovic Stephan
44fbc92893 Merge branch 'master' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/editions 2017-03-24 21:07:32 -03:00
Ludovic Stephan
d7740e66fe adapt code to is_checkout removal 2017-03-24 20:52:49 -03:00
Ludovic Stephan
cadaf43131 Remove is_checkout field from Operation model 2017-03-24 18:50:57 -03:00
Aurélien Delobelle
ac18cbd9d9 fix by on last statement 2017-03-24 22:10:34 +01:00
Aurélien Delobelle
0d02d47d33 move utils functions 2017-03-24 22:05:04 +01:00
Aurélien Delobelle
2e3bd5bd7a fix search box 2017-03-24 21:41:34 +01:00
Aurélien Delobelle
abce961d91 use django-js-reverse 2017-03-24 21:28:33 +01:00
Aurélien Delobelle
a9d1a6aae9 clean array iteration 2017-03-24 21:24:06 +01:00
Aurélien Delobelle
f063c3470c Merge branch 'Aufinal/fix_password_freeze' into 'master'
K-Psul:
- fix freeze when no-team password

Closes #153

See merge request !196
2017-03-24 20:53:44 +01:00
Aurélien Delobelle
ff5959638b fix missing bracket 2017-03-24 20:32:04 +01:00
Aurélien Delobelle
cb13280458 Merge branch 'master' into 'Aufinal/merge_k-fet'
# Conflicts:
#   kfet/static/kfet/css/index.css
2017-03-24 20:23:32 +01:00
Ludovic Stephan
7520effe53 Fix K-Psul freeze when no-team password
L'erreur 403 est renvoyée dans ce cas par le décorateur
`@teamkfet_required`, donc sans data associé, ce qui faisait buguer
`getErrorsHtml`. On rajoute donc le cas correspondant.
2017-03-24 15:45:47 -03:00
Martin Pepin
33b3d558b5 Merge branch 'Aufinal/decorators' into 'master'
Utilise les bons décorateurs

See merge request !195
2017-03-21 00:25:50 +01:00
Ludovic Stephan
5e802217fd Remove lambda operators 2017-03-20 20:24:44 -03:00
Ludovic Stephan
dd4d1f3061 Improves creation efficiency 2017-03-20 20:19:04 -03:00
Ludovic Stephan
aa247b465a Fix search box (hackish) 2017-03-20 19:08:48 -03:00
Martin Pepin
ae38b5d1e7 Merge branch 'hotfix/prevent_ldap_injection' into 'master'
Hotfix/prevent ldap injection

Closes #150

See merge request !188
2017-03-20 23:06:59 +01:00
Martin Pépin
59f57793ba typo 2017-03-20 22:05:48 +00:00
Martin Pépin
0aed975615 Fix the empty-query test in autocomplete
If there is no valid word to search in the LDAP database, no query is
performed. Since 74f0b63e, that behaviour was broken because of a typo
2017-03-20 08:14:20 +00:00
Ludovic Stephan
6d36d50e9a Fix 'at' property for transfergroups 2017-03-20 01:56:59 -03:00
Ludovic Stephan
1fcd53d780 Continue renaming node.type to node.modelname 2017-03-20 00:42:12 -03:00
Ludovic Stephan
fe965875f7 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-20 00:33:30 -03:00
Ludovic Stephan
3465dd7045 Change node.type to node.modelname for clarity 2017-03-20 00:26:11 -03:00
Ludovic Stephan
2c63e6b667 Use django.contrib.auth decorators 2017-03-20 00:11:50 -03:00
Ludovic Stephan
36dc6439a8 Plug createopes into loadkfetdevdata 2017-03-19 16:03:39 -03:00
Ludovic Stephan
0356ec34ae Add createopes command 2017-03-19 16:03:19 -03:00
Martin Pépin
74f0b63e96 Change ldap query behaviour if multiple inputs
It is now consistent with the other lookups over the User database
2017-03-19 15:10:08 +00:00
Martin Pépin
dc50a23b10 Escape the content of the regex in highligh_text 2017-03-19 14:48:04 +00:00
Martin Pépin
4899bba1f7 Replace list comprehensions by iterators in dal 2017-03-19 14:05:25 +00:00
Ludovic Stephan
c99e4f26d0 Move history initialisation as Config.reset callback 2017-03-19 04:59:55 +01:00
Ludovic Stephan
66c5a6953c Improve websocket filter for special history pages 2017-03-19 04:29:54 +01:00
Ludovic Stephan
7a00096170 Add support for account_read history 2017-03-18 22:48:50 -03:00
Ludovic Stephan
951932a6c8 Add support and websocket to transfers.html 2017-03-18 22:35:47 -03:00
Ludovic Stephan
fa64a68378 Add strict mode to history.html script 2017-03-18 22:15:09 -03:00
Ludovic Stephan
fc3e86aea6 Add websocket support to ArticleManager 2017-03-18 22:06:30 -03:00
Ludovic Stephan
51fba4da21 Log messages 2017-03-18 19:02:08 -03:00
Ludovic Stephan
47b7d934e0 PEP8 on imports 2017-03-18 19:01:51 -03:00
Ludovic Stephan
29d7654052 Root kfet account 2017-03-18 18:02:33 -03:00
Ludovic Stephan
f512c1bdd7 Add better checkout creation 2017-03-18 18:02:23 -03:00
Ludovic Stephan
b8a307b4a6 Add support for kfet/history page 2017-03-18 14:05:11 -03:00
Ludovic Stephan
1d532616b7 Fix bugs introduced by previous commit 2017-03-18 02:47:30 -03:00
Ludovic Stephan
9e905b0f8b Remove kpsul dependence from history (oops) 2017-03-18 02:40:34 -03:00
Ludovic Stephan
644b08973a Add websocket support for history 2017-03-18 02:32:27 -03:00
Ludovic Stephan
34bb680570 Add History equivalent functions 2017-03-18 02:31:52 -03:00
Ludovic Stephan
b655907bd4 Add history to KPsul manager 2017-03-18 02:29:02 -03:00
Ludovic Stephan
14b922634d Remove deprecated history functions 2017-03-18 02:28:01 -03:00
Ludovic Stephan
5c9c206f68 Adapt css to new canceled syntax 2017-03-18 02:25:44 -03:00
Ludovic Stephan
b0b1fdf936 Add jsdoc comments to history models 2017-03-17 21:00:58 -03:00
Ludovic Stephan
565a054323 Add support for low stock css 2017-03-17 17:30:22 -03:00
Ludovic Stephan
58c57c6f89 Add hierarchy of needed models, w/ formatters 2017-03-17 16:00:49 -03:00
Ludovic Stephan
47fe74fbb0 template specification 2017-03-17 15:59:52 -03:00
Ludovic Stephan
df0ea96b41 Adapt history_json return value to ModelForest standards 2017-03-17 15:59:21 -03:00
Qwann
de724a2c0d PEP8 for perform_operation 2017-03-17 19:53:23 +01:00
Qwann
a107fa0309 migration renamed 2017-03-17 19:23:44 +01:00
Qwann
fcc2ab8810 frontend working 2017-03-17 19:17:36 +01:00
Ludovic Stephan
53f89f53e0 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-17 12:34:48 -03:00
Ludovic Stephan
a7de396aa3 Better comparison control 2017-03-17 12:33:43 -03:00
Ludovic Stephan
11603cee69 Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history 2017-03-17 00:19:45 -03:00
Ludovic Stephan
9ab2a11432 Finish adapting ArticleManager and Autocomplete 2017-03-16 22:26:59 -03:00
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
Martin Pépin
55b67f38c8 Notice the users about the α-numeric restriction
Add a help text above the two autocompletion inputs letting the users
know that non-alphanumeric characters will not be used.
2017-03-16 23:16:56 +00:00
Martin Pépin
741f0183e6 Prevent ldap injections in autocompletion views
We only allow alphanumeric characters in the query in order to avoid
injections
2017-03-16 22:43:43 +00: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
3793863bab Merge remote-tracking branch 'origin/k-fet' into Aufinal/merge_k-fet 2017-03-15 22:58:54 -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
Martin Pépin
3acc8bca75 s/username/clipper in highlight_clipper
There was typo, the `Clipper` object has no `username` attribute. We
want to use the `clipper` attribute
2017-03-15 19:11:38 +00:00
Martin Pépin
e98a407982 Rename bits -> search_words in kfet.autocomplete
This is typo, this variable has not the same name in
`gestioncof.autocomplete` and `kfet.autocomplete`
2017-03-15 19:02:31 +00:00
Ludovic Stephan
0219d998ac model tree struct draft 2017-03-15 02:45:13 -03:00
Qwann
d0938dfae7 Merge branch 'k-fet' into qwann/k-fet/category_addcost 2017-03-11 15:10:04 +01:00
Ludovic Stephan
66beeb5bd0 transfer history added 2017-03-11 01:41:21 -03:00
Ludovic Stephan
ab6b0d52f2 Merge branch 'Aufinal/transferts_historique' into Aufinal/refactor_history 2017-03-11 00:45:54 -03:00
Ludovic Stephan
ac2e773f9e opelist class 2017-03-10 22:09:23 -03:00
Ludovic Stephan
741bac880b dummy History test class 2017-03-10 22:09:02 -03:00
Ludovic Stephan
8eae3cee7f adapt history view 2017-03-10 22:08:44 -03:00
Qwann
b0643c0928 typo 2017-03-11 02:04:30 +01:00
Ludovic Stephan
02485afd9b doc and compare function 2017-03-10 19:59:15 -03:00
Ludovic Stephan
eac6c42041 day, opegroup and ope model drafts 2017-03-10 19:57:36 -03:00
Qwann
ee6de35627 category addcost added 2017-03-10 18:29:15 +01:00
Qwann
52dda7be9a Merge branch 'qwann/k-fet/home' into qwann/k-fet/kfet_open 2017-03-10 16:58:46 +01:00
Qwann
5ddcd2f1ff Merge branch 'k-fet' into qwann/k-fet/home 2017-03-10 16:58:10 +01:00
Qwann
cd31c55254 permission working 2017-03-10 16:40:36 +01:00
Ludovic Stephan
e1abff2242 last tweaks 2017-03-09 22:31:59 -03:00
Qwann
f18bb9f336 permission added 2017-03-09 17:27:58 +01:00
Qwann
8e7b9e2fd3 force close working 2017-03-09 15:05:47 +01: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
Qwann
5694e4b9bc migrations merged 2017-03-09 11:11:31 +01: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
Qwann
ce96bc4b67 Status added on home page 2017-03-07 17:31:43 +01:00
Qwann
f8e09cf257 unknow status updated every 30s 2017-03-07 14:12:23 +01:00
Qwann
0f96d3bc46 moving kfet_open url 2017-03-07 14:02:08 +01:00
Qwann
392338eddd indent 2017-03-06 09:30:58 +01:00
Ludovic Stephan
db9c14f768 articlelist wip 2017-03-06 02:43:48 -03:00
Qwann
b7040d5867 adding KFET_FORCE_CLOSE in cache 2017-03-06 02:25:18 +01:00
Qwann
8e462134c7 home base html 2017-03-06 02:08:33 +01:00
Qwann
964dd716c6 Merge branch 'qwann/k-fet/home' into qwann/k-fet/kfet_open 2017-03-06 02:04:11 +01:00
Qwann
ca17e36b5a clean display for is_sold 2017-03-06 02:03:19 +01:00
Qwann
dcc19bd9e8 article.hidden in article & article_read 2017-03-06 01:58:33 +01:00
Ludovic Stephan
8e31fae340 last tweaks 2017-03-05 21:29:20 -03:00
Ludovic Stephan
61e2fedb08 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/command_interface 2017-03-05 21:12:53 -03:00
Qwann
624707570e Merge branch 'qwann/k-fet/home' into qwann/k-fet/kfet_open 2017-03-05 20:06:37 +01:00
Qwann
197da29366 css include added... 2017-03-05 20:05:35 +01:00
Qwann
15b8900d43 fixes dumb merge 2017-03-05 19:56:56 +01:00
Qwann
a828ecbcf0 Merge branch 'qwann/k-fet/home' into qwann/k-fet/kfet_open 2017-03-05 19:51:51 +01:00
Qwann
b0b2210e93 Merge branch 'qwann/k-fet/home' of git.eleves.ens.fr:cof-geek/gestioCOF into qwann/k-fet/home 2017-03-05 19:44:08 +01:00
Qwann
9f94262b82 removing inapropriate message 2017-03-05 19:43:26 +01:00
Qwann
f52aba8ca6 Merge branch 'k-fet' into qwann/k-fet/home 2017-03-05 19:21:20 +01:00
Ludovic Stephan
643503269e add Article and Category models 2017-03-02 06:50:47 -03:00
Aurélien Delobelle
95b129e396 resolved merge conflict in kfet views imports 2017-02-25 02:00:56 +01: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
Evarin
ddbcfe0c69 JS commenté et plus propre 2017-02-15 22:25:26 +01:00
Evarin
0fcb29252b Frontend tout en JS 2017-02-15 21:01:54 +01:00
Qwann
46f343b1ab la K-Fêt se réveille à 7h 2017-02-15 14:44:58 +01:00
Qwann
1c90608f6d some cleaning 2017-02-15 14:21:00 +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
ef864cec32 Merge branch 'Aufinal/visibilite_stock' into 'k-fet'
K-Psul

Articles
- Ajout d'une surbrillance pour les articles dont le stock est bas
  (entre -5 et 5)

Panier
- Ajout d'indications de stocks sur chaque ligne (stock, warning visuel)
- Les ajouts/retraits d'articles déjà dans le panier mettent à jour la
  ligne associée à celui-ci déjà existante
- Les flèches haut/bas permettent de modifier la quantité d'un article

Fix #111

See merge request !133
2017-02-13 16:42:22 +01:00
Aurélien Delobelle
2e8fc45a1b Merge branch 'Aufinal/own_password' into 'k-fet'
Changement de son propre mot de passe

Permet à un K-Fêteux (disposant de la permission `kfet.is_team`) de modifier son propre mot de passe sur la page `account/XXX/edit`.

Accessoirement, la fonction `account_update` est maintenant conforme à PEP8.

Fix #121

See merge request !148
2017-02-13 16:32:40 +01:00
Ludovic Stephan
46e9e82da8 move account save 2017-02-13 12:19:47 -02:00
Qwann
9cae3ad0bd Merge branch 'k-fet' into qwann/k-fet/stats 2017-02-13 14:37:29 +01:00
Ludovic Stephan
83e41c292e css tweaks 2017-02-13 11:34:47 -02:00
Ludovic Stephan
43aab26530 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/visibilite_stock 2017-02-13 10:51:24 -02:00
Aurélien Delobelle
fdcf4c3ab0 fix property location 2017-02-13 13:48:57 +01:00
Aurélien Delobelle
1a684471c2 Merge branch 'Aufinal/fix_amounts' into 'k-fet'
K-Psul:
- fix #163: different rounding for UKF accounts balances / UKF articles prices

See merge request !171
2017-02-13 08:25:13 +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
Ludovic Stephan
3fa0e4de6c different rounding for accounts 2017-02-12 19:05:41 -02:00
Ludovic Stephan
3dfd8bf616 interface for order_to_inventory 2017-02-12 18:04:50 -02:00
Ludovic Stephan
031b992fa3 fix brackets & lowstock indication 2017-02-12 11:09:03 -02:00
Ludovic Stephan
99d04fb75e bugfix 2017-02-12 11:02:54 -02: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
Ludovic Stephan
db899a891b css tweaks 2017-02-12 02:03:41 -02:00
Ludovic Stephan
15d79aff2d add help tooltips 2017-02-12 00:48:24 -02:00
Ludovic Stephan
be8eb4ac28 add (temporary) better presentation 2017-02-12 00:01:22 -02:00
Ludovic Stephan
481409253b simpler string pluralizing 2017-02-11 21:44:32 -02:00
Ludovic Stephan
02735642f1 better pluralize 2017-02-11 21:41:09 -02:00
Ludovic Stephan
fc2de20ab8 use switch + move text 2017-02-11 21:38:07 -02: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
Martin Pépin
d41d905366 PEP8 2017-02-11 21:20:51 +01:00
Martin Pépin
313b5cf61d Merge branch 'master' into Aufinal/dev_data_kfet 2017-02-11 21:01:37 +01:00
Martin Pépin
02a8e74e3b Optimize code, better queries
- Remove useless Q queries
- Optimize with sets
- Queries over clipper id too
2017-02-11 02:39:59 +01:00
Qwann
f87f1ceff1 kfetOpen bullet working 2017-02-11 00:29:12 +01:00
Qwann
4808650fa0 kfet_open is updatable 2017-02-09 14:05:29 +01:00
Ludovic Stephan
9ade88d076 add stdout log 2017-02-08 15:54:49 -02:00
Ludovic Stephan
01dbf7293c withdrawals cost money 2017-02-08 15:38:59 -02:00
Ludovic Stephan
5ea9705528 use decimal 2017-02-08 15:38:27 -02:00
Ludovic Stephan
b692b92f74 correct return value for get_or_create 2017-02-08 15:33:35 -02:00
Ludovic Stephan
3b318cf623 correct timedelta 2017-02-08 15:31:10 -02:00
Ludovic Stephan
c6e84b8cb4 bug 2017-02-08 15:29:40 -02:00
Ludovic Stephan
4e62eb0aee create checkout dynamically 2017-02-08 15:26:56 -02:00
Ludovic Stephan
066df73b62 add different operation types 2017-02-08 15:11:38 -02:00
Qwann
ef59c115f6 avec le css c'est mieux 2017-02-08 15:40:58 +01:00
Qwann
6be2adc47a removing "open-Kfet-feature"
to keep it for an other merge request
2017-02-08 12:47:11 +01:00
Qwann
a4fdb99267 Revert "WS : quand la K-Fêt est ouverte ?"
This reverts commit ce9f717f06.
2017-02-08 12:42:07 +01:00
Ludovic Stephan
bb78091cc5 checkout fixture 2017-02-07 23:59:49 -02:00
Ludovic Stephan
8346dd65d1 dev data kfet 2017-02-07 23:22:31 -02:00
Ludovic Stephan
db94a8904c remove addition of new opegroups 2017-02-07 18:45:57 -02:00
Ludovic Stephan
2013fec68b move fixtures 2017-02-07 18:42:31 -02:00
Ludovic Stephan
8d0f803639 Corrige l'affichage du prix
fixes #128
2017-02-06 16:42:19 -02:00
Ludovic Stephan
5654fd84e8 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/own_password 2017-02-06 16:37:48 -02:00
Ludovic Stephan
2394a5e5d2 add low stock css to WS 2017-02-05 21:38:13 -02:00
Ludovic Stephan
95e96d8ce5 Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/visibilite_stock 2017-02-05 19:56:34 -02:00
Qwann
44202811ae not supporting future.builtins anymore in templatetags 2017-02-05 22:39:20 +01:00
Ludovic Stephan
b404c989ff pep8 2017-02-05 03:42:02 -02:00
Ludovic Stephan
1d5e693045 ws for transfers 2017-02-05 03:26:15 -02:00
Ludovic Stephan
1ea334341b ws update for history and transfer pages 2017-02-05 03:04:41 -02:00
Ludovic Stephan
f8aa67721c fix socket update 2017-02-05 02:19:20 -02:00
Ludovic Stephan
8895daff6a Merge branch 'Aufinal/transferts_historique' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/transferts_historique 2017-02-04 23:22:54 -02: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
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
1275fdff99 fixes #127
fixing stock update
2017-01-31 16:00:44 +01:00