From 35af81d9f007458b14a566606775d111562caba9 Mon Sep 17 00:00:00 2001 From: Yannick Date: Mon, 6 Nov 2017 09:20:03 +0100 Subject: [PATCH] Added confirm delete group and changed doel from type date to type text --- components/groups/index.js | 9 ++++++--- components/item/index.js | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/components/groups/index.js b/components/groups/index.js index 81e48b2..fd1d2ed 100644 --- a/components/groups/index.js +++ b/components/groups/index.js @@ -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() { diff --git a/components/item/index.js b/components/item/index.js index 168ce64..693a377 100644 --- a/components/item/index.js +++ b/components/item/index.js @@ -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" /> @@ -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" />