WIP: Aureplop/kpsul js refactor #501
No reviewers
Labels
No labels
devtype -- backend
devtype -- docs
devtype -- frontend
devtype -- user interface
difficulty -- easy
difficulty -- hard
difficulty -- normal
Doing
domain -- bda
domain -- bds
domain -- cof
domain -- core
domain -- kfet
Good first issue
priority -- high
priority -- low
priority -- medium
priority -- staff-wanted
status -- development
status -- discussion
status -- need review
status -- production
status -- ready to merge
status -- todo
To Do
type -- bug
type -- hygiene
type -- improvement
type -- new feature
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/gestioCOF#501
Loading…
Reference in a new issue
No description provided.
Delete branch "aureplop/kpsul_js_refactor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #77, #89, #108, #144.
added ~28 ~27 ~25 labels
Pourquoi ne pas laisser ça au
Formatter
?Perso, je préfère
var prop of props
, ça évite d'itérer sur des trucs inattendusOn peut vouloir utiliser cette valeur. Le
Formatter
ne sert qu'a définir l'affichageAh oui tout à fait
Justement, ça me paraissait plus en accord avec le prédicat 'backend en euros, frontend en UKF' ; mais je comprends la position inverse.
Ah mais en fait non y'avait une raison.
props
(etattrs
après) sont des tableaux et levar in
s'utilisent donc de cette manière.(voire même
let prop of props
si on veut pinailler sur la portée)Justement, c'est fait pour ça il me semble : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/for...of
Dans le cas
for ... in
, si tu crées une fonction surArray.prototype
tu vas itérer dessus aussi.Ah oui bien vu
Il faut une URL
django-reverse
iciadded 1 commit
a9d1a6aa
- clean array iterationCompare with previous version
Il va y avoir le même problème de coupure des résultats, le fix est ici.
added 1 commit
abce961d
- use django-js-reverseCompare with previous version
Apparemment selon cette page on détruit la compatibilité avec pas mal de trucs ici.
by
contient l'id du compte, pas son trigramme.Il manque
()
Ouais j'ai vu ça...
Ces fonctions seraient peut-être mieux dans
kfet.js
.NB : cette suppression casse (au moins)
transfers/new
2 choses :
kfet.account.read
read
, tu peux utiliserAccount.url_object_for
qui fait exactement la même chose.C'est peut-être temporaire, mais tes constructeurs ne prennent pas d'arguments (puisqu'on utilise
kpsul
en variable globale)Je comprends la position inverse aussi. Mais on commence aussi à être dans le frontend ici.
Et
grep -rnw -e "kfet.account.read.json"
ne donne que l'utilisation que tu cites.Vu que le compte est là,
this.account.url_object
fonctionne aussi.Je crois qu'ils servent à se filer l'environnement entre eux pour le moment. Mais effectivement, c'est bien de le noter qq part.
En fait je doute du bien-fondé de l'utilisation de
model_to_dict
, qui a pas l'air d'être documentée publiquement sur Django.Pour le moment, je fix ça rapidement.
added 6 commits
2e3bd5bd
- fix search box0d02d47d
- move utils functionsac18cbd9
- fix by on last statement72970c6b
- Fix api call on new transfers967748de
- details link to read instead of update6afbcb44
- delete array comprehesionCompare with previous version
Il faudrait un
return
ici pour être cohérent avecformatter.render
.Je ne sais pas si c'est important, mais il manque un
;
J'ai deux erreurs
account_manager is not defined
etcheckout_container is not defined
si j'essaie d'ajouter une majoration, et la même erreur pouraccount_manager
si je veux compter une conso avec majoration active.Et apparemment la majoration ne persiste pas après une actualisation, et les consos comptées avec majoration active n'apparaissent pas comme majorées dans l'historique.
Remarques sur les imports :
kfet.js
est déjà importé dansbase.html
donc ça fait un double import si on le remet dans le templatekfet.js
est importé partout et utiliseConfig
, il râle quand on importe paskfet.api.js
Accessoirement, il reste (entre autres dans
account_read
ethistory
des utilisations desettings
qui ne passent pas parConfig
.added 5 commits
485ae86a
- add update method to ModelObjectb81b33c0
- allow chaining on container in display method24f72ae7
- add missing ;bc6ecda0
- fix addcost kspul842f2cec
- fix import, fix ope with addcost enabled, move Config locationCompare with previous version
added 15 commits
6be2f086
- Add generic functions for confirm dialogs87943ea7
- Adapt kpsul to new functionsdbcfc6df
- Remove duplicate kfet.js import3f07bf56
- Remove console log3bf7a066
- Adapt history.html to new functions6d92df41
- Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCO…c1f70d9d
- Add capslock support for inputs5101400f
- Use callback_as_dict for addcost08c752f1
- Simplify addcost management582cdeba
- Better callback management236dcb46
- Tweaks to UserDialog29836fd1
- Remove deprecated option4af25621
- More clarity in argument names50200371
- api_lock inside kfet.jsdcda67aa
- Merge branch 'Aufinal/dialog_utils' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 320 commits
master
9d2298a0
- Merge branch 'master' into aureplop/kpsul_js_refactorCompare with previous version
Il faudrait peut-être rajouter un argument
always
en plus deon_success
eton_error
added 4 commits
efbcde16
- clean some jsf1aaad73
- Better jquery ajax calls management6be6202b
- few cleans6bb9280b
- Merge branch 'aureplop/clean_js' into 'aureplop/kpsul_js_refactor'Compare with previous version
Fix par
f1aaad73
added 1 commit
2e0de754
- kpsul - fix account balance ukfCompare with previous version
added 43 commits
64350326
- add Article and Category modelsdb9c14f7
- articlelist wip2cc0e0cf
- modellist suite et finc9cce5b1
- remove temp filed5dfd5fa
- move ModelList defa05a0759
- apimodellist & articlelistfe8e5d7e
- move and adapt manager and completionc9b76832
- articlelist and modellist finished8aa4fa2d
- modify article API returne1abff22
- last tweaks02485afd
- doc and compare function0219d998
- model tree struct draft1570d9f4
- Polish ModelForest classfe6823fc
- Adapt article_data return value to ModelTree standards08d1521d
- Adapt ArticleManagerto new API3d760794
- Add correct syntax to category data770c185b
- Modify sort in ModelTree2ce96bce
- Add traverse function to ModelTree01295d46
- Adapt ArticleAutocomplete to new formatf0a80561
- Add article display to Config callback1c5ac561
- Change article table into divs91f14ded
- last tweaks and doc9ab2a114
- Finish adapting ArticleManager and Autocompletea7de396a
- Better comparison control565a0543
- Add support for low stock cssfc3e86ae
- Add websocket support to ArticleManager3465dd70
- Change node.type to node.modelname for clarity5ff8f69b
- Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCO…7d93d91a
- Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articlesb91edc9c
- Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles3ce4dc5c
- Add article stock management05156f37
- Update addExistingPurchasee5791efe
- Remove last traces of old articlescb28b928
- Remove articleSelect from _env021937a3
- Small bugfixes9c559d9e
- Add articles reset to kpsul.reset3b9affb3
- Add focus methodsa29de134
- Move focus ; move is_low_stock to method840010b6
- Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_articles1761c5f1
- Change fromAPI logic508e7ec2
- Change traverse and find behavior5c422e89
- Add children fo traverse callback6a8f4184
- Merge branch 'Aufinal/refactor_articles' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 61 commits
master
e4ccd88d
- Merge branch 'master' into aureplop/kpsul_js_refactore4dd4346
- no longer use model_to_dictCompare with previous version
added 7 commits
df47beda
- Change ModelForest inner structure23d19545
- Add back root_sort9ba13a81
- Adapt add_to_container + small improvements73fb3c41
- Add stop check in traverse9ad208a1
- Change child sort + bugfix grom prev commit323f019c
- Check if children is non empty7fc07ac6
- Merge branch 'Aufinal/clean_modelforest' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 15 commits
master
c75b2946
- Merge branch 'master' into aureplop/kpsul_js_refactorCompare with previous version
added 23 commits
master
b0d35667
- Merge branch 'master' into aureplop/kpsul_js_refactorCompare with previous version
added 106 commits
971848cb
- database lookups5a354c61
- fetch transfers as wellf747c0c3
- print transfers (BROKEN)027bc2e9
- Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/transferts_historiqueac035638
- add css for transfers36edc334
- add transfer informationb0a21119
- Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/transferts_historiqueb3b49d57
- Merge branch 'k-fet' of git.eleves.ens.fr:cof-geek/gestioCOF into Aufinal/transferts_historique85af7fe4
- filter on id0b61a48c
- fix selection2c2da60e
- send data for cancel49bef61e
- filter transfers frop opes66304359
- unite cancel_ope and cancel_transfer1dbbad38
- transfer cancellation html3f35dc2c
- unite transfer historya9e1cd01
- add transfersonly optionee54b366
- minor imprevements to historye52c4458
- pluralize functionf06a732d
- remove unnecessary function8895daff
- Merge branch 'Aufinal/transferts_historique' of git.eleves.ens.fr:cof-geek/gesti…f8aa6772
- fix socket update1ea33434
- ws update for history and transfer pages1d5e6930
- ws for transfersb404c989
- pep8db94a890
- remove addition of new opegroupsfc2de20a
- use switch + move text02735642
- better pluralize48140925
- simpler string pluralizingeac6c420
- day, opegroup and ope model drafts8eae3cee
- adapt history view741bac88
- dummy History test classac2e773f
- opelist classab6b0d52
- Merge branch 'Aufinal/transferts_historique' into Aufinal/refactor_history66beeb5b
- transfer history added11603cee
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history53f89f53
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_historydf0ea96b
- Adapt history_json return value to ModelForest standards47fe74fb
- template specification58c57c6f
- Add hierarchy of needed models, w/ formattersb0b1fdf9
- Add jsdoc comments to history models5c9c206f
- Adapt css to new canceled syntax14b92263
- Remove deprecated history functionsb655907b
- Add history to KPsul manager34bb6805
- Add History equivalent functions644b0897
- Add websocket support for history9e905b0f
- Remove kpsul dependence from history (oops)1d532616
- Fix bugs introduced by previous commitb8a307b4
- Add support for kfet/history pagefa64a683
- Add strict mode to history.html script951932a6
- Add support and websocket to transfers.html7a000961
- Add support for account_read history66c5a695
- Improve websocket filter for special history pagesc99e4f26
- Move history initialisation as Config.reset callbackfe965875
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history1fcd53d7
- Continue renaming node.type to node.modelnameaa6a50a6
- Simplify JS-Python interface for cancel_ops0997d850
- Merge branch 'aureplop/kpsul_js_refactor' of git.eleves.ens.fr:cof-geek/gestioCO…e6735d44
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_historya1c97618
- Fix transfer sort2774dbb5
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history07290f6f
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_historya173be4f
- Use api_with_auth in history20b7156e
- Improve type displayec9f4727
- Fix WS update functions514f1da6
- Fix SpecialOpeFormatter360c442a
- Remove useless classe051631a
- Use WebSocket classes7ec7ed26
- Rename History class290d4ecb
- Merge branch 'Aufinal/refactor_articles' into Aufinal/refactor_history8d13c0a4
- Add fetch method88f7ea94
- Move selection logic to another classf57c2921
- Rename history vared0a82ed
- Add no_trigramme option051231a0
- Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_history688d5bba
- Adapt history to new structure5e875263
- Add index for Day objects47da80f2
- Add related objectscfb39b10
- Better default options983a5578
- Add cancel_history eventcd0e4c6f
- Allow (basic) chaining on api_with_auth84d47827
- Compatibility changes on history.jsce3d8aa6
- Change event triggered when canceling opes2eba6892
- Revert "Change event triggered when canceling opes"8c02e5da
- Trigger event on history itselfde865c61
- Move container clearing034a6614
- Tweaks on kfet.js659b2089
- Add filter to cancel_opesb544d6c5
- Better alignment10068645
- Change select_related for future compatibilityb2a5dfd6
- Move permission check20d63513
- Merge remote-tracking branch 'origin/aureplop/kpsul_js_refactor' into Aufinal/refactor_historye283439e
- Create ForestDisplay class46ac82fd
- Adapt history to changes5096e5f1
- Adapt ArticleManager16dbfed9
- Add chidren div in display8b8a3f8a
- Update button in history31b742fd
- Move ws update to respective classesc12c705f
- Bind ForestDisplay to initial dataf4cb1e2e
- Add opesonly optionad426872
- Fix tranfers pageac33e630
- Fix addExistingPurchase + few other bugsc2da055b
- Remove duplicate ws updates93c8844b
- typo43e77236
- Extend history options6a6fc38e
- Add selection reset to cancel_opes311e0c48
- Merge branch 'Aufinal/refactor_history' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 1 commit
bc71e162
- keep eslint quietCompare with previous version
added 56 commits
master
bacc0797
- Merge branch 'master' into aureplop/kpsul_js_refactorCompare with previous version
added 4 commits
02a015e6
- fix data sent to ws by perform_transferscb0c0be8
- filters on ws for khistory24b9aaae
- Revert template literals useef1f00c1
- Merge branch 'aureplop/fix_ws' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 2 commits
914d2ca8
- Add last statement update support.c76b7293
- Merge branch 'aureplop/ws_checkout' into 'aureplop/kpsul_js_refactor'Compare with previous version
added 212 commits
master
b62f0293
- Merge branch 'master' into aureplop/kpsul_js_refactorf03ce351
- Merge branch 'master' into aureplop/kpsul_js_refactorCompare with previous version
added 1 commit
5ef219c8
- kfet -- Update tests to reflect last changes + fixCompare with previous version
mentioned in issue #187
added 122 commits
master
a0bd4372
- Merge branch 'master' into aureplop/kpsul_js_refactor7e15fd2d
- Fix CheckoutReadView test27d26245
- Bugfix : deep extend in history.jsCompare with previous version
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.