Skip to content

Commit

Permalink
Merge pull request #1 from yannick1691/dev
Browse files Browse the repository at this point in the history
Added confirm delete group and changed doel from type date to type text
  • Loading branch information
Yannick authored Nov 6, 2017
2 parents 335f119 + 35af81d commit a3347bb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions components/groups/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,12 @@ export default class BoardGroup extends Component {
this.props.updateGroup(this.props.index, updatedGroup);
};

handleDeleteGroupItems(){
base.remove(`/items/${this.props.index}`);
this.props.removeGroup(this.props.index);
handleDeleteGroupItems() {
let r = confirm(`You are about to delete ${this.props.details.name}. \nThis can't be undone! \nAre you sure you want to delete the board ${this.props.details.name}`);
if (r === true) {
base.remove(`/items/${this.props.index}`);
this.props.removeGroup(this.props.index);
}
}

render() {
Expand Down
6 changes: 3 additions & 3 deletions components/item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ export default class Item extends Component {
class={style.deadline}
name="finishGoal"
onChange={(e) => this.handleChange(e, this.props.index)}
type="date"
type="text"
value={details.finishGoal}
placeholder="dd/mm/yyyy"
placeholder="dd/mm/yy"
/>
</div>
</td>
Expand All @@ -120,7 +120,7 @@ export default class Item extends Component {
onChange={(e) => this.handleChange(e, this.props.index)}
type="date"
value={details.deadline}
placeholder="dd/mm/yyyy"
placeholder="dd/mm/yy"
/>
</div>
</td>
Expand Down

0 comments on commit a3347bb

Please sign in to comment.