Skip to content

Commit 86362dd

Browse files
committed
Clean code implementation
1 parent aa0f0c6 commit 86362dd

4 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/Selection.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export default class Selection {
106106
if ([...existingClause.selection, ...existingClause.exclusion].length === 0)
107107
this.selectionJSON.data.splice(this.selectionJSON.data.indexOf(existingClause), 1);
108108
} else {
109-
console.log('add topic');
110109
this.addTopic(topicID);
111110
}
112111
}

src/components/portfolioPage/Corpora.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ class Corpora extends Component {
4141
let count = this.props.items.length;
4242
let total = this.props.from;
4343
let listIds = this.props.ids.map((corpus) =>{
44-
corpus = 'corpus : '.concat(corpus);
45-
return <div key={corpus}> <input type="checkbox" value={corpus} onChange={this.handleChange} checked={this.isChecked(corpus)}/>{corpus} <ItemCreator corpus={corpus} conf={this.props.conf} /></div>;
44+
let corpusFormated = 'corpus : '.concat(corpus);
45+
return <div key={corpusFormated}> <input class="corpus_checkbox" type="checkbox" value={corpusFormated} onChange={this.handleChange} checked={this.isChecked(corpusFormated)}/> {corpus} <ItemCreator corpus={corpus} conf={this.props.conf} /></div>;
4646
}
4747
);
4848
return (
@@ -99,8 +99,7 @@ class Corpora extends Component {
9999

100100
isChecked(corpus) {
101101
const selection = Selection.fromURI();
102-
let list = this.state.listCorpus;
103-
return selection.isSelectedOrExcluded(corpus) !== 'Excluded' || list.length === 0;
102+
return selection.isSelectedOrExcluded(corpus) !== 'Excluded';
104103
}
105104

106105
handleCorpusSelected(corpusId) {

src/components/portfolioPage/Portfolio.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ class Portfolio extends Component {
159159
[item]
160160
).getAttributes()
161161
.map(([key, value]) => key.concat(' : ', value.replace('\'', '’')));
162-
console.log(result);
163162
return result;
164163
}
165164

src/components/portfolioPage/Status.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Status extends Component {
2121
.sort(filter)
2222
.map(
2323
t => {
24-
console.log('t=', t);
2524
let res = (t.topic === null) ? <Trans>Rubrique inconnue</Trans> : <Badge exclusion={t.excluded} id={t.id} name={t.topic.name} _changeItemState={this._changeItemState}/>;
2625
return res;
2726
}
@@ -38,7 +37,6 @@ class Status extends Component {
3837
}
3938

4039
_getCandidate(id) {
41-
console.log('id=', id);
4240
for (let v of this.props.candidates) {
4341
if (v[id]) {
4442
return v[id];

0 commit comments

Comments
 (0)