-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Js/fix eslint #413
Js/fix eslint #413
Conversation
37e4797
to
f59ebb4
Compare
@@ -639,24 +641,22 @@ function impressionTicket(data, response, unit = 'kg', tvaStuff = () => '', sumF | |||
${showPaiement(data.id_moyen)} | |||
<p>Ticket client à conserver.</p> | |||
<p>Date d'édition du ticket : ${moment().format('DD/MM/YYYY - HH:mm')}</p> | |||
${showTickets(data, unit)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was never read in showTickets
const item = (data.hasOwnProperty('items') && data.items.length > 0 | ||
? `<p>Ventes</p>${dashBreak}${showTicket(data.items, window.OressourceEnv.types_dechet, unit)}` | ||
? `<p>Ventes</p>${dashBreak}${showTicket(data.items, window.OressourceEnv.types_dechet)}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit
was passed around and in showTicket
link to fct it wasn't read at all.
} | ||
const showMoyen = (moyens, moyenId) => ( | ||
moyens.find(({id}) => id === moyenId).nom || "moyen de paiement inconnu!" | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just little trick to remove {}
and return
since it's an expression.
@@ -385,16 +387,16 @@ function login(onSuccess = undefined) { | |||
const form = new FormData(document.getElementById('formLogin')); | |||
const username = form.get('mail'); | |||
const password = form.get('pass'); | |||
const fetchPromise = fetch('../moteur/login_post.php', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchPromise
was never read.
@@ -52,7 +45,7 @@ class NumPad { | |||
|
|||
const div = document.createElement('div'); | |||
div.setAttribute('class', 'panel panel-info'); | |||
div.innerHTML = stripIndent` | |||
div.innerHTML = ` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know why I found that cool back in 2015...
// remove the shortest leading indentation from each line | ||
const indent = Math.min(...html[0].match(/^[ \t]*(?=\S)/gm).map(el => el.length)); | ||
return html[0].replace(new RegExp('^[ \\t]{' + indent + '}', 'gm'), ''); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed it ended up eating CPU in the wild.
La CI n'a jamais été mise en place mais on demandais a des VM de pop dans le cloud a chaque PR, allez stop le gachi en attendant d'avoir un vrai setup.
No description provided.